All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-21 12:19 ` Arınç ÜNAL
  0 siblings, 0 replies; 20+ messages in thread
From: Arınç ÜNAL @ 2021-09-21 12:19 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Arınç ÜNAL

Hardware Info
-------------

Processor	- Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
Switch		- BCM53012 in BCM4709C0KFEBG & external RTL8365MB
DDR3 RAM	- 512 MB
Flash		- 128 MB (ESMT F59L1G81LA-25T)
2.4GHz		- BCM4366 4×4 2.4/5G single chip 802.11ac SoC
5GHz		- BCM4366 4×4 2.4/5G single chip 802.11ac SoC
Ports		- 8 Ports, 1 WAN Ports

Tested on OpenWrt on kernel 5.10 built with DSA driver.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 arch/arm/boot/dts/Makefile                   |   1 +
 arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 200 +++++++++++++++++++
 2 files changed, 201 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7e0934180724..339239c6a76d 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -117,6 +117,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4709-netgear-r7000.dtb \
 	bcm4709-netgear-r8000.dtb \
 	bcm4709-tplink-archer-c9-v1.dtb \
+	bcm47094-asus-rt-ac88u.dtb \
 	bcm47094-dlink-dir-885l.dtb \
 	bcm47094-linksys-panamera.dtb \
 	bcm47094-luxul-abr-4500.dtb \
diff --git a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
new file mode 100644
index 000000000000..448060561cd0
--- /dev/null
+++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
@@ -0,0 +1,200 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (C) 2021 Arınç ÜNAL <arinc.unal@arinc9.com>
+ */
+
+/dts-v1/;
+
+#include "bcm47094.dtsi"
+#include "bcm5301x-nand-cs0-bch8.dtsi"
+
+/ {
+	compatible = "asus,rt-ac88u", "brcm,bcm47094", "brcm,bcm4708";
+	model = "Asus RT-AC88U";
+
+	chosen {
+		bootargs = "earlycon";
+	};
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x00000000 0x08000000>,
+		      <0x88000000 0x18000000>;
+	};
+
+	nvram@1c080000 {
+		compatible = "brcm,nvram";
+		reg = <0x1c080000 0x00180000>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		power {
+			label = "white:power";
+			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-on";
+		};
+
+		wan-red {
+			label = "red:wan";
+			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
+		};
+
+		lan {
+			label = "white:lan";
+			gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
+		};
+
+		usb2 {
+			label = "white:usb2";
+			gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ehci_port2>;
+			linux,default-trigger = "usbport";
+		};
+
+		usb3 {
+			label = "white:usb3";
+			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ehci_port1>, <&xhci_port1>;
+			linux,default-trigger = "usbport";
+		};
+
+		wps {
+			label = "white:wps";
+			gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		wps {
+			label = "WPS";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
+		};
+
+		reset {
+			label = "Reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
+		};
+
+		wifi {
+			label = "Wi-Fi";
+			linux,code = <KEY_RFKILL>;
+			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
+		};
+
+		led {
+			label = "Backlight";
+			linux,code = <KEY_BRIGHTNESS_ZERO>;
+			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&srab {
+	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
+	status = "okay";
+	dsa,member = <0 0>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			label = "lan4";
+		};
+
+		port@1 {
+			reg = <1>;
+			label = "lan3";
+		};
+
+		port@2 {
+			reg = <2>;
+			label = "lan2";
+		};
+
+		port@3 {
+			reg = <3>;
+			label = "lan1";
+		};
+
+		port@4 {
+			reg = <4>;
+			label = "wan";
+		};
+
+		sw0_p5: port@5 {
+			reg = <5>;
+			label = "extsw";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+
+		port@7 {
+			reg = <7>;
+			ethernet = <&gmac1>;
+			label = "cpu";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+
+		port@8 {
+			reg = <8>;
+			ethernet = <&gmac2>;
+			label = "cpu";
+			status = "disabled";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+	};
+};
+
+&usb2 {
+	vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
+};
+
+&usb3_phy {
+	status = "okay";
+};
+
+&nandcs {
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "boot";
+			reg = <0x00000000 0x00080000>;
+			read-only;
+		};
+
+		partition@80000 {
+			label = "nvram";
+			reg = <0x00080000 0x00180000>;
+		};
+
+		partition@200000 {
+			label = "firmware";
+			reg = <0x00200000 0x07e00000>;
+			compatible = "brcm,trx";
+		};
+	};
+};
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-21 12:19 ` Arınç ÜNAL
  0 siblings, 0 replies; 20+ messages in thread
From: Arınç ÜNAL @ 2021-09-21 12:19 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Arınç ÜNAL

Hardware Info
-------------

Processor	- Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
Switch		- BCM53012 in BCM4709C0KFEBG & external RTL8365MB
DDR3 RAM	- 512 MB
Flash		- 128 MB (ESMT F59L1G81LA-25T)
2.4GHz		- BCM4366 4×4 2.4/5G single chip 802.11ac SoC
5GHz		- BCM4366 4×4 2.4/5G single chip 802.11ac SoC
Ports		- 8 Ports, 1 WAN Ports

Tested on OpenWrt on kernel 5.10 built with DSA driver.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 arch/arm/boot/dts/Makefile                   |   1 +
 arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts | 200 +++++++++++++++++++
 2 files changed, 201 insertions(+)
 create mode 100644 arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 7e0934180724..339239c6a76d 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -117,6 +117,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
 	bcm4709-netgear-r7000.dtb \
 	bcm4709-netgear-r8000.dtb \
 	bcm4709-tplink-archer-c9-v1.dtb \
+	bcm47094-asus-rt-ac88u.dtb \
 	bcm47094-dlink-dir-885l.dtb \
 	bcm47094-linksys-panamera.dtb \
 	bcm47094-luxul-abr-4500.dtb \
