mediatek: add new dts files for mt7622 to v4.14
[oweals/openwrt.git] / target / linux / gemini / patches-4.14 / 0012-ARM-dts-Add-ethernet-PHYs-to-the-a-bunch-of-Geminis.patch
1 From f0674df220f3da81c173025636a904b395cf8f8b Mon Sep 17 00:00:00 2001
2 From: Linus Walleij <linus.walleij@linaro.org>
3 Date: Sun, 19 Nov 2017 10:46:16 +0100
4 Subject: [PATCH 12/31] ARM: dts: Add ethernet PHYs to the a bunch of Geminis
5
6 These Gemini boards have Ethernet PHY on GPIO bit-banged
7 MDIO, clearly defined in the corresponding OpenWRT
8 ethernet patches since ages. Add them in accordance with
9 the OpenWRT patch so we can use them when we add ethernet
10 support.
11
12 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
13 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
14 ---
15  arch/arm/boot/dts/gemini-nas4220b.dts | 13 +++++++++++++
16  arch/arm/boot/dts/gemini-wbd111.dts   | 13 +++++++++++++
17  arch/arm/boot/dts/gemini-wbd222.dts   | 18 ++++++++++++++++++
18  4 files changed, 57 insertions(+)
19
20 --- a/arch/arm/boot/dts/gemini-nas4220b.dts
21 +++ b/arch/arm/boot/dts/gemini-nas4220b.dts
22 @@ -64,6 +64,19 @@
23                 };
24         };
25  
26 +       mdio0: ethernet-phy {
27 +               compatible = "virtual,mdio-gpio";
28 +               gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
29 +                       <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
30 +               #address-cells = <1>;
31 +               #size-cells = <0>;
32 +
33 +               phy0: ethernet-phy@1 {
34 +                       reg = <1>;
35 +                       device_type = "ethernet-phy";
36 +               };
37 +       };
38 +
39         soc {
40                 flash@30000000 {
41                         status = "okay";
42 --- a/arch/arm/boot/dts/gemini-wbd111.dts
43 +++ b/arch/arm/boot/dts/gemini-wbd111.dts
44 @@ -69,6 +69,19 @@
45                 };
46         };
47  
48 +       mdio0: ethernet-phy {
49 +               compatible = "virtual,mdio-gpio";
50 +               gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
51 +                       <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
52 +               #address-cells = <1>;
53 +               #size-cells = <0>;
54 +
55 +               phy0: ethernet-phy@1 {
56 +                       reg = <1>;
57 +                       device_type = "ethernet-phy";
58 +               };
59 +       };
60 +
61         soc {
62                 flash@30000000 {
63                         status = "okay";
64 --- a/arch/arm/boot/dts/gemini-wbd222.dts
65 +++ b/arch/arm/boot/dts/gemini-wbd222.dts
66 @@ -69,6 +69,24 @@
67                 };
68         };
69  
70 +       mdio0: ethernet-phy {
71 +               compatible = "virtual,mdio-gpio";
72 +               gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
73 +                       <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
74 +               #address-cells = <1>;
75 +               #size-cells = <0>;
76 +
77 +               phy0: ethernet-phy@1 {
78 +                       reg = <1>;
79 +                       device_type = "ethernet-phy";
80 +               };
81 +
82 +               phy1: ethernet-phy@3 {
83 +                       reg = <3>;
84 +                       device_type = "ethernet-phy";
85 +               };
86 +       };
87 +
88         soc {
89                 flash@30000000 {
90                         status = "okay";