mbox series

[v6,0/8] Add Support for MediaTek PMIC MT6359

Message ID 1615829757-3223-1-git-send-email-hsin-hsiung.wang@mediatek.com
Headers show
Series Add Support for MediaTek PMIC MT6359 | expand

Message

Hsin-Hsiung Wang March 15, 2021, 5:35 p.m. UTC
This patchset includes refactoring interrupt and adding support to MT6359 PMIC.
MT6359 is the primary PMIC for MT6779 and probably other SOCs.
The series[1] sent by Wen will continue to upstream in this patchset afterwards.

[1] https://patchwork.kernel.org/project/linux-mediatek/list/?series=306579

changes since v5:
- rebase to Linux 5.12.
- refine the code structure.
- update the file date.

Hsin-Hsiung Wang (6):
  mfd: mt6358: refine interrupt code
  rtc: mt6397: refine RTC_TC_MTH
  dt-bindings: mfd: Add compatible for the MediaTek MT6359 PMIC
  dt-bindings: regulator: Add document for MT6359 regulator
  mfd: Add support for the MediaTek MT6359 PMIC
  regulator: mt6359: Add support for MT6359P regulator

Wen Su (2):
  regulator: mt6359: Add support for MT6359 regulator
  arm64: dts: mt6359: add PMIC MT6359 related nodes

 .../devicetree/bindings/mfd/mt6397.txt        |    1 +
 .../bindings/regulator/mt6359-regulator.yaml  |  169 +++
 arch/arm64/boot/dts/mediatek/mt6359.dtsi      |  298 +++++
 arch/arm64/boot/dts/mediatek/mt8192-evb.dts   |    1 +
 drivers/mfd/mt6358-irq.c                      |   89 +-
 drivers/mfd/mt6397-core.c                     |   24 +
 drivers/regulator/Kconfig                     |    9 +
 drivers/regulator/Makefile                    |    1 +
 drivers/regulator/mt6359-regulator.c          | 1036 +++++++++++++++++
 drivers/rtc/rtc-mt6397.c                      |    2 +-
 include/linux/mfd/mt6358/core.h               |    8 +-
 include/linux/mfd/mt6359/core.h               |  133 +++
 include/linux/mfd/mt6359/registers.h          |  529 +++++++++
 include/linux/mfd/mt6359p/registers.h         |  249 ++++
 include/linux/mfd/mt6397/core.h               |    1 +
 include/linux/mfd/mt6397/rtc.h                |    1 +
 include/linux/regulator/mt6359-regulator.h    |   59 +
 17 files changed, 2577 insertions(+), 33 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml
 create mode 100644 arch/arm64/boot/dts/mediatek/mt6359.dtsi
 create mode 100644 drivers/regulator/mt6359-regulator.c
 create mode 100644 include/linux/mfd/mt6359/core.h
 create mode 100644 include/linux/mfd/mt6359/registers.h
 create mode 100644 include/linux/mfd/mt6359p/registers.h
 create mode 100644 include/linux/regulator/mt6359-regulator.h

Comments

Mark Brown March 16, 2021, 5:52 p.m. UTC | #1
On Tue, Mar 16, 2021 at 01:35:55AM +0800, Hsin-Hsiung Wang wrote:
> From: Wen Su <wen.su@mediatek.com>

> 

> The MT6359 is a regulator found on boards based on MediaTek MT6779 and

> probably other SoCs. It is a so called pmic and connects as a slave to

> SoC using SPI, wrapped inside the pmic-wrapper.


Acked-by: Mark Brown <broonie@kernel.org>
Mark Brown March 16, 2021, 5:52 p.m. UTC | #2
On Tue, Mar 16, 2021 at 01:35:56AM +0800, Hsin-Hsiung Wang wrote:
> The MT6359P is a eco version for MT6359 regulator.

> We add support based on MT6359 regulator driver.


Acked-by: Mark Brown <broonie@kernel.org>
Rob Herring (Arm) March 16, 2021, 5:54 p.m. UTC | #3
On Tue, 16 Mar 2021 01:35:53 +0800, Hsin-Hsiung Wang wrote:
> add dt-binding document for MediaTek MT6359 PMIC

