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