All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Schiller <ms@dev.tdt.de>
To: Rob Herring <robh@kernel.org>
Cc: martin.blumenstingl@googlemail.com, hauke@hauke-m.de,
	andrew@lunn.ch, f.fainelli@gmail.com, olteanv@gmail.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, krzk+dt@kernel.org, conor+dt@kernel.org,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v4 01/13] dt-bindings: net: dsa: lantiq,gswip: convert to YAML schema
Date: Tue, 11 Jun 2024 15:48:08 +0200	[thread overview]
Message-ID: <e0eea99badf86544b7d45a5eec7feee3@dev.tdt.de> (raw)
In-Reply-To: <20240611132730.GA1683993-robh@kernel.org>

On 2024-06-11 15:27, Rob Herring wrote:
> On Tue, Jun 11, 2024 at 01:40:15PM +0200, Martin Schiller wrote:
>> Convert the lantiq,gswip bindings to YAML format.
>> 
>> Also add this new file to the MAINTAINERS file.
>> 
>> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
>> ---
>>  .../bindings/net/dsa/lantiq,gswip.yaml        | 195 
>> ++++++++++++++++++
>>  .../bindings/net/dsa/lantiq-gswip.txt         | 146 -------------
>>  MAINTAINERS                                   |   1 +
>>  3 files changed, 196 insertions(+), 146 deletions(-)
>>  create mode 100644 
>> Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
>>  delete mode 100644 
>> Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
>> 
>> diff --git 
>> a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml 
>> b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
>> new file mode 100644
>> index 000000000000..14ef48d6a0ee
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
>> @@ -0,0 +1,195 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Lantiq GSWIP Ethernet switches
>> +
>> +allOf:
>> +  - $ref: dsa.yaml#/$defs/ethernet-ports
>> +
>> +maintainers:
>> +  - Hauke Mehrtens <hauke@hauke-m.de>
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - lantiq,xrx200-gswip
>> +      - lantiq,xrx300-gswip
>> +      - lantiq,xrx330-gswip
>> +
>> +  reg:
>> +    minItems: 3
>> +    maxItems: 3
> 
> blank line
> 
>> +  reg-names:
>> +    items:
>> +      - const: switch
>> +      - const: mdio
>> +      - const: mii
>> +
>> +  mdio:
>> +    $ref: /schemas/net/mdio.yaml#
>> +    unevaluatedProperties: false
>> +
>> +    properties:
>> +      compatible:
>> +        const: lantiq,xrx200-mdio
>> +
>> +    required:
>> +      - compatible
>> +
>> +  gphy-fw:
>> +    type: object
>> +    properties:
>> +      '#address-cells':
>> +        const: 1
> 
> blank line
> 
>> +      '#size-cells':
>> +        const: 0
>> +
>> +      compatible:
>> +        allOf:
> 
> Don't need allOf.
> 
>> +          - items:
>> +              - enum:
>> +                  - lantiq,xrx200-gphy-fw
>> +                  - lantiq,xrx300-gphy-fw
>> +                  - lantiq,xrx330-gphy-fw
>> +              - const: lantiq,gphy-fw
>> +
>> +      lantiq,rcu:
>> +        $ref: /schemas/types.yaml#/definitions/phandle
>> +        description: phandle to the RCU syscon
>> +
>> +    patternProperties:
>> +      "^gphy@[0-9a-f]+$":
> 
> "^gphy@[0-9a-f]{1,2]$"
> 
>> +        type: object
>> +
>> +        properties:
>> +          reg:
>> +            minimum: 0
>> +            maximum: 255
>> +            description:
>> +              Offset of the GPHY firmware register in the RCU 
>> register range
>> +
>> +          resets:
>> +            items:
>> +              - description: GPHY reset line
>> +
>> +          reset-names:
>> +            items:
>> +              - const: gphy
>> +
>> +        required:
>> +          - reg
>> +
>> +        additionalProperties: false
> 
> For indented cases, it is preferred to put this before 'properties'.
> 
>> +
>> +    required:
>> +      - compatible
>> +      - lantiq,rcu
>> +
>> +    additionalProperties: false
>> +
>> +required:
>> +  - compatible
>> +  - reg
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> +  - |
>> +    switch@e108000 {
>> +            compatible = "lantiq,xrx200-gswip";
>> +            reg = <0xe108000 0x3100>,  /* switch */
>> +                  <0xe10b100 0xd8>,    /* mdio */
>> +                  <0xe10b1d8 0x130>;   /* mii */
>> +            dsa,member = <0 0>;
>> +
>> +            ports {
>> +                    #address-cells = <1>;
>> +                    #size-cells = <0>;
>> +
>> +                    port@0 {
>> +                            reg = <0>;
>> +                            label = "lan3";
>> +                            phy-mode = "rgmii";
>> +                            phy-handle = <&phy0>;
>> +                    };
>> +
>> +                    port@1 {
>> +                            reg = <1>;
>> +                            label = "lan4";
>> +                            phy-mode = "rgmii";
>> +                            phy-handle = <&phy1>;
>> +                    };
>> +
>> +                    port@2 {
>> +                            reg = <2>;
>> +                            label = "lan2";
>> +                            phy-mode = "internal";
>> +                            phy-handle = <&phy11>;
>> +                    };
>> +
>> +                    port@4 {
>> +                            reg = <4>;
>> +                            label = "lan1";
>> +                            phy-mode = "internal";
>> +                            phy-handle = <&phy13>;
>> +                    };
>> +
>> +                    port@5 {
>> +                            reg = <5>;
>> +                            label = "wan";
>> +                            phy-mode = "rgmii";
>> +                            phy-handle = <&phy5>;
>> +                    };
>> +
>> +                    port@6 {
>> +                            reg = <0x6>;
>> +                            ethernet = <&eth0>;
>> +                    };
>> +            };
>> +
>> +            mdio {
>> +                    #address-cells = <1>;
>> +                    #size-cells = <0>;
>> +                    compatible = "lantiq,xrx200-mdio";
>> +
>> +                    phy0: ethernet-phy@0 {
>> +                            reg = <0x0>;
>> +                    };
>> +                    phy1: ethernet-phy@1 {
>> +                            reg = <0x1>;
>> +                    };
>> +                    phy5: ethernet-phy@5 {
>> +                            reg = <0x5>;
>> +                    };
>> +                    phy11: ethernet-phy@11 {
>> +                            reg = <0x11>;
>> +                    };
>> +                    phy13: ethernet-phy@13 {
>> +                            reg = <0x13>;
>> +                    };
>> +            };
>> +
>> +            gphy-fw {
>> +                    #address-cells = <1>;
>> +                    #size-cells = <0>;
>> +                    compatible = "lantiq,xrx200-gphy-fw", 
>> "lantiq,gphy-fw";
>> +                    lantiq,rcu = <&rcu0>;
>> +
>> +                    gphy@20 {
>> +                            reg = <0x20>;
>> +
>> +                            resets = <&reset0 31 30>;
>> +                            reset-names = "gphy";
>> +                    };
>> +
>> +                    gphy@68 {
>> +                            reg = <0x68>;
>> +
>> +                            resets = <&reset0 29 28>;
>> +                            reset-names = "gphy";
>> +                    };
>> +            };
>> +    };

