1// SPDX-License-Identifier: GPL-2.0
2/*
3 * at91-wb45n.dtsi - Device Tree file for WB45NBT board
4 *
5 *  Copyright (C) 2018 Laird
6 *
7 */
8
9#include "at91sam9g25.dtsi"
10
11/ {
12	model = "Laird Workgroup Bridge 45N - Atmel AT91SAM (dt)";
13	compatible = "laird,wb45n", "laird,wbxx", "atmel,at91sam9x5", "atmel,at91sam9";
14
15	chosen {
16		bootargs = "ubi.mtd=6 root=ubi0:rootfs rootfstype=ubifs rw";
17		stdout-path = "serial0:115200n8";
18	};
19
20	memory@20000000 {
21		reg = <0x20000000 0x4000000>;
22	};
23
24	atheros {
25		compatible = "atheros,ath6kl";
26		atheros,board-id = "SD32";
27	};
28};
29
30&reset_controller {
31	compatible = "atmel,sama5d3-rstc";
32};
33
34&shutdown_controller {
35	atmel,wakeup-mode = "low";
36};
37
38&slow_xtal {
39	clock-frequency = <32768>;
40};
41
42&main_xtal {
43	clock-frequency = <12000000>;
44};
45
46&ebi {
47	status = "okay";
48	nand_controller: nand-controller {
49		pinctrl-0 = <&pinctrl_nand_cs &pinctrl_nand_rb &pinctrl_nand_oe_we>;
50		pinctrl-names = "default";
51		status = "okay";
52
53		nand@3 {
54			reg = <0x3 0x0 0x800000>;
55			rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
56			cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
57			nand-bus-width = <8>;
58			nand-ecc-mode = "hw";
59			nand-ecc-strength = <4>;
60			nand-ecc-step-size = <512>;
61			nand-on-flash-bbt;
62			label = "atmel_nand";
63
64			partitions {
65				compatible = "fixed-partitions";
66				#address-cells = <1>;
67				#size-cells = <1>;
68
69				at91bootstrap@0 {
70					label = "at91bs";
71					reg = <0x0 0x20000>;
72				};
73
74				uboot@20000 {
75					label = "u-boot";
76					reg = <0x20000 0x80000>;
77				};
78
79				ubootenv@a0000 {
80					label = "u-boot-env";
81					reg = <0xa0000 0x20000>;
82				};
83
84				ubootenv@c0000 {
85					label = "redund-env";
86					reg = <0xc0000 0x20000>;
87				};
88
89				kernel-a@e0000 {
90					label = "kernel-a";
91					reg = <0xe0000 0x280000>;
92				};
93
94				kernel-b@360000 {
95					label = "kernel-b";
96					reg = <0x360000 0x280000>;
97				};
98
99				rootfs-a@5e0000 {
100					label = "rootfs-a";
101					reg = <0x5e0000 0x2600000>;
102				};
103
104				rootfs-b@2be0000 {
105					label = "rootfs-b";
106					reg = <0x2be0000 0x2600000>;
107				};
108
109				user@51e0000 {
110					label = "user";
111					reg = <0x51e0000 0x2dc0000>;
112				};
113
114				logs@7fa0000 {
115					label = "logs";
116					reg = <0x7fa0000 0x60000>;
117				};
118
119			};
120		};
121	};
122};
123
124&usb0 {
125	num-ports = <2>;
126	atmel,vbus-gpio = <
127		&pioB 12 GPIO_ACTIVE_HIGH
128		&pioA 31 GPIO_ACTIVE_HIGH
129		>;
130	atmel,oc-gpio = <&pioB 13 GPIO_ACTIVE_LOW>;
131};
132
133&macb0 {
134	phy-mode = "rmii";
135};
136
137&spi0 {
138	cs-gpios = <&pioA 14 0>, <&pioA 7 0>, <0>, <0>;
139};
140
141&usb2 {
142	pinctrl-names = "default";
143	pinctrl-0 = <&pinctrl_board_usb2>;
144	atmel,vbus-gpio = <&pioB 11 GPIO_ACTIVE_HIGH>;
145};
146
147&mmc0 {
148	pinctrl-names = "default";
149	pinctrl-0 = <
150		&pinctrl_mmc0_slot0_clk_cmd_dat0
151		&pinctrl_mmc0_slot0_dat1_3>;
152	slot@0 {
153		reg = <0>;
154		bus-width = <4>;
155	};
156};
157
158&pinctrl {
159	usb2 {
160		pinctrl_board_usb2: usb2-board {
161			atmel,pins =
162				<AT91_PIOB 11 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;		/* PB11 gpio vbus sense, deglitch */
163		};
164	};
165};
166
167