mvebu: Refresh kernel configuration
[oweals/openwrt.git] / target / linux / gemini / patches-4.14 / 0031-ARM-dts-Add-the-FOTG210-USB-host-to-Gemini.patch
1 From dd62aee5d2d24199e71e745544e49a1a8b3c6f7a Mon Sep 17 00:00:00 2001
2 From: Linus Walleij <linus.walleij@linaro.org>
3 Date: Fri, 21 Apr 2017 20:50:22 +0200
4 Subject: [PATCH 31/31] ARM: dts: Add the FOTG210 USB host to Gemini
5
6 This adds the FOTG210 USB host controller to the Gemini
7 device trees. In the main SoC DTSI it is flagged as disabled
8 and then it is selectively enabled on the devices that utilize
9 it (these per-platform enablements are done on the out-of-tree
10 OpenWrt patch set). It is not enabled on the Itian SquareOne
11 NAS/router since this instead has a VIA host controller
12 soldered on the PCI port, and can gate off these USB host
13 controllers.
14
15 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
16 ---
17 USB maintainers: I will merge this through the ARM SoC tree,
18 the patch is only included in the series for context.
19 ---
20  arch/arm/boot/dts/gemini-dlink-dir-685.dts |  8 ++++++++
21  arch/arm/boot/dts/gemini-nas4220b.dts      |  8 ++++++++
22  arch/arm/boot/dts/gemini-wbd111.dts        | 20 ++++++++++++++++++++
23  arch/arm/boot/dts/gemini-wbd222.dts        | 21 +++++++++++++++++++++
24  arch/arm/boot/dts/gemini.dtsi              | 26 ++++++++++++++++++++++++++
25  6 files changed, 103 insertions(+)
26
27 --- a/arch/arm/boot/dts/gemini-dlink-dir-685.dts
28 +++ b/arch/arm/boot/dts/gemini-dlink-dir-685.dts
29 @@ -299,5 +299,13 @@
30                                 };
31                         };
32                 };
33 +
34 +               usb@68000000 {
35 +                       status = "okay";
36 +               };
37 +
38 +               usb@69000000 {
39 +                       status = "okay";
40 +               };
41         };
42  };
43 --- a/arch/arm/boot/dts/gemini-nas4220b.dts
44 +++ b/arch/arm/boot/dts/gemini-nas4220b.dts
45 @@ -146,5 +146,13 @@
46                 ata@63000000 {
47                         status = "okay";
48                 };
49 +
50 +               usb@68000000 {
51 +                       status = "okay";
52 +               };
53 +
54 +               usb@69000000 {
55 +                       status = "okay";
56 +               };
57         };
58  };
59 --- a/arch/arm/boot/dts/gemini-wbd111.dts
60 +++ b/arch/arm/boot/dts/gemini-wbd111.dts
61 @@ -160,5 +160,25 @@
62                                 <0x6000 0 0 3 &pci_intc 1>,
63                                 <0x6000 0 0 4 &pci_intc 2>;
64                 };
65 +
66 +               ethernet@60000000 {
67 +                       status = "okay";
68 +
69 +                       ethernet-port@0 {
70 +                               phy-mode = "rgmii";
71 +                               phy-handle = <&phy0>;
72 +                       };
73 +                       ethernet-port@1 {
74 +                               /* Not used in this platform */
75 +                       };
76 +               };
77 +
78 +               usb@68000000 {
79 +                       status = "okay";
80 +               };
81 +
82 +               usb@69000000 {
83 +                       status = "okay";
84 +               };
85         };
86  };
87 --- a/arch/arm/boot/dts/gemini-wbd222.dts
88 +++ b/arch/arm/boot/dts/gemini-wbd222.dts
89 @@ -165,5 +165,26 @@
90                                 <0x6000 0 0 3 &pci_intc 1>,
91                                 <0x6000 0 0 4 &pci_intc 2>;
92                 };
93 +
94 +               ethernet@60000000 {
95 +                       status = "okay";
96 +
97 +                       ethernet-port@0 {
98 +                               phy-mode = "rgmii";
99 +                               phy-handle = <&phy0>;
100 +                       };
101 +                       ethernet-port@1 {
102 +                               phy-mode = "rgmii";
103 +                               phy-handle = <&phy1>;
104 +                       };
105 +               };
106 +
107 +               usb@68000000 {
108 +                       status = "okay";
109 +               };
110 +
111 +               usb@69000000 {
112 +                       status = "okay";
113 +               };
114         };
115  };
116 --- a/arch/arm/boot/dts/gemini.dtsi
117 +++ b/arch/arm/boot/dts/gemini.dtsi
118 @@ -411,5 +411,31 @@
119                         #size-cells = <0>;
120                         status = "disabled";
121                 };
122 +
123 +               usb@68000000 {
124 +                       compatible = "cortina,gemini-usb", "faraday,fotg210";
125 +                       reg = <0x68000000 0x1000>;
126 +                       interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
127 +                       resets = <&syscon GEMINI_RESET_USB0>;
128 +                       clocks = <&syscon GEMINI_CLK_GATE_USB0>;
129 +                       clock-names = "PCLK";
130 +                       pinctrl-names = "default";
131 +                       pinctrl-0 = <&usb_default_pins>;
132 +                       syscon = <&syscon>;
133 +                       status = "disabled";
134 +               };
135 +
136 +               usb@69000000 {
137 +                       compatible = "cortina,gemini-usb", "faraday,fotg210";
138 +                       reg = <0x69000000 0x1000>;
139 +                       interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
140 +                       resets = <&syscon GEMINI_RESET_USB1>;
141 +                       clocks = <&syscon GEMINI_CLK_GATE_USB1>;
142 +                       clock-names = "PCLK";
143 +                       pinctrl-names = "default";
144 +                       pinctrl-0 = <&usb_default_pins>;
145 +                       syscon = <&syscon>;
146 +                       status = "disabled";
147 +               };
148         };
149  };