Subject: [PATCH 0/4] ASUS RT-AC3100 and ASUS RT-AC88U device tree improvements

Hello.

This patch series introduces small improvements to the device trees of ASUS
RT-AC3100 and ASUS RT-AC88U.

Signed-off-by: Arınç ÜNAL <[email protected]>
---
Arınç ÜNAL (4):
ARM: dts: BCM5301X: use color and function on ASUS RT-AC3100 and RT-AC88U
ARM: dts: BCM5301X: provide address for SoC MACs on ASUS RT-AC3100 & AC88U
ARM: dts: BCM5301X: remove duplicate compatible on ASUS RT-AC3100 & AC88U
ARM: dts: BCM5301X: remove earlycon on ASUS RT-AC3100 and ASUS RT-AC88U

.../boot/dts/broadcom/bcm47094-asus-rt-ac3100.dts | 13 ++++-
.../boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi | 59 ++++++++++++----------
.../boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts | 8 ++-
3 files changed, 51 insertions(+), 29 deletions(-)
---
base-commit: 011d79ef1cfad701c2d8e7e80d8c77523af9c771
change-id: 20240413-for-soc-asus-rt-ac3100-improvements-c0ba44653bc3

Best regards,
--
Arınç ÜNAL <[email protected]>




Subject: [PATCH 3/4] ARM: dts: BCM5301X: remove duplicate compatible on ASUS RT-AC3100 & AC88U

From: Arınç ÜNAL <[email protected]>

The compatible property on the node with the srab handle is already
described with the same value on the included device tree. Remove it.

Signed-off-by: Arınç ÜNAL <[email protected]>
---
arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi | 1 -
1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi b/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi
index 9271792a9e44..84d583168d81 100644
--- a/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi
@@ -101,7 +101,6 @@ button-wps {
};

