Message ID | 20220823123745.14061-1-zhiyong.tao@mediatek.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v4] regulator: dt-bindings: mediatek: add mt6366 | expand |
On Tue, Aug 23, 2022 at 08:37:45PM +0800, Zhiyong Tao wrote: > Add mt6366 regulator document > > Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com> > --- [..] > --- /dev/null > +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6366-regulator.yaml [..] > + "^buck-(vcore)-sshub$": The parentheses here don't serve any purpose, so drop them. > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false [..] > + "^ldo-vcn(33)-wifi$": Ditto. > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^ldo-vsram-(others)-sshub$": Ditto. > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false [..] > + "^ldo-vsim[2]$": Based on the example, should be [12]. Thanks, Nícolas > + type: object [..] > + mt6366_vsim1_reg: ldo-vsim1 { > + regulator-enable-ramp-delay = <540>; > + }; [..] > + mt6366_vsim2_reg: ldo-vsim2 { > + regulator-enable-ramp-delay = <540>; > + }; [..]
On 23/08/2022 15:37, Zhiyong Tao wrote: > Add mt6366 regulator document > > Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com> https://lore.kernel.org/all/3a26be5c-04c5-cd67-1154-dfd7d99fb5d0@linaro.org/ Where is the driver? This ended up in spam folder, so you might need to fix up your setup just like other folks in Mediatek did. > --- > Changes in patch v4: > 1)Add unevaluatedProperties in all places > 2)Fix check warning and errors > 3)remove "compatible="regulator-fixed"" properties for some ldo > > Changes in patch v3: > 1)change patch title > 2)change "regulator.yaml#" to regulator.yaml# > 3)remove regulator-name > 4)fix 4 space for DTS example > > Changes in patch v2: > 1)fix patch title description. > 2)fix patch maintainer description. > 3)won't cc to srv_heupstream@mediatek.com > 4)fix patch commit message description. > 5)add properties node and compatible > 6)put "unevaluatedProperties: false" after $ref > 7)remove underscores in node names. > 8)change Filename to "mediatek,mt6366-regulator.yaml" > [Zhiyong Tao <zhiyong.tao@mediatek.com>] > --- > --- > .../regulator/mediatek,mt6366-regulator.yaml | 279 ++++++++++++++++++ > 1 file changed, 279 insertions(+) > create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6366-regulator.yaml > > diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6366-regulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6366-regulator.yaml > new file mode 100644 > index 000000000000..8945bf20b574 > --- /dev/null > +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6366-regulator.yaml > @@ -0,0 +1,279 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/regulator/mediatek,mt6366-regulator.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: MT6366 Regulator from MediaTek Integrated > + > +maintainers: > + - Zhiyong Tao <zhiyong.tao@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. > + > +properties: > + compatible: > + const: mediatek,mt6366-regulator This looks incomplete. How does it bind? Further pieces also suggest you send something incomplete. > + > + regulators: > + type: object > + description: List of regulators and its properties > + > + patternProperties: > + "^buck-v(dram1|core|coresshub|proc11|proc12|gpu|s2|modem|s1)$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^ldo-v(dram2|sim1|ibr|rf12|usb|camio|camd|cn18|fe28)$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^ldo-v(xo22|efuse|mch|vcama1|emc|a12|vcama2|mc)$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^buck-(vcore)-sshub$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^ldo-vcn(28|33)-bt$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^ldo-vcn(33)-wifi$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^ldo-vsram-(others)-sshub$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^ldo-vsram-(proc11|others|gpu|proc12)$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^ldo-v(aud|bif|io|ldo)28$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^ldo-v(io|aux|rf)18$": > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > + "^ldo-vsim[2]$": I have now doubts whether you define generic regulators or quite specific regulators you have on your board... Are the names used in the device datasheet in register API description? > + type: object > + $ref: regulator.yaml# > + unevaluatedProperties: false > + > +required: > + - compatible > + - regulators > + > +additionalProperties: false > + > +examples: > + - | > + pmic { > + compatible = "mediatek,mt6366-regulator"; > + > + regulators { > + mt6366_vdram1_reg: buck-vdram1 { Drop the labels here and further. Why you do not have here any regular constraints like min/max voltage? > + regulator-ramp-delay = <12500>; > + regulator-enable-ramp-delay = <0>; > + regulator-allowed-modes = <0 1>; Where do you explain the meaning of modes? > + }; > + > + mt6366_vcore_reg: buck-vcore { > + regulator-ramp-delay = <6250>; > + regulator-enable-ramp-delay = <200>; > + regulator-allowed-modes = <0 1>; > + }; > + > + mt6366_vproc11_reg: buck-vproc11 { > + regulator-ramp-delay = <6250>; > + regulator-enable-ramp-delay = <200>; > + regulator-allowed-modes = <0 1>; > + }; > + > + mt6366_vproc12_reg: buck-vproc12 { > + regulator-ramp-delay = <6250>; > + regulator-enable-ramp-delay = <200>; > + regulator-allowed-modes = <0 1>; > + }; > + > + mt6366_vgpu_reg: buck-vgpu { > + regulator-ramp-delay = <6250>; > + regulator-enable-ramp-delay = <200>; > + regulator-allowed-modes = <0 1>; > + }; > + > + mt6366_vs2_reg: buck-vs2 { > + regulator-ramp-delay = <12500>; > + regulator-enable-ramp-delay = <0>; > + }; > + > + mt6366_vmodem_reg: buck-vmodem { > + regulator-ramp-delay = <6250>; > + regulator-enable-ramp-delay = <900>; > + regulator-allowed-modes = <0 1>; > + }; > + > + mt6366_vs1_reg: buck-vs1 { > + regulator-ramp-delay = <12500>; > + regulator-enable-ramp-delay = <0>; > + }; > + > + mt6366_vdram2_reg: ldo-vdram2 { > + regulator-enable-ramp-delay = <3300>; > + }; > + > + mt6366_vsim1_reg: ldo-vsim1 { > + regulator-enable-ramp-delay = <540>; > + }; > + > + mt6366_vibr_reg: ldo-vibr { > + regulator-enable-ramp-delay = <60>; > + }; > + > + mt6366_vrf12_reg: ldo-vrf12 { > + regulator-enable-ramp-delay = <120>; > + }; > + > + mt6366_vio18_reg: ldo-vio18 { > + regulator-enable-ramp-delay = <2700>; > + }; > + > + mt6366_vusb_reg: ldo-vusb { > + regulator-name = "vusb"; > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vcamio_reg: ldo-vcamio { > + regulator-enable-ramp-delay = <325>; > + }; > + > + mt6366_vcamd_reg: ldo-vcamd { > + regulator-enable-ramp-delay = <325>; > + }; > + > + mt6366_vcn18_reg: ldo-vcn18 { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vfe28_reg: ldo-vfe28 { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vsram_proc11_reg: ldo-vsram-proc11 { > + regulator-ramp-delay = <6250>; > + regulator-enable-ramp-delay = <240>; > + }; > + > + mt6366_vcn28_reg: ldo-vcn28 { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vsram_others_reg: ldo-vsram-others { > + regulator-ramp-delay = <6250>; > + regulator-enable-ramp-delay = <240>; > + }; > + > + mt6366_vsram_gpu_reg: ldo-vsram-gpu { > + regulator-ramp-delay = <6250>; > + regulator-enable-ramp-delay = <240>; > + }; > + > + mt6366_vxo22_reg: ldo-vxo22 { > + regulator-enable-ramp-delay = <120>; > + }; > + > + mt6366_vefuse_reg: ldo-vefuse { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vaux18_reg: ldo-vaux18 { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vmch_reg: ldo-vmch { > + regulator-enable-ramp-delay = <60>; > + }; > + > + mt6366_vbif28_reg: ldo-vbif28 { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vsram_proc12_reg: ldo-vsram-proc12 { > + regulator-ramp-delay = <6250>; > + regulator-enable-ramp-delay = <240>; > + }; > + > + mt6366_vcama1_reg: ldo-vcama1 { > + regulator-enable-ramp-delay = <325>; > + }; > + > + mt6366_vemc_reg: ldo-vemc { > + regulator-enable-ramp-delay = <60>; > + }; > + > + mt6366_vio28_reg: ldo-vio28 { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_va12_reg: ldo-va12 { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vrf18_reg: ldo-vrf18 { > + regulator-enable-ramp-delay = <120>; > + }; > + > + mt6366_vcn33_bt_reg: ldo-vcn33-bt { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vcn33_wifi_reg: ldo-vcn33-wifi { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vcama2_reg: ldo-vcama2 { > + regulator-enable-ramp-delay = <325>; > + }; > + > + mt6366_vmc_reg: ldo-vmc { > + regulator-enable-ramp-delay = <60>; > + }; > + > + mt6366_vldo28_reg: ldo-vldo28 { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vaud28_reg: ldo-vaud28 { > + regulator-enable-ramp-delay = <270>; > + }; > + > + mt6366_vsim2_reg: ldo-vsim2 { > + regulator-enable-ramp-delay = <540>; > + }; > + > + mt6366_vcore_sshub_reg: buck-vcore-sshub { Empty node? What does it do? Best regards, Krzysztof
On Tue, 2022-08-23 at 14:47 -0400, Nícolas F. R. A. Prado wrote: > On Tue, Aug 23, 2022 at 08:37:45PM +0800, Zhiyong Tao wrote: > > Add mt6366 regulator document > > > > Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com> > > --- > > [..] > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6366- > > regulator.yaml > > [..] > > + "^buck-(vcore)-sshub$": > > The parentheses here don't serve any purpose, so drop them. Hi nfrapardo, we will fix it in v5. > > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > [..] > > + "^ldo-vcn(33)-wifi$": > > Ditto. we will fix it in v5 > > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^ldo-vsram-(others)-sshub$": > > Ditto. we will fix it in v5 > > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > [..] > > + "^ldo-vsim[2]$": > > Based on the example, should be [12]. we will fix it in v5 Thanks > > Thanks, > Nícolas > > > + type: object > > [..] > > + mt6366_vsim1_reg: ldo-vsim1 { > > + regulator-enable-ramp-delay = <540>; > > + }; > > [..] > > + mt6366_vsim2_reg: ldo-vsim2 { > > + regulator-enable-ramp-delay = <540>; > > + }; > > [..]
On Wed, 2022-08-24 at 16:48 +0300, Krzysztof Kozlowski wrote: > On 23/08/2022 15:37, Zhiyong Tao wrote: > > Add mt6366 regulator document > > > > Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com> > > https://lore.kernel.org/all/3a26be5c-04c5-cd67-1154-dfd7d99fb5d0@linaro.org/ > > Where is the driver? Hi krzysztof, ==> The driver is included, You can see the file: https://elixir.bootlin.com/linux/v6.0-rc2/source/drivers/regulator/mt6358-regulator.c > > This ended up in spam folder, so you might need to fix up your setup > just like other folks in Mediatek did. > ==> we will try to fix it. > > --- > > Changes in patch v4: > > 1)Add unevaluatedProperties in all places > > 2)Fix check warning and errors > > 3)remove "compatible="regulator-fixed"" properties for some ldo > > > > Changes in patch v3: > > 1)change patch title > > 2)change "regulator.yaml#" to regulator.yaml# > > 3)remove regulator-name > > 4)fix 4 space for DTS example > > > > Changes in patch v2: > > 1)fix patch title description. > > 2)fix patch maintainer description. > > 3)won't cc to srv_heupstream@mediatek.com > > 4)fix patch commit message description. > > 5)add properties node and compatible > > 6)put "unevaluatedProperties: false" after $ref > > 7)remove underscores in node names. > > 8)change Filename to "mediatek,mt6366-regulator.yaml" > > [Zhiyong Tao <zhiyong.tao@mediatek.com>] > > --- > > --- > > .../regulator/mediatek,mt6366-regulator.yaml | 279 > > ++++++++++++++++++ > > 1 file changed, 279 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/regulator/mediatek,mt6366- > > regulator.yaml > > > > diff --git > > a/Documentation/devicetree/bindings/regulator/mediatek,mt6366- > > regulator.yaml > > b/Documentation/devicetree/bindings/regulator/mediatek,mt6366- > > regulator.yaml > > new file mode 100644 > > index 000000000000..8945bf20b574 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6366- > > regulator.yaml > > @@ -0,0 +1,279 @@ > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: > > https://urldefense.com/v3/__http://devicetree.org/schemas/regulator/mediatek,mt6366-regulator.yaml*__;Iw!!CTRNKA9wMg0ARbw!zfqocy5mKWyTKAejVLu3IZvaIy0NqTGM5T_myKrjADh1JovpafcfAhyTtLOTDhh6fpI$ > > > > +$schema: > > https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!zfqocy5mKWyTKAejVLu3IZvaIy0NqTGM5T_myKrjADh1JovpafcfAhyTtLOT82kIons$ > > > > + > > +title: MT6366 Regulator from MediaTek Integrated > > + > > +maintainers: > > + - Zhiyong Tao <zhiyong.tao@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. > > + > > +properties: > > + compatible: > > + const: mediatek,mt6366-regulator > > This looks incomplete. How does it bind? Further pieces also suggest > you > send something incomplete. ==> The project dts file(such as 8186-evb.dts) will add the compatible. The project dts file is examining. > > > + > > + regulators: > > + type: object > > + description: List of regulators and its properties > > + > > + patternProperties: > > + "^buck- > > v(dram1|core|coresshub|proc11|proc12|gpu|s2|modem|s1)$": > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^ldo-v(dram2|sim1|ibr|rf12|usb|camio|camd|cn18|fe28)$": > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^ldo-v(xo22|efuse|mch|vcama1|emc|a12|vcama2|mc)$": > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^buck-(vcore)-sshub$": > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^ldo-vcn(28|33)-bt$": > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^ldo-vcn(33)-wifi$": > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^ldo-vsram-(others)-sshub$": > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^ldo-vsram-(proc11|others|gpu|proc12)$": > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^ldo-v(aud|bif|io|ldo)28$": > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^ldo-v(io|aux|rf)18$": > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > + "^ldo-vsim[2]$": > > I have now doubts whether you define generic regulators or quite > specific regulators you have on your board... Are the names used in > the > device datasheet in register API description? ==>yes, the names is used in the device datasheet in register API description. We will add the regulator-name on project dts. > > > > + type: object > > + $ref: regulator.yaml# > > + unevaluatedProperties: false > > + > > +required: > > + - compatible > > + - regulators > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + pmic { > > + compatible = "mediatek,mt6366-regulator"; > > + > > + regulators { > > + mt6366_vdram1_reg: buck-vdram1 { > > Drop the labels here and further. Why you do not have here any > regular > constraints like min/max voltage? we will add properties min/max voltag on project dts file. > > > + regulator-ramp-delay = <12500>; > > + regulator-enable-ramp-delay = <0>; > > + regulator-allowed-modes = <0 1>; > > Where do you explain the meaning of modes? support pwm mode. > > > + }; > > + > > + mt6366_vcore_reg: buck-vcore { > > + regulator-ramp-delay = <6250>; > > + regulator-enable-ramp-delay = <200>; > > + regulator-allowed-modes = <0 1>; > > + }; > > + > > + mt6366_vproc11_reg: buck-vproc11 { > > + regulator-ramp-delay = <6250>; > > + regulator-enable-ramp-delay = <200>; > > + regulator-allowed-modes = <0 1>; > > + }; > > + > > + mt6366_vproc12_reg: buck-vproc12 { > > + regulator-ramp-delay = <6250>; > > + regulator-enable-ramp-delay = <200>; > > + regulator-allowed-modes = <0 1>; > > + }; > > + > > + mt6366_vgpu_reg: buck-vgpu { > > + regulator-ramp-delay = <6250>; > > + regulator-enable-ramp-delay = <200>; > > + regulator-allowed-modes = <0 1>; > > + }; > > + > > + mt6366_vs2_reg: buck-vs2 { > > + regulator-ramp-delay = <12500>; > > + regulator-enable-ramp-delay = <0>; > > + }; > > + > > + mt6366_vmodem_reg: buck-vmodem { > > + regulator-ramp-delay = <6250>; > > + regulator-enable-ramp-delay = <900>; > > + regulator-allowed-modes = <0 1>; > > + }; > > + > > + mt6366_vs1_reg: buck-vs1 { > > + regulator-ramp-delay = <12500>; > > + regulator-enable-ramp-delay = <0>; > > + }; > > + > > + mt6366_vdram2_reg: ldo-vdram2 { > > + regulator-enable-ramp-delay = <3300>; > > + }; > > + > > + mt6366_vsim1_reg: ldo-vsim1 { > > + regulator-enable-ramp-delay = <540>; > > + }; > > + > > + mt6366_vibr_reg: ldo-vibr { > > + regulator-enable-ramp-delay = <60>; > > + }; > > + > > + mt6366_vrf12_reg: ldo-vrf12 { > > + regulator-enable-ramp-delay = <120>; > > + }; > > + > > + mt6366_vio18_reg: ldo-vio18 { > > + regulator-enable-ramp-delay = <2700>; > > + }; > > + > > + mt6366_vusb_reg: ldo-vusb { > > + regulator-name = "vusb"; > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vcamio_reg: ldo-vcamio { > > + regulator-enable-ramp-delay = <325>; > > + }; > > + > > + mt6366_vcamd_reg: ldo-vcamd { > > + regulator-enable-ramp-delay = <325>; > > + }; > > + > > + mt6366_vcn18_reg: ldo-vcn18 { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vfe28_reg: ldo-vfe28 { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vsram_proc11_reg: ldo-vsram-proc11 { > > + regulator-ramp-delay = <6250>; > > + regulator-enable-ramp-delay = <240>; > > + }; > > + > > + mt6366_vcn28_reg: ldo-vcn28 { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vsram_others_reg: ldo-vsram-others { > > + regulator-ramp-delay = <6250>; > > + regulator-enable-ramp-delay = <240>; > > + }; > > + > > + mt6366_vsram_gpu_reg: ldo-vsram-gpu { > > + regulator-ramp-delay = <6250>; > > + regulator-enable-ramp-delay = <240>; > > + }; > > + > > + mt6366_vxo22_reg: ldo-vxo22 { > > + regulator-enable-ramp-delay = <120>; > > + }; > > + > > + mt6366_vefuse_reg: ldo-vefuse { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vaux18_reg: ldo-vaux18 { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vmch_reg: ldo-vmch { > > + regulator-enable-ramp-delay = <60>; > > + }; > > + > > + mt6366_vbif28_reg: ldo-vbif28 { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vsram_proc12_reg: ldo-vsram-proc12 { > > + regulator-ramp-delay = <6250>; > > + regulator-enable-ramp-delay = <240>; > > + }; > > + > > + mt6366_vcama1_reg: ldo-vcama1 { > > + regulator-enable-ramp-delay = <325>; > > + }; > > + > > + mt6366_vemc_reg: ldo-vemc { > > + regulator-enable-ramp-delay = <60>; > > + }; > > + > > + mt6366_vio28_reg: ldo-vio28 { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_va12_reg: ldo-va12 { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vrf18_reg: ldo-vrf18 { > > + regulator-enable-ramp-delay = <120>; > > + }; > > + > > + mt6366_vcn33_bt_reg: ldo-vcn33-bt { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vcn33_wifi_reg: ldo-vcn33-wifi { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vcama2_reg: ldo-vcama2 { > > + regulator-enable-ramp-delay = <325>; > > + }; > > + > > + mt6366_vmc_reg: ldo-vmc { > > + regulator-enable-ramp-delay = <60>; > > + }; > > + > > + mt6366_vldo28_reg: ldo-vldo28 { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vaud28_reg: ldo-vaud28 { > > + regulator-enable-ramp-delay = <270>; > > + }; > > + > > + mt6366_vsim2_reg: ldo-vsim2 { > > + regulator-enable-ramp-delay = <540>; > > + }; > > + > > + mt6366_vcore_sshub_reg: buck-vcore-sshub { > > Empty node? What does it do? just define here, we will add properties on project dts file. Thanks > > > > Best regards, > Krzysztof
On 29/08/2022 06:25, zhiyong.tao wrote: >>> +properties: >>> + compatible: >>> + const: mediatek,mt6366-regulator >> >> This looks incomplete. How does it bind? Further pieces also suggest >> you >> send something incomplete. > ==> > > The project dts file(such as 8186-evb.dts) will add the compatible. > The project dts file is examining. > I don't understand this at all. I am not talking about DTS, but about bindings which look incomplete. Although seeing entire DTS would probably help understand the context. (...) >> >> >>> + type: object >>> + $ref: regulator.yaml# >>> + unevaluatedProperties: false >>> + >>> +required: >>> + - compatible >>> + - regulators >>> + >>> +additionalProperties: false >>> + >>> +examples: >>> + - | >>> + pmic { >>> + compatible = "mediatek,mt6366-regulator"; >>> + >>> + regulators { >>> + mt6366_vdram1_reg: buck-vdram1 { >> >> Drop the labels here and further. Why you do not have here any >> regular >> constraints like min/max voltage? > > we will add properties min/max voltag on project dts file. Example should be complete. DTS does not matter here. > >> >>> + regulator-ramp-delay = <12500>; >>> + regulator-enable-ramp-delay = <0>; >>> + regulator-allowed-modes = <0 1>; >> >> Where do you explain the meaning of modes? > support pwm mode. The question was "Where". Where did you explain them? (...) >>> + >>> + mt6366_vsim2_reg: ldo-vsim2 { >>> + regulator-enable-ramp-delay = <540>; >>> + }; >>> + >>> + mt6366_vcore_sshub_reg: buck-vcore-sshub { >> >> Empty node? What does it do? > just define here, we will add properties on project dts file. How is it related to bindings? Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6366-regulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6366-regulator.yaml new file mode 100644 index 000000000000..8945bf20b574 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6366-regulator.yaml @@ -0,0 +1,279 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/mediatek,mt6366-regulator.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MT6366 Regulator from MediaTek Integrated + +maintainers: + - Zhiyong Tao <zhiyong.tao@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. + +properties: + compatible: + const: mediatek,mt6366-regulator + + regulators: + type: object + description: List of regulators and its properties + + patternProperties: + "^buck-v(dram1|core|coresshub|proc11|proc12|gpu|s2|modem|s1)$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo-v(dram2|sim1|ibr|rf12|usb|camio|camd|cn18|fe28)$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo-v(xo22|efuse|mch|vcama1|emc|a12|vcama2|mc)$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^buck-(vcore)-sshub$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo-vcn(28|33)-bt$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo-vcn(33)-wifi$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo-vsram-(others)-sshub$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo-vsram-(proc11|others|gpu|proc12)$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo-v(aud|bif|io|ldo)28$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo-v(io|aux|rf)18$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo-vsim[2]$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + +required: + - compatible + - regulators + +additionalProperties: false + +examples: + - | + pmic { + compatible = "mediatek,mt6366-regulator"; + + regulators { + mt6366_vdram1_reg: buck-vdram1 { + regulator-ramp-delay = <12500>; + regulator-enable-ramp-delay = <0>; + regulator-allowed-modes = <0 1>; + }; + + mt6366_vcore_reg: buck-vcore { + regulator-ramp-delay = <6250>; + regulator-enable-ramp-delay = <200>; + regulator-allowed-modes = <0 1>; + }; + + mt6366_vproc11_reg: buck-vproc11 { + regulator-ramp-delay = <6250>; + regulator-enable-ramp-delay = <200>; + regulator-allowed-modes = <0 1>; + }; + + mt6366_vproc12_reg: buck-vproc12 { + regulator-ramp-delay = <6250>; + regulator-enable-ramp-delay = <200>; + regulator-allowed-modes = <0 1>; + }; + + mt6366_vgpu_reg: buck-vgpu { + regulator-ramp-delay = <6250>; + regulator-enable-ramp-delay = <200>; + regulator-allowed-modes = <0 1>; + }; + + mt6366_vs2_reg: buck-vs2 { + regulator-ramp-delay = <12500>; + regulator-enable-ramp-delay = <0>; + }; + + mt6366_vmodem_reg: buck-vmodem { + regulator-ramp-delay = <6250>; + regulator-enable-ramp-delay = <900>; + regulator-allowed-modes = <0 1>; + }; + + mt6366_vs1_reg: buck-vs1 { + regulator-ramp-delay = <12500>; + regulator-enable-ramp-delay = <0>; + }; + + mt6366_vdram2_reg: ldo-vdram2 { + regulator-enable-ramp-delay = <3300>; + }; + + mt6366_vsim1_reg: ldo-vsim1 { + regulator-enable-ramp-delay = <540>; + }; + + mt6366_vibr_reg: ldo-vibr { + regulator-enable-ramp-delay = <60>; + }; + + mt6366_vrf12_reg: ldo-vrf12 { + regulator-enable-ramp-delay = <120>; + }; + + mt6366_vio18_reg: ldo-vio18 { + regulator-enable-ramp-delay = <2700>; + }; + + mt6366_vusb_reg: ldo-vusb { + regulator-name = "vusb"; + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vcamio_reg: ldo-vcamio { + regulator-enable-ramp-delay = <325>; + }; + + mt6366_vcamd_reg: ldo-vcamd { + regulator-enable-ramp-delay = <325>; + }; + + mt6366_vcn18_reg: ldo-vcn18 { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vfe28_reg: ldo-vfe28 { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vsram_proc11_reg: ldo-vsram-proc11 { + regulator-ramp-delay = <6250>; + regulator-enable-ramp-delay = <240>; + }; + + mt6366_vcn28_reg: ldo-vcn28 { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vsram_others_reg: ldo-vsram-others { + regulator-ramp-delay = <6250>; + regulator-enable-ramp-delay = <240>; + }; + + mt6366_vsram_gpu_reg: ldo-vsram-gpu { + regulator-ramp-delay = <6250>; + regulator-enable-ramp-delay = <240>; + }; + + mt6366_vxo22_reg: ldo-vxo22 { + regulator-enable-ramp-delay = <120>; + }; + + mt6366_vefuse_reg: ldo-vefuse { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vaux18_reg: ldo-vaux18 { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vmch_reg: ldo-vmch { + regulator-enable-ramp-delay = <60>; + }; + + mt6366_vbif28_reg: ldo-vbif28 { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vsram_proc12_reg: ldo-vsram-proc12 { + regulator-ramp-delay = <6250>; + regulator-enable-ramp-delay = <240>; + }; + + mt6366_vcama1_reg: ldo-vcama1 { + regulator-enable-ramp-delay = <325>; + }; + + mt6366_vemc_reg: ldo-vemc { + regulator-enable-ramp-delay = <60>; + }; + + mt6366_vio28_reg: ldo-vio28 { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_va12_reg: ldo-va12 { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vrf18_reg: ldo-vrf18 { + regulator-enable-ramp-delay = <120>; + }; + + mt6366_vcn33_bt_reg: ldo-vcn33-bt { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vcn33_wifi_reg: ldo-vcn33-wifi { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vcama2_reg: ldo-vcama2 { + regulator-enable-ramp-delay = <325>; + }; + + mt6366_vmc_reg: ldo-vmc { + regulator-enable-ramp-delay = <60>; + }; + + mt6366_vldo28_reg: ldo-vldo28 { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vaud28_reg: ldo-vaud28 { + regulator-enable-ramp-delay = <270>; + }; + + mt6366_vsim2_reg: ldo-vsim2 { + regulator-enable-ramp-delay = <540>; + }; + + mt6366_vcore_sshub_reg: buck-vcore-sshub { + }; + + mt6366_vsram_others_sshub_reg: ldo-vsram-others-sshub { + }; + }; + }; +...
Add mt6366 regulator document Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com> --- Changes in patch v4: 1)Add unevaluatedProperties in all places 2)Fix check warning and errors 3)remove "compatible="regulator-fixed"" properties for some ldo Changes in patch v3: 1)change patch title 2)change "regulator.yaml#" to regulator.yaml# 3)remove regulator-name 4)fix 4 space for DTS example Changes in patch v2: 1)fix patch title description. 2)fix patch maintainer description. 3)won't cc to srv_heupstream@mediatek.com 4)fix patch commit message description. 5)add properties node and compatible 6)put "unevaluatedProperties: false" after $ref 7)remove underscores in node names. 8)change Filename to "mediatek,mt6366-regulator.yaml" [Zhiyong Tao <zhiyong.tao@mediatek.com>] --- --- .../regulator/mediatek,mt6366-regulator.yaml | 279 ++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt6366-regulator.yaml