50605bf6858dd9ab92f7fb06adbbd94955786b1e
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / ar9331_alfa-network_ap121f.dtsi
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 aliases {
10 label-mac-device = &wmac;
11 led-boot = &led_vpn;
12 led-failsafe = &led_vpn;
13 led-upgrade = &led_vpn;
14 serial0 = &uart;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 reset {
21 label = "reset";
22 linux,code = <KEY_RESTART>;
23 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
24 debounce-interval = <60>;
25 };
26
27 switch {
28 label = "switch";
29 linux,code = <BTN_0>;
30 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
31 debounce-interval = <60>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 lan {
39 label = "green:lan";
40 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
41 };
42
43 led_vpn: vpn {
44 label = "green:vpn";
45 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
46 };
47
48 wlan {
49 label = "green:wlan";
50 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
51 linux,default-trigger = "phy0tpt";
52 };
53 };
54 };
55
56 &eth0 {
57 status = "okay";
58
59 mtd-mac-address = <&art 0x0>;
60
61 gmac-config {
62 device = <&gmac>;
63 switch-phy-addr-swap = <0>;
64 switch-phy-swap = <0>;
65 };
66 };
67
68 &eth1 {
69 status = "okay";
70
71 compatible = "syscon", "simple-mfd";
72 };
73
74 &spi {
75 status = "okay";
76
77 num-cs = <1>;
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <50000000>;
83 m25p,fast-read;
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 0x030000>;
93 read-only;
94 };
95
96 partition@30000 {
97 label = "u-boot-env";
98 reg = <0x030000 0x010000>;
99 };
100
101 art: partition@40000 {
102 label = "art";
103 reg = <0x040000 0x010000>;
104 read-only;
105 };
106
107 partition@50000 {
108 compatible = "denx,uimage";
109 label = "firmware";
110 reg = <0x050000 0xfb0000>;
111 };
112 };
113 };
114 };
115
116 &uart {
117 status = "okay";
118 };
119
120 &usb {
121 status = "okay";
122 };
123
124 &usb_phy {
125 status = "okay";
126 };
127
128 &wmac {
129 status = "okay";
130
131 mtd-cal-data = <&art 0x1000>;
132 };