ath79: ar: convert to mac-base
[openwrt/staging/hauke.git] / target / linux / ath79 / dts / ar9344_samsung_wam250.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9344.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 model = "Samsung WAM250";
10 compatible = "samsung,wam250", "qca,ar9344";
11
12 aliases {
13 led-boot = &led_power;
14 led-failsafe = &led_power;
15 led-running = &led_power;
16 led-upgrade = &led_power;
17 };
18
19 keys {
20 compatible = "gpio-keys";
21
22 reset {
23 label = "reset";
24 linux,code = <KEY_RESTART>;
25 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
26 debounce-interval = <60>;
27 };
28
29 wps {
30 label = "wps";
31 linux,code = <KEY_WPS_BUTTON>;
32 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
33 debounce-interval = <60>;
34 };
35 };
36
37 leds {
38 compatible = "gpio-leds";
39
40 lan {
41 label = "white:lan";
42 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
43 };
44
45 led_power: power {
46 label = "white:power";
47 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
48 default-state = "keep";
49 };
50
51 repeater {
52 label = "white:repeater";
53 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
54 };
55
56 wlan {
57 label = "white:wlan";
58 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
59 linux,default-trigger = "phy0tpt";
60 };
61 };
62 };
63
64 &eth0 {
65 status = "okay";
66
67 phy-handle = <&swphy0>;
68
69 nvmem-cells = <&macaddr_art_1002 1>;
70 nvmem-cell-names = "mac-address";
71
72 gmac-config {
73 device = <&gmac>;
74 switch-phy-swap = <1>;
75 };
76 };
77
78 &eth1 {
79 status = "okay";
80
81 nvmem-cells = <&macaddr_art_1002 0>;
82 nvmem-cell-names = "mac-address";
83 };
84
85 &gpio {
86 lna0 {
87 line-name = "wam250:ext:lna0";
88 gpios = <19 GPIO_ACTIVE_HIGH>;
89 output-high;
90 gpio-hog;
91 };
92 };
93
94 &ref {
95 clock-frequency = <40000000>;
96 };
97
98 &spi {
99 status = "okay";
100
101 flash@0 {
102 compatible = "jedec,spi-nor";
103 reg = <0>;
104 spi-max-frequency = <50000000>;
105 m25p,fast-read;
106
107 partitions {
108 compatible = "fixed-partitions";
109 #address-cells = <1>;
110 #size-cells = <1>;
111
112 partition@0 {
113 label = "u-boot";
114 reg = <0x000000 0x040000>;
115 read-only;
116 };
117
118 partition@40000 {
119 label = "u-boot-env";
120 reg = <0x040000 0x010000>;
121 };
122
123 partition@50000 {
124 label = "nvram";
125 reg = <0x050000 0x020000>;
126 read-only;
127 };
128
129 partition@70000 {
130 compatible = "denx,uimage";
131 label = "firmware";
132 reg = <0x070000 0xf80000>;
133 };
134
135 art: partition@ff0000 {
136 label = "art";
137 reg = <0xff0000 0x010000>;
138 read-only;
139
140 nvmem-layout {
141 compatible = "fixed-layout";
142 #address-cells = <1>;
143 #size-cells = <1>;
144
145 macaddr_art_1002: macaddr@1002 {
146 compatible = "mac-base";
147 reg = <0x1002 0x6>;
148 #nvmem-cell-cells = <1>;
149 };
150 };
151 };
152 };
153 };
154 };
155
156 &usb {
157 status = "okay";
158 };
159
160 &usb_phy {
161 status = "okay";
162 };
163
164
165 &wmac {
166 status = "okay";
167
168 mtd-cal-data = <&art 0x1000>;
169 };