Netdev List
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>, g@spud
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v2 01/13] dt-bindings: net: airoha: Add AN7583 support
Date: Thu, 16 Oct 2025 18:06:02 +0100	[thread overview]
Message-ID: <20251016-hypnoses-caucasian-5d08812740a6@spud> (raw)
In-Reply-To: <20251016-an7583-eth-support-v2-1-ea6e7e9acbdb@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3695 bytes --]

On Thu, Oct 16, 2025 at 12:28:15PM +0200, Lorenzo Bianconi wrote:
> Introduce AN7583 ethernet controller support to Airoha EN7581
> device-tree bindings. The main difference between EN7581 and AN7583 is
> the number of reset lines required by the controller (AN7583 does not
> require hsi-mac).
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>  .../devicetree/bindings/net/airoha,en7581-eth.yaml | 60 ++++++++++++++++++----
>  1 file changed, 51 insertions(+), 9 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml b/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
> index 6d22131ac2f9e28390b9e785ce33e8d983eafd0f..7b258949a76d5c603a8e66e181895c4a4ae95db8 100644
> --- a/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
> +++ b/Documentation/devicetree/bindings/net/airoha,en7581-eth.yaml
> @@ -17,6 +17,7 @@ properties:
>    compatible:
>      enum:
>        - airoha,en7581-eth
> +      - airoha,an7583-eth
>  
>    reg:
>      items:
> @@ -44,18 +45,12 @@ properties:
>        - description: PDMA irq
>  
>    resets:
> +    minItems: 7
>      maxItems: 8
>  
>    reset-names:
> -    items:
> -      - const: fe
> -      - const: pdma
> -      - const: qdma
> -      - const: xsi-mac
> -      - const: hsi0-mac
> -      - const: hsi1-mac
> -      - const: hsi-mac
> -      - const: xfp-mac

Pretty sure most of this diff can just be avoided by changing this list
to be
  reset-names:
    items:
      - const: fe
      - const: pdma
      - const: qdma
      - const: xsi-mac
      - const: hsi0-mac
      - const: hsi1-mac
      - enum: [ hsi-mac, xfp-mac ]
      - const: xfp-mac
    minItems: 7

All of these -names properties IIRC are arrays of unique strings, so doing
8 with xfp-mac twice would not pass. Your conditional portion of the
binding then need only set min to 8 for the old device and max to 7 for
the new one.

>  
>    memory-region:
>      items:
> @@ -81,6 +76,53 @@ properties:
>        interface to implement hardware flow offloading programming Packet
>        Processor Engine (PPE) flow table.
>  
> +allOf:
> +  - $ref: ethernet-controller.yaml#
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - airoha,en7581-eth
> +    then:
> +      properties:
> +        resets:
> +          minItems: 8
> +          maxItems: 8

Same here fwiw, just need to set the min for this, and...

> +
> +        reset-names:
> +          items:
> +            - const: fe
> +            - const: pdma
> +            - const: qdma
> +            - const: xsi-mac
> +            - const: hsi0-mac
> +            - const: hsi1-mac
> +            - const: hsi-mac
> +            - const: xfp-mac
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - airoha,an7583-eth
> +    then:
> +      properties:
> +        resets:
> +          minItems: 7
> +          maxItems: 7

...max to 7 here. Re-setting min here is redudant, since it matches the
outermost/widest constraint that you set when defining the property
outside the conditional.

pw-bot: changes-requested

Cheers,
Conor.

> +
> +        reset-names:
> +          items:
> +            - const: fe
> +            - const: pdma
> +            - const: qdma
> +            - const: xsi-mac
> +            - const: hsi0-mac
> +            - const: hsi1-mac
> +            - const: xfp-mac
> +
>  patternProperties:
>    "^ethernet@[1-4]$":
>      type: object
> 
> -- 
> 2.51.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-10-16 17:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16 10:28 [PATCH net-next v2 00/13] net: airoha: Add AN7583 ethernet controller support Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 01/13] dt-bindings: net: airoha: Add AN7583 support Lorenzo Bianconi
2025-10-16 17:06   ` Conor Dooley [this message]
2025-10-16 10:28 ` [PATCH net-next v2 02/13] net: airoha: ppe: Dynamically allocate foe_check_time array in airoha_ppe struct Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 03/13] net: airoha: Add airoha_ppe_get_num_stats_entries() and airoha_ppe_get_num_total_stats_entries() Lorenzo Bianconi
2025-10-16 15:55   ` Simon Horman
2025-10-16 10:28 ` [PATCH net-next v2 04/13] net: airoha: Add airoha_eth_soc_data struct Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 05/13] net: airoha: Generalize airoha_ppe2_is_enabled routine Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 06/13] net: airoha: ppe: Move PPE memory info in airoha_eth_soc_data struct Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 07/13] net: airoha: ppe: Remove airoha_ppe_is_enabled() where not necessary Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 08/13] net: airoha: ppe: Configure SRAM PPE entries via the cpu Lorenzo Bianconi
2025-10-16 15:54   ` Simon Horman
2025-10-16 10:28 ` [PATCH net-next v2 09/13] net: airoha: ppe: Flush PPE SRAM table during PPE setup Lorenzo Bianconi
2025-10-16 10:28 ` [PATCH net-next v2 10/13] net: airoha: Select default ppe cpu port in airoha_dev_init() Lorenzo Bianconi
2025-10-16 15:59   ` Simon Horman
2025-10-16 10:28 ` [PATCH net-next v2 11/13] net: airoha: Refactor src port configuration in airhoha_set_gdm2_loopback Lorenzo Bianconi
2025-10-16 16:00   ` Simon Horman
2025-10-16 10:28 ` [PATCH net-next v2 12/13] net: airoha: ppe: Do not use magic numbers in airoha_ppe_foe_get_entry_locked() Lorenzo Bianconi
2025-10-16 16:00   ` Simon Horman
2025-10-16 10:28 ` [PATCH net-next v2 13/13] net: airoha: Add AN7583 SoC support Lorenzo Bianconi
2025-10-16 16:00   ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251016-hypnoses-caucasian-5d08812740a6@spud \
    --to=conor@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=g@spud \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lorenzo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox