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