diff --git a/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
new file mode 100644
index 000000000000..448060561cd0
--- /dev/null
+++ b/arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts
@@ -0,0 +1,200 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (C) 2021 Arınç ÜNAL <arinc.unal@arinc9.com>
+ */
+
+/dts-v1/;
+
+#include "bcm47094.dtsi"
+#include "bcm5301x-nand-cs0-bch8.dtsi"
+
+/ {
+	compatible = "asus,rt-ac88u", "brcm,bcm47094", "brcm,bcm4708";
+	model = "Asus RT-AC88U";
+
+	chosen {
+		bootargs = "earlycon";
+	};
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x00000000 0x08000000>,
+		      <0x88000000 0x18000000>;
+	};
+
+	nvram@1c080000 {
+		compatible = "brcm,nvram";
+		reg = <0x1c080000 0x00180000>;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		power {
+			label = "white:power";
+			gpios = <&chipcommon 3 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "default-on";
+		};
+
+		wan-red {
+			label = "red:wan";
+			gpios = <&chipcommon 5 GPIO_ACTIVE_HIGH>;
+		};
+
+		lan {
+			label = "white:lan";
+			gpios = <&chipcommon 21 GPIO_ACTIVE_LOW>;
+		};
+
+		usb2 {
+			label = "white:usb2";
+			gpios = <&chipcommon 16 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ehci_port2>;
+			linux,default-trigger = "usbport";
+		};
+
+		usb3 {
+			label = "white:usb3";
+			gpios = <&chipcommon 17 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ehci_port1>, <&xhci_port1>;
+			linux,default-trigger = "usbport";
+		};
+
+		wps {
+			label = "white:wps";
+			gpios = <&chipcommon 19 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		wps {
+			label = "WPS";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&chipcommon 20 GPIO_ACTIVE_LOW>;
+		};
+
+		reset {
+			label = "Reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&chipcommon 11 GPIO_ACTIVE_LOW>;
+		};
+
+		wifi {
+			label = "Wi-Fi";
+			linux,code = <KEY_RFKILL>;
+			gpios = <&chipcommon 18 GPIO_ACTIVE_LOW>;
+		};
+
+		led {
+			label = "Backlight";
+			linux,code = <KEY_BRIGHTNESS_ZERO>;
+			gpios = <&chipcommon 4 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&srab {
+	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
+	status = "okay";
+	dsa,member = <0 0>;
+
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port@0 {
+			reg = <0>;
+			label = "lan4";
+		};
+
+		port@1 {
+			reg = <1>;
+			label = "lan3";
+		};
+
+		port@2 {
+			reg = <2>;
+			label = "lan2";
+		};
+
+		port@3 {
+			reg = <3>;
+			label = "lan1";
+		};
+
+		port@4 {
+			reg = <4>;
+			label = "wan";
+		};
+
+		sw0_p5: port@5 {
+			reg = <5>;
+			label = "extsw";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+
+		port@7 {
+			reg = <7>;
+			ethernet = <&gmac1>;
+			label = "cpu";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+
+		port@8 {
+			reg = <8>;
+			ethernet = <&gmac2>;
+			label = "cpu";
+			status = "disabled";
+
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+	};
+};
+
+&usb2 {
+	vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
+};
+
+&usb3_phy {
+	status = "okay";
+};
+
+&nandcs {
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "boot";
+			reg = <0x00000000 0x00080000>;
+			read-only;
+		};
+
+		partition@80000 {
+			label = "nvram";
+			reg = <0x00080000 0x00180000>;
+		};
+
+		partition@200000 {
+			label = "firmware";
+			reg = <0x00200000 0x07e00000>;
+			compatible = "brcm,trx";
+		};
+	};
+};
-- 
2.25.1


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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
  2021-09-21 12:19 ` Arınç ÜNAL
@ 2021-09-22 18:15   ` Florian Fainelli
  -1 siblings, 0 replies; 20+ messages in thread
From: Florian Fainelli @ 2021-09-22 18:15 UTC (permalink / raw)
  To: Arınç ÜNAL, Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list

On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
> Hardware Info
> -------------
> 
> Processor	- Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
> Switch		- BCM53012 in BCM4709C0KFEBG & external RTL8365MB

There is no Device Tree description of the RTL8365MB switch, can it be
driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
show stopper for accepting the patch, just wondering if you are somehow
trying to get that switch controlled by the rtl8366 DSA driver as well?
-- 
Florian

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-22 18:15   ` Florian Fainelli
  0 siblings, 0 replies; 20+ messages in thread
From: Florian Fainelli @ 2021-09-22 18:15 UTC (permalink / raw)
  To: Arınç ÜNAL, Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list

On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
> Hardware Info
> -------------
> 
> Processor	- Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
> Switch		- BCM53012 in BCM4709C0KFEBG & external RTL8365MB

There is no Device Tree description of the RTL8365MB switch, can it be
driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
show stopper for accepting the patch, just wondering if you are somehow
trying to get that switch controlled by the rtl8366 DSA driver as well?
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
  2021-09-21 12:19 ` Arınç ÜNAL
@ 2021-09-22 18:37   ` Florian Fainelli
  -1 siblings, 0 replies; 20+ messages in thread
From: Florian Fainelli @ 2021-09-22 18:37 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Arınç ÜNAL
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree

On Tue, 21 Sep 2021 20:19:01 +0800, Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
> Hardware Info
> -------------

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

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-22 18:37   ` Florian Fainelli
  0 siblings, 0 replies; 20+ messages in thread
From: Florian Fainelli @ 2021-09-22 18:37 UTC (permalink / raw)
  To: bcm-kernel-feedback-list, Arınç ÜNAL
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree

On Tue, 21 Sep 2021 20:19:01 +0800, Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
> Hardware Info
> -------------

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
  2021-09-22 18:15   ` Florian Fainelli
@ 2021-09-22 22:26     ` Arınç ÜNAL
  -1 siblings, 0 replies; 20+ messages in thread
From: Arınç ÜNAL @ 2021-09-22 22:26 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

On 22/09/2021 21:15, Florian Fainelli wrote:
> On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
>> Hardware Info
>> -------------
>>
>> Processor	- Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
>> Switch		- BCM53012 in BCM4709C0KFEBG & external RTL8365MB
> 
> There is no Device Tree description of the RTL8365MB switch, can it be
> driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
> show stopper for accepting the patch, just wondering if you are somehow
> trying to get that switch controlled by the rtl8366 DSA driver as well?
> 
There's a v1 patch on net-next adding DSA support for RTL8365MB by Alvin 
Šipraga, CC'ing them. There's also a v2 patch coming.
https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/

I've been mailing Alvin to figure out how to define it on the device 
tree. They have provided very useful information. Quoting a few:

 >> I'm trying to write the device tree to support this switch. I'm not sure
 >> whether the default GPIO IDs of mdc-gpios, mdio-gpios, reset-gpios &
 >> interrupts on realtek-smi.txt kernel documentation are correct.
 >> 
https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
 >
 > These gpios are just an example. It really depends how your board is
 > wired up. You have to figure out which SoC pad is wired to the MDC,
 > MDIO, and RESET pins on the RTL8365MB. Then you have to make sure the
 > pinmux is set up correctly so that these pads correspond to some GPIO
 > with a given ID, and then pick the right GPIO controller (&chipcommon?)
 > and put the ID after that. It will not necessarily be 21, 22, 14.

 > In summary:
 >
 > - figure out which pads are wired to MDC, MDIO, RESET
 > - figure out pinmux to make them into gpios
 > - figure out gpio ID and describe that in the device tree
 >

I have backported the v1 patch to kernel 5.10 and tried an example 
definition on the device tree to test it out on RT-AC88U. It's on this 
branch:
https://github.com/arinc9/openwrt/commits/realtek-work-asus_rt-ac88u

It doesn't work as is, likely missing further configuration, which I'm 
clueless to figure out myself. I'd very appreciate it if you could weigh in.

[    1.598858] realtek-smi switch@1: failed to get RESET GPIO
---
[    3.015528] realtek-smi switch@1: deasserted RESET
[    3.021171] realtek-smi switch@1: found an RTL8365MB-VC switch 
(ver=0x0040)
[    3.028193] realtek-smi switch@1: unable to register switch ret = -517
---
[    3.405527] realtek-smi switch@1: deasserted RESET
[    3.411165] realtek-smi switch@1: found an RTL8365MB-VC switch 
(ver=0x0040)
[    3.418449] DSA: tree 0 already setup! Disjoint trees?
[    3.423607] realtek-smi switch@1: unable to register switch ret = -17
[    3.430137] realtek-smi: probe of switch@1 failed with error -17

---

I was thinking, we figure out how to define it properly on the device 
tree and make the driver work whilst the v2 patch is applied to 
net-next. Then we could send another patch defining the switch on the 
device tree.
There's the "compatible = "realtek,rtl8365mb";" property, which would be 
undefined until the driver is added.

Cheers.
Arınç

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-22 22:26     ` Arınç ÜNAL
  0 siblings, 0 replies; 20+ messages in thread
From: Arınç ÜNAL @ 2021-09-22 22:26 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

On 22/09/2021 21:15, Florian Fainelli wrote:
> On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
>> Hardware Info
>> -------------
>>
>> Processor	- Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
>> Switch		- BCM53012 in BCM4709C0KFEBG & external RTL8365MB
> 
> There is no Device Tree description of the RTL8365MB switch, can it be
> driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
> show stopper for accepting the patch, just wondering if you are somehow
> trying to get that switch controlled by the rtl8366 DSA driver as well?
> 
There's a v1 patch on net-next adding DSA support for RTL8365MB by Alvin 
Šipraga, CC'ing them. There's also a v2 patch coming.
https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/

I've been mailing Alvin to figure out how to define it on the device 
tree. They have provided very useful information. Quoting a few:

 >> I'm trying to write the device tree to support this switch. I'm not sure
 >> whether the default GPIO IDs of mdc-gpios, mdio-gpios, reset-gpios &
 >> interrupts on realtek-smi.txt kernel documentation are correct.
 >> 
https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
 >
 > These gpios are just an example. It really depends how your board is
 > wired up. You have to figure out which SoC pad is wired to the MDC,
 > MDIO, and RESET pins on the RTL8365MB. Then you have to make sure the
 > pinmux is set up correctly so that these pads correspond to some GPIO
 > with a given ID, and then pick the right GPIO controller (&chipcommon?)
 > and put the ID after that. It will not necessarily be 21, 22, 14.

 > In summary:
 >
 > - figure out which pads are wired to MDC, MDIO, RESET
 > - figure out pinmux to make them into gpios
 > - figure out gpio ID and describe that in the device tree
 >

I have backported the v1 patch to kernel 5.10 and tried an example 
definition on the device tree to test it out on RT-AC88U. It's on this 
branch:
https://github.com/arinc9/openwrt/commits/realtek-work-asus_rt-ac88u

It doesn't work as is, likely missing further configuration, which I'm 
clueless to figure out myself. I'd very appreciate it if you could weigh in.

[    1.598858] realtek-smi switch@1: failed to get RESET GPIO
---
[    3.015528] realtek-smi switch@1: deasserted RESET
[    3.021171] realtek-smi switch@1: found an RTL8365MB-VC switch 
(ver=0x0040)
[    3.028193] realtek-smi switch@1: unable to register switch ret = -517
---
[    3.405527] realtek-smi switch@1: deasserted RESET
[    3.411165] realtek-smi switch@1: found an RTL8365MB-VC switch 
(ver=0x0040)
[    3.418449] DSA: tree 0 already setup! Disjoint trees?
[    3.423607] realtek-smi switch@1: unable to register switch ret = -17
[    3.430137] realtek-smi: probe of switch@1 failed with error -17

---

I was thinking, we figure out how to define it properly on the device 
tree and make the driver work whilst the v2 patch is applied to 
net-next. Then we could send another patch defining the switch on the 
device tree.
There's the "compatible = "realtek,rtl8365mb";" property, which would be 
undefined until the driver is added.

Cheers.
Arınç

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
  2021-09-22 22:26     ` Arınç ÜNAL
@ 2021-09-23  0:22       ` Florian Fainelli
  -1 siblings, 0 replies; 20+ messages in thread
From: Florian Fainelli @ 2021-09-23  0:22 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga



On 9/22/2021 3:26 PM, Arınç ÜNAL wrote:
> On 22/09/2021 21:15, Florian Fainelli wrote:
>> On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
>>> Hardware Info
>>> -------------
>>>
>>> Processor    - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
>>> Switch        - BCM53012 in BCM4709C0KFEBG & external RTL8365MB
>>
>> There is no Device Tree description of the RTL8365MB switch, can it be
>> driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
>> show stopper for accepting the patch, just wondering if you are somehow
>> trying to get that switch controlled by the rtl8366 DSA driver as well?
>>
> There's a v1 patch on net-next adding DSA support for RTL8365MB by Alvin 
> Šipraga, CC'ing them. There's also a v2 patch coming.
> https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/
> 
> I've been mailing Alvin to figure out how to define it on the device 
> tree. They have provided very useful information. Quoting a few:
> 
>  >> I'm trying to write the device tree to support this switch. I'm not 
> sure
>  >> whether the default GPIO IDs of mdc-gpios, mdio-gpios, reset-gpios &
>  >> interrupts on realtek-smi.txt kernel documentation are correct.
>  >> 
> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt 
> 
>  >
>  > These gpios are just an example. It really depends how your board is
>  > wired up. You have to figure out which SoC pad is wired to the MDC,
>  > MDIO, and RESET pins on the RTL8365MB. Then you have to make sure the
>  > pinmux is set up correctly so that these pads correspond to some GPIO
>  > with a given ID, and then pick the right GPIO controller (&chipcommon?)
>  > and put the ID after that. It will not necessarily be 21, 22, 14.
> 
>  > In summary:
>  >
>  > - figure out which pads are wired to MDC, MDIO, RESET
>  > - figure out pinmux to make them into gpios
>  > - figure out gpio ID and describe that in the device tree
>  >
> 
> I have backported the v1 patch to kernel 5.10 and tried an example 
> definition on the device tree to test it out on RT-AC88U. It's on this 
> branch:
> https://github.com/arinc9/openwrt/commits/realtek-work-asus_rt-ac88u

Your dsa,member proper looks reversed, you would want it to be:

dsa,member = <1 0>;

to indicate that these are indeed disjoint DSA trees with the tree being 
1 and the switch being member 0 (the one and only). This part of the 
driver/binding looks a bit weird too:

	switch@1 {
+		compatible = "realtek,rtl8365mb";
+		/* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
+		mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
+		mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;

this is clearly a MDIO-attached switch, so it should be a children of 
the GPIO controller node. There is a hardware MDIO controller on the 
BCM5301X so you should be able to avoid using bit-banging here and 
instead using the BCM5301X's MDIO controller proper.

> 
> It doesn't work as is, likely missing further configuration, which I'm 
> clueless to figure out myself. I'd very appreciate it if you could weigh 
> in.
> 
> [    1.598858] realtek-smi switch@1: failed to get RESET GPIO
> ---
> [    3.015528] realtek-smi switch@1: deasserted RESET
> [    3.021171] realtek-smi switch@1: found an RTL8365MB-VC switch 
> (ver=0x0040)
> [    3.028193] realtek-smi switch@1: unable to register switch ret = -517
> ---
> [    3.405527] realtek-smi switch@1: deasserted RESET
> [    3.411165] realtek-smi switch@1: found an RTL8365MB-VC switch 
> (ver=0x0040)
> [    3.418449] DSA: tree 0 already setup! Disjoint trees?
> [    3.423607] realtek-smi switch@1: unable to register switch ret = -17
> [    3.430137] realtek-smi: probe of switch@1 failed with error -17
> 
> ---
> 
> I was thinking, we figure out how to define it properly on the device 
> tree and make the driver work whilst the v2 patch is applied to 
> net-next. Then we could send another patch defining the switch on the 
> device tree.
> There's the "compatible = "realtek,rtl8365mb";" property, which would be 
> undefined until the driver is added.

That works for me, which is why I already applied your patch.
-- 
Florian

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-23  0:22       ` Florian Fainelli
  0 siblings, 0 replies; 20+ messages in thread
From: Florian Fainelli @ 2021-09-23  0:22 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga



On 9/22/2021 3:26 PM, Arınç ÜNAL wrote:
> On 22/09/2021 21:15, Florian Fainelli wrote:
>> On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
>>> Hardware Info
>>> -------------
>>>
>>> Processor    - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
>>> Switch        - BCM53012 in BCM4709C0KFEBG & external RTL8365MB
>>
>> There is no Device Tree description of the RTL8365MB switch, can it be
>> driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
>> show stopper for accepting the patch, just wondering if you are somehow
>> trying to get that switch controlled by the rtl8366 DSA driver as well?
>>
> There's a v1 patch on net-next adding DSA support for RTL8365MB by Alvin 
> Šipraga, CC'ing them. There's also a v2 patch coming.
> https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/
> 
> I've been mailing Alvin to figure out how to define it on the device 
> tree. They have provided very useful information. Quoting a few:
> 
>  >> I'm trying to write the device tree to support this switch. I'm not 
> sure
>  >> whether the default GPIO IDs of mdc-gpios, mdio-gpios, reset-gpios &
>  >> interrupts on realtek-smi.txt kernel documentation are correct.
>  >> 
> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt 
> 
>  >
>  > These gpios are just an example. It really depends how your board is
>  > wired up. You have to figure out which SoC pad is wired to the MDC,
>  > MDIO, and RESET pins on the RTL8365MB. Then you have to make sure the
>  > pinmux is set up correctly so that these pads correspond to some GPIO
>  > with a given ID, and then pick the right GPIO controller (&chipcommon?)
>  > and put the ID after that. It will not necessarily be 21, 22, 14.
> 
>  > In summary:
>  >
>  > - figure out which pads are wired to MDC, MDIO, RESET
>  > - figure out pinmux to make them into gpios
>  > - figure out gpio ID and describe that in the device tree
>  >
> 
> I have backported the v1 patch to kernel 5.10 and tried an example 
> definition on the device tree to test it out on RT-AC88U. It's on this 
> branch:
> https://github.com/arinc9/openwrt/commits/realtek-work-asus_rt-ac88u

Your dsa,member proper looks reversed, you would want it to be:

dsa,member = <1 0>;

to indicate that these are indeed disjoint DSA trees with the tree being 
1 and the switch being member 0 (the one and only). This part of the 
driver/binding looks a bit weird too:

	switch@1 {
+		compatible = "realtek,rtl8365mb";
+		/* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
+		mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
+		mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;

this is clearly a MDIO-attached switch, so it should be a children of 
the GPIO controller node. There is a hardware MDIO controller on the 
BCM5301X so you should be able to avoid using bit-banging here and 
instead using the BCM5301X's MDIO controller proper.

> 
> It doesn't work as is, likely missing further configuration, which I'm 
> clueless to figure out myself. I'd very appreciate it if you could weigh 
> in.
> 
> [    1.598858] realtek-smi switch@1: failed to get RESET GPIO
> ---
> [    3.015528] realtek-smi switch@1: deasserted RESET
> [    3.021171] realtek-smi switch@1: found an RTL8365MB-VC switch 
> (ver=0x0040)
> [    3.028193] realtek-smi switch@1: unable to register switch ret = -517
> ---
> [    3.405527] realtek-smi switch@1: deasserted RESET
> [    3.411165] realtek-smi switch@1: found an RTL8365MB-VC switch 
> (ver=0x0040)
> [    3.418449] DSA: tree 0 already setup! Disjoint trees?
> [    3.423607] realtek-smi switch@1: unable to register switch ret = -17
> [    3.430137] realtek-smi: probe of switch@1 failed with error -17
> 
> ---
> 
> I was thinking, we figure out how to define it properly on the device 
> tree and make the driver work whilst the v2 patch is applied to 
> net-next. Then we could send another patch defining the switch on the 
> device tree.
> There's the "compatible = "realtek,rtl8365mb";" property, which would be 
> undefined until the driver is added.

That works for me, which is why I already applied your patch.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
  2021-09-23  0:22       ` Florian Fainelli
@ 2021-09-24  8:50         ` Arınç ÜNAL
  -1 siblings, 0 replies; 20+ messages in thread
From: Arınç ÜNAL @ 2021-09-24  8:50 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

[-- Attachment #1: Type: text/plain, Size: 7285 bytes --]

On 23/09/2021 03:22, Florian Fainelli wrote:
> 
> 
> On 9/22/2021 3:26 PM, Arınç ÜNAL wrote:
>> On 22/09/2021 21:15, Florian Fainelli wrote:
>>> On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
>>>> Hardware Info
>>>> -------------
>>>>
>>>> Processor    - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
>>>> Switch        - BCM53012 in BCM4709C0KFEBG & external RTL8365MB
>>>
>>> There is no Device Tree description of the RTL8365MB switch, can it be
>>> driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
>>> show stopper for accepting the patch, just wondering if you are somehow
>>> trying to get that switch controlled by the rtl8366 DSA driver as well?
>>>
>> There's a v1 patch on net-next adding DSA support for RTL8365MB by 
>> Alvin Šipraga, CC'ing them. There's also a v2 patch coming.
>> https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/
>>
>> I've been mailing Alvin to figure out how to define it on the device 
>> tree. They have provided very useful information. Quoting a few:
>>
>>  >> I'm trying to write the device tree to support this switch. I'm 
>> not sure
>>  >> whether the default GPIO IDs of mdc-gpios, mdio-gpios, reset-gpios &
>>  >> interrupts on realtek-smi.txt kernel documentation are correct.
>>  >> 
>> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt 
>>
>>  >
>>  > These gpios are just an example. It really depends how your board is
>>  > wired up. You have to figure out which SoC pad is wired to the MDC,
>>  > MDIO, and RESET pins on the RTL8365MB. Then you have to make sure the
>>  > pinmux is set up correctly so that these pads correspond to some GPIO
>>  > with a given ID, and then pick the right GPIO controller 
>> (&chipcommon?)
>>  > and put the ID after that. It will not necessarily be 21, 22, 14.
>>
>>  > In summary:
>>  >
>>  > - figure out which pads are wired to MDC, MDIO, RESET
>>  > - figure out pinmux to make them into gpios
>>  > - figure out gpio ID and describe that in the device tree
>>  >
>>
>> I have backported the v1 patch to kernel 5.10 and tried an example 
>> definition on the device tree to test it out on RT-AC88U. It's on this 
>> branch:
>> https://github.com/arinc9/openwrt/commits/realtek-work-asus_rt-ac88u
> 
> Your dsa,member proper looks reversed, you would want it to be:
> 
> dsa,member = <1 0>;

Thanks!

> 
> to indicate that these are indeed disjoint DSA trees with the tree being 
> 1 and the switch being member 0 (the one and only). This part of the 
> driver/binding looks a bit weird too:
> 
>      switch@1 {
> +        compatible = "realtek,rtl8365mb";
> +        /* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
> +        mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
> +        mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
> +        reset-gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
> 
> this is clearly a MDIO-attached switch, so it should be a children of 
> the GPIO controller node. There is a hardware MDIO controller on the 
> BCM5301X so you should be able to avoid using bit-banging here and 
> instead using the BCM5301X's MDIO controller proper.

I took linksys panamera device tree as an example, this device is very 
similar to Asus RT-AC88U.
https://github.com/Broadcom/stblinux/blob/devicetree/next/arch/arm/boot/dts/bcm47094-linksys-panamera.dts

I commented out the "reg" property on switch@1 so we can see if it finds 
the switch while scanning PHY addresses on mdio 200.

I don't know if the default "interrupt-controller" and "compatible = 
"realtek,smi-mdio", "dsa-mdio";" specification is correct, so I took 
them out for now.

	mdio-mux@18003000 {

		/* BIT(9) = 1 => external mdio */
		mdio@200 {
			reg = <0x200>;
			#address-cells = <1>;
			#size-cells = <0>;

			switch@1 {
				compatible = "realtek,rtl8365mb";
				#address-cells = <1>;
				#size-cells = <0>;
				reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
				reset-names = "robo_reset";
/*				reg = <0>;*/
				dsa,member = <1 0>;
				pinctrl-names = "default";
				pinctrl-0 = <&pinmux_mdio>;

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						label = "lan8";
					};

					port@1 {
						reg = <1>;
						label = "lan7";
					};

					port@2 {
						reg = <2>;
						label = "lan6";
					};

					port@3 {
						reg = <3>;
						label = "lan5";
					};

					port@4 {
						reg = <4>;
						label = "cpu";
						ethernet = <&sw0_p5>;
						phy-mode = "rgmii";

						fixed-link {
							speed = <1000>;
							full-duplex;
						};
					};
				};
			};
		};
	};

Here's relevant part of the bootlog. Full bootlog is in the attachments.

[    2.027843] bcm_iproc 18029200.spi: using bspi-mspi mode
[    2.034744] libphy: Fixed MDIO Bus: probed
[    2.039638] libphy: iProc MDIO bus: probed
[    2.043764] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
[    2.051215] libphy: mdio_mux: probed
[    2.055587] libphy: mdio_mux: probed
[    2.059196] mdio_bus 0.200: switch@1 has invalid PHY address
[    2.064894] mdio_bus 0.200: scan phy switch at address 0
[    2.070231] mdio_bus 0.200: scan phy switch at address 1
[    2.075554] mdio_bus 0.200: scan phy switch at address 2
[    2.080894] mdio_bus 0.200: scan phy switch at address 3
[    2.086217] mdio_bus 0.200: scan phy switch at address 4
[    2.091549] mdio_bus 0.200: scan phy switch at address 5
[    2.096870] mdio_bus 0.200: scan phy switch at address 6
[    2.102202] mdio_bus 0.200: scan phy switch at address 7
[    2.107523] mdio_bus 0.200: scan phy switch at address 8
[    2.112864] mdio_bus 0.200: scan phy switch at address 9
[    2.118186] mdio_bus 0.200: scan phy switch at address 10
[    2.123608] mdio_bus 0.200: scan phy switch at address 11
[    2.129022] mdio_bus 0.200: scan phy switch at address 12
[    2.134442] mdio_bus 0.200: scan phy switch at address 13
[    2.139858] mdio_bus 0.200: scan phy switch at address 14
[    2.145274] mdio_bus 0.200: scan phy switch at address 15
[    2.150697] mdio_bus 0.200: scan phy switch at address 16
[    2.156110] mdio_bus 0.200: scan phy switch at address 17
[    2.161528] mdio_bus 0.200: scan phy switch at address 18
[    2.166937] mdio_bus 0.200: scan phy switch at address 19
[    2.172355] mdio_bus 0.200: scan phy switch at address 20
[    2.177764] mdio_bus 0.200: scan phy switch at address 21
[    2.183183] mdio_bus 0.200: scan phy switch at address 22
[    2.188592] mdio_bus 0.200: scan phy switch at address 23
[    2.194011] mdio_bus 0.200: scan phy switch at address 24
[    2.199427] mdio_bus 0.200: scan phy switch at address 25
[    2.204834] mdio_bus 0.200: scan phy switch at address 26
[    2.210253] mdio_bus 0.200: scan phy switch at address 27
[    2.215662] mdio_bus 0.200: scan phy switch at address 28
[    2.221080] mdio_bus 0.200: scan phy switch at address 29
[    2.226490] mdio_bus 0.200: scan phy switch at address 30
[    2.231914] mdio_bus 0.200: scan phy switch at address 31
[    2.237939] b53-srab-switch 18007000.ethernet-switch: found switch: 
BCM53012, rev 0
[    2.245957] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded

Looks like the switch is not on 0x200, what else can we try?

Arınç

[-- Attachment #2: mdio-mux.log --]
[-- Type: text/plain, Size: 32300 bytes --]

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.64 (user@arinc9) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r17569-cf6e09471b) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Thu Sep 23 21:49:31 2021
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Asus RT-AC88U
[    0.000000] earlycon: ns16550 at MMIO 0x18000300 (options '115200n8')
[    0.000000] printk: bootconsole [ns16550] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Hit pending asynchronous external abort (FSR=0x00001c06) during first unmask, this is most likely caused by a firmware/bootloader bug.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  [mem 0x0000000008000000-0x000000009fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   node   0: [mem 0x0000000088000000-0x000000009fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000009fffffff]
[    0.000000] On node 0 totalpages: 131072
[    0.000000]   Normal zone: 288 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000]   HighMem zone: 98304 pages, LIFO batch:31
[    0.000000] percpu: Embedded 14 pages/cpu s27212 r8192 d21940 u57344
[    0.000000] pcpu-alloc: s27212 r8192 d21940 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130784
[    0.000000] Kernel command line: earlycon
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 510324K/524288K available (5635K kernel code, 565K rwdata, 1364K rodata, 1024K init, 288K bss, 13964K reserved, 0K cma-reserved, 393216K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C: DT/platform modifies aux control register: 0x0a130000 -> 0x3a530000
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x7e530001
[    0.000000] random: get_random_bytes called from start_kernel+0x360/0x50c with crng_init=0
[    0.000007] sched_clock: 64 bits at 700MHz, resolution 1ns, wraps every 4398046511103ns
[    0.016397] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0xa17102bcf3, max_idle_ns: 440795224838 ns
[    0.027545] Switching to timer-based delay loop, resolution 1ns
[    0.033666] Calibrating delay loop (skipped), value calculated using timer frequency.. 1400.00 BogoMIPS (lpj=7000000)
[    0.044404] pid_max: default: 32768 minimum: 301
[    0.049116] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.056500] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.064881] CPU: Testing write buffer coherency: ok
[    0.069836] CPU0: Spectre v2: using BPIALL workaround
[    0.075124] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.081213] Setting up static identity map for 0x100000 - 0x10003c
[    0.087561] rcu: Hierarchical SRCU implementation.
[    0.092476] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.100371] smp: Bringing up secondary CPUs ...
[    0.105499] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.105505] CPU1: Spectre v2: using BPIALL workaround
[    0.116414] smp: Brought up 1 node, 2 CPUs
[    0.120545] SMP: Total of 2 processors activated (2800.00 BogoMIPS).
[    0.126948] CPU: WARNING: CPU(s) started in wrong/inconsistent modes (primary CPU mode 0x13)
[    0.135474] CPU: This may indicate a broken bootloader or firmware.
[    0.143725] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.153702] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.160710] pinctrl core: initialized pinctrl subsystem
[    0.166389] NET: Registered protocol family 16
[    0.171412] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.178959] thermal_sys: Registered thermal governor 'step_wise'
[    0.199499] clocksource: Switched to clocksource arm_global_timer
[    0.212562] NET: Registered protocol family 2
[    0.217112] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.224740] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.233219] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.240931] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.248031] TCP: Hash tables configured (established 1024 bind 1024)
[    0.254537] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.261161] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.268328] NET: Registered protocol family 1
[    0.272753] PCI: CLS 0 bytes, default 64
[    0.278104] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.286704] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.292638] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.303443] bounce: pool size: 64 pages
[    0.308204] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.315355] printk: console [ttyS0] disabled
[    0.319758] 18000300.serial: ttyS0 at MMIO 0x18000300 (irq = 26, base_baud = 7812500) is a 16550
[    0.328651] printk: console [ttyS0] enabled
[    0.337085] printk: bootconsole [ns16550] disabled
[    0.347498] bcm2835-rng 18004000.rng: hwrng registered
[    1.023069] random: fast init done
[    1.026530] random: crng init done
[    1.031402] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0xd1
[    1.037782] nand: ESMT NAND 128MiB 3,3V 8-bit
[    1.042177] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.049807] iproc_nand 18028000.nand-controller: detected 128MiB total, 128KiB blocks, 2KiB pages, 16B OOB, 8-bit, BCH-8
[    1.060717] Scanning device for bad blocks
[    1.966576] 3 fixed-partitions partitions found on MTD device brcmnand.0
[    1.973314] Creating 3 MTD partitions on "brcmnand.0":
[    1.978461] 0x000000000000-0x000000080000 : "boot"
[    1.983843] 0x000000080000-0x000000200000 : "nvram"
[    1.989291] 0x000000200000-0x000008000000 : "firmware"
[    1.996049] 2 trx partitions found on MTD device firmware
[    2.001499] Creating 2 MTD partitions on "firmware":
[    2.006479] 0x00000000001c-0x000000400000 : "linux"
[    2.011376] mtd: partition "linux" doesn't start on an erase/write block boundary -- force read-only
[    2.021124] 0x000000400000-0x000007e00000 : "ubi"
[    2.027843] bcm_iproc 18029200.spi: using bspi-mspi mode
[    2.034744] libphy: Fixed MDIO Bus: probed
[    2.039638] libphy: iProc MDIO bus: probed
[    2.043764] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
[    2.051215] libphy: mdio_mux: probed
[    2.055587] libphy: mdio_mux: probed
[    2.059196] mdio_bus 0.200: switch@1 has invalid PHY address
[    2.064894] mdio_bus 0.200: scan phy switch at address 0
[    2.070231] mdio_bus 0.200: scan phy switch at address 1
[    2.075554] mdio_bus 0.200: scan phy switch at address 2
[    2.080894] mdio_bus 0.200: scan phy switch at address 3
[    2.086217] mdio_bus 0.200: scan phy switch at address 4
[    2.091549] mdio_bus 0.200: scan phy switch at address 5
[    2.096870] mdio_bus 0.200: scan phy switch at address 6
[    2.102202] mdio_bus 0.200: scan phy switch at address 7
[    2.107523] mdio_bus 0.200: scan phy switch at address 8
[    2.112864] mdio_bus 0.200: scan phy switch at address 9
[    2.118186] mdio_bus 0.200: scan phy switch at address 10
[    2.123608] mdio_bus 0.200: scan phy switch at address 11
[    2.129022] mdio_bus 0.200: scan phy switch at address 12
[    2.134442] mdio_bus 0.200: scan phy switch at address 13
[    2.139858] mdio_bus 0.200: scan phy switch at address 14
[    2.145274] mdio_bus 0.200: scan phy switch at address 15
[    2.150697] mdio_bus 0.200: scan phy switch at address 16
[    2.156110] mdio_bus 0.200: scan phy switch at address 17
[    2.161528] mdio_bus 0.200: scan phy switch at address 18
[    2.166937] mdio_bus 0.200: scan phy switch at address 19
[    2.172355] mdio_bus 0.200: scan phy switch at address 20
[    2.177764] mdio_bus 0.200: scan phy switch at address 21
[    2.183183] mdio_bus 0.200: scan phy switch at address 22
[    2.188592] mdio_bus 0.200: scan phy switch at address 23
[    2.194011] mdio_bus 0.200: scan phy switch at address 24
[    2.199427] mdio_bus 0.200: scan phy switch at address 25
[    2.204834] mdio_bus 0.200: scan phy switch at address 26
[    2.210253] mdio_bus 0.200: scan phy switch at address 27
[    2.215662] mdio_bus 0.200: scan phy switch at address 28
[    2.221080] mdio_bus 0.200: scan phy switch at address 29
[    2.226490] mdio_bus 0.200: scan phy switch at address 30
[    2.231914] mdio_bus 0.200: scan phy switch at address 31
[    2.237939] b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 0
[    2.245957] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
[    2.252083] bcma-host-soc 18000000.axi: bus0: Found chip with id 53030, rev 0x00 and package 0x00
[    2.261088] bcma-host-soc 18000000.axi: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x2A, class 0x0)
[    2.271679] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.271688] bcma-host-soc 18000000.axi: bus0: Core 1 found: Chipcommon B (manuf 0x4BF, id 0x50B, rev 0x05, class 0x0)
[    2.282423] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.282430] bcma-host-soc 18000000.axi: bus0: Core 2 found: DMA (manuf 0x4BF, id 0x502, rev 0x04, class 0x0)
[    2.292411] bcma-host-soc 18000000.axi: bus0: Core 3 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.302815] bcma-host-soc 18000000.axi: bus0: Core 4 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.313214] bcma-host-soc 18000000.axi: bus0: Core 5 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.323639] bcma-host-soc 18000000.axi: bus0: Core 6 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.333999] bcma-host-soc 18000000.axi: bus0: Core 7 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    2.344542] bcma-host-soc 18000000.axi: bus0: Core 8 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    2.355088] bcma-host-soc 18000000.axi: bus0: Core 9 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    2.365650] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.365658] bcma-host-soc 18000000.axi: bus0: Core 10 found: ARM Cortex A9 core (ihost) (manuf 0x4BF, id 0x510, rev 0x07, class 0x0)
[    2.377688] bcma-host-soc 18000000.axi: bus0: Core 11 found: USB 2.0 (manuf 0x4BF, id 0x504, rev 0x07, class 0x0)
[    2.388074] bcma-host-soc 18000000.axi: bus0: Core 12 found: USB 3.0 (manuf 0x4BF, id 0x505, rev 0x07, class 0x0)
[    2.398453] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.398460] bcma-host-soc 18000000.axi: bus0: Core 13 found: SDIO3 (manuf 0x4BF, id 0x503, rev 0x01, class 0x0)
[    2.408660] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.408668] bcma-host-soc 18000000.axi: bus0: Core 14 found: I2S (manuf 0x4BF, id 0x834, rev 0x03, class 0x0)
[    2.418693] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.418701] bcma-host-soc 18000000.axi: bus0: Core 15 found: ARM Cortex A9 JTAG (manuf 0x4BF, id 0x506, rev 0x01, class 0x0)
[    2.430038] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.430045] bcma-host-soc 18000000.axi: bus0: Core 16 found: Denali DDR2/DDR3 memory controller (manuf 0x4BF, id 0x507, rev 0x01, class 0x0)
[    2.442773] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.442780] bcma-host-soc 18000000.axi: bus0: Core 17 found: ROM (manuf 0x4BF, id 0x508, rev 0x08, class 0x0)
[    2.452837] bcma-host-soc 18000000.axi: bus0: Core 18 found: NAND flash controller (manuf 0x4BF, id 0x509, rev 0x01, class 0x0)
[    2.464438] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.464446] bcma-host-soc 18000000.axi: bus0: Core 19 found: SPI flash controller (manuf 0x4BF, id 0x50A, rev 0x01, class 0x0)
[    2.475906] bcma-host-soc 18000000.axi: bus0: Flash type not supported
[    2.493656] bcma-host-soc 18000000.axi: bus0: Using SPROM revision 8 provided by platform.
[    2.493887] bgmac_bcma bcma0:3: Found PHY addr: 0
[    2.498621] bgmac_bcma bcma0:3: Support for Roboswitch not implemented
[    2.505220] bgmac_bcma bcma0:3: Invalid MAC addr: 00:00:00:00:00:00
[    2.511525] bgmac_bcma bcma0:3: Using random MAC: 0a:20:45:b4:35:db
[    2.518605] b53-srab-switch b53-srab-switch: invalid resource
[    2.524440] b53-srab-switch: probe of b53-srab-switch failed with error -22
[    2.532100] bgmac_bcma bcma0:4: Found PHY addr: 30 (NOREGS)
[    2.537703] bgmac_bcma bcma0:4: Support for Roboswitch not implemented
[    2.545571] bgmac_bcma bcma0:5: Found PHY addr: 0
[    2.550356] bgmac_bcma bcma0:5: Support for Roboswitch not implemented
[    2.558227] bgmac_bcma bcma0:6: Unsupported core_unit 3
[    2.563571] bgmac_bcma: probe of bcma0:6 failed with error -524
[    2.569664] pcie_iproc_bcma bcma0:7: host bridge /axi@18000000/pcie@12000 ranges:
[    2.577181] pcie_iproc_bcma bcma0:7:   No bus range found for /axi@18000000/pcie@12000, using [bus 00-ff]
[    2.586794] OF: /axi@18000000/pcie@12000: Missing device_type
[    2.592568] pcie_iproc_bcma bcma0:7: non-prefetchable memory resource required
[    2.729360] pcie_iproc_bcma bcma0:7: link: UP
[    2.733833] pcie_iproc_bcma bcma0:7: PCI host bridge to bus 0000:00
[    2.740143] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.745648] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fffffff]
[    2.752573] pci 0000:00:00.0: [14e4:d612] type 01 class 0x060400
[    2.758592] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    2.768277] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    2.777969] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x1c may corrupt adjacent RW1C bits
[    2.787736] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x1c may corrupt adjacent RW1C bits
[    2.797512] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    2.807301] pci 0000:00:00.0: PME# supported from D0 D3hot D3cold
[    2.813414] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4c may corrupt adjacent RW1C bits
[    2.824010] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    2.833792] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    2.843480] pci_bus 0000:00: 1-byte config write to 0000:00:00.0 offset 0xc may corrupt adjacent RW1C bits
[    2.853166] PCI: bus0: Fast back to back transfers disabled
[    2.858749] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.866779] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    2.876675] pci 0000:01:00.0: [14e4:4365] type 00 class 0x028000
[    2.882734] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    2.889557] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x007fffff 64bit]
[    2.896363] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x000fffff 64bit pref]
[    2.903689] pci 0000:01:00.0: supports D1 D2
[    2.908772] PCI: bus1: Fast back to back transfers disabled
[    2.914390] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    2.921052] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x08bfffff]
[    2.927857] pci 0000:00:00.0: BAR 9: assigned [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.935631] pci 0000:01:00.0: BAR 2: assigned [mem 0x08000000-0x087fffff 64bit]
[    2.942972] pci 0000:01:00.0: BAR 4: assigned [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.950744] pci 0000:01:00.0: BAR 0: assigned [mem 0x08800000-0x08807fff 64bit]
[    2.958075] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.963053] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x08bfffff]
[    2.969860] pci 0000:00:00.0:   bridge window [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.977817] pcie_iproc_bcma bcma0:8: host bridge /axi@18000000/pcie@13000 ranges:
[    2.985351] pcie_iproc_bcma bcma0:8:   No bus range found for /axi@18000000/pcie@13000, using [bus 00-ff]
[    2.994960] pcie_iproc_bcma bcma0:8: non-prefetchable memory resource required
[    3.129358] pcie_iproc_bcma bcma0:8: link: UP
[    3.133828] pcie_iproc_bcma bcma0:8: PCI host bridge to bus 0001:00
[    3.140135] pci_bus 0001:00: root bus resource [bus 00-ff]
[    3.145639] pci_bus 0001:00: root bus resource [mem 0x20000000-0x27ffffff]
[    3.152564] pci 0001:00:00.0: [14e4:d612] type 01 class 0x060400
[    3.158625] pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
[    3.165568] PCI: bus0: Fast back to back transfers disabled
[    3.171176] pci 0001:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.179328] pci 0001:01:00.0: [14e4:4365] type 00 class 0x028000
[    3.185393] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    3.192218] pci 0001:01:00.0: reg 0x18: [mem 0x00000000-0x007fffff 64bit]
[    3.199028] pci 0001:01:00.0: reg 0x20: [mem 0x00000000-0x000fffff 64bit pref]
[    3.206355] pci 0001:01:00.0: supports D1 D2
[    3.211441] PCI: bus1: Fast back to back transfers disabled
[    3.217035] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
[    3.223695] pci 0001:00:00.0: BAR 8: assigned [mem 0x20000000-0x20bfffff]
[    3.230502] pci 0001:00:00.0: BAR 9: assigned [mem 0x20c00000-0x20cfffff 64bit pref]
[    3.238261] pci 0001:01:00.0: BAR 2: assigned [mem 0x20000000-0x207fffff 64bit]
[    3.245603] pci 0001:01:00.0: BAR 4: assigned [mem 0x20c00000-0x20cfffff 64bit pref]
[    3.253379] pci 0001:01:00.0: BAR 0: assigned [mem 0x20800000-0x20807fff 64bit]
[    3.260718] pci 0001:00:00.0: PCI bridge to [bus 01]
[    3.265695] pci 0001:00:00.0:   bridge window [mem 0x20000000-0x20bfffff]
[    3.272504] pci 0001:00:00.0:   bridge window [mem 0x20c00000-0x20cfffff 64bit pref]
[    3.280479] pcie_iproc_bcma bcma0:9: host bridge /axi@18000000/pcie@14000 ranges:
[    3.287996] pcie_iproc_bcma bcma0:9:   No bus range found for /axi@18000000/pcie@14000, using [bus 00-ff]
[    3.297607] pcie_iproc_bcma bcma0:9: non-prefetchable memory resource required
[    3.429358] pcie_iproc_bcma bcma0:9: PHY or data link is INACTIVE!
[    3.435551] pcie_iproc_bcma bcma0:9: no PCIe EP device detected
[    3.442328] bcm47xx-wdt bcm47xx-wdt.0: BCM47xx Watchdog Timer enabled (30 seconds, Software Timer)
[    3.451387] bcma-host-soc 18000000.axi: bus0: Bus registered
[    3.457861] NET: Registered protocol family 10
[    3.463276] Segment Routing with IPv6
[    3.467008] NET: Registered protocol family 17
[    3.471713] 8021q: 802.1Q VLAN Support v1.8
[    3.475960] Registering SWP/SWPB emulation handler
[    3.483405] b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 0
[    3.612816] libphy: dsa slave smi: probed
[    3.617413] b53-srab-switch 18007000.ethernet-switch lan4 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[    3.629850] b53-srab-switch 18007000.ethernet-switch lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[    3.642227] b53-srab-switch 18007000.ethernet-switch lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[    3.654637] b53-srab-switch 18007000.ethernet-switch lan1 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[    3.667075] b53-srab-switch 18007000.ethernet-switch wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY] (irq=POLL)
[    3.679713] b53-srab-switch 18007000.ethernet-switch: Using legacy PHYLIB callbacks. Please migrate to PHYLINK!
[    3.690557] DSA: tree 0 setup
[    3.693811] UBI: auto-attach mtd4
[    3.697155] ubi0: attaching mtd4
[    4.330425] ubi0: scanning is finished
[    4.342749] ubi0: attached mtd4 (name "ubi", size 122 MiB)
[    4.348264] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.355184] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.361995] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.368967] ubi0: good PEBs: 976, bad PEBs: 0, corrupted PEBs: 0
[    4.374987] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    4.382229] ubi0: max/mean erase counter: 55/28, WL threshold: 4096, image sequence number: 884836398
[    4.391471] ubi0: available PEBs: 0, total reserved PEBs: 976, PEBs reserved for bad PEB handling: 20
[    4.400769] ubi0: background thread "ubi_bgt0d" started, PID 459
[    4.407603] block ubiblock0_0: created from ubi0:0(rootfs)
[    4.413138] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    4.423810] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    4.431765] Freeing unused kernel memory: 1024K
[    4.459509] Run /sbin/init as init process
[    4.463614]   with arguments:
[    4.463616]     /sbin/init
[    4.463618]   with environment:
[    4.463621]     HOME=/
[    4.463623]     TERM=linux
[    4.653130] init: Console is alive
[    4.656738] init: - watchdog -
[    4.891928] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.942508] usbcore: registered new interface driver usbfs
[    4.948086] usbcore: registered new interface driver hub
[    4.953503] usbcore: registered new device driver usb
[    4.961838] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.969215] ehci-fsl: Freescale EHCI Host controller driver
[    4.976450] ehci-platform: EHCI generic platform driver
[    4.984386] ehci-platform 18021000.usb: EHCI Host Controller
[    4.986971] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.990176] ehci-platform 18021000.usb: new USB bus registered, assigned bus number 1
[    4.990332] ehci-platform 18021000.usb: irq 45, io mem 0x18021000
[    4.997443] ohci-platform: OHCI generic platform driver
[    5.015901] ohci-platform 18022000.usb: Generic Platform OHCI controller
[    5.022657] ohci-platform 18022000.usb: new USB bus registered, assigned bus number 2
[    5.029390] ehci-platform 18021000.usb: USB 2.0 started, EHCI 1.00
[    5.030614] ohci-platform 18022000.usb: irq 45, io mem 0x18022000
[    5.037101] hub 1-0:1.0: USB hub found
[    5.046656] hub 1-0:1.0: 2 ports detected
[    5.123895] hub 2-0:1.0: USB hub found
[    5.127784] hub 2-0:1.0: 2 ports detected
[    5.159366] xhci-hcd 18023000.usb: xHCI Host Controller
[    5.164631] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 3
[    5.172273] xhci-hcd 18023000.usb: hcc params 0x02501164 hci version 0x100 quirks 0x0000020000010010
[    5.181471] xhci-hcd 18023000.usb: irq 46, io mem 0x18023000
[    5.188659] hub 3-0:1.0: USB hub found
[    5.192511] hub 3-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    5.199823] xhci-hcd 18023000.usb: xHCI Host Controller
[    5.205080] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 4
[    5.212518] xhci-hcd 18023000.usb: Host supports USB 3.0 SuperSpeed
[    5.220472] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.228982] hub 4-0:1.0: USB hub found
[    5.232840] hub 4-0:1.0: 1 port detected
[    5.239417] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.252371] init: - preinit -
[    6.410510] b53-srab-switch 18007000.ethernet-switch lan1: configuring for phy/gmii link mode
[    6.419142] bgmac_bcma bcma0:4 eth1: Link is Up - 1Gbps/Full - flow control off
[    6.426638] 8021q: adding VLAN 0 to HW filter on device lan1
[    6.433485] b53-srab-switch 18007000.ethernet-switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[    6.489436] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[    6.495900] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
[   10.646118] UBIFS (ubi0:1): Mounting in unauthenticated mode
[   10.651944] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 617
[   10.753583] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   10.761463] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   10.771412] UBIFS (ubi0:1): FS size: 115929088 bytes (110 MiB, 913 LEBs), journal size 5840896 bytes (5 MiB, 46 LEBs)
[   10.782045] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[   10.788675] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID B35EAF1C-DA4B-4E7D-8DE2-B697B376FF03, small LPT model
[   10.801214] mount_root: overlay filesystem has not been fully initialized yet
[   10.808754] mount_root: switching to ubifs overlay
[   11.059258] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.141763] b53-srab-switch 18007000.ethernet-switch lan1: Link is Down
[   11.232905] procd: - early -
[   11.235910] procd: - watchdog -
[   11.791521] procd: - watchdog -
[   11.794900] procd: - ubus -
[   11.849635] procd: - init -
[   12.173258] urngd: v1.0.2 started.
[   12.184857] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.203271] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   12.210928] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   12.232365] xt_time: kernel timezone is -0000
[   12.252278] PPP generic driver version 2.4.2
[   12.257630] NET: Registered protocol family 24
[   12.271647] usbcore: registered new interface driver brcmfmac
[   12.277576] pci_generic_config_write32: 50 callbacks suppressed
[   12.277587] pci_bus 0000:01: 1-byte config write to 0000:01:00.0 offset 0x3c may corrupt adjacent RW1C bits
[   12.293310] pci 0000:00:00.0: enabling device (0140 -> 0142)
[   12.298985] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.308670] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.318356] brcmfmac 0000:01:00.0: enabling device (0140 -> 0142)
[   12.324473] pci_bus 0000:01: 2-byte config write to 0000:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.334161] pci_bus 0000:01: 2-byte config write to 0000:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.469653] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   12.688610] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.asus,rt-ac88u.txt failed with error -2
[   12.699769] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
[   13.042111] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   13.050953] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   13.062236] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43664/4 wl0: Nov  5 2018 03:19:56 version 10.28.2 (r769115) FWID 01-d2cbb8fd
[   13.083082] pci_bus 0001:01: 1-byte config write to 0001:01:00.0 offset 0x3c may corrupt adjacent RW1C bits
[   13.092903] pci 0001:00:00.0: enabling device (0140 -> 0142)
[   13.098586] pci_bus 0001:00: 2-byte config write to 0001:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   13.108288] pci_bus 0001:00: 2-byte config write to 0001:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   13.117996] brcmfmac 0001:01:00.0: enabling device (0140 -> 0142)
[   13.124111] pci_bus 0001:01: 2-byte config write to 0001:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   13.133792] pci_bus 0001:01: 2-byte config write to 0001:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   13.259821] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   13.272335] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.asus,rt-ac88u.txt failed with error -2
[   13.283577] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
[   13.632170] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   13.640965] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   13.652329] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43664/4 wl0: Nov  5 2018 03:19:56 version 10.28.2 (r769115) FWID 01-d2cbb8fd
[   13.681607] kmodloader: done loading kernel modules from /etc/modules.d/*
[   18.123587] bgmac_bcma bcma0:4 eth1: Link is Up - 1Gbps/Full - flow control off
[   18.131265] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   18.138381] b53-srab-switch 18007000.ethernet-switch lan1: configuring for phy/gmii link mode
[   18.149120] 8021q: adding VLAN 0 to HW filter on device lan1
[   18.209756] br-lan: port 1(lan1) entered blocking state
[   18.215005] br-lan: port 1(lan1) entered disabled state
[   18.220543] device lan1 entered promiscuous mode
[   18.225178] device eth1 entered promiscuous mode
[   18.366898] b53-srab-switch 18007000.ethernet-switch lan2: configuring for phy/gmii link mode
[   18.375870] 8021q: adding VLAN 0 to HW filter on device lan2
[   18.439821] br-lan: port 2(lan2) entered blocking state
[   18.445070] br-lan: port 2(lan2) entered disabled state
[   18.450600] device lan2 entered promiscuous mode
[   18.571569] b53-srab-switch 18007000.ethernet-switch lan3: configuring for phy/gmii link mode
[   18.580426] 8021q: adding VLAN 0 to HW filter on device lan3
[   18.649687] br-lan: port 3(lan3) entered blocking state
[   18.654931] br-lan: port 3(lan3) entered disabled state
[   18.660576] device lan3 entered promiscuous mode
[   18.821525] b53-srab-switch 18007000.ethernet-switch lan4: configuring for phy/gmii link mode
[   18.830379] 8021q: adding VLAN 0 to HW filter on device lan4
[   18.899690] br-lan: port 4(lan4) entered blocking state
[   18.904936] br-lan: port 4(lan4) entered disabled state
[   18.910559] device lan4 entered promiscuous mode
[   19.051532] b53-srab-switch 18007000.ethernet-switch extsw: configuring for fixed/ link mode
[   19.060170] 8021q: adding VLAN 0 to HW filter on device extsw
[   19.066015] b53-srab-switch 18007000.ethernet-switch extsw: Link is Up - 1Gbps/Full - flow control off
[   19.129687] br-lan: port 5(extsw) entered blocking state
[   19.135018] br-lan: port 5(extsw) entered disabled state
[   19.140771] device extsw entered promiscuous mode
[   19.239466] br-lan: port 5(extsw) entered blocking state
[   19.244805] br-lan: port 5(extsw) entered forwarding state
[   19.279432] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   19.291666] b53-srab-switch 18007000.ethernet-switch wan: configuring for phy/gmii link mode
[   19.300415] 8021q: adding VLAN 0 to HW filter on device wan
[   21.310134] b53-srab-switch 18007000.ethernet-switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   21.319609] br-lan: port 1(lan1) entered blocking state
[   21.324848] br-lan: port 1(lan1) entered forwarding state

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-24  8:50         ` Arınç ÜNAL
  0 siblings, 0 replies; 20+ messages in thread
From: Arınç ÜNAL @ 2021-09-24  8:50 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

[-- Attachment #1: Type: text/plain, Size: 7285 bytes --]

On 23/09/2021 03:22, Florian Fainelli wrote:
> 
> 
> On 9/22/2021 3:26 PM, Arınç ÜNAL wrote:
>> On 22/09/2021 21:15, Florian Fainelli wrote:
>>> On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
>>>> Hardware Info
>>>> -------------
>>>>
>>>> Processor    - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
>>>> Switch        - BCM53012 in BCM4709C0KFEBG & external RTL8365MB
>>>
>>> There is no Device Tree description of the RTL8365MB switch, can it be
>>> driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
>>> show stopper for accepting the patch, just wondering if you are somehow
>>> trying to get that switch controlled by the rtl8366 DSA driver as well?
>>>
>> There's a v1 patch on net-next adding DSA support for RTL8365MB by 
>> Alvin Šipraga, CC'ing them. There's also a v2 patch coming.
>> https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/
>>
>> I've been mailing Alvin to figure out how to define it on the device 
>> tree. They have provided very useful information. Quoting a few:
>>
>>  >> I'm trying to write the device tree to support this switch. I'm 
>> not sure
>>  >> whether the default GPIO IDs of mdc-gpios, mdio-gpios, reset-gpios &
>>  >> interrupts on realtek-smi.txt kernel documentation are correct.
>>  >> 
>> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt 
>>
>>  >
>>  > These gpios are just an example. It really depends how your board is
>>  > wired up. You have to figure out which SoC pad is wired to the MDC,
>>  > MDIO, and RESET pins on the RTL8365MB. Then you have to make sure the
>>  > pinmux is set up correctly so that these pads correspond to some GPIO
>>  > with a given ID, and then pick the right GPIO controller 
>> (&chipcommon?)
>>  > and put the ID after that. It will not necessarily be 21, 22, 14.
>>
>>  > In summary:
>>  >
>>  > - figure out which pads are wired to MDC, MDIO, RESET
>>  > - figure out pinmux to make them into gpios
>>  > - figure out gpio ID and describe that in the device tree
>>  >
>>
>> I have backported the v1 patch to kernel 5.10 and tried an example 
>> definition on the device tree to test it out on RT-AC88U. It's on this 
>> branch:
>> https://github.com/arinc9/openwrt/commits/realtek-work-asus_rt-ac88u
> 
> Your dsa,member proper looks reversed, you would want it to be:
> 
> dsa,member = <1 0>;

Thanks!

> 
> to indicate that these are indeed disjoint DSA trees with the tree being 
> 1 and the switch being member 0 (the one and only). This part of the 
> driver/binding looks a bit weird too:
> 
>      switch@1 {
> +        compatible = "realtek,rtl8365mb";
> +        /* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
> +        mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
> +        mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
> +        reset-gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
> 
> this is clearly a MDIO-attached switch, so it should be a children of 
> the GPIO controller node. There is a hardware MDIO controller on the 
> BCM5301X so you should be able to avoid using bit-banging here and 
> instead using the BCM5301X's MDIO controller proper.

I took linksys panamera device tree as an example, this device is very 
similar to Asus RT-AC88U.
https://github.com/Broadcom/stblinux/blob/devicetree/next/arch/arm/boot/dts/bcm47094-linksys-panamera.dts

I commented out the "reg" property on switch@1 so we can see if it finds 
the switch while scanning PHY addresses on mdio 200.

I don't know if the default "interrupt-controller" and "compatible = 
"realtek,smi-mdio", "dsa-mdio";" specification is correct, so I took 
them out for now.

	mdio-mux@18003000 {

		/* BIT(9) = 1 => external mdio */
		mdio@200 {
			reg = <0x200>;
			#address-cells = <1>;
			#size-cells = <0>;

			switch@1 {
				compatible = "realtek,rtl8365mb";
				#address-cells = <1>;
				#size-cells = <0>;
				reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
				reset-names = "robo_reset";
/*				reg = <0>;*/
				dsa,member = <1 0>;
				pinctrl-names = "default";
				pinctrl-0 = <&pinmux_mdio>;

				ports {
					#address-cells = <1>;
					#size-cells = <0>;

					port@0 {
						reg = <0>;
						label = "lan8";
					};

					port@1 {
						reg = <1>;
						label = "lan7";
					};

					port@2 {
						reg = <2>;
						label = "lan6";
					};

					port@3 {
						reg = <3>;
						label = "lan5";
					};

					port@4 {
						reg = <4>;
						label = "cpu";
						ethernet = <&sw0_p5>;
						phy-mode = "rgmii";

						fixed-link {
							speed = <1000>;
							full-duplex;
						};
					};
				};
			};
		};
	};

