e204859fbdfd2ac9bf59e8f879e0cbbbb801033b
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0420-ARM-dts-bcm2711-rpi-4-Enable-GENET-support.patch
1 From 32847947e1d1e1ac2a73c7ea8ad47cca49aef5d4 Mon Sep 17 00:00:00 2001
2 From: Stefan Wahren <wahrenst@gmx.net>
3 Date: Mon, 11 Nov 2019 20:49:26 +0100
4 Subject: [PATCH] ARM: dts: bcm2711-rpi-4: Enable GENET support
5
6 This enables the Gigabit Ethernet support on the Raspberry Pi 4.
7 The defined PHY mode is equivalent to the default register settings
8 in the downstream tree.
9
10 Signed-off-by: Matthias Brugger <mbrugger@suse.com>
11 Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
12 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
13 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
14 ---
15 arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 17 +++++++++++++++++
16 arch/arm/boot/dts/bcm2711.dtsi | 26 ++++++++++++++++++++++++++
17 2 files changed, 43 insertions(+)
18
19 --- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
20 +++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
21 @@ -19,6 +19,10 @@
22 reg = <0 0 0>;
23 };
24
25 + aliases {
26 + ethernet0 = &genet;
27 + };
28 +
29 leds {
30 act {
31 gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
32 @@ -97,6 +101,19 @@
33 status = "okay";
34 };
35
36 +&genet {
37 + phy-handle = <&phy1>;
38 + phy-mode = "rgmii-rxid";
39 + status = "okay";
40 +};
41 +
42 +&genet_mdio {
43 + phy1: ethernet-phy@1 {
44 + /* No PHY interrupt */
45 + reg = <0x1>;
46 + };
47 +};
48 +
49 /* uart0 communicates with the BT module */
50 &uart0 {
51 pinctrl-names = "default";
52 --- a/arch/arm/boot/dts/bcm2711.dtsi
53 +++ b/arch/arm/boot/dts/bcm2711.dtsi
54 @@ -325,6 +325,32 @@
55 cpu-release-addr = <0x0 0x000000f0>;
56 };
57 };
58 +
59 + scb {
60 + compatible = "simple-bus";
61 + #address-cells = <2>;
62 + #size-cells = <1>;
63 +
64 + ranges = <0x0 0x7c000000 0x0 0xfc000000 0x03800000>;
65 +
66 + genet: ethernet@7d580000 {
67 + compatible = "brcm,bcm2711-genet-v5";
68 + reg = <0x0 0x7d580000 0x10000>;
69 + #address-cells = <0x1>;
70 + #size-cells = <0x1>;
71 + interrupts = <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
72 + <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>;
73 + status = "disabled";
74 +
75 + genet_mdio: mdio@e14 {
76 + compatible = "brcm,genet-mdio-v5";
77 + reg = <0xe14 0x8>;
78 + reg-names = "mdio";
79 + #address-cells = <0x0>;
80 + #size-cells = <0x1>;
81 + };
82 + };
83 + };
84 };
85
86 &clk_osc {