dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format
Subsystems (12)
Macpaul Lin
maintainerPATCH v4 2/3 dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format
Convert the mfd: mediatek: mt6397 binding to DT schema format.
MT6323, MT6358, and MT6397 are PMIC devices with multiple function subdevices. They share a common PMIC design but have variations in subdevice combinations.
Key updates in this conversion:
1. RTC:
- Convert rtc-mt6397.txt and merge into parent MT6397 PMIC DT schema.
2. Regulators:
- Align to generic name "regulators".
- Update references from .txt to .yaml for mt6323, mt6358, and mt6397 regulators.
- Simplify regulator name labels in device tree examples.
3. Audio Codec:
- Convert sound/mt6358.txt and merge into parent MT6397 PMIC DT schema.
- Align to generic name "audio-codec" for codec and sound subdevices.
- Add "mediatek,dmic-mode" and "Avdd-supply" properties.
4. Clocks:
- Align to generic name "clocks" for clockbuffer subdevices.
5. LEDs:
- Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema.
- Update LED binding.
6. Keys:
- Add detailed descriptions for power and home keys.
- Add compatible: mediatek,mt6358-keys.
7. Power Controller:
- Convert mt6323-poweroff.txt and merge into parent MT6397 PMIC DT schema.
- Add #power-domain-cells property to fix dt-binding check error.
- Clarify "BBPU" as "Baseband power up".
8. Pinctrl:
- Align to generic name "pinctrl" instead of "pin-controller".
9. Compatible:
- Drop "mediatek,mt6357" since there is a separated DT Schema
for PMIC MT6357.
Additional updates:
- MAINTAINERS: Add co-maintainers and reference to mfd/mediatek,mt6397.yaml for LED and power-controller drivers.
- input/mediatek,pmic-keys.yaml: Update reference to mfd/mediatek,mt6397.yaml.
--- .../bindings/input/mediatek,pmic-keys.yaml | 2 +- .../devicetree/bindings/leds/leds-mt6323.txt | 63 - .../bindings/mfd/mediatek,mt6397.yaml | 1077 +++++++++++++++++ .../devicetree/bindings/mfd/mt6397.txt | 110 -- .../bindings/power/reset/mt6323-poweroff.txt | 20 - .../devicetree/bindings/rtc/rtc-mt6397.txt | 31 - .../devicetree/bindings/sound/mt6358.txt | 26 - MAINTAINERS | 8 +- 8 files changed, 1084 insertions(+), 253 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/mt6397.txt delete mode 100644 Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-mt6397.txt delete mode 100644 Documentation/devicetree/bindings/sound/mt6358.txt
Changes for v1:
- This patch depends on conversion of mediatek,mt6397-regulator.yaml
[1] https://lore.kernel.org/lkml/[email protected]/T/
Changes for v2:
- This patch has been made base on linux-next/master git repo.
- Keep the parent and child relationship with mediatek,pwrap in description.
[2] https://lore.kernel.org/all/20240826-slurp-earphone-0d5173923ae8@spud/
- Keep the $ref for regulators since dt_binding_check didn't report any issue based on linux-next/master repo.
- Fix description of mt6397/mt6323 devices, use "power management chip" instead of "multifunction device"
- Drop unnecessary comments or description according to the review.
- Convert sub-modules to DT Schema:
- RTC, LEDs, power-controllers, regulators
- Drop duplicate sub node name and description for sub-modules
- RTC, Keys
- examples:
- drop parent pwrap node
- Add examples from mediatek,mt6323-regulator.yaml
- Add examples from mediatek,mt6358-regulator.yaml
- Add examples from mediatek,mt6397-regulator.yaml
- Complete the examples as could as possible.
Changes for v3:
- Rebased on linux-next/master git repo near next-20240906.
- Revise commit message.
- Regulators:
- Use "additionalProperties: true" and add "contains" for matching $ref DT bindings.
- Simplify regulator name labels in device tree examples.
- LEDs:
- Use LED bindings.
- Squash following patches in v2 for removing old text format DT bindings into this patch, includes:
- leds-mt6323.txt, mt6323-poweroff.txt, rtc-mt6397.txt, sound/mt6358.txt.
- Fix file format of DT schemas, add blank between properties.
- Fix 'make checkrefdoc' errors, update reference in mediatek,pmic-keys.yaml.
Changes for v4:
- Remove "mediatek,mt6357" from PMIC's compatible string since there is a seperated DT schema for PMIC mt6357.
Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml +1 -1
@@ -19,7 +19,7 @@ description: | by the PMIC that is defined as a Multi-Function Device (MFD). For MediaTek MT6323/MT6397 PMIC bindings see - Documentation/devicetree/bindings/mfd/mt6397.txt + Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml properties: compatible:
Documentation/devicetree/bindings/leds/leds-mt6323.txt deleted +0 -63
63 lines not on this page · raw message
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +1077 -0
1,077 lines not on this page · raw message
Documentation/devicetree/bindings/mfd/mt6397.txt deleted +0 -110
110 lines not on this page · raw message
Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt deleted +0 -20
@@ -1,20 +0,0 @@ -Device Tree Bindings for Power Controller on MediaTek PMIC - -The power controller which could be found on PMIC is responsible for externally -powering off or on the remote MediaTek SoC through the circuit BBPU. - -Required properties: -- compatible: Should be one of follows - "mediatek,mt6323-pwrc": for MT6323 PMIC - -Example: - - pmic { - compatible = "mediatek,mt6323"; - - ... - - power-controller { - compatible = "mediatek,mt6323-pwrc"; - }; - }
Documentation/devicetree/bindings/rtc/rtc-mt6397.txt deleted +0 -31
@@ -1,31 +0,0 @@ -Device-Tree bindings for MediaTek PMIC based RTC - -MediaTek PMIC based RTC is an independent function of MediaTek PMIC that works -as a type of multi-function device (MFD). The RTC can be configured and set up -with PMIC wrapper bus which is a common resource shared with the other -functions found on the same PMIC. - -For MediaTek PMIC MFD bindings, see: -../mfd/mt6397.txt - -For MediaTek PMIC wrapper bus bindings, see: -../soc/mediatek/pwrap.txt - -Required properties: -- compatible: Should be one of follows - "mediatek,mt6323-rtc": for MT6323 PMIC - "mediatek,mt6358-rtc": for MT6358 PMIC - "mediatek,mt6366-rtc", "mediatek,mt6358-rtc": for MT6366 PMIC - "mediatek,mt6397-rtc": for MT6397 PMIC - -Example: - - pmic { - compatible = "mediatek,mt6323"; - - ... - - rtc { - compatible = "mediatek,mt6323-rtc"; - }; - };
Documentation/devicetree/bindings/sound/mt6358.txt deleted +0 -26
@@ -1,26 +0,0 @@ -Mediatek MT6358 Audio Codec - -The communication between MT6358 and SoC is through Mediatek PMIC wrapper. -For more detail, please visit Mediatek PMIC wrapper documentation. - -Must be a child node of PMIC wrapper. - -Required properties: - -- compatible - "string" - One of: - "mediatek,mt6358-sound" - "mediatek,mt6366-sound" -- Avdd-supply : power source of AVDD - -Optional properties: -- mediatek,dmic-mode : Indicates how many data pins are used to transmit two - channels of PDM signal. 0 means two wires, 1 means one wire. Default - value is 0. - -Example: - -mt6358_snd { - compatible = "mediatek,mt6358-sound"; - Avdd-supply = <&mt6358_vaud28_reg>; - mediatek,dmic-mode = <0>; -};
MAINTAINERS +6 -2
@@ -14365,10 +14365,12 @@ F: Documentation/devicetree/bindings/net/bluetooth/mediatek,mt7921s-bluetooth.ya F: drivers/bluetooth/btmtkuart.c MEDIATEK BOARD LEVEL SHUTDOWN DRIVERS +M: Sen Chu <[email protected]> M: Sean Wang <[email protected]> +M: Macpaul Lin <[email protected]> L: [email protected] S: Maintained -F: Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt +F: Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml F: drivers/power/reset/mt6323-poweroff.c MEDIATEK CIR DRIVER
@@ -14529,9 +14531,11 @@ F: Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml F: drivers/mtd/nand/raw/mtk_* MEDIATEK PMIC LED DRIVER +M: Sen Chu <[email protected]> M: Sean Wang <[email protected]> +M: Macpaul Lin <[email protected]> S: Maintained -F: Documentation/devicetree/bindings/leds/leds-mt6323.txt +F: Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml F: drivers/leds/leds-mt6323.c MEDIATEK RANDOM NUMBER GENERATOR SUPPORT
Signature · 1 line
2.45.2
Rob Herring (Arm)
maintainerQuoted 110 lines · Macpaul Lin
Convert the mfd: mediatek: mt6397 binding to DT schema format.
MT6323, MT6358, and MT6397 are PMIC devices with multiple function subdevices. They share a common PMIC design but have variations in subdevice combinations.
Key updates in this conversion:
1. RTC:
- Convert rtc-mt6397.txt and merge into parent MT6397 PMIC DT schema.2. Regulators:
- Align to generic name "regulators".
- Update references from .txt to .yaml for mt6323, mt6358, and mt6397 regulators.
- Simplify regulator name labels in device tree examples.3. Audio Codec:
- Convertsound/mt6358.txtand merge into parent MT6397 PMIC DT schema.
- Align to generic name "audio-codec" for codec and sound subdevices.
- Add "mediatek,dmic-mode" and "Avdd-supply" properties.4. Clocks:
- Align to generic name "clocks" for clockbuffer subdevices.5. LEDs:
- Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema.
- Update LED binding.6. Keys:
- Add detailed descriptions for power and home keys.
- Add compatible: mediatek,mt6358-keys.7. Power Controller:
- Convert mt6323-poweroff.txt and merge into parent MT6397 PMIC DT schema.
- Add #power-domain-cells property to fix dt-binding check error.
- Clarify "BBPU" as "Baseband power up".8. Pinctrl:
- Align to generic name "pinctrl" instead of "pin-controller".9. Compatible:
- Drop "mediatek,mt6357" since there is a separated DT Schemafor PMIC MT6357.Additional updates:
-MAINTAINERS: Add co-maintainers and reference tomfd/mediatek,mt6397.yamlfor LED and power-controller drivers.
-input/mediatek,pmic-keys.yaml: Update reference tomfd/mediatek,mt6397.yaml.Signed-off-by Sen Chu <[email protected]>Signed-off-by Macpaul Lin <[email protected]>--- .../bindings/input/mediatek,pmic-keys.yaml | 2 +- .../devicetree/bindings/leds/leds-mt6323.txt | 63 - .../bindings/mfd/mediatek,mt6397.yaml | 1077 +++++++++++++++++ .../devicetree/bindings/mfd/mt6397.txt | 110 -- .../bindings/power/reset/mt6323-poweroff.txt | 20 - .../devicetree/bindings/rtc/rtc-mt6397.txt | 31 - .../devicetree/bindings/sound/mt6358.txt | 26 - MAINTAINERS | 8 +- 8 files changed, 1084 insertions(+), 253 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/mt6397.txt delete mode 100644 Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-mt6397.txt delete mode 100644 Documentation/devicetree/bindings/sound/mt6358.txtChanges for v1:
- This patch depends on conversion of mediatek,mt6397-regulator.yaml
[1] https://lore.kernel.org/lkml/[email protected]/T/Changes for v2:
- This patch has been made base on linux-next/master git repo.
- Keep the parent and child relationship with mediatek,pwrap in description.
[2] https://lore.kernel.org/all/20240826-slurp-earphone-0d5173923ae8@spud/
- Keep the $ref for regulators sincedt_binding_checkdidn't report any issue based on linux-next/master repo.
- Fix description of mt6397/mt6323 devices, use "power management chip" instead of "multifunction device"
- Drop unnecessary comments or description according to the review.
- Convert sub-modules to DT Schema:
- RTC, LEDs, power-controllers, regulators
- Drop duplicate sub node name and description for sub-modules
- RTC, Keys
- examples:
- drop parent pwrap node
- Add examples from mediatek,mt6323-regulator.yaml
- Add examples from mediatek,mt6358-regulator.yaml
- Add examples from mediatek,mt6397-regulator.yaml
- Complete the examples as could as possible.Changes for v3:
- Rebased on linux-next/master git repo near next-20240906.
- Revise commit message.
- Regulators:
- Use "additionalProperties: true" and add "contains" for matching $ref DT bindings.
- Simplify regulator name labels in device tree examples.
- LEDs:
- Use LED bindings.
- Squash following patches in v2 for removing old text format DT bindings into this patch, includes:
- leds-mt6323.txt, mt6323-poweroff.txt, rtc-mt6397.txt,sound/mt6358.txt.
- Fix file format of DT schemas, add blank between properties.
- Fix 'make checkrefdoc' errors, update reference in mediatek,pmic-keys.yaml.
Quoted 4 lines
Changes for v4:
- Remove "mediatek,mt6357" from PMIC's compatible string since there is a seperated DT schema for PMIC mt6357.
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/mediatek,mt6397.example.dtb: pmic: regulators: False schema does not allow {'compatible': ['mediatek,mt6323-regulator'], 'buck_vproc': {'regulator-name': ['vproc'], 'regulator-min-microvolt': [[700000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-always-on': True, 'regulator-boot-on': True}, 'buck_vsys': {'regulator-name': ['vsys'], 'regulator-min-microvolt': [[1400000]], 'regulator-max-microvolt': [[2987500]], 'regulator-ramp-delay': 25000, 'regulator-always-on': True, 'regulator-boot-on': True}, 'buck_vpa': {'regulator-name': ['vpa'], 'regulator-min-microvolt': [[500000]], 'regulator-max-microvolt': [[3650000]]}, 'ldo_vtcxo': {'regulator-name': ['vtcxo'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 90, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcn28': {'regulator-name': ['vcn28'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 185}, 'ldo_vcn33_bt': {'regulator-name': ['vcn33_bt'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3600000]], 'regulator-enable-ramp-delay': 185}, 'ldo_vcn33_wifi': {'regulator-name': ['vcn33_wifi'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3600000]], 'regulator-enable-ramp-delay': 185}, 'ldo_va': {'regulator-name': ['va'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcama': {'regulator-name': ['vcama'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vio28': {'regulator-name': ['vio28'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vusb': {'regulator-name': ['vusb'], 'regulator-min-microvolt': [[3300000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 216, 'regulator-boot-on': True}, 'ldo_vmc': {'regulator-name': ['vmc'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36, 'regulator-boot-on': True}, 'ldo_vmch': {'regulator-name': ['vmch'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36, 'regulator-boot-on': True}, 'ldo_vemc3v3': {'regulator-name': ['vemc3v3'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36, 'regulator-boot-on': True}, 'ldo_vgp1': {'regulator-name': ['vgp1'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vgp2': {'regulator-name': ['vgp2'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vgp3': {'regulator-name': ['vgp3'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vcn18': {'regulator-name': ['vcn18'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vsim1': {'regulator-name': ['vsim1'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vsim2': {'regulator-name': ['vsim2'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vrtc': {'regulator-name': ['vrtc'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcamaf': {'regulator-name': ['vcamaf'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vibr': {'regulator-name': ['vibr'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 36}, 'ldo_vrf18': {'regulator-name': ['vrf18'], 'regulator-min-microvolt': [[1825000]], 'regulator-max-microvolt': [[1825000]], 'regulator-enable-ramp-delay': 187}, 'ldo_vm': {'regulator-name': ['vm'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vio18': {'regulator-name': ['vio18'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216, 'regulator-always-on': True, 'regulator-boot-on': True}, 'ldo_vcamd': {'regulator-name': ['vcamd'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}, 'ldo_vcamio': {'regulator-name': ['vcamio'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[1800000]], 'regulator-enable-ramp-delay': 216}}
from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mfd/mediatek,mt6397.example.dtb: pmic: regulators: False schema does not allow {'compatible': ['mediatek,mt6397-regulator'], 'buck_vpca15': {'regulator-name': ['vpca15'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 200}, 'buck_vpca7': {'regulator-name': ['vpca7'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vsramca15': {'regulator-name': ['vsramca15'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vsramca7': {'regulator-name': ['vsramca7'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vcore': {'regulator-name': ['vcore'], 'regulator-min-microvolt': [[850000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vgpu': {'regulator-name': ['vgpu'], 'regulator-min-microvolt': [[700000]], 'regulator-max-microvolt': [[1350000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 115}, 'buck_vdrm': {'regulator-name': ['vdrm'], 'regulator-min-microvolt': [[800000]], 'regulator-max-microvolt': [[1400000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 500}, 'buck_vio18': {'regulator-name': ['vio18'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[2120000]], 'regulator-ramp-delay': 12500, 'regulator-enable-ramp-delay': 500}, 'ldo_vtcxo': {'regulator-name': ['vtcxo'], 'regulator-min-microvolt': [[2800000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 90}, 'ldo_va28': {'regulator-name': ['va28'], 'regulator-enable-ramp-delay': 218}, 'ldo_vcama': {'regulator-name': ['vcama'], 'regulator-min-microvolt': [[1500000]], 'regulator-max-microvolt': [[2800000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vio28': {'regulator-name': ['vio28'], 'regulator-enable-ramp-delay': 240}, 'ldo_vusb': {'regulator-name': ['vusb'], 'regulator-enable-ramp-delay': 218}, 'ldo_vmc': {'regulator-name': ['vmc'], 'regulator-min-microvolt': [[1800000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vmch': {'regulator-name': ['vmch'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vemc3v3': {'regulator-name': ['vemc_3v3'], 'regulator-min-microvolt': [[3000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp1': {'regulator-name': ['vcamd'], 'regulator-min-microvolt': [[1220000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 240}, 'ldo_vgp2': {'regulator-name': ['vcamio'], 'regulator-min-microvolt': [[1000000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp3': {'regulator-name': ['vcamaf'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp4': {'regulator-name': ['vgp4'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp5': {'regulator-name': ['vgp5'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3000000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vgp6': {'regulator-name': ['vgp6'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}, 'ldo_vibr': {'regulator-name': ['vibr'], 'regulator-min-microvolt': [[1200000]], 'regulator-max-microvolt': [[3300000]], 'regulator-enable-ramp-delay': 218}}
from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
Quoted 46 lines · Macpaul Lin
Convert the mfd: mediatek: mt6397 binding to DT schema format.
MT6323, MT6358, and MT6397 are PMIC devices with multiple function subdevices. They share a common PMIC design but have variations in subdevice combinations.
Key updates in this conversion:
1. RTC:
- Convert rtc-mt6397.txt and merge into parent MT6397 PMIC DT schema.2. Regulators:
- Align to generic name "regulators".
- Update references from .txt to .yaml for mt6323, mt6358, and mt6397 regulators.
- Simplify regulator name labels in device tree examples.3. Audio Codec:
- Convertsound/mt6358.txtand merge into parent MT6397 PMIC DT schema.
- Align to generic name "audio-codec" for codec and sound subdevices.
- Add "mediatek,dmic-mode" and "Avdd-supply" properties.4. Clocks:
- Align to generic name "clocks" for clockbuffer subdevices.5. LEDs:
- Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema.
- Update LED binding.6. Keys:
- Add detailed descriptions for power and home keys.
- Add compatible: mediatek,mt6358-keys.7. Power Controller:
- Convert mt6323-poweroff.txt and merge into parent MT6397 PMIC DT schema.
- Add #power-domain-cells property to fix dt-binding check error.
- Clarify "BBPU" as "Baseband power up".8. Pinctrl:
- Align to generic name "pinctrl" instead of "pin-controller".9. Compatible:
- Drop "mediatek,mt6357" since there is a separated DT Schemafor PMIC MT6357.
Quoted 8 lines
Additional updates:
-MAINTAINERS: Add co-maintainers and reference tomfd/mediatek,mt6397.yamlfor LED and power-controller drivers.
-input/mediatek,pmic-keys.yaml: Update reference tomfd/mediatek,mt6397.yaml.Signed-off-by Sen Chu <[email protected]>Signed-off-by Macpaul Lin <[email protected]>
Limited review since this fails tests.
Quoted 60 lines
--- .../bindings/input/mediatek,pmic-keys.yaml | 2 +- .../devicetree/bindings/leds/leds-mt6323.txt | 63 - .../bindings/mfd/mediatek,mt6397.yaml | 1077 +++++++++++++++++ .../devicetree/bindings/mfd/mt6397.txt | 110 -- .../bindings/power/reset/mt6323-poweroff.txt | 20 - .../devicetree/bindings/rtc/rtc-mt6397.txt | 31 - .../devicetree/bindings/sound/mt6358.txt | 26 - MAINTAINERS | 8 +- 8 files changed, 1084 insertions(+), 253 deletions(-) delete mode 100644 Documentation/devicetree/bindings/leds/leds-mt6323.txt create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml delete mode 100644 Documentation/devicetree/bindings/mfd/mt6397.txt delete mode 100644 Documentation/devicetree/bindings/power/reset/mt6323-poweroff.txt delete mode 100644 Documentation/devicetree/bindings/rtc/rtc-mt6397.txt delete mode 100644 Documentation/devicetree/bindings/sound/mt6358.txtChanges for v1:
- This patch depends on conversion of mediatek,mt6397-regulator.yaml
[1] https://lore.kernel.org/lkml/[email protected]/T/Changes for v2:
- This patch has been made base on linux-next/master git repo.
- Keep the parent and child relationship with mediatek,pwrap in description.
[2] https://lore.kernel.org/all/20240826-slurp-earphone-0d5173923ae8@spud/
- Keep the $ref for regulators sincedt_binding_checkdidn't report any issue based on linux-next/master repo.
- Fix description of mt6397/mt6323 devices, use "power management chip" instead of "multifunction device"
- Drop unnecessary comments or description according to the review.
- Convert sub-modules to DT Schema:
- RTC, LEDs, power-controllers, regulators
- Drop duplicate sub node name and description for sub-modules
- RTC, Keys
- examples:
- drop parent pwrap node
- Add examples from mediatek,mt6323-regulator.yaml
- Add examples from mediatek,mt6358-regulator.yaml
- Add examples from mediatek,mt6397-regulator.yaml
- Complete the examples as could as possible.Changes for v3:
- Rebased on linux-next/master git repo near next-20240906.
- Revise commit message.
- Regulators:
- Use "additionalProperties: true" and add "contains" for matching $ref DT bindings.
- Simplify regulator name labels in device tree examples.
- LEDs:
- Use LED bindings.
- Squash following patches in v2 for removing old text format DT bindings into this patch, includes:
- leds-mt6323.txt, mt6323-poweroff.txt, rtc-mt6397.txt,sound/mt6358.txt.
- Fix file format of DT schemas, add blank between properties.
- Fix 'make checkrefdoc' errors, update reference in mediatek,pmic-keys.yaml.Changes for v4:
- Remove "mediatek,mt6357" from PMIC's compatible string since there is a seperated DT schema for PMIC mt6357.
...
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 7
Quoted 4 lines
+$id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +2
-0+ +title: MediaTek MT6397/MT6323 Multifunction Device (PMIC)
s/Multifunction Device/PMIC/
Quoted 57 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +57
-0+ +maintainers: + - Sen Chu <[email protected]> + - Macpaul Lin <[email protected]> + +description: | + MT6397/MT6323 is a power management system chip. + Please see the sub-modules below for supported features. + + MT6397/MT6323 is a multifunction device with the following sub modules: + - Regulators + - RTC + - Audio codec + - GPIO + - Clock + - LED + - Keys + - Power controller + + It is interfaced to host controller using SPI interface by a proprietary hardware + called PMIC wrapper or pwrap. MT6397/MT6323 PMIC is a child device of pwrap. + See the following for pwrap node definitions: + Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml + +properties: + compatible: + oneOf: + - enum: + - mediatek,mt6323 + - mediatek,mt6331 # "mediatek,mt6331" for PMIC MT6331 and MT6332. + - mediatek,mt6358 + - mediatek,mt6359 + - mediatek,mt6397 + - items: + - enum: + - mediatek,mt6366 + - const: mediatek,mt6358 + + interrupts: + maxItems: 1 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + rtc: + type: object + $ref: /schemas/rtc/rtc.yaml# + unevaluatedProperties: false + description: + MT6397 Real Time Clock. + + properties: + compatible: + oneOf: + - enum:
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 74
Quoted 10 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +10
-0+ - mediatek,mt6323-rtc + - mediatek,mt6331-rtc + - mediatek,mt6358-rtc + - mediatek,mt6397-rtc + - items: + - enum: + - mediatek,mt6366-rtc + - const: mediatek,mt6358-rtc + + start-year: true
Drop
Quoted 43 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +41
-0+ + required: + - compatible + + regulators: + type: object + description: + List of child nodes that specify the regulators. + additionalProperties: true + properties: + compatible: + oneOf: + - enum: + - mediatek,mt6323-regulator + - mediatek,mt6358-regulator + - mediatek,mt6397-regulator + - items: + - enum: + - mediatek,mt6366-regulator + - const: mediatek,mt6358-regulator + + required: + - compatible + + allOf: + - if: + properties: + compatible: + contains: + const: mediatek,mt6323-regulator + + then: + $ref: /schemas/regulator/mediatek,mt6323-regulator.yaml + + - if: + properties: + compatible: + contains: + const: mediatek,mt6358-regulator + + then:
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 125
Quoted 10 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +10
-0+ $ref: /schemas/regulator/mediatek,mt6358-regulator.yaml + + - if: + properties: + compatible: + contains: + const: mediatek,mt6397-regulator + + then: + $ref: /schemas/regulator/mediatek,mt6397-regulator.yaml
Drop this entire allOf. Not really needed.
Quoted 27 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +27
-0+ + audio-codec: + type: object + additionalProperties: false + description: + Audio codec support with MT6397 and MT6358. + properties: + compatible: + oneOf: + - enum: + - mediatek,mt6397-codec + - mediatek,mt6358-sound + - items: + - enum: + - mediatek,mt6366-sound + - const: mediatek,mt6358-sound + + mediatek,dmic-mode: + description: | + Indicates how many data pins are used to transmit two channels of PDM + signal. + 0 - two wires; + 1 - one wire; + Default value is 0. + enum: [0, 1] + default: 0 +
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 162
Quoted 10 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +10
-0+ Avdd-supply: + description: Power source of AVDD. + + required: + - compatible + + clocks: + type: object + additionalProperties: false + description: |
Do not need '|' unless you need to preserve formatting.
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 164
Quoted 2 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +2
-0+ This is a clock buffer node for mt6397. However, there are no sub nodes + or any public document exposed in public.
Blank line
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 169
Quoted 5 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +5
-0+ properties: + compatible: + const: mediatek,mt6397-clk + '#clock-cells': + const: 1
Blank line
Quoted 57 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +57
-0+ required: + - compatible + + leds: + type: object + additionalProperties: false + description: | + MT6323 LED controller is subfunction provided by MT6323 PMIC, so the LED + controllers are defined as the subnode of the function node provided by MT6323 + PMIC controller that is being defined as one kind of Muti-Function Device (MFD) + using shared bus called PMIC wrapper for each subfunction to access remote + MT6323 PMIC hardware. + + Each led is represented as a child node of the mediatek,mt6323-led that + describes the initial behavior for each LED physically and currently only four + LED child nodes can be supported. + + properties: + compatible: + enum: + - mediatek,mt6323-led + - mediatek,mt6331-led + - mediatek,mt6332-led + + reg: + maxItems: 1 + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^led@[0-3]$": + type: object + $ref: /schemas/leds/common.yaml# + unevaluatedProperties: false + + properties: + reg: + description: + LED channel number (0..3) + minimum: 0 + maximum: 3 + + required: + - reg + + required: + - compatible + - '#address-cells' + - '#size-cells' + + keys: + type: object + $ref: /schemas/input/mediatek,pmic-keys.yaml
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 236
Quoted 10 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +10
-0+ unevaluatedProperties: false + description: + Power and Home keys. + properties: + compatible: + enum: + - mediatek,mt6323-keys + - mediatek,mt6331-keys + - mediatek,mt6358-keys + - mediatek,mt6397-keys
You have $ref so lisitng properties is confusing. What do you want to achieve here?
Quoted 14 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +14
-0+ + power-controller: + type: object + additionalProperties: false + description: + The power controller which could be found on PMIC is responsible for + externally powering off or on the remote MediaTek SoC through the + circuit BBPU (baseband power up). + properties: + compatible: + const: mediatek,mt6323-pwrc + + '#power-domain-cells': + const: 0
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 260
Quoted 10 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +10
-0+ + pinctrl: + type: object + $ref: /schemas/pinctrl/mediatek,mt65xx-pinctrl.yaml + unevaluatedProperties: false + description: + Pin controller + properties: + compatible: + const: mediatek,mt6397-pinctrl
Also confusing. I don't think you got my point from previous review.
Quoted 13 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +13
-0+ +required: + - compatible + - regulators + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/leds/common.h> + + pmic {
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 283
Quoted 10 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +10
-0+ compatible = "mediatek,mt6323"; + interrupt-parent = <&pio>; + interrupts = <150 IRQ_TYPE_LEVEL_HIGH>; + interrupt-controller; + #interrupt-cells = <2>; + + leds { + compatible = "mediatek,mt6323-led"; + #address-cells = <1>; + #size-cells = <0>;
Messed indentation.
Quoted 1 line
+ };
Best regards,
Krzysztof