ath79: fix nanobeam ac ethernet interface
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9330_dlink_dir-505.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9330.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "D-Link DIR-505";
10 compatible = "dlink,dir-505", "qca,ar9330";
11
12 aliases {
13 serial0 = &uart;
14 led-boot = &led_power_green;
15 led-failsafe = &led_status_red;
16 led-running = &led_power_green;
17 led-upgrade = &led_status_red;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 wps {
24 label = "WPS button";
25 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 reset {
30 label = "Reset button";
31 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38 pinctrl-names = "default";
39 pinctrl-0 = <&jtag_disable_pins>;
40
41 led_power_green: power {
42 label = "green:power";
43 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
44 };
45
46 led_status_red: status {
47 label = "red:status";
48 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
49 };
50 };
51 };
52
53 &uart {
54 status = "okay";
55 };
56
57 &gpio {
58 led_enable {
59 gpio-hog;
60 output-low;
61 gpios = <1 GPIO_ACTIVE_LOW>;
62 line-name = "d-link:power:led";
63 };
64 };
65
66 &usb {
67 dr_mode = "host";
68 status = "okay";
69 };
70
71 &usb_phy {
72 status = "okay";
73 };
74
75 &eth0 {
76 status = "okay";
77
78 gmac-config {
79 device = <&gmac>;
80 switch-phy-addr-swap = <0>;
81 switch-phy-swap = <0>;
82 };
83 };
84
85 &eth1 {
86 compatible = "syscon", "simple-mfd";
87 status = "okay";
88 };
89
90 &spi {
91 num-chipselects = <1>;
92 status = "okay";
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 spi-max-frequency = <50000000>;
97 reg = <0>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "u-boot";
106 reg = <0x0 0x10000>;
107 read-only;
108 };
109
110 art: partition@10000 {
111 label = "art";
112 reg = <0x10000 0x10000>;
113 read-only;
114 };
115
116 mac: partition@20000 {
117 label = "mac";
118 reg = <0x20000 0x10000>;
119 read-only;
120 };
121
122 partition@30000 {
123 label = "nvram";
124 reg = <0x30000 0x10000>;
125 read-only;
126 };
127
128 partition@40000 {
129 label = "language";
130 reg = <0x40000 0x40000>;
131 read-only;
132 };
133
134 partition@80000 {
135 compatible = "denx,uimage";
136 label = "firmware";
137 reg = <0x80000 0x780000>;
138 };
139 };
140 };
141 };
142
143 &wmac {
144 status = "okay";
145 qca,no-eeprom;
146 };