ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.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 &gpio {
77 status = "okay";
78 };
79
80 &spi {
81 status = "okay";
82
83 num-cs = <1>;
84
85 flash@0 {
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <25000000>;
89
90 partitions {
91 compatible = "fixed-partitions";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 partition@0 {
96 label = "u-boot";
97 reg = <0x000000 0x030000>;
98 read-only;
99 };
100
101 partition@30000 {
102 label = "u-boot-env";
103 reg = <0x030000 0x010000>;
104 };
105
106 art: partition@40000 {
107 label = "art";
108 reg = <0x040000 0x010000>;
109 read-only;
110 };
111
112 partition@50000 {
113 compatible = "denx,uimage";
114 label = "firmware";
115 reg = <0x050000 0xfb0000>;
116 };
117 };
118 };
119 };
120
121 &uart {
122 status = "okay";
123 };
124
125 &usb {
126 status = "okay";
127 dr_mode = "host";
128 };
129
130 &usb_phy {
131 status = "okay";
132 };
133
134 &wmac {
135 status = "okay";
136
137 mtd-cal-data = <&art 0x1000>;
138 };