8d5bbe180c338cac661800a983083f640d766db7
[librecmc/librecmc.git] / target / linux / ath79 / dts / qca9563_elecom_wrc-ghbk2-i.dtsi
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         chosen {
11                 bootargs = "console=ttyS0,115200n8";
12         };
13
14         aliases {
15                 led-boot = &power;
16                 led-failsafe = &power;
17                 led-running = &power;
18                 led-upgrade = &power;
19         };
20
21         leds: leds {
22                 compatible = "gpio-leds";
23
24                 wps {
25                         label = "elecom:red:wps";
26                         gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
27                 };
28         };
29
30         keys {
31                 compatible = "gpio-keys";
32
33                 reset {
34                         label = "reset";
35                         gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
36                         linux,code = <KEY_RESTART>;
37                         debounce-interval = <60>;
38                 };
39
40                 button_wps {
41                         label = "wps";
42                         gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
43                         linux,code = <KEY_WPS_BUTTON>;
44                         debounce-interval = <60>;
45                 };
46
47                 ap {
48                         label = "ap";
49                         gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
50                         linux,code = <BTN_0>;
51                         linux,input-type = <EV_SW>;
52                         debounce-interval = <60>;
53                 };
54         };
55 };
56
57 &spi {
58         status = "okay";
59         num-cs = <1>;
60
61         flash@0 {
62                 compatible = "jedec,spi-nor";
63                 reg = <0>;
64                 spi-max-frequency = <25000000>;
65
66                 partitions: partitions {
67                         compatible = "fixed-partitions";
68                         #address-cells = <1>;
69                         #size-cells = <1>;
70
71                         partition@0 {
72                                 label = "u-boot";
73                                 reg = <0x000000 0x040000>;
74                                 read-only;
75                         };
76
77                         partition@40000 {
78                                 label = "u-boot-env";
79                                 reg = <0x040000 0x010000>;
80                                 read-only;
81                         };
82
83                         partition@50000 {
84                                 label = "nvram";
85                                 reg = <0x050000 0x020000>;
86                                 read-only;
87                         };
88                 };
89         };
90 };
91
92 &mdio0 {
93         status = "okay";
94
95         phy0: ethernet-phy@0 {
96                 reg = <0>;
97
98                 qca,ar8327-initvals = <
99                         0x04 0x00000080 /* PORT0 PAD MODE CTRL */
100                         0x50 0xcf37cf37 /* LED_CTRL0 */
101                         0x54 0x00000000 /* LED_CTRL1 */
102                         0x58 0x00000000 /* LED_CTRL2 */
103                         0x5c 0x03ffff00 /* LED_CTRL3 */
104                         0x7c 0x0000007e /* PORT0_STATUS */
105                 >;
106         };
107 };
108
109 &eth0 {
110         status = "okay";
111
112         pll-data = <0x03000101 0x00000101 0x00001919>;
113
114         mtd-mac-address = <&ART 0x1002>;
115         mtd-mac-address-increment = <(-1)>;
116         phy-mode = "sgmii";
117         phy-handle = <&phy0>;
118 };
119
120 &uart {
121         status = "okay";
122 };
123
124 &wmac {
125         status = "okay";
126         mtd-cal-data = <&ART 0x1000>;
127 };