Here's relevant part of the bootlog. Full bootlog is in the attachments.

[    2.027843] bcm_iproc 18029200.spi: using bspi-mspi mode
[    2.034744] libphy: Fixed MDIO Bus: probed
[    2.039638] libphy: iProc MDIO bus: probed
[    2.043764] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
[    2.051215] libphy: mdio_mux: probed
[    2.055587] libphy: mdio_mux: probed
[    2.059196] mdio_bus 0.200: switch@1 has invalid PHY address
[    2.064894] mdio_bus 0.200: scan phy switch at address 0
[    2.070231] mdio_bus 0.200: scan phy switch at address 1
[    2.075554] mdio_bus 0.200: scan phy switch at address 2
[    2.080894] mdio_bus 0.200: scan phy switch at address 3
[    2.086217] mdio_bus 0.200: scan phy switch at address 4
[    2.091549] mdio_bus 0.200: scan phy switch at address 5
[    2.096870] mdio_bus 0.200: scan phy switch at address 6
[    2.102202] mdio_bus 0.200: scan phy switch at address 7
[    2.107523] mdio_bus 0.200: scan phy switch at address 8
[    2.112864] mdio_bus 0.200: scan phy switch at address 9
[    2.118186] mdio_bus 0.200: scan phy switch at address 10
[    2.123608] mdio_bus 0.200: scan phy switch at address 11
[    2.129022] mdio_bus 0.200: scan phy switch at address 12
[    2.134442] mdio_bus 0.200: scan phy switch at address 13
[    2.139858] mdio_bus 0.200: scan phy switch at address 14
[    2.145274] mdio_bus 0.200: scan phy switch at address 15
[    2.150697] mdio_bus 0.200: scan phy switch at address 16
[    2.156110] mdio_bus 0.200: scan phy switch at address 17
[    2.161528] mdio_bus 0.200: scan phy switch at address 18
[    2.166937] mdio_bus 0.200: scan phy switch at address 19
[    2.172355] mdio_bus 0.200: scan phy switch at address 20
[    2.177764] mdio_bus 0.200: scan phy switch at address 21
[    2.183183] mdio_bus 0.200: scan phy switch at address 22
[    2.188592] mdio_bus 0.200: scan phy switch at address 23
[    2.194011] mdio_bus 0.200: scan phy switch at address 24
[    2.199427] mdio_bus 0.200: scan phy switch at address 25
[    2.204834] mdio_bus 0.200: scan phy switch at address 26
[    2.210253] mdio_bus 0.200: scan phy switch at address 27
[    2.215662] mdio_bus 0.200: scan phy switch at address 28
[    2.221080] mdio_bus 0.200: scan phy switch at address 29
[    2.226490] mdio_bus 0.200: scan phy switch at address 30
[    2.231914] mdio_bus 0.200: scan phy switch at address 31
[    2.237939] b53-srab-switch 18007000.ethernet-switch: found switch: 
BCM53012, rev 0
[    2.245957] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded

Looks like the switch is not on 0x200, what else can we try?

Arınç

