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