From: Alexandre Mergnat <amergnat@baylibre.com>
To: Fabien Parent <fabien.parent@linaro.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Sean Wang <sean.wang@mediatek.com>,
Mark Brown <broonie@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Lee Jones <lee@kernel.org>, Chen Zhong <chen.zhong@mediatek.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-leds@vger.kernel.org,
Alexandre Mergnat <amergnat@baylibre.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-input@vger.kernel.org,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Fabien Parent <fparent@baylibre.com>,
linux-rtc@vger.kernel.org, Rob Herring <robh@kernel.org>,
linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org,
Mattijs Korpershoek <mkorpershoek@baylibre.com>
Subject: [PATCH v4 4/9] dt-bindings: mfd: mediatek: Add bindings for MT6357 PMIC
Date: Tue, 08 Nov 2022 19:43:39 +0100 [thread overview]
Message-ID: <20221005-mt6357-support-v4-4-5d2bb58e6087@baylibre.com> (raw)
In-Reply-To: <20221005-mt6357-support-v4-0-5d2bb58e6087@baylibre.com>
Currently, almost all MT63XX PMIC are documented mfd/mt6397.txt.
Unfortunately, the PMICs haven't always similar HW sub-features.
To have a better human readable schema, I chose to make one PMIC schema
to match the exact HW capabilities instead of convert mt6397.txt to
mediatek,mt63xx.yaml and put a bunch of properties behind
"if contain ... then ..."
- add interrupt property
- change property refs to match with new yaml documentation
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
---
.../devicetree/bindings/mfd/mediatek,mt6357.yaml | 102 +++++++++++++++++++++
1 file changed, 102 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
new file mode 100644
index 000000000000..7b421f21d3f5
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/mediatek,mt6357.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek MT6357 Multifunction Device Driver
+
+maintainers:
+ - Alexandre Mergnat <amergnat@baylibre.com>
+
+description: |
+ MT6357 is a power management system chip containing 5 buck
+ converters and 29 LDOs. Supported features are audio codec,
+ USB battery charging, fuel gauge, RTC
+
+ This is a multifunction device with the following sub modules:
+ - Regulator
+ - RTC
+ - Keys
+
+ It is interfaced to host controller using SPI interface by a proprietary hardware
+ called PMIC wrapper or pwrap. This MFD is a child device of pwrap.
+ See the following for pwrap node definitions:
+ ../soc/mediatek/mediatek,pwrap.yaml
+
+properties:
+ compatible:
+ const: mediatek,mt6357
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ "#interrupt-cells":
+ const: 2
+
+ regulators:
+ type: object
+ $ref: ../regulator/mediatek,mt6357-regulator.yaml
+ description:
+ Child node that specify the regulator.
+
+ rtc:
+ type: object
+ $ref: ../rtc/mediatek,mt6397-rtc.yaml
+ description:
+ Child node that specify the RTC.
+
+ keys:
+ type: object
+ $ref: ../input/mediatek,pmic-keys.yaml
+ description:
+ Child node that specify the keys.
+
+required:
+ - compatible
+ - regulators
+
+additionalProperties: false
+
+examples:
+ - |
+ pwrap {
+ pmic {
+ compatible = "mediatek,mt6357";
+
+ interrupt-parent = <&pio>;
+ interrupts = <145 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ regulators {
+ mt6357_vproc_reg: buck-vproc {
+ regulator-name = "vproc";
+ regulator-min-microvolt = <518750>;
+ regulator-max-microvolt = <1312500>;
+ regulator-ramp-delay = <6250>;
+ regulator-enable-ramp-delay = <220>;
+ regulator-always-on;
+ };
+
+ // ...
+
+ mt6357_vusb33_reg: ldo-vusb33 {
+ regulator-name = "vusb33";
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3100000>;
+ regulator-enable-ramp-delay = <264>;
+ };
+ };
+
+ rtc {
+ compatible = "mediatek,mt6357-rtc";
+ };
+
+ keys {
+ compatible = "mediatek,mt6357-keys";
+ };
+ };
+ };
--
b4 0.10.1
next prev parent reply other threads:[~2022-11-08 18:44 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-08 18:43 [PATCH v4 0/9] Add MediaTek MT6357 PMIC support Alexandre Mergnat
2022-11-08 18:43 ` [PATCH v4 1/9] dt-bindings: input: mtk-pmic-keys: add binding for MT6357 PMIC Alexandre Mergnat
2022-11-08 18:43 ` [PATCH v4 2/9] dt-bindings: rtc: mediatek: convert MT6397 rtc documentation Alexandre Mergnat
2022-11-08 22:30 ` Rob Herring
2022-11-09 9:40 ` AngeloGioacchino Del Regno
2022-11-09 17:49 ` Alexandre Belloni
2022-11-09 22:29 ` Rob Herring
2022-11-09 22:57 ` Alexandre Belloni
2022-11-10 14:14 ` Krzysztof Kozlowski
2022-11-14 22:57 ` Alexandre Belloni
2022-11-15 7:56 ` Krzysztof Kozlowski
2022-11-15 8:05 ` Alexandre Belloni
2022-11-15 8:17 ` Krzysztof Kozlowski
2022-11-15 10:34 ` Alexandre Mergnat
2022-11-15 13:49 ` Krzysztof Kozlowski
2022-11-08 18:43 ` [PATCH v4 3/9] dt-bindings: regulator: Add binding schema for mt6357 regulators Alexandre Mergnat
2022-11-11 14:45 ` Krzysztof Kozlowski
2022-11-08 18:43 ` Alexandre Mergnat [this message]
2022-11-08 22:30 ` [PATCH v4 4/9] dt-bindings: mfd: mediatek: Add bindings for MT6357 PMIC Rob Herring
2022-11-11 14:51 ` Krzysztof Kozlowski
2022-11-08 18:43 ` [PATCH v4 5/9] dt-bindings: soc: mediatek: convert pwrap documentation Alexandre Mergnat
2022-11-09 9:55 ` AngeloGioacchino Del Regno
2022-11-15 13:54 ` Alexandre Mergnat
2022-11-15 14:18 ` Krzysztof Kozlowski
2022-11-15 15:54 ` Alexandre Mergnat
2022-11-11 14:55 ` Krzysztof Kozlowski
2022-11-08 18:43 ` [PATCH v4 6/9] arm64: dts: mt6358: change node names Alexandre Mergnat
2022-11-08 18:43 ` [PATCH v4 7/9] arm64: dts: mt8173: change node name Alexandre Mergnat
2022-11-08 18:43 ` [PATCH v4 8/9] regulator: add mt6357 regulator Alexandre Mergnat
2022-11-08 18:43 ` [PATCH v4 9/9] Input: mtk-pmic-keys: add MT6357 support Alexandre Mergnat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221005-mt6357-support-v4-4-5d2bb58e6087@baylibre.com \
--to=amergnat@baylibre.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=chen.zhong@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=fabien.parent@linaro.org \
--cc=fparent@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-rtc@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=mkorpershoek@baylibre.com \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sean.wang@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox