ath79: move dts-v1 statement to ath79.dtsi
[openwrt/openwrt.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 leds {
41 compatible = "gpio-leds";
42
43 // Colors for non-Lite versions
44
45 led_status: status {
46 label = "gl-ar300m:green:status";
47 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
48 };
49
50 led_lan: lan {
51 label = "gl-ar300m:green:lan";
52 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
53 };
54
55 led_wlan: wlan {
56 label = "gl-ar300m:red:wlan";
57 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
58 linux,default-trigger = "phy0tpt";
59 };
60 };
61
62 i2c: i2c {
63 compatible = "i2c-gpio";
64
65 sda-gpios = <&gpio 17 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
66 scl-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
67 };
68 };
69
70 &pcie0 {
71 status = "okay";
72 };
73
74 &spi {
75 status = "okay";
76
77 num-cs = <2>;
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <25000000>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x000000 0x040000>;
92 read-only;
93 };
94
95 partition@40000 {
96 label = "u-boot-env";
97 reg = <0x040000 0x010000>;
98 };
99
100 nor_firmware: partition@50000 {
101 label = "nor_firmware";
102 reg = <0x050000 0xfa0000>;
103 };
104
105 art: partition@ff0000 {
106 label = "art";
107 reg = <0xff0000 0x010000>;
108 read-only;
109 };
110 };
111 };
112
113 nand_flash: flash@1 {
114 compatible = "spi-nand";
115 reg = <1>;
116 spi-max-frequency = <25000000>;
117
118 partitions {
119 compatible = "fixed-partitions";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 nand_kernel: partition@0 {
124 label = "nand_kernel";
125 reg = <0x000000 0x400000>;
126 };
127
128 nand_ubi: partition@400000 {
129 label = "nand_ubi";
130 reg = <0x400000 0x7c00000>;
131 };
132 };
133 };
134 };
135
136 &uart {
137 status = "okay";
138 };
139
140 &usb0 {
141 #address-cells = <1>;
142 #size-cells = <0>;
143 status = "okay";
144 };
145
146 &usb_phy {
147 status = "okay";
148 };
149
150 &eth0 {
151 status = "okay";
152
153 phy-handle = <&swphy4>;
154
155 mtd-mac-address = <&art 0x0>;
156 };
157
158 &eth1 {
159 mtd-mac-address = <&art 0x0>;
160 mtd-mac-address-increment = <1>;
161 };
162
163 &wmac {
164 status = "okay";
165 mtd-cal-data = <&art 0x1000>;
166 };