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