bb1f350150e68fe94c0531dd0e1704c78c708bd2
[openwrt/staging/chunkeey.git] / target / linux / ath79 / dts / qca9563_elecom_wrc-300ghbk2-i.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 "qca956x.dtsi"
8
9 / {
10 model = "ELECOM WRC-300GHBK2-I";
11 compatible = "elecom,wrc-300ghbk2-i", "qca,qca9563";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 aliases {
18 led-boot = &power;
19 led-failsafe = &power;
20 led-running = &power;
21 led-upgrade = &power;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 power: power {
28 label = "wrc-300ghbk2-i:white:power";
29 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
30 default-state = "on";
31 };
32
33 wlan2g {
34 label = "wrc-300ghbk2-i:white:wlan2g";
35 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
36 linux,default-trigger = "phy0tpt";
37 };
38
39 wps {
40 label = "wrc-300ghbk2-i:red:wps";
41 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys";
47
48 reset {
49 label = "reset";
50 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
51 linux,code = <KEY_RESTART>;
52 debounce-interval = <60>;
53 };
54
55 button_wps {
56 label = "wps";
57 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
58 linux,code = <KEY_WPS_BUTTON>;
59 debounce-interval = <60>;
60 };
61
62 ap {
63 label = "ap";
64 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
65 linux,code = <BTN_0>;
66 linux,input-type = <EV_SW>;
67 debounce-interval = <60>;
68 };
69 };
70 };
71
72 &spi {
73 status = "okay";
74 num-cs = <1>;
75
76 flash@0 {
77 compatible = "jedec,spi-nor";
78 reg = <0>;
79 spi-max-frequency = <25000000>;
80
81 partitions {
82 compatible = "fixed-partitions";
83 #address-cells = <1>;
84 #size-cells = <1>;
85
86 partition@0 {
87 label = "u-boot";
88 reg = <0x000000 0x040000>;
89 read-only;
90 };
91
92 partition@40000 {
93 label = "u-boot-env";
94 reg = <0x040000 0x010000>;
95 read-only;
96 };
97
98 partition@50000 {
99 label = "nvram";
100 reg = <0x050000 0x020000>;
101 read-only;
102 };
103
104 partition@70000 {
105 compatible = "denx,uimage";
106 label = "firmware";
107 reg = <0x070000 0x770000>;
108 };
109
110 partition@7e0000 {
111 label = "hwconfig";
112 reg = <0x7e0000 0x010000>;
113 read-only;
114 };
115
116 ART: partition@7f0000 {
117 label = "ART";
118 reg = <0x7f0000 0x010000>;
119 read-only;
120 };
121 };
122 };
123 };
124
125 &mdio0 {
126 status = "okay";
127
128 phy0: ethernet-phy@0 {
129 reg = <0>;
130 phy-mode = "sgmii";
131
132 qca,ar8327-initvals = <
133 0x04 0x00000080 /* PORT0 PAD MODE CTRL */
134 0x50 0xcf37cf37 /* LED_CTRL0 */
135 0x54 0x00000000 /* LED_CTRL1 */
136 0x58 0x00000000 /* LED_CTRL2 */
137 0x5c 0x03ffff00 /* LED_CTRL3 */
138 0x7c 0x0000007e /* PORT0_STATUS */
139 >;
140 };
141 };
142
143 &eth0 {
144 status = "okay";
145
146 mtd-mac-address = <&ART 0x1002>;
147 mtd-mac-address-increment = <(-1)>;
148 phy-mode = "sgmii";
149 phy-handle = <&phy0>;
150 };
151
152 &uart {
153 status = "okay";
154 };
155
156 &wmac {
157 status = "okay";
158 mtd-cal-data = <&ART 0x1000>;
159 };