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