xref: /freebsd/sys/contrib/device-tree/src/mips/ingenic/cu1000-neo.dts (revision 6ba2210ee039f2f12878c217bcf058e9c8b26b29)
1// SPDX-License-Identifier: GPL-2.0
2/dts-v1/;
3
4#include "x1000.dtsi"
5#include <dt-bindings/gpio/gpio.h>
6#include <dt-bindings/clock/ingenic,sysost.h>
7#include <dt-bindings/interrupt-controller/irq.h>
8
9/ {
10	compatible = "yna,cu1000-neo", "ingenic,x1000e";
11	model = "YSH & ATIL General Board CU1000-Neo";
12
13	aliases {
14		serial2 = &uart2;
15	};
16
17	chosen {
18		stdout-path = "serial2:115200n8";
19	};
20
21	memory {
22		device_type = "memory";
23		reg = <0x0 0x04000000>;
24	};
25
26	leds {
27		compatible = "gpio-leds";
28		led-0 {
29			gpios = <&gpb 21 GPIO_ACTIVE_HIGH>;
30			linux,default-trigger = "mmc0";
31		};
32	};
33
34	ssi: spi-gpio {
35		compatible = "spi-gpio";
36		#address-cells = <1>;
37		#size-cells = <0>;
38		num-chipselects = <1>;
39
40		mosi-gpios = <&gpd 2 GPIO_ACTIVE_HIGH>;
41		miso-gpios = <&gpd 3 GPIO_ACTIVE_HIGH>;
42		sck-gpios = <&gpd 0 GPIO_ACTIVE_HIGH>;
43		cs-gpios = <&gpd 1 GPIO_ACTIVE_HIGH>;
44
45		status = "okay";
46
47		spi-max-frequency = <50000000>;
48
49		sc16is752: expander@0 {
50			compatible = "nxp,sc16is752";
51			reg = <0>; /* CE0 */
52			spi-max-frequency = <4000000>;
53
54			clocks = <&exclk_sc16is752>;
55
56			interrupt-parent = <&gpc>;
57			interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
58
59			gpio-controller;
60			#gpio-cells = <2>;
61
62			exclk_sc16is752: sc16is752 {
63				compatible = "fixed-clock";
64				#clock-cells = <0>;
65				clock-frequency = <48000000>;
66			};
67		};
68	};
69
70	wlan_pwrseq: msc1-pwrseq {
71		compatible = "mmc-pwrseq-simple";
72
73		reset-gpios = <&gpc 17 GPIO_ACTIVE_LOW>;
74		post-power-on-delay-ms = <200>;
75	};
76};
77
78&exclk {
79	clock-frequency = <24000000>;
80};
81
82&cgu {
83	/*
84	 * Use the 32.768 kHz oscillator as the parent of the RTC for a higher
85	 * precision.
86	 */
87	assigned-clocks = <&cgu X1000_CLK_RTC>;
88	assigned-clock-parents = <&cgu X1000_CLK_RTCLK>;
89};
90
91&ost {
92	/* 1500 kHz for the system timer and clocksource */
93	assigned-clocks = <&ost OST_CLK_PERCPU_TIMER>, <&ost OST_CLK_GLOBAL_TIMER>;
94	assigned-clock-rates = <1500000>, <1500000>;
95};
96
97&uart2 {
98	status = "okay";
99
100	pinctrl-names = "default";
101	pinctrl-0 = <&pins_uart2>;
102};
103
104&i2c0 {
105	status = "okay";
106
107	clock-frequency = <400000>;
108
109	pinctrl-names = "default";
110	pinctrl-0 = <&pins_i2c0>;
111
112	ads7830: adc@48 {
113		compatible = "ti,ads7830";
114		reg = <0x48>;
115	};
116};
117
118&msc0 {
119	status = "okay";
120
121	bus-width = <8>;
122	max-frequency = <50000000>;
123
124	pinctrl-names = "default";
125	pinctrl-0 = <&pins_msc0>;
126
127	non-removable;
128};
129
130&msc1 {
131	status = "okay";
132
133	#address-cells = <1>;
134	#size-cells = <0>;
135	bus-width = <4>;
136	max-frequency = <50000000>;
137
138	pinctrl-names = "default";
139	pinctrl-0 = <&pins_msc1>;
140
141	non-removable;
142
143	mmc-pwrseq = <&wlan_pwrseq>;
144
145	ap6212a: wifi@1 {
146		compatible = "brcm,bcm4329-fmac";
147		reg = <1>;
148
149		interrupt-parent = <&gpc>;
150		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
151		interrupt-names = "host-wake";
152
153		brcm,drive-strength = <10>;
154	};
155};
156
157&mac {
158	status = "okay";
159
160	phy-mode = "rmii";
161	phy-handle = <&lan8720a>;
162
163	pinctrl-names = "default";
164	pinctrl-0 = <&pins_mac>;
165
166	snps,reset-gpio = <&gpc 23 GPIO_ACTIVE_LOW>; /* PC23 */
167	snps,reset-active-low;
168	snps,reset-delays-us = <0 10000 30000>;
169};
170
171&mdio {
172	status = "okay";
173
174	lan8720a: ethernet-phy@0 {
175		compatible = "ethernet-phy-id0007.c0f0", "ethernet-phy-ieee802.3-c22";
176		reg = <0>;
177	};
178};
179
180&otg_phy {
181	status = "okay";
182};
183
184&otg {
185	status = "okay";
186};
187
188&pinctrl {
189	pins_uart2: uart2 {
190		function = "uart2";
191		groups = "uart2-data-d";
192		bias-pull-up;
193	};
194
195	pins_i2c0: i2c0 {
196		function = "i2c0";
197		groups = "i2c0-data";
198		bias-pull-up;
199	};
200
201	pins_msc0: msc0 {
202		function = "mmc0";
203		groups = "mmc0-1bit", "mmc0-4bit", "mmc0-8bit";
204		bias-disable;
205	};
206
207	pins_msc1: msc1 {
208		function = "mmc1";
209		groups = "mmc1-1bit", "mmc1-4bit";
210		bias-disable;
211	};
212
213	pins_mac: mac {
214		function = "mac";
215		groups = "mac";
216		bias-disable;
217	};
218};
219