diff mbox series

dt-bindings: pmic: mt6366: add binding document

Message ID 20220510064603.15920-2-zhiyong.tao@mediatek.com (mailing list archive)
State New, archived
Headers show
Series dt-bindings: pmic: mt6366: add binding document | expand

Commit Message

zhiyong.tao May 10, 2022, 6:46 a.m. UTC
From: "Zhiyong.Tao" <zhiyong.tao@mediatek.com>

The commit adds mt6366 binding document.

Signed-off-by: Zhiyong.Tao <zhiyong.tao@mediatek.com>
---
 .../bindings/regulator/mt6366-regulator.yaml  | 405 ++++++++++++++++++
 1 file changed, 405 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml

Comments

Rex-BC Chen (陳柏辰) May 10, 2022, 7:56 a.m. UTC | #1
On Tue, 2022-05-10 at 14:46 +0800, Zhiyong Tao wrote:
> From: "Zhiyong.Tao" <zhiyong.tao@mediatek.com>
> 

I think "From: ..." can be removed?

> The commit adds mt6366 binding document.
> 
> Signed-off-by: Zhiyong.Tao <zhiyong.tao@mediatek.com>
> ---
>  .../bindings/regulator/mt6366-regulator.yaml  | 405
> ++++++++++++++++++
>  1 file changed, 405 insertions(+)
>  create mode 100644
> Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml
> 
> diff --git a/Documentation/devicetree/bindings/regulator/mt6366-
> regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6366-
> regulator.yaml
> new file mode 100644
> index 000000000000..1f125f5ba860
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/mt6366-
> regulator.yaml
> @@ -0,0 +1,405 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/mt6366-regulator.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MT6366 Regulator from MediaTek Integrated
> +
> +maintainers:
> +  - Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
> +

Hsing-Hsing is not responsible for regulator, so I think you can add
you as the maintainers.

> +description: |
> +  List of regulators provided by this controller. It is named
> +  according to its regulator type, buck_<name> and ldo_<name>.
> +  MT6366 regulators node should be sub node of the MT6397 MFD node.
> +
> +patternProperties:
> +  "^buck_v(dram1|core|pa|proc11|proc12|gpu|s2|modem|s1)$":
> +    type: object
> +    $ref: "regulator.yaml#"
> +
> +    properties:
> +      regulator-name:
> +        pattern: "^v(dram1|core|pa|proc11|proc12|gpu|s2|modem|s1)$"
> +
> +    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 {
> +      regulators {
> +        mt6366_vdram1_reg: buck_vdram1 {
> +            regulator-name = "vdram1";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <2087500>;
> +            regulator-ramp-delay = <12500>;
> +            regulator-enable-ramp-delay = <0>;
> +            regulator-always-on;
> +            regulator-allowed-modes = <0 1>;

should be two space instead of 4 space?
mt6366_vdram1_reg: buck_vdram1 {
  regulator-name = "vdram1";
  ...
};

There is the same issue for this example.

> +        };
> +        mt6366_vcore_reg: buck_vcore {
> +            regulator-name = "vcore";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +            regulator-ramp-delay = <6250>;
> +            regulator-enable-ramp-delay = <200>;
> +            regulator-always-on;
> +            regulator-allowed-modes = <0 1>;
> +        };
> +       mt6366_vproc11_reg: buck_vproc11 {

one more space before mt6366_vproc11_reg?

> +            regulator-name = "vproc11";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +            regulator-ramp-delay = <6250>;
> +            regulator-enable-ramp-delay = <200>;
> +            regulator-always-on;
> +            regulator-allowed-modes = <0 1>;
> +        };
> +        mt6366_vproc12_reg: buck_vproc12 {
> +            regulator-name = "vproc12";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +            regulator-ramp-delay = <6250>;
> +            regulator-enable-ramp-delay = <200>;
> +            regulator-always-on;
> +            regulator-allowed-modes = <0 1>;
> +        };
> +        mt6366_vgpu_reg: buck_vgpu {
> +            regulator-name = "vgpu";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +            regulator-ramp-delay = <6250>;
> +            regulator-enable-ramp-delay = <200>;
> +            regulator-allowed-modes = <0 1>;
> +        };
> +        mt6366_vs2_reg: buck_vs2 {
> +            regulator-name = "vs2";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <2087500>;
> +            regulator-ramp-delay = <12500>;
> +            regulator-enable-ramp-delay = <0>;
> +            regulator-always-on;
> +        };
> +       mt6366_vmodem_reg: buck_vmodem {

ditto.

> +            regulator-name = "vmodem";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +            regulator-ramp-delay = <6250>;
> +            regulator-enable-ramp-delay = <900>;
> +            regulator-always-on;
> +            regulator-allowed-modes = <0 1>;
> +        };
> +        mt6366_vs1_reg: buck_vs1 {
> +            regulator-name = "vs1";
> +            regulator-min-microvolt = <1000000>;
> +            regulator-max-microvolt = <2587500>;
> +            regulator-ramp-delay = <12500>;
> +            regulator-enable-ramp-delay = <0>;
> +            regulator-always-on;
> +        };
> +        mt6366_vdram2_reg: ldo_vdram2 {
> +            regulator-name = "vdram2";
> +            regulator-min-microvolt = <600000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <3300>;
> +            regulator-always-on;
> +        };
> +        mt6366_vsim1_reg: ldo_vsim1 {
> +            regulator-name = "vsim1";
> +            regulator-min-microvolt = <1700000>;
> +            regulator-max-microvolt = <3100000>;
> +            regulator-enable-ramp-delay = <540>;
> +        };
> +        mt6366_vibr_reg: ldo_vibr {
> +            regulator-name = "vibr";
> +            regulator-min-microvolt = <1200000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <60>;
> +        };
> +        mt6366_vrf12_reg: ldo_vrf12 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vrf12";
> +            regulator-min-microvolt = <1200000>;
> +            regulator-max-microvolt = <1200000>;
> +            regulator-enable-ramp-delay = <120>;
> +        };
> +        mt6366_vio18_reg: ldo_vio18 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vio18";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <2700>;
> +            regulator-always-on;
> +        };
> +        mt6366_vusb_reg: ldo_vusb {
> +            regulator-name = "vusb";
> +            regulator-min-microvolt = <3000000>;
> +            regulator-max-microvolt = <3100000>;
> +            regulator-enable-ramp-delay = <270>;
> +            regulator-always-on;
> +        };
> +        mt6366_vcamio_reg: ldo_vcamio {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vcamio";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <325>;
> +        };
> +        mt6366_vcamd_reg: ldo_vcamd {
> +            regulator-name = "vcamd";
> +            regulator-min-microvolt = <900000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <325>;
> +        };
> +        mt6366_vcn18_reg: ldo_vcn18 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vcn18";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_vfe28_reg: ldo_vfe28 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vfe28";
> +            regulator-min-microvolt = <2800000>;
> +            regulator-max-microvolt = <2800000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_vsram_proc11_reg: ldo_vsram_proc11 {
> +            regulator-name = "vsram_proc11";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +            regulator-ramp-delay = <6250>;
> +            regulator-enable-ramp-delay = <240>;
> +            regulator-always-on;
> +        };
> +        mt6366_vcn28_reg: ldo_vcn28 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vcn28";
> +            regulator-min-microvolt = <2800000>;
> +            regulator-max-microvolt = <2800000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_vsram_others_reg: ldo_vsram_others {
> +            regulator-name = "vsram_others";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +            regulator-ramp-delay = <6250>;
> +            regulator-enable-ramp-delay = <240>;
> +            regulator-always-on;
> +        };
> +        mt6366_vsram_gpu_reg: ldo_vsram_gpu {
> +            regulator-name = "vsram_gpu";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +            regulator-ramp-delay = <6250>;
> +            regulator-enable-ramp-delay = <240>;
> +        };
> +        mt6366_vxo22_reg: ldo_vxo22 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vxo22";
> +            regulator-min-microvolt = <2200000>;
> +            regulator-max-microvolt = <2200000>;
> +            regulator-enable-ramp-delay = <120>;
> +            regulator-always-on;
> +        };
> +        mt6366_vefuse_reg: ldo_vefuse {
> +            regulator-name = "vefuse";
> +            regulator-min-microvolt = <1700000>;
> +            regulator-max-microvolt = <1900000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_vaux18_reg: ldo_vaux18 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vaux18";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_vmch_reg: ldo_vmch {
> +            regulator-name = "vmch";
> +            regulator-min-microvolt = <2900000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <60>;
> +        };
> +        mt6366_vbif28_reg: ldo_vbif28 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vbif28";
> +            regulator-min-microvolt = <2800000>;
> +            regulator-max-microvolt = <2800000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_vsram_proc12_reg: ldo_vsram_proc12 {
> +            regulator-name = "vsram_proc12";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +            regulator-ramp-delay = <6250>;
> +            regulator-enable-ramp-delay = <240>;
> +            regulator-always-on;
> +        };
> +        mt6366_vcama1_reg: ldo_vcama1 {
> +            regulator-name = "vcama1";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <3000000>;
> +            regulator-enable-ramp-delay = <325>;
> +        };
> +        mt6366_vemc_reg: ldo_vemc {
> +            regulator-name = "vemc";
> +            regulator-min-microvolt = <2900000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <60>;
> +        };
> +        mt6366_vio28_reg: ldo_vio28 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vio28";
> +            regulator-min-microvolt = <2800000>;
> +            regulator-max-microvolt = <2800000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_va12_reg: ldo_va12 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "va12";
> +            regulator-min-microvolt = <1200000>;
> +            regulator-max-microvolt = <1200000>;
> +            regulator-enable-ramp-delay = <270>;
> +            regulator-always-on;
> +        };
> +        mt6366_vrf18_reg: ldo_vrf18 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vrf18";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <1800000>;
> +            regulator-enable-ramp-delay = <120>;
> +        };
> +        mt6366_vcn33_bt_reg: ldo_vcn33_bt {
> +            regulator-name = "vcn33_bt";
> +            regulator-min-microvolt = <3300000>;
> +            regulator-max-microvolt = <3500000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_vcn33_wifi_reg: ldo_vcn33_wifi {
> +            regulator-name = "vcn33_wifi";
> +            regulator-min-microvolt = <3300000>;
> +            regulator-max-microvolt = <3500000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_vcama2_reg: ldo_vcama2 {
> +            regulator-name = "vcama2";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <3000000>;
> +            regulator-enable-ramp-delay = <325>;
> +        };
> +        mt6366_vmc_reg: ldo_vmc {
> +            regulator-name = "vmc";
> +            regulator-min-microvolt = <1800000>;
> +            regulator-max-microvolt = <3300000>;
> +            regulator-enable-ramp-delay = <60>;
> +        };
> +        mt6366_vldo28_reg: ldo_vldo28 {
> +            regulator-name = "vldo28";
> +            regulator-min-microvolt = <2800000>;
> +            regulator-max-microvolt = <3000000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_vaud28_reg: ldo_vaud28 {
> +            compatible = "regulator-fixed";
> +            regulator-name = "vaud28";
> +            regulator-min-microvolt = <2800000>;
> +            regulator-max-microvolt = <2800000>;
> +            regulator-enable-ramp-delay = <270>;
> +        };
> +        mt6366_vsim2_reg: ldo_vsim2 {
> +            regulator-name = "vsim2";
> +            regulator-min-microvolt = <1700000>;
> +            regulator-max-microvolt = <3100000>;
> +            regulator-enable-ramp-delay = <540>;
> +        };
> +        mt6366_vcore_sshub_reg: buck_vcore_sshub {
> +            regulator-name = "vcore_sshub";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +        };
> +        mt6366_vsram_others_sshub_reg: ldo_vsram_others_sshub {
> +            regulator-name = "vsram_others_sshub";
> +            regulator-min-microvolt = <500000>;
> +            regulator-max-microvolt = <1293750>;
> +        };
> +      };
> +    };
> +...
Krzysztof Kozlowski May 10, 2022, 10:14 a.m. UTC | #2
On 10/05/2022 08:46, Zhiyong Tao wrote:
> From: "Zhiyong.Tao" <zhiyong.tao@mediatek.com>
> 
> The commit adds mt6366 binding document.

https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

> 
> Signed-off-by: Zhiyong.Tao <zhiyong.tao@mediatek.com>
> ---
>  .../bindings/regulator/mt6366-regulator.yaml  | 405 ++++++++++++++++++
>  1 file changed, 405 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml
> 
> diff --git a/Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml
> new file mode 100644
> index 000000000000..1f125f5ba860
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml

Filename with vendor, so "mediatek,mt6366-regulator.yaml"

> @@ -0,0 +1,405 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/regulator/mt6366-regulator.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MT6366 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>.
> +  MT6366 regulators node should be sub node of the MT6397 MFD node.
> +

Missing properties node, missing compatible. How is it supposed to
match? If you plan to use it as part of other binding, please send
entire patchset (including the binding which uses this one).

In current form this looks untestable, unusable.

> +patternProperties:
> +  "^buck_v(dram1|core|pa|proc11|proc12|gpu|s2|modem|s1)$":
> +    type: object
> +    $ref: "regulator.yaml#"
> +
> +    properties:
> +      regulator-name:
> +        pattern: "^v(dram1|core|pa|proc11|proc12|gpu|s2|modem|s1)$"
> +
> +    unevaluatedProperties: false

Put this one after $ref (other places as well). Makes it more readable.

> +
> +  "^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)$":

No underscores in node names.

> +    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)$":

