lantiq: copy target to kernel 4.19
[oweals/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / BTHOMEHUBV3A.dts
1 /dts-v1/;
2
3 #include "ar9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6
7 / {
8         compatible = "bt,homehub-v3a", "lantiq,xway", "lantiq,ar9";
9         model = "BT Home Hub 3A";  /* SoC: Lantiq ar9 @ 333MHz */
10
11         chosen {
12                 bootargs = "console=ttyLTQ0,115200";
13         };
14
15         aliases {
16                 led-boot = &power_orange;
17                 led-failsafe = &power_red;
18                 led-running = &power_blue;
19                 led-upgrade = &power_blue;
20
21                 led-dsl = &broadband_blue;
22                 led-wifi = &wireless_blue;
23         };
24
25         memory@0 {                                /* RAM: Samsung K4H511638F-LC 64MB */
26                 reg = <0x0 0x4000000>;
27         };
28
29         gpio-keys-polled {
30                 compatible = "gpio-keys-polled";
31                 #address-cells = <1>;
32                 #size-cells = <0>;
33                 poll-interval = <100>;
34                 reset {
35                         label = "reset";
36                         gpios = <&gpio 54 GPIO_ACTIVE_LOW>;
37                         linux,code = <KEY_RESTART>;
38                 };
39                 restart {
40                         label = "restart";
41                         gpios = <&gpio 52 GPIO_ACTIVE_LOW>;
42                         linux,code = <KEY_POWER>;
43                 };
44                 wps {
45                         label = "wps";
46                         gpios = <&gpio 53 GPIO_ACTIVE_LOW>;
47                         linux,code = <KEY_WPS_BUTTON>;
48                 };
49         };
50
51         gpio-leds {
52                 compatible = "gpio-leds";
53
54                 wireless-red {
55                         label = "bthomehubv3a:red:wireless";
56                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
57                 };
58                 wireless-orange {
59                         label = "bthomehubv3a:orange:wireless";
60                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
61                 };
62                 wireless_blue: wireless-blue {
63                         label = "bthomehubv3a:blue:wireless";
64                         gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
65                 };
66
67                 broadband-red {
68                         label = "bthomehubv3a:red:broadband";
69                         gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
70                 };
71                 broadband-orange {
72                         label = "bthomehubv3a:orange:broadband";
73                         gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
74                 };
75                 broadband_blue: broadband-blue {
76                         label = "bthomehubv3a:blue:broadband";
77                         gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
78                 };
79
80                 power_red: power-red {
81                         label = "bthomehubv3a:red:power";
82                         gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
83                 };
84                 power_orange: power-orange {
85                         label = "bthomehubv3a:orange:power";
86                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
87                         default-state = "keep";
88                 };
89                 power_blue: power-blue {
90                         label = "bthomehubv3a:blue:power";
91                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
92                 };
93         };
94
95         usb_vbus: regulator-usb-vbus {
96                 compatible = "regulator-fixed";
97
98                 regulator-name = "USB_VBUS";
99
100                 regulator-min-microvolt = <5000000>;
101                 regulator-max-microvolt = <5000000>;
102
103                 gpio = <&gpio 33 GPIO_ACTIVE_HIGH>;
104                 enable-active-high;
105         };
106 };
107
108 &gpio {
109         pinctrl-names = "default";
110         pinctrl-0 = <&state_default>;
111
112         state_default: pinmux {
113                 nand_out {
114                         lantiq,groups = "nand cle", "nand ale";
115                         lantiq,function = "ebu";
116                         lantiq,output = <1>;
117                         lantiq,open-drain = <0>;
118                         lantiq,pull = <0>;
119                 };
120                 nand_cs1 {
121                         lantiq,groups = "nand cs1";
122                         lantiq,function = "ebu";
123                         lantiq,open-drain = <0>;
124                         lantiq,pull = <0>;
125                 };
126
127                 pci_in {
128                         lantiq,groups = "req1";
129                         lantiq,function = "pci";
130                         lantiq,output = <0>;
131                         lantiq,open-drain = <1>;
132                         lantiq,pull = <2>;
133                 };
134                 pci_out {
135                         lantiq,groups = "gnt1";
136                         lantiq,function = "pci";
137                         lantiq,output = <1>;
138                         lantiq,open-drain = <0>;
139                         lantiq,pull = <0>;
140                 };
141
142                 pci_rst {
143                         lantiq,pins = "io21";
144                         lantiq,output = <1>;
145                         lantiq,open-drain = <0>;
146                 };
147         };
148 };
149
150 &gsw {
151         phy-mode = "rgmii";
152 };
153
154 &localbus {
155         nand@1 {                  /* NAND Flash: Samsung K9F5608U0D-JIB0 32MB */
156                 compatible = "lantiq,nand-xway";
157                 lantiq,cs = <1>;
158                 bank-width = <2>;
159                 reg = <1 0x0 0x2000000 >;
160                 #address-cells = <1>;
161                 #size-cells = <1>;
162                 req-mask = <0x1>;  /* PCI request lines to mask during NAND access */
163
164                 partitions {
165                         compatible = "fixed-partitions";
166                         #address-cells = <1>;
167                         #size-cells = <1>;
168
169                         partition@0 {
170                                 label = "preboot";
171                                 reg = <0x00000 0x8000>;
172                                 read-only;
173                         };
174                         partition@8000 {
175                                 label = "u-boot";
176                                 reg = <0x8000 0x05c000>;
177                                 read-only;
178                         };
179                         partition@64000 {
180                                 label = "uboot_env";
181                                 reg = <0x64000 0x004000>;
182                         };
183                         ath9k_cal: partition@68000 {
184                                 label = "art-copy";
185                                 reg = <0x68000 0x004000>;
186                         };
187                         partition@6c000 {
188                                 label = "kernel";
189                                 reg = <0x6c000 0x200000>;
190                         };
191                         partition@26c000 {
192                                 label = "ubi";
193                                 reg = <0x26c000 0x1d94000>;
194                         };
195                 };
196         };
197 };
198
199 &pci0 {
200         status = "okay";
201         gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
202
203         ath9k@7000 {
204                 reg = <0x7000 0 0 0 0>;
205                 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
206         };
207 };
208
209 &usb_phy0 {
210         status = "okay";
211 };
212
213 &usb0 {
214         status = "okay";
215         vbus-supply = <&usb_vbus>;
216 };