blob: c19b25925ba2aace211e69b8fcc55eecc3cb4258 [file] [log] [blame]
Chris Packham7325f1f2023-07-10 10:47:36 +12001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include <dt-bindings/gpio/gpio.h>
6#include <dt-bindings/interrupt-controller/irq.h>
7#include "ac5-98dx35xx.dtsi"
8
9/ {
10 model = "Allied Telesis x240";
11 compatible = "alliedtelesis,x240", "marvell,ac5x", "marvell,ac5";
12
13 aliases {
14 serial0 = &uart0;
15 spiflash0 = &spiflash0;
16 gpio0 = &gpio0;
17 gpio1 = &gpio1;
18 spi0 = &spi0;
Chris Packham42987332023-07-26 11:13:09 +120019 i2c0 = &i2cgpio;
Chris Packham7325f1f2023-07-10 10:47:36 +120020 usb0 = &usb0;
21 pinctrl0 = &pinctrl0;
22 };
23
24 chosen {
25 stdout-path = "serial0:115200n8";
26 };
27
28 boot-board {
29 compatible = "atl,boot-board";
30 present-gpio = <&gpio1 6 GPIO_ACTIVE_HIGH>;
31 override-gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
32 };
33
34 gpio-leds {
35 compatible = "gpio-leds";
36
37 fault {
38 label = "fault:red";
39 gpios = <&system_gpio 11 GPIO_ACTIVE_LOW>;
40 default-state = "on";
41 };
42 };
Chris Packham42987332023-07-26 11:13:09 +120043
44 i2cgpio: i2c-gpio-0 {
45 compatible = "i2c-gpio";
46 #address-cells = <1>;
47 #size-cells = <0>;
48
49 pinctrl-names = "default";
50 pinctrl-0 = <&i2c0_gpio>;
51 scl-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
52 sda-gpios = <&gpio0 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
53 i2c-gpio,delay-us = <2>;
54 status = "okay";
55 };
Chris Packham7325f1f2023-07-10 10:47:36 +120056};
57
58&nand {
59 pinctrl-names = "default";
60 pinctrl-0 = <&nand_pins>;
61
62 nand-ecc-strength = <4>;
63 nand-ecc-step-size = <512>;
64 status = "okay";
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@user {
72 reg = <0x00000000 0x10000000>;
73 label = "user";
74 };
75 };
76};
77
78&uart0 {
79 status = "okay";
80};
81
82&usb0 {
83 status = "okay";
84};
85
Chris Packham42987332023-07-26 11:13:09 +120086&i2cgpio {
Chris Packham7325f1f2023-07-10 10:47:36 +120087 mux@71 {
88 #address-cells = <1>;
89 #size-cells = <0>;
90 compatible = "nxp,pca9546";
91 reg = <0x71>;
92 i2c-mux-idle-disconnect;
93 reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>; /* MPP36 */
94 status = "okay";
95
96 i2c@1 {
97 #address-cells = <1>;
98 #size-cells = <0>;
99 reg = <1>;
100
101 hwmon@2e {
102 compatible = "adi,adt7476";
103 reg = <0x2e>;
104 };
105
106 rtc@68 {
107 compatible = "adi,max31331";
108 reg = <0x68>;
109 };
110
111 system_gpio: gpio@27 {
112 compatible = "nxp,pca9555";
113 gpio-controller;
114 #gpio-cells= <2>;
115 reg = <0x27>;
116 interrupt-parent = <&gpio0>;
117 interrupts = <25 IRQ_TYPE_LEVEL_LOW>; /* MPP25 */
118 };
119 };
120 };
121};
122
123&spi0 {
124 status = "okay";
125 spiflash0: flash@0 {
126 compatible = "jedec,spi-nor";
127 spi-max-frequency = <50000000>;
128 spi-tx-bus-width = <1>; /* 1-single, 2-dual, 4-quad */
129 spi-rx-bus-width = <1>; /* 1-single, 2-dual, 4-quad */
130 reg = <0>;
131
132 #address-cells = <1>;
133 #size-cells = <1>;
134 };
135};
136
137&gpio0 {
138 phy-reset {
139 gpio-hog;
140 gpios = <19 GPIO_ACTIVE_LOW>;
141 output-high;
142 line-name = "phy-reset";
143 };
144
145 usb-en {
146 gpio-hog;
147 gpios = <28 GPIO_ACTIVE_HIGH>;
148 output-high;
149 line-name = "usb-en";
150 };
151
152 led-oe-n {
153 gpio-hog;
154 gpios = <23 GPIO_ACTIVE_LOW>;
155 output-low;
156 line-name = "led-oe-n";
157 };
158};
159
160&gpio1 {
161 nand-protect {
162 gpio-hog;
163 gpios = <8 GPIO_ACTIVE_LOW>;
164 output-low;
165 line-name = "nand-protect";
166 };
167};
168
169&pinctrl0 {
170 /*
171 * MPP Bus: MPP#
172 * NF_IO [0-7]
173 * NF_Wen [8]
174 * NF_ALE [9]
175 * NF_CLE [10]
176 * NF_Cen [11]
177 * QSPI_SCK/SPI0_SCK [12]
178 * QSPI_CSn/SPI0_CSn [13]
179 * QSPI_DIO[0]/SPI0_MOSI [14]
180 * QSPI_DIO[1]/SPI0_MISO [15]
181 * NF_Ren [16]
182 * NF_RBn [17]
183 * WD_INTn [18]
184 * B_B_OVRIDE_N [19]
185 * GREEN_SW_N [20]
186 * PHY_INT_N[0] [21]
187 * SPI_WPn [22]
188 * LED_OE_N [23]
189 * USB_PWR_FLT_N [24]
190 * SFP_INT_N [25]
Chris Packham42987332023-07-26 11:13:09 +1200191 * I2C0_SCL [26] (GPIO)
192 * I2C0_SDA [27] (GPIO)
Chris Packham7325f1f2023-07-10 10:47:36 +1200193 * USB_EN [28]
194 * MONITOR_INT_N [29]
195 * XM1_MDC [30]
196 * XM1_MDIO [31]
197 * UA0_RXD [32]
198 * UA0_TXD [33]
199 * PHY_RST0n [34]
200 * TPM_INT_N [35]
201 * I2CMUX_RESET_N [36]
202 * SPI_SRAM_SEL_N [37]
203 * B_B_PRESENT [38]
204 * SPI_FLASH_SEL_N [39]
205 * NF_WP_N [40]
206 * POE_INT_N [41]
207 * PoE_RST_N [42]
208 * LED0_CLK [43]
209 * LED0_STB [44]
210 * LED0_DATA [45]
211 */
212 /* 0 1 2 3 4 5 6 7 8 9 */
213 pin-func = < 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
214 0xff 0xff 1 1 1 1 0xff 0xff 0 0
Chris Packham42987332023-07-26 11:13:09 +1200215 0 0 0 0 0 0 0xff 0xff 0 0
Chris Packham7325f1f2023-07-10 10:47:36 +1200216 1 1 1 1 0 0 0 0 0 0
217 0 0 0 1 1 1 >;
218
219 nand_pins: nand-pins {
220 marvell,pins = <0 1 2 3 4 5 6 7 8 9 10 11 16 17>;
221 marvell,function = <2>;
222 };
Chris Packham42987332023-07-26 11:13:09 +1200223
224 i2c0_gpio: i2c0-gpio-pins {
225 marvell,pins = <26 27>;
226 marvell,function = <0>;
227 };
Chris Packham7325f1f2023-07-10 10:47:36 +1200228};