ath79: fix nanobeam ac ethernet interface
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9563_dlink_dir-842-c.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 keys {
17 compatible = "gpio-keys";
18
19 wps {
20 linux,code = <KEY_WPS_BUTTON>;
21 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
22 debounce-interval = <60>;
23 };
24
25 reset {
26 linux,code = <KEY_RESTART>;
27 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
28 debounce-interval = <60>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 led_power: power {
36 label = "green:power";
37 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
38 };
39
40 wps {
41 label = "green:wps";
42 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
43 };
44
45 wlan {
46 label = "green:wlan";
47 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
48 linux,default-trigger = "phy0tpt";
49 };
50 };
51 };
52
53 &uart {
54 status = "okay";
55 };
56
57 &pcie {
58 status = "okay";
59 };
60
61 &spi {
62 status = "okay";
63
64 num-cs = <1>;
65
66 flash@0 {
67 compatible = "jedec,spi-nor";
68 reg = <0>;
69 spi-max-frequency = <50000000>;
70
71 partitions {
72 compatible = "fixed-partitions";
73 #address-cells = <1>;
74 #size-cells = <1>;
75
76 partition@0 {
77 label = "u-boot";
78 reg = <0x000000 0x40000>;
79 read-only;
80 };
81
82 partition@40000 {
83 label = "u-boot-env";
84 reg = <0x040000 0x10000>;
85 read-only;
86 };
87
88 partition@50000 {
89 label = "devdata";
90 reg = <0x050000 0x10000>;
91 read-only;
92 };
93
94 partition@60000 {
95 label = "devconf";
96 reg = <0x060000 0x10000>;
97 read-only;
98 };
99
100 partition@70000 {
101 label = "misc";
102 reg = <0x070000 0x10000>;
103 read-only;
104 };
105
106 partition@80000 {
107 compatible = "seama";
108 label = "firmware";
109 reg = <0x080000 0xf50000>;
110 };
111
112 art: partition@fd0000 {
113 label = "art";
114 reg = <0xfd0000 0x010000>;
115 read-only;
116 };
117
118 partition@fe0000 {
119 label = "reserved";
120 reg = <0xfe0000 0x20000>;
121 read-only;
122 };
123 };
124 };
125 };
126
127 &mdio0 {
128 status = "okay";
129
130 phy-mask = <0>;
131
132 phy0: ethernet-phy@0 {
133 reg = <0>;
134 qca,mib-poll-interval = <500>;
135 reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
136
137 qca,ar8327-initvals = <
138 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
139 0x10 0x81000080 /* POWER_ON_STRAP */
140 0x50 0xcc35cc35 /* LED_CTRL0 */
141 0x54 0xcb37cb37 /* LED_CTRL1 */
142 0x58 0x00000000 /* LED_CTRL2 */
143 0x5c 0x00f3cf00 /* LED_CTRL3 */
144 0x7c 0x0000007e /* PORT0_STATUS */
145 >;
146 };
147 };
148
149 &eth0 {
150 status = "okay";
151
152 pll-data = <0x03000101 0x00000101 0x00001919>;
153
154 phy-mode = "sgmii";
155 phy-handle = <&phy0>;
156 };
157
158 &wmac {
159 status = "okay";
160
161 qca,no-eeprom;
162 };