&srab {
- compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
status = "okay";

ports {

--
2.40.1



Subject: [PATCH 2/4] ARM: dts: BCM5301X: provide address for SoC MACs on ASUS RT-AC3100 & AC88U

From: Arınç ÜNAL <[email protected]>

Do not leave the providing of a MAC address for an SoC MAC to a driver.
Describe it on the bindings. Provide a distinct MAC address for each SoC
MAC.

Signed-off-by: Arınç ÜNAL <[email protected]>
---
arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dts | 13 ++++++++++++-
arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts | 8 +++++++-
2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dts b/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dts
index 5f089307cd8c..1655ac95769c 100644
--- a/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dts
+++ b/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dts
@@ -13,11 +13,22 @@ / {

nvram@1c080000 {
et0macaddr: et0macaddr {
+ #nvmem-cell-cells = <1>;
};
};
};

&gmac0 {
- nvmem-cells = <&et0macaddr>;
+ nvmem-cells = <&et0macaddr 0>;
+ nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+ nvmem-cells = <&et0macaddr 1>;
+ nvmem-cell-names = "mac-address";
+};
+
+&gmac2 {
+ nvmem-cells = <&et0macaddr 2>;
nvmem-cell-names = "mac-address";
};
diff --git a/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts b/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts
index fd344b55087e..c78f0c7b137d 100644
--- a/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts
+++ b/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac88u.dts
@@ -13,6 +13,7 @@ / {

nvram@1c080000 {
et1macaddr: et1macaddr {
+ #nvmem-cell-cells = <1>;
};
};

@@ -117,6 +118,11 @@ &gmac0 {
};

&gmac1 {
- nvmem-cells = <&et1macaddr>;
+ nvmem-cells = <&et1macaddr 0>;
+ nvmem-cell-names = "mac-address";
+};
+
+&gmac2 {
+ nvmem-cells = <&et1macaddr 1>;
nvmem-cell-names = "mac-address";
};

--
2.40.1



Subject: [PATCH 1/4] ARM: dts: BCM5301X: use color and function on ASUS RT-AC3100 and RT-AC88U

From: Arınç ÜNAL <[email protected]>

As the label property for LEDs is deprecated, use the color and function
properties to describe the LEDs on the device tree file for ASUS RT-AC3100
and ASUS RT-AC88U. Reorder the LED and button nodes in alphabetical order.

Signed-off-by: Arınç ÜNAL <[email protected]>
---
.../boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi | 54 +++++++++++++---------
1 file changed, 32 insertions(+), 22 deletions(-)

diff --git a/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi b/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi
index 09cefce27fb1..9271792a9e44 100644
--- a/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi
@@ -6,6 +6,8 @@
#include "bcm47094.dtsi"
#include "bcm5301x-nand-cs0-bch8.dtsi"

+#include <dt-bindings/leds/common.h>
+
/ {
chosen {
bootargs = "earlycon";
@@ -25,38 +27,46 @@ nvram@1c080000 {
leds {
compatible = "gpio-leds";

+ led-lan {
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_LAN;
+ gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
+ };
+
led-power {
- label = "white:power";
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_POWER;
gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
linux,default-trigger = "default-on";
};

- led-wan-red {
- label = "red:wan";
- gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
- };
-
- led-lan {
- label = "white:lan";
- gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
- };
-
led-usb2 {
- label = "white:usb2";
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_USB;
+ function-enumerator = <1>;
gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
trigger-sources = <&ehci_port2>;
linux,default-trigger = "usbport";
};

led-usb3 {
- label = "white:usb3";
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_USB;
+ function-enumerator = <2>;
gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
trigger-sources = <&ehci_port1>, <&xhci_port1>;
linux,default-trigger = "usbport";
};

+ led-wan-red {
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_WAN;
+ gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
+ };
+
led-wps {
- label = "white:wps";
+ color = <LED_COLOR_ID_WHITE>;
+ function = LED_FUNCTION_WPS;
gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
};
};
@@ -64,10 +74,10 @@ led-wps {
gpio-keys {
compatible = "gpio-keys";

- button-wps {
- label = "WPS";
- linux,code = <KEY_WPS_BUTTON>;
- gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
+ button-led {
+ label = "Backlight";
+ linux,code = <KEY_BRIGHTNESS_ZERO>;
+ gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
};

button-reset {
@@ -82,10 +92,10 @@ button-wifi {
gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
};

- button-led {
- label = "Backlight";
- linux,code = <KEY_BRIGHTNESS_ZERO>;
- gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
+ button-wps {
+ label = "WPS";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
};
};
};

--
2.40.1



Subject: [PATCH 4/4] ARM: dts: BCM5301X: remove earlycon on ASUS RT-AC3100 and ASUS RT-AC88U

From: Arınç ÜNAL <[email protected]>

Remove the earlycon boot argument. As Krzysztof pointed out, earlycon is
for debugging, not regular mainline usage.

Signed-off-by: Arınç ÜNAL <[email protected]>
---
arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi | 4 ----
1 file changed, 4 deletions(-)

diff --git a/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi b/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi
index 84d583168d81..9c7efb1c44f1 100644
--- a/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm47094-asus-rt-ac3100.dtsi
@@ -9,10 +9,6 @@
#include <dt-bindings/leds/common.h>

/ {
- chosen {
- bootargs = "earlycon";
- };
-
memory@0 {
device_type = "memory";
reg = <0x00000000 0x08000000>,

--
2.40.1



2024-04-14 19:14:09

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 4/4] ARM: dts: BCM5301X: remove earlycon on ASUS RT-AC3100 and ASUS RT-AC88U

On 14/04/2024 19:01, Arınç ÜNAL via B4 Relay wrote:
> From: Arınç ÜNAL <[email protected]>
>
> Remove the earlycon boot argument. As Krzysztof pointed out, earlycon is
> for debugging, not regular mainline usage.
>
> Signed-off-by: Arınç ÜNAL <[email protected]>

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2024-04-17 03:09:31

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 1/4] ARM: dts: BCM5301X: use color and function on ASUS RT-AC3100 and RT-AC88U

From: Florian Fainelli <[email protected]>

On Sun, 14 Apr 2024 20:01:21 +0300, Arınç ÜNAL via B4 Relay <[email protected]> wrote:
> From: Arınç ÜNAL <[email protected]>
>
> As the label property for LEDs is deprecated, use the color and function
> properties to describe the LEDs on the device tree file for ASUS RT-AC3100
> and ASUS RT-AC88U. Reorder the LED and button nodes in alphabetical order.
>
> Signed-off-by: Arınç ÜNAL <[email protected]>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

2024-04-17 03:17:55

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 2/4] ARM: dts: BCM5301X: provide address for SoC MACs on ASUS RT-AC3100 & AC88U

From: Florian Fainelli <[email protected]>

On Sun, 14 Apr 2024 20:01:22 +0300, Arınç ÜNAL via B4 Relay <[email protected]> wrote:
> From: Arınç ÜNAL <[email protected]>
>
> Do not leave the providing of a MAC address for an SoC MAC to a driver.
> Describe it on the bindings. Provide a distinct MAC address for each SoC
> MAC.
>
> Signed-off-by: Arınç ÜNAL <[email protected]>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

2024-04-17 04:16:38

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 4/4] ARM: dts: BCM5301X: remove earlycon on ASUS RT-AC3100 and ASUS RT-AC88U

From: Florian Fainelli <[email protected]>

On Sun, 14 Apr 2024 20:01:24 +0300, Arınç ÜNAL via B4 Relay <[email protected]> wrote:
> From: Arınç ÜNAL <[email protected]>
>
> Remove the earlycon boot argument. As Krzysztof pointed out, earlycon is
> for debugging, not regular mainline usage.
>
> Signed-off-by: Arınç ÜNAL <[email protected]>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian

2024-04-17 05:32:47

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 3/4] ARM: dts: BCM5301X: remove duplicate compatible on ASUS RT-AC3100 & AC88U

From: Florian Fainelli <[email protected]>

On Sun, 14 Apr 2024 20:01:23 +0300, Arınç ÜNAL via B4 Relay <[email protected]> wrote:
> From: Arınç ÜNAL <[email protected]>
>
> The compatible property on the node with the srab handle is already
> described with the same value on the included device tree. Remove it.
>
> Signed-off-by: Arınç ÜNAL <[email protected]>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian