eaf8da8edcb90480a11b93906d4a8e10116249f3
[oweals/openwrt.git] / target / linux / ramips / dts / AP7621-001.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4 #include "mt7621.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10         compatible = "asiarf,ap7621-001", "mediatek,mt7621-soc";
11         model = "AsiaRF AP7621-001";
12
13         memory@0 {
14                 device_type = "memory";
15                 reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
16         };
17
18         chosen {
19                 bootargs = "console=ttyS0,57600";
20         };
21
22         keys {
23                 compatible = "gpio-keys";
24
25                 reset {
26                         label = "reset";
27                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
28                         linux,code = <KEY_RESTART>;
29                 };
30         };
31
32         leds {
33                 compatible = "gpio-leds";
34
35                 wlan1 {
36                         label = "ap7621-001:orange:wlan1";
37                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
38                 };
39
40                 wlan0 {
41                         label = "ap7621-001:orange:wlan0";
42                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
43                 };
44         };
45 };
46
47 &sdhci {
48         status = "okay";
49 };
50
51 &spi0 {
52         status = "okay";
53
54         flash@0 {
55                 compatible = "jedec,spi-nor";
56                 reg = <0>;
57                 spi-max-frequency = <40000000>;
58
59                 partitions {
60                         compatible = "fixed-partitions";
61                         #address-cells = <1>;
62                         #size-cells = <1>;
63
64                         partition@0 {
65                                 label = "u-boot";
66                                 reg = <0x0 0x30000>;
67                                 read-only;
68                         };
69
70                         partition@30000 {
71                                 label = "u-boot-env";
72                                 reg = <0x30000 0x2000>;
73                         };
74
75                         partition@32000 {
76                                 label = "2860";
77                                 reg = <0x32000 0x4000>;
78                         };
79
80                         partition@36000 {
81                                 label = "rtdev";
82                                 reg = <0x36000 0x2000>;
83                         };
84
85                         partition@38000 {
86                                 label = "Reserve";
87                                 reg = <0x38000 0x8000>;
88                         };
89
90                         factory: partition@40000 {
91                                 label = "factory";
92                                 reg = <0x40000 0x10000>;
93                                 read-only;
94                         };
95
96                         partition@50000 {
97                                 label = "firmware";
98                                 reg = <0x50000 0xfa0000>;
99                                 compatible = "denx,uimage";
100                         };
101
102                         partition@ff0000 {
103                                 label = "nvram";
104                                 reg = <0xff0000 0x10000>;
105                                 read-only;
106                         };
107                 };
108         };
109 };
110
111 &pcie {
112         status = "okay";
113 };
114
115 &ethernet {
116         mtd-mac-address = <&factory 0xe000>;
117         mediatek,portmap = "llllw";
118 };
119
120 &pinctrl {
121         state_default: pinctrl0 {
122                 gpio {
123                         ralink,group = "wdt", "jtag";
124                         ralink,function = "gpio";
125                 };
126         };
127 };
128