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

Rosen Penev posted 3 patches 1 month, 1 week ago
There is a newer version of this series
[PATCHv3 1/3] dt-bindings: net: wireless: ath9k: add led bindings
Posted by Rosen Penev 1 month, 1 week 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         | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
index d16ca8e0a25d..bbac017d34d0 100644
--- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
+++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
@@ -50,6 +50,18 @@ properties:
 
   ieee80211-freq-limit: true
 
+  led:
+    type: object
+    additionalProperties: false
+    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 +114,9 @@ examples:
         compatible = "qca,ar9130-wifi";
         reg = <0x180c0000 0x230000>;
         interrupts = <2>;
+        led {
+          reg = <0>;
+          led-active-low;
+        };
       };
     };
-- 
2.50.1
Re: [PATCHv3 1/3] dt-bindings: net: wireless: ath9k: add led bindings
Posted by Rob Herring (Arm) 1 month, 1 week ago
On Sun, 24 Aug 2025 21:48:10 -0700, 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         | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/net/wireless/qca,ath9k.example.dts:92.15-25: Warning (reg_format): /example-2/ahb/wifi@180c0000/led:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Documentation/devicetree/bindings/net/wireless/qca,ath9k.example.dts:91.17-94.15: Warning (unit_address_vs_reg): /example-2/ahb/wifi@180c0000/led: node has a reg or ranges property, but no unit name
Documentation/devicetree/bindings/net/wireless/qca,ath9k.example.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/net/wireless/qca,ath9k.example.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/net/wireless/qca,ath9k.example.dtb: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/net/wireless/qca,ath9k.example.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/net/wireless/qca,ath9k.example.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/net/wireless/qca,ath9k.example.dts:91.17-94.15: Warning (avoid_default_addr_size): /example-2/ahb/wifi@180c0000/led: Relying on default #address-cells value
Documentation/devicetree/bindings/net/wireless/qca,ath9k.example.dts:91.17-94.15: Warning (avoid_default_addr_size): /example-2/ahb/wifi@180c0000/led: Relying on default #size-cells value
Documentation/devicetree/bindings/net/wireless/qca,ath9k.example.dtb: Warning (unique_unit_address_if_enabled): Failed prerequisite 'avoid_default_addr_size'

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250825044812.1575524-2-rosenp@gmail.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Re: [PATCHv3 1/3] dt-bindings: net: wireless: ath9k: add led bindings
Posted by Conor Dooley 1 month, 1 week ago
On Sun, Aug 24, 2025 at 09:48:10PM -0700, 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         | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> index d16ca8e0a25d..bbac017d34d0 100644
> --- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> +++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> @@ -50,6 +50,18 @@ properties:
>  
>    ieee80211-freq-limit: true
>  
> +  led:
> +    type: object
> +    additionalProperties: false
> +    properties:
> +      reg:
> +        maxItems: 1
> +
> +      led-active-low:

How come you are not including leds/common.yaml and making use of the
active-low property defined there? Seems to be in use by mediatek,mt76.yaml

> +        description:
> +          LED is enabled with ground signal.
> +        type: boolean
> +
>    qca,no-eeprom:
>      $ref: /schemas/types.yaml#/definitions/flag
>      description:
> @@ -102,5 +114,9 @@ examples:
>          compatible = "qca,ar9130-wifi";
>          reg = <0x180c0000 0x230000>;
>          interrupts = <2>;
> +        led {
> +          reg = <0>;
> +          led-active-low;
> +        };
>        };
>      };
> -- 
> 2.50.1
> 
Re: [PATCHv3 1/3] dt-bindings: net: wireless: ath9k: add led bindings
Posted by Rosen Penev 1 month, 1 week ago
On Mon, Aug 25, 2025 at 9:38 AM Conor Dooley <conor@kernel.org> wrote:
>
> On Sun, Aug 24, 2025 at 09:48:10PM -0700, 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         | 16 ++++++++++++++++
> >  1 file changed, 16 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> > index d16ca8e0a25d..bbac017d34d0 100644
> > --- a/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> > +++ b/Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
> > @@ -50,6 +50,18 @@ properties:
> >
> >    ieee80211-freq-limit: true
> >
> > +  led:
> > +    type: object
> > +    additionalProperties: false
> > +    properties:
> > +      reg:
> > +        maxItems: 1
> > +
> > +      led-active-low:
>
> How come you are not including leds/common.yaml and making use of the
> active-low property defined there? Seems to be in use by mediatek,mt76.yaml
Probably makes more sense to use active-high instead. Will do so in next series.
>
> > +        description:
> > +          LED is enabled with ground signal.
> > +        type: boolean
> > +
> >    qca,no-eeprom:
> >      $ref: /schemas/types.yaml#/definitions/flag
> >      description:
> > @@ -102,5 +114,9 @@ examples:
> >          compatible = "qca,ar9130-wifi";
> >          reg = <0x180c0000 0x230000>;
> >          interrupts = <2>;
> > +        led {
> > +          reg = <0>;
> > +          led-active-low;
> > +        };
> >        };
> >      };
> > --
> > 2.50.1
> >