ath79: move dts-v1 statement to ath79.dtsi
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9331_alfa-network_ap121f.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 model = "ALFA Network AP121F";
10 compatible = "alfa-network,ap121f", "qca,ar9331";
11
12 aliases {
13 label-mac-device = &wmac;
14 led-boot = &led_vpn;
15 led-failsafe = &led_vpn;
16 led-upgrade = &led_vpn;
17 serial0 = &uart;
18 };
19
20 keys {
21 compatible = "gpio-keys";
22
23 reset {
24 label = "reset";
25 linux,code = <KEY_RESTART>;
26 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
27 };
28
29 switch {
30 label = "switch";
31 linux,code = <BTN_0>;
32 gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
33 };
34 };
35
36 leds {
37 compatible = "gpio-leds";
38
39 lan {
40 label = "ap121f:green:lan";
41 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
42 };
43
44 led_vpn: vpn {
45 label = "ap121f:green:vpn";
46 gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
47 };
48
49 wlan {
50 label = "ap121f:green:wlan";
51 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
52 linux,default-trigger = "phy0tpt";
53 };
54 };
55 };
56
57 &eth0 {
58 status = "okay";
59
60 mtd-mac-address = <&art 0x0>;
61
62 gmac-config {
63 device = <&gmac>;
64 switch-phy-addr-swap = <0>;
65 switch-phy-swap = <0>;
66 };
67 };
68
69 &eth1 {
70 status = "okay";
71
72 compatible = "syscon", "simple-mfd";
73 };
74
75 &spi {
76 status = "okay";
77
78 num-cs = <1>;
79
80 flash@0 {
81 compatible = "jedec,spi-nor";
82 reg = <0>;
83 spi-max-frequency = <25000000>;
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 dr_mode = "host";
123 };
124
125 &usb_phy {
126 status = "okay";
127 };
128
129 &wmac {
130 status = "okay";
131
132 mtd-cal-data = <&art 0x1000>;
133 };