diff mbox series

[v16,3/9] dt-bindings: pwm: qcom,ipq6018-pwm: Add compatible for ipq5018

Message ID 20251001-ipq-pwm-v16-3-300f237e0e68@outlook.com
State Superseded
Headers show
Series Add PWM support for IPQ chipsets | expand

Commit Message

George Moussalem via B4 Relay Oct. 1, 2025, 2:04 p.m. UTC
From: George Moussalem <george.moussalem@outlook.com>

The IPQ5018 SoC contains a PWM block which is exactly the same as the
one found in IPQ6018. So let's add a compatible for IPQ5018 and use
IPQ6018 as the fallback.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
---
 Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

George Moussalem Oct. 5, 2025, 5:07 p.m. UTC | #1
Hi Krzysztof, Rob,

Since I have to submit another version anyways, I was thinking of
changing from a fallback compatible to a list of enums but wanted to get
your guidance on this. The driver needs not distinguish between the SoCs
and no SoC specific match data is needed. Would you prefer as proposed
in below patch or switch to enumerating them in the bindings and in the
driver?

On 10/1/25 18:04, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@outlook.com>
> 
> The IPQ5018 SoC contains a PWM block which is exactly the same as the
> one found in IPQ6018. So let's add a compatible for IPQ5018 and use
> IPQ6018 as the fallback.
> 
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
>  Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> index 1172f0b53fadc140482f9384a36020260df372b7..acbdd952fcca53368e3b594544df8d3dae8a06b3 100644
> --- a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> +++ b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> @@ -11,7 +11,12 @@ maintainers:
>  
>  properties:
>    compatible:
> -    const: qcom,ipq6018-pwm
> +    oneOf:
> +      - items:
> +          - enum:
> +              - qcom,ipq5018-pwm
> +          - const: qcom,ipq6018-pwm
> +      - const: qcom,ipq6018-pwm
>  
>    reg:
>      maxItems: 1
> 

Best regards,
George
Rob Herring (Arm) Oct. 8, 2025, 1:31 p.m. UTC | #2
On Sun, Oct 05, 2025 at 09:07:39PM +0400, George Moussalem wrote:
> Hi Krzysztof, Rob,
> 
> Since I have to submit another version anyways, I was thinking of
> changing from a fallback compatible to a list of enums but wanted to get
> your guidance on this. The driver needs not distinguish between the SoCs
> and no SoC specific match data is needed. Would you prefer as proposed
> in below patch or switch to enumerating them in the bindings and in the
> driver?

If the block is "the same" in newer versions as you said, then a 
fallback is the correct choice. No match data or the same match data is 
another clue.

Rob

> 
> On 10/1/25 18:04, George Moussalem via B4 Relay wrote:
> > From: George Moussalem <george.moussalem@outlook.com>
> > 
> > The IPQ5018 SoC contains a PWM block which is exactly the same as the
> > one found in IPQ6018. So let's add a compatible for IPQ5018 and use
> > IPQ6018 as the fallback.
> > 
> > Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> > ---
> >  Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> > index 1172f0b53fadc140482f9384a36020260df372b7..acbdd952fcca53368e3b594544df8d3dae8a06b3 100644
> > --- a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
> > @@ -11,7 +11,12 @@ maintainers:
> >  
> >  properties:
> >    compatible:
> > -    const: qcom,ipq6018-pwm
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - qcom,ipq5018-pwm
> > +          - const: qcom,ipq6018-pwm
> > +      - const: qcom,ipq6018-pwm
> >  
> >    reg:
> >      maxItems: 1
> > 
> 
> Best regards,
> George
Rob Herring (Arm) Oct. 8, 2025, 1:31 p.m. UTC | #3
On Wed, 01 Oct 2025 18:04:19 +0400, George Moussalem wrote:
> The IPQ5018 SoC contains a PWM block which is exactly the same as the
> one found in IPQ6018. So let's add a compatible for IPQ5018 and use
> IPQ6018 as the fallback.
> 
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
>  Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
index 1172f0b53fadc140482f9384a36020260df372b7..acbdd952fcca53368e3b594544df8d3dae8a06b3 100644
--- a/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
+++ b/Documentation/devicetree/bindings/pwm/qcom,ipq6018-pwm.yaml
@@ -11,7 +11,12 @@  maintainers:
 
 properties:
   compatible:
-    const: qcom,ipq6018-pwm
+    oneOf:
+      - items:
+          - enum:
+              - qcom,ipq5018-pwm
+          - const: qcom,ipq6018-pwm
+      - const: qcom,ipq6018-pwm
 
   reg:
     maxItems: 1