ath79: fix nanobeam ac ethernet interface
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9330_glinet_gl-ar150.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 = "GL.iNet GL-AR150";
10 compatible = "glinet,gl-ar150", "qca,ar9330";
11
12 aliases {
13 serial0 = &uart;
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 label-mac-device = &eth0;
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 wlan {
25 label = "orange:wlan";
26 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
27 linux,default-trigger = "phy0tpt";
28 };
29
30 configurable {
31 label = "green:configurable";
32 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
33 };
34
35 led_power: power {
36 label = "green:power";
37 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
38 default-state = "on";
39 };
40 };
41
42 keys {
43 compatible = "gpio-keys";
44
45 manual {
46 label = "manual";
47 linux,code = <BTN_7>;
48 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
49 };
50
51 auto {
52 label = "auto";
53 linux,code = <BTN_8>;
54 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
55 };
56
57 reset {
58 label = "reset";
59 linux,code = <KEY_RESTART>;
60 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
61 };
62 };
63 };
64
65 &uart {
66 status = "okay";
67 };
68
69 &usb {
70 dr_mode = "host";
71 status = "okay";
72 };
73
74 &usb_phy {
75 status = "okay";
76 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
77 };
78
79 &spi {
80 status = "okay";
81
82 num-chipselects = <1>;
83
84 flash@0 {
85 compatible = "jedec,spi-nor";
86 spi-max-frequency = <50000000>;
87 reg = <0>;
88
89 partitions {
90 compatible = "fixed-partitions";
91 #address-cells = <1>;
92 #size-cells = <1>;
93
94 partition@0 {
95 label = "u-boot";
96 reg = <0x000000 0x040000>;
97 read-only;
98 };
99
100 partition@1 {
101 label = "u-boot-env";
102 reg = <0x040000 0x010000>;
103 };
104
105 partition@2 {
106 compatible = "denx,uimage";
107 label = "firmware";
108 reg = <0x050000 0xfa0000>;
109 };
110
111 art: partition@3 {
112 label = "art";
113 reg = <0xff0000 0x010000>;
114 read-only;
115 };
116 };
117 };
118 };
119
120 &eth0 {
121 status = "okay";
122
123 mtd-mac-address = <&art 0x0>;
124 };
125
126 &eth1 {
127 status = "okay";
128
129 mtd-mac-address = <&art 0x0>;
130
131 gmac-config {
132 device = <&gmac>;
133
134 switch-phy-addr-swap = <0>;
135 switch-phy-swap = <0>;
136 };
137 };
138
139 &wmac {
140 status = "okay";
141
142 mtd-cal-data = <&art 0x1000>;
143 mtd-mac-address = <&art 0x0>;
144 };