> 

> Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>

> ---

> changes since v5:

> - no change.

> ---

>  .../bindings/regulator/mt6359-regulator.yaml  | 169 ++++++++++++++++++

>  1 file changed, 169 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

> 


My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/ti,palmas-gpadc.example.dt.yaml: pmic: 'adc', 'compatible' do not match any of the regexes: 'pinctrl-[0-9]+'
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.example.dt.yaml: pmic: '#address-cells', '#size-cells', 'adc' do not match any of the regexes: 'pinctrl-[0-9]+'
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/sprd,sc2720-adc.example.dt.yaml: pmic: '#address-cells', '#size-cells', 'adc@480' do not match any of the regexes: 'pinctrl-[0-9]+'
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/iio/adc/qcom,pm8018-adc.example.dt.yaml: pmic: '#address-cells', '#size-cells', 'adc@197' do not match any of the regexes: 'pinctrl-[0-9]+'
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

See https://patchwork.ozlabs.org/patch/1453404

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

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.
Rob Herring (Arm) March 16, 2021, 9:28 p.m. UTC | #4
On Tue, Mar 16, 2021 at 01:35:53AM +0800, Hsin-Hsiung Wang wrote:
> add dt-binding document for MediaTek MT6359 PMIC

> 

> Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>

> ---

> changes since v5:

> - no change.

> ---

>  .../bindings/regulator/mt6359-regulator.yaml  | 169 ++++++++++++++++++

>  1 file changed, 169 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

> 

> diff --git a/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

> new file mode 100644

> index 000000000000..62ff93eefd39

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

> @@ -0,0 +1,169 @@

> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

> +%YAML 1.2

> +---

> +$id: http://devicetree.org/schemas/regulator/mt6359-regulator.yaml#

> +$schema: http://devicetree.org/meta-schemas/core.yaml#

> +

> +title: MT6359 Regulator from MediaTek Integrated

> +

> +maintainers:

> +  - Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>

> +

> +description: |

> +  List of regulators provided by this controller. It is named

> +  according to its regulator type, buck_<name> and ldo_<name>.

> +  MT6359 regulators node should be sub node of the MT6397 MFD node.

> +

> +properties:

> +  $nodename:

> +    pattern: "^pmic$"


The errors are because this schema will be applied to every 'pmic' node.

> +

> +  mt6359regulator:


The node name here should be just 'regulators', but that should be in 
the MFD schema and you should remove this level here. So the MFD would 
have:

properties:
  regulators:
    type: object
    $ref: schemas/regulator/mt6359-regulator.yaml#

> +    type: object

> +    description:

> +      list of regulators provided by this controller.

> +

> +    patternProperties:


And this should be at the top level of this doc.

> +      "^buck_v(s1|gpu11|modem|pu|core|s2|pa|proc2|proc1|core_sshub)$":

> +        type: object

> +        $ref: "regulator.yaml#"

> +

> +        properties:

> +          regulator-name:

> +            pattern: "^v(s1|gpu11|modem|pu|core|s2|pa|proc2|proc1|core_sshub)$"

> +

> +        unevaluatedProperties: false

> +

> +      "^ldo_v(ibr|rf12|usb|camio|efuse|xo22)$":

> +        type: object

> +        $ref: "regulator.yaml#"

> +

> +        properties:

> +          regulator-name:

> +            pattern: "^v(ibr|rf12|usb|camio|efuse|xo22)$"

> +

> +        unevaluatedProperties: false

> +

> +      "^ldo_v(rfck|emc|a12|a09|ufs|bbck)$":

> +        type: object

> +        $ref: "regulator.yaml#"

> +

> +        properties:

> +          regulator-name:

> +            pattern: "^v(rfck|emc|a12|a09|ufs|bbck)$"

> +

> +        unevaluatedProperties: false

> +

> +      "^ldo_vcn(18|13|33_1_bt|13_1_wifi|33_2_bt|33_2_wifi)$":

> +        type: object

> +        $ref: "regulator.yaml#"

> +

> +        properties:

> +          regulator-name:

> +            pattern: "^vcn(18|13|33_1_bt|13_1_wifi|33_2_bt|33_2_wifi)$"

> +

> +        unevaluatedProperties: false

> +

> +      "^ldo_vsram_(proc2|others|md|proc1|others_sshub)$":

> +        type: object

> +        $ref: "regulator.yaml#"

> +

> +        properties:

> +          regulator-name:

> +            pattern: "^vsram_(proc2|others|md|proc1|others_sshub)$"

> +

> +        unevaluatedProperties: false

> +

> +      "^ldo_v(fe|bif|io)28$":

> +        type: object

> +        $ref: "regulator.yaml#"

> +

> +        properties:

> +          regulator-name:

> +            pattern: "^v(fe|bif|io)28$"

> +

> +        unevaluatedProperties: false

> +

> +      "^ldo_v(aud|io|aux|rf|m)18$":

> +        type: object

> +        $ref: "regulator.yaml#"

> +

> +        properties:

> +          regulator-name:

> +            pattern: "^v(aud|io|aux|rf|m)18$"

> +

> +        unevaluatedProperties: false

> +

> +      "^ldo_vsim[12]$":

> +        type: object

> +        $ref: "regulator.yaml#"

> +

> +        properties:

> +          regulator-name:

> +            pattern: "^vsim[12]$"

> +

> +        required:

> +          - regulator-name

> +

> +        unevaluatedProperties: false

> +

> +additionalProperties: false

> +

> +examples:

> +  - |

> +    pmic {

> +      mt6359regulator {


I prefer to see a single complete example in the MFD schema rather than 
piecemeal schemas in each sub schema.

> +        mt6359_vgpu11_buck_reg: buck_vgpu11 {

> +          regulator-name = "vgpu11";

> +          regulator-min-microvolt = <400000>;

> +          regulator-max-microvolt = <1193750>;

> +          regulator-enable-ramp-delay = <200>;

> +          regulator-always-on;

> +          regulator-allowed-modes = <0 1 2>;

> +        };

> +

> +        mt6359_vcamio_ldo_reg: ldo_vcamio {

> +          regulator-name = "vcamio";

> +          regulator-min-microvolt = <1700000>;

> +          regulator-max-microvolt = <1900000>;

> +        };

> +

> +        mt6359_vcn18_ldo_reg: ldo_vcn18 {

> +          regulator-name = "vcn18";

> +          regulator-min-microvolt = <1800000>;

> +          regulator-max-microvolt = <1800000>;

> +          regulator-enable-ramp-delay = <240>;

> +        };

> +

> +        mt6359_vsram_proc2_ldo_reg: ldo_vsram_proc2 {

> +          regulator-name = "vsram_proc2";

> +          regulator-min-microvolt = <500000>;

> +          regulator-max-microvolt = <1293750>;

> +          regulator-ramp-delay = <7500>;

> +          regulator-enable-ramp-delay = <240>;

> +          regulator-always-on;

> +        };

> +

> +        mt6359_vfe28_ldo_reg: ldo_vfe28 {

> +          regulator-name = "vfe28";

> +          regulator-min-microvolt = <2800000>;

> +          regulator-max-microvolt = <2800000>;

> +          regulator-enable-ramp-delay = <120>;

> +        };

> +

> +        mt6359_vaud18_ldo_reg: ldo_vaud18 {

> +          regulator-name = "vaud18";

> +          regulator-min-microvolt = <1800000>;

> +          regulator-max-microvolt = <1800000>;

> +          regulator-enable-ramp-delay = <240>;

> +        };

> +

> +        mt6359_vsim1_ldo_reg: ldo_vsim1 {

> +          regulator-name = "vsim1";

> +          regulator-min-microvolt = <1700000>;

> +          regulator-max-microvolt = <3100000>;

> +          regulator-enable-ramp-delay = <480>;

> +        };

> +      };

> +    };

> +...

> -- 

> 2.18.0

>
Hsin-Hsiung Wang March 17, 2021, 6:01 a.m. UTC | #5
Hi, Rob
I am very grateful for the reviewing which addressed my yaml errors.
I will check my codebase first and fix the error in the next patch.