OK, thanks for the review. I will send a v5 with these improvements
included and the two dt-bindings patches merged to satisfy the
'make dt_binding_check'.

  reply	other threads:[~2024-06-11 13:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11 11:40 [PATCH net-next v4 00/13] net: dsa: lantiq_gswip: code improvements Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 01/13] dt-bindings: net: dsa: lantiq,gswip: convert to YAML schema Martin Schiller
2024-06-11 12:51   ` Rob Herring (Arm)
2024-06-11 13:17     ` Martin Schiller
2024-06-11 13:27   ` Rob Herring
2024-06-11 13:48     ` Martin Schiller [this message]
2024-06-11 11:40 ` [PATCH net-next v4 02/13] dt-bindings: net: dsa: lantiq,gswip: Add missing CPU port phy-mode and fixed-link to example Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 03/13] net: dsa: lantiq_gswip: Only allow phy-mode = "internal" on the CPU port Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 04/13] net: dsa: lantiq_gswip: add terminating \n where missing Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 05/13] net: dsa: lantiq_gswip: Use dev_err_probe where appropriate Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 06/13] net: dsa: lantiq_gswip: Don't manually call gswip_port_enable() Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 07/13] net: dsa: lantiq_gswip: do also enable or disable cpu port Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 08/13] net: dsa: lantiq_gswip: Use dsa_is_cpu_port() in gswip_port_change_mtu() Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 09/13] net: dsa: lantiq_gswip: Change literal 6 to ETH_ALEN Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 10/13] net: dsa: lantiq_gswip: Consistently use macros for the mac bridge table Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 11/13] net: dsa: lantiq_gswip: Remove dead code from gswip_add_single_port_br() Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 12/13] net: dsa: lantiq_gswip: Update comments in gswip_port_vlan_filtering() Martin Schiller
2024-06-11 11:40 ` [PATCH net-next v4 13/13] net: dsa: lantiq_gswip: Improve error message in gswip_port_fdb() Martin Schiller

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=e0eea99badf86544b7d45a5eec7feee3@dev.tdt.de \
    --to=ms@dev.tdt.de \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.