[-- Attachment #2: mdio-mux.log --]
[-- Type: text/plain, Size: 32300 bytes --]

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.64 (user@arinc9) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r17569-cf6e09471b) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Thu Sep 23 21:49:31 2021
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Asus RT-AC88U
[    0.000000] earlycon: ns16550 at MMIO 0x18000300 (options '115200n8')
[    0.000000] printk: bootconsole [ns16550] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Hit pending asynchronous external abort (FSR=0x00001c06) during first unmask, this is most likely caused by a firmware/bootloader bug.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  [mem 0x0000000008000000-0x000000009fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   node   0: [mem 0x0000000088000000-0x000000009fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000009fffffff]
[    0.000000] On node 0 totalpages: 131072
[    0.000000]   Normal zone: 288 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000]   HighMem zone: 98304 pages, LIFO batch:31
[    0.000000] percpu: Embedded 14 pages/cpu s27212 r8192 d21940 u57344
[    0.000000] pcpu-alloc: s27212 r8192 d21940 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130784
[    0.000000] Kernel command line: earlycon
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 510324K/524288K available (5635K kernel code, 565K rwdata, 1364K rodata, 1024K init, 288K bss, 13964K reserved, 0K cma-reserved, 393216K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C: DT/platform modifies aux control register: 0x0a130000 -> 0x3a530000
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x7e530001
[    0.000000] random: get_random_bytes called from start_kernel+0x360/0x50c with crng_init=0
[    0.000007] sched_clock: 64 bits at 700MHz, resolution 1ns, wraps every 4398046511103ns
[    0.016397] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0xa17102bcf3, max_idle_ns: 440795224838 ns
[    0.027545] Switching to timer-based delay loop, resolution 1ns
[    0.033666] Calibrating delay loop (skipped), value calculated using timer frequency.. 1400.00 BogoMIPS (lpj=7000000)
[    0.044404] pid_max: default: 32768 minimum: 301
[    0.049116] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.056500] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.064881] CPU: Testing write buffer coherency: ok
[    0.069836] CPU0: Spectre v2: using BPIALL workaround
[    0.075124] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.081213] Setting up static identity map for 0x100000 - 0x10003c
[    0.087561] rcu: Hierarchical SRCU implementation.
[    0.092476] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.100371] smp: Bringing up secondary CPUs ...
[    0.105499] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.105505] CPU1: Spectre v2: using BPIALL workaround
[    0.116414] smp: Brought up 1 node, 2 CPUs
[    0.120545] SMP: Total of 2 processors activated (2800.00 BogoMIPS).
[    0.126948] CPU: WARNING: CPU(s) started in wrong/inconsistent modes (primary CPU mode 0x13)
[    0.135474] CPU: This may indicate a broken bootloader or firmware.
[    0.143725] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.153702] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.160710] pinctrl core: initialized pinctrl subsystem
[    0.166389] NET: Registered protocol family 16
[    0.171412] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.178959] thermal_sys: Registered thermal governor 'step_wise'
[    0.199499] clocksource: Switched to clocksource arm_global_timer
[    0.212562] NET: Registered protocol family 2
[    0.217112] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.224740] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.233219] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.240931] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.248031] TCP: Hash tables configured (established 1024 bind 1024)
[    0.254537] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.261161] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.268328] NET: Registered protocol family 1
[    0.272753] PCI: CLS 0 bytes, default 64
[    0.278104] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.286704] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.292638] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.303443] bounce: pool size: 64 pages
[    0.308204] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.315355] printk: console [ttyS0] disabled
[    0.319758] 18000300.serial: ttyS0 at MMIO 0x18000300 (irq = 26, base_baud = 7812500) is a 16550
[    0.328651] printk: console [ttyS0] enabled
[    0.337085] printk: bootconsole [ns16550] disabled
[    0.347498] bcm2835-rng 18004000.rng: hwrng registered
[    1.023069] random: fast init done
[    1.026530] random: crng init done
[    1.031402] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0xd1
[    1.037782] nand: ESMT NAND 128MiB 3,3V 8-bit
[    1.042177] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.049807] iproc_nand 18028000.nand-controller: detected 128MiB total, 128KiB blocks, 2KiB pages, 16B OOB, 8-bit, BCH-8
[    1.060717] Scanning device for bad blocks
[    1.966576] 3 fixed-partitions partitions found on MTD device brcmnand.0
[    1.973314] Creating 3 MTD partitions on "brcmnand.0":
[    1.978461] 0x000000000000-0x000000080000 : "boot"
[    1.983843] 0x000000080000-0x000000200000 : "nvram"
[    1.989291] 0x000000200000-0x000008000000 : "firmware"
[    1.996049] 2 trx partitions found on MTD device firmware
[    2.001499] Creating 2 MTD partitions on "firmware":
[    2.006479] 0x00000000001c-0x000000400000 : "linux"
[    2.011376] mtd: partition "linux" doesn't start on an erase/write block boundary -- force read-only
[    2.021124] 0x000000400000-0x000007e00000 : "ubi"
[    2.027843] bcm_iproc 18029200.spi: using bspi-mspi mode
[    2.034744] libphy: Fixed MDIO Bus: probed
[    2.039638] libphy: iProc MDIO bus: probed
[    2.043764] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
[    2.051215] libphy: mdio_mux: probed
[    2.055587] libphy: mdio_mux: probed
[    2.059196] mdio_bus 0.200: switch@1 has invalid PHY address
[    2.064894] mdio_bus 0.200: scan phy switch at address 0
[    2.070231] mdio_bus 0.200: scan phy switch at address 1
[    2.075554] mdio_bus 0.200: scan phy switch at address 2
[    2.080894] mdio_bus 0.200: scan phy switch at address 3
[    2.086217] mdio_bus 0.200: scan phy switch at address 4
[    2.091549] mdio_bus 0.200: scan phy switch at address 5
[    2.096870] mdio_bus 0.200: scan phy switch at address 6
[    2.102202] mdio_bus 0.200: scan phy switch at address 7
[    2.107523] mdio_bus 0.200: scan phy switch at address 8
[    2.112864] mdio_bus 0.200: scan phy switch at address 9
[    2.118186] mdio_bus 0.200: scan phy switch at address 10
[    2.123608] mdio_bus 0.200: scan phy switch at address 11
[    2.129022] mdio_bus 0.200: scan phy switch at address 12
[    2.134442] mdio_bus 0.200: scan phy switch at address 13
[    2.139858] mdio_bus 0.200: scan phy switch at address 14
[    2.145274] mdio_bus 0.200: scan phy switch at address 15
[    2.150697] mdio_bus 0.200: scan phy switch at address 16
[    2.156110] mdio_bus 0.200: scan phy switch at address 17
[    2.161528] mdio_bus 0.200: scan phy switch at address 18
[    2.166937] mdio_bus 0.200: scan phy switch at address 19
[    2.172355] mdio_bus 0.200: scan phy switch at address 20
[    2.177764] mdio_bus 0.200: scan phy switch at address 21
[    2.183183] mdio_bus 0.200: scan phy switch at address 22
[    2.188592] mdio_bus 0.200: scan phy switch at address 23
[    2.194011] mdio_bus 0.200: scan phy switch at address 24
[    2.199427] mdio_bus 0.200: scan phy switch at address 25
[    2.204834] mdio_bus 0.200: scan phy switch at address 26
[    2.210253] mdio_bus 0.200: scan phy switch at address 27
[    2.215662] mdio_bus 0.200: scan phy switch at address 28
[    2.221080] mdio_bus 0.200: scan phy switch at address 29
[    2.226490] mdio_bus 0.200: scan phy switch at address 30
[    2.231914] mdio_bus 0.200: scan phy switch at address 31
[    2.237939] b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 0
[    2.245957] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
[    2.252083] bcma-host-soc 18000000.axi: bus0: Found chip with id 53030, rev 0x00 and package 0x00
[    2.261088] bcma-host-soc 18000000.axi: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x2A, class 0x0)
[    2.271679] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.271688] bcma-host-soc 18000000.axi: bus0: Core 1 found: Chipcommon B (manuf 0x4BF, id 0x50B, rev 0x05, class 0x0)
[    2.282423] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.282430] bcma-host-soc 18000000.axi: bus0: Core 2 found: DMA (manuf 0x4BF, id 0x502, rev 0x04, class 0x0)
[    2.292411] bcma-host-soc 18000000.axi: bus0: Core 3 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.302815] bcma-host-soc 18000000.axi: bus0: Core 4 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.313214] bcma-host-soc 18000000.axi: bus0: Core 5 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.323639] bcma-host-soc 18000000.axi: bus0: Core 6 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    2.333999] bcma-host-soc 18000000.axi: bus0: Core 7 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    2.344542] bcma-host-soc 18000000.axi: bus0: Core 8 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    2.355088] bcma-host-soc 18000000.axi: bus0: Core 9 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    2.365650] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.365658] bcma-host-soc 18000000.axi: bus0: Core 10 found: ARM Cortex A9 core (ihost) (manuf 0x4BF, id 0x510, rev 0x07, class 0x0)
[    2.377688] bcma-host-soc 18000000.axi: bus0: Core 11 found: USB 2.0 (manuf 0x4BF, id 0x504, rev 0x07, class 0x0)
[    2.388074] bcma-host-soc 18000000.axi: bus0: Core 12 found: USB 3.0 (manuf 0x4BF, id 0x505, rev 0x07, class 0x0)
[    2.398453] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.398460] bcma-host-soc 18000000.axi: bus0: Core 13 found: SDIO3 (manuf 0x4BF, id 0x503, rev 0x01, class 0x0)
[    2.408660] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.408668] bcma-host-soc 18000000.axi: bus0: Core 14 found: I2S (manuf 0x4BF, id 0x834, rev 0x03, class 0x0)
[    2.418693] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.418701] bcma-host-soc 18000000.axi: bus0: Core 15 found: ARM Cortex A9 JTAG (manuf 0x4BF, id 0x506, rev 0x01, class 0x0)
[    2.430038] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.430045] bcma-host-soc 18000000.axi: bus0: Core 16 found: Denali DDR2/DDR3 memory controller (manuf 0x4BF, id 0x507, rev 0x01, class 0x0)
[    2.442773] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.442780] bcma-host-soc 18000000.axi: bus0: Core 17 found: ROM (manuf 0x4BF, id 0x508, rev 0x08, class 0x0)
[    2.452837] bcma-host-soc 18000000.axi: bus0: Core 18 found: NAND flash controller (manuf 0x4BF, id 0x509, rev 0x01, class 0x0)
[    2.464438] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    2.464446] bcma-host-soc 18000000.axi: bus0: Core 19 found: SPI flash controller (manuf 0x4BF, id 0x50A, rev 0x01, class 0x0)
[    2.475906] bcma-host-soc 18000000.axi: bus0: Flash type not supported
[    2.493656] bcma-host-soc 18000000.axi: bus0: Using SPROM revision 8 provided by platform.
[    2.493887] bgmac_bcma bcma0:3: Found PHY addr: 0
[    2.498621] bgmac_bcma bcma0:3: Support for Roboswitch not implemented
[    2.505220] bgmac_bcma bcma0:3: Invalid MAC addr: 00:00:00:00:00:00
[    2.511525] bgmac_bcma bcma0:3: Using random MAC: 0a:20:45:b4:35:db
[    2.518605] b53-srab-switch b53-srab-switch: invalid resource
[    2.524440] b53-srab-switch: probe of b53-srab-switch failed with error -22
[    2.532100] bgmac_bcma bcma0:4: Found PHY addr: 30 (NOREGS)
[    2.537703] bgmac_bcma bcma0:4: Support for Roboswitch not implemented
[    2.545571] bgmac_bcma bcma0:5: Found PHY addr: 0
[    2.550356] bgmac_bcma bcma0:5: Support for Roboswitch not implemented
[    2.558227] bgmac_bcma bcma0:6: Unsupported core_unit 3
[    2.563571] bgmac_bcma: probe of bcma0:6 failed with error -524
[    2.569664] pcie_iproc_bcma bcma0:7: host bridge /axi@18000000/pcie@12000 ranges:
[    2.577181] pcie_iproc_bcma bcma0:7:   No bus range found for /axi@18000000/pcie@12000, using [bus 00-ff]
[    2.586794] OF: /axi@18000000/pcie@12000: Missing device_type
[    2.592568] pcie_iproc_bcma bcma0:7: non-prefetchable memory resource required
[    2.729360] pcie_iproc_bcma bcma0:7: link: UP
[    2.733833] pcie_iproc_bcma bcma0:7: PCI host bridge to bus 0000:00
[    2.740143] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.745648] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fffffff]
[    2.752573] pci 0000:00:00.0: [14e4:d612] type 01 class 0x060400
[    2.758592] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    2.768277] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    2.777969] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x1c may corrupt adjacent RW1C bits
[    2.787736] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x1c may corrupt adjacent RW1C bits
[    2.797512] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    2.807301] pci 0000:00:00.0: PME# supported from D0 D3hot D3cold
[    2.813414] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4c may corrupt adjacent RW1C bits
[    2.824010] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    2.833792] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    2.843480] pci_bus 0000:00: 1-byte config write to 0000:00:00.0 offset 0xc may corrupt adjacent RW1C bits
[    2.853166] PCI: bus0: Fast back to back transfers disabled
[    2.858749] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.866779] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    2.876675] pci 0000:01:00.0: [14e4:4365] type 00 class 0x028000
[    2.882734] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    2.889557] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x007fffff 64bit]
[    2.896363] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x000fffff 64bit pref]
[    2.903689] pci 0000:01:00.0: supports D1 D2
[    2.908772] PCI: bus1: Fast back to back transfers disabled
[    2.914390] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    2.921052] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x08bfffff]
[    2.927857] pci 0000:00:00.0: BAR 9: assigned [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.935631] pci 0000:01:00.0: BAR 2: assigned [mem 0x08000000-0x087fffff 64bit]
[    2.942972] pci 0000:01:00.0: BAR 4: assigned [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.950744] pci 0000:01:00.0: BAR 0: assigned [mem 0x08800000-0x08807fff 64bit]
[    2.958075] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.963053] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x08bfffff]
[    2.969860] pci 0000:00:00.0:   bridge window [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.977817] pcie_iproc_bcma bcma0:8: host bridge /axi@18000000/pcie@13000 ranges:
[    2.985351] pcie_iproc_bcma bcma0:8:   No bus range found for /axi@18000000/pcie@13000, using [bus 00-ff]
[    2.994960] pcie_iproc_bcma bcma0:8: non-prefetchable memory resource required
[    3.129358] pcie_iproc_bcma bcma0:8: link: UP
[    3.133828] pcie_iproc_bcma bcma0:8: PCI host bridge to bus 0001:00
[    3.140135] pci_bus 0001:00: root bus resource [bus 00-ff]
[    3.145639] pci_bus 0001:00: root bus resource [mem 0x20000000-0x27ffffff]
[    3.152564] pci 0001:00:00.0: [14e4:d612] type 01 class 0x060400
[    3.158625] pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
[    3.165568] PCI: bus0: Fast back to back transfers disabled
[    3.171176] pci 0001:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.179328] pci 0001:01:00.0: [14e4:4365] type 00 class 0x028000
[    3.185393] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    3.192218] pci 0001:01:00.0: reg 0x18: [mem 0x00000000-0x007fffff 64bit]
[    3.199028] pci 0001:01:00.0: reg 0x20: [mem 0x00000000-0x000fffff 64bit pref]
[    3.206355] pci 0001:01:00.0: supports D1 D2
[    3.211441] PCI: bus1: Fast back to back transfers disabled
[    3.217035] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
[    3.223695] pci 0001:00:00.0: BAR 8: assigned [mem 0x20000000-0x20bfffff]
[    3.230502] pci 0001:00:00.0: BAR 9: assigned [mem 0x20c00000-0x20cfffff 64bit pref]
[    3.238261] pci 0001:01:00.0: BAR 2: assigned [mem 0x20000000-0x207fffff 64bit]
[    3.245603] pci 0001:01:00.0: BAR 4: assigned [mem 0x20c00000-0x20cfffff 64bit pref]
[    3.253379] pci 0001:01:00.0: BAR 0: assigned [mem 0x20800000-0x20807fff 64bit]
[    3.260718] pci 0001:00:00.0: PCI bridge to [bus 01]
[    3.265695] pci 0001:00:00.0:   bridge window [mem 0x20000000-0x20bfffff]
[    3.272504] pci 0001:00:00.0:   bridge window [mem 0x20c00000-0x20cfffff 64bit pref]
[    3.280479] pcie_iproc_bcma bcma0:9: host bridge /axi@18000000/pcie@14000 ranges:
[    3.287996] pcie_iproc_bcma bcma0:9:   No bus range found for /axi@18000000/pcie@14000, using [bus 00-ff]
[    3.297607] pcie_iproc_bcma bcma0:9: non-prefetchable memory resource required
[    3.429358] pcie_iproc_bcma bcma0:9: PHY or data link is INACTIVE!
[    3.435551] pcie_iproc_bcma bcma0:9: no PCIe EP device detected
[    3.442328] bcm47xx-wdt bcm47xx-wdt.0: BCM47xx Watchdog Timer enabled (30 seconds, Software Timer)
[    3.451387] bcma-host-soc 18000000.axi: bus0: Bus registered
[    3.457861] NET: Registered protocol family 10
[    3.463276] Segment Routing with IPv6
[    3.467008] NET: Registered protocol family 17
[    3.471713] 8021q: 802.1Q VLAN Support v1.8
[    3.475960] Registering SWP/SWPB emulation handler
[    3.483405] b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 0
[    3.612816] libphy: dsa slave smi: probed
[    3.617413] b53-srab-switch 18007000.ethernet-switch lan4 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[    3.629850] b53-srab-switch 18007000.ethernet-switch lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[    3.642227] b53-srab-switch 18007000.ethernet-switch lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[    3.654637] b53-srab-switch 18007000.ethernet-switch lan1 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[    3.667075] b53-srab-switch 18007000.ethernet-switch wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY] (irq=POLL)
[    3.679713] b53-srab-switch 18007000.ethernet-switch: Using legacy PHYLIB callbacks. Please migrate to PHYLINK!
[    3.690557] DSA: tree 0 setup
[    3.693811] UBI: auto-attach mtd4
[    3.697155] ubi0: attaching mtd4
[    4.330425] ubi0: scanning is finished
[    4.342749] ubi0: attached mtd4 (name "ubi", size 122 MiB)
[    4.348264] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.355184] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.361995] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.368967] ubi0: good PEBs: 976, bad PEBs: 0, corrupted PEBs: 0
[    4.374987] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    4.382229] ubi0: max/mean erase counter: 55/28, WL threshold: 4096, image sequence number: 884836398
[    4.391471] ubi0: available PEBs: 0, total reserved PEBs: 976, PEBs reserved for bad PEB handling: 20
[    4.400769] ubi0: background thread "ubi_bgt0d" started, PID 459
[    4.407603] block ubiblock0_0: created from ubi0:0(rootfs)
[    4.413138] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    4.423810] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    4.431765] Freeing unused kernel memory: 1024K
[    4.459509] Run /sbin/init as init process
[    4.463614]   with arguments:
[    4.463616]     /sbin/init
[    4.463618]   with environment:
[    4.463621]     HOME=/
[    4.463623]     TERM=linux
[    4.653130] init: Console is alive
[    4.656738] init: - watchdog -
[    4.891928] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.942508] usbcore: registered new interface driver usbfs
[    4.948086] usbcore: registered new interface driver hub
[    4.953503] usbcore: registered new device driver usb
[    4.961838] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.969215] ehci-fsl: Freescale EHCI Host controller driver
[    4.976450] ehci-platform: EHCI generic platform driver
[    4.984386] ehci-platform 18021000.usb: EHCI Host Controller
[    4.986971] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.990176] ehci-platform 18021000.usb: new USB bus registered, assigned bus number 1
[    4.990332] ehci-platform 18021000.usb: irq 45, io mem 0x18021000
[    4.997443] ohci-platform: OHCI generic platform driver
[    5.015901] ohci-platform 18022000.usb: Generic Platform OHCI controller
[    5.022657] ohci-platform 18022000.usb: new USB bus registered, assigned bus number 2
[    5.029390] ehci-platform 18021000.usb: USB 2.0 started, EHCI 1.00
[    5.030614] ohci-platform 18022000.usb: irq 45, io mem 0x18022000
[    5.037101] hub 1-0:1.0: USB hub found
[    5.046656] hub 1-0:1.0: 2 ports detected
[    5.123895] hub 2-0:1.0: USB hub found
[    5.127784] hub 2-0:1.0: 2 ports detected
[    5.159366] xhci-hcd 18023000.usb: xHCI Host Controller
[    5.164631] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 3
[    5.172273] xhci-hcd 18023000.usb: hcc params 0x02501164 hci version 0x100 quirks 0x0000020000010010
[    5.181471] xhci-hcd 18023000.usb: irq 46, io mem 0x18023000
[    5.188659] hub 3-0:1.0: USB hub found
[    5.192511] hub 3-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    5.199823] xhci-hcd 18023000.usb: xHCI Host Controller
[    5.205080] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 4
[    5.212518] xhci-hcd 18023000.usb: Host supports USB 3.0 SuperSpeed
[    5.220472] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.228982] hub 4-0:1.0: USB hub found
[    5.232840] hub 4-0:1.0: 1 port detected
[    5.239417] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.252371] init: - preinit -
[    6.410510] b53-srab-switch 18007000.ethernet-switch lan1: configuring for phy/gmii link mode
[    6.419142] bgmac_bcma bcma0:4 eth1: Link is Up - 1Gbps/Full - flow control off
[    6.426638] 8021q: adding VLAN 0 to HW filter on device lan1
[    6.433485] b53-srab-switch 18007000.ethernet-switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[    6.489436] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[    6.495900] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
[   10.646118] UBIFS (ubi0:1): Mounting in unauthenticated mode
[   10.651944] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 617
[   10.753583] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   10.761463] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   10.771412] UBIFS (ubi0:1): FS size: 115929088 bytes (110 MiB, 913 LEBs), journal size 5840896 bytes (5 MiB, 46 LEBs)
[   10.782045] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[   10.788675] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID B35EAF1C-DA4B-4E7D-8DE2-B697B376FF03, small LPT model
[   10.801214] mount_root: overlay filesystem has not been fully initialized yet
[   10.808754] mount_root: switching to ubifs overlay
[   11.059258] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.141763] b53-srab-switch 18007000.ethernet-switch lan1: Link is Down
[   11.232905] procd: - early -
[   11.235910] procd: - watchdog -
[   11.791521] procd: - watchdog -
[   11.794900] procd: - ubus -
[   11.849635] procd: - init -
[   12.173258] urngd: v1.0.2 started.
[   12.184857] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.203271] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   12.210928] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   12.232365] xt_time: kernel timezone is -0000
[   12.252278] PPP generic driver version 2.4.2
[   12.257630] NET: Registered protocol family 24
[   12.271647] usbcore: registered new interface driver brcmfmac
[   12.277576] pci_generic_config_write32: 50 callbacks suppressed
[   12.277587] pci_bus 0000:01: 1-byte config write to 0000:01:00.0 offset 0x3c may corrupt adjacent RW1C bits
[   12.293310] pci 0000:00:00.0: enabling device (0140 -> 0142)
[   12.298985] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.308670] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.318356] brcmfmac 0000:01:00.0: enabling device (0140 -> 0142)
[   12.324473] pci_bus 0000:01: 2-byte config write to 0000:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.334161] pci_bus 0000:01: 2-byte config write to 0000:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.469653] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   12.688610] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.asus,rt-ac88u.txt failed with error -2
[   12.699769] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
[   13.042111] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   13.050953] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   13.062236] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43664/4 wl0: Nov  5 2018 03:19:56 version 10.28.2 (r769115) FWID 01-d2cbb8fd
[   13.083082] pci_bus 0001:01: 1-byte config write to 0001:01:00.0 offset 0x3c may corrupt adjacent RW1C bits
[   13.092903] pci 0001:00:00.0: enabling device (0140 -> 0142)
[   13.098586] pci_bus 0001:00: 2-byte config write to 0001:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   13.108288] pci_bus 0001:00: 2-byte config write to 0001:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   13.117996] brcmfmac 0001:01:00.0: enabling device (0140 -> 0142)
[   13.124111] pci_bus 0001:01: 2-byte config write to 0001:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   13.133792] pci_bus 0001:01: 2-byte config write to 0001:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   13.259821] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   13.272335] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.asus,rt-ac88u.txt failed with error -2
[   13.283577] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
[   13.632170] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   13.640965] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   13.652329] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43664/4 wl0: Nov  5 2018 03:19:56 version 10.28.2 (r769115) FWID 01-d2cbb8fd
[   13.681607] kmodloader: done loading kernel modules from /etc/modules.d/*
[   18.123587] bgmac_bcma bcma0:4 eth1: Link is Up - 1Gbps/Full - flow control off
[   18.131265] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   18.138381] b53-srab-switch 18007000.ethernet-switch lan1: configuring for phy/gmii link mode
[   18.149120] 8021q: adding VLAN 0 to HW filter on device lan1
[   18.209756] br-lan: port 1(lan1) entered blocking state
[   18.215005] br-lan: port 1(lan1) entered disabled state
[   18.220543] device lan1 entered promiscuous mode
[   18.225178] device eth1 entered promiscuous mode
[   18.366898] b53-srab-switch 18007000.ethernet-switch lan2: configuring for phy/gmii link mode
[   18.375870] 8021q: adding VLAN 0 to HW filter on device lan2
[   18.439821] br-lan: port 2(lan2) entered blocking state
[   18.445070] br-lan: port 2(lan2) entered disabled state
[   18.450600] device lan2 entered promiscuous mode
[   18.571569] b53-srab-switch 18007000.ethernet-switch lan3: configuring for phy/gmii link mode
[   18.580426] 8021q: adding VLAN 0 to HW filter on device lan3
[   18.649687] br-lan: port 3(lan3) entered blocking state
[   18.654931] br-lan: port 3(lan3) entered disabled state
[   18.660576] device lan3 entered promiscuous mode
[   18.821525] b53-srab-switch 18007000.ethernet-switch lan4: configuring for phy/gmii link mode
[   18.830379] 8021q: adding VLAN 0 to HW filter on device lan4
[   18.899690] br-lan: port 4(lan4) entered blocking state
[   18.904936] br-lan: port 4(lan4) entered disabled state
[   18.910559] device lan4 entered promiscuous mode
[   19.051532] b53-srab-switch 18007000.ethernet-switch extsw: configuring for fixed/ link mode
[   19.060170] 8021q: adding VLAN 0 to HW filter on device extsw
[   19.066015] b53-srab-switch 18007000.ethernet-switch extsw: Link is Up - 1Gbps/Full - flow control off
[   19.129687] br-lan: port 5(extsw) entered blocking state
[   19.135018] br-lan: port 5(extsw) entered disabled state
[   19.140771] device extsw entered promiscuous mode
[   19.239466] br-lan: port 5(extsw) entered blocking state
[   19.244805] br-lan: port 5(extsw) entered forwarding state
[   19.279432] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   19.291666] b53-srab-switch 18007000.ethernet-switch wan: configuring for phy/gmii link mode
[   19.300415] 8021q: adding VLAN 0 to HW filter on device wan
[   21.310134] b53-srab-switch 18007000.ethernet-switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   21.319609] br-lan: port 1(lan1) entered blocking state
[   21.324848] br-lan: port 1(lan1) entered forwarding state

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
  2021-09-24  8:50         ` Arınç ÜNAL
@ 2021-09-24 16:32           ` Florian Fainelli
  -1 siblings, 0 replies; 20+ messages in thread
From: Florian Fainelli @ 2021-09-24 16:32 UTC (permalink / raw)
  To: Arınç ÜNAL, Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

On 9/24/21 1:50 AM, Arınç ÜNAL wrote:
> On 23/09/2021 03:22, Florian Fainelli wrote:
>>
>>
>> On 9/22/2021 3:26 PM, Arınç ÜNAL wrote:
>>> On 22/09/2021 21:15, Florian Fainelli wrote:
>>>> On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
>>>>> Hardware Info
>>>>> -------------
>>>>>
>>>>> Processor    - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
>>>>> Switch        - BCM53012 in BCM4709C0KFEBG & external RTL8365MB
>>>>
>>>> There is no Device Tree description of the RTL8365MB switch, can it be
>>>> driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
>>>> show stopper for accepting the patch, just wondering if you are somehow
>>>> trying to get that switch controlled by the rtl8366 DSA driver as well?
>>>>
>>> There's a v1 patch on net-next adding DSA support for RTL8365MB by
>>> Alvin Šipraga, CC'ing them. There's also a v2 patch coming.
>>> https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/
>>>
>>> I've been mailing Alvin to figure out how to define it on the device
>>> tree. They have provided very useful information. Quoting a few:
>>>
>>>  >> I'm trying to write the device tree to support this switch. I'm
>>> not sure
>>>  >> whether the default GPIO IDs of mdc-gpios, mdio-gpios, reset-gpios &
>>>  >> interrupts on realtek-smi.txt kernel documentation are correct.
>>>  >>
>>> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
>>>
>>>  >
>>>  > These gpios are just an example. It really depends how your board is
>>>  > wired up. You have to figure out which SoC pad is wired to the MDC,
>>>  > MDIO, and RESET pins on the RTL8365MB. Then you have to make sure the
>>>  > pinmux is set up correctly so that these pads correspond to some GPIO
>>>  > with a given ID, and then pick the right GPIO controller
>>> (&chipcommon?)
>>>  > and put the ID after that. It will not necessarily be 21, 22, 14.
>>>
>>>  > In summary:
>>>  >
>>>  > - figure out which pads are wired to MDC, MDIO, RESET
>>>  > - figure out pinmux to make them into gpios
>>>  > - figure out gpio ID and describe that in the device tree
>>>  >
>>>
>>> I have backported the v1 patch to kernel 5.10 and tried an example
>>> definition on the device tree to test it out on RT-AC88U. It's on
>>> this branch:
>>> https://github.com/arinc9/openwrt/commits/realtek-work-asus_rt-ac88u
>>
>> Your dsa,member proper looks reversed, you would want it to be:
>>
>> dsa,member = <1 0>;
> 
> Thanks!
> 
>>
>> to indicate that these are indeed disjoint DSA trees with the tree
>> being 1 and the switch being member 0 (the one and only). This part of
>> the driver/binding looks a bit weird too:
>>
>>      switch@1 {
>> +        compatible = "realtek,rtl8365mb";
>> +        /* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
>> +        mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
>> +        mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
>> +        reset-gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
>>
>> this is clearly a MDIO-attached switch, so it should be a children of
>> the GPIO controller node. There is a hardware MDIO controller on the
>> BCM5301X so you should be able to avoid using bit-banging here and
>> instead using the BCM5301X's MDIO controller proper.
> 
> I took linksys panamera device tree as an example, this device is very
> similar to Asus RT-AC88U.
> https://github.com/Broadcom/stblinux/blob/devicetree/next/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
> 
> 
> I commented out the "reg" property on switch@1 so we can see if it finds
> the switch while scanning PHY addresses on mdio 200.
> 
> I don't know if the default "interrupt-controller" and "compatible =
> "realtek,smi-mdio", "dsa-mdio";" specification is correct, so I took
> them out for now.
> 
>     mdio-mux@18003000 {
> 
>         /* BIT(9) = 1 => external mdio */
>         mdio@200 {
>             reg = <0x200>;
>             #address-cells = <1>;
>             #size-cells = <0>;
> 
>             switch@1 {
>                 compatible = "realtek,rtl8365mb";
>                 #address-cells = <1>;
>                 #size-cells = <0>;
>                 reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
>                 reset-names = "robo_reset";
> /*                reg = <0>;*/
>                 dsa,member = <1 0>;
>                 pinctrl-names = "default";
>                 pinctrl-0 = <&pinmux_mdio>;
> 
>                 ports {
>                     #address-cells = <1>;
>                     #size-cells = <0>;
> 
>                     port@0 {
>                         reg = <0>;
>                         label = "lan8";
>                     };
> 
>                     port@1 {
>                         reg = <1>;
>                         label = "lan7";
>                     };
> 
>                     port@2 {
>                         reg = <2>;
>                         label = "lan6";
>                     };
> 
>                     port@3 {
>                         reg = <3>;
>                         label = "lan5";
>                     };
> 
>                     port@4 {
>                         reg = <4>;
>                         label = "cpu";
>                         ethernet = <&sw0_p5>;
>                         phy-mode = "rgmii";
> 
>                         fixed-link {
>                             speed = <1000>;
>                             full-duplex;
>                         };
>                     };
>                 };
>             };
>         };
>     };
> 
> Here's relevant part of the bootlog. Full bootlog is in the attachments.
> 
> [    2.027843] bcm_iproc 18029200.spi: using bspi-mspi mode
> [    2.034744] libphy: Fixed MDIO Bus: probed
> [    2.039638] libphy: iProc MDIO bus: probed
> [    2.043764] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
> [    2.051215] libphy: mdio_mux: probed
> [    2.055587] libphy: mdio_mux: probed
> [    2.059196] mdio_bus 0.200: switch@1 has invalid PHY address
> [    2.064894] mdio_bus 0.200: scan phy switch at address 0
> [    2.070231] mdio_bus 0.200: scan phy switch at address 1
> [    2.075554] mdio_bus 0.200: scan phy switch at address 2
> [    2.080894] mdio_bus 0.200: scan phy switch at address 3
> [    2.086217] mdio_bus 0.200: scan phy switch at address 4
> [    2.091549] mdio_bus 0.200: scan phy switch at address 5
> [    2.096870] mdio_bus 0.200: scan phy switch at address 6
> [    2.102202] mdio_bus 0.200: scan phy switch at address 7
> [    2.107523] mdio_bus 0.200: scan phy switch at address 8
> [    2.112864] mdio_bus 0.200: scan phy switch at address 9
> [    2.118186] mdio_bus 0.200: scan phy switch at address 10
> [    2.123608] mdio_bus 0.200: scan phy switch at address 11
> [    2.129022] mdio_bus 0.200: scan phy switch at address 12
> [    2.134442] mdio_bus 0.200: scan phy switch at address 13
> [    2.139858] mdio_bus 0.200: scan phy switch at address 14
> [    2.145274] mdio_bus 0.200: scan phy switch at address 15
> [    2.150697] mdio_bus 0.200: scan phy switch at address 16
> [    2.156110] mdio_bus 0.200: scan phy switch at address 17
> [    2.161528] mdio_bus 0.200: scan phy switch at address 18
> [    2.166937] mdio_bus 0.200: scan phy switch at address 19
> [    2.172355] mdio_bus 0.200: scan phy switch at address 20
> [    2.177764] mdio_bus 0.200: scan phy switch at address 21
> [    2.183183] mdio_bus 0.200: scan phy switch at address 22
> [    2.188592] mdio_bus 0.200: scan phy switch at address 23
> [    2.194011] mdio_bus 0.200: scan phy switch at address 24
> [    2.199427] mdio_bus 0.200: scan phy switch at address 25
> [    2.204834] mdio_bus 0.200: scan phy switch at address 26
> [    2.210253] mdio_bus 0.200: scan phy switch at address 27
> [    2.215662] mdio_bus 0.200: scan phy switch at address 28
> [    2.221080] mdio_bus 0.200: scan phy switch at address 29
> [    2.226490] mdio_bus 0.200: scan phy switch at address 30
> [    2.231914] mdio_bus 0.200: scan phy switch at address 31
> [    2.237939] b53-srab-switch 18007000.ethernet-switch: found switch:
> BCM53012, rev 0
> [    2.245957] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
> 
> Looks like the switch is not on 0x200, what else can we try?

0x200 is not the address of the Realtek switch on the MDIO bus, 0x200 is
the offset with mdio mux that needs to be toggled (bit 9). You still
need to provide the Ethernet switch's address on the MDIO bus which
appears to be 0.

Auto-probing of devices only works for Ethernet PHYs, not for "pure"
MDIO devices such as Ethernet switches.
-- 
Florian

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-24 16:32           ` Florian Fainelli
  0 siblings, 0 replies; 20+ messages in thread
From: Florian Fainelli @ 2021-09-24 16:32 UTC (permalink / raw)
  To: Arınç ÜNAL, Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

On 9/24/21 1:50 AM, Arınç ÜNAL wrote:
> On 23/09/2021 03:22, Florian Fainelli wrote:
>>
>>
>> On 9/22/2021 3:26 PM, Arınç ÜNAL wrote:
>>> On 22/09/2021 21:15, Florian Fainelli wrote:
>>>> On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
>>>>> Hardware Info
>>>>> -------------
>>>>>
>>>>> Processor    - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
>>>>> Switch        - BCM53012 in BCM4709C0KFEBG & external RTL8365MB
>>>>
>>>> There is no Device Tree description of the RTL8365MB switch, can it be
>>>> driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
>>>> show stopper for accepting the patch, just wondering if you are somehow
>>>> trying to get that switch controlled by the rtl8366 DSA driver as well?
>>>>
>>> There's a v1 patch on net-next adding DSA support for RTL8365MB by
>>> Alvin Šipraga, CC'ing them. There's also a v2 patch coming.
>>> https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/
>>>
>>> I've been mailing Alvin to figure out how to define it on the device
>>> tree. They have provided very useful information. Quoting a few:
>>>
>>>  >> I'm trying to write the device tree to support this switch. I'm
>>> not sure
>>>  >> whether the default GPIO IDs of mdc-gpios, mdio-gpios, reset-gpios &
>>>  >> interrupts on realtek-smi.txt kernel documentation are correct.
>>>  >>
>>> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
>>>
>>>  >
>>>  > These gpios are just an example. It really depends how your board is
>>>  > wired up. You have to figure out which SoC pad is wired to the MDC,
>>>  > MDIO, and RESET pins on the RTL8365MB. Then you have to make sure the
>>>  > pinmux is set up correctly so that these pads correspond to some GPIO
>>>  > with a given ID, and then pick the right GPIO controller
>>> (&chipcommon?)
>>>  > and put the ID after that. It will not necessarily be 21, 22, 14.
>>>
>>>  > In summary:
>>>  >
>>>  > - figure out which pads are wired to MDC, MDIO, RESET
>>>  > - figure out pinmux to make them into gpios
>>>  > - figure out gpio ID and describe that in the device tree
>>>  >
>>>
>>> I have backported the v1 patch to kernel 5.10 and tried an example
>>> definition on the device tree to test it out on RT-AC88U. It's on
>>> this branch:
>>> https://github.com/arinc9/openwrt/commits/realtek-work-asus_rt-ac88u
>>
>> Your dsa,member proper looks reversed, you would want it to be:
>>
>> dsa,member = <1 0>;
> 
> Thanks!
> 
>>
>> to indicate that these are indeed disjoint DSA trees with the tree
>> being 1 and the switch being member 0 (the one and only). This part of
>> the driver/binding looks a bit weird too:
>>
>>      switch@1 {
>> +        compatible = "realtek,rtl8365mb";
>> +        /* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
>> +        mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
>> +        mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
>> +        reset-gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
>>
>> this is clearly a MDIO-attached switch, so it should be a children of
>> the GPIO controller node. There is a hardware MDIO controller on the
>> BCM5301X so you should be able to avoid using bit-banging here and
>> instead using the BCM5301X's MDIO controller proper.
> 
> I took linksys panamera device tree as an example, this device is very
> similar to Asus RT-AC88U.
> https://github.com/Broadcom/stblinux/blob/devicetree/next/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
> 
> 
> I commented out the "reg" property on switch@1 so we can see if it finds
> the switch while scanning PHY addresses on mdio 200.
> 
> I don't know if the default "interrupt-controller" and "compatible =
> "realtek,smi-mdio", "dsa-mdio";" specification is correct, so I took
> them out for now.
> 
>     mdio-mux@18003000 {
> 
>         /* BIT(9) = 1 => external mdio */
>         mdio@200 {
>             reg = <0x200>;
>             #address-cells = <1>;
>             #size-cells = <0>;
> 
>             switch@1 {
>                 compatible = "realtek,rtl8365mb";
>                 #address-cells = <1>;
>                 #size-cells = <0>;
>                 reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
>                 reset-names = "robo_reset";
> /*                reg = <0>;*/
>                 dsa,member = <1 0>;
>                 pinctrl-names = "default";
>                 pinctrl-0 = <&pinmux_mdio>;
> 
>                 ports {
>                     #address-cells = <1>;
>                     #size-cells = <0>;
> 
>                     port@0 {
>                         reg = <0>;
>                         label = "lan8";
>                     };
> 
>                     port@1 {
>                         reg = <1>;
>                         label = "lan7";
>                     };
> 
>                     port@2 {
>                         reg = <2>;
>                         label = "lan6";
>                     };
> 
>                     port@3 {
>                         reg = <3>;
>                         label = "lan5";
>                     };
> 
>                     port@4 {
>                         reg = <4>;
>                         label = "cpu";
>                         ethernet = <&sw0_p5>;
>                         phy-mode = "rgmii";
> 
>                         fixed-link {
>                             speed = <1000>;
>                             full-duplex;
>                         };
>                     };
>                 };
>             };
>         };
>     };
> 
> Here's relevant part of the bootlog. Full bootlog is in the attachments.
> 
> [    2.027843] bcm_iproc 18029200.spi: using bspi-mspi mode
> [    2.034744] libphy: Fixed MDIO Bus: probed
> [    2.039638] libphy: iProc MDIO bus: probed
> [    2.043764] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
> [    2.051215] libphy: mdio_mux: probed
> [    2.055587] libphy: mdio_mux: probed
> [    2.059196] mdio_bus 0.200: switch@1 has invalid PHY address
> [    2.064894] mdio_bus 0.200: scan phy switch at address 0
> [    2.070231] mdio_bus 0.200: scan phy switch at address 1
> [    2.075554] mdio_bus 0.200: scan phy switch at address 2
> [    2.080894] mdio_bus 0.200: scan phy switch at address 3
> [    2.086217] mdio_bus 0.200: scan phy switch at address 4
> [    2.091549] mdio_bus 0.200: scan phy switch at address 5
> [    2.096870] mdio_bus 0.200: scan phy switch at address 6
> [    2.102202] mdio_bus 0.200: scan phy switch at address 7
> [    2.107523] mdio_bus 0.200: scan phy switch at address 8
> [    2.112864] mdio_bus 0.200: scan phy switch at address 9
> [    2.118186] mdio_bus 0.200: scan phy switch at address 10
> [    2.123608] mdio_bus 0.200: scan phy switch at address 11
> [    2.129022] mdio_bus 0.200: scan phy switch at address 12
> [    2.134442] mdio_bus 0.200: scan phy switch at address 13
> [    2.139858] mdio_bus 0.200: scan phy switch at address 14
> [    2.145274] mdio_bus 0.200: scan phy switch at address 15
> [    2.150697] mdio_bus 0.200: scan phy switch at address 16
> [    2.156110] mdio_bus 0.200: scan phy switch at address 17
> [    2.161528] mdio_bus 0.200: scan phy switch at address 18
> [    2.166937] mdio_bus 0.200: scan phy switch at address 19
> [    2.172355] mdio_bus 0.200: scan phy switch at address 20
> [    2.177764] mdio_bus 0.200: scan phy switch at address 21
> [    2.183183] mdio_bus 0.200: scan phy switch at address 22
> [    2.188592] mdio_bus 0.200: scan phy switch at address 23
> [    2.194011] mdio_bus 0.200: scan phy switch at address 24
> [    2.199427] mdio_bus 0.200: scan phy switch at address 25
> [    2.204834] mdio_bus 0.200: scan phy switch at address 26
> [    2.210253] mdio_bus 0.200: scan phy switch at address 27
> [    2.215662] mdio_bus 0.200: scan phy switch at address 28
> [    2.221080] mdio_bus 0.200: scan phy switch at address 29
> [    2.226490] mdio_bus 0.200: scan phy switch at address 30
> [    2.231914] mdio_bus 0.200: scan phy switch at address 31
> [    2.237939] b53-srab-switch 18007000.ethernet-switch: found switch:
> BCM53012, rev 0
> [    2.245957] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
> 
> Looks like the switch is not on 0x200, what else can we try?

0x200 is not the address of the Realtek switch on the MDIO bus, 0x200 is
the offset with mdio mux that needs to be toggled (bit 9). You still
need to provide the Ethernet switch's address on the MDIO bus which
appears to be 0.

Auto-probing of devices only works for Ethernet PHYs, not for "pure"
MDIO devices such as Ethernet switches.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
  2021-09-24 16:32           ` Florian Fainelli
