* [PATCH net-next v2 1/3] dt-bindings: net: dsa: realtek: reset-gpios is not required
[not found] <20231027190910.27044-1-luizluca@gmail.com>
@ 2023-10-27 19:00 ` Luiz Angelo Daros de Luca
2023-10-28 7:49 ` Arınç ÜNAL
2023-10-30 17:40 ` Rob Herring
2023-10-27 19:00 ` [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller Luiz Angelo Daros de Luca
1 sibling, 2 replies; 7+ messages in thread
From: Luiz Angelo Daros de Luca @ 2023-10-27 19:00 UTC (permalink / raw)
To: netdev
Cc: linus.walleij, alsi, andrew, vivien.didelot, f.fainelli, olteanv,
davem, kuba, pabeni, robh+dt, krzk+dt, arinc.unal,
Luiz Angelo Daros de Luca, devicetree
The 'reset-gpios' should not be mandatory. although they might be
required for some devices if the switch reset was left asserted by a
previous driver, such as the bootloader.
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: devicetree@vger.kernel.org
---
Documentation/devicetree/bindings/net/dsa/realtek.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
index cce692f57b08..46e113df77c8 100644
--- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
@@ -127,7 +127,6 @@ else:
- mdc-gpios
- mdio-gpios
- mdio
- - reset-gpios
required:
- compatible
--
2.42.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller
[not found] <20231027190910.27044-1-luizluca@gmail.com>
2023-10-27 19:00 ` [PATCH net-next v2 1/3] dt-bindings: net: dsa: realtek: reset-gpios is not required Luiz Angelo Daros de Luca
@ 2023-10-27 19:00 ` Luiz Angelo Daros de Luca
2023-10-28 7:50 ` Arınç ÜNAL
2023-10-30 13:15 ` Rob Herring
1 sibling, 2 replies; 7+ messages in thread
From: Luiz Angelo Daros de Luca @ 2023-10-27 19:00 UTC (permalink / raw)
To: netdev
Cc: linus.walleij, alsi, andrew, vivien.didelot, f.fainelli, olteanv,
davem, kuba, pabeni, robh+dt, krzk+dt, arinc.unal,
Luiz Angelo Daros de Luca, devicetree
Realtek switches can use a reset controller instead of reset-gpios.
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Cc: devicetree@vger.kernel.org
---
.../devicetree/bindings/net/dsa/realtek.yaml | 75 +++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
index 46e113df77c8..ef7b27c3b1a3 100644
--- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
@@ -59,6 +59,9 @@ properties:
description: GPIO to be used to reset the whole device
maxItems: 1
+ resets:
+ maxItems: 1
+
realtek,disable-leds:
type: boolean
description: |
@@ -385,3 +388,75 @@ examples:
};
};
};
+
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ platform {
+ switch {
+ compatible = "realtek,rtl8365mb";
+ mdc-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
+ mdio-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
+
+ resets = <&rst 8>;
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-port@0 {
+ reg = <0>;
+ label = "wan";
+ phy-handle = <ðphy-0>;
+ };
+ ethernet-port@1 {
+ reg = <1>;
+ label = "lan1";
+ phy-handle = <ðphy-1>;
+ };
+ ethernet-port@2 {
+ reg = <2>;
+ label = "lan2";
+ phy-handle = <ðphy-2>;
+ };
+ ethernet-port@3 {
+ reg = <3>;
+ label = "lan3";
+ phy-handle = <ðphy-3>;
+ };
+ ethernet-port@4 {
+ reg = <4>;
+ label = "lan4";
+ phy-handle = <ðphy-4>;
+ };
+ ethernet-port@5 {
+ reg = <5>;
+ ethernet = <ð0>;
+ phy-mode = "rgmii";
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+
+ mdio {
+ compatible = "realtek,smi-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethphy-0: ethernet-phy@0 {
+ reg = <0>;
+ };
+ ethphy-1: ethernet-phy@1 {
+ reg = <1>;
+ };
+ ethphy-2: ethernet-phy@2 {
+ reg = <2>;
+ };
+ ethphy-3: ethernet-phy@3 {
+ reg = <3>;
+ };
+ };
+ };
+ };
--
2.42.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v2 1/3] dt-bindings: net: dsa: realtek: reset-gpios is not required
2023-10-27 19:00 ` [PATCH net-next v2 1/3] dt-bindings: net: dsa: realtek: reset-gpios is not required Luiz Angelo Daros de Luca
@ 2023-10-28 7:49 ` Arınç ÜNAL
2023-10-30 17:40 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Arınç ÜNAL @ 2023-10-28 7:49 UTC (permalink / raw)
To: Luiz Angelo Daros de Luca, netdev
Cc: linus.walleij, alsi, andrew, vivien.didelot, f.fainelli, olteanv,
davem, kuba, pabeni, robh+dt, krzk+dt, devicetree
On 27.10.2023 22:00, Luiz Angelo Daros de Luca wrote:
> The 'reset-gpios' should not be mandatory. although they might be
> required for some devices if the switch reset was left asserted by a
> previous driver, such as the bootloader.
>
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Arınç
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller
2023-10-27 19:00 ` [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller Luiz Angelo Daros de Luca
@ 2023-10-28 7:50 ` Arınç ÜNAL
2023-10-30 13:15 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Arınç ÜNAL @ 2023-10-28 7:50 UTC (permalink / raw)
To: Luiz Angelo Daros de Luca, netdev
Cc: linus.walleij, alsi, andrew, vivien.didelot, f.fainelli, olteanv,
davem, kuba, pabeni, robh+dt, krzk+dt, devicetree
On 27.10.2023 22:00, Luiz Angelo Daros de Luca wrote:
> Realtek switches can use a reset controller instead of reset-gpios.
>
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Arınç
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller
2023-10-27 19:00 ` [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller Luiz Angelo Daros de Luca
2023-10-28 7:50 ` Arınç ÜNAL
@ 2023-10-30 13:15 ` Rob Herring
2023-10-30 22:30 ` Luiz Angelo Daros de Luca
1 sibling, 1 reply; 7+ messages in thread
From: Rob Herring @ 2023-10-30 13:15 UTC (permalink / raw)
To: Luiz Angelo Daros de Luca
Cc: netdev, linus.walleij, alsi, andrew, vivien.didelot, f.fainelli,
olteanv, davem, kuba, pabeni, krzk+dt, arinc.unal, devicetree
On Fri, Oct 27, 2023 at 04:00:56PM -0300, Luiz Angelo Daros de Luca wrote:
> Realtek switches can use a reset controller instead of reset-gpios.
>
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
> Cc: devicetree@vger.kernel.org
> ---
> .../devicetree/bindings/net/dsa/realtek.yaml | 75 +++++++++++++++++++
> 1 file changed, 75 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> index 46e113df77c8..ef7b27c3b1a3 100644
> --- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> +++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> @@ -59,6 +59,9 @@ properties:
> description: GPIO to be used to reset the whole device
> maxItems: 1
>
> + resets:
> + maxItems: 1
> +
> realtek,disable-leds:
> type: boolean
> description: |
> @@ -385,3 +388,75 @@ examples:
> };
> };
> };
> +
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> +
> + platform {
> + switch {
> + compatible = "realtek,rtl8365mb";
> + mdc-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
> + mdio-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
> +
> + resets = <&rst 8>;
> +
> + ethernet-ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethernet-port@0 {
> + reg = <0>;
> + label = "wan";
> + phy-handle = <ðphy-0>;
> + };
> + ethernet-port@1 {
> + reg = <1>;
> + label = "lan1";
> + phy-handle = <ðphy-1>;
> + };
> + ethernet-port@2 {
> + reg = <2>;
> + label = "lan2";
> + phy-handle = <ðphy-2>;
> + };
> + ethernet-port@3 {
> + reg = <3>;
> + label = "lan3";
> + phy-handle = <ðphy-3>;
> + };
> + ethernet-port@4 {
> + reg = <4>;
> + label = "lan4";
> + phy-handle = <ðphy-4>;
> + };
> + ethernet-port@5 {
> + reg = <5>;
> + ethernet = <ð0>;
> + phy-mode = "rgmii";
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + };
> + };
> + };
> +
> + mdio {
> + compatible = "realtek,smi-mdio";
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + ethphy-0: ethernet-phy@0 {
You didn't test your binding (make dt_binding_check).
'-' is not valid in labels.
Why do we have a whole other example just for 'resets' instead of
'reset-gpios'? That's not really worth it.
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v2 1/3] dt-bindings: net: dsa: realtek: reset-gpios is not required
2023-10-27 19:00 ` [PATCH net-next v2 1/3] dt-bindings: net: dsa: realtek: reset-gpios is not required Luiz Angelo Daros de Luca
2023-10-28 7:49 ` Arınç ÜNAL
@ 2023-10-30 17:40 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2023-10-30 17:40 UTC (permalink / raw)
To: Luiz Angelo Daros de Luca
Cc: krzk+dt, robh+dt, arinc.unal, linus.walleij, pabeni, andrew,
vivien.didelot, davem, f.fainelli, netdev, devicetree, alsi,
olteanv, kuba
On Fri, 27 Oct 2023 16:00:55 -0300, Luiz Angelo Daros de Luca wrote:
> The 'reset-gpios' should not be mandatory. although they might be
> required for some devices if the switch reset was left asserted by a
> previous driver, such as the bootloader.
>
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
> Cc: devicetree@vger.kernel.org
> ---
> Documentation/devicetree/bindings/net/dsa/realtek.yaml | 1 -
> 1 file changed, 1 deletion(-)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller
2023-10-30 13:15 ` Rob Herring
@ 2023-10-30 22:30 ` Luiz Angelo Daros de Luca
0 siblings, 0 replies; 7+ messages in thread
From: Luiz Angelo Daros de Luca @ 2023-10-30 22:30 UTC (permalink / raw)
To: Rob Herring
Cc: netdev, linus.walleij, alsi, andrew, vivien.didelot, f.fainelli,
olteanv, davem, kuba, pabeni, krzk+dt, arinc.unal, devicetree
> On Fri, Oct 27, 2023 at 04:00:56PM -0300, Luiz Angelo Daros de Luca wrote:
> > Realtek switches can use a reset controller instead of reset-gpios.
> >
> > Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
> > Cc: devicetree@vger.kernel.org
> > ---
> > .../devicetree/bindings/net/dsa/realtek.yaml | 75 +++++++++++++++++++
> > 1 file changed, 75 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/net/dsa/realtek.yaml b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> > index 46e113df77c8..ef7b27c3b1a3 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/realtek.yaml
> > @@ -59,6 +59,9 @@ properties:
> > description: GPIO to be used to reset the whole device
> > maxItems: 1
> >
> > + resets:
> > + maxItems: 1
> > +
> > realtek,disable-leds:
> > type: boolean
> > description: |
> > @@ -385,3 +388,75 @@ examples:
> > };
> > };
> > };
> > +
> > + - |
> > + #include <dt-bindings/gpio/gpio.h>
> > +
> > + platform {
> > + switch {
> > + compatible = "realtek,rtl8365mb";
> > + mdc-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>;
> > + mdio-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
> > +
> > + resets = <&rst 8>;
> > +
> > + ethernet-ports {
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + ethernet-port@0 {
> > + reg = <0>;
> > + label = "wan";
> > + phy-handle = <ðphy-0>;
> > + };
> > + ethernet-port@1 {
> > + reg = <1>;
> > + label = "lan1";
> > + phy-handle = <ðphy-1>;
> > + };
> > + ethernet-port@2 {
> > + reg = <2>;
> > + label = "lan2";
> > + phy-handle = <ðphy-2>;
> > + };
> > + ethernet-port@3 {
> > + reg = <3>;
> > + label = "lan3";
> > + phy-handle = <ðphy-3>;
> > + };
> > + ethernet-port@4 {
> > + reg = <4>;
> > + label = "lan4";
> > + phy-handle = <ðphy-4>;
> > + };
> > + ethernet-port@5 {
> > + reg = <5>;
> > + ethernet = <ð0>;
> > + phy-mode = "rgmii";
> > + fixed-link {
> > + speed = <1000>;
> > + full-duplex;
> > + };
> > + };
> > + };
> > +
> > + mdio {
> > + compatible = "realtek,smi-mdio";
> > + #address-cells = <1>;
> > + #size-cells = <0>;
> > +
> > + ethphy-0: ethernet-phy@0 {
>
> You didn't test your binding (make dt_binding_check).
>
> '-' is not valid in labels.
>
My bad. I (wrongly) fixed that in the realtek.example.dtb content,
which is derived from the realtek.yaml.
As it has a newer mtime, it was not updated with dt_binding_check.
>
> Why do we have a whole other example just for 'resets' instead of
> 'reset-gpios'? That's not really worth it.
However, as it is not worth it, I'll drop it.
> Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-10-30 22:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20231027190910.27044-1-luizluca@gmail.com>
2023-10-27 19:00 ` [PATCH net-next v2 1/3] dt-bindings: net: dsa: realtek: reset-gpios is not required Luiz Angelo Daros de Luca
2023-10-28 7:49 ` Arınç ÜNAL
2023-10-30 17:40 ` Rob Herring
2023-10-27 19:00 ` [PATCH net-next v2 2/3] dt-bindings: net: dsa: realtek: add reset controller Luiz Angelo Daros de Luca
2023-10-28 7:50 ` Arınç ÜNAL
2023-10-30 13:15 ` Rob Herring
2023-10-30 22:30 ` Luiz Angelo Daros de Luca
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).