ath79: add support for Samsung WAM250
[openwrt/staging/rmilecki.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 = "wam250:white:lan";
42 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
43 };
44
45 led_power: power {
46 label = "wam250:white:power";
47 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
48 default-state = "keep";
49 };
50
51 repeater {
52 label = "wam250:white:repeater";
53 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
54 };
55
56 wlan {
57 label = "wam250: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 mtd-mac-address = <&art 0x1002>;
70 mtd-mac-address-increment = <1>;
71
72 gmac-config {
73 device = <&gmac>;
74 switch-phy-swap = <1>;
75 };
76 };
77
78 &eth1 {
79 status = "okay";
80
81 mtd-mac-address = <&art 0x1002>;
82 };
83
84 &gpio {
85 lna0 {
86 line-name = "wam250:ext:lna0";
87 gpios = <19 GPIO_ACTIVE_HIGH>;
88 output-high;
89 gpio-hog;
90 };
91 };
92
93 &ref {
94 clock-frequency = <40000000>;
95 };
96
97 &spi {
98 status = "okay";
99
100 num-cs = <1>;
101
102 flash@0 {
103 compatible = "jedec,spi-nor";
104 reg = <0>;
105 spi-max-frequency = <50000000>;
106 m25p,fast-read;
107
108 partitions {
109 compatible = "fixed-partitions";
110 #address-cells = <1>;
111 #size-cells = <1>;
112
113 partition@0 {
114 label = "u-boot";
115 reg = <0x000000 0x040000>;
116 read-only;
117 };
118
119 partition@40000 {
120 label = "u-boot-env";
121 reg = <0x040000 0x010000>;
122 };
123
124 partition@50000 {
125 label = "nvram";
126 reg = <0x050000 0x020000>;
127 read-only;
128 };
129
130 partition@70000 {
131 compatible = "denx,uimage";
132 label = "firmware";
133 reg = <0x070000 0xf80000>;
134 };
135
136 art: partition@ff0000 {
137 label = "art";
138 reg = <0xff0000 0x010000>;
139 read-only;
140 };
141 };
142 };
143 };
144
145 &uart {
146 status = "okay";
147 };
148
149
150 &usb {
151 status = "okay";
152 };
153
154 &usb_phy {
155 status = "okay";
156 };
157
158
159 &wmac {
160 status = "okay";
161
162 mtd-cal-data = <&art 0x1000>;
163 };