d1c265471256ffe2643bcc8a420d1428b390f9eb
[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 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 label-mac-device = &eth0;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 wlan {
24 label = "green:wlan";
25 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
26 linux,default-trigger = "phy0tpt";
27 };
28
29 led_power: power {
30 label = "green:power";
31 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
32 default-state = "on";
33 };
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 linux,code = <KEY_RESTART>;
42 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
43 debounce-interval = <60>;
44 };
45 };
46
47 gpio-export {
48 compatible = "gpio-export";
49
50 gpio_lan_reset {
51 gpio-export,name = "lan:reset";
52 gpio-export,output = <0>;
53 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
54 };
55 };
56 };
57
58 &eth0 {
59 status = "okay";
60
61 mtd-mac-address = <&art 0x0>;
62
63 gmac-config {
64 device = <&gmac>;
65 switch-phy-addr-swap = <0>;
66 switch-phy-swap = <0>;
67 };
68 };
69
70 &eth1 {
71 status = "okay";
72
73 compatible = "syscon", "simple-mfd";
74 };
75
76 &spi {
77 status = "okay";
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 spi-max-frequency = <33000000>;
82 reg = <0>;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x000000 0x040000>;
92 read-only;
93 };
94
95 partition@40000 {
96 label = "u-boot-env";
97 reg = <0x040000 0x010000>;
98 };
99
100 partition@50000 {
101 compatible = "denx,uimage";
102 label = "firmware";
103 reg = <0x050000 0xfa0000>;
104 };
105
106 art: partition@ff0000 {
107 label = "art";
108 reg = <0xff0000 0x010000>;
109 read-only;
110 };
111 };
112 };
113 };
114
115 &wmac {
116 status = "okay";
117
118 mtd-cal-data = <&art 0x1000>;
119 };