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