Update email -----邮件原件----- 发件人: Lu.Tang <Lu.Tang@xxxxxxxxxxxx> 发送时间: 2025年3月14日 15:33 收件人: Jonathan Cameron <jic23@xxxxxxxxxx>; Lars-Peter Clausen <lars@xxxxxxxxxx>; Rob Herring <robh@xxxxxxxxxx>; Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>; Conor Dooley <conor+dt@xxxxxxxxxx>; Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>; Lee Jones <lee@xxxxxxxxxx>; Matthias Brugger <matthias.bgg@xxxxxxxxx>; AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>; Sean Wang <sean.wang@xxxxxxxxxx>; Linus Walleij <linus.walleij@xxxxxxxxxx>; Liam Girdwood <lgirdwood@xxxxxxxxx>; Mark Brown <broonie@xxxxxxxxxx>; Stephen Boyd <sboyd@xxxxxxxxxx>; Chen Zhong (钟辰) <Chen.Zhong@xxxxxxxxxxxx>; Sen Chu <shen.chu@xxxxxxxxxxxx> 抄送: linux-iio@xxxxxxxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-input@xxxxxxxxxxxxxxx; linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; linux-mediatek@xxxxxxxxxxxxxxxxxxx; linux-gpio@xxxxxxxxxxxxxxx; Project_Global_Chrome_Upstream_Group <Project_Global_Chrome_Upstream_Group@xxxxxxxxxxxx>; Lu Tang (汤璐) <Lu.Tang@xxxxxxxxxxxx> 主题: [PATCH 5/5] dt-bindings: pmic: mediatek: Add pmic documents Add new pmic mfd and adc documents for mt8196 Signed-off-by: Lu.Tang <Lu.Tang@xxxxxxxxxxxx> --- .../iio/adc/mediatek,spmi-pmic-auxadc.yaml | 31 ++++ .../bindings/input/mediatek,pmic-keys.yaml | 1 + .../bindings/mfd/mediatek,mt6685.yaml | 50 +++++ .../bindings/mfd/mediatek,spmi-pmic.yaml | 173 ++++++++++++++++++ .../pinctrl/mediatek,mt65xx-pinctrl.yaml | 1 + 5 files changed, 256 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/mediatek,spmi-pmic-auxadc.yaml create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6685.yaml create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,spmi-pmic.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/mediatek,spmi-pmic-auxadc.yaml b/Documentation/devicetree/bindings/iio/adc/mediatek,spmi-pmic-auxadc.yaml new file mode 100644 index 000000000000..250782ad7d01 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/mediatek,spmi-pmic-auxad +++ c.yaml @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) %YAML 1.2 +--- +$id: +http://devicetree.org/schemas/iio/adc/mediatek,spmi-pmic-auxadc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek SPMI PMIC AUXADC + +maintainers: + - Lu Tang <lu.tang@xxxxxxxxxxxx> + +description: + The Auxiliary Analog/Digital Converter (AUXADC) is an ADC found + in some MediaTek PMICs, performing various PMIC related measurements + such as battery and PMIC internal voltage regulators temperatures, + other than voltages for various PMIC internal components. + +properties: + compatible: + enum: + - mediatek,mt6363-auxadc + - mediatek,mt6373-auxadc + + "#io-channel-cells": + const: 1 + +required: + - compatible + - "#io-channel-cells" + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml b/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml index b95435bd6a9b..ce760039d4c2 100644 --- a/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml +++ b/Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml @@ -31,6 +31,7 @@ properties: - mediatek,mt6358-keys - mediatek,mt6359-keys - mediatek,mt6397-keys + - mediatek,mt6363-keys power-off-time-sec: true diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6685.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6685.yaml new file mode 100644 index 000000000000..d3276df8952b --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6685.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/mediatek,mt6685.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT6685 Clock IC + +maintainers: + - Lu Tang <lu.tang@xxxxxxxxxxxx> + +description: | + MT6685 is a clock IC. + Please see the sub-modules below for supported features. + + MT6685 is a multifunction device with the following sub modules: + - RTC + - Clock + +properties: + compatible: + const: mediatek,mt6685 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include <dt-bindings/spmi/spmi.h> + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + + spmi { + mfd@9 { + compatible = "mediatek,mt6685"; + reg = <0x9 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; + }; diff --git a/Documentation/devicetree/bindings/mfd/mediatek,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/mediatek,spmi-pmic.yaml new file mode 100644 index 000000000000..a8f1231623cf --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/mediatek,spmi-pmic.yaml @@ -0,0 +1,173 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/mediatek,spmi-pmic.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek SPMI PMICs multi-function device + +maintainers: + - Lu Tang <lu.tang@xxxxxxxxxxxx> + +description: | + Some Mediatek PMICs are interfaced to the chip via the SPMI (System +Power + Management Interface) bus. + + The Mediatek SPMI series includes the MT6363, MT6373, MT6316 and + other PMICs.Please see the sub-modules below for supported features. + + MT6363/MT6373 is a multifunction device with the following sub modules: + - Regulators + - ADC + - GPIO + - Keys + MT6316 is a multifunction device with the following sub modules: + - Regulators + +properties: + compatible: + oneOf: + - enum: + - mediatek,mt6363 + - mediatek,mt6373 + - mediatek,mt6316 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + regulators: + type: object + description: + List of child nodes that specify the regulators. + additionalProperties: true + + properties: + compatible: + oneOf: + - enum: + - mediatek,mt6363-regulator + - mediatek,mt6373-regulator + - mediatek,mt6316-regulator + + required: + - compatible + + adc: + type: object + $ref: /schemas/iio/adc/mediatek,spmi-pmic-auxadc.yaml# + unevaluatedProperties: false + + keys: + type: object + $ref: /schemas/input/mediatek,pmic-keys.yaml + unevaluatedProperties: false + description: + Power and Home keys. + + pinctrl: + type: object + $ref: /schemas/pinctrl/mediatek,mt65xx-pinctrl.yaml + unevaluatedProperties: false + description: + Pin controller + +required: + - compatible + - regulators + +additionalProperties: false + +examples: + - | + #include <dt-bindings/spmi/spmi.h> + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + + spmi { + main_pmic: pmic@4 { + compatible = "mediatek,mt6363"; + reg = <0x4 SPMI_USID>; + interrupts = <0x4 IRQ_TYPE_NONE>; + #address-cells = <0>; + interrupt-controller; + #interrupt-cells = <2>; + + mt6363keys: keys { + compatible = "mediatek,mt6363-keys"; + mediatek,long-press-mode = <1>; + power-off-time-sec = <0>; + + power { + linux,keycodes = <116>; + wakeup-source; + }; + + home { + linux,keycodes = <115>; + }; + }; + + mt6363_pio: pinctrl { + compatible = "mediatek,mt6363-pinctrl"; + gpio-controller; + #gpio-cells = <2>; + }; + + mt6363regulator: regulators { + compatible = "mediatek,mt6363-regulator"; + + mt6363_vs2: vs2 { + regulator-name = "mt6363_vs2"; + regulator-allowed-modes = <0 1 2>; + regulator-always-on; + regulator-allow-set-load; + }; + + mt6363_vbuck1: vbuck1 { + regulator-name = "mt6363_vbuck1"; + regulator-allowed-modes = <0 1 2>; + }; + + mt6363_vbuck2: vbuck2 { + regulator-name = "mt6363_vbuck2"; + regulator-allowed-modes = <0 1 2>; + }; + + mt6363_vbuck3: vbuck3 { + regulator-name = "mt6363_vbuck3"; + regulator-allowed-modes = <0 1 2>; + }; + + mt6363_vbuck4: vbuck4 { + regulator-name = "mt6363_vbuck4"; + regulator-allowed-modes = <0 1 2>; + }; + + mt6363_vbuck5: vbuck5 { + regulator-name = "mt6363_vbuck5"; + regulator-allowed-modes = <0 1 2>; + }; + + mt6363_vbuck6: vbuck6 { + regulator-name = "mt6363_vbuck6"; + regulator-allowed-modes = <0 1 2>; + }; + + mt6363_vbuck7: vbuck7 { + regulator-name = "mt6363_vbuck7"; + regulator-allowed-modes = <0 1 2>; + }; + + // ... + + mt6363_isink_load: isink-load { + regulator-name = "mt6363_isink_load"; + }; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt65xx-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt65xx-pinctrl.yaml index bccff08a5ba3..bf3ba58a7705 100644 --- a/Documentation/devicetree/bindings/pinctrl/mediatek,mt65xx-pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/mediatek,mt65xx-pinctrl. +++ yaml @@ -17,6 +17,7 @@ properties: enum: - mediatek,mt2701-pinctrl - mediatek,mt2712-pinctrl + - mediatek,mt6363-pinctrl - mediatek,mt6397-pinctrl - mediatek,mt7623-pinctrl - mediatek,mt8127-pinctrl -- 2.46.0