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