diff mbox series

[v3,5/8] ARM: dts: exynos: fix ethernet node name for different odroid boards

Message ID 20220215080937.2263111-5-o.rempel@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series [v3,1/8] dt-bindings: net: add schema for ASIX USB Ethernet controllers | expand

Commit Message

Oleksij Rempel Feb. 15, 2022, 8:09 a.m. UTC
The node name of Ethernet controller should be "ethernet" instead of
"usbether"

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
 arch/arm/boot/dts/exynos4412-odroidu3.dts       | 4 ++--
 arch/arm/boot/dts/exynos4412-odroidx.dts        | 8 ++++----
 arch/arm/boot/dts/exynos5410-odroidxu.dts       | 4 ++--
 arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts | 6 +++---
 arch/arm/boot/dts/exynos5422-odroidxu3.dts      | 6 +++---
 5 files changed, 14 insertions(+), 14 deletions(-)

Comments

Marc Kleine-Budde Feb. 15, 2022, 8:12 a.m. UTC | #1
On 15.02.2022 09:09:34, Oleksij Rempel wrote:
> The node name of Ethernet controller should be "ethernet" instead of
> "usbether"
> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  arch/arm/boot/dts/exynos4412-odroidu3.dts       | 4 ++--
>  arch/arm/boot/dts/exynos4412-odroidx.dts        | 8 ++++----
>  arch/arm/boot/dts/exynos5410-odroidxu.dts       | 4 ++--
>  arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts | 6 +++---
>  arch/arm/boot/dts/exynos5422-odroidxu3.dts      | 6 +++---
>  5 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts b/arch/arm/boot/dts/exynos4412-odroidu3.dts
> index efaf7533e84f..36c369c42b77 100644
> --- a/arch/arm/boot/dts/exynos4412-odroidu3.dts
> +++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts
> @@ -119,8 +119,8 @@ &ehci {
>  	phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>;
>  	phy-names = "hsic0", "hsic1";
>  
> -	ethernet: usbether@2 {
> -		compatible = "usb0424,9730";
> +	ethernet: ethernet@2 {
> +		compatible = "usb424,9730";

The change of the compatible is not mentioned in the patch description.
Is this intentional?

Marc
Oleksij Rempel Feb. 15, 2022, 8:16 a.m. UTC | #2
On Tue, Feb 15, 2022 at 09:12:40AM +0100, Marc Kleine-Budde wrote:
> On 15.02.2022 09:09:34, Oleksij Rempel wrote:
> > The node name of Ethernet controller should be "ethernet" instead of
> > "usbether"
> > 
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > ---
> >  arch/arm/boot/dts/exynos4412-odroidu3.dts       | 4 ++--
> >  arch/arm/boot/dts/exynos4412-odroidx.dts        | 8 ++++----
> >  arch/arm/boot/dts/exynos5410-odroidxu.dts       | 4 ++--
> >  arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts | 6 +++---
> >  arch/arm/boot/dts/exynos5422-odroidxu3.dts      | 6 +++---
> >  5 files changed, 14 insertions(+), 14 deletions(-)
> > 
> > diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts b/arch/arm/boot/dts/exynos4412-odroidu3.dts
> > index efaf7533e84f..36c369c42b77 100644
> > --- a/arch/arm/boot/dts/exynos4412-odroidu3.dts
> > +++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts
> > @@ -119,8 +119,8 @@ &ehci {
> >  	phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>;
> >  	phy-names = "hsic0", "hsic1";
> >  
> > -	ethernet: usbether@2 {
> > -		compatible = "usb0424,9730";
> > +	ethernet: ethernet@2 {
> > +		compatible = "usb424,9730";
> 
> The change of the compatible is not mentioned in the patch description.
> Is this intentional?

No, I forgot to mentione it. According to the USB schema 0 should be
removed. So, this compatible was incorrect as well. With leading zero
present yaml schema was not able to detect and validate this node.

Regards,
Oleksij
Krzysztof Kozlowski Feb. 15, 2022, 8:28 a.m. UTC | #3
On 15/02/2022 09:09, Oleksij Rempel wrote:
> The node name of Ethernet controller should be "ethernet" instead of
> "usbether"

Missing full stop.
Please also mention why this should be "ethernet" (e.g. because Ethernet
dtschema requires it). This applies to other DTS patches as well.

Plus comments from Marc.

> 
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
>  arch/arm/boot/dts/exynos4412-odroidu3.dts       | 4 ++--
>  arch/arm/boot/dts/exynos4412-odroidx.dts        | 8 ++++----
>  arch/arm/boot/dts/exynos5410-odroidxu.dts       | 4 ++--
>  arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts | 6 +++---
>  arch/arm/boot/dts/exynos5422-odroidxu3.dts      | 6 +++---
>  5 files changed, 14 insertions(+), 14 deletions(-)
> 

Best regards,
Krzysztof
Andrew Lunn Feb. 15, 2022, 8:56 p.m. UTC | #4
> > > -	ethernet: usbether@2 {
> > > -		compatible = "usb0424,9730";
> > > +	ethernet: ethernet@2 {
> > > +		compatible = "usb424,9730";
> > 
> > The change of the compatible is not mentioned in the patch description.
> > Is this intentional?
> 
> No, I forgot to mentione it. According to the USB schema 0 should be
> removed. So, this compatible was incorrect as well. With leading zero
> present yaml schema was not able to detect and validate this node.

Does the current code not actually care about a leading 0? It will
match with or without it? It would be good to mention that as well in
the commit message, otherwise somebody like me is going to ask if this
breaks backwards compatibility, since normally compatible is an exact
string match.

And i actually think this is the sort of change which should be as a
patch of its own. If this causes a regression, a git bisect would then
tell you if it is the change of usbether -> ethernet, or 0424 to
424. That is part of why we ask for lots of small changes.


       Andrew
Oleksij Rempel Feb. 16, 2022, 6:15 a.m. UTC | #5
On Tue, Feb 15, 2022 at 09:56:50PM +0100, Andrew Lunn wrote:
> > > > -	ethernet: usbether@2 {
> > > > -		compatible = "usb0424,9730";
> > > > +	ethernet: ethernet@2 {
> > > > +		compatible = "usb424,9730";
> > > 
> > > The change of the compatible is not mentioned in the patch description.
> > > Is this intentional?
> > 
> > No, I forgot to mentione it. According to the USB schema 0 should be
> > removed. So, this compatible was incorrect as well. With leading zero
> > present yaml schema was not able to detect and validate this node.
> 
> Does the current code not actually care about a leading 0? It will
> match with or without it? It would be good to mention that as well in
> the commit message, otherwise somebody like me is going to ask if this
> breaks backwards compatibility, since normally compatible is an exact
> string match.

Current kernel code do not care about exact this compatibles. There is
no driver matching against it. The USB Ethernet driver will take the
node provided by the USB core drivers without validating the compatible
against USB ID.
See:
drivers/usb/core/of.c
drivers/usb/core/message.c:2093

On other hand, DT validations tools do care about it and this nodes was
not detected automatically. I found it accidentally by grepping the
sources.

> And i actually think this is the sort of change which should be as a
> patch of its own. If this causes a regression, a git bisect would then
> tell you if it is the change of usbether -> ethernet, or 0424 to
> 424. That is part of why we ask for lots of small changes.

Sounds good, I'll update it.

Regards,
Oleksij
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts b/arch/arm/boot/dts/exynos4412-odroidu3.dts
index efaf7533e84f..36c369c42b77 100644
--- a/arch/arm/boot/dts/exynos4412-odroidu3.dts
+++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts
@@ -119,8 +119,8 @@  &ehci {
 	phys = <&exynos_usbphy 2>, <&exynos_usbphy 3>;
 	phy-names = "hsic0", "hsic1";
 
-	ethernet: usbether@2 {
-		compatible = "usb0424,9730";
+	ethernet: ethernet@2 {
+		compatible = "usb424,9730";
 		reg = <2>;
 		local-mac-address = [00 00 00 00 00 00]; /* Filled in by a bootloader */
 	};
diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts b/arch/arm/boot/dts/exynos4412-odroidx.dts
index 440135d0ff2a..ba46baf9117f 100644
--- a/arch/arm/boot/dts/exynos4412-odroidx.dts
+++ b/arch/arm/boot/dts/exynos4412-odroidx.dts
@@ -70,19 +70,19 @@  &ehci {
 	phy-names = "hsic0";
 
 	hub@2 {
-		compatible = "usb0424,3503";
+		compatible = "usb424,3503";
 		reg = <2>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 
 		hub@1 {
-			compatible = "usb0424,9514";
+			compatible = "usb424,9514";
 			reg = <1>;
 			#address-cells = <1>;
 			#size-cells = <0>;
 
-			ethernet: usbether@1 {
-				compatible = "usb0424,ec00";
+			ethernet: ethernet@1 {
+				compatible = "usb424,ec00";
 				reg = <1>;
 				/* Filled in by a bootloader */
 				local-mac-address = [00 00 00 00 00 00];
diff --git a/arch/arm/boot/dts/exynos5410-odroidxu.dts b/arch/arm/boot/dts/exynos5410-odroidxu.dts
index 884fef55836c..4c7039e771db 100644
--- a/arch/arm/boot/dts/exynos5410-odroidxu.dts
+++ b/arch/arm/boot/dts/exynos5410-odroidxu.dts
@@ -675,8 +675,8 @@  &usbhost2 {
 	#address-cells = <1>;
 	#size-cells = <0>;
 
-	ethernet: usbether@2 {
-		compatible = "usb0424,9730";
+	ethernet: ethernet@2 {
+		compatible = "usb424,9730";
 		reg = <2>;
 		local-mac-address = [00 00 00 00 00 00]; /* Filled in by a bootloader */
 	};
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
index 62c5928aa994..e3154a1cae23 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-lite.dts
@@ -113,13 +113,13 @@  &usbhost2 {
 	#size-cells = <0>;
 
 	hub@1 {
-		compatible = "usb0424,9514";
+		compatible = "usb424,9514";
 		reg = <1>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		ethernet: usbether@1 {
-			compatible = "usb0424,ec00";
+		ethernet: ethernet@1 {
+			compatible = "usb424,ec00";
 			reg = <1>;
 			local-mac-address = [00 00 00 00 00 00]; /* Filled in by a bootloader */
 		};
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
index cecaeb69e623..a378d4937ff7 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts
@@ -80,13 +80,13 @@  &usbhost2 {
 	#size-cells = <0>;
 
 	hub@1 {
-		compatible = "usb0424,9514";
+		compatible = "usb424,9514";
 		reg = <1>;
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		ethernet: usbether@1 {
-			compatible = "usb0424,ec00";
+		ethernet: ethernet@1 {
+			compatible = "usb424,ec00";
 			reg = <1>;
 			local-mac-address = [00 00 00 00 00 00]; /* Filled in by a bootloader */
 		};