1/*
2 *  BSD LICENSE
3 *
4 *  Copyright(c) 2016 Broadcom.  All rights reserved.
5 *
6 *  Redistribution and use in source and binary forms, with or without
7 *  modification, are permitted provided that the following conditions
8 *  are met:
9 *
10 *    * Redistributions of source code must retain the above copyright
11 *      notice, this list of conditions and the following disclaimer.
12 *    * Redistributions in binary form must reproduce the above copyright
13 *      notice, this list of conditions and the following disclaimer in
14 *      the documentation and/or other materials provided with the
15 *      distribution.
16 *    * Neither the name of Broadcom Corporation nor the names of its
17 *      contributors may be used to endorse or promote products derived
18 *      from this software without specific prior written permission.
19 *
20 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33/dts-v1/;
34
35#include "bcm-nsp.dtsi"
36#include <dt-bindings/gpio/gpio.h>
37
38/ {
39	model = "NorthStar Plus XMC (BCM958525xmc)";
40	compatible = "brcm,bcm958525xmc", "brcm,bcm58525", "brcm,nsp";
41
42	chosen {
43		stdout-path = "serial0:115200n8";
44	};
45
46	memory@60000000 {
47		device_type = "memory";
48		reg = <0x60000000 0x40000000>;
49	};
50
51	gpio-restart {
52		compatible = "gpio-restart";
53		gpios = <&gpioa 31 GPIO_ACTIVE_LOW>;
54		open-source;
55		priority = <200>;
56	};
57};
58
59/* XHCI support needed to be complete */
60
61&dma {
62	status = "okay";
63};
64
65&amac0 {
66	status = "okay";
67};
68
69&ehci0 {
70	status = "okay";
71};
72
73&i2c0 {
74	status = "okay";
75
76	temperature-sensor@4c {
77		compatible = "adi,adt7461a";
78		reg = <0x4c>;
79	};
80
81	eeprom@52 {
82		compatible = "atmel,24c02";
83		reg = <0x52>;
84		pagesize = <16>;
85	};
86
87	rtc@68 {
88		compatible = "st,m41t81";
89		reg = <0x68>;
90	};
91};
92
93&nand_controller {
94	nand@0 {
95		compatible = "brcm,nandcs";
96		reg = <0>;
97		nand-on-flash-bbt;
98
99		#address-cells = <1>;
100		#size-cells = <1>;
101
102		nand-ecc-strength = <24>;
103		nand-ecc-step-size = <1024>;
104
105		brcm,nand-oob-sector-size = <27>;
106
107		partition@0 {
108			label = "nboot";
109			reg = <0x00000000 0x00200000>;
110			read-only;
111		};
112		partition@200000 {
113			label = "nenv";
114			reg = <0x00200000 0x00400000>;
115		};
116		partition@600000 {
117			label = "nsystem";
118			reg = <0x00600000 0x00a00000>;
119		};
120		partition@1000000 {
121			label = "nrootfs";
122			reg = <0x01000000 0x03000000>;
123		};
124		partition@4000000 {
125			label = "ncustfs";
126			reg = <0x04000000 0x3c000000>;
127		};
128	};
129};
130
131&ohci0 {
132	status = "okay";
133};
134
135&pcie0 {
136	status = "okay";
137};
138
139&pcie1 {
140	status = "okay";
141};
142
143&pinctrl {
144	pinctrl-names = "default";
145	pinctrl-0 = <&nand_sel>;
146	nand_sel: nand_sel {
147		function = "nand";
148		groups = "nand_grp";
149	};
150};
151
152&qspi {
153	status = "okay";
154	bspi-sel = <0>;
155	flash: flash@0 {
156		#address-cells = <1>;
157		#size-cells = <1>;
158		compatible = "m25p80";
159		reg = <0x0>;
160		spi-max-frequency = <12500000>;
161		m25p,fast-read;
162		spi-cpol;
163		spi-cpha;
164
165		partition@0 {
166			label = "boot";
167			reg = <0x00000000 0x000a0000>;
168		};
169
170		partition@a0000 {
171			label = "env";
172			reg = <0x000a0000 0x00060000>;
173		};
174
175		partition@100000 {
176			label = "system";
177			reg = <0x00100000 0x00600000>;
178		};
179
180		partition@700000 {
181			label = "rootfs";
182			reg = <0x00700000 0x01900000>;
183		};
184	};
185};
186
187&sata_phy0 {
188	status = "okay";
189};
190
191&sata_phy1 {
192	status = "okay";
193};
194
195&sata {
196	status = "okay";
197};
198
199&sdio {
200	status = "okay";
201};
202
203&uart0 {
204	status = "okay";
205};
206
207&usb3_phy {
208	status = "okay";
209};
210
211&xhci {
212	status = "okay";
213};
214
215&srab {
216	compatible = "brcm,bcm58525-srab", "brcm,nsp-srab";
217};
218