@ 2021-09-24 21:02             ` Arınç ÜNAL
  -1 siblings, 0 replies; 20+ messages in thread
From: Arınç ÜNAL @ 2021-09-24 21:02 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

[-- Attachment #1: Type: text/plain, Size: 10981 bytes --]

On 24/09/2021 19:32, Florian Fainelli wrote:
> On 9/24/21 1:50 AM, Arınç ÜNAL wrote:
>> On 23/09/2021 03:22, Florian Fainelli wrote:
>>>
>>>
>>> On 9/22/2021 3:26 PM, Arınç ÜNAL wrote:
>>>> On 22/09/2021 21:15, Florian Fainelli wrote:
>>>>> On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
>>>>>> Hardware Info
>>>>>> -------------
>>>>>>
>>>>>> Processor    - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
>>>>>> Switch        - BCM53012 in BCM4709C0KFEBG & external RTL8365MB
>>>>>
>>>>> There is no Device Tree description of the RTL8365MB switch, can it be
>>>>> driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
>>>>> show stopper for accepting the patch, just wondering if you are somehow
>>>>> trying to get that switch controlled by the rtl8366 DSA driver as well?
>>>>>
>>>> There's a v1 patch on net-next adding DSA support for RTL8365MB by
>>>> Alvin Šipraga, CC'ing them. There's also a v2 patch coming.
>>>> https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/
>>>>
>>>> I've been mailing Alvin to figure out how to define it on the device
>>>> tree. They have provided very useful information. Quoting a few:
>>>>
>>>>   >> I'm trying to write the device tree to support this switch. I'm
>>>> not sure
>>>>   >> whether the default GPIO IDs of mdc-gpios, mdio-gpios, reset-gpios &
>>>>   >> interrupts on realtek-smi.txt kernel documentation are correct.
>>>>   >>
>>>> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
>>>>
>>>>   >
>>>>   > These gpios are just an example. It really depends how your board is
>>>>   > wired up. You have to figure out which SoC pad is wired to the MDC,
>>>>   > MDIO, and RESET pins on the RTL8365MB. Then you have to make sure the
>>>>   > pinmux is set up correctly so that these pads correspond to some GPIO
>>>>   > with a given ID, and then pick the right GPIO controller
>>>> (&chipcommon?)
>>>>   > and put the ID after that. It will not necessarily be 21, 22, 14.
>>>>
>>>>   > In summary:
>>>>   >
>>>>   > - figure out which pads are wired to MDC, MDIO, RESET
>>>>   > - figure out pinmux to make them into gpios
>>>>   > - figure out gpio ID and describe that in the device tree
>>>>   >
>>>>
>>>> I have backported the v1 patch to kernel 5.10 and tried an example
>>>> definition on the device tree to test it out on RT-AC88U. It's on
>>>> this branch:
>>>> https://github.com/arinc9/openwrt/commits/realtek-work-asus_rt-ac88u
>>>
>>> Your dsa,member proper looks reversed, you would want it to be:
>>>
>>> dsa,member = <1 0>;
>>
>> Thanks!
>>
>>>
>>> to indicate that these are indeed disjoint DSA trees with the tree
>>> being 1 and the switch being member 0 (the one and only). This part of
>>> the driver/binding looks a bit weird too:
>>>
>>>       switch@1 {
>>> +        compatible = "realtek,rtl8365mb";
>>> +        /* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
>>> +        mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
>>> +        mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
>>> +        reset-gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
>>>
>>> this is clearly a MDIO-attached switch, so it should be a children of
>>> the GPIO controller node. There is a hardware MDIO controller on the
>>> BCM5301X so you should be able to avoid using bit-banging here and
>>> instead using the BCM5301X's MDIO controller proper.
>>
>> I took linksys panamera device tree as an example, this device is very
>> similar to Asus RT-AC88U.
>> https://github.com/Broadcom/stblinux/blob/devicetree/next/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
>>
>>
>> I commented out the "reg" property on switch@1 so we can see if it finds
>> the switch while scanning PHY addresses on mdio 200.
>>
>> I don't know if the default "interrupt-controller" and "compatible =
>> "realtek,smi-mdio", "dsa-mdio";" specification is correct, so I took
>> them out for now.
>>
>>      mdio-mux@18003000 {
>>
>>          /* BIT(9) = 1 => external mdio */
>>          mdio@200 {
>>              reg = <0x200>;
>>              #address-cells = <1>;
>>              #size-cells = <0>;
>>
>>              switch@1 {
>>                  compatible = "realtek,rtl8365mb";
>>                  #address-cells = <1>;
>>                  #size-cells = <0>;
>>                  reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
>>                  reset-names = "robo_reset";
>> /*                reg = <0>;*/
>>                  dsa,member = <1 0>;
>>                  pinctrl-names = "default";
>>                  pinctrl-0 = <&pinmux_mdio>;
>>
>>                  ports {
>>                      #address-cells = <1>;
>>                      #size-cells = <0>;
>>
>>                      port@0 {
>>                          reg = <0>;
>>                          label = "lan8";
>>                      };
>>
>>                      port@1 {
>>                          reg = <1>;
>>                          label = "lan7";
>>                      };
>>
>>                      port@2 {
>>                          reg = <2>;
>>                          label = "lan6";
>>                      };
>>
>>                      port@3 {
>>                          reg = <3>;
>>                          label = "lan5";
>>                      };
>>
>>                      port@4 {
>>                          reg = <4>;
>>                          label = "cpu";
>>                          ethernet = <&sw0_p5>;
>>                          phy-mode = "rgmii";
>>
>>                          fixed-link {
>>                              speed = <1000>;
>>                              full-duplex;
>>                          };
>>                      };
>>                  };
>>              };
>>          };
>>      };
>>
>> Here's relevant part of the bootlog. Full bootlog is in the attachments.
>>
>> [    2.027843] bcm_iproc 18029200.spi: using bspi-mspi mode
>> [    2.034744] libphy: Fixed MDIO Bus: probed
>> [    2.039638] libphy: iProc MDIO bus: probed
>> [    2.043764] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
>> [    2.051215] libphy: mdio_mux: probed
>> [    2.055587] libphy: mdio_mux: probed
>> [    2.059196] mdio_bus 0.200: switch@1 has invalid PHY address
>> [    2.064894] mdio_bus 0.200: scan phy switch at address 0
>> [    2.070231] mdio_bus 0.200: scan phy switch at address 1
>> [    2.075554] mdio_bus 0.200: scan phy switch at address 2
>> [    2.080894] mdio_bus 0.200: scan phy switch at address 3
>> [    2.086217] mdio_bus 0.200: scan phy switch at address 4
>> [    2.091549] mdio_bus 0.200: scan phy switch at address 5
>> [    2.096870] mdio_bus 0.200: scan phy switch at address 6
>> [    2.102202] mdio_bus 0.200: scan phy switch at address 7
>> [    2.107523] mdio_bus 0.200: scan phy switch at address 8
>> [    2.112864] mdio_bus 0.200: scan phy switch at address 9
>> [    2.118186] mdio_bus 0.200: scan phy switch at address 10
>> [    2.123608] mdio_bus 0.200: scan phy switch at address 11
>> [    2.129022] mdio_bus 0.200: scan phy switch at address 12
>> [    2.134442] mdio_bus 0.200: scan phy switch at address 13
>> [    2.139858] mdio_bus 0.200: scan phy switch at address 14
>> [    2.145274] mdio_bus 0.200: scan phy switch at address 15
>> [    2.150697] mdio_bus 0.200: scan phy switch at address 16
>> [    2.156110] mdio_bus 0.200: scan phy switch at address 17
>> [    2.161528] mdio_bus 0.200: scan phy switch at address 18
>> [    2.166937] mdio_bus 0.200: scan phy switch at address 19
>> [    2.172355] mdio_bus 0.200: scan phy switch at address 20
>> [    2.177764] mdio_bus 0.200: scan phy switch at address 21
>> [    2.183183] mdio_bus 0.200: scan phy switch at address 22
>> [    2.188592] mdio_bus 0.200: scan phy switch at address 23
>> [    2.194011] mdio_bus 0.200: scan phy switch at address 24
>> [    2.199427] mdio_bus 0.200: scan phy switch at address 25
>> [    2.204834] mdio_bus 0.200: scan phy switch at address 26
>> [    2.210253] mdio_bus 0.200: scan phy switch at address 27
>> [    2.215662] mdio_bus 0.200: scan phy switch at address 28
>> [    2.221080] mdio_bus 0.200: scan phy switch at address 29
>> [    2.226490] mdio_bus 0.200: scan phy switch at address 30
>> [    2.231914] mdio_bus 0.200: scan phy switch at address 31
>> [    2.237939] b53-srab-switch 18007000.ethernet-switch: found switch:
>> BCM53012, rev 0
>> [    2.245957] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
>>
>> Looks like the switch is not on 0x200, what else can we try?
> 
> 0x200 is not the address of the Realtek switch on the MDIO bus, 0x200 is
> the offset with mdio mux that needs to be toggled (bit 9). You still
> need to provide the Ethernet switch's address on the MDIO bus which
> appears to be 0.

Oh, we flip the 9th bit. 2 to the power of 9 = 0x200. Got it!

I tried 0 and 29 as the PHY ID. I'd assume the DSA realtek-smi driver 
would start probing the switch, however, nothing happens. Full log in 
attachments.

[    2.026772] bcm_iproc 18029200.spi: using bspi-mspi mode
[    2.033467] libphy: Fixed MDIO Bus: probed
[    2.038123] libphy: iProc MDIO bus: probed
[    2.042331] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
[    2.049823] libphy: mdio_mux: probed
[    2.054206] libphy: mdio_mux: probed
[    2.058713] b53-srab-switch 18007000.ethernet-switch: found switch: 
BCM53012, rev 0
[    2.066671] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded

Quoting Documentation/devicetree/bindings/net/dsa/realtek-smi.txt for 
further reference.

 > Realtek SMI-based Switches
 > ==========================
 >
 > The SMI "Simple Management Interface" is a two-wire protocol using
 > bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
 > not use the MDIO protocol. This binding defines how to specify the
 > SMI-based Realtek devices.

> 
> Auto-probing of devices only works for Ethernet PHYs, not for "pure"
> MDIO devices such as Ethernet switches.
> 

[-- Attachment #2: reg-0-29.log --]
[-- Type: text/plain, Size: 30689 bytes --]

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.64 (user@arinc9) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r17569-cf6e09471b) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Fri Sep 24 09:30:20 2021
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Asus RT-AC88U
[    0.000000] earlycon: ns16550 at MMIO 0x18000300 (options '115200n8')
[    0.000000] printk: bootconsole [ns16550] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Hit pending asynchronous external abort (FSR=0x00001c06) during first unmask, this is most likely caused by a firmware/bootloader bug.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  [mem 0x0000000008000000-0x000000009fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   node   0: [mem 0x0000000088000000-0x000000009fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000009fffffff]
[    0.000000] On node 0 totalpages: 131072
[    0.000000]   Normal zone: 288 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000]   HighMem zone: 98304 pages, LIFO batch:31
[    0.000000] percpu: Embedded 14 pages/cpu s27212 r8192 d21940 u57344
[    0.000000] pcpu-alloc: s27212 r8192 d21940 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130784
[    0.000000] Kernel command line: earlycon
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 510320K/524288K available (5635K kernel code, 565K rwdata, 1364K rodata, 1024K init, 288K bss, 13968K reserved, 0K cma-reserved, 393216K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C: DT/platform modifies aux control register: 0x0a130000 -> 0x3a530000
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x7e530001
[    0.000000] random: get_random_bytes called from start_kernel+0x360/0x50c with crng_init=0
[    0.000007] sched_clock: 64 bits at 700MHz, resolution 1ns, wraps every 4398046511103ns
[    0.016456] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0xa17102bcf3, max_idle_ns: 440795224838 ns
[    0.027595] Switching to timer-based delay loop, resolution 1ns
[    0.033746] Calibrating delay loop (skipped), value calculated using timer frequency.. 1400.00 BogoMIPS (lpj=7000000)
[    0.044488] pid_max: default: 32768 minimum: 301
[    0.049238] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.056629] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.064989] CPU: Testing write buffer coherency: ok
[    0.069930] CPU0: Spectre v2: using BPIALL workaround
[    0.075233] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.081355] Setting up static identity map for 0x100000 - 0x10003c
[    0.087725] rcu: Hierarchical SRCU implementation.
[    0.092683] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.100553] smp: Bringing up secondary CPUs ...
[    0.105685] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.105693] CPU1: Spectre v2: using BPIALL workaround
[    0.116596] smp: Brought up 1 node, 2 CPUs
[    0.120735] SMP: Total of 2 processors activated (2800.00 BogoMIPS).
[    0.127157] CPU: WARNING: CPU(s) started in wrong/inconsistent modes (primary CPU mode 0x13)
[    0.135648] CPU: This may indicate a broken bootloader or firmware.
[    0.144030] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.153993] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.160993] pinctrl core: initialized pinctrl subsystem
[    0.166704] NET: Registered protocol family 16
[    0.171707] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.179282] thermal_sys: Registered thermal governor 'step_wise'
[    0.199431] clocksource: Switched to clocksource arm_global_timer
[    0.212274] NET: Registered protocol family 2
[    0.216758] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.224345] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.232914] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.240658] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.247777] TCP: Hash tables configured (established 1024 bind 1024)
[    0.254272] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.260925] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.268087] NET: Registered protocol family 1
[    0.272518] PCI: CLS 0 bytes, default 64
[    0.278347] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.286930] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.292868] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.303238] bounce: pool size: 64 pages
[    0.308353] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.315448] printk: console [ttyS0] disabled
[    0.319861] 18000300.serial: ttyS0 at MMIO 0x18000300 (irq = 26, base_baud = 7812500) is a 16550
[    0.328731] printk: console [ttyS0] enabled
[    0.337148] printk: bootconsole [ns16550] disabled
[    0.347742] bcm2835-rng 18004000.rng: hwrng registered
[    0.353519] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0xd1
[    0.359917] nand: ESMT NAND 128MiB 3,3V 8-bit
[    0.364283] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.371881] iproc_nand 18028000.nand-controller: detected 128MiB total, 128KiB blocks, 2KiB pages, 16B OOB, 8-bit, BCH-8
[    0.382800] Scanning device for bad blocks
[    0.405551] random: fast init done
[    1.022913] random: crng init done
[    1.288838] 3 fixed-partitions partitions found on MTD device brcmnand.0
[    1.295585] Creating 3 MTD partitions on "brcmnand.0":
[    1.300750] 0x000000000000-0x000000080000 : "boot"
[    1.306131] 0x000000080000-0x000000200000 : "nvram"
[    1.311645] 0x000000200000-0x000008000000 : "firmware"
[    1.318351] 2 trx partitions found on MTD device firmware
[    1.323803] Creating 2 MTD partitions on "firmware":
[    1.328785] 0x00000000001c-0x000000400000 : "linux"
[    1.333681] mtd: partition "linux" doesn't start on an erase/write block boundary -- force read-only
[    1.343399] 0x000000400000-0x000007e00000 : "ubi"
[    1.350707] bcm_iproc 18029200.spi: using bspi-mspi mode
[    1.357530] libphy: Fixed MDIO Bus: probed
[    1.362441] libphy: iProc MDIO bus: probed
[    1.366573] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
[    1.374030] libphy: mdio_mux: probed
[    1.378469] libphy: mdio_mux: probed
[    1.383076] b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 0
[    1.391082] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
[    1.397186] bcma-host-soc 18000000.axi: bus0: Found chip with id 53030, rev 0x00 and package 0x00
[    1.406192] bcma-host-soc 18000000.axi: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x2A, class 0x0)
[    1.416774] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.416784] bcma-host-soc 18000000.axi: bus0: Core 1 found: Chipcommon B (manuf 0x4BF, id 0x50B, rev 0x05, class 0x0)
[    1.427529] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.427536] bcma-host-soc 18000000.axi: bus0: Core 2 found: DMA (manuf 0x4BF, id 0x502, rev 0x04, class 0x0)
[    1.437529] bcma-host-soc 18000000.axi: bus0: Core 3 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    1.447935] bcma-host-soc 18000000.axi: bus0: Core 4 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    1.458338] bcma-host-soc 18000000.axi: bus0: Core 5 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    1.468759] bcma-host-soc 18000000.axi: bus0: Core 6 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    1.479124] bcma-host-soc 18000000.axi: bus0: Core 7 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    1.489667] bcma-host-soc 18000000.axi: bus0: Core 8 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    1.500213] bcma-host-soc 18000000.axi: bus0: Core 9 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    1.510767] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.510775] bcma-host-soc 18000000.axi: bus0: Core 10 found: ARM Cortex A9 core (ihost) (manuf 0x4BF, id 0x510, rev 0x07, class 0x0)
[    1.522811] bcma-host-soc 18000000.axi: bus0: Core 11 found: USB 2.0 (manuf 0x4BF, id 0x504, rev 0x07, class 0x0)
[    1.533197] bcma-host-soc 18000000.axi: bus0: Core 12 found: USB 3.0 (manuf 0x4BF, id 0x505, rev 0x07, class 0x0)
[    1.543583] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.543592] bcma-host-soc 18000000.axi: bus0: Core 13 found: SDIO3 (manuf 0x4BF, id 0x503, rev 0x01, class 0x0)
[    1.553795] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.553803] bcma-host-soc 18000000.axi: bus0: Core 14 found: I2S (manuf 0x4BF, id 0x834, rev 0x03, class 0x0)
[    1.563832] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.563839] bcma-host-soc 18000000.axi: bus0: Core 15 found: ARM Cortex A9 JTAG (manuf 0x4BF, id 0x506, rev 0x01, class 0x0)
[    1.575180] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.575188] bcma-host-soc 18000000.axi: bus0: Core 16 found: Denali DDR2/DDR3 memory controller (manuf 0x4BF, id 0x507, rev 0x01, class 0x0)
[    1.587921] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.587928] bcma-host-soc 18000000.axi: bus0: Core 17 found: ROM (manuf 0x4BF, id 0x508, rev 0x08, class 0x0)
[    1.597982] bcma-host-soc 18000000.axi: bus0: Core 18 found: NAND flash controller (manuf 0x4BF, id 0x509, rev 0x01, class 0x0)
[    1.609582] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.609589] bcma-host-soc 18000000.axi: bus0: Core 19 found: SPI flash controller (manuf 0x4BF, id 0x50A, rev 0x01, class 0x0)
[    1.621051] bcma-host-soc 18000000.axi: bus0: Flash type not supported
[    1.638878] bcma-host-soc 18000000.axi: bus0: Using SPROM revision 8 provided by platform.
[    1.639137] bgmac_bcma bcma0:3: Found PHY addr: 0
[    1.643922] bgmac_bcma bcma0:3: Support for Roboswitch not implemented
[    1.650487] bgmac_bcma bcma0:3: Invalid MAC addr: 00:00:00:00:00:00
[    1.656769] bgmac_bcma bcma0:3: Using random MAC: 1a:df:b3:b4:f4:af
[    1.664195] b53-srab-switch b53-srab-switch: invalid resource
[    1.670008] b53-srab-switch: probe of b53-srab-switch failed with error -22
[    1.677637] bgmac_bcma bcma0:4: Found PHY addr: 30 (NOREGS)
[    1.683256] bgmac_bcma bcma0:4: Support for Roboswitch not implemented
[    1.691124] bgmac_bcma bcma0:5: Found PHY addr: 0
[    1.695859] bgmac_bcma bcma0:5: Support for Roboswitch not implemented
[    1.703728] bgmac_bcma bcma0:6: Unsupported core_unit 3
[    1.709038] bgmac_bcma: probe of bcma0:6 failed with error -524
[    1.715108] pcie_iproc_bcma bcma0:7: host bridge /axi@18000000/pcie@12000 ranges:
[    1.722635] pcie_iproc_bcma bcma0:7:   No bus range found for /axi@18000000/pcie@12000, using [bus 00-ff]
[    1.732248] OF: /axi@18000000/pcie@12000: Missing device_type
[    1.738010] pcie_iproc_bcma bcma0:7: non-prefetchable memory resource required
[    1.869220] pcie_iproc_bcma bcma0:7: link: UP
[    1.873712] pcie_iproc_bcma bcma0:7: PCI host bridge to bus 0000:00
[    1.880021] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.885524] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fffffff]
[    1.892450] pci 0000:00:00.0: [14e4:d612] type 01 class 0x060400
[    1.898470] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    1.908153] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    1.917837] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x1c may corrupt adjacent RW1C bits
[    1.927605] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x1c may corrupt adjacent RW1C bits
[    1.937381] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    1.947170] pci 0000:00:00.0: PME# supported from D0 D3hot D3cold
[    1.953282] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4c may corrupt adjacent RW1C bits
[    1.963943] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    1.973730] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    1.983417] pci_bus 0000:00: 1-byte config write to 0000:00:00.0 offset 0xc may corrupt adjacent RW1C bits
[    1.993104] PCI: bus0: Fast back to back transfers disabled
[    1.998686] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.006717] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    2.016616] pci 0000:01:00.0: [14e4:4365] type 00 class 0x028000
[    2.022672] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    2.029494] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x007fffff 64bit]
[    2.036302] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x000fffff 64bit pref]
[    2.043635] pci 0000:01:00.0: supports D1 D2
[    2.048803] PCI: bus1: Fast back to back transfers disabled
[    2.054414] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    2.061070] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x08bfffff]
[    2.067873] pci 0000:00:00.0: BAR 9: assigned [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.075646] pci 0000:01:00.0: BAR 2: assigned [mem 0x08000000-0x087fffff 64bit]
[    2.082989] pci 0000:01:00.0: BAR 4: assigned [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.090759] pci 0000:01:00.0: BAR 0: assigned [mem 0x08800000-0x08807fff 64bit]
[    2.098092] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.103070] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x08bfffff]
[    2.109877] pci 0000:00:00.0:   bridge window [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.117838] pcie_iproc_bcma bcma0:8: host bridge /axi@18000000/pcie@13000 ranges:
[    2.125370] pcie_iproc_bcma bcma0:8:   No bus range found for /axi@18000000/pcie@13000, using [bus 00-ff]
[    2.134978] pcie_iproc_bcma bcma0:8: non-prefetchable memory resource required
[    2.269216] pcie_iproc_bcma bcma0:8: link: UP
[    2.273690] pcie_iproc_bcma bcma0:8: PCI host bridge to bus 0001:00
[    2.279994] pci_bus 0001:00: root bus resource [bus 00-ff]
[    2.285491] pci_bus 0001:00: root bus resource [mem 0x20000000-0x27ffffff]
[    2.292413] pci 0001:00:00.0: [14e4:d612] type 01 class 0x060400
[    2.298475] pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
[    2.305469] PCI: bus0: Fast back to back transfers disabled
[    2.311079] pci 0001:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.319240] pci 0001:01:00.0: [14e4:4365] type 00 class 0x028000
[    2.325291] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    2.332116] pci 0001:01:00.0: reg 0x18: [mem 0x00000000-0x007fffff 64bit]
[    2.338932] pci 0001:01:00.0: reg 0x20: [mem 0x00000000-0x000fffff 64bit pref]
[    2.346260] pci 0001:01:00.0: supports D1 D2
[    2.351409] PCI: bus1: Fast back to back transfers disabled
[    2.357010] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
[    2.363668] pci 0001:00:00.0: BAR 8: assigned [mem 0x20000000-0x20bfffff]
[    2.370485] pci 0001:00:00.0: BAR 9: assigned [mem 0x20c00000-0x20cfffff 64bit pref]
[    2.378253] pci 0001:01:00.0: BAR 2: assigned [mem 0x20000000-0x207fffff 64bit]
[    2.385592] pci 0001:01:00.0: BAR 4: assigned [mem 0x20c00000-0x20cfffff 64bit pref]
[    2.393368] pci 0001:01:00.0: BAR 0: assigned [mem 0x20800000-0x20807fff 64bit]
[    2.400710] pci 0001:00:00.0: PCI bridge to [bus 01]
[    2.405685] pci 0001:00:00.0:   bridge window [mem 0x20000000-0x20bfffff]
[    2.412495] pci 0001:00:00.0:   bridge window [mem 0x20c00000-0x20cfffff 64bit pref]
[    2.420445] pcie_iproc_bcma bcma0:9: host bridge /axi@18000000/pcie@14000 ranges:
[    2.427958] pcie_iproc_bcma bcma0:9:   No bus range found for /axi@18000000/pcie@14000, using [bus 00-ff]
[    2.437570] pcie_iproc_bcma bcma0:9: non-prefetchable memory resource required
[    2.569217] pcie_iproc_bcma bcma0:9: PHY or data link is INACTIVE!
[    2.575410] pcie_iproc_bcma bcma0:9: no PCIe EP device detected
[    2.582192] bcm47xx-wdt bcm47xx-wdt.0: BCM47xx Watchdog Timer enabled (30 seconds, Software Timer)
[    2.591248] bcma-host-soc 18000000.axi: bus0: Bus registered
[    2.597734] NET: Registered protocol family 10
[    2.603100] Segment Routing with IPv6
[    2.606826] NET: Registered protocol family 17
[    2.611532] 8021q: 802.1Q VLAN Support v1.8
[    2.615769] Registering SWP/SWPB emulation handler
[    2.623307] b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 0
[    2.772715] libphy: dsa slave smi: probed
[    2.777332] b53-srab-switch 18007000.ethernet-switch lan4 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[    2.789742] b53-srab-switch 18007000.ethernet-switch lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[    2.802129] b53-srab-switch 18007000.ethernet-switch lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[    2.814505] b53-srab-switch 18007000.ethernet-switch lan1 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[    2.826929] b53-srab-switch 18007000.ethernet-switch wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY] (irq=POLL)
[    2.839568] b53-srab-switch 18007000.ethernet-switch: Using legacy PHYLIB callbacks. Please migrate to PHYLINK!
[    2.850416] DSA: tree 0 setup
[    2.853662] UBI: auto-attach mtd4
[    2.857001] ubi0: attaching mtd4
[    3.490854] ubi0: scanning is finished
[    3.503206] ubi0: attached mtd4 (name "ubi", size 122 MiB)
[    3.508726] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.515635] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.522447] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.529425] ubi0: good PEBs: 976, bad PEBs: 0, corrupted PEBs: 0
[    3.535444] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    3.542682] ubi0: max/mean erase counter: 61/31, WL threshold: 4096, image sequence number: 2094677800
[    3.552012] ubi0: available PEBs: 0, total reserved PEBs: 976, PEBs reserved for bad PEB handling: 20
[    3.561296] ubi0: background thread "ubi_bgt0d" started, PID 463
[    3.568138] block ubiblock0_0: created from ubi0:0(rootfs)
[    3.573681] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    3.584067] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    3.592024] Freeing unused kernel memory: 1024K
[    3.619363] Run /sbin/init as init process
[    3.623467]   with arguments:
[    3.623469]     /sbin/init
[    3.623472]   with environment:
[    3.623474]     HOME=/
[    3.623476]     TERM=linux
[    3.826216] init: Console is alive
[    3.829878] init: - watchdog -
[    4.067812] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.133575] usbcore: registered new interface driver usbfs
[    4.139159] usbcore: registered new interface driver hub
[    4.144576] usbcore: registered new device driver usb
[    4.152849] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.160270] ehci-fsl: Freescale EHCI Host controller driver
[    4.166755] ehci-platform: EHCI generic platform driver
[    4.175470] ehci-platform 18021000.usb: EHCI Host Controller
[    4.178130] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.181262] ehci-platform 18021000.usb: new USB bus registered, assigned bus number 1
[    4.188530] ohci-platform: OHCI generic platform driver
[    4.195537] ehci-platform 18021000.usb: irq 45, io mem 0x18021000
[    4.200937] ohci-platform 18022000.usb: Generic Platform OHCI controller
[    4.213645] ohci-platform 18022000.usb: new USB bus registered, assigned bus number 2
[    4.221604] ohci-platform 18022000.usb: irq 45, io mem 0x18022000
[    4.229260] ehci-platform 18021000.usb: USB 2.0 started, EHCI 1.00
[    4.235934] hub 1-0:1.0: USB hub found
[    4.239846] hub 1-0:1.0: 2 ports detected
[    4.303745] hub 2-0:1.0: USB hub found
[    4.307557] hub 2-0:1.0: 2 ports detected
[    4.339153] xhci-hcd 18023000.usb: xHCI Host Controller
[    4.344442] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 3
[    4.352089] xhci-hcd 18023000.usb: hcc params 0x02501164 hci version 0x100 quirks 0x0000020000010010
[    4.361295] xhci-hcd 18023000.usb: irq 46, io mem 0x18023000
[    4.368476] hub 3-0:1.0: USB hub found
[    4.372304] hub 3-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    4.379614] xhci-hcd 18023000.usb: xHCI Host Controller
[    4.384874] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 4
[    4.392310] xhci-hcd 18023000.usb: Host supports USB 3.0 SuperSpeed
[    4.400275] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.408780] hub 4-0:1.0: USB hub found
[    4.412646] hub 4-0:1.0: 1 port detected
[    4.419064] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.427177] init: - preinit -
[    5.516563] b53-srab-switch 18007000.ethernet-switch lan1: configuring for phy/gmii link mode
[    5.525205] bgmac_bcma bcma0:4 eth1: Link is Up - 1Gbps/Full - flow control off
[    5.532722] 8021q: adding VLAN 0 to HW filter on device lan1
[    5.539586] b53-srab-switch 18007000.ethernet-switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[    5.589314] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[    5.595824] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
[    9.750306] UBIFS (ubi0:1): Mounting in unauthenticated mode
[    9.756095] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 619
[    9.857494] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[    9.865380] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    9.875327] UBIFS (ubi0:1): FS size: 115548160 bytes (110 MiB, 910 LEBs), journal size 5840896 bytes (5 MiB, 46 LEBs)
[    9.885968] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[    9.892602] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID 16C01DB0-2B7D-4146-A16B-F8BF7F65B1B6, small LPT model
[    9.905133] mount_root: overlay filesystem has not been fully initialized yet
[    9.912768] mount_root: switching to ubifs overlay
[   10.175536] urandom-seed: Seed file not found (/etc/urandom.seed)
[   10.261215] b53-srab-switch 18007000.ethernet-switch lan1: Link is Down
[   10.352800] procd: - early -
[   10.355803] procd: - watchdog -
[   10.881893] procd: - watchdog -
[   10.885281] procd: - ubus -
[   10.941129] procd: - init -
[   11.335891] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.337747] urngd: v1.0.2 started.
[   11.406832] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   11.414483] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   11.437493] xt_time: kernel timezone is -0000
[   11.458688] PPP generic driver version 2.4.2
[   11.464469] NET: Registered protocol family 24
[   11.479257] usbcore: registered new interface driver brcmfmac
[   11.485190] pci_generic_config_write32: 50 callbacks suppressed
[   11.485201] pci_bus 0000:01: 1-byte config write to 0000:01:00.0 offset 0x3c may corrupt adjacent RW1C bits
[   11.500958] pci 0000:00:00.0: enabling device (0140 -> 0142)
[   11.506632] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   11.516322] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   11.526004] brcmfmac 0000:01:00.0: enabling device (0140 -> 0142)
[   11.532119] pci_bus 0000:01: 2-byte config write to 0000:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   11.541807] pci_bus 0000:01: 2-byte config write to 0000:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   11.679510] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   11.898965] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.asus,rt-ac88u.txt failed with error -2
[   11.910127] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
[   12.251982] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   12.260815] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   12.272076] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43664/4 wl0: Nov  5 2018 03:19:56 version 10.28.2 (r769115) FWID 01-d2cbb8fd
[   12.292796] pci_bus 0001:01: 1-byte config write to 0001:01:00.0 offset 0x3c may corrupt adjacent RW1C bits
[   12.302640] pci 0001:00:00.0: enabling device (0140 -> 0142)
[   12.308328] pci_bus 0001:00: 2-byte config write to 0001:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.318112] pci_bus 0001:00: 2-byte config write to 0001:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.327836] brcmfmac 0001:01:00.0: enabling device (0140 -> 0142)
[   12.333958] pci_bus 0001:01: 2-byte config write to 0001:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.343657] pci_bus 0001:01: 2-byte config write to 0001:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.479634] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   12.493169] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.asus,rt-ac88u.txt failed with error -2
[   12.504372] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
[   12.822034] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   12.830840] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   12.842119] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43664/4 wl0: Nov  5 2018 03:19:56 version 10.28.2 (r769115) FWID 01-d2cbb8fd
[   12.873288] kmodloader: done loading kernel modules from /etc/modules.d/*
[   17.687713] bgmac_bcma bcma0:4 eth1: Link is Up - 1Gbps/Full - flow control off
[   17.697303] b53-srab-switch 18007000.ethernet-switch lan1: configuring for phy/gmii link mode
[   17.708769] 8021q: adding VLAN 0 to HW filter on device lan1
[   17.769641] br-lan: port 1(lan1) entered blocking state
[   17.774886] br-lan: port 1(lan1) entered disabled state
[   17.780478] device lan1 entered promiscuous mode
[   17.785129] device eth1 entered promiscuous mode
[   17.881151] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   17.917174] b53-srab-switch 18007000.ethernet-switch lan2: configuring for phy/gmii link mode
[   17.933108] 8021q: adding VLAN 0 to HW filter on device lan2
[   17.989770] br-lan: port 2(lan2) entered blocking state
[   17.995074] br-lan: port 2(lan2) entered disabled state
[   18.000711] device lan2 entered promiscuous mode
[   18.091871] b53-srab-switch 18007000.ethernet-switch lan3: configuring for phy/gmii link mode
[   18.101253] 8021q: adding VLAN 0 to HW filter on device lan3
[   18.189383] br-lan: port 3(lan3) entered blocking state
[   18.194627] br-lan: port 3(lan3) entered disabled state
[   18.200185] device lan3 entered promiscuous mode
[   18.291748] b53-srab-switch 18007000.ethernet-switch lan4: configuring for phy/gmii link mode
[   18.300590] 8021q: adding VLAN 0 to HW filter on device lan4
[   18.389301] br-lan: port 4(lan4) entered blocking state
[   18.394588] br-lan: port 4(lan4) entered disabled state
[   18.400311] device lan4 entered promiscuous mode
[   18.491825] b53-srab-switch 18007000.ethernet-switch extsw: configuring for fixed/ link mode
[   18.500458] 8021q: adding VLAN 0 to HW filter on device extsw
[   18.506377] b53-srab-switch 18007000.ethernet-switch extsw: Link is Up - 1Gbps/Full - flow control off
[   18.599451] br-lan: port 5(extsw) entered blocking state
[   18.604786] br-lan: port 5(extsw) entered disabled state
[   18.610539] device extsw entered promiscuous mode
[   18.699247] br-lan: port 5(extsw) entered blocking state
[   18.704579] br-lan: port 5(extsw) entered forwarding state
[   18.710198] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   18.745073] b53-srab-switch 18007000.ethernet-switch wan: configuring for phy/gmii link mode
[   18.753845] 8021q: adding VLAN 0 to HW filter on device wan
[   20.841340] b53-srab-switch 18007000.ethernet-switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   20.850813] br-lan: port 1(lan1) entered blocking state
[   20.856050] br-lan: port 1(lan1) entered forwarding state

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-24 21:02             ` Arınç ÜNAL
  0 siblings, 0 replies; 20+ messages in thread
