ath79: use the new DT fixed partitions syntax
[openwrt/staging/lynxis.git] / target / linux / ath79 / dts / ar9330_gl_ar150.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "ar9330.dtsi"
8
9 / {
10 model = "GL.iNet GL-AR150";
11 compatible = "glinet,ar150";
12
13 aliases {
14 serial0 = &uart;
15 };
16
17 memory@0 {
18 device_type = "memory";
19 reg = <0x0 0x4000000>;
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 wlan {
26 label = "gl-ar150:orange:wlan";
27 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
28 default-state = "off";
29 };
30
31 lan {
32 label = "gl-ar150:green:lan";
33 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
34 default-state = "off";
35 };
36
37 wan {
38 label = "gl-ar150:green:wan";
39 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
40 default-state = "off";
41 };
42 };
43
44 keys {
45 compatible = "gpio-keys-polled";
46 #address-cells = <1>;
47 #size-cells = <0>;
48 poll-interval = <100>;
49
50 manual {
51 label = "manual";
52 linux,code = <BTN_7>;
53 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
54 };
55
56 auto {
57 label = "auto";
58 linux,code = <BTN_8>;
59 gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
60 };
61
62 reset {
63 label = "reset";
64 linux,code = <KEY_RESTART>;
65 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
66 };
67 };
68 };
69
70 &uart {
71 status = "okay";
72 };
73
74 &gpio {
75 status = "okay";
76 };
77
78 &usb {
79 dr_mode = "host";
80 status = "okay";
81 };
82
83 &usb_phy {
84 status = "okay";
85 gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
86 };
87
88 &spi {
89 num-chipselects = <1>;
90 status = "okay";
91
92 spiflash {
93 #address-cells = <1>;
94 #size-cells = <1>;
95 compatible = "jedec,spi-nor";
96 spi-max-frequency = <104000000>;
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 = <0x000000 0x040000>;
107 read-only;
108 };
109
110 partition@1 {
111 label = "u-boot-env";
112 reg = <0x040000 0x010000>;
113 };
114
115 partition@2 {
116 label = "firmware";
117 reg = <0x050000 0xfa0000>;
118 };
119
120 art: partition@3 {
121 label = "ART";
122 reg = <0xff0000 0x010000>;
123 read-only;
124 };
125 };
126 };
127 };
128
129 &mdio0 {
130 status = "okay";
131
132 phy4: ethernet-phy@4 {
133 reg = <4>;
134 phy-mode = "mii";
135 };
136 };
137
138 &eth0 {
139 status = "okay";
140
141 mtd-mac-address = <&art 0x0>;
142
143 phy-handle = <&phy4>;
144 };
145
146 &eth1 {
147 status = "okay";
148
149 mtd-mac-address = <&art 0x0>;
150
151 fixed-link {
152 speed = <1000>;
153 full-duplex;
154 };
155
156 gmac-config {
157 device = <&gmac>;
158
159 switch-phy-addr-swap = <0>;
160 switch-phy-swap = <0>;
161 };
162 };