ath79: add support for Compex WPJ531 (16M)
[openwrt/staging/dedeckeh.git] / target / linux / ath79 / dts / ar7100_mikrotik_routerboard-4xx.dtsi
1 // SPDX-License-Identifier: GPL-1.0-or-later OR MIT
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 #include "ar7100.dtsi"
7
8 / {
9 aliases {
10 led-boot = &led_user;
11 led-failsafe = &led_user;
12 led-running = &led_user;
13 };
14
15 leds {
16 compatible = "gpio-leds";
17
18 led_user: user {
19 label = "mikrotik:yellow:user";
20 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
21 default-state = "on";
22 };
23
24 led1 {
25 label = "mikrotik:green:led1";
26 gpios = <&cpld_gpio 0 GPIO_ACTIVE_LOW>;
27 };
28
29 led2 {
30 label = "mikrotik:green:led2";
31 gpios = <&cpld_gpio 2 GPIO_ACTIVE_LOW>;
32 };
33
34 led3 {
35 label = "mikrotik:green:led3";
36 gpios = <&cpld_gpio 1 GPIO_ACTIVE_LOW>;
37 };
38
39 led4 {
40 label = "mikrotik:green:led4";
41 gpios = <&cpld_gpio 3 GPIO_ACTIVE_LOW>;
42 };
43
44 led5 {
45 label = "mikrotik:green:led5";
46 gpios = <&cpld_gpio 8 GPIO_ACTIVE_LOW>;
47 };
48 };
49 };
50
51 &uart {
52 status = "okay";
53 };
54
55 &gpio {
56 ngpios = <31>;
57 gpio-line-names =
58 "", "", "", "", "LED", "RDY", "", "MDC",
59 "MDIO", "", "", "", "", "", "", "",
60 "", "", "", "", "", "", "", "",
61 "", "", "", "", "", "", "", "";
62 };
63
64 &pcie0 {
65 status = "okay";
66 };
67
68 &spi {
69 status = "okay";
70
71 compatible = "mikrotik,rb4xx-spi";
72
73 flash@0 {
74 compatible = "pm25lv512", "jedec,spi-nor";
75
76 reg = <0>;
77 spi-max-frequency = <25000000>;
78
79 partitions {
80 compatible = "mikrotik,routerboot-partitions";
81 #address-cells = <1>;
82 #size-cells = <1>;
83
84 partition@0 {
85 label = "routerboot1";
86 reg = <0x0 0x0>;
87 read-only;
88 };
89
90 hard_config {
91 label = "hard_config";
92 read-only;
93 };
94
95 bios {
96 label = "bios";
97 size = <0x1000>;
98 read-only;
99 };
100
101 routerboot2 {
102 label = "routerboot2";
103 read-only;
104 };
105
106 soft_config {
107 label = "soft_config";
108 };
109 };
110 };
111
112 cpld@1 {
113 compatible = "mikrotik,rb4xx-cpld";
114
115 reg = <1>;
116 spi-max-frequency = <25000000>;
117
118 cpld_gpio: gpio {
119 compatible = "mikrotik,rb4xx-gpio";
120
121 base = <32>;
122
123 gpio-controller;
124 #gpio-cells = <2>;
125 gpio-line-names =
126 "LED1", "LED2", "LED3", "LED4",
127 "FAN", "ALE", "CLE", "nCE",
128 "LED5";
129 };
130
131 nand {
132 compatible = "mikrotik,rb4xx-nand";
133
134 gpios = <&cpld_gpio 5 GPIO_ACTIVE_HIGH>, // ALE
135 <&cpld_gpio 6 GPIO_ACTIVE_HIGH>, // CLE
136 <&cpld_gpio 7 GPIO_ACTIVE_HIGH>, // nCE
137 <&gpio 5 GPIO_ACTIVE_HIGH>; // RDY
138
139 partitions {
140 compatible = "fixed-partitions";
141 #address-cells = <1>;
142 #size-cells = <1>;
143
144 partition@0 {
145 label = "booter";
146 reg = <0x0000000 0x0040000>;
147 read-only;
148 };
149
150 partition@40000 {
151 label = "kernel";
152 reg = <0x0040000 0x0800000>;
153 };
154
155 partition@840000 {
156 label = "ubi";
157 reg = <0x0840000 0x77c0000>;
158 };
159 };
160 };
161 };
162 };
163
164 &eth0 {
165 status = "okay";
166
167 phy-handle = <&phy0>;
168 };
169
170 &mdio0 {
171 status = "okay";
172
173 phy0: ethernet-phy@0 {
174 reg = <0>;
175 };
176 };