From: Rob Herring <robh@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Shawn Guo <shawnguo@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
devicetree@vger.kernel.org, netdev@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-mips@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] dt-bindings: net: sms911x: Convert to json-schema
Date: Thu, 20 May 2021 14:56:05 -0500 [thread overview]
Message-ID: <20210520195605.GA1832858@robh.at.kernel.org> (raw)
In-Reply-To: <f3f33f75c8911697f2c1dbde626f01187199bdc2.1621518686.git.geert+renesas@glider.be>
On Thu, May 20, 2021 at 03:58:39PM +0200, Geert Uytterhoeven wrote:
> Convert the Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x
> Controller Device Tree binding documentation to json-schema.
>
> Document missing properties.
> Make "phy-mode" not required, as many DTS files do not have it, and the
> Linux drivers falls back to PHY_INTERFACE_MODE_NA.
> Correct nodename in example.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> I have listed Shawn as the maintainer, as he wrote the original
> bindings. Shawn: Please scream if this is inappropriate ;-)
>
> I left "additionalProperties: true", as there are lots of bus-specific
> properties ("qcom,*", "samsung,*", "fsl,*", "gpmc,*", ...) to be found,
> that actually depend on the compatible value of the parent node.
Can you put a comment above additionalProperties to that effect. I need
to come up with some solution for this, but don't want folks copying
that when normally not needed.
>
> ---
> .../devicetree/bindings/net/gpmc-eth.txt | 2 +-
> .../devicetree/bindings/net/smsc,lan9115.yaml | 107 ++++++++++++++++++
> .../devicetree/bindings/net/smsc911x.txt | 43 -------
> 3 files changed, 108 insertions(+), 44 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/net/smsc,lan9115.yaml
> delete mode 100644 Documentation/devicetree/bindings/net/smsc911x.txt
>
> diff --git a/Documentation/devicetree/bindings/net/gpmc-eth.txt b/Documentation/devicetree/bindings/net/gpmc-eth.txt
> index f7da3d73ca1b2e15..32821066a85b0078 100644
> --- a/Documentation/devicetree/bindings/net/gpmc-eth.txt
> +++ b/Documentation/devicetree/bindings/net/gpmc-eth.txt
> @@ -13,7 +13,7 @@ Documentation/devicetree/bindings/memory-controllers/omap-gpmc.txt
>
> For the properties relevant to the ethernet controller connected to the GPMC
> refer to the binding documentation of the device. For example, the documentation
> -for the SMSC 911x is Documentation/devicetree/bindings/net/smsc911x.txt
> +for the SMSC 911x is Documentation/devicetree/bindings/net/smsc,lan9115.yaml
>
> Child nodes need to specify the GPMC bus address width using the "bank-width"
> property but is possible that an ethernet controller also has a property to
> diff --git a/Documentation/devicetree/bindings/net/smsc,lan9115.yaml b/Documentation/devicetree/bindings/net/smsc,lan9115.yaml
> new file mode 100644
> index 0000000000000000..294fa3edf966695a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/smsc,lan9115.yaml
> @@ -0,0 +1,107 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/smsc,lan9115.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller
> +
> +maintainers:
> + - Shawn Guo <shawnguo@kernel.org>
> +
> +allOf:
> + - $ref: ethernet-controller.yaml#
> +
> +properties:
> + compatible:
> + oneOf:
> + - const: smsc,lan9115
> + - items:
> + - enum:
> + - "smsc,lan89218"
> + - "smsc,lan9117"
> + - "smsc,lan9118"
> + - "smsc,lan9220"
> + - "smsc,lan9221"
Don't need quotes.
> + - const: smsc,lan9115
> +
> + reg:
> + maxItems: 1
> +
> + reg-shift: true
> +
> + reg-io-width:
> + enum: [ 2, 4 ]
> + default: 2
> +
> + interrupts:
> + minItems: 1
> + items:
> + - description:
> + LAN interrupt line
> + - description:
> + Optional PME (power management event) interrupt that is able to wake
> + up the host system with a 50ms pulse on network activity
> +
> + clocks:
> + maxItems: 1
> +
> + phy-mode: true
> +
> + smsc,irq-active-high:
> + type: boolean
> + description: Indicates the IRQ polarity is active-high
> +
> + smsc,irq-push-pull:
> + type: boolean
> + description: Indicates the IRQ type is push-pull
> +
> + smsc,force-internal-phy:
> + type: boolean
> + description: Forces SMSC LAN controller to use internal PHY
> +
> + smsc,force-external-phy:
> + type: boolean
> + description: Forces SMSC LAN controller to use external PHY
> +
> + smsc,save-mac-address:
> + type: boolean
> + description:
> + Indicates that MAC address needs to be saved before resetting the
> + controller
> +
> + reset-gpios:
> + maxItems: 1
> + description:
> + A GPIO line connected to the RESET (active low) signal of the device.
> + On many systems this is wired high so the device goes out of reset at
> + power-on, but if it is under program control, this optional GPIO can
> + wake up in response to it.
> +
> + vdd33a-supply:
> + description: 3.3V analog power supply
> +
> + vddvario-supply:
> + description: IO logic power supply
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> +
> +additionalProperties: true
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + ethernet@f4000000 {
> + compatible = "smsc,lan9220", "smsc,lan9115";
> + reg = <0xf4000000 0x2000000>;
> + phy-mode = "mii";
> + interrupt-parent = <&gpio1>;
> + interrupts = <31>, <32>;
> + reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
> + reg-io-width = <4>;
> + smsc,irq-push-pull;
> + };
> diff --git a/Documentation/devicetree/bindings/net/smsc911x.txt b/Documentation/devicetree/bindings/net/smsc911x.txt
> deleted file mode 100644
> index acfafc8e143c4c85..0000000000000000
> --- a/Documentation/devicetree/bindings/net/smsc911x.txt
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -* Smart Mixed-Signal Connectivity (SMSC) LAN911x/912x Controller
> -
> -Required properties:
> -- compatible : Should be "smsc,lan<model>", "smsc,lan9115"
> -- reg : Address and length of the io space for SMSC LAN
> -- interrupts : one or two interrupt specifiers
> - - The first interrupt is the SMSC LAN interrupt line
> - - The second interrupt (if present) is the PME (power
> - management event) interrupt that is able to wake up the host
> - system with a 50ms pulse on network activity
> -- phy-mode : See ethernet.txt file in the same directory
> -
> -Optional properties:
> -- reg-shift : Specify the quantity to shift the register offsets by
> -- reg-io-width : Specify the size (in bytes) of the IO accesses that
> - should be performed on the device. Valid value for SMSC LAN is
> - 2 or 4. If it's omitted or invalid, the size would be 2.
> -- smsc,irq-active-high : Indicates the IRQ polarity is active-high
> -- smsc,irq-push-pull : Indicates the IRQ type is push-pull
> -- smsc,force-internal-phy : Forces SMSC LAN controller to use
> - internal PHY
> -- smsc,force-external-phy : Forces SMSC LAN controller to use
> - external PHY
> -- smsc,save-mac-address : Indicates that mac address needs to be saved
> - before resetting the controller
> -- reset-gpios : a GPIO line connected to the RESET (active low) signal
> - of the device. On many systems this is wired high so the device goes
> - out of reset at power-on, but if it is under program control, this
> - optional GPIO can wake up in response to it.
> -- vdd33a-supply, vddvario-supply : 3.3V analog and IO logic power supplies
> -
> -Examples:
> -
> -lan9220@f4000000 {
> - compatible = "smsc,lan9220", "smsc,lan9115";
> - reg = <0xf4000000 0x2000000>;
> - phy-mode = "mii";
> - interrupt-parent = <&gpio1>;
> - interrupts = <31>, <32>;
> - reset-gpios = <&gpio1 30 GPIO_ACTIVE_LOW>;
> - reg-io-width = <4>;
> - smsc,irq-push-pull;
> -};
> --
> 2.25.1
>
prev parent reply other threads:[~2021-05-20 19:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 13:58 [PATCH 0/5] sms911x: DTS fixes and DT binding to json-schema conversion Geert Uytterhoeven
2021-05-20 13:58 ` [PATCH 1/5] ARM: dts: i.MX51: digi-connectcore-som: Correct Ethernet node name Geert Uytterhoeven
2021-05-23 5:27 ` Shawn Guo
2021-05-20 13:58 ` [PATCH 2/5] ARM: dts: imx53-ard: " Geert Uytterhoeven
2021-05-23 5:27 ` Shawn Guo
2021-05-20 13:58 ` [PATCH 3/5] ARM: dts: qcom-apq8060: Correct Ethernet node name and drop bogus irq property Geert Uytterhoeven
2021-05-20 23:43 ` Linus Walleij
2021-05-20 13:58 ` [PATCH 4/5] MIPS: SEAD3: Correct Ethernet node name Geert Uytterhoeven
2021-05-20 15:07 ` Thomas Bogendoerfer
2021-05-27 9:44 ` Geert Uytterhoeven
2021-05-27 10:36 ` Thomas Bogendoerfer
2021-05-20 13:58 ` [PATCH 5/5] dt-bindings: net: sms911x: Convert to json-schema Geert Uytterhoeven
2021-05-20 19:56 ` Rob Herring [this message]
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=20210520195605.GA1832858@robh.at.kernel.org \
--to=robh@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shawnguo@kernel.org \
--cc=tsbogend@alpha.franken.de \
/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;
as well as URLs for NNTP newsgroup(s).