ath79: add USB power control for GL-AR300M series
[openwrt/staging/mkresin.git] / target / linux / ath79 / dts / qca9531_glinet_gl-ar300m.dtsi
1 #include "qca953x.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 aliases {
8 led-boot = &led_status;
9 led-failsafe = &led_status;
10 led-running = &led_status;
11 led-upgrade = &led_status;
12 label-mac-device = &eth0;
13 };
14
15 keys {
16 compatible = "gpio-keys";
17
18 pinctrl-names = "default";
19 pinctrl-0 = <&jtag_disable_pins>;
20
21 reset {
22 label = "reset";
23 linux,code = <KEY_RESTART>;
24 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
25 };
26
27 right {
28 label = "button right";
29 linux,code = <BTN_0>;
30 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
31 };
32
33 left {
34 label = "button left";
35 linux,code = <BTN_1>;
36 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
37 };
38 };
39
40 reg_usb_vbus: reg_usb_vbus {
41 compatible = "regulator-fixed";
42
43 regulator-name = "usb_vbus";
44 regulator-min-microvolt = <5000000>;
45 regulator-max-microvolt = <5000000>;
46 gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
47 enable-active-high;
48 };
49
50 leds {
51 compatible = "gpio-leds";
52
53 // Colors for non-Lite versions
54
55 led_status: status {
56 label = "green:status";
57 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
58 };
59
60 lan {
61 label = "green:lan";
62 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
63 };
64
65 led_wlan: wlan {
66 label = "red:wlan";
67 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
68 linux,default-trigger = "phy0tpt";
69 };
70 };
71
72 i2c: i2c {
73 compatible = "i2c-gpio";
74
75 sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
76 scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
77 };
78 };
79
80 &pcie0 {
81 status = "okay";
82 };
83
84 &spi {
85 status = "okay";
86
87 flash@0 {
88 compatible = "jedec,spi-nor";
89 reg = <0>;
90 spi-max-frequency = <25000000>;
91
92 partitions {
93 compatible = "fixed-partitions";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 partition@0 {
98 label = "u-boot";
99 reg = <0x000000 0x040000>;
100 read-only;
101 };
102
103 partition@40000 {
104 label = "u-boot-env";
105 reg = <0x040000 0x010000>;
106 };
107
108 nor_firmware: partition@50000 {
109 label = "nor_firmware";
110 reg = <0x050000 0xfa0000>;
111 };
112
113 art: partition@ff0000 {
114 label = "art";
115 reg = <0xff0000 0x010000>;
116 read-only;
117 };
118 };
119 };
120
121 nand_flash: flash@1 {
122 compatible = "spi-nand";
123 reg = <1>;
124 spi-max-frequency = <25000000>;
125
126 partitions {
127 compatible = "fixed-partitions";
128 #address-cells = <1>;
129 #size-cells = <1>;
130
131 nand_kernel: partition@0 {
132 label = "nand_kernel";
133 reg = <0x000000 0x400000>;
134 };
135
136 nand_ubi: partition@400000 {
137 label = "nand_ubi";
138 reg = <0x400000 0x7c00000>;
139 };
140 };
141 };
142 };
143
144 &usb0 {
145 #address-cells = <1>;
146 #size-cells = <0>;
147 vbus-supply = <&reg_usb_vbus>;
148 status = "okay";
149 };
150
151 &usb_phy {
152 status = "okay";
153 };
154
155 &eth0 {
156 status = "okay";
157
158 phy-handle = <&swphy4>;
159
160 nvmem-cells = <&macaddr_art_0>;
161 nvmem-cell-names = "mac-address";
162 };
163
164 &eth1 {
165 nvmem-cells = <&macaddr_art_0>;
166 nvmem-cell-names = "mac-address";
167 mac-address-increment = <1>;
168 };
169
170 &wmac {
171 status = "okay";
172 mtd-cal-data = <&art 0x1000>;
173 };
174
175 &art {
176 compatible = "nvmem-cells";
177 #address-cells = <1>;
178 #size-cells = <1>;
179
180 macaddr_art_0: macaddr@0 {
181 reg = <0x0 0x6>;
182 };
183 };