1// SPDX-License-Identifier: GPL-2.0
2/dts-v1/;
3
4#include "x1830.dtsi"
5#include <dt-bindings/gpio/gpio.h>
6#include <dt-bindings/clock/ingenic,tcu.h>
7#include <dt-bindings/interrupt-controller/irq.h>
8
9/ {
10	compatible = "yna,cu1830-neo", "ingenic,x1830";
11	model = "YSH & ATIL General Board CU1830-Neo";
12
13	aliases {
14		serial1 = &uart1;
15	};
16
17	chosen {
18		stdout-path = "serial1:115200n8";
19	};
20
21	memory {
22		device_type = "memory";
23		reg = <0x0 0x08000000>;
24	};
25
26	leds {
27		compatible = "gpio-leds";
28		led-0 {
29			gpios = <&gpc 17 GPIO_ACTIVE_HIGH>;
30			linux,default-trigger = "mmc0";
31		};
32	};
33
34	wlan_pwrseq: msc1-pwrseq {
35		compatible = "mmc-pwrseq-simple";
36
37		reset-gpios = <&gpc 13 GPIO_ACTIVE_LOW>;
38		post-power-on-delay-ms = <200>;
39	};
40};
41
42&exclk {
43	clock-frequency = <24000000>;
44};
45
46&tcu {
47	/* 1500 kHz for the system timer and clocksource */
48	assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER2>;
49	assigned-clock-rates = <1500000>, <1500000>;
50
51	/* Use channel #0 for the system timer channel #2 for the clocksource */
52	ingenic,pwm-channels-mask = <0xfa>;
53};
54
55&uart1 {
56	status = "okay";
57
58	pinctrl-names = "default";
59	pinctrl-0 = <&pins_uart1>;
60};
61
62&i2c0 {
63	status = "okay";
64
65	clock-frequency = <400000>;
66
67	pinctrl-names = "default";
68	pinctrl-0 = <&pins_i2c0>;
69
70	ads7830: adc@48 {
71		compatible = "ti,ads7830";
72		reg = <0x48>;
73	};
74};
75
76&msc0 {
77	status = "okay";
78
79	bus-width = <4>;
80	max-frequency = <50000000>;
81
82	pinctrl-names = "default";
83	pinctrl-0 = <&pins_msc0>;
84
85	non-removable;
86};
87
88&msc1 {
89	status = "okay";
90
91	#address-cells = <1>;
92	#size-cells = <0>;
93	bus-width = <4>;
94	max-frequency = <50000000>;
95
96	pinctrl-names = "default";
97	pinctrl-0 = <&pins_msc1>;
98
99	non-removable;
100
101	mmc-pwrseq = <&wlan_pwrseq>;
102
103	ap6212a: wifi@1 {
104		compatible = "brcm,bcm4329-fmac";
105		reg = <1>;
106
107		interrupt-parent = <&gpc>;
108		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
109		interrupt-names = "host-wake";
110
111		brcm,drive-strength = <10>;
112	};
113};
114
115&mac {
116	status = "okay";
117
118	phy-mode = "rmii";
119	phy-handle = <&ip101gr>;
120
121	pinctrl-names = "default";
122	pinctrl-0 = <&pins_mac>;
123
124	snps,reset-gpio = <&gpb 28 GPIO_ACTIVE_LOW>; /* PB28 */
125	snps,reset-active-low;
126	snps,reset-delays-us = <0 10000 30000>;
127};
128
129&mdio {
130	status = "okay";
131
132	ip101gr: ethernet-phy@0 {
133		compatible = "ethernet-phy-id0243.0c54", "ethernet-phy-ieee802.3-c22";
134		reg = <0>;
135	};
136};
137
138&pinctrl {
139	pins_uart1: uart1 {
140		function = "uart1";
141		groups = "uart1-data";
142		bias-pull-up;
143	};
144
145	pins_i2c0: i2c0 {
146		function = "i2c0";
147		groups = "i2c0-data";
148		bias-pull-up;
149	};
150
151	pins_msc0: msc0 {
152		function = "mmc0";
153		groups = "mmc0-1bit", "mmc0-4bit";
154		bias-disable;
155	};
156
157	pins_msc1: msc1 {
158		function = "mmc1";
159		groups = "mmc1-1bit", "mmc1-4bit";
160		bias-disable;
161	};
162
163	pins_mac: mac {
164		function = "mac";
165		groups = "mac";
166		bias-disable;
167	};
168};
169