ath79: add support for D-Link DCH-G020 Rev. A1
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / qca9531_dlink_dch-g020-a1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca953x.dtsi"
8
9 / {
10 compatible = "dlink,dch-g020-a1", "qca,qca9531";
11 model = "D-Link DCH-G020 A1";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 i2c {
21 compatible = "i2c-gpio";
22 #address-cells = <1>;
23 #size-cells = <1>;
24
25 sda-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
26 scl-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
27
28 gpio_ext: gpio_ext@38 {
29 compatible = "nxp,pca9554";
30 reg = <0x38 0x1>;
31
32 gpio-controller;
33 #gpio-cells = <2>;
34 };
35
36 rtc@30 {
37 compatible = "pericom,pt7c43390";
38 reg = <0x30 0x8>;
39 };
40 };
41
42 gpio-export {
43 compatible = "gpio-export";
44
45 usb_power {
46 label = "d-link:power:usb";
47 gpio-export,name = "d-link:power:usb";
48 gpio-export,output = <0>;
49 gpios = <&gpio_ext 3 GPIO_ACTIVE_LOW>;
50 };
51
52 zwave_power {
53 label = "d-link:power:zwave";
54 gpio-export,name = "d-link:power:zwave";
55 gpio-export,output = <0>;
56 gpios = <&gpio_ext 1 GPIO_ACTIVE_LOW>;
57 };
58 };
59
60 keys {
61 compatible = "gpio-keys";
62
63 wps {
64 label = "wps";
65 linux,code = <KEY_WPS_BUTTON>;
66 gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
67 };
68
69 reset {
70 label = "reset";
71 linux,code = <KEY_RESTART>;
72 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
73 };
74 };
75
76 leds {
77 compatible = "gpio-leds";
78
79 led_power: power {
80 label = "d-link:green:power";
81 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
82 };
83
84 status {
85 label = "d-link:red:status";
86 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
87 };
88 };
89 };
90
91 &spi {
92 status = "okay";
93
94 num-cs = <1>;
95
96 flash@0 {
97 compatible = "jedec,spi-nor";
98 reg = <0>;
99 spi-max-frequency = <50000000>;
100
101 partitions {
102 compatible = "fixed-partitions";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 partition@0 {
107 label = "u-boot";
108 reg = <0x0 0x10000>;
109 read-only;
110 };
111
112 art: partition@10000 {
113 label = "art";
114 reg = <0x10000 0x10000>;
115 read-only;
116 };
117
118 partition@20000 {
119 label = "mp";
120 reg = <0x20000 0x10000>;
121 read-only;
122 };
123
124 partition@30000 {
125 label = "config";
126 reg = <0x30000 0x10000>;
127 read-only;
128 };
129
130 partition@40000 {
131 label = "bootarg";
132 reg = <0x40000 0x10000>;
133 read-only;
134 };
135
136 partition@50000 {
137 label = "firmware";
138 reg = <0x50000 0xe70000>;
139 compatible = "denx,uimage";
140 };
141
142 partition@ec0000 {
143 label = "dlink";
144 reg = <0xec0000 0x140000>;
145 read-only;
146 };
147 };
148 };
149 };
150
151 &uart {
152 status = "okay";
153 };
154
155 &usb0 {
156 status = "okay";
157 };
158
159 &usb_phy {
160 status = "okay";
161 };
162
163 &eth0 {
164 status = "okay";
165 };
166
167 &wmac {
168 status = "okay";
169
170 mtd-cal-data = <&art 0x1000>;
171 };