linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] arm: dts: linksys: rename codename to model
@ 2020-04-07 21:08 Paul Spooren
  2020-04-07 21:08 ` [PATCH 1/5] arm: dts: linksys: rename rango to wrt3200acm Paul Spooren
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Paul Spooren @ 2020-04-07 21:08 UTC (permalink / raw)
  To: devicetree
  Cc: linux-arm-kernel, linux-kernel, robh+dt, jason, andrew,
	gregory.clement, sebastian.hesselbarth, daniel, freifunk,
	Paul Spooren

Linksys chose to use codenames for a few of their devices and sell their
them under an entirely different name.

codename  model name
rango  -> wrt3200acm
mamba  -> wrt1900ac
cobra  -> wrt1900ac-v2
caiman -> wrt1200ac
shelby -> wrt1900acs

This introduces some extra loops in OpenWrt, a distribution specialized
on embedded Internet facing devices, as both codename and model name are
used within the build system. The double naming requires developers to
keep track of that mapping and introduces inconsistencies:

To build a specific device in OpenWrt profiles are used, named after the
the compatible string for targets using device tree (similar to how .dts
files are named in the linux source tree). However, the first item of
the DT `compatible` list in this case is `linksys,rango`, which is
inconsistent with the model name and not what common users would expect.

Such double naming complicates currently the automatic search for
firmware upgrade as the build system does not support such mapping.
Ideally the first item of the DT `compatible` list would contain a
string suitable to be used as a filename recognizable by normal users to
belong to that device.

With this patch set the Linksys device tree files are moved from
containing the codename to contain a sanitized model name and also use
it as first entry of the DT `compatible` list.

Paul Spooren (5):
  arm: dts: linksys: rename rango to wrt3200acm
  arm: dts: linksys: rename mamba to wrt1900ac
  arm: dts: linksys: rename cobra to wrt1900ac-v2
  arm: dts: linksys: rename caiman to wrt1200ac
  arm: dts: linksys: rename shelby to wrt1900acs

 arch/arm/boot/dts/Makefile                    | 10 +++----
 ...n.dts => armada-385-linksys-wrt1200ac.dts} | 26 +++++++++---------
 ...ts => armada-385-linksys-wrt1900ac-v2.dts} | 27 ++++++++++---------
 ....dts => armada-385-linksys-wrt1900acs.dts} | 25 ++++++++---------
 ....dts => armada-385-linksys-wrt3200acm.dts} | 26 +++++++++---------
 ...ba.dts => armada-xp-linksys-wrt1900ac.dts} | 27 ++++++++++---------
 6 files changed, 72 insertions(+), 69 deletions(-)
 rename arch/arm/boot/dts/{armada-385-linksys-caiman.dts => armada-385-linksys-wrt1200ac.dts} (80%)
 rename arch/arm/boot/dts/{armada-385-linksys-cobra.dts => armada-385-linksys-wrt1900ac-v2.dts} (78%)
 rename arch/arm/boot/dts/{armada-385-linksys-shelby.dts => armada-385-linksys-wrt1900acs.dts} (80%)
 rename arch/arm/boot/dts/{armada-385-linksys-rango.dts => armada-385-linksys-wrt3200acm.dts} (83%)
 rename arch/arm/boot/dts/{armada-xp-linksys-mamba.dts => armada-xp-linksys-wrt1900ac.dts} (92%)


base-commit: 7e63420847ae5f1036e4f7c42f0b3282e73efbc2
-- 
2.25.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/5] arm: dts: linksys: rename rango to wrt3200acm
  2020-04-07 21:08 [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
@ 2020-04-07 21:08 ` Paul Spooren
  2020-04-07 21:08 ` [PATCH 2/5] arm: dts: linksys: rename mamba to wrt1900ac Paul Spooren
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Paul Spooren @ 2020-04-07 21:08 UTC (permalink / raw)
  To: devicetree
  Cc: linux-arm-kernel, linux-kernel, robh+dt, jason, andrew,
	gregory.clement, sebastian.hesselbarth, daniel, freifunk,
	Paul Spooren

Linksys uses internally the codename "rango" for a device sold under the
name of "Linksys WRT3200ACM", which is already reflected in the device
tree `model`. However the `compatible` list only contains the codename
`linksys,rango` which does not relate to the common name.

This patch renames the `dts` file to the sanitized model name and
prepends `linksys,wrt3200acm` to the `compatible` list to simplify the
device relation.

Signed-off-by: Paul Spooren <mail@aparcar.org>
CC: Rob Herring <robh+dt@kernel.org>
CC: Jason Cooper <jason@lakedaemon.net>
CC: Andrew Lunn <andrew@lunn.ch>
CC: Gregory Clement <gregory.clement@bootlin.com>
CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
CC: Daniel Golle <daniel@makrotopia.org>
CC: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 arch/arm/boot/dts/Makefile                    |  2 +-
 ....dts => armada-385-linksys-wrt3200acm.dts} | 26 +++++++++----------
 2 files changed, 14 insertions(+), 14 deletions(-)
 rename arch/arm/boot/dts/{armada-385-linksys-rango.dts => armada-385-linksys-wrt3200acm.dts} (83%)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e8dd99201397..a0df7f97cc44 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1282,8 +1282,8 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
 	armada-385-db-ap.dtb \
 	armada-385-linksys-caiman.dtb \
 	armada-385-linksys-cobra.dtb \
-	armada-385-linksys-rango.dtb \
 	armada-385-linksys-shelby.dtb \
+	armada-385-linksys-wrt3200acm.dtb \
 	armada-385-synology-ds116.dtb \
 	armada-385-turris-omnia.dtb \
 	armada-388-clearfog.dtb \
diff --git a/arch/arm/boot/dts/armada-385-linksys-rango.dts b/arch/arm/boot/dts/armada-385-linksys-wrt3200acm.dts
similarity index 83%
rename from arch/arm/boot/dts/armada-385-linksys-rango.dts
rename to arch/arm/boot/dts/armada-385-linksys-wrt3200acm.dts
index 3c4af57ec2b9..bf7b546e3344 100644
--- a/arch/arm/boot/dts/armada-385-linksys-rango.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-wrt3200acm.dts
@@ -12,43 +12,43 @@
 
 / {
 	model = "Linksys WRT3200ACM";
-	compatible = "linksys,rango", "linksys,armada385", "marvell,armada385",
-		     "marvell,armada380";
+	compatible = "linksys,wrt3200acm", "linksys,rango", "linksys,armada385",
+		     "marvell,armada385", "marvell,armada380";
 };
 
 &expander0 {
 	wan_amber@0 {
-		label = "rango:amber:wan";
+		label = "wrt3200acm:amber:wan";
 		reg = <0x0>;
 	};
 
 	wan_white@1 {
-		label = "rango:white:wan";
+		label = "wrt3200acm:white:wan";
 		reg = <0x1>;
 	};
 
 	usb2@5 {
-		label = "rango:white:usb2";
+		label = "wrt3200acm:white:usb2";
 		reg = <0x5>;
 	};
 
 	usb3_1@6 {
-		label = "rango:white:usb3_1";
+		label = "wrt3200acm:white:usb3_1";
 		reg = <0x6>;
 	};
 
 	usb3_2@7 {
-		label = "rango:white:usb3_2";
+		label = "wrt3200acm:white:usb3_2";
 		reg = <0x7>;
 	};
 
 	wps_white@8 {
-		label = "rango:white:wps";
+		label = "wrt3200acm:white:wps";
 		reg = <0x8>;
 	};
 
 	wps_amber@9 {
-		label = "rango:amber:wps";
+		label = "wrt3200acm:amber:wps";
 		reg = <0x9>;
 	};
 };
@@ -56,22 +56,22 @@ wps_amber@9 {
 &gpio_leds {
 	power {
 		gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
-		label = "rango:white:power";
+		label = "wrt3200acm:white:power";
 	};
 
 	sata {
 		gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
-		label = "rango:white:sata";
+		label = "wrt3200acm:white:sata";
 	};
 
 	wlan_2g {
 		gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
-		label = "rango:white:wlan_2g";
+		label = "wrt3200acm:white:wlan_2g";
 	};
 
 	wlan_5g {
 		gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
-		label = "rango:white:wlan_5g";
+		label = "wrt3200acm:white:wlan_5g";
 	};
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 2/5] arm: dts: linksys: rename mamba to wrt1900ac
  2020-04-07 21:08 [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
  2020-04-07 21:08 ` [PATCH 1/5] arm: dts: linksys: rename rango to wrt3200acm Paul Spooren
