[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221005-mt6357-support-v4-4-5d2bb58e6087@baylibre.com>
Date: Tue, 08 Nov 2022 19:43:39 +0100
From: Alexandre Mergnat <amergnat@...libre.com>
To: Fabien Parent <fabien.parent@...aro.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Sean Wang <sean.wang@...iatek.com>,
Mark Brown <broonie@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Lee Jones <lee@...nel.org>,
Chen Zhong <chen.zhong@...iatek.com>,
Alessandro Zummo <a.zummo@...ertech.it>,
Pavel Machek <pavel@....cz>, Rob Herring <robh+dt@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: linux-leds@...r.kernel.org,
Alexandre Mergnat <amergnat@...libre.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-input@...r.kernel.org,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Fabien Parent <fparent@...libre.com>,
linux-rtc@...r.kernel.org, Rob Herring <robh@...nel.org>,
linux-mediatek@...ts.infradead.org, devicetree@...r.kernel.org,
Mattijs Korpershoek <mkorpershoek@...libre.com>
Subject: [PATCH v4 4/9] dt-bindings: mfd: mediatek: Add bindings for MT6357 PMIC
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@...libre.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@...libre.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
Powered by blists - more mailing lists