Skip to contentSkip to conversation

regulator: dt-bindings: mt6323: Convert to DT schema

PATCH Superseded Macpaul Lin 2 participants 11 messages Sep 30, 2024 – Oct 1, 2024

Subsystems (16)

v7 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

Macpaul Lin

author maintainer
#0 lore raw

PATCH v7 1/3 regulator: dt-bindings: mt6323: Convert to DT schema

Convert the MT6323 regulator binding from the old text-based format to the new DT schema style. The property "regulator-name" has been added as required property to reflect current usage in mt6323.dtsi.

Examples have been streamlined and relocated to the parent schema file:
mfd/mediatek,mt6397.yaml.

Update maintainer and submitter information with new entries from MediaTek.

The reference document cited in "mediatek,mt7530.yaml" has been updated to point to this new DT schema file

---
 .../bindings/net/dsa/mediatek,mt7530.yaml     |   4 +-
 .../regulator/mediatek,mt6323-regulator.yaml  | 119 +++++++++
 .../bindings/regulator/mt6323-regulator.txt   | 237 ------------------
 3 files changed, 121 insertions(+), 239 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6323-regulator.yaml
 delete mode 100644 Documentation/devicetree/bindings/regulator/mt6323-regulator.txt

Changes for v1 and v2:
- This is the first version of converting mt6323-regulator. This is because converting mt6323-regulator together with mfd/mediatek,mt6397.yaml, so we've create a patch set instead of single patch for each skydives.
- This patch has been made base on linux-next/master git repo.

Changes for v3:
- Rebased on linux-next/master git repo near next-20240906.
- Added 'regulator-name' to 'requried' property to reflect current usage.
- replace ^(buck_)? and ^(ldo_)? to ^buck_ and ^ldo_ prefix.
- Update file name of 'mediatek,mt6323-regulator.yaml' in 'mediatek,mt7530.yaml'

Changes for v4:
- No change.

Changes for v5:
- Add "Reviewed-by" in commit message. Thanks for the review!
- Remove a blank line at EOF whcih causes whitespace warning when 'git am' the patch.

Changes for v6:
- No change.

Change for v7:
- Add "Acked-by" tag, Thanks for the review.

Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml +2 -2
index ea979bcae1d6..413db386f090 100644
@@ -129,8 +129,8 @@ properties:
   io-supply:
     description: |
       Phandle to the regulator node necessary for the I/O power.
-      See Documentation/devicetree/bindings/regulator/mt6323-regulator.txt for
-      details for the regulator setup on these boards.
+      See Documentation/devicetree/bindings/regulator/mediatek,mt6323-regulator.yaml
+      for details for the regulator setup on these boards.
 
   mediatek,mcm:
     type: boolean
Documentation/devicetree/bindings/regulator/mediatek,mt6323-regulator.yaml new file +119 -0

119 lines not on this page · raw message

Documentation/devicetree/bindings/regulator/mt6323-regulator.txt deleted +0 -237

237 lines not on this page · raw message

Signature · 1 line
2.45.2
author maintainer
#1 lore raw

PATCH v7 2/3 ASoC: dt-bindings: mt6358: Convert to DT Schema

Convert the MediaTek MT6358 Audio CODEC bindings to DT schema.

This change implements the following updates:
1. Compatible property: Added the const 'mediatek,mt6358-sound' to ensure alignment with the schema in the actual (DTS) file "mt8186-corsola.dtsi" with 'mediatek,mt6366-sound'.
2. Example: Removed the example section, as it should be relocated to the MT6397 PMIC file 'mfd/mediatek,mt6397.yaml'.

---
 .../devicetree/bindings/sound/mt6358.txt      | 26 ------------
 .../devicetree/bindings/sound/mt6358.yaml     | 41 +++++++++++++++++++
 2 files changed, 41 insertions(+), 26 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/mt6358.txt
 create mode 100644 Documentation/devicetree/bindings/sound/mt6358.yaml

Changess for v1~v6:
- It was not in the origin patch set.

Changes for v7:
- It is seperated from the origin patch set (2/2, v6). It could simplifies the audio-codec node in next patch (3/3, v7) of 'mfd/mediatek,mt6397.yaml'

Documentation/devicetree/bindings/sound/mt6358.txt deleted +0 -26
deleted file mode 100644
index fbe9e55c68f5..000000000000
@@ -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>;
-};
Documentation/devicetree/bindings/sound/mt6358.yaml new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
2.45.2
#2 lore raw

Re: [PATCH v7 2/3] ASoC: dt-bindings: mt6358: Convert to DT Schema

Quoted 76 lines · Macpaul Lin

Convert the MediaTek MT6358 Audio CODEC bindings to DT schema.

This change implements the following updates:
1. Compatible property: Added the const 'mediatek,mt6358-sound' to ensure alignment with the schema in the actual (DTS) file "mt8186-corsola.dtsi" with 'mediatek,mt6366-sound'.
2. Example: Removed the example section, as it should be relocated to the MT6397 PMIC file 'mfd/mediatek,mt6397.yaml'.

---
 .../devicetree/bindings/sound/mt6358.txt      | 26 ------------
 .../devicetree/bindings/sound/mt6358.yaml     | 41 +++++++++++++++++++
 2 files changed, 41 insertions(+), 26 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/mt6358.txt
 create mode 100644 Documentation/devicetree/bindings/sound/mt6358.yaml

Changess for v1~v6:
- It was not in the origin patch set.

Changes for v7:
- It is seperated from the origin patch set (2/2, v6). It could simplifies the audio-codec node in next patch (3/3, v7) of 'mfd/mediatek,mt6397.yaml'

Documentation/devicetree/bindings/sound/mt6358.txt deleted +0 -26
deleted file mode 100644
index fbe9e55c68f5..000000000000
@@ -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>;
-};
Documentation/devicetree/bindings/sound/mt6358.yaml new file +13 -0
new file mode 100644
index 000000000000..5f7611e26a89
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mt6358.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek MT6358 Audio Codec
+
+maintainers:
+  - Jiaxin Yu <[email protected]>
+  - Macpaul Lin <[email protected]>
+
+description: |

Documentation/devicetree/bindings/sound/mt6358.yaml line 23

Quoted 10 lines
Documentation/devicetree/bindings/sound/mt6358.yaml new file +10 -0
+  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.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt6366-sound
+      - mediatek,mt6358-sound
+    const: mediatek,mt6358-sound

This wasn't ever tested.

Do not send untested code, it's a waste of reviewers' time.

Best regards,
Krzysztof

author maintainer
#3 lore raw

Re: [PATCH v7 2/3] ASoC: dt-bindings: mt6358: Convert to DT Schema

On 10/1/24 14:34, Krzysztof Kozlowski wrote:

[snip]

Quoted 5 lines
Quoted 5 lines
Documentation/devicetree/bindings/sound/mt6358.yaml new file +5 -0
+description: |
+  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.
+
Quoted 8 lines

Documentation/devicetree/bindings/sound/mt6358.yaml line 23

Quoted 6 lines
Documentation/devicetree/bindings/sound/mt6358.yaml new file +6 -0
+properties:
+  compatible:
+    enum:
+      - mediatek,mt6366-sound
+      - mediatek,mt6358-sound
+    const: mediatek,mt6358-sound

This wasn't ever tested.

Hum, I have indeed tested it with linux-next/master branch. Ran dt_binding_check with dtschema trunk with this single file but didn't get any warning or errors.
'make dt_binding_check DT_SCHEMA_FILES=mt6358.yaml'

Could you please help to paste the error log for me? If there are new errors, I need to check if there is any environment issue.

Quoted 6 lines

Do not send untested code, it's a waste of reviewers' time.

Best regards,
Krzysztof

Thanks
Macpaul Lin

author maintainer
#4 lore raw

Re: [PATCH v7 2/3] ASoC: dt-bindings: mt6358: Convert to DT Schema

Quoted 19 lines · Macpaul Lin

On 10/1/24 14:34, Krzysztof Kozlowski wrote:

[snip]

Quoted 6 lines
Quoted 6 lines

+description: |
+  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.
+

Quoted 8 lines
Quoted 6 lines

+properties:
+  compatible:
+    enum:
+      - mediatek,mt6366-sound
+      - mediatek,mt6358-sound
+    const: mediatek,mt6358-sound

This wasn't ever tested.

Quoted 8 lines

Hum, I have indeed tested it with linux-next/master branch. Ran dt_binding_check with dtschema trunk with this single file but didn't get any warning or errors.
'make dt_binding_check DT_SCHEMA_FILES=mt6358.yaml'

Could you please help to paste the error log for me? If there are new errors, I need to check if there is any environment issue.

I've both tested both of the following format pass dt_binding_check. #1.
properties:
compatible:
items:
- enum:
- mediatek,mt6366-sound
- mediatek,mt6358-sound
- const: mediatek,mt6358-sound

#2.
properties:
compatible:
enum:
- mediatek,mt6366-sound
- mediatek,mt6358-sound
const: mediatek,mt6358-sound

Quoted 8 lines
Quoted 6 lines

Do not send untested code, it's a waste of reviewers' time.

Best regards,
Krzysztof

Thanks
Macpaul Lin

Should I update it with format #1?

Thanks
Macpaul Lin

#5 lore raw

Re: [PATCH v7 2/3] ASoC: dt-bindings: mt6358: Convert to DT Schema

Quoted 31 lines · Macpaul Lin
Quoted 19 lines · Macpaul Lin

On 10/1/24 14:34, Krzysztof Kozlowski wrote:

[snip]

Quoted 6 lines
Quoted 6 lines

+description: |
+  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.
+

Quoted 8 lines
Quoted 6 lines

+properties:
+  compatible:
+    enum:
+      - mediatek,mt6366-sound
+      - mediatek,mt6358-sound
+    const: mediatek,mt6358-sound

This wasn't ever tested.

Quoted 8 lines

Hum, I have indeed tested it with linux-next/master branch. Ran dt_binding_check with dtschema trunk with this single file but didn't get any warning or errors.
'make dt_binding_check DT_SCHEMA_FILES=mt6358.yaml'

Could you please help to paste the error log for me? If there are new errors, I need to check if there is any environment issue.

Quoted 9 lines

I've both tested both of the following format pass dt_binding_check. #1.
properties:
compatible:
items:
- enum:
- mediatek,mt6366-sound
- mediatek,mt6358-sound
- const: mediatek,mt6358-sound

I don't understand what you wanted here. neither oneOf nor ietms make any sense. Why "mediatek,mt6358-sound", "mediatek,mt6358-sound" is a correct compatible?

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH v7 2/3] ASoC: dt-bindings: mt6358: Convert to DT Schema

In reply to Macpaul Lin
Quoted 18 lines · Macpaul Lin

On 10/1/24 14:34, Krzysztof Kozlowski wrote:

[snip]

Quoted 5 lines
Quoted 5 lines
Documentation/devicetree/bindings/sound/mt6358.yaml new file +5 -0
+description: |
+  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.
+
Quoted 8 lines

Documentation/devicetree/bindings/sound/mt6358.yaml line 23

Quoted 6 lines
Documentation/devicetree/bindings/sound/mt6358.yaml new file +6 -0
+properties:
+  compatible:
+    enum:
+      - mediatek,mt6366-sound
+      - mediatek,mt6358-sound
+    const: mediatek,mt6358-sound

This wasn't ever tested.

Quoted 8 lines

Hum, I have indeed tested it with linux-next/master branch. Ran dt_binding_check with dtschema trunk with this single file but didn't get any warning or errors.
'make dt_binding_check DT_SCHEMA_FILES=mt6358.yaml'

Could you please help to paste the error log for me? If there are new errors, I need to check if there is any environment issue.

Hm, I don't know, indeed Rob's does not report failure here, so my comment was not right. Syntax is unexpected or wrong - const with enum. Is this a list? If list then you duplicated compatible. Then maybe implicit oneOf?

BTW, filenames are expected to match compatible.

Best regards,
Krzysztof

author maintainer
#7 lore raw

PATCH v7 3/3 dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format

In reply to 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.
- Add a new 'mt6359-regulator' to the compatibles of regulators. Merge from the other patch [1].

3. ADC:
- Add a new 'adc' property and include a $ref for sub-device node of MT6359 PMIC AUXADC: 'mediatek,mt6359-auxadc'.
Merge from the other patch [1].

4. Audio Codec:
- Simplify Audio Codec part with updating compatible items.
- Add 'mt6359-codec' to the compatible.

5. Clocks:
- Align to generic name "clocks" for clockbuffer subdevices.

6. LEDs:
- Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema.
- Update LED binding.

7. Keys:
- Add detailed descriptions for power and home keys.
- Add compatible: mediatek,mt6358-keys.

8. 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".

9. Pinctrl:
- Align to generic name "pinctrl" instead of "pin-controller".

10. Compatible:
- Drop "mediatek,mt6357" since there is a separated DT Schema

     for PMIC MT6357.

11. Examples:
- MT6323: Retain complete examples for this PMIC.
- MT6358 and MT6397: simplify settings in regulators.
- Preserve "audio-codec", "clocks", "pinctrl", "rtc", and "keys" sections as they contain typical settings for different PMICs.

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.

References:
[1] https://lore.kernel.org/all/[email protected]/

---
 .../bindings/input/mediatek,pmic-keys.yaml    |   2 +-
 .../devicetree/bindings/leds/leds-mt6323.txt  |  63 --
 .../bindings/mfd/mediatek,mt6397.yaml         | 596 ++++++++++++++++++
 .../devicetree/bindings/mfd/mt6397.txt        | 110 ----
 .../bindings/power/reset/mt6323-poweroff.txt  |  20 -
 .../devicetree/bindings/rtc/rtc-mt6397.txt    |  31 -
 MAINTAINERS                                   |   8 +-
 7 files changed, 603 insertions(+), 227 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

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.

Changes for v5:
- Rebase to next-20240913 (linux-next/master).
- Fix the "title" (device type) of mfd/mediatek,mt6397.yaml to "PMIC".
- RTC:
- Drop "start-year"
- Regulators:
- Add blank lines between description and properties.
- Drop allOf for the $ref section on property.
- clocks:
- Fix no need '|' in descriptoin.
- Add blank lines between description and properties.
- Keys:
- Drop compatible since these enums are already in $ref.
- pinctrl:
- Drop compatible since it is already in $ref.
- examples:
- Fix indentations for leds and keys.

Changes for v6:
- Commit message:
- Add note for simplifying examples of mt6358 and mt6397.
- examples:
- Fix indentations for mt6323-keys.
- MT6358 and MT6397: simplify settings in regulators.
- Preserve "audio-codec", "clocks", "pinctrl", "rtc", and "keys" sections as they contain typical settings for different PMICs.

Changes for v7:
- Add reference patch in commit message
- https://lore.kernel.org/all/[email protected]/
- adc:
- Merge adc property from patch [1], which is newly added and was not in the origin text format bindings.
- Re-order items in commit messages.
- regulators:
- Merge new compatible 'mt6359-regulator' from patch [1], which is newly added and was not in the origin text format bindings.
- audio-codec:
- Simplify Audio Codec part with updating compatible items.
- Add 'mt6359-codec' to the compatible.
- Depends on the newly added mt6358.yaml (2/3 of v7) in this v7 patch set.

Documentation/devicetree/bindings/input/mediatek,pmic-keys.yaml +1 -1
index 70567d92c746..466566ae7f10 100644
@@ -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 +596 -0

596 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
deleted file mode 100644
index 933f0c48e887..000000000000
@@ -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
deleted file mode 100644
index 7212076a8f1b..000000000000
@@ -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";
-               };
-       };
MAINTAINERS +6 -2
index 3f3ed5600769..1d1ea25fc2e1 100644
@@ -14421,10 +14421,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
@@ -14585,9 +14587,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
#8 lore raw

Re: [PATCH v7 3/3] dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format

Quoted 11 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.

Quoted 6 lines

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.
- Add a new 'mt6359-regulator' to the compatibles of regulators.

Why?

Quoted 10 lines

Merge from the other patch [1].

3. ADC:
- Add a new 'adc' property and include a $ref for sub-device node of MT6359 PMIC AUXADC: 'mediatek,mt6359-auxadc'.
Merge from the other patch [1].

4. Audio Codec:
- Simplify Audio Codec part with updating compatible items.
- Add 'mt6359-codec' to the compatible

Why?
.

Quoted 45 lines

5. Clocks:
- Align to generic name "clocks" for clockbuffer subdevices.

6. LEDs:
- Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema.
- Update LED binding.

7. Keys:
- Add detailed descriptions for power and home keys.
- Add compatible: mediatek,mt6358-keys.

8. 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".

9. Pinctrl:
- Align to generic name "pinctrl" instead of "pin-controller".

10. Compatible:
- Drop "mediatek,mt6357" since there is a separated DT Schema

     for PMIC MT6357.

11. Examples:
- MT6323: Retain complete examples for this PMIC.
- MT6358 and MT6397: simplify settings in regulators.
- Preserve "audio-codec", "clocks", "pinctrl", "rtc", and "keys" sections as they contain typical settings for different PMICs.

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.

References:
[1] https://lore.kernel.org/all/[email protected]/

---

Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +1 -0
+

Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 109

Quoted 10 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +10 -0
+  adc:
+    type: object
+    $ref: /schemas/iio/adc/mediatek,mt6359-auxadc.yaml#
+    unevaluatedProperties: false
+
+  audio-codec:
+    type: object
+    description:
+      Audio codec support with MT6358, MT6359, and MT6397.
+    additionalProperties: true

No, this cannot be true. Schema is incomplete for listed compatibles.

Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 116

Quoted 7 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +7 -0
+
+    properties:
+      compatible:
+        oneOf:
+          - enum:
+              - mediatek,mt6358-sound
+              - mediatek,mt6359-codec

There was no such compatible.

Why do you add non-existing compatibles during conversion?

#9 lore raw

Re: [PATCH v7 3/3] dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format

Quoted 78 lines · Krzysztof Kozlowski
Quoted 11 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.

Quoted 6 lines

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.
- Add a new 'mt6359-regulator' to the compatibles of regulators.

Why?

Quoted 10 lines

Merge from the other patch [1].

3. ADC:
- Add a new 'adc' property and include a $ref for sub-device node of MT6359 PMIC AUXADC: 'mediatek,mt6359-auxadc'.
Merge from the other patch [1].

4. Audio Codec:
- Simplify Audio Codec part with updating compatible items.
- Add 'mt6359-codec' to the compatible

Why?
.

Quoted 43 lines

5. Clocks:
- Align to generic name "clocks" for clockbuffer subdevices.

6. LEDs:
- Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema.
- Update LED binding.

7. Keys:
- Add detailed descriptions for power and home keys.
- Add compatible: mediatek,mt6358-keys.

8. 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".

9. Pinctrl:
- Align to generic name "pinctrl" instead of "pin-controller".

10. Compatible:
- Drop "mediatek,mt6357" since there is a separated DT Schema

     for PMIC MT6357.

11. Examples:
- MT6323: Retain complete examples for this PMIC.
- MT6358 and MT6397: simplify settings in regulators.
- Preserve "audio-codec", "clocks", "pinctrl", "rtc", and "keys" sections as they contain typical settings for different PMICs.

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.

References:
[1] https://lore.kernel.org/all/[email protected]/

---

Quoted 13 lines

Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 109

Quoted 11 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +11 -0
+
+  adc:
+    type: object
+    $ref: /schemas/iio/adc/mediatek,mt6359-auxadc.yaml#
+    unevaluatedProperties: false
+
+  audio-codec:
+    type: object
+    description:
+      Audio codec support with MT6358, MT6359, and MT6397.
+    additionalProperties: true

No, this cannot be true. Schema is incomplete for listed compatibles.

I saw now your patch for ASoC, so this is fine.

All my other questions stay valid - why are you adding new devices in patch which is supposed to be ONLY conversion.

Quoted 9 lines

Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 116

Quoted 8 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +7 -0
+
+    properties:
+      compatible:
+        oneOf:
+          - enum:
+              - mediatek,mt6358-sound
+              - mediatek,mt6359-codec
Quoted 4 lines

There was no such compatible.

Why do you add non-existing compatibles during conversion?

Best regards,
Krzysztof

author maintainer
#10 lore raw

Re: [PATCH v7 3/3] dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format

Quoted 97 lines · Krzysztof Kozlowski

External email : Please do not click links or open attachments until you have verified the sender or the content.

Quoted 78 lines · Krzysztof Kozlowski
Quoted 11 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.

Quoted 6 lines

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.
- Add a new 'mt6359-regulator' to the compatibles of regulators.

Why?

Quoted 10 lines

Merge from the other patch [1].

3. ADC:
- Add a new 'adc' property and include a $ref for sub-device node of MT6359 PMIC AUXADC: 'mediatek,mt6359-auxadc'.
Merge from the other patch [1].

4. Audio Codec:
- Simplify Audio Codec part with updating compatible items.
- Add 'mt6359-codec' to the compatible

Why?
.

Quoted 43 lines

5. Clocks:
- Align to generic name "clocks" for clockbuffer subdevices.

6. LEDs:
- Convert leds-mt6323.txt and merge into parent MT6397 PMIC DT schema.
- Update LED binding.

7. Keys:
- Add detailed descriptions for power and home keys.
- Add compatible: mediatek,mt6358-keys.

8. 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".

9. Pinctrl:
- Align to generic name "pinctrl" instead of "pin-controller".

10. Compatible:
- Drop "mediatek,mt6357" since there is a separated DT Schema

     for PMIC MT6357.

11. Examples:
- MT6323: Retain complete examples for this PMIC.
- MT6358 and MT6397: simplify settings in regulators.
- Preserve "audio-codec", "clocks", "pinctrl", "rtc", and "keys" sections as they contain typical settings for different PMICs.

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.

References:
[1] https://lore.kernel.org/all/[email protected]/

---

Quoted 13 lines

Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml line 109

Quoted 11 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +11 -0
+
+  adc:
+    type: object
+    $ref: /schemas/iio/adc/mediatek,mt6359-auxadc.yaml#
+    unevaluatedProperties: false
+
+  audio-codec:
+    type: object
+    description:
+      Audio codec support with MT6358, MT6359, and MT6397.
+    additionalProperties: true

No, this cannot be true. Schema is incomplete for listed compatibles.

Quoted 5 lines

I saw now your patch for ASoC, so this is fine.

All my other questions stay valid - why are you adding new devices in patch which is supposed to be ONLY conversion.

Ok, I'll drop adding new devices from other reviewed patch for this ONLY conversion.

Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml new file +7 -0
+
+    properties:
+      compatible:
+        oneOf:
+          - enum:
+              - mediatek,mt6358-sound
+              - mediatek,mt6359-codec
Quoted 4 lines
Quoted 4 lines

There was no such compatible.

Why do you add non-existing compatibles during conversion?

Same here, will drop it in this conversion.

Quoted 4 lines

Best regards,
Krzysztof

Thanks
Macpaul Lin