dt-bindings: pwm: mxs: Document fsl,imx28-pwm
Subsystems (3)
Fabio Estevam
reviewerPATCH 1/3 dt-bindings: pwm: mxs: Document fsl,imx28-pwm
From: Fabio Estevam <[email protected]>
imx28 uses the same PWM block that is found on imx23.
Add an entry for fsl,imx28-pwm.
--- Documentation/devicetree/bindings/pwm/mxs-pwm.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/pwm/mxs-pwm.yaml +6 -2
@@ -15,8 +15,12 @@ allOf: properties: compatible: - enum: - - fsl,imx23-pwm + oneOf: + - const: fsl,imx23-pwm + - items: + - enum: + - fsl,imx28-pwm + - const: fsl,imx23-pwm reg: maxItems: 1
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 2/3 dt-bindings: pwm: mxs: Document the clocks property
From: Fabio Estevam <[email protected]>
The 'clocks' property is mandatory for the PWM to operate.
Document it.
--- Documentation/devicetree/bindings/pwm/mxs-pwm.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/pwm/mxs-pwm.yaml +5 -0
@@ -25,6 +25,9 @@ properties: reg: maxItems: 1 + clocks: + maxItems: 1 + "#pwm-cells": const: 3
@@ -35,6 +38,7 @@ properties: required: - compatible - reg + - clocks - fsl,pwm-number additionalProperties: false
@@ -44,6 +48,7 @@ examples: pwm@80064000 { compatible = "fsl,imx23-pwm"; reg = <0x80064000 0x2000>; + clocks = <&clks 30>; #pwm-cells = <3>; fsl,pwm-number = <8>; };
Signature · 1 line
2.34.1
Re: [PATCH 2/3] dt-bindings: pwm: mxs: Document the clocks property
Hello,
Quoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
The 'clocks' property is mandatory for the PWM to operate.
Document it.
Indeed the driver does:
mxs->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(mxs->clk))
return PTR_ERR(mxs->clk);so this is in line with the implementation.
Thanks
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
Re: [PATCH 2/3] dt-bindings: pwm: mxs: Document the clocks property
In reply to Fabio EstevamQuoted 5 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
The 'clocks' property is mandatory for the PWM to operate.
Document it.
Thanks,
Conor.
Quoted 39 lines
Signed-off-by Fabio Estevam <[email protected]>--- Documentation/devicetree/bindings/pwm/mxs-pwm.yaml | 5 +++++ 1 file changed, 5 insertions(+)Documentation/devicetree/bindings/pwm/mxs-pwm.yaml +5
-0@@ -25,6 +25,9 @@ properties: reg: maxItems: 1 + clocks: + maxItems: 1 + "#pwm-cells": const: 3@@ -35,6 +38,7 @@ properties: required: - compatible - reg + - clocks - fsl,pwm-number additionalProperties: false@@ -44,6 +48,7 @@ examples: pwm@80064000 { compatible = "fsl,imx23-pwm"; reg = <0x80064000 0x2000>; + clocks = <&clks 30>; #pwm-cells = <3>; fsl,pwm-number = <8>; };Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 3/3 dt-bindings: pwm: mxs: Allow passing #pwm-cells = <2>
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
All the in-tree imx23 and imx28 devicetrees use #pwm-cells = <2>.
Allow it in the schema to avoid warnings.
It is still possible for a devicetree to pass the third cell with the PWM polarity though.
This is similar to imx-pwm.yaml that allows #pwm-cells to be 2 or 3.
--- Documentation/devicetree/bindings/pwm/mxs-pwm.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/pwm/mxs-pwm.yaml +3 -1
@@ -29,7 +29,9 @@ properties: maxItems: 1 "#pwm-cells": - const: 3 + enum: + - 2 + - 3 fsl,pwm-number: $ref: /schemas/types.yaml#/definitions/uint32
Signature · 1 line
2.34.1
Re: [PATCH 3/3] dt-bindings: pwm: mxs: Allow passing #pwm-cells = <2>
Hello Fabio,
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
All the in-tree imx23 and imx28 devicetrees use #pwm-cells = <2>.
Allow it in the schema to avoid warnings.
It is still possible for a devicetree to pass the third cell with the PWM polarity though.
This is similar to
imx-pwm.yamlthat allows #pwm-cells to be 2 or 3.
Alternatively switch all devicetrees to use = <3>? That's what I'd prefer given that the PWM supports both polarities.
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
Re: [PATCH 3/3] dt-bindings: pwm: mxs: Allow passing #pwm-cells = <2>
Quoted 9 lines · Uwe Kleine-König
Hello Fabio,
Quoted 6 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
All the in-tree imx23 and imx28 devicetrees use #pwm-cells = <2>.
Allow it in the schema to avoid warnings.
Quoted 7 lines
Quoted 4 lines
It is still possible for a devicetree to pass the third cell with the PWM polarity though.
This is similar to
imx-pwm.yamlthat allows #pwm-cells to be 2 or 3.Alternatively switch all devicetrees to use = <3>? That's what I'd prefer given that the PWM supports both polarities.
Technically, that could break older clients predating 3 cell support. But maybe that's far back enough now to not care. Either way,
Quoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
imx28 uses the same PWM block that is found on imx23.
Add an entry for fsl,imx28-pwm.
Signed-off-by Fabio Estevam <[email protected]>
Thanks,
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |