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,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&amac0 {
62	status = "okay";
63};
64
65&ehci0 {
66	status = "okay";
67};
68
69&i2c0 {
70	status = "okay";
71
72	temperature-sensor@4c {
73		compatible = "adi,adt7461a";
74		reg = <0x4c>;
75	};
76
77	eeprom@52 {
78		compatible = "atmel,24c02";
79		reg = <0x52>;
80		pagesize = <16>;
81	};
82
83	rtc@68 {
84		compatible = "st,m41t81";
85		reg = <0x68>;
86	};
87};
88
89&nand {
90	nandcs@0 {
91		compatible = "brcm,nandcs";
92		reg = <0>;
93		nand-on-flash-bbt;
94
95		#address-cells = <1>;
96		#size-cells = <1>;
97
98		nand-ecc-strength = <24>;
99		nand-ecc-step-size = <1024>;
100
101		brcm,nand-oob-sector-size = <27>;
102
103		partition@0 {
104			label = "nboot";
105			reg = <0x00000000 0x00200000>;
106			read-only;
107		};
108		partition@200000 {
109			label = "nenv";
110			reg = <0x00200000 0x00400000>;
111		};
112		partition@600000 {
113			label = "nsystem";
114			reg = <0x00600000 0x00a00000>;
115		};
116		partition@1000000 {
117			label = "nrootfs";
118			reg = <0x01000000 0x03000000>;
119		};
120		partition@4000000 {
121			label = "ncustfs";
122			reg = <0x04000000 0x3c000000>;
123		};
124	};
125};
126
127&ohci0 {
128	status = "okay";
129};
130
131&pcie0 {
132	status = "okay";
133};
134
135&pcie1 {
136	status = "okay";
137};
138
139&pinctrl {
140	pinctrl-names = "default";
141	pinctrl-0 = <&nand_sel>;
142	nand_sel: nand_sel {
143		function = "nand";
144		groups = "nand_grp";
145	};
146};
147
148&qspi {
149	bspi-sel = <0>;
150	flash: m25p80@0 {
151		#address-cells = <1>;
152		#size-cells = <1>;
153		compatible = "m25p80";
154		reg = <0x0>;
155		spi-max-frequency = <12500000>;
156		m25p,fast-read;
157		spi-cpol;
158		spi-cpha;
159
160		partition@0 {
161			label = "boot";
162			reg = <0x00000000 0x000a0000>;
163		};
164
165		partition@a0000 {
166			label = "env";
167			reg = <0x000a0000 0x00060000>;
168		};
169
170		partition@100000 {
171			label = "system";
172			reg = <0x00100000 0x00600000>;
173		};
174
175		partition@700000 {
176			label = "rootfs";
177			reg = <0x00700000 0x01900000>;
178		};
179	};
180};
181
182&sata_phy0 {
183	status = "okay";
184};
185
186&sata_phy1 {
187	status = "okay";
188};
189
190&sata {
191	status = "okay";
192};
193
194&sdio {
195	status = "ok";
196};
197
198&uart0 {
199	status = "okay";
200};
201
202&usb3_phy {
203	status = "okay";
204};
205
206&xhci {
207	status = "okay";
208};
209