From: Arınç ÜNAL @ 2021-09-24 21:02 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

[-- Attachment #1: Type: text/plain, Size: 10981 bytes --]

On 24/09/2021 19:32, Florian Fainelli wrote:
> On 9/24/21 1:50 AM, Arınç ÜNAL wrote:
>> On 23/09/2021 03:22, Florian Fainelli wrote:
>>>
>>>
>>> On 9/22/2021 3:26 PM, Arınç ÜNAL wrote:
>>>> On 22/09/2021 21:15, Florian Fainelli wrote:
>>>>> On 9/21/21 5:19 AM, Arınç ÜNAL wrote:
>>>>>> Hardware Info
>>>>>> -------------
>>>>>>
>>>>>> Processor    - Broadcom BCM4709C0KFEBG dual-core @ 1.4 GHz
>>>>>> Switch        - BCM53012 in BCM4709C0KFEBG & external RTL8365MB
>>>>>
>>>>> There is no Device Tree description of the RTL8365MB switch, can it be
>>>>> driven/controlled via MDIO, SPI or GPIOs by any chance? This is not a
>>>>> show stopper for accepting the patch, just wondering if you are somehow
>>>>> trying to get that switch controlled by the rtl8366 DSA driver as well?
>>>>>
>>>> There's a v1 patch on net-next adding DSA support for RTL8365MB by
>>>> Alvin Šipraga, CC'ing them. There's also a v2 patch coming.
>>>> https://lore.kernel.org/netdev/20210822193145.1312668-1-alvin@pqrs.dk/
>>>>
>>>> I've been mailing Alvin to figure out how to define it on the device
>>>> tree. They have provided very useful information. Quoting a few:
>>>>
>>>>   >> I'm trying to write the device tree to support this switch. I'm
>>>> not sure
>>>>   >> whether the default GPIO IDs of mdc-gpios, mdio-gpios, reset-gpios &
>>>>   >> interrupts on realtek-smi.txt kernel documentation are correct.
>>>>   >>
>>>> https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
>>>>
>>>>   >
>>>>   > These gpios are just an example. It really depends how your board is
>>>>   > wired up. You have to figure out which SoC pad is wired to the MDC,
>>>>   > MDIO, and RESET pins on the RTL8365MB. Then you have to make sure the
>>>>   > pinmux is set up correctly so that these pads correspond to some GPIO
>>>>   > with a given ID, and then pick the right GPIO controller
>>>> (&chipcommon?)
>>>>   > and put the ID after that. It will not necessarily be 21, 22, 14.
>>>>
>>>>   > In summary:
>>>>   >
>>>>   > - figure out which pads are wired to MDC, MDIO, RESET
>>>>   > - figure out pinmux to make them into gpios
>>>>   > - figure out gpio ID and describe that in the device tree
>>>>   >
>>>>
>>>> I have backported the v1 patch to kernel 5.10 and tried an example
>>>> definition on the device tree to test it out on RT-AC88U. It's on
>>>> this branch:
>>>> https://github.com/arinc9/openwrt/commits/realtek-work-asus_rt-ac88u
>>>
>>> Your dsa,member proper looks reversed, you would want it to be:
>>>
>>> dsa,member = <1 0>;
>>
>> Thanks!
>>
>>>
>>> to indicate that these are indeed disjoint DSA trees with the tree
>>> being 1 and the switch being member 0 (the one and only). This part of
>>> the driver/binding looks a bit weird too:
>>>
>>>       switch@1 {
>>> +        compatible = "realtek,rtl8365mb";
>>> +        /* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
>>> +        mdc-gpios = <&chipcommon 6 GPIO_ACTIVE_HIGH>;
>>> +        mdio-gpios = <&chipcommon 7 GPIO_ACTIVE_HIGH>;
>>> +        reset-gpios = <&chipcommon 14 GPIO_ACTIVE_LOW>;
>>>
>>> this is clearly a MDIO-attached switch, so it should be a children of
>>> the GPIO controller node. There is a hardware MDIO controller on the
>>> BCM5301X so you should be able to avoid using bit-banging here and
>>> instead using the BCM5301X's MDIO controller proper.
>>
>> I took linksys panamera device tree as an example, this device is very
>> similar to Asus RT-AC88U.
>> https://github.com/Broadcom/stblinux/blob/devicetree/next/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
>>
>>
>> I commented out the "reg" property on switch@1 so we can see if it finds
>> the switch while scanning PHY addresses on mdio 200.
>>
>> I don't know if the default "interrupt-controller" and "compatible =
>> "realtek,smi-mdio", "dsa-mdio";" specification is correct, so I took
>> them out for now.
>>
>>      mdio-mux@18003000 {
>>
>>          /* BIT(9) = 1 => external mdio */
>>          mdio@200 {
>>              reg = <0x200>;
>>              #address-cells = <1>;
>>              #size-cells = <0>;
>>
>>              switch@1 {
>>                  compatible = "realtek,rtl8365mb";
>>                  #address-cells = <1>;
>>                  #size-cells = <0>;
>>                  reset-gpios = <&chipcommon 10 GPIO_ACTIVE_LOW>;
>>                  reset-names = "robo_reset";
>> /*                reg = <0>;*/
>>                  dsa,member = <1 0>;
>>                  pinctrl-names = "default";
>>                  pinctrl-0 = <&pinmux_mdio>;
>>
>>                  ports {
>>                      #address-cells = <1>;
>>                      #size-cells = <0>;
>>
>>                      port@0 {
>>                          reg = <0>;
>>                          label = "lan8";
>>                      };
>>
>>                      port@1 {
>>                          reg = <1>;
>>                          label = "lan7";
>>                      };
>>
>>                      port@2 {
>>                          reg = <2>;
>>                          label = "lan6";
>>                      };
>>
>>                      port@3 {
>>                          reg = <3>;
>>                          label = "lan5";
>>                      };
>>
>>                      port@4 {
>>                          reg = <4>;
>>                          label = "cpu";
>>                          ethernet = <&sw0_p5>;
>>                          phy-mode = "rgmii";
>>
>>                          fixed-link {
>>                              speed = <1000>;
>>                              full-duplex;
>>                          };
>>                      };
>>                  };
>>              };
>>          };
>>      };
>>
>> Here's relevant part of the bootlog. Full bootlog is in the attachments.
>>
>> [    2.027843] bcm_iproc 18029200.spi: using bspi-mspi mode
>> [    2.034744] libphy: Fixed MDIO Bus: probed
>> [    2.039638] libphy: iProc MDIO bus: probed
>> [    2.043764] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
>> [    2.051215] libphy: mdio_mux: probed
>> [    2.055587] libphy: mdio_mux: probed
>> [    2.059196] mdio_bus 0.200: switch@1 has invalid PHY address
>> [    2.064894] mdio_bus 0.200: scan phy switch at address 0
>> [    2.070231] mdio_bus 0.200: scan phy switch at address 1
>> [    2.075554] mdio_bus 0.200: scan phy switch at address 2
>> [    2.080894] mdio_bus 0.200: scan phy switch at address 3
>> [    2.086217] mdio_bus 0.200: scan phy switch at address 4
>> [    2.091549] mdio_bus 0.200: scan phy switch at address 5
>> [    2.096870] mdio_bus 0.200: scan phy switch at address 6
>> [    2.102202] mdio_bus 0.200: scan phy switch at address 7
>> [    2.107523] mdio_bus 0.200: scan phy switch at address 8
>> [    2.112864] mdio_bus 0.200: scan phy switch at address 9
>> [    2.118186] mdio_bus 0.200: scan phy switch at address 10
>> [    2.123608] mdio_bus 0.200: scan phy switch at address 11
>> [    2.129022] mdio_bus 0.200: scan phy switch at address 12
>> [    2.134442] mdio_bus 0.200: scan phy switch at address 13
>> [    2.139858] mdio_bus 0.200: scan phy switch at address 14
>> [    2.145274] mdio_bus 0.200: scan phy switch at address 15
>> [    2.150697] mdio_bus 0.200: scan phy switch at address 16
>> [    2.156110] mdio_bus 0.200: scan phy switch at address 17
>> [    2.161528] mdio_bus 0.200: scan phy switch at address 18
>> [    2.166937] mdio_bus 0.200: scan phy switch at address 19
>> [    2.172355] mdio_bus 0.200: scan phy switch at address 20
>> [    2.177764] mdio_bus 0.200: scan phy switch at address 21
>> [    2.183183] mdio_bus 0.200: scan phy switch at address 22
>> [    2.188592] mdio_bus 0.200: scan phy switch at address 23
>> [    2.194011] mdio_bus 0.200: scan phy switch at address 24
>> [    2.199427] mdio_bus 0.200: scan phy switch at address 25
>> [    2.204834] mdio_bus 0.200: scan phy switch at address 26
>> [    2.210253] mdio_bus 0.200: scan phy switch at address 27
>> [    2.215662] mdio_bus 0.200: scan phy switch at address 28
>> [    2.221080] mdio_bus 0.200: scan phy switch at address 29
>> [    2.226490] mdio_bus 0.200: scan phy switch at address 30
>> [    2.231914] mdio_bus 0.200: scan phy switch at address 31
>> [    2.237939] b53-srab-switch 18007000.ethernet-switch: found switch:
>> BCM53012, rev 0
>> [    2.245957] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
>>
>> Looks like the switch is not on 0x200, what else can we try?
> 
> 0x200 is not the address of the Realtek switch on the MDIO bus, 0x200 is
> the offset with mdio mux that needs to be toggled (bit 9). You still
> need to provide the Ethernet switch's address on the MDIO bus which
> appears to be 0.

Oh, we flip the 9th bit. 2 to the power of 9 = 0x200. Got it!

I tried 0 and 29 as the PHY ID. I'd assume the DSA realtek-smi driver 
would start probing the switch, however, nothing happens. Full log in 
attachments.

[    2.026772] bcm_iproc 18029200.spi: using bspi-mspi mode
[    2.033467] libphy: Fixed MDIO Bus: probed
[    2.038123] libphy: iProc MDIO bus: probed
[    2.042331] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
[    2.049823] libphy: mdio_mux: probed
[    2.054206] libphy: mdio_mux: probed
[    2.058713] b53-srab-switch 18007000.ethernet-switch: found switch: 
BCM53012, rev 0
[    2.066671] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded

Quoting Documentation/devicetree/bindings/net/dsa/realtek-smi.txt for 
further reference.

 > Realtek SMI-based Switches
 > ==========================
 >
 > The SMI "Simple Management Interface" is a two-wire protocol using
 > bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
 > not use the MDIO protocol. This binding defines how to specify the
 > SMI-based Realtek devices.

> 
> Auto-probing of devices only works for Ethernet PHYs, not for "pure"
> MDIO devices such as Ethernet switches.
> 

[-- Attachment #2: reg-0-29.log --]
[-- Type: text/plain, Size: 30689 bytes --]

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.64 (user@arinc9) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 11.2.0 r17569-cf6e09471b) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Fri Sep 24 09:30:20 2021
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Asus RT-AC88U
[    0.000000] earlycon: ns16550 at MMIO 0x18000300 (options '115200n8')
[    0.000000] printk: bootconsole [ns16550] enabled
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] Hit pending asynchronous external abort (FSR=0x00001c06) during first unmask, this is most likely caused by a firmware/bootloader bug.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  [mem 0x0000000008000000-0x000000009fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   node   0: [mem 0x0000000088000000-0x000000009fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000009fffffff]
[    0.000000] On node 0 totalpages: 131072
[    0.000000]   Normal zone: 288 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000]   HighMem zone: 98304 pages, LIFO batch:31
[    0.000000] percpu: Embedded 14 pages/cpu s27212 r8192 d21940 u57344
[    0.000000] pcpu-alloc: s27212 r8192 d21940 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130784
[    0.000000] Kernel command line: earlycon
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 510320K/524288K available (5635K kernel code, 565K rwdata, 1364K rodata, 1024K init, 288K bss, 13968K reserved, 0K cma-reserved, 393216K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C: DT/platform modifies aux control register: 0x0a130000 -> 0x3a530000
[    0.000000] L2C-310 enabling early BRESP for Cortex-A9
[    0.000000] L2C-310 full line of zeros enabled for Cortex-A9
[    0.000000] L2C-310 ID prefetch enabled, offset 1 lines
[    0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled
[    0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[    0.000000] L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x7e530001
[    0.000000] random: get_random_bytes called from start_kernel+0x360/0x50c with crng_init=0
[    0.000007] sched_clock: 64 bits at 700MHz, resolution 1ns, wraps every 4398046511103ns
[    0.016456] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0xa17102bcf3, max_idle_ns: 440795224838 ns
[    0.027595] Switching to timer-based delay loop, resolution 1ns
[    0.033746] Calibrating delay loop (skipped), value calculated using timer frequency.. 1400.00 BogoMIPS (lpj=7000000)
[    0.044488] pid_max: default: 32768 minimum: 301
[    0.049238] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.056629] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.064989] CPU: Testing write buffer coherency: ok
[    0.069930] CPU0: Spectre v2: using BPIALL workaround
[    0.075233] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.081355] Setting up static identity map for 0x100000 - 0x10003c
[    0.087725] rcu: Hierarchical SRCU implementation.
[    0.092683] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.100553] smp: Bringing up secondary CPUs ...
[    0.105685] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.105693] CPU1: Spectre v2: using BPIALL workaround
[    0.116596] smp: Brought up 1 node, 2 CPUs
[    0.120735] SMP: Total of 2 processors activated (2800.00 BogoMIPS).
[    0.127157] CPU: WARNING: CPU(s) started in wrong/inconsistent modes (primary CPU mode 0x13)
[    0.135648] CPU: This may indicate a broken bootloader or firmware.
[    0.144030] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.153993] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.160993] pinctrl core: initialized pinctrl subsystem
[    0.166704] NET: Registered protocol family 16
[    0.171707] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.179282] thermal_sys: Registered thermal governor 'step_wise'
[    0.199431] clocksource: Switched to clocksource arm_global_timer
[    0.212274] NET: Registered protocol family 2
[    0.216758] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.224345] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.232914] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.240658] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.247777] TCP: Hash tables configured (established 1024 bind 1024)
[    0.254272] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.260925] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.268087] NET: Registered protocol family 1
[    0.272518] PCI: CLS 0 bytes, default 64
[    0.278347] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.286930] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.292868] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.303238] bounce: pool size: 64 pages
[    0.308353] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.315448] printk: console [ttyS0] disabled
[    0.319861] 18000300.serial: ttyS0 at MMIO 0x18000300 (irq = 26, base_baud = 7812500) is a 16550
[    0.328731] printk: console [ttyS0] enabled
[    0.337148] printk: bootconsole [ns16550] disabled
[    0.347742] bcm2835-rng 18004000.rng: hwrng registered
[    0.353519] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0xd1
[    0.359917] nand: ESMT NAND 128MiB 3,3V 8-bit
[    0.364283] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.371881] iproc_nand 18028000.nand-controller: detected 128MiB total, 128KiB blocks, 2KiB pages, 16B OOB, 8-bit, BCH-8
[    0.382800] Scanning device for bad blocks
[    0.405551] random: fast init done
[    1.022913] random: crng init done
[    1.288838] 3 fixed-partitions partitions found on MTD device brcmnand.0
[    1.295585] Creating 3 MTD partitions on "brcmnand.0":
[    1.300750] 0x000000000000-0x000000080000 : "boot"
[    1.306131] 0x000000080000-0x000000200000 : "nvram"
[    1.311645] 0x000000200000-0x000008000000 : "firmware"
[    1.318351] 2 trx partitions found on MTD device firmware
[    1.323803] Creating 2 MTD partitions on "firmware":
[    1.328785] 0x00000000001c-0x000000400000 : "linux"
[    1.333681] mtd: partition "linux" doesn't start on an erase/write block boundary -- force read-only
[    1.343399] 0x000000400000-0x000007e00000 : "ubi"
[    1.350707] bcm_iproc 18029200.spi: using bspi-mspi mode
[    1.357530] libphy: Fixed MDIO Bus: probed
[    1.362441] libphy: iProc MDIO bus: probed
[    1.366573] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
[    1.374030] libphy: mdio_mux: probed
[    1.378469] libphy: mdio_mux: probed
[    1.383076] b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 0
[    1.391082] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
[    1.397186] bcma-host-soc 18000000.axi: bus0: Found chip with id 53030, rev 0x00 and package 0x00
[    1.406192] bcma-host-soc 18000000.axi: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x2A, class 0x0)
[    1.416774] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.416784] bcma-host-soc 18000000.axi: bus0: Core 1 found: Chipcommon B (manuf 0x4BF, id 0x50B, rev 0x05, class 0x0)
[    1.427529] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.427536] bcma-host-soc 18000000.axi: bus0: Core 2 found: DMA (manuf 0x4BF, id 0x502, rev 0x04, class 0x0)
[    1.437529] bcma-host-soc 18000000.axi: bus0: Core 3 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    1.447935] bcma-host-soc 18000000.axi: bus0: Core 4 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    1.458338] bcma-host-soc 18000000.axi: bus0: Core 5 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    1.468759] bcma-host-soc 18000000.axi: bus0: Core 6 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x07, class 0x0)
[    1.479124] bcma-host-soc 18000000.axi: bus0: Core 7 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    1.489667] bcma-host-soc 18000000.axi: bus0: Core 8 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    1.500213] bcma-host-soc 18000000.axi: bus0: Core 9 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x07, class 0x0)
[    1.510767] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.510775] bcma-host-soc 18000000.axi: bus0: Core 10 found: ARM Cortex A9 core (ihost) (manuf 0x4BF, id 0x510, rev 0x07, class 0x0)
[    1.522811] bcma-host-soc 18000000.axi: bus0: Core 11 found: USB 2.0 (manuf 0x4BF, id 0x504, rev 0x07, class 0x0)
[    1.533197] bcma-host-soc 18000000.axi: bus0: Core 12 found: USB 3.0 (manuf 0x4BF, id 0x505, rev 0x07, class 0x0)
[    1.543583] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.543592] bcma-host-soc 18000000.axi: bus0: Core 13 found: SDIO3 (manuf 0x4BF, id 0x503, rev 0x01, class 0x0)
[    1.553795] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.553803] bcma-host-soc 18000000.axi: bus0: Core 14 found: I2S (manuf 0x4BF, id 0x834, rev 0x03, class 0x0)
[    1.563832] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.563839] bcma-host-soc 18000000.axi: bus0: Core 15 found: ARM Cortex A9 JTAG (manuf 0x4BF, id 0x506, rev 0x01, class 0x0)
[    1.575180] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.575188] bcma-host-soc 18000000.axi: bus0: Core 16 found: Denali DDR2/DDR3 memory controller (manuf 0x4BF, id 0x507, rev 0x01, class 0x0)
[    1.587921] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.587928] bcma-host-soc 18000000.axi: bus0: Core 17 found: ROM (manuf 0x4BF, id 0x508, rev 0x08, class 0x0)
[    1.597982] bcma-host-soc 18000000.axi: bus0: Core 18 found: NAND flash controller (manuf 0x4BF, id 0x509, rev 0x01, class 0x0)
[    1.609582] bcma-host-soc 18000000.axi: bus0: bcma_of_get_irq() failed with rc=-22
[    1.609589] bcma-host-soc 18000000.axi: bus0: Core 19 found: SPI flash controller (manuf 0x4BF, id 0x50A, rev 0x01, class 0x0)
[    1.621051] bcma-host-soc 18000000.axi: bus0: Flash type not supported
[    1.638878] bcma-host-soc 18000000.axi: bus0: Using SPROM revision 8 provided by platform.
[    1.639137] bgmac_bcma bcma0:3: Found PHY addr: 0
[    1.643922] bgmac_bcma bcma0:3: Support for Roboswitch not implemented
[    1.650487] bgmac_bcma bcma0:3: Invalid MAC addr: 00:00:00:00:00:00
[    1.656769] bgmac_bcma bcma0:3: Using random MAC: 1a:df:b3:b4:f4:af
[    1.664195] b53-srab-switch b53-srab-switch: invalid resource
[    1.670008] b53-srab-switch: probe of b53-srab-switch failed with error -22
[    1.677637] bgmac_bcma bcma0:4: Found PHY addr: 30 (NOREGS)
[    1.683256] bgmac_bcma bcma0:4: Support for Roboswitch not implemented
[    1.691124] bgmac_bcma bcma0:5: Found PHY addr: 0
[    1.695859] bgmac_bcma bcma0:5: Support for Roboswitch not implemented
[    1.703728] bgmac_bcma bcma0:6: Unsupported core_unit 3
[    1.709038] bgmac_bcma: probe of bcma0:6 failed with error -524
[    1.715108] pcie_iproc_bcma bcma0:7: host bridge /axi@18000000/pcie@12000 ranges:
[    1.722635] pcie_iproc_bcma bcma0:7:   No bus range found for /axi@18000000/pcie@12000, using [bus 00-ff]
[    1.732248] OF: /axi@18000000/pcie@12000: Missing device_type
[    1.738010] pcie_iproc_bcma bcma0:7: non-prefetchable memory resource required
[    1.869220] pcie_iproc_bcma bcma0:7: link: UP
[    1.873712] pcie_iproc_bcma bcma0:7: PCI host bridge to bus 0000:00
[    1.880021] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.885524] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fffffff]
[    1.892450] pci 0000:00:00.0: [14e4:d612] type 01 class 0x060400
[    1.898470] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    1.908153] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    1.917837] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x1c may corrupt adjacent RW1C bits
[    1.927605] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x1c may corrupt adjacent RW1C bits
[    1.937381] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    1.947170] pci 0000:00:00.0: PME# supported from D0 D3hot D3cold
[    1.953282] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4c may corrupt adjacent RW1C bits
[    1.963943] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    1.973730] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[    1.983417] pci_bus 0000:00: 1-byte config write to 0000:00:00.0 offset 0xc may corrupt adjacent RW1C bits
[    1.993104] PCI: bus0: Fast back to back transfers disabled
[    1.998686] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.006717] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x3e may corrupt adjacent RW1C bits
[    2.016616] pci 0000:01:00.0: [14e4:4365] type 00 class 0x028000
[    2.022672] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    2.029494] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x007fffff 64bit]
[    2.036302] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x000fffff 64bit pref]
[    2.043635] pci 0000:01:00.0: supports D1 D2
[    2.048803] PCI: bus1: Fast back to back transfers disabled
[    2.054414] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    2.061070] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x08bfffff]
[    2.067873] pci 0000:00:00.0: BAR 9: assigned [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.075646] pci 0000:01:00.0: BAR 2: assigned [mem 0x08000000-0x087fffff 64bit]
[    2.082989] pci 0000:01:00.0: BAR 4: assigned [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.090759] pci 0000:01:00.0: BAR 0: assigned [mem 0x08800000-0x08807fff 64bit]
[    2.098092] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.103070] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x08bfffff]
[    2.109877] pci 0000:00:00.0:   bridge window [mem 0x08c00000-0x08cfffff 64bit pref]
[    2.117838] pcie_iproc_bcma bcma0:8: host bridge /axi@18000000/pcie@13000 ranges:
[    2.125370] pcie_iproc_bcma bcma0:8:   No bus range found for /axi@18000000/pcie@13000, using [bus 00-ff]
[    2.134978] pcie_iproc_bcma bcma0:8: non-prefetchable memory resource required
[    2.269216] pcie_iproc_bcma bcma0:8: link: UP
[    2.273690] pcie_iproc_bcma bcma0:8: PCI host bridge to bus 0001:00
[    2.279994] pci_bus 0001:00: root bus resource [bus 00-ff]
[    2.285491] pci_bus 0001:00: root bus resource [mem 0x20000000-0x27ffffff]
[    2.292413] pci 0001:00:00.0: [14e4:d612] type 01 class 0x060400
[    2.298475] pci 0001:00:00.0: PME# supported from D0 D3hot D3cold
[    2.305469] PCI: bus0: Fast back to back transfers disabled
[    2.311079] pci 0001:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.319240] pci 0001:01:00.0: [14e4:4365] type 00 class 0x028000
[    2.325291] pci 0001:01:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    2.332116] pci 0001:01:00.0: reg 0x18: [mem 0x00000000-0x007fffff 64bit]
[    2.338932] pci 0001:01:00.0: reg 0x20: [mem 0x00000000-0x000fffff 64bit pref]
[    2.346260] pci 0001:01:00.0: supports D1 D2
[    2.351409] PCI: bus1: Fast back to back transfers disabled
[    2.357010] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
[    2.363668] pci 0001:00:00.0: BAR 8: assigned [mem 0x20000000-0x20bfffff]
[    2.370485] pci 0001:00:00.0: BAR 9: assigned [mem 0x20c00000-0x20cfffff 64bit pref]
[    2.378253] pci 0001:01:00.0: BAR 2: assigned [mem 0x20000000-0x207fffff 64bit]
[    2.385592] pci 0001:01:00.0: BAR 4: assigned [mem 0x20c00000-0x20cfffff 64bit pref]
[    2.393368] pci 0001:01:00.0: BAR 0: assigned [mem 0x20800000-0x20807fff 64bit]
[    2.400710] pci 0001:00:00.0: PCI bridge to [bus 01]
[    2.405685] pci 0001:00:00.0:   bridge window [mem 0x20000000-0x20bfffff]
[    2.412495] pci 0001:00:00.0:   bridge window [mem 0x20c00000-0x20cfffff 64bit pref]
[    2.420445] pcie_iproc_bcma bcma0:9: host bridge /axi@18000000/pcie@14000 ranges:
[    2.427958] pcie_iproc_bcma bcma0:9:   No bus range found for /axi@18000000/pcie@14000, using [bus 00-ff]
[    2.437570] pcie_iproc_bcma bcma0:9: non-prefetchable memory resource required
[    2.569217] pcie_iproc_bcma bcma0:9: PHY or data link is INACTIVE!
[    2.575410] pcie_iproc_bcma bcma0:9: no PCIe EP device detected
[    2.582192] bcm47xx-wdt bcm47xx-wdt.0: BCM47xx Watchdog Timer enabled (30 seconds, Software Timer)
[    2.591248] bcma-host-soc 18000000.axi: bus0: Bus registered
[    2.597734] NET: Registered protocol family 10
[    2.603100] Segment Routing with IPv6
[    2.606826] NET: Registered protocol family 17
[    2.611532] 8021q: 802.1Q VLAN Support v1.8
[    2.615769] Registering SWP/SWPB emulation handler
[    2.623307] b53-srab-switch 18007000.ethernet-switch: found switch: BCM53012, rev 0
[    2.772715] libphy: dsa slave smi: probed
[    2.777332] b53-srab-switch 18007000.ethernet-switch lan4 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[    2.789742] b53-srab-switch 18007000.ethernet-switch lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[    2.802129] b53-srab-switch 18007000.ethernet-switch lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[    2.814505] b53-srab-switch 18007000.ethernet-switch lan1 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[    2.826929] b53-srab-switch 18007000.ethernet-switch wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY] (irq=POLL)
[    2.839568] b53-srab-switch 18007000.ethernet-switch: Using legacy PHYLIB callbacks. Please migrate to PHYLINK!
[    2.850416] DSA: tree 0 setup
[    2.853662] UBI: auto-attach mtd4
[    2.857001] ubi0: attaching mtd4
[    3.490854] ubi0: scanning is finished
[    3.503206] ubi0: attached mtd4 (name "ubi", size 122 MiB)
[    3.508726] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.515635] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.522447] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.529425] ubi0: good PEBs: 976, bad PEBs: 0, corrupted PEBs: 0
[    3.535444] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    3.542682] ubi0: max/mean erase counter: 61/31, WL threshold: 4096, image sequence number: 2094677800
[    3.552012] ubi0: available PEBs: 0, total reserved PEBs: 976, PEBs reserved for bad PEB handling: 20
[    3.561296] ubi0: background thread "ubi_bgt0d" started, PID 463
[    3.568138] block ubiblock0_0: created from ubi0:0(rootfs)
[    3.573681] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    3.584067] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    3.592024] Freeing unused kernel memory: 1024K
[    3.619363] Run /sbin/init as init process
[    3.623467]   with arguments:
[    3.623469]     /sbin/init
[    3.623472]   with environment:
[    3.623474]     HOME=/
[    3.623476]     TERM=linux
[    3.826216] init: Console is alive
[    3.829878] init: - watchdog -
[    4.067812] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.133575] usbcore: registered new interface driver usbfs
[    4.139159] usbcore: registered new interface driver hub
[    4.144576] usbcore: registered new device driver usb
[    4.152849] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.160270] ehci-fsl: Freescale EHCI Host controller driver
[    4.166755] ehci-platform: EHCI generic platform driver
[    4.175470] ehci-platform 18021000.usb: EHCI Host Controller
[    4.178130] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.181262] ehci-platform 18021000.usb: new USB bus registered, assigned bus number 1
[    4.188530] ohci-platform: OHCI generic platform driver
[    4.195537] ehci-platform 18021000.usb: irq 45, io mem 0x18021000
[    4.200937] ohci-platform 18022000.usb: Generic Platform OHCI controller
[    4.213645] ohci-platform 18022000.usb: new USB bus registered, assigned bus number 2
[    4.221604] ohci-platform 18022000.usb: irq 45, io mem 0x18022000
[    4.229260] ehci-platform 18021000.usb: USB 2.0 started, EHCI 1.00
[    4.235934] hub 1-0:1.0: USB hub found
[    4.239846] hub 1-0:1.0: 2 ports detected
[    4.303745] hub 2-0:1.0: USB hub found
[    4.307557] hub 2-0:1.0: 2 ports detected
[    4.339153] xhci-hcd 18023000.usb: xHCI Host Controller
[    4.344442] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 3
[    4.352089] xhci-hcd 18023000.usb: hcc params 0x02501164 hci version 0x100 quirks 0x0000020000010010
[    4.361295] xhci-hcd 18023000.usb: irq 46, io mem 0x18023000
[    4.368476] hub 3-0:1.0: USB hub found
[    4.372304] hub 3-0:1.0: config failed, hub doesn't have any ports! (err -19)
[    4.379614] xhci-hcd 18023000.usb: xHCI Host Controller
[    4.384874] xhci-hcd 18023000.usb: new USB bus registered, assigned bus number 4
[    4.392310] xhci-hcd 18023000.usb: Host supports USB 3.0 SuperSpeed
[    4.400275] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.408780] hub 4-0:1.0: USB hub found
[    4.412646] hub 4-0:1.0: 1 port detected
[    4.419064] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.427177] init: - preinit -
[    5.516563] b53-srab-switch 18007000.ethernet-switch lan1: configuring for phy/gmii link mode
[    5.525205] bgmac_bcma bcma0:4 eth1: Link is Up - 1Gbps/Full - flow control off
[    5.532722] 8021q: adding VLAN 0 to HW filter on device lan1
[    5.539586] b53-srab-switch 18007000.ethernet-switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[    5.589314] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[    5.595824] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
[    9.750306] UBIFS (ubi0:1): Mounting in unauthenticated mode
[    9.756095] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 619
[    9.857494] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[    9.865380] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    9.875327] UBIFS (ubi0:1): FS size: 115548160 bytes (110 MiB, 910 LEBs), journal size 5840896 bytes (5 MiB, 46 LEBs)
[    9.885968] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[    9.892602] UBIFS (ubi0:1): media format: w5/r0 (latest is w5/r0), UUID 16C01DB0-2B7D-4146-A16B-F8BF7F65B1B6, small LPT model
[    9.905133] mount_root: overlay filesystem has not been fully initialized yet
[    9.912768] mount_root: switching to ubifs overlay
[   10.175536] urandom-seed: Seed file not found (/etc/urandom.seed)
[   10.261215] b53-srab-switch 18007000.ethernet-switch lan1: Link is Down
[   10.352800] procd: - early -
[   10.355803] procd: - watchdog -
[   10.881893] procd: - watchdog -
[   10.885281] procd: - ubus -
[   10.941129] procd: - init -
[   11.335891] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.337747] urngd: v1.0.2 started.
[   11.406832] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   11.414483] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   11.437493] xt_time: kernel timezone is -0000
[   11.458688] PPP generic driver version 2.4.2
[   11.464469] NET: Registered protocol family 24
[   11.479257] usbcore: registered new interface driver brcmfmac
[   11.485190] pci_generic_config_write32: 50 callbacks suppressed
[   11.485201] pci_bus 0000:01: 1-byte config write to 0000:01:00.0 offset 0x3c may corrupt adjacent RW1C bits
[   11.500958] pci 0000:00:00.0: enabling device (0140 -> 0142)
[   11.506632] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   11.516322] pci_bus 0000:00: 2-byte config write to 0000:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   11.526004] brcmfmac 0000:01:00.0: enabling device (0140 -> 0142)
[   11.532119] pci_bus 0000:01: 2-byte config write to 0000:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   11.541807] pci_bus 0000:01: 2-byte config write to 0000:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   11.679510] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   11.898965] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.asus,rt-ac88u.txt failed with error -2
[   11.910127] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
[   12.251982] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   12.260815] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   12.272076] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43664/4 wl0: Nov  5 2018 03:19:56 version 10.28.2 (r769115) FWID 01-d2cbb8fd
[   12.292796] pci_bus 0001:01: 1-byte config write to 0001:01:00.0 offset 0x3c may corrupt adjacent RW1C bits
[   12.302640] pci 0001:00:00.0: enabling device (0140 -> 0142)
[   12.308328] pci_bus 0001:00: 2-byte config write to 0001:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.318112] pci_bus 0001:00: 2-byte config write to 0001:00:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.327836] brcmfmac 0001:01:00.0: enabling device (0140 -> 0142)
[   12.333958] pci_bus 0001:01: 2-byte config write to 0001:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.343657] pci_bus 0001:01: 2-byte config write to 0001:01:00.0 offset 0x4 may corrupt adjacent RW1C bits
[   12.479634] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   12.493169] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.asus,rt-ac88u.txt failed with error -2
[   12.504372] brcmfmac 0001:01:00.0: Direct firmware load for brcm/brcmfmac4366c-pcie.txt failed with error -2
[   12.822034] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4366c-pcie for chip BCM43664/4
[   12.830840] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   12.842119] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43664/4 wl0: Nov  5 2018 03:19:56 version 10.28.2 (r769115) FWID 01-d2cbb8fd
[   12.873288] kmodloader: done loading kernel modules from /etc/modules.d/*
[   17.687713] bgmac_bcma bcma0:4 eth1: Link is Up - 1Gbps/Full - flow control off
[   17.697303] b53-srab-switch 18007000.ethernet-switch lan1: configuring for phy/gmii link mode
[   17.708769] 8021q: adding VLAN 0 to HW filter on device lan1
[   17.769641] br-lan: port 1(lan1) entered blocking state
[   17.774886] br-lan: port 1(lan1) entered disabled state
[   17.780478] device lan1 entered promiscuous mode
[   17.785129] device eth1 entered promiscuous mode
[   17.881151] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   17.917174] b53-srab-switch 18007000.ethernet-switch lan2: configuring for phy/gmii link mode
[   17.933108] 8021q: adding VLAN 0 to HW filter on device lan2
[   17.989770] br-lan: port 2(lan2) entered blocking state
[   17.995074] br-lan: port 2(lan2) entered disabled state
[   18.000711] device lan2 entered promiscuous mode
[   18.091871] b53-srab-switch 18007000.ethernet-switch lan3: configuring for phy/gmii link mode
[   18.101253] 8021q: adding VLAN 0 to HW filter on device lan3
[   18.189383] br-lan: port 3(lan3) entered blocking state
[   18.194627] br-lan: port 3(lan3) entered disabled state
[   18.200185] device lan3 entered promiscuous mode
[   18.291748] b53-srab-switch 18007000.ethernet-switch lan4: configuring for phy/gmii link mode
[   18.300590] 8021q: adding VLAN 0 to HW filter on device lan4
[   18.389301] br-lan: port 4(lan4) entered blocking state
[   18.394588] br-lan: port 4(lan4) entered disabled state
[   18.400311] device lan4 entered promiscuous mode
[   18.491825] b53-srab-switch 18007000.ethernet-switch extsw: configuring for fixed/ link mode
[   18.500458] 8021q: adding VLAN 0 to HW filter on device extsw
[   18.506377] b53-srab-switch 18007000.ethernet-switch extsw: Link is Up - 1Gbps/Full - flow control off
[   18.599451] br-lan: port 5(extsw) entered blocking state
[   18.604786] br-lan: port 5(extsw) entered disabled state
[   18.610539] device extsw entered promiscuous mode
[   18.699247] br-lan: port 5(extsw) entered blocking state
[   18.704579] br-lan: port 5(extsw) entered forwarding state
[   18.710198] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   18.745073] b53-srab-switch 18007000.ethernet-switch wan: configuring for phy/gmii link mode
[   18.753845] 8021q: adding VLAN 0 to HW filter on device wan
[   20.841340] b53-srab-switch 18007000.ethernet-switch lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   20.850813] br-lan: port 1(lan1) entered blocking state
[   20.856050] br-lan: port 1(lan1) entered forwarding state

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
  2021-09-24 21:02             ` Arınç ÜNAL
@ 2021-09-24 21:20               ` Florian Fainelli
  -1 siblings, 0 replies; 20+ messages in thread
From: Florian Fainelli @ 2021-09-24 21:20 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

On 9/24/21 2:02 PM, Arınç ÜNAL wrote:
>> 0x200 is not the address of the Realtek switch on the MDIO bus, 0x200 is
>> the offset with mdio mux that needs to be toggled (bit 9). You still
>> need to provide the Ethernet switch's address on the MDIO bus which
>> appears to be 0.
> 
> Oh, we flip the 9th bit. 2 to the power of 9 = 0x200. Got it!
> 
> I tried 0 and 29 as the PHY ID. I'd assume the DSA realtek-smi driver
> would start probing the switch, however, nothing happens. Full log in
> attachments.
> 
> [    2.026772] bcm_iproc 18029200.spi: using bspi-mspi mode
> [    2.033467] libphy: Fixed MDIO Bus: probed
> [    2.038123] libphy: iProc MDIO bus: probed
> [    2.042331] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
> [    2.049823] libphy: mdio_mux: probed
> [    2.054206] libphy: mdio_mux: probed
> [    2.058713] b53-srab-switch 18007000.ethernet-switch: found switch:
> BCM53012, rev 0
> [    2.066671] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
> 
> Quoting Documentation/devicetree/bindings/net/dsa/realtek-smi.txt for
> further reference.
> 
>> Realtek SMI-based Switches
>> ==========================
>>
>> The SMI "Simple Management Interface" is a two-wire protocol using
>> bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
>> not use the MDIO protocol. This binding defines how to specify the
>> SMI-based Realtek devices.

Ah this is the key here, using the MDIO controller won't work sorry
about misleading you. I suppose you will have to go back to the previous
Device Tree representation you had, but change the dsa,member property
and then you should be in business baring additional bugs/features.
-- 
Florian

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-24 21:20               ` Florian Fainelli
  0 siblings, 0 replies; 20+ messages in thread
From: Florian Fainelli @ 2021-09-24 21:20 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

On 9/24/21 2:02 PM, Arınç ÜNAL wrote:
>> 0x200 is not the address of the Realtek switch on the MDIO bus, 0x200 is
>> the offset with mdio mux that needs to be toggled (bit 9). You still
>> need to provide the Ethernet switch's address on the MDIO bus which
>> appears to be 0.
> 
> Oh, we flip the 9th bit. 2 to the power of 9 = 0x200. Got it!
> 
> I tried 0 and 29 as the PHY ID. I'd assume the DSA realtek-smi driver
> would start probing the switch, however, nothing happens. Full log in
> attachments.
> 
> [    2.026772] bcm_iproc 18029200.spi: using bspi-mspi mode
> [    2.033467] libphy: Fixed MDIO Bus: probed
> [    2.038123] libphy: iProc MDIO bus: probed
> [    2.042331] iproc-mdio 18003000.mdio: Broadcom iProc MDIO bus registered
> [    2.049823] libphy: mdio_mux: probed
> [    2.054206] libphy: mdio_mux: probed
> [    2.058713] b53-srab-switch 18007000.ethernet-switch: found switch:
> BCM53012, rev 0
> [    2.066671] bgmac_bcma: Broadcom 47xx GBit MAC driver loaded
> 
> Quoting Documentation/devicetree/bindings/net/dsa/realtek-smi.txt for
> further reference.
> 
>> Realtek SMI-based Switches
>> ==========================
>>
>> The SMI "Simple Management Interface" is a two-wire protocol using
>> bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
>> not use the MDIO protocol. This binding defines how to specify the
>> SMI-based Realtek devices.

Ah this is the key here, using the MDIO controller won't work sorry
about misleading you. I suppose you will have to go back to the previous
Device Tree representation you had, but change the dsa,member property
and then you should be in business baring additional bugs/features.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
  2021-09-24 21:20               ` Florian Fainelli
@ 2021-09-24 21:44                 ` Arınç ÜNAL
  -1 siblings, 0 replies; 20+ messages in thread
From: Arınç ÜNAL @ 2021-09-24 21:44 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

On 25/09/2021 00:20, Florian Fainelli wrote:
> On 9/24/21 2:02 PM, Arınç ÜNAL wrote:
>> Quoting Documentation/devicetree/bindings/net/dsa/realtek-smi.txt for
>> further reference.
>>
>>> Realtek SMI-based Switches
>>> ==========================
>>>
>>> The SMI "Simple Management Interface" is a two-wire protocol using
>>> bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
>>> not use the MDIO protocol. This binding defines how to specify the
>>> SMI-based Realtek devices.
> 
> Ah this is the key here, using the MDIO controller won't work sorry
> about misleading you. I suppose you will have to go back to the previous
> Device Tree representation you had, but change the dsa,member property
> and then you should be in business baring additional bugs/features.
> 

All good. After fixing "dsa,member" on the original specification, the 
log slightly changed. I'm going to see if I can switch to the net-next 
kernel on OpenWrt to test the driver further. Something might be wrong 
with my backport.

[    1.377530] realtek-smi switch@1: failed to get RESET GPIO
---
[    2.759267] realtek-smi switch@1: deasserted RESET
[    2.764927] realtek-smi switch@1: found an RTL8365MB-VC switch 
(ver=0x0040)
[    2.771956] realtek-smi switch@1: unable to register switch ret = -517
---
[    3.149262] realtek-smi switch@1: deasserted RESET
[    3.154906] realtek-smi switch@1: found an RTL8365MB-VC switch 
(ver=0x0040)
[    3.287052] realtek-smi switch@1: failed to get parent irq: -22
[    3.293060] realtek-smi switch@1: no interrupt support
[    3.298211] realtek-smi switch@1: no MDIO bus node
[    3.303025] realtek-smi switch@1: could not set up MDIO bus
[    3.308648] realtek-smi switch@1: unable to register switch ret = -19

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

* Re: [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U
@ 2021-09-24 21:44                 ` Arınç ÜNAL
  0 siblings, 0 replies; 20+ messages in thread
From: Arınç ÜNAL @ 2021-09-24 21:44 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Rafał Miłecki, Hauke Mehrtens, Rob Herring,
	linux-arm-kernel, devicetree, bcm-kernel-feedback-list,
	Alvin Šipraga

On 25/09/2021 00:20, Florian Fainelli wrote:
> On 9/24/21 2:02 PM, Arınç ÜNAL wrote:
>> Quoting Documentation/devicetree/bindings/net/dsa/realtek-smi.txt for
>> further reference.
>>
>>> Realtek SMI-based Switches
>>> ==========================
>>>
>>> The SMI "Simple Management Interface" is a two-wire protocol using
>>> bit-banged GPIO that while it reuses the MDIO lines MCK and MDIO does
>>> not use the MDIO protocol. This binding defines how to specify the
>>> SMI-based Realtek devices.
> 
> Ah this is the key here, using the MDIO controller won't work sorry
> about misleading you. I suppose you will have to go back to the previous
> Device Tree representation you had, but change the dsa,member property
> and then you should be in business baring additional bugs/features.
> 

All good. After fixing "dsa,member" on the original specification, the 
log slightly changed. I'm going to see if I can switch to the net-next 
kernel on OpenWrt to test the driver further. Something might be wrong 
with my backport.

[    1.377530] realtek-smi switch@1: failed to get RESET GPIO
---
[    2.759267] realtek-smi switch@1: deasserted RESET
[    2.764927] realtek-smi switch@1: found an RTL8365MB-VC switch 
(ver=0x0040)
[    2.771956] realtek-smi switch@1: unable to register switch ret = -517
---
[    3.149262] realtek-smi switch@1: deasserted RESET
[    3.154906] realtek-smi switch@1: found an RTL8365MB-VC switch 
(ver=0x0040)
[    3.287052] realtek-smi switch@1: failed to get parent irq: -22
[    3.293060] realtek-smi switch@1: no interrupt support
[    3.298211] realtek-smi switch@1: no MDIO bus node
[    3.303025] realtek-smi switch@1: could not set up MDIO bus
[    3.308648] realtek-smi switch@1: unable to register switch ret = -19

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-09-24 21:46 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 12:19 [PATCH] ARM: dts: BCM5301X: Add DT for Asus RT-AC88U Arınç ÜNAL
2021-09-21 12:19 ` Arınç ÜNAL
2021-09-22 18:15 ` Florian Fainelli
2021-09-22 18:15   ` Florian Fainelli
2021-09-22 22:26   ` Arınç ÜNAL
2021-09-22 22:26     ` Arınç ÜNAL
2021-09-23  0:22     ` Florian Fainelli
2021-09-23  0:22       ` Florian Fainelli
2021-09-24  8:50       ` Arınç ÜNAL
2021-09-24  8:50         ` Arınç ÜNAL
2021-09-24 16:32         ` Florian Fainelli
2021-09-24 16:32           ` Florian Fainelli
2021-09-24 21:02           ` Arınç ÜNAL
2021-09-24 21:02             ` Arınç ÜNAL
2021-09-24 21:20             ` Florian Fainelli
2021-09-24 21:20               ` Florian Fainelli
2021-09-24 21:44               ` Arınç ÜNAL
2021-09-24 21:44                 ` Arınç ÜNAL
2021-09-22 18:37 ` Florian Fainelli
2021-09-22 18:37   ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.