@ 2020-04-07 21:08 ` Paul Spooren
  2020-04-07 21:08 ` [PATCH 3/5] arm: dts: linksys: rename cobra to wrt1900ac-v2 Paul Spooren
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Paul Spooren @ 2020-04-07 21:08 UTC (permalink / raw)
  To: devicetree
  Cc: linux-arm-kernel, linux-kernel, robh+dt, jason, andrew,
	gregory.clement, sebastian.hesselbarth, daniel, freifunk,
	Paul Spooren

Linksys uses internally the codename "mamba" for a device sold under
the name of "Linksys WRT1900AC", which is already reflected in the
device tree `model`. However the `compatible` list only contains the
codename `linksys,mamba` which does not relate to the common name.

This patch renames the `dts` file to the sanitized model name and
prepends `linksys,wrt1900ac` to the `compatible` list to simplify the
device relation.

Signed-off-by: Paul Spooren <mail@aparcar.org>
CC: Rob Herring <robh+dt@kernel.org>
CC: Jason Cooper <jason@lakedaemon.net>
CC: Andrew Lunn <andrew@lunn.ch>
CC: Gregory Clement <gregory.clement@bootlin.com>
CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
CC: Daniel Golle <daniel@makrotopia.org>
CC: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 arch/arm/boot/dts/Makefile                    |  2 +-
 ...ba.dts => armada-xp-linksys-wrt1900ac.dts} | 27 ++++++++++---------
 2 files changed, 15 insertions(+), 14 deletions(-)
 rename arch/arm/boot/dts/{armada-xp-linksys-mamba.dts => armada-xp-linksys-wrt1900ac.dts} (92%)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index a0df7f97cc44..cf288adb8fe0 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1302,7 +1302,7 @@ dtb-$(CONFIG_MACH_ARMADA_XP) += \
 	armada-xp-db-xc3-24g4xg.dtb \
 	armada-xp-gp.dtb \
 	armada-xp-lenovo-ix4-300d.dtb \
-	armada-xp-linksys-mamba.dtb \
+	armada-xp-linksys-wrt1900ac.dtb \
 	armada-xp-matrix.dtb \
 	armada-xp-netgear-rn2120.dtb \
 	armada-xp-openblocks-ax3-4.dtb \
