From patchwork Sun Feb 11 09:35:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karel Balej X-Patchwork-Id: 199397 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1850165dyd; Sun, 11 Feb 2024 01:48:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUsDvF1oDwRDhVsxSeH6kDisSbcrscFBerNRh6H8vP7Dfl3n6HYNy/thmbzE3u0IOt2IldkdnINTisDjGC387Xra35hiQ== X-Google-Smtp-Source: AGHT+IGNshf85NymlUOfuThnKJxtVOO3DZSPxAG0jVSwbpnuUgCCW8TplSu513K+JwcMHQsdIAsD X-Received: by 2002:ac8:58cc:0:b0:42c:70d8:3aa3 with SMTP id u12-20020ac858cc000000b0042c70d83aa3mr2111650qta.41.1707644893485; Sun, 11 Feb 2024 01:48:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707644893; cv=pass; d=google.com; s=arc-20160816; b=Ow7fMYPJ2Txfxp4Jo0vmRLpEG3IIquOp7h3QKOe3AtanmSRcEkaN7T4ga66KqwCOzs rRgU4+iWjdVTQ2/lbHRaTwX9XKWKPHiblovrHUxT1YBV7DZyXVijarrECOa56bWXGJRl UiUJjh8KI9P89iUneYIqsQ9bIFiB1ZVoZYY7QCuJQPbzqywjNglMn3KSLS6NqZcMffft 7US8x0TlTGqPJsuVqxOgUtT7Nv/z/F0HNLSJMfOtXgc0Pv+LaxDJg/8hXeaLA++NR9dx aOdjOplcSVdWDT2Azeky/zgDt2M6HElxwC5Y2hxFgFr6gHme2pgrzSMyb8cs9aw1hHgm V0Xw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=1dd6eTc4LuIWcje8dVYWy0TKIb1SEY0gJW1Mf2PyJcw=; fh=PbZZ8GwhA7P9lcruMHU/3mfNwWN4tEzHQDN7XQt+UZA=; b=xU5tffF3Om+zuKNeI2nCe6SmbrFMdynT84r6eB4+ty7cRnSzdi2Teglw1l57W/Zf1f k7ZE//Q2idpKdweCNg1v6uMROQnisaQw52ucX4JqhBx5eB7f+3YI9fi5Z8rd2wgVXkMt oCZUgzZ1D62LujCF4+P3fcJ8hDK6n0FtXSu5BowCiSWmQSYOc7piVjQmN7gD3OvbnJ5j ytwo61wI8aoi1k/GJMeHK/GadTIJUhSgRJcAPG+4hf85C/NNXKspLJrTOgged3l4KXrC z5s1f5Zu61GwYKLcBVRNYcZaF2e+idd1mdUr2sptnbbDE2I/rdG33Vz+Qx5lEvaP8uQc fzJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=TUYZLq4r; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-60683-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60683-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz X-Forwarded-Encrypted: i=2; AJvYcCXvGnv4E2U7vlSlC2zOO3vpUFCcu/QZlTcERq1ljd8AbntoeZJOmBPAjRg8wpcFALxLd/9XmTyzX6l9Fd3Tk36aK4uE1A== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j10-20020a05622a038a00b0042bf5fdf545si6074818qtx.149.2024.02.11.01.48.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 01:48:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60683-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b=TUYZLq4r; arc=pass (i=1 spf=pass spfdomain=gimli.ms.mff.cuni.cz dkim=pass dkdomain=gimli.ms.mff.cuni.cz dmarc=pass fromdomain=gimli.ms.mff.cuni.cz); spf=pass (google.com: domain of linux-kernel+bounces-60683-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60683-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3B4411C214E9 for ; Sun, 11 Feb 2024 09:48:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0FC3C5A7B6; Sun, 11 Feb 2024 09:47:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="TUYZLq4r" Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9965B59168; Sun, 11 Feb 2024 09:47:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.113.20.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707644831; cv=none; b=bnUmt+Ga3l1a9p9NM4AZSsD0OAl90tieiImmA6VH2XylqlY3aIM3IHT9YedAeuHQhVI55B4wo66kvH+SnIL6v9lmBgPmqV0qUC72ejeYcjrdpZnd+1Qqa0iHZzBuciDkXf6EdwXez2LZV5tsE6ySF1AEChTxIiI1kLoVWn7964c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707644831; c=relaxed/simple; bh=oqauVdjizpK0nSqK/k+yascV7g6ah9iuGuFIqFuEPk4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YYj379eJpfm39KLUqFQG8VKYVQv3+/7AvDyXdWLza7gVS5bZAAOdDX+24G1eCxQVV3FGbP0LfAunbyq2Tp7x0jh+9SI/Q7W19cOvZfVSoAqE6D+So7iBUEdNhRtRv71Hvxfv2+/5vfcc0TDB+ErPxn4h9z1lOP1i4105bvK2x4o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b=TUYZLq4r; arc=none smtp.client-ip=195.113.20.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 66E772811C0; Sun, 11 Feb 2024 10:47:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1707644820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1dd6eTc4LuIWcje8dVYWy0TKIb1SEY0gJW1Mf2PyJcw=; b=TUYZLq4rPBpv91SS5xG8EGT9euIw+fgu2Tsr16UjY3Fm4AXV8PoRSAyaTCvrFklmNPEuWY zwZ58p0AboOSifjInOnzV9lxuM5rcKnXwW/ClXWlKMnOvKKsOdiw+cFVVKjaCg4va36AT1 R6wHvMIEzQUDuCGbgoWxa3CkAzfNJmg= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id 436CA457D27; Sun, 11 Feb 2024 10:47:00 +0100 (CET) From: Karel Balej To: Karel Balej , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Liam Girdwood , Mark Brown , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= , ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org Subject: [RFC PATCH v2 1/6] dt-bindings: mfd: add entry for Marvell 88PM886 PMIC Date: Sun, 11 Feb 2024 10:35:51 +0100 Message-ID: <20240211094609.2223-2-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240211094609.2223-1-karelb@gimli.ms.mff.cuni.cz> References: <20240211094609.2223-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790595451740170183 X-GMAIL-MSGID: 1790595451740170183 From: Karel Balej Marvell 88PM886 is a PMIC with several subdevices such as onkey, regulators or battery and charger. It comes in at least two revisions, A0 and A1 -- only A1 is described here at the moment. Signed-off-by: Karel Balej --- Notes: RFC v2: - Address Rob's feedback: - Drop mention of 88PM880. - Make sure the file passes bindings check (add the necessary header and fix `interrupt-cells`). - Other small changes. - Add regulators. Changes with respect to the regulator RFC series: - Address Krzysztof's comments: - Drop unused compatible. - Fix sub-node pattern. .../bindings/mfd/marvell,88pm88x.yaml | 74 +++++++++++++++++++ .../regulator/marvell,88pm88x-regulator.yaml | 28 +++++++ 2 files changed, 102 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml create mode 100644 Documentation/devicetree/bindings/regulator/marvell,88pm88x-regulator.yaml diff --git a/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml b/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml new file mode 100644 index 000000000000..29ab979862d5 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/marvell,88pm88x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell 88PM88X PMIC core + +maintainers: + - Karel Balej + +description: + Marvell 88PM886 is a PMIC providing several functions such as onkey, + regulators or battery and charger. + +properties: + compatible: + const: marvell,88pm886-a1 + + reg: + maxItems: 1 + + interrupt-controller: true + + interrupts: + maxItems: 1 + + "#interrupt-cells": + const: 1 + + regulators: + $ref: /schemas/regulator/marvell,88pm88x-regulator.yaml# + +required: + - compatible + - reg + - interrupt-controller + - interrupts + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + pmic@30 { + compatible = "marvell,88pm886-a1"; + reg = <0x30>; + interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>; + interrupt-parent = <&gic>; + interrupt-controller; + #interrupt-cells = <1>; + + regulators { + ldo2: ldo2 { + regulator-min-microvolt = <3100000>; + regulator-max-microvolt = <3300000>; + }; + + ldo15: ldo15 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + buck2: buck2 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/regulator/marvell,88pm88x-regulator.yaml b/Documentation/devicetree/bindings/regulator/marvell,88pm88x-regulator.yaml new file mode 100644 index 000000000000..1b4b5f1b4932 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/marvell,88pm88x-regulator.yaml @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/marvell,88pm88x-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Regulators of Marvell 88PM88X PMICs. + +maintainers: + - Karel Balej + +description: | + This is a part of device tree bindings for Marvell 88PM88X MFD. + + The regulators node is represented as a sub-node of the PMIC node on the + device tree. + + See also Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml for + additional information and example. + +patternProperties: + "^(ldo(1[0-6]|[1-9])|buck[1-5])$": + type: object + $ref: /schemas/regulator/regulator.yaml# + description: LDO or buck regulator. + unevaluatedProperties: false + +additionalProperties: false