Thanks.

On Tue, 2021-03-16 at 15:28 -0600, Rob Herring wrote:
> On Tue, Mar 16, 2021 at 01:35:53AM +0800, Hsin-Hsiung Wang wrote:

> > add dt-binding document for MediaTek MT6359 PMIC

> > 

> > Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>

> > ---

> > changes since v5:

> > - no change.

> > ---

> >  .../bindings/regulator/mt6359-regulator.yaml  | 169 ++++++++++++++++++

> >  1 file changed, 169 insertions(+)

> >  create mode 100644 Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

> > 

> > diff --git a/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

> > new file mode 100644

> > index 000000000000..62ff93eefd39

> > --- /dev/null

> > +++ b/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

> > @@ -0,0 +1,169 @@

> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

> > +%YAML 1.2

> > +---

> > +$id: http://devicetree.org/schemas/regulator/mt6359-regulator.yaml#

> > +$schema: http://devicetree.org/meta-schemas/core.yaml#

> > +

> > +title: MT6359 Regulator from MediaTek Integrated

> > +

> > +maintainers:

> > +  - Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>

> > +

> > +description: |

> > +  List of regulators provided by this controller. It is named

> > +  according to its regulator type, buck_<name> and ldo_<name>.

> > +  MT6359 regulators node should be sub node of the MT6397 MFD node.

> > +

> > +properties:

> > +  $nodename:

> > +    pattern: "^pmic$"

> 

> The errors are because this schema will be applied to every 'pmic' node.

> 

> > +

> > +  mt6359regulator:

> 

> The node name here should be just 'regulators', but that should be in 

> the MFD schema and you should remove this level here. So the MFD would 

> have:

> 

> properties:

>   regulators:

>     type: object

>     $ref: schemas/regulator/mt6359-regulator.yaml#

> 

> > +    type: object

> > +    description:

> > +      list of regulators provided by this controller.

> > +

> > +    patternProperties:

> 

> And this should be at the top level of this doc.

> 

> > +      "^buck_v(s1|gpu11|modem|pu|core|s2|pa|proc2|proc1|core_sshub)$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^v(s1|gpu11|modem|pu|core|s2|pa|proc2|proc1|core_sshub)$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_v(ibr|rf12|usb|camio|efuse|xo22)$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^v(ibr|rf12|usb|camio|efuse|xo22)$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_v(rfck|emc|a12|a09|ufs|bbck)$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^v(rfck|emc|a12|a09|ufs|bbck)$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_vcn(18|13|33_1_bt|13_1_wifi|33_2_bt|33_2_wifi)$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^vcn(18|13|33_1_bt|13_1_wifi|33_2_bt|33_2_wifi)$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_vsram_(proc2|others|md|proc1|others_sshub)$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^vsram_(proc2|others|md|proc1|others_sshub)$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_v(fe|bif|io)28$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^v(fe|bif|io)28$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_v(aud|io|aux|rf|m)18$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^v(aud|io|aux|rf|m)18$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_vsim[12]$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^vsim[12]$"

> > +

> > +        required:

> > +          - regulator-name

> > +

> > +        unevaluatedProperties: false

> > +

> > +additionalProperties: false

> > +

> > +examples:

> > +  - |

