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