diff --git a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts b/arch/arm/boot/dts/armada-xp-linksys-wrt1900ac.dts
similarity index 92%
rename from arch/arm/boot/dts/armada-xp-linksys-mamba.dts
rename to arch/arm/boot/dts/armada-xp-linksys-wrt1900ac.dts
index 8480a16919a0..2644870fec2c 100644
--- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+++ b/arch/arm/boot/dts/armada-xp-linksys-wrt1900ac.dts
@@ -23,8 +23,9 @@
 
 / {
 	model = "Linksys WRT1900AC";
-	compatible = "linksys,mamba", "marvell,armadaxp-mv78230",
-		     "marvell,armadaxp", "marvell,armada-370-xp";
+	compatible = "linksys,wrt1900ac", "linksys,mamba",
+		     "marvell,armadaxp-mv78230", "marvell,armadaxp",
+		     "marvell,armada-370-xp";
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
@@ -110,53 +111,53 @@ tlc59116@68 {
 					reg = <0x68>;
 
 					wan_amber@0 {
-						label = "mamba:amber:wan";
+						label = "wrt1900ac:amber:wan";
 						reg = <0x0>;
 					};
 
 					wan_white@1 {
-						label = "mamba:white:wan";
+						label = "wrt1900ac:white:wan";
 						reg = <0x1>;
 					};
 
 					wlan_2g@2 {
-						label = "mamba:white:wlan_2g";
+						label = "wrt1900ac:white:wlan_2g";
 						reg = <0x2>;
 					};
 
 					wlan_5g@3 {
-						label = "mamba:white:wlan_5g";
+						label = "wrt1900ac:white:wlan_5g";
 						reg = <0x3>;
 					};
 
 					esata@4 {
-						label = "mamba:white:esata";
+						label = "wrt1900ac:white:esata";
 						reg = <0x4>;
 						linux,default-trigger = "disk-activity";
 					};
 
 					usb2@5 {
-						label = "mamba:white:usb2";
+						label = "wrt1900ac:white:usb2";
 						reg = <0x5>;
 					};
 
 					usb3_1@6 {
-						label = "mamba:white:usb3_1";
+						label = "wrt1900ac:white:usb3_1";
 						reg = <0x6>;
 					};
 
 					usb3_2@7 {
-						label = "mamba:white:usb3_2";
+						label = "wrt1900ac:white:usb3_2";
 						reg = <0x7>;
 					};
 
 					wps_white@8 {
-						label = "mamba:white:wps";
+						label = "wrt1900ac:white:wps";
 						reg = <0x8>;
 					};
 
 					wps_amber@9 {
-						label = "mamba:amber:wps";
+						label = "wrt1900ac:amber:wps";
 						reg = <0x9>;
 					};
 				};
@@ -198,7 +199,7 @@ gpio-leds {
 		pinctrl-names = "default";
 
 		power {
-			label = "mamba:white:power";
+			label = "wrt1900ac:white:power";
 			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
 			default-state = "on";
 		};
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 3/5] arm: dts: linksys: rename cobra to wrt1900ac-v2
  2020-04-07 21:08 [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
  2020-04-07 21:08 ` [PATCH 1/5] arm: dts: linksys: rename rango to wrt3200acm Paul Spooren
  2020-04-07 21:08 ` [PATCH 2/5] arm: dts: linksys: rename mamba to wrt1900ac Paul Spooren
@ 2020-04-07 21:08 ` Paul Spooren
  2020-04-07 21:08 ` [PATCH 4/5] arm: dts: linksys: rename caiman to wrt1200ac Paul Spooren
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Paul Spooren @ 2020-04-07 21:08 UTC (permalink / raw)
  To: devicetree
  Cc: linux-arm-kernel, linux-kernel, robh+dt, jason, andrew,
	gregory.clement, sebastian.hesselbarth, daniel, freifunk,
	Paul Spooren

Linksys uses internally the codename "cobra" for a device sold under the
name of "Linksys WRT1900ACv2", which is already reflected in the device
tree `model`. However the `compatible` list only contains the codename
`linksys,cobra` which does not relate to the common name.

This patch renames the `dts` file to the sanitized model name and
prepends `linksys,wrt1900ac-v2` to the `compatible` list to simplify the
device relation.

For consistency with other models containing a version number a space
was added in the DT `model` to sepparate the *v2* and also reflected in
the `dts` filename containing `-v2`.

Signed-off-by: Paul Spooren <mail@aparcar.org>
CC: Rob Herring <robh+dt@kernel.org>
CC: Jason Cooper <jason@lakedaemon.net>
CC: Andrew Lunn <andrew@lunn.ch>
CC: Gregory Clement <gregory.clement@bootlin.com>
CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
CC: Daniel Golle <daniel@makrotopia.org>
CC: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 arch/arm/boot/dts/Makefile                    |  2 +-
 ...ts => armada-385-linksys-wrt1900ac-v2.dts} | 27 ++++++++++---------
 2 files changed, 15 insertions(+), 14 deletions(-)
 rename arch/arm/boot/dts/{armada-385-linksys-cobra.dts => armada-385-linksys-wrt1900ac-v2.dts} (78%)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index cf288adb8fe0..be45b5fb4f95 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1281,8 +1281,8 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
 	armada-385-db-88f6820-amc.dtb \
 	armada-385-db-ap.dtb \
 	armada-385-linksys-caiman.dtb \
-	armada-385-linksys-cobra.dtb \
 	armada-385-linksys-shelby.dtb \
+	armada-385-linksys-wrt1900ac-v2.dtb \
 	armada-385-linksys-wrt3200acm.dtb \
 	armada-385-synology-ds116.dtb \
 	armada-385-turris-omnia.dtb \
diff --git a/arch/arm/boot/dts/armada-385-linksys-cobra.dts b/arch/arm/boot/dts/armada-385-linksys-wrt1900ac-v2.dts
similarity index 78%
rename from arch/arm/boot/dts/armada-385-linksys-cobra.dts
rename to arch/arm/boot/dts/armada-385-linksys-wrt1900ac-v2.dts
index e3e4877a6f49..8f78350fa988 100644
--- a/arch/arm/boot/dts/armada-385-linksys-cobra.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-wrt1900ac-v2.dts
@@ -9,65 +9,66 @@
 #include "armada-385-linksys.dtsi"
 
 / {
-	model = "Linksys WRT1900ACv2";
-	compatible = "linksys,cobra", "linksys,armada385", "marvell,armada385",
+	model = "Linksys WRT1900AC v2";
+	compatible = "linksys,wrt1900ac-v2", "linksys,cobra",
+		     "linksys,armada385", "marvell,armada385",
 		     "marvell,armada380";
 };
 
 &expander0 {
 	wan_amber@0 {
-		label = "cobra:amber:wan";
+		label = "wrt1900ac-v2:amber:wan";
 		reg = <0x0>;
 	};
 
 	wan_white@1 {
-		label = "cobra:white:wan";
+		label = "wrt1900ac-v2:white:wan";
 		reg = <0x1>;
 	};
 
 	wlan_2g@2 {
-		label = "cobra:white:wlan_2g";
+		label = "wrt1900ac-v2:white:wlan_2g";
 		reg = <0x2>;
 	};
 
 	wlan_5g@3 {
-		label = "cobra:white:wlan_5g";
+		label = "wrt1900ac-v2:white:wlan_5g";
 		reg = <0x3>;
 	};
 
 	usb2@5 {
-		label = "cobra:white:usb2";
+		label = "wrt1900ac-v2:white:usb2";
 		reg = <0x5>;
 	};
 
 	usb3_1@6 {
-		label = "cobra:white:usb3_1";
+		label = "wrt1900ac-v2:white:usb3_1";
 		reg = <0x6>;
 	};
 
 	usb3_2@7 {
-		label = "cobra:white:usb3_2";
+		label = "wrt1900ac-v2:white:usb3_2";
 		reg = <0x7>;
 	};
 
 	wps_white@8 {
-		label = "cobra:white:wps";
+		label = "wrt1900ac-v2:white:wps";
 		reg = <0x8>;
 	};
 
 	wps_amber@9 {
-		label = "cobra:amber:wps";
+		label = "wrt1900ac-v2:amber:wps";
 		reg = <0x9>;
 	};
 };
 
 &gpio_leds {
 	power {
-		label = "cobra:white:power";
+		label = "wrt1900ac-v2:white:power";
 	};
 
 	sata {
-		label = "cobra:white:sata";
+		label = "wrt1900ac-v2:white:sata";
 	};
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 4/5] arm: dts: linksys: rename caiman to wrt1200ac
  2020-04-07 21:08 [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
                   ` (2 preceding siblings ...)
  2020-04-07 21:08 ` [PATCH 3/5] arm: dts: linksys: rename cobra to wrt1900ac-v2 Paul Spooren
@ 2020-04-07 21:08 ` Paul Spooren
  2020-04-07 21:08 ` [PATCH 5/5] arm: dts: linksys: rename shelby to wrt1900acs Paul Spooren
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: Paul Spooren @ 2020-04-07 21:08 UTC (permalink / raw)
  To: devicetree
  Cc: linux-arm-kernel, linux-kernel, robh+dt, jason, andrew,
	gregory.clement, sebastian.hesselbarth, daniel, freifunk,
	Paul Spooren

Linksys uses internally the codename "caiman" for a device sold under
the name of "Linksys WRT1200AC", which is already reflected in the
device tree `model`. However the `compatible` list only contains the
codename `linksys,caiman` which does not relate to the common name.

This patch renames the `dts` file to the sanitized model name and
prepends `linksys,wrt1200ac` to the `compatible` list to simplify the
device relation.

Signed-off-by: Paul Spooren <mail@aparcar.org>
CC: Rob Herring <robh+dt@kernel.org>
CC: Jason Cooper <jason@lakedaemon.net>
CC: Andrew Lunn <andrew@lunn.ch>
CC: Gregory Clement <gregory.clement@bootlin.com>
CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
CC: Daniel Golle <daniel@makrotopia.org>
CC: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 arch/arm/boot/dts/Makefile                    |  2 +-
 ...n.dts => armada-385-linksys-wrt1200ac.dts} | 26 +++++++++----------
 2 files changed, 14 insertions(+), 14 deletions(-)
 rename arch/arm/boot/dts/{armada-385-linksys-caiman.dts => armada-385-linksys-wrt1200ac.dts} (80%)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index be45b5fb4f95..8482bec35af4 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1280,8 +1280,8 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
 	armada-385-clearfog-gtr-l8.dtb \
 	armada-385-db-88f6820-amc.dtb \
 	armada-385-db-ap.dtb \
-	armada-385-linksys-caiman.dtb \
 	armada-385-linksys-shelby.dtb \
+	armada-385-linksys-wrt1200ac.dtb \
 	armada-385-linksys-wrt1900ac-v2.dtb \
 	armada-385-linksys-wrt3200acm.dtb \
 	armada-385-synology-ds116.dtb \
diff --git a/arch/arm/boot/dts/armada-385-linksys-caiman.dts b/arch/arm/boot/dts/armada-385-linksys-wrt1200ac.dts
similarity index 80%
rename from arch/arm/boot/dts/armada-385-linksys-caiman.dts
rename to arch/arm/boot/dts/armada-385-linksys-wrt1200ac.dts
index a03050c97084..acc8338987f5 100644
--- a/arch/arm/boot/dts/armada-385-linksys-caiman.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-wrt1200ac.dts
@@ -10,64 +10,64 @@
 
 / {
 	model = "Linksys WRT1200AC";
-	compatible = "linksys,caiman", "linksys,armada385", "marvell,armada385",
-		     "marvell,armada380";
+	compatible = "linksys,wrt1200ac", "linksys,caiman", "linksys,armada385",
+		     "marvell,armada385", "marvell,armada380";
 };
 
 &expander0 {
 	wan_amber@0 {
-		label = "caiman:amber:wan";
+		label = "wrt1200ac:amber:wan";
 		reg = <0x0>;
 	};
 
 	wan_white@1 {
-		label = "caiman:white:wan";
+		label = "wrt1200ac:white:wan";
 		reg = <0x1>;
 	};
 
 	wlan_2g@2 {
-		label = "caiman:white:wlan_2g";
+		label = "wrt1200ac:white:wlan_2g";
 		reg = <0x2>;
 	};
 
 	wlan_5g@3 {
-		label = "caiman:white:wlan_5g";
+		label = "wrt1200ac:white:wlan_5g";
 		reg = <0x3>;
 	};
 
 	usb2@5 {
-		label = "caiman:white:usb2";
+		label = "wrt1200ac:white:usb2";
 		reg = <0x5>;
 	};
 
 	usb3_1@6 {
-		label = "caiman:white:usb3_1";
+		label = "wrt1200ac:white:usb3_1";
 		reg = <0x6>;
 	};
 
 	usb3_2@7 {
-		label = "caiman:white:usb3_2";
+		label = "wrt1200ac:white:usb3_2";
 		reg = <0x7>;
 	};
 
 	wps_white@8 {
-		label = "caiman:white:wps";
+		label = "wrt1200ac:white:wps";
 		reg = <0x8>;
 	};
 
 	wps_amber@9 {
-		label = "caiman:amber:wps";
+		label = "wrt1200ac:amber:wps";
 		reg = <0x9>;
 	};
 };
 
 &gpio_leds {
 	power {
-		label = "caiman:white:power";
+		label = "wrt1200ac:white:power";
 	};
 
 	sata {
-		label = "caiman:white:sata";
+		label = "wrt1200ac:white:sata";
 	};
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 5/5] arm: dts: linksys: rename shelby to wrt1900acs
  2020-04-07 21:08 [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
                   ` (3 preceding siblings ...)
  2020-04-07 21:08 ` [PATCH 4/5] arm: dts: linksys: rename caiman to wrt1200ac Paul Spooren
@ 2020-04-07 21:08 ` Paul Spooren
  2020-04-07 21:08 ` [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
  2020-04-07 22:46 ` Andrew Lunn
  6 siblings, 0 replies; 13+ messages in thread
From: Paul Spooren @ 2020-04-07 21:08 UTC (permalink / raw)
  To: devicetree
  Cc: linux-arm-kernel, linux-kernel, robh+dt, jason, andrew,
	gregory.clement, sebastian.hesselbarth, daniel, freifunk,
	Paul Spooren

Linksys uses internally the codename "shelby" for a device sold under
the name of "Linksys WRT1900ACS", which is already reflected in the
device tree `model`. However the `compatible` list only contains the
codename `linksys,shelby` which does not relate to the common name.

This patch renames the `dts` file to the sanitized model name and
prepends `linksys,wrt1900acs` to the `compatible` list to simplify the
device relation.

Signed-off-by: Paul Spooren <mail@aparcar.org>
CC: Rob Herring <robh+dt@kernel.org>
CC: Jason Cooper <jason@lakedaemon.net>
CC: Andrew Lunn <andrew@lunn.ch>
CC: Gregory Clement <gregory.clement@bootlin.com>
CC: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
CC: Daniel Golle <daniel@makrotopia.org>
CC: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 arch/arm/boot/dts/Makefile                    |  2 +-
 ....dts => armada-385-linksys-wrt1900acs.dts} | 25 ++++++++++---------
 2 files changed, 14 insertions(+), 13 deletions(-)
 rename arch/arm/boot/dts/{armada-385-linksys-shelby.dts => armada-385-linksys-wrt1900acs.dts} (80%)

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 8482bec35af4..f59bcb23db91 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1280,9 +1280,9 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \
 	armada-385-clearfog-gtr-l8.dtb \
 	armada-385-db-88f6820-amc.dtb \
 	armada-385-db-ap.dtb \
-	armada-385-linksys-shelby.dtb \
 	armada-385-linksys-wrt1200ac.dtb \
 	armada-385-linksys-wrt1900ac-v2.dtb \
+	armada-385-linksys-wrt1900acs.dtb \
 	armada-385-linksys-wrt3200acm.dtb \
 	armada-385-synology-ds116.dtb \
 	armada-385-turris-omnia.dtb \
diff --git a/arch/arm/boot/dts/armada-385-linksys-shelby.dts b/arch/arm/boot/dts/armada-385-linksys-wrt1900acs.dts
similarity index 80%
rename from arch/arm/boot/dts/armada-385-linksys-shelby.dts
rename to arch/arm/boot/dts/armada-385-linksys-wrt1900acs.dts
index 3451cd3e5dff..866f3fad19fa 100644
--- a/arch/arm/boot/dts/armada-385-linksys-shelby.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-wrt1900acs.dts
@@ -10,64 +10,65 @@
 
 / {
 	model = "Linksys WRT1900ACS";
-	compatible = "linksys,shelby", "linksys,armada385", "marvell,armada385",
+	compatible = "linksys,wrt1900acs", "linksys,shelby",
+		     "linksys,armada385", "marvell,armada385",
 		     "marvell,armada380";
 };
 
 &expander0 {
 	wan_amber@0 {
-		label = "shelby:amber:wan";
+		label = "wrt1900acs:amber:wan";
 		reg = <0x0>;
 	};
 
 	wan_white@1 {
-		label = "shelby:white:wan";
+		label = "wrt1900acs:white:wan";
 		reg = <0x1>;
 	};
 
 	wlan_2g@2 {
-		label = "shelby:white:wlan_2g";
+		label = "wrt1900acs:white:wlan_2g";
 		reg = <0x2>;
 	};
 
 	wlan_5g@3 {
-		label = "shelby:white:wlan_5g";
+		label = "wrt1900acs:white:wlan_5g";
 		reg = <0x3>;
 	};
 
 	usb2@5 {
-		label = "shelby:white:usb2";
+		label = "wrt1900acs:white:usb2";
 		reg = <0x5>;
 	};
 
 	usb3_1@6 {
-		label = "shelby:white:usb3_1";
+		label = "wrt1900acs:white:usb3_1";
 		reg = <0x6>;
 	};
 
 	usb3_2@7 {
-		label = "shelby:white:usb3_2";
+		label = "wrt1900acs:white:usb3_2";
 		reg = <0x7>;
 	};
 
 	wps_white@8 {
-		label = "shelby:white:wps";
+		label = "wrt1900acs:white:wps";
 		reg = <0x8>;
 	};
 
 	wps_amber@9 {
-		label = "shelby:amber:wps";
+		label = "wrt1900acs:amber:wps";
 		reg = <0x9>;
 	};
 };
 
 &gpio_leds {
 	power {
-		label = "shelby:white:power";
+		label = "wrt1900acs:white:power";
 	};
 
 	sata {
-		label = "shelby:white:sata";
+		label = "wrt1900acs:white:sata";
 	};
 };
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 0/5] arm: dts: linksys: rename codename to model
  2020-04-07 21:08 [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
                   ` (4 preceding siblings ...)
  2020-04-07 21:08 ` [PATCH 5/5] arm: dts: linksys: rename shelby to wrt1900acs Paul Spooren
@ 2020-04-07 21:08 ` Paul Spooren
  2020-04-07 22:46 ` Andrew Lunn
  6 siblings, 0 replies; 13+ messages in thread
From: Paul Spooren @ 2020-04-07 21:08 UTC (permalink / raw)
  To: devicetree
  Cc: linux-arm-kernel, linux-kernel, robh+dt, jason, andrew,
	gregory.clement, sebastian.hesselbarth, daniel, freifunk

Linksys chose to use codenames for a few of their devices and sell their
them under an entirely different name.

codename  model name
rango  -> wrt3200acm
mamba  -> wrt1900ac
cobra  -> wrt1900ac-v2
caiman -> wrt1200ac
shelby -> wrt1900acs

This introduces some extra loops in OpenWrt, a distribution specialized
on embedded Internet facing devices, as both codename and model name are
used within the build system. The double naming requires developers to
keep track of that mapping and introduces inconsistencies:

To build a specific device in OpenWrt profiles are used, named after the
device model, e.g. `wrt3200acm`. However as device tree is used and the
first item of the DT `compatible` list is `linksys,rango`, the running
device identifies itself as `linksys,rango`.

Such double naming complicates currently the automatic search for
firmware upgrade as the build system does not support such mapping.
Ideally the first item of the DT `compatible` list would contain a
string reasonable similar to the DT `model`.

With this patch set the Linksys device tree files are moved from
containing the codename to contain a sanitized model name and also use
it as first entry of the DT `compatible` list.

Paul Spooren (5):
  arm: dts: linksys: rename rango to wrt3200acm
  arm: dts: linksys: rename mamba to wrt1900ac
  arm: dts: linksys: rename cobra to wrt1900acv2
  arm: dts: linksys: rename caiman to wrt1200ac
  arm: dts: linksys: rename shelby to wrt1900acsv

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/5] arm: dts: linksys: rename codename to model
  2020-04-07 21:08 [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
                   ` (5 preceding siblings ...)
  2020-04-07 21:08 ` [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
@ 2020-04-07 22:46 ` Andrew Lunn
  2020-04-07 23:38   ` Paul Spooren
  6 siblings, 1 reply; 13+ messages in thread
From: Andrew Lunn @ 2020-04-07 22:46 UTC (permalink / raw)
  To: Paul Spooren
  Cc: devicetree, linux-arm-kernel, linux-kernel, robh+dt, jason,
	gregory.clement, sebastian.hesselbarth, daniel, freifunk

On Tue, Apr 07, 2020 at 11:08:10AM -1000, Paul Spooren wrote:
> Linksys chose to use codenames for a few of their devices and sell their
> them under an entirely different name.
> 
> codename  model name
> rango  -> wrt3200acm
> mamba  -> wrt1900ac
> cobra  -> wrt1900ac-v2
> caiman -> wrt1200ac
> shelby -> wrt1900acs

Hi Paul

There was quite a bit of discussion about this when the first board
was added. If i remember correctly, it was Mamba.

Imre Kaloz, <kaloz@openwrt.org> was the one arguing for
the name armada-xp-linksys-mamba.dts.

So it seems that openwrt.org has now come full circle?

> This introduces some extra loops in OpenWrt, a distribution specialized
> on embedded Internet facing devices, as both codename and model name are
> used within the build system. The double naming requires developers to
> keep track of that mapping and introduces inconsistencies:
> 
> To build a specific device in OpenWrt profiles are used, named after the
> the compatible string for targets using device tree (similar to how .dts
> files are named in the linux source tree). However, the first item of
> the DT `compatible` list in this case is `linksys,rango`, which is
> inconsistent with the model name and not what common users would expect.
> 
> Such double naming complicates currently the automatic search for
> firmware upgrade as the build system does not support such mapping.
> Ideally the first item of the DT `compatible` list would contain a
> string suitable to be used as a filename recognizable by normal users to
> belong to that device.

> With this patch set the Linksys device tree files are moved from
> containing the codename to contain a sanitized model name and also use
> it as first entry of the DT `compatible` list.

I've no problems adding another compatible to the list. But i don't
like the idea of renaming the files. The file names could be
considered ABI! What installers/bootloaders are you going to break by
renaming them?

	   Andrew

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/5] arm: dts: linksys: rename codename to model
  2020-04-07 22:46 ` Andrew Lunn
@ 2020-04-07 23:38   ` Paul Spooren
  2020-04-08  0:07     ` Florian Fainelli
  2020-04-08  0:09     ` Andrew Lunn
  0 siblings, 2 replies; 13+ messages in thread
From: Paul Spooren @ 2020-04-07 23:38 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: devicetree, linux-arm-kernel, linux-kernel, robh+dt, jason,
	gregory.clement, sebastian.hesselbarth, daniel, freifunk, kaloz

Hi Andrew,

thank you very much for the quick response!

On Wed, 2020-04-08 at 00:46 +0200, Andrew Lunn wrote:
> On Tue, Apr 07, 2020 at 11:08:10AM -1000, Paul Spooren wrote:
> > Linksys chose to use codenames for a few of their devices and sell
> > their
> > them under an entirely different name.
> > 
> > codename  model name
> > rango  -> wrt3200acm
> > mamba  -> wrt1900ac
> > cobra  -> wrt1900ac-v2
> > caiman -> wrt1200ac
> > shelby -> wrt1900acs
> 
> Hi Paul
> 
> There was quite a bit of discussion about this when the first board
> was added. If i remember correctly, it was Mamba.
> 
> Imre Kaloz, <kaloz@openwrt.org> was the one arguing for
> the name armada-xp-linksys-mamba.dts.
> 
> So it seems that openwrt.org has now come full circle?

I talked with three currently active OpenWrt core developers and all
were in favor of a unification. I wasn't aware of any previous
discussions nor any pro arguments to keep code names.

I've added Imre via CC so maybe he can share his opinion, too.
> 
> > This introduces some extra loops in OpenWrt, a distribution
> > specialized
> > on embedded Internet facing devices, as both codename and model
> > name are
> > used within the build system. The double naming requires developers
> > to
> > keep track of that mapping and introduces inconsistencies:
> > 
> > To build a specific device in OpenWrt profiles are used, named
> > after the
> > the compatible string for targets using device tree (similar to how
> > .dts
> > files are named in the linux source tree). However, the first item
> > of
> > the DT `compatible` list in this case is `linksys,rango`, which is
> > inconsistent with the model name and not what common users would
> > expect.
> > 
> > Such double naming complicates currently the automatic search for
> > firmware upgrade as the build system does not support such mapping.
> > Ideally the first item of the DT `compatible` list would contain a
> > string suitable to be used as a filename recognizable by normal
> > users to
> > belong to that device.
> > With this patch set the Linksys device tree files are moved from
> > containing the codename to contain a sanitized model name and also
> > use
> > it as first entry of the DT `compatible` list.
> 
> I've no problems adding another compatible to the list. But i don't
> like the idea of renaming the files. The file names could be
> considered ABI! What installers/bootloaders are you going to break by
> renaming them?

Are you okay with adding the new compatible string as first element of
the list? This would already simplify the OpenWrt build system.

What about the changed labels? Are they considered ABI too?

Regarding file names, I'm new to ABI policies. Within OpenWrt this is
all done via a single line patch, I'm not familiar with any other
installers/bootloaders. 

If renaming is a reason not to merge this I'd send a v2 containing only
the the added compatible list and updated labels.

Best,
Paul


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/5] arm: dts: linksys: rename codename to model
  2020-04-07 23:38   ` Paul Spooren
@ 2020-04-08  0:07     ` Florian Fainelli
       [not found]       ` <VI1PR02MB5325621D39BF0FFAFE3993C4A0C00@VI1PR02MB5325.eurprd02.prod.outlook.com>
  2020-04-08  0:09     ` Andrew Lunn
  1 sibling, 1 reply; 13+ messages in thread
From: Florian Fainelli @ 2020-04-08  0:07 UTC (permalink / raw)
  To: Paul Spooren, Andrew Lunn
  Cc: devicetree, jason, gregory.clement, linux-kernel, daniel,
	freifunk, robh+dt, kaloz, linux-arm-kernel,
	sebastian.hesselbarth



On 4/7/2020 4:38 PM, Paul Spooren wrote:
> Hi Andrew,
> 
> thank you very much for the quick response!
> 
> On Wed, 2020-04-08 at 00:46 +0200, Andrew Lunn wrote:
>> On Tue, Apr 07, 2020 at 11:08:10AM -1000, Paul Spooren wrote:
>>> Linksys chose to use codenames for a few of their devices and sell
>>> their
>>> them under an entirely different name.
>>>
>>> codename  model name
>>> rango  -> wrt3200acm
>>> mamba  -> wrt1900ac
>>> cobra  -> wrt1900ac-v2
>>> caiman -> wrt1200ac
>>> shelby -> wrt1900acs
>>
>> Hi Paul
>>
>> There was quite a bit of discussion about this when the first board
>> was added. If i remember correctly, it was Mamba.
>>
>> Imre Kaloz, <kaloz@openwrt.org> was the one arguing for
>> the name armada-xp-linksys-mamba.dts.
>>
>> So it seems that openwrt.org has now come full circle?
> 
> I talked with three currently active OpenWrt core developers and all
> were in favor of a unification. I wasn't aware of any previous
> discussions nor any pro arguments to keep code names.
> 
> I've added Imre via CC so maybe he can share his opinion, too.
>>
>>> This introduces some extra loops in OpenWrt, a distribution
>>> specialized
>>> on embedded Internet facing devices, as both codename and model
>>> name are
>>> used within the build system. The double naming requires developers
>>> to
>>> keep track of that mapping and introduces inconsistencies:
>>>
>>> To build a specific device in OpenWrt profiles are used, named
>>> after the
>>> the compatible string for targets using device tree (similar to how
>>> .dts
>>> files are named in the linux source tree). However, the first item
>>> of
>>> the DT `compatible` list in this case is `linksys,rango`, which is
>>> inconsistent with the model name and not what common users would
>>> expect.
>>>
>>> Such double naming complicates currently the automatic search for
>>> firmware upgrade as the build system does not support such mapping.
>>> Ideally the first item of the DT `compatible` list would contain a
>>> string suitable to be used as a filename recognizable by normal
>>> users to
>>> belong to that device.
>>> With this patch set the Linksys device tree files are moved from
>>> containing the codename to contain a sanitized model name and also
>>> use
>>> it as first entry of the DT `compatible` list.
>>
>> I've no problems adding another compatible to the list. But i don't
>> like the idea of renaming the files. The file names could be
>> considered ABI! What installers/bootloaders are you going to break by
>> renaming them?
> 
> Are you okay with adding the new compatible string as first element of
> the list? This would already simplify the OpenWrt build system.

Having a mapping table between model names in OpenWrt profiles and .dts
file names in the kernel sources is not that complicated to maintain,
changing the kernel for that reason sounds a bit weak IMHO.
-- 
Florian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/5] arm: dts: linksys: rename codename to model
  2020-04-07 23:38   ` Paul Spooren
  2020-04-08  0:07     ` Florian Fainelli
@ 2020-04-08  0:09     ` Andrew Lunn
  1 sibling, 0 replies; 13+ messages in thread
From: Andrew Lunn @ 2020-04-08  0:09 UTC (permalink / raw)
  To: Paul Spooren
  Cc: devicetree, linux-arm-kernel, linux-kernel, robh+dt, jason,
	gregory.clement, sebastian.hesselbarth, daniel, freifunk, kaloz

On Tue, Apr 07, 2020 at 01:38:17PM -1000, Paul Spooren wrote:
> Hi Andrew,
> 
> thank you very much for the quick response!
> Are you okay with adding the new compatible string as first element of
> the list? This would already simplify the OpenWrt build system.

That should be fine. OF will keep searching from first till last for a
match. 

> What about the changed labels? Are they considered ABI too?

You mean LED names. I would consider those ABI. People can have
scripts which configure the LEDs how they want, blinking heartbeat,
etc.

> Regarding file names, I'm new to ABI policies. Within OpenWrt this is
> all done via a single line patch, I'm not familiar with any other
> installers/bootloaders. 

Well, it would break how i boot my wrt1900ac. I tftpboot it, grabbing
both the kernel and the DB blob from my TFTP server. If the blob
changes names, i would need to modify my uboot configuration. 

I don't know if Debian has full support for any of these boards, but
if i remember correctly, flash-kernel has a database of machine names
and DTB file names. My wrt1900ac is quite happy running Debian, but i
don't have it booting the Debian way, because i use it for kernel
hacking. But maybe there are people out there that do.

	 Andrew

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/5] arm: dts: linksys: rename codename to model
       [not found]       ` <VI1PR02MB5325621D39BF0FFAFE3993C4A0C00@VI1PR02MB5325.eurprd02.prod.outlook.com>
@ 2020-04-08 16:23         ` Daniel Golle
  2020-04-10  9:49           ` Paul Spooren
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Golle @ 2020-04-08 16:23 UTC (permalink / raw)
  To: Imre Kaloz
  Cc: Florian Fainelli, Paul Spooren, Andrew Lunn, devicetree, jason,
	gregory.clement, linux-kernel, freifunk, robh+dt, kaloz,
	linux-arm-kernel, sebastian.hesselbarth

Hi Imre,

On Wed, Apr 08, 2020 at 08:32:41AM +0000, Imre Kaloz wrote:
> Hi,
> 
> I'm on the same page here - this has not an issue for years. The common sense and policy was always to reject kernel changes that would only make the userland's job easier - and here were are not even talking about the userland, but a script that's being used for image generation.
> 
> The reason codenames are preffered to marketing names is simple: the same board can be sold under multiple marketing names.
> 
> The Linksys Viper has been sold as E4200v2 and EA4500. The Linksys Focus as EA6100 and EA5800. The LeMans is the EA6300 and the EA6200. The Macan is both EA7500 and EA7400 - on the other hand, the EA7500v2 and the EA7400v2 are the Savannah.

What Paul, Adian and others are trying to achieve here is consistency.
See also the debate on openwrt-devel:

http://lists.infradead.org/pipermail/openwrt-devel/2020-April/022567.html

The goal is to make it easier for users and semi-automated processes
to identify the right OpenWrt image for a specific device.
This especially becomes necessary for OTA updates and we have invested
quite a bit of work to no longer need to scrape and translate that
with additional layers of abstraction but simply use the first (ie.
most significant) compatible from DTS to indentify the right image.

As product-name aliases are indeed very common, we usually deal with it
in a way that the first product name which hits the OpenWrt tree is
used for model, compatible, DTS- and image filenames. We then add
aliases to that in our build-scripts which allows web-based wizards and
such to match the alternative names as well when entered by the user.


> 
> 
> Best,
> 
> Imre
> 
> ________________________________
> From: Florian Fainelli <f.fainelli@gmail.com>
> Sent: Wednesday, April 8, 2020 2:07:38 AM
> To: Paul Spooren <mail@aparcar.org>; Andrew Lunn <andrew@lunn.ch>
> Cc: devicetree@vger.kernel.org <devicetree@vger.kernel.org>; jason@lakedaemon.net <jason@lakedaemon.net>; gregory.clement@bootlin.com <gregory.clement@bootlin.com>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; daniel@makrotopia.org <daniel@makrotopia.org>; freifunk@adrianschmutzler.de <freifunk@adrianschmutzler.de>; robh+dt@kernel.org <robh+dt@kernel.org>; kaloz@openwrt.org <kaloz@openwrt.org>; linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org>; sebastian.hesselbarth@gmail.com <sebastian.hesselbarth@gmail.com>
> Subject: Re: [PATCH 0/5] arm: dts: linksys: rename codename to model
> 
> 
> 
> On 4/7/2020 4:38 PM, Paul Spooren wrote:
> > Hi Andrew,
> >
> > thank you very much for the quick response!
> >
> > On Wed, 2020-04-08 at 00:46 +0200, Andrew Lunn wrote:
> >> On Tue, Apr 07, 2020 at 11:08:10AM -1000, Paul Spooren wrote:
> >>> Linksys chose to use codenames for a few of their devices and sell
> >>> their
> >>> them under an entirely different name.
> >>>
> >>> codename  model name
> >>> rango  -> wrt3200acm
> >>> mamba  -> wrt1900ac
> >>> cobra  -> wrt1900ac-v2
> >>> caiman -> wrt1200ac
> >>> shelby -> wrt1900acs
> >>
> >> Hi Paul
> >>
> >> There was quite a bit of discussion about this when the first board
> >> was added. If i remember correctly, it was Mamba.
> >>
> >> Imre Kaloz, <kaloz@openwrt.org> was the one arguing for
> >> the name armada-xp-linksys-mamba.dts.
> >>
> >> So it seems that openwrt.org has now come full circle?
> >
> > I talked with three currently active OpenWrt core developers and all
> > were in favor of a unification. I wasn't aware of any previous
> > discussions nor any pro arguments to keep code names.
> >
> > I've added Imre via CC so maybe he can share his opinion, too.
> >>
> >>> This introduces some extra loops in OpenWrt, a distribution
> >>> specialized
> >>> on embedded Internet facing devices, as both codename and model
> >>> name are
> >>> used within the build system. The double naming requires developers
> >>> to
> >>> keep track of that mapping and introduces inconsistencies:
> >>>
> >>> To build a specific device in OpenWrt profiles are used, named
> >>> after the
> >>> the compatible string for targets using device tree (similar to how
> >>> .dts
> >>> files are named in the linux source tree). However, the first item
> >>> of
> >>> the DT `compatible` list in this case is `linksys,rango`, which is
> >>> inconsistent with the model name and not what common users would
> >>> expect.
> >>>
> >>> Such double naming complicates currently the automatic search for
> >>> firmware upgrade as the build system does not support such mapping.
> >>> Ideally the first item of the DT `compatible` list would contain a
> >>> string suitable to be used as a filename recognizable by normal
> >>> users to
> >>> belong to that device.
> >>> With this patch set the Linksys device tree files are moved from
> >>> containing the codename to contain a sanitized model name and also
> >>> use
> >>> it as first entry of the DT `compatible` list.
> >>
> >> I've no problems adding another compatible to the list. But i don't
> >> like the idea of renaming the files. The file names could be
> >> considered ABI! What installers/bootloaders are you going to break by
> >> renaming them?
> >
> > Are you okay with adding the new compatible string as first element of
> > the list? This would already simplify the OpenWrt build system.
> 
> Having a mapping table between model names in OpenWrt profiles and .dts
> file names in the kernel sources is not that complicated to maintain,
> changing the kernel for that reason sounds a bit weak IMHO.
> --
> Florian

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/5] arm: dts: linksys: rename codename to model
  2020-04-08 16:23         ` Daniel Golle
@ 2020-04-10  9:49           ` Paul Spooren
  0 siblings, 0 replies; 13+ messages in thread
From: Paul Spooren @ 2020-04-10  9:49 UTC (permalink / raw)
  To: Daniel Golle, Imre Kaloz
  Cc: Florian Fainelli, Andrew Lunn, devicetree, jason,
	gregory.clement, linux-kernel, freifunk, robh+dt, kaloz,
	linux-arm-kernel, sebastian.hesselbarth

On Wed, 2020-04-08 at 17:23 +0100, Daniel Golle wrote:
> Hi Imre,
> 
> On Wed, Apr 08, 2020 at 08:32:41AM +0000, Imre Kaloz wrote:
> > Hi,
> > 
> > I'm on the same page here - this has not an issue for years. The
> > common sense and policy was always to reject kernel changes that
> > would only make the userland's job easier - and here were are not
> > even talking about the userland, but a script that's being used for
> > image generation.
> > 
> > The reason codenames are preffered to marketing names is simple:
> > the same board can be sold under multiple marketing names.
> > 
> > The Linksys Viper has been sold as E4200v2 and EA4500. The Linksys
> > Focus as EA6100 and EA5800. The LeMans is the EA6300 and the
> > EA6200. The Macan is both EA7500 and EA7400 - on the other hand,
> > the EA7500v2 and the EA7400v2 are the Savannah.
> 
> What Paul, Adian and others are trying to achieve here is
> consistency.
> See also the debate on openwrt-devel:
> 
> http://lists.infradead.org/pipermail/openwrt-devel/2020-April/022567.html
> 
> The goal is to make it easier for users and semi-automated processes
> to identify the right OpenWrt image for a specific device.
> This especially becomes necessary for OTA updates and we have
> invested
> quite a bit of work to no longer need to scrape and translate that
> with additional layers of abstraction but simply use the first (ie.
> most significant) compatible from DTS to indentify the right image.
> 
> As product-name aliases are indeed very common, we usually deal with
> it
> in a way that the first product name which hits the OpenWrt tree is
> used for model, compatible, DTS- and image filenames. We then add
> aliases to that in our build-scripts which allows web-based wizards
> and
> such to match the alternative names as well when entered by the user.

I think if renaming of the label names is out of the questions (for ABI
stability), the situation becomes worse adding the OpenWrt profile-name 
as first item to the compatible list: The OpenWrt build system would
use internally `linksys_wrt3200acm` while other scripts for LEDs would
still use `rango`.

Therefore I'd suggest to reject the patch and I'll see if we apply them
within OpenWrt only or come up with something entirely different.

Thanks everyone for your time, this first Kernel patch run was a bit
exciting!

Stay safe & healthy,
Paul

> 
> 
> > 
> > Best,
> > 
> > Imre
> > 
> > ________________________________
> > From: Florian Fainelli <f.fainelli@gmail.com>
> > Sent: Wednesday, April 8, 2020 2:07:38 AM
> > To: Paul Spooren <mail@aparcar.org>; Andrew Lunn <andrew@lunn.ch>
> > Cc: devicetree@vger.kernel.org <devicetree@vger.kernel.org>; 
> > jason@lakedaemon.net <jason@lakedaemon.net>; 
> > gregory.clement@bootlin.com <gregory.clement@bootlin.com>; 
> > linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; 
> > daniel@makrotopia.org <daniel@makrotopia.org>; 
> > freifunk@adrianschmutzler.de <freifunk@adrianschmutzler.de>; 
> > robh+dt@kernel.org <robh+dt@kernel.org>; kaloz@openwrt.org <
> > kaloz@openwrt.org>; linux-arm-kernel@lists.infradead.org <
> > linux-arm-kernel@lists.infradead.org>; 
> > sebastian.hesselbarth@gmail.com <sebastian.hesselbarth@gmail.com>
> > Subject: Re: [PATCH 0/5] arm: dts: linksys: rename codename to
> > model
> > 
> > 
> > 
> > On 4/7/2020 4:38 PM, Paul Spooren wrote:
> > > Hi Andrew,
> > > 
> > > thank you very much for the quick response!
> > > 
> > > On Wed, 2020-04-08 at 00:46 +0200, Andrew Lunn wrote:
> > > > On Tue, Apr 07, 2020 at 11:08:10AM -1000, Paul Spooren wrote:
> > > > > Linksys chose to use codenames for a few of their devices and
> > > > > sell
> > > > > their
> > > > > them under an entirely different name.
> > > > > 
> > > > > codename  model name
> > > > > rango  -> wrt3200acm
> > > > > mamba  -> wrt1900ac
> > > > > cobra  -> wrt1900ac-v2
> > > > > caiman -> wrt1200ac
> > > > > shelby -> wrt1900acs
> > > > 
> > > > Hi Paul
> > > > 
> > > > There was quite a bit of discussion about this when the first
> > > > board
> > > > was added. If i remember correctly, it was Mamba.
> > > > 
> > > > Imre Kaloz, <kaloz@openwrt.org> was the one arguing for
> > > > the name armada-xp-linksys-mamba.dts.
> > > > 
> > > > So it seems that openwrt.org has now come full circle?
> > > 
> > > I talked with three currently active OpenWrt core developers and
> > > all
> > > were in favor of a unification. I wasn't aware of any previous
> > > discussions nor any pro arguments to keep code names.
> > > 
> > > I've added Imre via CC so maybe he can share his opinion, too.
> > > > > This introduces some extra loops in OpenWrt, a distribution
> > > > > specialized
> > > > > on embedded Internet facing devices, as both codename and
> > > > > model
> > > > > name are
> > > > > used within the build system. The double naming requires
> > > > > developers
> > > > > to
> > > > > keep track of that mapping and introduces inconsistencies:
> > > > > 
> > > > > To build a specific device in OpenWrt profiles are used,
> > > > > named
> > > > > after the
> > > > > the compatible string for targets using device tree (similar
> > > > > to how
> > > > > .dts
> > > > > files are named in the linux source tree). However, the first
> > > > > item
> > > > > of
> > > > > the DT `compatible` list in this case is `linksys,rango`,
> > > > > which is
> > > > > inconsistent with the model name and not what common users
> > > > > would
> > > > > expect.
> > > > > 
> > > > > Such double naming complicates currently the automatic search
> > > > > for
> > > > > firmware upgrade as the build system does not support such
> > > > > mapping.
> > > > > Ideally the first item of the DT `compatible` list would
> > > > > contain a
> > > > > string suitable to be used as a filename recognizable by
> > > > > normal
> > > > > users to
> > > > > belong to that device.
> > > > > With this patch set the Linksys device tree files are moved
> > > > > from
> > > > > containing the codename to contain a sanitized model name and
> > > > > also
> > > > > use
> > > > > it as first entry of the DT `compatible` list.
> > > > 
> > > > I've no problems adding another compatible to the list. But i
> > > > don't
> > > > like the idea of renaming the files. The file names could be
> > > > considered ABI! What installers/bootloaders are you going to
> > > > break by
> > > > renaming them?
> > > 
> > > Are you okay with adding the new compatible string as first
> > > element of
> > > the list? This would already simplify the OpenWrt build system.
> > 
> > Having a mapping table between model names in OpenWrt profiles and
> > .dts
> > file names in the kernel sources is not that complicated to
> > maintain,
> > changing the kernel for that reason sounds a bit weak IMHO.
> > --
> > Florian


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-04-10  9:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 21:08 [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
2020-04-07 21:08 ` [PATCH 1/5] arm: dts: linksys: rename rango to wrt3200acm Paul Spooren
2020-04-07 21:08 ` [PATCH 2/5] arm: dts: linksys: rename mamba to wrt1900ac Paul Spooren
2020-04-07 21:08 ` [PATCH 3/5] arm: dts: linksys: rename cobra to wrt1900ac-v2 Paul Spooren
2020-04-07 21:08 ` [PATCH 4/5] arm: dts: linksys: rename caiman to wrt1200ac Paul Spooren
2020-04-07 21:08 ` [PATCH 5/5] arm: dts: linksys: rename shelby to wrt1900acs Paul Spooren
2020-04-07 21:08 ` [PATCH 0/5] arm: dts: linksys: rename codename to model Paul Spooren
2020-04-07 22:46 ` Andrew Lunn
2020-04-07 23:38   ` Paul Spooren
2020-04-08  0:07     ` Florian Fainelli
     [not found]       ` <VI1PR02MB5325621D39BF0FFAFE3993C4A0C00@VI1PR02MB5325.eurprd02.prod.outlook.com>
2020-04-08 16:23         ` Daniel Golle
2020-04-10  9:49           ` Paul Spooren
2020-04-08  0:09     ` Andrew Lunn

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).