> > +    pmic {

> > +      mt6359regulator {

> 

> I prefer to see a single complete example in the MFD schema rather than 

> piecemeal schemas in each sub schema.

> 

> > +        mt6359_vgpu11_buck_reg: buck_vgpu11 {

> > +          regulator-name = "vgpu11";

> > +          regulator-min-microvolt = <400000>;

> > +          regulator-max-microvolt = <1193750>;

> > +          regulator-enable-ramp-delay = <200>;

> > +          regulator-always-on;

> > +          regulator-allowed-modes = <0 1 2>;

> > +        };

> > +

> > +        mt6359_vcamio_ldo_reg: ldo_vcamio {

> > +          regulator-name = "vcamio";

> > +          regulator-min-microvolt = <1700000>;

> > +          regulator-max-microvolt = <1900000>;

> > +        };

> > +

> > +        mt6359_vcn18_ldo_reg: ldo_vcn18 {

> > +          regulator-name = "vcn18";

> > +          regulator-min-microvolt = <1800000>;

> > +          regulator-max-microvolt = <1800000>;

> > +          regulator-enable-ramp-delay = <240>;

> > +        };

> > +

> > +        mt6359_vsram_proc2_ldo_reg: ldo_vsram_proc2 {

> > +          regulator-name = "vsram_proc2";

> > +          regulator-min-microvolt = <500000>;

> > +          regulator-max-microvolt = <1293750>;

> > +          regulator-ramp-delay = <7500>;

> > +          regulator-enable-ramp-delay = <240>;

> > +          regulator-always-on;

> > +        };

> > +

> > +        mt6359_vfe28_ldo_reg: ldo_vfe28 {

> > +          regulator-name = "vfe28";

> > +          regulator-min-microvolt = <2800000>;

> > +          regulator-max-microvolt = <2800000>;

> > +          regulator-enable-ramp-delay = <120>;

> > +        };

> > +

> > +        mt6359_vaud18_ldo_reg: ldo_vaud18 {

> > +          regulator-name = "vaud18";

> > +          regulator-min-microvolt = <1800000>;

> > +          regulator-max-microvolt = <1800000>;

> > +          regulator-enable-ramp-delay = <240>;

> > +        };

> > +

> > +        mt6359_vsim1_ldo_reg: ldo_vsim1 {

> > +          regulator-name = "vsim1";

> > +          regulator-min-microvolt = <1700000>;

> > +          regulator-max-microvolt = <3100000>;

> > +          regulator-enable-ramp-delay = <480>;

> > +        };

> > +      };

> > +    };

> > +...

> > -- 

> > 2.18.0

> >
Hsin-Hsiung Wang March 29, 2021, 11:13 a.m. UTC | #6
Hi,

On Tue, 2021-03-16 at 15:28 -0600, Rob Herring wrote:
> On Tue, Mar 16, 2021 at 01:35:53AM +0800, Hsin-Hsiung Wang wrote:

> > add dt-binding document for MediaTek MT6359 PMIC

> > 

> > Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>

> > ---

> > changes since v5:

> > - no change.

> > ---

> >  .../bindings/regulator/mt6359-regulator.yaml  | 169 ++++++++++++++++++

> >  1 file changed, 169 insertions(+)

> >  create mode 100644 Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

> > 

> > diff --git a/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

> > new file mode 100644

> > index 000000000000..62ff93eefd39

> > --- /dev/null

> > +++ b/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml

> > @@ -0,0 +1,169 @@

> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

> > +%YAML 1.2

> > +---

> > +$id: http://devicetree.org/schemas/regulator/mt6359-regulator.yaml#

> > +$schema: http://devicetree.org/meta-schemas/core.yaml#

> > +

> > +title: MT6359 Regulator from MediaTek Integrated

> > +

> > +maintainers:

> > +  - Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>

> > +

> > +description: |

> > +  List of regulators provided by this controller. It is named

> > +  according to its regulator type, buck_<name> and ldo_<name>.

> > +  MT6359 regulators node should be sub node of the MT6397 MFD node.

> > +

> > +properties:

> > +  $nodename:

> > +    pattern: "^pmic$"

> 

> The errors are because this schema will be applied to every 'pmic' node.

> 

> > +

> > +  mt6359regulator:

> 

> The node name here should be just 'regulators', but that should be in 

> the MFD schema and you should remove this level here. So the MFD would 

> have:

> 

> properties:

>   regulators:

>     type: object

>     $ref: schemas/regulator/mt6359-regulator.yaml#

> 

> > +    type: object

> > +    description:

> > +      list of regulators provided by this controller.

> > +

> > +    patternProperties:

> 

> And this should be at the top level of this doc.

> 

> > +      "^buck_v(s1|gpu11|modem|pu|core|s2|pa|proc2|proc1|core_sshub)$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^v(s1|gpu11|modem|pu|core|s2|pa|proc2|proc1|core_sshub)$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_v(ibr|rf12|usb|camio|efuse|xo22)$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^v(ibr|rf12|usb|camio|efuse|xo22)$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_v(rfck|emc|a12|a09|ufs|bbck)$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^v(rfck|emc|a12|a09|ufs|bbck)$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_vcn(18|13|33_1_bt|13_1_wifi|33_2_bt|33_2_wifi)$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^vcn(18|13|33_1_bt|13_1_wifi|33_2_bt|33_2_wifi)$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_vsram_(proc2|others|md|proc1|others_sshub)$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^vsram_(proc2|others|md|proc1|others_sshub)$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_v(fe|bif|io)28$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^v(fe|bif|io)28$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_v(aud|io|aux|rf|m)18$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^v(aud|io|aux|rf|m)18$"

> > +

> > +        unevaluatedProperties: false

> > +

> > +      "^ldo_vsim[12]$":

> > +        type: object

> > +        $ref: "regulator.yaml#"

> > +

> > +        properties:

> > +          regulator-name:

> > +            pattern: "^vsim[12]$"

> > +

> > +        required:

> > +          - regulator-name

> > +

> > +        unevaluatedProperties: false

> > +

> > +additionalProperties: false

> > +

> > +examples:

> > +  - |

> > +    pmic {

> > +      mt6359regulator {

> 

> I prefer to see a single complete example in the MFD schema rather than 

> piecemeal schemas in each sub schema.

> 


Thanks for your comment.
However, MT6397 mfd driver supports several mediatek pmics which have
different regulator capability, so it is hard to list all regulators of
each pmic in the MFD schema.

Thanks.

> > +        mt6359_vgpu11_buck_reg: buck_vgpu11 {

> > +          regulator-name = "vgpu11";

> > +          regulator-min-microvolt = <400000>;

> > +          regulator-max-microvolt = <1193750>;

> > +          regulator-enable-ramp-delay = <200>;

> > +          regulator-always-on;

> > +          regulator-allowed-modes = <0 1 2>;

> > +        };

> > +

> > +        mt6359_vcamio_ldo_reg: ldo_vcamio {

> > +          regulator-name = "vcamio";

> > +          regulator-min-microvolt = <1700000>;

> > +          regulator-max-microvolt = <1900000>;

> > +        };

> > +

> > +        mt6359_vcn18_ldo_reg: ldo_vcn18 {

> > +          regulator-name = "vcn18";

> > +          regulator-min-microvolt = <1800000>;

> > +          regulator-max-microvolt = <1800000>;

> > +          regulator-enable-ramp-delay = <240>;

> > +        };

> > +

> > +        mt6359_vsram_proc2_ldo_reg: ldo_vsram_proc2 {

> > +          regulator-name = "vsram_proc2";

> > +          regulator-min-microvolt = <500000>;

> > +          regulator-max-microvolt = <1293750>;

> > +          regulator-ramp-delay = <7500>;

> > +          regulator-enable-ramp-delay = <240>;

> > +          regulator-always-on;

> > +        };

> > +

> > +        mt6359_vfe28_ldo_reg: ldo_vfe28 {

> > +          regulator-name = "vfe28";

> > +          regulator-min-microvolt = <2800000>;

> > +          regulator-max-microvolt = <2800000>;

> > +          regulator-enable-ramp-delay = <120>;

> > +        };

> > +

> > +        mt6359_vaud18_ldo_reg: ldo_vaud18 {

> > +          regulator-name = "vaud18";

> > +          regulator-min-microvolt = <1800000>;

> > +          regulator-max-microvolt = <1800000>;

> > +          regulator-enable-ramp-delay = <240>;

> > +        };

> > +

> > +        mt6359_vsim1_ldo_reg: ldo_vsim1 {

> > +          regulator-name = "vsim1";

> > +          regulator-min-microvolt = <1700000>;

> > +          regulator-max-microvolt = <3100000>;

> > +          regulator-enable-ramp-delay = <480>;

> > +        };

> > +      };

> > +    };

> > +...

> > -- 

> > 2.18.0

> >