Message ID | 8be1626f970c9fab8b50ae9ad45e0ddd88fa36bf.1747409892.git.samuel.kayode@savoirfairelinux.com |
---|---|
State | New |
Headers | show |
Series | add support for pf1550 PMIC MFD-based drivers | expand |
On 16/05/2025 20:53, Samuel Kayode wrote: > Add a DT binding document for pf1550 PMIC. This describes the core mfd > device. > > Signed-off-by: Samuel Kayode <samuel.kayode@savoirfairelinux.com> You need to explain the dependencies in the cover letter. There is nothing there but you have clear dependency and all bindings must go via one tree, unless you re-do this to use compatibles. > --- > .../devicetree/bindings/mfd/pf1550.yaml | 122 ++++++++++++++++++ Same comments. > 1 file changed, 122 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/pf1550.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/pf1550.yaml b/Documentation/devicetree/bindings/mfd/pf1550.yaml > new file mode 100644 > index 000000000000..461bc13513eb > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/pf1550.yaml > @@ -0,0 +1,122 @@ > +# SPDX-License-Identifier: GPL-2.0 No. Please run scripts/checkpatch.pl on the patches and fix reported warnings. After that, run also 'scripts/checkpatch.pl --strict' on the patches and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear. <form letter> Please use scripts/get_maintainers.pl to get a list of necessary people and lists to CC. It might happen, that command when run on an older kernel, gives you outdated entries. Therefore please be sure you base your patches on recent Linux kernel. Tools like b4 or scripts/get_maintainer.pl provide you proper list of people, so fix your workflow. Tools might also fail if you work on some ancient tree (don't, instead use mainline) or work on fork of kernel (don't, instead use mainline). Just use b4 and everything should be fine, although remember about `b4 prep --auto-to-cc` if you added new patches to the patchset. You missed at least devicetree list (maybe more), so this won't be tested by automated tooling. Performing review on untested code might be a waste of time. Please kindly resend and include all necessary To/Cc entries. </form letter> > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/pf1550.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: PF1550 low power PMIC from NXP. Same comments > + > +maintainers: > + - Samuel Kayode <samuel.kayode@savoirfairelinux.com> > + > +description: | > + PF1550 is a low power PMIC providing battery charging and power supply for > + low power IoT and wearable applications. > + > + For device-tree bindings of other sub-modules (regulator, power supply and > + onkey) refer to the binding documents under the respective sub-system > + directories. > + > +properties: > + compatible: > + const: fsl,pf1550 > + > + reg: > + description: > + I2C device address. Drop > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + regulators: > + $ref: /schemas/regulator/pf1550.yaml > + > + charger: > + $ref: /schemas/power/supply/pf1550_charger.yaml > + > + onkey: > + $ref: /schemas/input/pf1550_onkey.yaml This makes merging via separate trees not possible... Just fold everything here, drop compatibles and then put binding in the regulator. Unless children are re-usable which would justify compatibles, but then please provide arguments for that. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/mfd/pf1550.yaml b/Documentation/devicetree/bindings/mfd/pf1550.yaml new file mode 100644 index 000000000000..461bc13513eb --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/pf1550.yaml @@ -0,0 +1,122 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/pf1550.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PF1550 low power PMIC from NXP. + +maintainers: + - Samuel Kayode <samuel.kayode@savoirfairelinux.com> + +description: | + PF1550 is a low power PMIC providing battery charging and power supply for + low power IoT and wearable applications. + + For device-tree bindings of other sub-modules (regulator, power supply and + onkey) refer to the binding documents under the respective sub-system + directories. + +properties: + compatible: + const: fsl,pf1550 + + reg: + description: + I2C device address. + maxItems: 1 + + interrupts: + maxItems: 1 + + regulators: + $ref: /schemas/regulator/pf1550.yaml + + charger: + $ref: /schemas/power/supply/pf1550_charger.yaml + + onkey: + $ref: /schemas/input/pf1550_onkey.yaml + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/input/linux-event-codes.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@8 { + compatible = "fsl,pf1550"; + reg = <0x8>; + + interrupt-parent = <&gpio1>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; + + onkey { + compatible = "fsl,pf1550-onkey"; + linux,keycodes = <KEY_POWER>; + }; + + charger { + compatible = "fsl,pf1550-charger"; + + fsl,min-system-microvolt = <3700000>; + fsl,thermal-regulation = <75>; + }; + + regulators { + compatible = "fsl,pf1550-regulator"; + + sw1_reg: SW1 { + regulator-name = "SW1"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1387500>; + regulator-always-on; + regulator-ramp-delay = <6250>; + }; + + sw2_reg: SW2 { + regulator-name = "SW2"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1387500>; + regulator-always-on; + }; + + sw3_reg: SW3 { + regulator-name = "SW3"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vldo1_reg: LDO1 { + regulator-name = "LDO1"; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vldo2_reg: LDO2 { + regulator-name = "LDO2"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vldo3_reg: LDO3 { + regulator-name = "LDO3"; + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; + }; + };
Add a DT binding document for pf1550 PMIC. This describes the core mfd device. Signed-off-by: Samuel Kayode <samuel.kayode@savoirfairelinux.com> --- .../devicetree/bindings/mfd/pf1550.yaml | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/pf1550.yaml