ath79: increase SPI clock and enable fast-read on AP121F
[openwrt/staging/chunkeey.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 = <50000000>;
84 m25p,fast-read;
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 };