ath79: GL-AR750S: provide NAND support; increase kernel to 4 MB
[oweals/openwrt.git] / target / linux / ath79 / dts / qca9563_glinet_gl-ar750s.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 #include "qca956x.dtsi"
9
10 / {
11         compatible = "glinet,gl-ar750s", "qca,qca9563";
12         model = "GL.iNet GL-AR750S";
13
14         chosen {
15                 bootargs = "console=ttyS0,115200n8";
16         };
17
18         aliases {
19                 led-boot = &led_power;
20                 led-failsafe = &led_power;
21                 led-running = &led_power;
22                 led-upgrade = &led_power;
23                 label-mac-device = &eth0;
24         };
25
26         keys {
27                 compatible = "gpio-keys";
28
29                 pinctrl-names = "default";
30                 pinctrl-0 = <&jtag_disable_pins>;
31
32                 reset {
33                         label = "reset";
34                         linux,code = <KEY_RESTART>;
35                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
36                 };
37
38                 mode {
39                         label = "mode";
40                         linux,code = <BTN_0>;
41                         linux,input-type = <EV_SW>;
42                         gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
43                 };
44         };
45
46         leds {
47                 compatible = "gpio-leds";
48
49                 led_power: power {
50                         label = "gl-ar750s:green:power";
51                         gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
52                         default-state = "keep";
53                 };
54
55                 led_wlan2g: wlan2g {
56                         label = "gl-ar750s:green:wlan2g";
57                         gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
58                         linux,default-trigger = "phy1tpt";
59                 };
60
61                 led_wlan5g: wlan5g {
62                         label = "gl-ar750s:green:wlan5g";
63                         gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
64                         linux,default-trigger = "phy0tpt";
65                 };
66         };
67
68         i2c: i2c {
69                 compatible = "i2c-gpio";
70
71                 sda-gpios = <&gpio  5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
72                 scl-gpios = <&gpio 21 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
73         };
74 };
75
76 &spi {
77         status = "okay";
78
79         num-cs = <2>;
80         cs-gpios = <0>, <0>;
81
82         flash_nor: flash@0 {
83                 compatible = "jedec,spi-nor";
84                 reg = <0>;
85                 spi-max-frequency = <25000000>;
86
87                 nor_partitions: 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                         art: partition@50000 {
104                                 label = "art";
105                                 reg = <0x050000 0x010000>;
106                                 read-only;
107                         };
108
109                         nor_firmware: partition@60000 {
110                                 label = "nor_firmware";
111                                 reg = <0x060000 0xfa0000>;
112                         };
113
114                         nor_kernel: partition_alt@60000 {
115                                 label = "nor_kernel";
116                                 reg = <0x060000 0x400000>;
117                         };
118
119                         nor_reserved: parition_alt@460000 {
120                                 label = "nor_reserved";
121                                 reg = <0x460000 0xba0000>;
122                         };
123                 };
124         };
125
126         flash_nand: flash@1 {
127                 compatible = "spi-nand";
128                 reg = <1>;
129                 spi-max-frequency = <25000000>;
130
131                 nand_partitions: partitions {
132                         compatible = "fixed-partitions";
133                         #address-cells = <1>;
134                         #size-cells = <1>;
135
136                         nand_ubi: partition@0 {
137                                 label = "nand_ubi";
138                                 reg = <0x000000 0x8000000>;
139                         };
140                 };
141         };
142 };
143
144 &eth0 {
145         status = "okay";
146
147         phy-handle = <&phy0>;
148         mtd-mac-address = <&art 0x0>;
149 };
150
151 &gpio {
152         usb_vbus {
153                 gpio-hog;
154                 gpios = <7 GPIO_ACTIVE_HIGH>;
155                 output-high;
156                 line-name = "usb-vbus";
157         };
158 };
159
160 &mdio0 {
161         status = "okay";
162
163         phy-mask = <0>;
164
165         phy0: ethernet-phy@0 {
166                 reg = <0>;
167                 phy-mode = "sgmii";
168                 qca,ar8327-initvals = <
169                         0x04 0x00080080 /* PORT0 PAD MODE CTRL */
170                         0x7c 0x0000007e /* PORT0_STATUS */
171                 >;
172         };
173 };
174
175 &pcie {
176         status = "okay";
177 };
178
179 &uart {
180         status = "okay";
181 };
182
183 &usb0 {
184         status = "okay";
185 };
186
187 &usb1 {
188         status = "okay";
189 };
190
191 &usb_phy0 {
192         status = "okay";
193 };
194
195 &usb_phy1 {
196         status = "okay";
197 };
198
199 &wmac {
200         status = "okay";
201
202         mtd-cal-data = <&art 0x1000>;
203 };