Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Lee Jones <lee@kernel.org>
Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20221005-mt6357-support-v8-3-560caaafee53@baylibre.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>

authored by

Alexandre Mergnat and committed by
Matthias Brugger
22282276 fc5a643f

+111
+111
Documentation/devicetree/bindings/mfd/mediatek,mt6357.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/mfd/mediatek,mt6357.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: MediaTek MT6357 PMIC 8 + 9 + maintainers: 10 + - Flora Fu <flora.fu@mediatek.com> 11 + - Alexandre Mergnat <amergnat@baylibre.com> 12 + 13 + description: | 14 + MT6357 is a power management system chip containing 5 buck 15 + converters and 29 LDOs. Supported features are audio codec, 16 + USB battery charging, fuel gauge, RTC 17 + 18 + This is a multifunction device with the following sub modules: 19 + - Regulator 20 + - RTC 21 + - Keys 22 + 23 + It is interfaced to host controller using SPI interface by a proprietary hardware 24 + called PMIC wrapper or pwrap. This MFD is a child device of pwrap. 25 + See the following for pwrap node definitions: 26 + Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml 27 + 28 + properties: 29 + compatible: 30 + const: mediatek,mt6357 31 + 32 + interrupts: 33 + maxItems: 1 34 + 35 + interrupt-controller: true 36 + 37 + "#interrupt-cells": 38 + const: 2 39 + 40 + regulators: 41 + type: object 42 + $ref: /schemas/regulator/mediatek,mt6357-regulator.yaml 43 + description: 44 + List of MT6357 BUCKs and LDOs regulators. 45 + 46 + rtc: 47 + type: object 48 + $ref: /schemas/rtc/rtc.yaml# 49 + description: 50 + MT6357 Real Time Clock. 51 + properties: 52 + compatible: 53 + const: mediatek,mt6357-rtc 54 + start-year: true 55 + required: 56 + - compatible 57 + 58 + keys: 59 + type: object 60 + $ref: /schemas/input/mediatek,pmic-keys.yaml 61 + description: 62 + MT6357 power and home keys. 63 + 64 + required: 65 + - compatible 66 + - regulators 67 + 68 + additionalProperties: false 69 + 70 + examples: 71 + - | 72 + #include <dt-bindings/interrupt-controller/arm-gic.h> 73 + 74 + pwrap { 75 + pmic { 76 + compatible = "mediatek,mt6357"; 77 + 78 + interrupt-parent = <&pio>; 79 + interrupts = <145 IRQ_TYPE_LEVEL_HIGH>; 80 + interrupt-controller; 81 + #interrupt-cells = <2>; 82 + 83 + regulators { 84 + mt6357_vproc_reg: buck-vproc { 85 + regulator-name = "vproc"; 86 + regulator-min-microvolt = <518750>; 87 + regulator-max-microvolt = <1312500>; 88 + regulator-ramp-delay = <6250>; 89 + regulator-enable-ramp-delay = <220>; 90 + regulator-always-on; 91 + }; 92 + 93 + // ... 94 + 95 + mt6357_vusb33_reg: ldo-vusb33 { 96 + regulator-name = "vusb33"; 97 + regulator-min-microvolt = <3000000>; 98 + regulator-max-microvolt = <3100000>; 99 + regulator-enable-ramp-delay = <264>; 100 + }; 101 + }; 102 + 103 + rtc { 104 + compatible = "mediatek,mt6357-rtc"; 105 + }; 106 + 107 + keys { 108 + compatible = "mediatek,mt6357-keys"; 109 + }; 110 + }; 111 + };