ath79: add support for GL.iNet GL-USB150
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9331_glinet_gl-usb150.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9331.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "glinet,gl-usb150", "qca,ar9331";
10 model = "GL.iNet GL-USB150";
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 = "green:wlan";
26 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
27 linux,default-trigger = "phy0tpt";
28 };
29
30 led_power: power {
31 label = "green:power";
32 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
33 default-state = "on";
34 };
35 };
36
37 keys {
38 compatible = "gpio-keys";
39
40 reset {
41 label = "reset";
42 linux,code = <KEY_RESTART>;
43 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
44 debounce-interval = <60>;
45 };
46 };
47
48 gpio-export {
49 compatible = "gpio-export";
50
51 gpio_lan_reset {
52 gpio-export,name = "lan:reset";
53 gpio-export,output = <0>;
54 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
55 };
56 };
57 };
58
59 &eth0 {
60 status = "okay";
61
62 mtd-mac-address = <&art 0x0>;
63
64 gmac-config {
65 device = <&gmac>;
66 switch-phy-addr-swap = <0>;
67 switch-phy-swap = <0>;
68 };
69 };
70
71 &eth1 {
72 status = "okay";
73
74 compatible = "syscon", "simple-mfd";
75 };
76
77 &spi {
78 status = "okay";
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 spi-max-frequency = <33000000>;
83 reg = <0>;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x000000 0x040000>;
93 read-only;
94 };
95
96 partition@40000 {
97 label = "u-boot-env";
98 reg = <0x040000 0x010000>;
99 };
100
101 partition@50000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x050000 0xfa0000>;
105 };
106
107 art: partition@ff0000 {
108 label = "art";
109 reg = <0xff0000 0x010000>;
110 read-only;
111 };
112 };
113 };
114 };
115
116 &wmac {
117 status = "okay";
118
119 mtd-cal-data = <&art 0x1000>;
120 };