[PATCHv2 1/3] dt-bindings: net: wireless: ath9k: add led bindings

Rosen Penev posted 3 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCHv2 1/3] dt-bindings: net: wireless: ath9k: add led bindings
Posted by Rosen Penev 1 month, 3 weeks ago
The ath9k driver has various pin GPIO numbers for different chipsets
which are not always correct for every device.

Add bindings to specify the correct number and if it should be
active-low.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 .../bindings/net/wireless/qca,ath9k.yaml           | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
index d16ca8e0a25d..e701046146f2 100644
--- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
@@ -50,6 +50,17 @@ properties:
 
   ieee80211-freq-limit: true
 
+  led:
+    type: object
+    properties:
+      reg:
+        maxItems: 1
+
+      led-active-low:
+        description:
+          LED is enabled with ground signal.
+        type: boolean
+
   qca,no-eeprom:
     $ref: /schemas/types.yaml#/definitions/flag
     description:
@@ -102,5 +113,8 @@ examples:
         compatible = "qca,ar9130-wifi";
         reg = <0x180c0000 0x230000>;
         interrupts = <2>;
+        led {
+          led-sources = <0>;
+        };
       };
     };
-- 
2.50.1
Re: [PATCHv2 1/3] dt-bindings: net: wireless: ath9k: add led bindings
Posted by Krzysztof Kozlowski 1 month, 3 weeks ago
On 12/08/2025 21:23, Rosen Penev wrote:
> The ath9k driver has various pin GPIO numbers for different chipsets
> which are not always correct for every device.
> 
> Add bindings to specify the correct number and if it should be
> active-low.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  .../bindings/net/wireless/qca,ath9k.yaml           | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> index d16ca8e0a25d..e701046146f2 100644
> --- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> @@ -50,6 +50,17 @@ properties:
>  
>    ieee80211-freq-limit: true
>  
> +  led:
> +    type: object

Each node must end with additional/unevaluatedProperties: false. See
example schema and writing schema.

That will probably lead you to missing LED common binding.

> +    properties:
> +      reg:
> +        maxItems: 1
> +
> +      led-active-low:
> +        description:
> +          LED is enabled with ground signal.

Aren't you redefining existing properties?

> +        type: boolean
> +
>    qca,no-eeprom:
>      $ref: /schemas/types.yaml#/definitions/flag
>      description:
> @@ -102,5 +113,8 @@ examples:
>          compatible = "qca,ar9130-wifi";
>          reg = <0x180c0000 0x230000>;
>          interrupts = <2>;
> +        led {
> +          led-sources = <0>;

Totally confusing with schema. active-low in one place, different
property in the example and no source for that property at all :/


Best regards,
Krzysztof
Re: [PATCHv2 1/3] dt-bindings: net: wireless: ath9k: add led bindings
Posted by Rosen Penev 1 month, 3 weeks ago
On Wed, Aug 13, 2025 at 1:16 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 12/08/2025 21:23, Rosen Penev wrote:
> > The ath9k driver has various pin GPIO numbers for different chipsets
> > which are not always correct for every device.
> >
> > Add bindings to specify the correct number and if it should be
> > active-low.
> >
> > Signed-off-by: Rosen Penev <rosenp@gmail.com>
> > ---
> >  .../bindings/net/wireless/qca,ath9k.yaml           | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> > index d16ca8e0a25d..e701046146f2 100644
> > --- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> > +++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> > @@ -50,6 +50,17 @@ properties:
> >
> >    ieee80211-freq-limit: true
> >
> > +  led:
> > +    type: object
>
> Each node must end with additional/unevaluatedProperties: false. See
> example schema and writing schema.
>
> That will probably lead you to missing LED common binding.

>
> > +    properties:
> > +      reg:
> > +        maxItems: 1
> > +
> > +      led-active-low:
> > +        description:
> > +          LED is enabled with ground signal.
>
> Aren't you redefining existing properties?
I don't think led-active-low is specified in any central location:

Documentation/devicetree/bindings/leds/irled/ir-spi-led.yaml:  led-active-low:
Documentation/devicetree/bindings/leds/irled/ir-spi-led.yaml:
  led-active-low;
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml:
 led-active-low:
Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml:
led-active-low:
Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml:
 led-active-low;
>
> > +        type: boolean
> > +
> >    qca,no-eeprom:
> >      $ref: /schemas/types.yaml#/definitions/flag
> >      description:
> > @@ -102,5 +113,8 @@ examples:
> >          compatible = "qca,ar9130-wifi";
> >          reg = <0x180c0000 0x230000>;
> >          interrupts = <2>;
> > +        led {
> > +          led-sources = <0>;
>
> Totally confusing with schema. active-low in one place, different
> property in the example and no source for that property at all :/
Ah right. Will fix.
>
>
> Best regards,
> Krzysztof
Re: [PATCHv2 1/3] dt-bindings: net: wireless: ath9k: add led bindings
Posted by Krzysztof Kozlowski 1 month, 3 weeks ago
On Wed, Aug 13, 2025 at 04:04:27PM -0700, Rosen Penev wrote:
> On Wed, Aug 13, 2025 at 1:16 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > On 12/08/2025 21:23, Rosen Penev wrote:
> > > The ath9k driver has various pin GPIO numbers for different chipsets
> > > which are not always correct for every device.
> > >
> > > Add bindings to specify the correct number and if it should be
> > > active-low.
> > >
> > > Signed-off-by: Rosen Penev <rosenp@gmail.com>
> > > ---
> > >  .../bindings/net/wireless/qca,ath9k.yaml           | 14 ++++++++++++++
> > >  1 file changed, 14 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> > > index d16ca8e0a25d..e701046146f2 100644
> > > --- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> > > +++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> > > @@ -50,6 +50,17 @@ properties:
> > >
> > >    ieee80211-freq-limit: true
> > >
> > > +  led:
> > > +    type: object
> >
> > Each node must end with additional/unevaluatedProperties: false. See
> > example schema and writing schema.
> >
> > That will probably lead you to missing LED common binding.
> 
> >
> > > +    properties:
> > > +      reg:
> > > +        maxItems: 1
> > > +
> > > +      led-active-low:
> > > +        description:
> > > +          LED is enabled with ground signal.
> >
> > Aren't you redefining existing properties?
> I don't think led-active-low is specified in any central location:

True, because it is active-low which you could easily find if you opened
and read the LED binding you were already referencing here.

Best regards,
Krzysztof