6422dc60f54d8ce61d89f4ef12ef7226940ef3bc
[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 = "green:status";
47 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
48 };
49
50 lan {
51 label = "green:lan";
52 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
53 };
54
55 led_wlan: wlan {
56 label = "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 flash@0 {
78 compatible = "jedec,spi-nor";
79 reg = <0>;
80 spi-max-frequency = <25000000>;
81
82 partitions {
83 compatible = "fixed-partitions";
84 #address-cells = <1>;
85 #size-cells = <1>;
86
87 partition@0 {
88 label = "u-boot";
89 reg = <0x000000 0x040000>;
90 read-only;
91 };
92
93 partition@40000 {
94 label = "u-boot-env";
95 reg = <0x040000 0x010000>;
96 };
97
98 nor_firmware: partition@50000 {
99 label = "nor_firmware";
100 reg = <0x050000 0xfa0000>;
101 };
102
103 art: partition@ff0000 {
104 label = "art";
105 reg = <0xff0000 0x010000>;
106 read-only;
107 };
108 };
109 };
110
111 nand_flash: flash@1 {
112 compatible = "spi-nand";
113 reg = <1>;
114 spi-max-frequency = <25000000>;
115
116 partitions {
117 compatible = "fixed-partitions";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 nand_kernel: partition@0 {
122 label = "nand_kernel";
123 reg = <0x000000 0x400000>;
124 };
125
126 nand_ubi: partition@400000 {
127 label = "nand_ubi";
128 reg = <0x400000 0x7c00000>;
129 };
130 };
131 };
132 };
133
134 &uart {
135 status = "okay";
136 };
137
138 &usb0 {
139 #address-cells = <1>;
140 #size-cells = <0>;
141 status = "okay";
142 };
143
144 &usb_phy {
145 status = "okay";
146 };
147
148 &eth0 {
149 status = "okay";
150
151 phy-handle = <&swphy4>;
152
153 mtd-mac-address = <&art 0x0>;
154 };
155
156 &eth1 {
157 mtd-mac-address = <&art 0x0>;
158 mtd-mac-address-increment = <1>;
159 };
160
161 &wmac {
162 status = "okay";
163 mtd-cal-data = <&art 0x1000>;
164 };