381a8c389437a5e3dd3a80457df5707fab370ed7
[openwrt/openwrt.git] / target / linux / bcm53xx / patches-6.1 / 130-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Date: Thu, 13 Jul 2023 13:05:44 +0200
3 Subject: [PATCH] ARM: dts: BCM53573: Fix Ethernet info for Luxul devices
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 Both Luxul's XAP devices (XAP-810 and XAP-1440) are access points that
9 use a non-default design. They don't include switch but have a single
10 Ethernet port and BCM54210E PHY connected to the Ethernet controller's
11 MDIO bus.
12
13 Support for those devices regressed due to two changes:
14
15 1. Describing MDIO bus with switch
16 After commit 9fb90ae6cae7 ("ARM: dts: BCM53573: Describe on-SoC BCM53125
17 rev 4 switch") Linux stopped probing for MDIO devices.
18
19 2. Dropping hardcoded BCM54210E delays
20 In commit fea7fda7f50a ("net: phy: broadcom: Fix RGMII delays
21 configuration for BCM54210E") support for other PHY modes was added but
22 that requires a proper "phy-mode" value in DT.
23
24 Both above changes are correct (they don't need to be reverted or
25 anything) but they need this fix for DT data to be correct and for Linux
26 to work properly.
27
28 Fixes: 9fb90ae6cae7 ("ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch")
29 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
30 ---
31 .../boot/dts/broadcom/bcm47189-luxul-xap-1440.dts | 13 +++++++++++++
32 .../boot/dts/broadcom/bcm47189-luxul-xap-810.dts | 13 +++++++++++++
33 2 files changed, 26 insertions(+)
34
35 --- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
36 +++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
37 @@ -45,3 +45,16 @@
38 };
39 };
40 };
41 +
42 +&gmac0 {
43 + phy-mode = "rgmii";
44 + phy-handle = <&bcm54210e>;
45 +
46 + mdio {
47 + /delete-node/ switch@1e;
48 +
49 + bcm54210e: ethernet-phy@0 {
50 + reg = <0>;
51 + };
52 + };
53 +};
54 --- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
55 +++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
56 @@ -81,3 +81,16 @@
57 };
58 };
59 };
60 +
61 +&gmac0 {
62 + phy-mode = "rgmii";
63 + phy-handle = <&bcm54210e>;
64 +
65 + mdio {
66 + /delete-node/ switch@1e;
67 +
68 + bcm54210e: ethernet-phy@0 {
69 + reg = <0>;
70 + };
71 + };
72 +};