On Wed, Aug 23, 2023 at 3:47 AM Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx> wrote: > > On 22/08/2023 10:45, Chen-Yu Tsai wrote: > > Convert this from the old style text based binding to the new DT schema > > style. This will make adding the MT6366 portion easier. > > > > The examples have been trimmed down considerably, and the remaining > > entries now match what is seen in actual device trees. > > ... > > > +--- > > +$id: http://devicetree.org/schemas/regulator/mediatek,mt6358-regulator.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: MediaTek MT6358 Regulator > > + > > +maintainers: > > + - Zhiyong Tao <zhiyong.tao@xxxxxxxxxxxx> > > + > > +description: | > > Do not need '|' unless you need to preserve formatting. Ack. > > + Regulator node of the PMIC. This node should under the PMIC's device node. > > + All voltage regulators provided by the PMIC are described as sub-nodes of > > + this node. > > + > > +properties: > > + compatible: > > + const: mediatek,mt6358-regulator > > + > ... > > > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/regulator/mediatek,mt6397-regulator.h> > > mt6397? > > > + > > + regulator { > > + compatible = "mediatek,mt6358-regulator"; > > + > > + buck_vgpu { > > + regulator-name = "vgpu"; > > + regulator-min-microvolt = <625000>; > > + regulator-max-microvolt = <900000>; > > + regulator-ramp-delay = <6250>; > > + regulator-enable-ramp-delay = <200>; > > + regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO > > mt6397? > > Both cases look a bit confusing. There's only two regulator binding header files, mt6397 and mt6360. They seem to correspond to the two classes of PMICs that MediaTek has. I believe the two header files and thus the macros are meant to be shared? MT6397 and co refer to their AP PMICs, i.e. PMICs that are companion chips to the SoC and provide most of the power rails a system needs, along with things like RTC, audio codecs, etc.. The MT6358 and MT6366 belong to this class. MT6360 and possibly others refer to their charger PMICs, which integrate a battery charger, USB type-C PD stuff, LED drivers, and a handful of regulators. ChenYu