No underscores in node names, in all places.

> +    type: object
> +    $ref: "regulator.yaml#"
> +
> +    properties:
> +      regulator-name:
> +        pattern: "^vsram_(proc2|others|md|proc1|others_sshub)$"
> +
> +    unevaluatedProperties: false
> +

Best regards,
Krzysztof
Mark Brown May 10, 2022, 11:33 a.m. UTC | #3
On Tue, May 10, 2022 at 02:46:03PM +0800, Zhiyong Tao wrote:
> From: "Zhiyong.Tao" <zhiyong.tao@mediatek.com>
> 
> The commit adds mt6366 binding document.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
Krzysztof Kozlowski May 11, 2022, 3:36 p.m. UTC | #4
On 10/05/2022 09:56, Rex-BC Chen wrote:
>> +examples:
>> +  - |
>> +    pmic {
>> +      regulators {
>> +        mt6366_vdram1_reg: buck_vdram1 {
>> +            regulator-name = "vdram1";
>> +            regulator-min-microvolt = <500000>;
>> +            regulator-max-microvolt = <2087500>;
>> +            regulator-ramp-delay = <12500>;
>> +            regulator-enable-ramp-delay = <0>;
>> +            regulator-always-on;
>> +            regulator-allowed-modes = <0 1>;
> 
> should be two space instead of 4 space?
> mt6366_vdram1_reg: buck_vdram1 {
>   regulator-name = "vdram1";
>   ...
> };
> 
> There is the same issue for this example.

Indentation is four spaces.
https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/tree/Documentation/devicetree/bindings/writing-schema.rst?h=for-next&id=7a150b0d850e37e7bdfc87459edd0ff302f67478#n111


Best regards,
Krzysztof
Rex-BC Chen (陳柏辰) May 12, 2022, 2:15 a.m. UTC | #5
On Wed, 2022-05-11 at 17:36 +0200, Krzysztof Kozlowski wrote:
> On 10/05/2022 09:56, Rex-BC Chen wrote:
> > > +examples:
> > > +  - |
> > > +    pmic {
> > > +      regulators {
> > > +        mt6366_vdram1_reg: buck_vdram1 {
> > > +            regulator-name = "vdram1";
> > > +            regulator-min-microvolt = <500000>;
> > > +            regulator-max-microvolt = <2087500>;
> > > +            regulator-ramp-delay = <12500>;
> > > +            regulator-enable-ramp-delay = <0>;
> > > +            regulator-always-on;
> > > +            regulator-allowed-modes = <0 1>;
> > 
> > should be two space instead of 4 space?
> > mt6366_vdram1_reg: buck_vdram1 {
> >   regulator-name = "vdram1";
> >   ...
> > };
> > 
> > There is the same issue for this example.
> 
> Indentation is four spaces.
> 
https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/tree/Documentation/devicetree/bindings/writing-schema.rst?h=for-next&id=7a150b0d850e37e7bdfc87459edd0ff302f67478*n111__;Iw!!CTRNKA9wMg0ARbw!yGLurJNfCjmllj-0EbUwL_HZef0f6MlfC8U968TLmzDG13EL7BErcZjtKu9cf6MMcz-E$
>  
> 
> 
> Best regards,
> Krzysztof

Hello Krzysztof,

Thanks for your correction.

BRs,
Rex
zhiyong.tao July 28, 2022, 6 a.m. UTC | #6
On Tue, 2022-05-10 at 12:14 +0200, Krzysztof Kozlowski wrote:
> On 10/05/2022 08:46, Zhiyong Tao wrote:
> > From: "Zhiyong.Tao" <zhiyong.tao@mediatek.com>
> > 
> > The commit adds mt6366 binding document.
> 
> 
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
> 
==>
Hi Krzysztof,

we will fix it in v2.

> > 
> > Signed-off-by: Zhiyong.Tao <zhiyong.tao@mediatek.com>
> > ---
> >  .../bindings/regulator/mt6366-regulator.yaml  | 405
> > ++++++++++++++++++
> >  1 file changed, 405 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/regulator/mt6366-
> > regulator.yaml
> > b/Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml
> > new file mode 100644
> > index 000000000000..1f125f5ba860
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/regulator/mt6366-
> > regulator.yaml
> 
> Filename with vendor, so "mediatek,mt6366-regulator.yaml"
> 
> > @@ -0,0 +1,405 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: 
> > http://devicetree.org/schemas/regulator/mt6366-regulator.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: MT6366 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>.
> > +  MT6366 regulators node should be sub node of the MT6397 MFD
> > node.
> > +
> 
> Missing properties node, missing compatible. How is it supposed to
> match? If you plan to use it as part of other binding, please send
> entire patchset (including the binding which uses this one).
> 
> In current form this looks untestable, unusable.
==>We will  add properties node and compatiblein v2.
> 
> > +patternProperties:
> > +  "^buck_v(dram1|core|pa|proc11|proc12|gpu|s2|modem|s1)$":
> > +    type: object
> > +    $ref: "regulator.yaml#"
> > +
> > +    properties:
> > +      regulator-name:
> > +        pattern:
> > "^v(dram1|core|pa|proc11|proc12|gpu|s2|modem|s1)$"
> > +
> > +    unevaluatedProperties: false
> 
> Put this one after $ref (other places as well). Makes it more
> readable.
==>we will fix it in v2.
> 
> > +
> > +  "^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)$":
> 
> No underscores in node names.
==>we will fix it in v2.
> 
> > +    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)$":
> 
> No underscores in node names, in all places.
==>we will fix it in v2.
Thanks.
> 
> > +    type: object
> > +    $ref: "regulator.yaml#"
> > +
> > +    properties:
> > +      regulator-name:
> > +        pattern: "^vsram_(proc2|others|md|proc1|others_sshub)$"
> > +
> > +    unevaluatedProperties: false
> > +
> 
> Best regards,
> Krzysztof
zhiyong.tao July 28, 2022, 6:02 a.m. UTC | #7
On Tue, 2022-05-10 at 12:33 +0100, Mark Brown wrote:
> On Tue, May 10, 2022 at 02:46:03PM +0800, Zhiyong Tao wrote:
> > From: "Zhiyong.Tao" <zhiyong.tao@mediatek.com>
> > 
> > The commit adds mt6366 binding document.
> 
> Please submit patches using subject lines reflecting the style for
> the
> subsystem, this makes it easier for people to identify relevant
> patches.
> Look at what existing commits in the area you're changing are doing
> and
> make sure your subject lines visually resemble what they're doing.

==> Hi Mark,
we will fix it in v2
Thanks
zhiyong.tao July 28, 2022, 6:06 a.m. UTC | #8
On Tue, 2022-05-10 at 15:56 +0800, Rex-BC Chen wrote:
> On Tue, 2022-05-10 at 14:46 +0800, Zhiyong Tao wrote:
> > From: "Zhiyong.Tao" <zhiyong.tao@mediatek.com>
> > 
> 
> I think "From: ..." can be removed?
> 
> > The commit adds mt6366 binding document.
> > 
> > Signed-off-by: Zhiyong.Tao <zhiyong.tao@mediatek.com>
> > ---
> >  .../bindings/regulator/mt6366-regulator.yaml  | 405
> > ++++++++++++++++++
> >  1 file changed, 405 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/regulator/mt6366-
> > regulator.yaml
> > b/Documentation/devicetree/bindings/regulator/mt6366-
> > regulator.yaml
> > new file mode 100644
> > index 000000000000..1f125f5ba860
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/regulator/mt6366-
> > regulator.yaml
> > @@ -0,0 +1,405 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: 
> > http://devicetree.org/schemas/regulator/mt6366-regulator.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: MT6366 Regulator from MediaTek Integrated
> > +
> > +maintainers:
> > +  - Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
> > +
> 
> Hsing-Hsing is not responsible for regulator, so I think you can add
> you as the maintainers.
Hi Rex-BC,

we will fix it in v2.
> 
> > +description: |
> > +  List of regulators provided by this controller. It is named
> > +  according to its regulator type, buck_<name> and ldo_<name>.
> > +  MT6366 regulators node should be sub node of the MT6397 MFD
> > node.
> > +
> > +patternProperties:
> > +  "^buck_v(dram1|core|pa|proc11|proc12|gpu|s2|modem|s1)$":
> > +    type: object
> > +    $ref: "regulator.yaml#"
> > +
> > +    properties:
> > +      regulator-name:
> > +        pattern:
> > "^v(dram1|core|pa|proc11|proc12|gpu|s2|modem|s1)$"
> > +
> > +    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 {
> > +      regulators {
> > +        mt6366_vdram1_reg: buck_vdram1 {
> > +            regulator-name = "vdram1";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <2087500>;
> > +            regulator-ramp-delay = <12500>;
> > +            regulator-enable-ramp-delay = <0>;
> > +            regulator-always-on;
> > +            regulator-allowed-modes = <0 1>;
> 
> should be two space instead of 4 space?
> mt6366_vdram1_reg: buck_vdram1 {
>   regulator-name = "vdram1";
>   ...
> };
==> as talked with Krzysztof, we will keep four spaces.

Indentation is four spaces.

https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/tree/Documentation/devicetree/bindings/writing-schema.rst?h=for-next&id=7a150b0d850e37e7bdfc87459edd0ff302f67478#n111


Best regards,
Krzysztof

> 
> There is the same issue for this example.
> 
> > +        };
> > +        mt6366_vcore_reg: buck_vcore {
> > +            regulator-name = "vcore";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +            regulator-ramp-delay = <6250>;
> > +            regulator-enable-ramp-delay = <200>;
> > +            regulator-always-on;
> > +            regulator-allowed-modes = <0 1>;
> > +        };
> > +       mt6366_vproc11_reg: buck_vproc11 {
> 
> one more space before mt6366_vproc11_reg?
> 
> > +            regulator-name = "vproc11";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +            regulator-ramp-delay = <6250>;
> > +            regulator-enable-ramp-delay = <200>;
> > +            regulator-always-on;
> > +            regulator-allowed-modes = <0 1>;
> > +        };
> > +        mt6366_vproc12_reg: buck_vproc12 {
> > +            regulator-name = "vproc12";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +            regulator-ramp-delay = <6250>;
> > +            regulator-enable-ramp-delay = <200>;
> > +            regulator-always-on;
> > +            regulator-allowed-modes = <0 1>;
> > +        };
> > +        mt6366_vgpu_reg: buck_vgpu {
> > +            regulator-name = "vgpu";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +            regulator-ramp-delay = <6250>;
> > +            regulator-enable-ramp-delay = <200>;
> > +            regulator-allowed-modes = <0 1>;
> > +        };
> > +        mt6366_vs2_reg: buck_vs2 {
> > +            regulator-name = "vs2";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <2087500>;
> > +            regulator-ramp-delay = <12500>;
> > +            regulator-enable-ramp-delay = <0>;
> > +            regulator-always-on;
> > +        };
> > +       mt6366_vmodem_reg: buck_vmodem {
> 
> ditto.
> 
> > +            regulator-name = "vmodem";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +            regulator-ramp-delay = <6250>;
> > +            regulator-enable-ramp-delay = <900>;
> > +            regulator-always-on;
> > +            regulator-allowed-modes = <0 1>;
> > +        };
> > +        mt6366_vs1_reg: buck_vs1 {
> > +            regulator-name = "vs1";
> > +            regulator-min-microvolt = <1000000>;
> > +            regulator-max-microvolt = <2587500>;
> > +            regulator-ramp-delay = <12500>;
> > +            regulator-enable-ramp-delay = <0>;
> > +            regulator-always-on;
> > +        };
> > +        mt6366_vdram2_reg: ldo_vdram2 {
> > +            regulator-name = "vdram2";
> > +            regulator-min-microvolt = <600000>;
> > +            regulator-max-microvolt = <1800000>;
> > +            regulator-enable-ramp-delay = <3300>;
> > +            regulator-always-on;
> > +        };
> > +        mt6366_vsim1_reg: ldo_vsim1 {
> > +            regulator-name = "vsim1";
> > +            regulator-min-microvolt = <1700000>;
> > +            regulator-max-microvolt = <3100000>;
> > +            regulator-enable-ramp-delay = <540>;
> > +        };
> > +        mt6366_vibr_reg: ldo_vibr {
> > +            regulator-name = "vibr";
> > +            regulator-min-microvolt = <1200000>;
> > +            regulator-max-microvolt = <3300000>;
> > +            regulator-enable-ramp-delay = <60>;
> > +        };
> > +        mt6366_vrf12_reg: ldo_vrf12 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vrf12";
> > +            regulator-min-microvolt = <1200000>;
> > +            regulator-max-microvolt = <1200000>;
> > +            regulator-enable-ramp-delay = <120>;
> > +        };
> > +        mt6366_vio18_reg: ldo_vio18 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vio18";
> > +            regulator-min-microvolt = <1800000>;
> > +            regulator-max-microvolt = <1800000>;
> > +            regulator-enable-ramp-delay = <2700>;
> > +            regulator-always-on;
> > +        };
> > +        mt6366_vusb_reg: ldo_vusb {
> > +            regulator-name = "vusb";
> > +            regulator-min-microvolt = <3000000>;
> > +            regulator-max-microvolt = <3100000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +            regulator-always-on;
> > +        };
> > +        mt6366_vcamio_reg: ldo_vcamio {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vcamio";
> > +            regulator-min-microvolt = <1800000>;
> > +            regulator-max-microvolt = <1800000>;
> > +            regulator-enable-ramp-delay = <325>;
> > +        };
> > +        mt6366_vcamd_reg: ldo_vcamd {
> > +            regulator-name = "vcamd";
> > +            regulator-min-microvolt = <900000>;
> > +            regulator-max-microvolt = <1800000>;
> > +            regulator-enable-ramp-delay = <325>;
> > +        };
> > +        mt6366_vcn18_reg: ldo_vcn18 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vcn18";
> > +            regulator-min-microvolt = <1800000>;
> > +            regulator-max-microvolt = <1800000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_vfe28_reg: ldo_vfe28 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vfe28";
> > +            regulator-min-microvolt = <2800000>;
> > +            regulator-max-microvolt = <2800000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_vsram_proc11_reg: ldo_vsram_proc11 {
> > +            regulator-name = "vsram_proc11";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +            regulator-ramp-delay = <6250>;
> > +            regulator-enable-ramp-delay = <240>;
> > +            regulator-always-on;
> > +        };
> > +        mt6366_vcn28_reg: ldo_vcn28 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vcn28";
> > +            regulator-min-microvolt = <2800000>;
> > +            regulator-max-microvolt = <2800000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_vsram_others_reg: ldo_vsram_others {
> > +            regulator-name = "vsram_others";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +            regulator-ramp-delay = <6250>;
> > +            regulator-enable-ramp-delay = <240>;
> > +            regulator-always-on;
> > +        };
> > +        mt6366_vsram_gpu_reg: ldo_vsram_gpu {
> > +            regulator-name = "vsram_gpu";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +            regulator-ramp-delay = <6250>;
> > +            regulator-enable-ramp-delay = <240>;
> > +        };
> > +        mt6366_vxo22_reg: ldo_vxo22 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vxo22";
> > +            regulator-min-microvolt = <2200000>;
> > +            regulator-max-microvolt = <2200000>;
> > +            regulator-enable-ramp-delay = <120>;
> > +            regulator-always-on;
> > +        };
> > +        mt6366_vefuse_reg: ldo_vefuse {
> > +            regulator-name = "vefuse";
> > +            regulator-min-microvolt = <1700000>;
> > +            regulator-max-microvolt = <1900000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_vaux18_reg: ldo_vaux18 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vaux18";
> > +            regulator-min-microvolt = <1800000>;
> > +            regulator-max-microvolt = <1800000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_vmch_reg: ldo_vmch {
> > +            regulator-name = "vmch";
> > +            regulator-min-microvolt = <2900000>;
> > +            regulator-max-microvolt = <3300000>;
> > +            regulator-enable-ramp-delay = <60>;
> > +        };
> > +        mt6366_vbif28_reg: ldo_vbif28 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vbif28";
> > +            regulator-min-microvolt = <2800000>;
> > +            regulator-max-microvolt = <2800000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_vsram_proc12_reg: ldo_vsram_proc12 {
> > +            regulator-name = "vsram_proc12";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +            regulator-ramp-delay = <6250>;
> > +            regulator-enable-ramp-delay = <240>;
> > +            regulator-always-on;
> > +        };
> > +        mt6366_vcama1_reg: ldo_vcama1 {
> > +            regulator-name = "vcama1";
> > +            regulator-min-microvolt = <1800000>;
> > +            regulator-max-microvolt = <3000000>;
> > +            regulator-enable-ramp-delay = <325>;
> > +        };
> > +        mt6366_vemc_reg: ldo_vemc {
> > +            regulator-name = "vemc";
> > +            regulator-min-microvolt = <2900000>;
> > +            regulator-max-microvolt = <3300000>;
> > +            regulator-enable-ramp-delay = <60>;
> > +        };
> > +        mt6366_vio28_reg: ldo_vio28 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vio28";
> > +            regulator-min-microvolt = <2800000>;
> > +            regulator-max-microvolt = <2800000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_va12_reg: ldo_va12 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "va12";
> > +            regulator-min-microvolt = <1200000>;
> > +            regulator-max-microvolt = <1200000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +            regulator-always-on;
> > +        };
> > +        mt6366_vrf18_reg: ldo_vrf18 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vrf18";
> > +            regulator-min-microvolt = <1800000>;
> > +            regulator-max-microvolt = <1800000>;
> > +            regulator-enable-ramp-delay = <120>;
> > +        };
> > +        mt6366_vcn33_bt_reg: ldo_vcn33_bt {
> > +            regulator-name = "vcn33_bt";
> > +            regulator-min-microvolt = <3300000>;
> > +            regulator-max-microvolt = <3500000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_vcn33_wifi_reg: ldo_vcn33_wifi {
> > +            regulator-name = "vcn33_wifi";
> > +            regulator-min-microvolt = <3300000>;
> > +            regulator-max-microvolt = <3500000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_vcama2_reg: ldo_vcama2 {
> > +            regulator-name = "vcama2";
> > +            regulator-min-microvolt = <1800000>;
> > +            regulator-max-microvolt = <3000000>;
> > +            regulator-enable-ramp-delay = <325>;
> > +        };
> > +        mt6366_vmc_reg: ldo_vmc {
> > +            regulator-name = "vmc";
> > +            regulator-min-microvolt = <1800000>;
> > +            regulator-max-microvolt = <3300000>;
> > +            regulator-enable-ramp-delay = <60>;
> > +        };
> > +        mt6366_vldo28_reg: ldo_vldo28 {
> > +            regulator-name = "vldo28";
> > +            regulator-min-microvolt = <2800000>;
> > +            regulator-max-microvolt = <3000000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_vaud28_reg: ldo_vaud28 {
> > +            compatible = "regulator-fixed";
> > +            regulator-name = "vaud28";
> > +            regulator-min-microvolt = <2800000>;
> > +            regulator-max-microvolt = <2800000>;
> > +            regulator-enable-ramp-delay = <270>;
> > +        };
> > +        mt6366_vsim2_reg: ldo_vsim2 {
> > +            regulator-name = "vsim2";
> > +            regulator-min-microvolt = <1700000>;
> > +            regulator-max-microvolt = <3100000>;
> > +            regulator-enable-ramp-delay = <540>;
> > +        };
> > +        mt6366_vcore_sshub_reg: buck_vcore_sshub {
> > +            regulator-name = "vcore_sshub";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +        };
> > +        mt6366_vsram_others_sshub_reg: ldo_vsram_others_sshub {
> > +            regulator-name = "vsram_others_sshub";
> > +            regulator-min-microvolt = <500000>;
> > +            regulator-max-microvolt = <1293750>;
> > +        };
> > +      };
> > +    };
> > +...
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml
new file mode 100644
index 000000000000..1f125f5ba860
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/mt6366-regulator.yaml
@@ -0,0 +1,405 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/mt6366-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MT6366 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>.
+  MT6366 regulators node should be sub node of the MT6397 MFD node.
+
+patternProperties:
+  "^buck_v(dram1|core|pa|proc11|proc12|gpu|s2|modem|s1)$":
+    type: object
+    $ref: "regulator.yaml#"
+
+    properties:
+      regulator-name:
+        pattern: "^v(dram1|core|pa|proc11|proc12|gpu|s2|modem|s1)$"
+
+    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 {
+      regulators {
+        mt6366_vdram1_reg: buck_vdram1 {
+            regulator-name = "vdram1";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <2087500>;
+            regulator-ramp-delay = <12500>;
+            regulator-enable-ramp-delay = <0>;
+            regulator-always-on;
+            regulator-allowed-modes = <0 1>;
+        };
+        mt6366_vcore_reg: buck_vcore {
+            regulator-name = "vcore";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+            regulator-ramp-delay = <6250>;
+            regulator-enable-ramp-delay = <200>;
+            regulator-always-on;
+            regulator-allowed-modes = <0 1>;
+        };
+       mt6366_vproc11_reg: buck_vproc11 {
+            regulator-name = "vproc11";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+            regulator-ramp-delay = <6250>;
+            regulator-enable-ramp-delay = <200>;
+            regulator-always-on;
+            regulator-allowed-modes = <0 1>;
+        };
+        mt6366_vproc12_reg: buck_vproc12 {
+            regulator-name = "vproc12";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+            regulator-ramp-delay = <6250>;
+            regulator-enable-ramp-delay = <200>;
+            regulator-always-on;
+            regulator-allowed-modes = <0 1>;
+        };
+        mt6366_vgpu_reg: buck_vgpu {
+            regulator-name = "vgpu";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+            regulator-ramp-delay = <6250>;
+            regulator-enable-ramp-delay = <200>;
+            regulator-allowed-modes = <0 1>;
+        };
+        mt6366_vs2_reg: buck_vs2 {
+            regulator-name = "vs2";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <2087500>;
+            regulator-ramp-delay = <12500>;
+            regulator-enable-ramp-delay = <0>;
+            regulator-always-on;
+        };
+       mt6366_vmodem_reg: buck_vmodem {
+            regulator-name = "vmodem";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+            regulator-ramp-delay = <6250>;
+            regulator-enable-ramp-delay = <900>;
+            regulator-always-on;
+            regulator-allowed-modes = <0 1>;
+        };
+        mt6366_vs1_reg: buck_vs1 {
+            regulator-name = "vs1";
+            regulator-min-microvolt = <1000000>;
+            regulator-max-microvolt = <2587500>;
+            regulator-ramp-delay = <12500>;
+            regulator-enable-ramp-delay = <0>;
+            regulator-always-on;
+        };
+        mt6366_vdram2_reg: ldo_vdram2 {
+            regulator-name = "vdram2";
+            regulator-min-microvolt = <600000>;
+            regulator-max-microvolt = <1800000>;
+            regulator-enable-ramp-delay = <3300>;
+            regulator-always-on;
+        };
+        mt6366_vsim1_reg: ldo_vsim1 {
+            regulator-name = "vsim1";
+            regulator-min-microvolt = <1700000>;
+            regulator-max-microvolt = <3100000>;
+            regulator-enable-ramp-delay = <540>;
+        };
+        mt6366_vibr_reg: ldo_vibr {
+            regulator-name = "vibr";
+            regulator-min-microvolt = <1200000>;
+            regulator-max-microvolt = <3300000>;
+            regulator-enable-ramp-delay = <60>;
+        };
+        mt6366_vrf12_reg: ldo_vrf12 {
+            compatible = "regulator-fixed";
+            regulator-name = "vrf12";
+            regulator-min-microvolt = <1200000>;
+            regulator-max-microvolt = <1200000>;
+            regulator-enable-ramp-delay = <120>;
+        };
+        mt6366_vio18_reg: ldo_vio18 {
+            compatible = "regulator-fixed";
+            regulator-name = "vio18";
+            regulator-min-microvolt = <1800000>;
+            regulator-max-microvolt = <1800000>;
+            regulator-enable-ramp-delay = <2700>;
+            regulator-always-on;
+        };
+        mt6366_vusb_reg: ldo_vusb {
+            regulator-name = "vusb";
+            regulator-min-microvolt = <3000000>;
+            regulator-max-microvolt = <3100000>;
+            regulator-enable-ramp-delay = <270>;
+            regulator-always-on;
+        };
+        mt6366_vcamio_reg: ldo_vcamio {
+            compatible = "regulator-fixed";
+            regulator-name = "vcamio";
+            regulator-min-microvolt = <1800000>;
+            regulator-max-microvolt = <1800000>;
+            regulator-enable-ramp-delay = <325>;
+        };
+        mt6366_vcamd_reg: ldo_vcamd {
+            regulator-name = "vcamd";
+            regulator-min-microvolt = <900000>;
+            regulator-max-microvolt = <1800000>;
+            regulator-enable-ramp-delay = <325>;
+        };
+        mt6366_vcn18_reg: ldo_vcn18 {
+            compatible = "regulator-fixed";
+            regulator-name = "vcn18";
+            regulator-min-microvolt = <1800000>;
+            regulator-max-microvolt = <1800000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_vfe28_reg: ldo_vfe28 {
+            compatible = "regulator-fixed";
+            regulator-name = "vfe28";
+            regulator-min-microvolt = <2800000>;
+            regulator-max-microvolt = <2800000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_vsram_proc11_reg: ldo_vsram_proc11 {
+            regulator-name = "vsram_proc11";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+            regulator-ramp-delay = <6250>;
+            regulator-enable-ramp-delay = <240>;
+            regulator-always-on;
+        };
+        mt6366_vcn28_reg: ldo_vcn28 {
+            compatible = "regulator-fixed";
+            regulator-name = "vcn28";
+            regulator-min-microvolt = <2800000>;
+            regulator-max-microvolt = <2800000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_vsram_others_reg: ldo_vsram_others {
+            regulator-name = "vsram_others";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+            regulator-ramp-delay = <6250>;
+            regulator-enable-ramp-delay = <240>;
+            regulator-always-on;
+        };
+        mt6366_vsram_gpu_reg: ldo_vsram_gpu {
+            regulator-name = "vsram_gpu";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+            regulator-ramp-delay = <6250>;
+            regulator-enable-ramp-delay = <240>;
+        };
+        mt6366_vxo22_reg: ldo_vxo22 {
+            compatible = "regulator-fixed";
+            regulator-name = "vxo22";
+            regulator-min-microvolt = <2200000>;
+            regulator-max-microvolt = <2200000>;
+            regulator-enable-ramp-delay = <120>;
+            regulator-always-on;
+        };
+        mt6366_vefuse_reg: ldo_vefuse {
+            regulator-name = "vefuse";
+            regulator-min-microvolt = <1700000>;
+            regulator-max-microvolt = <1900000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_vaux18_reg: ldo_vaux18 {
+            compatible = "regulator-fixed";
+            regulator-name = "vaux18";
+            regulator-min-microvolt = <1800000>;
+            regulator-max-microvolt = <1800000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_vmch_reg: ldo_vmch {
+            regulator-name = "vmch";
+            regulator-min-microvolt = <2900000>;
+            regulator-max-microvolt = <3300000>;
+            regulator-enable-ramp-delay = <60>;
+        };
+        mt6366_vbif28_reg: ldo_vbif28 {
+            compatible = "regulator-fixed";
+            regulator-name = "vbif28";
+            regulator-min-microvolt = <2800000>;
+            regulator-max-microvolt = <2800000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_vsram_proc12_reg: ldo_vsram_proc12 {
+            regulator-name = "vsram_proc12";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+            regulator-ramp-delay = <6250>;
+            regulator-enable-ramp-delay = <240>;
+            regulator-always-on;
+        };
+        mt6366_vcama1_reg: ldo_vcama1 {
+            regulator-name = "vcama1";
+            regulator-min-microvolt = <1800000>;
+            regulator-max-microvolt = <3000000>;
+            regulator-enable-ramp-delay = <325>;
+        };
+        mt6366_vemc_reg: ldo_vemc {
+            regulator-name = "vemc";
+            regulator-min-microvolt = <2900000>;
+            regulator-max-microvolt = <3300000>;
+            regulator-enable-ramp-delay = <60>;
+        };
+        mt6366_vio28_reg: ldo_vio28 {
+            compatible = "regulator-fixed";
+            regulator-name = "vio28";
+            regulator-min-microvolt = <2800000>;
+            regulator-max-microvolt = <2800000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_va12_reg: ldo_va12 {
+            compatible = "regulator-fixed";
+            regulator-name = "va12";
+            regulator-min-microvolt = <1200000>;
+            regulator-max-microvolt = <1200000>;
+            regulator-enable-ramp-delay = <270>;
+            regulator-always-on;
+        };
+        mt6366_vrf18_reg: ldo_vrf18 {
+            compatible = "regulator-fixed";
+            regulator-name = "vrf18";
+            regulator-min-microvolt = <1800000>;
+            regulator-max-microvolt = <1800000>;
+            regulator-enable-ramp-delay = <120>;
+        };
+        mt6366_vcn33_bt_reg: ldo_vcn33_bt {
+            regulator-name = "vcn33_bt";
+            regulator-min-microvolt = <3300000>;
+            regulator-max-microvolt = <3500000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_vcn33_wifi_reg: ldo_vcn33_wifi {
+            regulator-name = "vcn33_wifi";
+            regulator-min-microvolt = <3300000>;
+            regulator-max-microvolt = <3500000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_vcama2_reg: ldo_vcama2 {
+            regulator-name = "vcama2";
+            regulator-min-microvolt = <1800000>;
+            regulator-max-microvolt = <3000000>;
+            regulator-enable-ramp-delay = <325>;
+        };
+        mt6366_vmc_reg: ldo_vmc {
+            regulator-name = "vmc";
+            regulator-min-microvolt = <1800000>;
+            regulator-max-microvolt = <3300000>;
+            regulator-enable-ramp-delay = <60>;
+        };
+        mt6366_vldo28_reg: ldo_vldo28 {
+            regulator-name = "vldo28";
+            regulator-min-microvolt = <2800000>;
+            regulator-max-microvolt = <3000000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_vaud28_reg: ldo_vaud28 {
+            compatible = "regulator-fixed";
+            regulator-name = "vaud28";
+            regulator-min-microvolt = <2800000>;
+            regulator-max-microvolt = <2800000>;
+            regulator-enable-ramp-delay = <270>;
+        };
+        mt6366_vsim2_reg: ldo_vsim2 {
+            regulator-name = "vsim2";
+            regulator-min-microvolt = <1700000>;
+            regulator-max-microvolt = <3100000>;
+            regulator-enable-ramp-delay = <540>;
+        };
+        mt6366_vcore_sshub_reg: buck_vcore_sshub {
+            regulator-name = "vcore_sshub";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+        };
+        mt6366_vsram_others_sshub_reg: ldo_vsram_others_sshub {
+            regulator-name = "vsram_others_sshub";
+            regulator-min-microvolt = <500000>;
+            regulator-max-microvolt = <1293750>;
+        };
+      };
+    };
+...