bcm53xx: backport BCM5301X earlycon and USB VCC patches
[openwrt.git] / target / linux / bcm53xx / patches-4.4 / 035-ARM-BCM5301X-Set-vcc-gpio-for-USB-controllers-of-few.patch
1 From dd70ccfaa79189feaa78609d44f7c3e7fa1dc6ff Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
3 Date: Wed, 23 Mar 2016 16:52:47 +0100
4 Subject: [PATCH] ARM: BCM5301X: Set vcc-gpio for USB controllers of few
5  devices
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 There are few devices that have USB power controlled using GPIO. Linux
11 USB host driver (bcma-hcd) already supports this by reading vcc-gpio
12 from DT. Set it properly for all known devices.
13
14 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
15 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
16 ---
17
18 --- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
19 +++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
20 @@ -139,3 +139,11 @@
21  &uart0 {
22         status = "okay";
23  };
24 +
25 +&usb2 {
26 +       vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
27 +};
28 +
29 +&usb3 {
30 +       vcc-gpio = <&chipcommon 10 GPIO_ACTIVE_LOW>;
31 +};
32 --- a/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
33 +++ b/arch/arm/boot/dts/bcm4708-netgear-r6250.dts
34 @@ -24,17 +24,6 @@
35                 reg = <0x00000000 0x08000000>;
36         };
37  
38 -       axi@18000000 {
39 -               usb3@23000 {
40 -                       reg = <0x00023000 0x1000>;
41 -
42 -                       #address-cells = <1>;
43 -                       #size-cells = <1>;
44 -
45 -                       vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
46 -               };
47 -       };
48 -
49         leds {
50                 compatible = "gpio-leds";
51  
52 @@ -97,3 +86,7 @@
53  &uart0 {
54         status = "okay";
55  };
56 +
57 +&usb3 {
58 +       vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
59 +};
60 --- a/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
61 +++ b/arch/arm/boot/dts/bcm4709-buffalo-wxr-1900dhp.dts
62 @@ -126,3 +126,8 @@
63                 };
64         };
65  };
66 +
67 +
68 +&usb2 {
69 +       vcc-gpio = <&chipcommon 13 GPIO_ACTIVE_HIGH>;
70 +};
71 --- a/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
72 +++ b/arch/arm/boot/dts/bcm4709-netgear-r8000.dts
73 @@ -106,3 +106,11 @@
74                 };
75         };
76  };
77 +
78 +&usb2 {
79 +       vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
80 +};
81 +
82 +&usb3 {
83 +       vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
84 +};
85 --- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
86 +++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
87 @@ -109,3 +109,7 @@
88         status = "okay";
89         clock-frequency = <125000000>;
90  };
91 +
92 +&usb3 {
93 +       vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
94 +};
95 --- a/arch/arm/boot/dts/bcm5301x.dtsi
96 +++ b/arch/arm/boot/dts/bcm5301x.dtsi
97 @@ -207,6 +207,20 @@
98                         gpio-controller;
99                         #gpio-cells = <2>;
100                 };
101 +
102 +               usb2: usb2@21000 {
103 +                       reg = <0x00021000 0x1000>;
104 +
105 +                       #address-cells = <1>;
106 +                       #size-cells = <1>;
107 +               };
108 +
109 +               usb3: usb3@23000 {
110 +                       reg = <0x00023000 0x1000>;
111 +
112 +                       #address-cells = <1>;
113 +                       #size-cells = <1>;
114 +               };
115         };
116  
117         lcpll0: lcpll0@1800c100 {