xref: /freebsd/sys/contrib/device-tree/src/arm/cirrus/ep93xx-edb9302.dts (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1*b2d2a78aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*b2d2a78aSEmmanuel Vadot/*
3*b2d2a78aSEmmanuel Vadot * Device Tree file for Cirrus Logic EDB9302 board based on EP9302 SoC
4*b2d2a78aSEmmanuel Vadot */
5*b2d2a78aSEmmanuel Vadot/dts-v1/;
6*b2d2a78aSEmmanuel Vadot#include "ep93xx.dtsi"
7*b2d2a78aSEmmanuel Vadot
8*b2d2a78aSEmmanuel Vadot/ {
9*b2d2a78aSEmmanuel Vadot	#address-cells = <1>;
10*b2d2a78aSEmmanuel Vadot	#size-cells = <1>;
11*b2d2a78aSEmmanuel Vadot	compatible = "cirrus,edb9302", "cirrus,ep9301";
12*b2d2a78aSEmmanuel Vadot	model = "cirrus,edb9302";
13*b2d2a78aSEmmanuel Vadot
14*b2d2a78aSEmmanuel Vadot	chosen {
15*b2d2a78aSEmmanuel Vadot	};
16*b2d2a78aSEmmanuel Vadot
17*b2d2a78aSEmmanuel Vadot	memory@0 {
18*b2d2a78aSEmmanuel Vadot		device_type = "memory";
19*b2d2a78aSEmmanuel Vadot		/* should be set from ATAGS */
20*b2d2a78aSEmmanuel Vadot		reg = <0x0000000 0x800000>,
21*b2d2a78aSEmmanuel Vadot		      <0x1000000 0x800000>,
22*b2d2a78aSEmmanuel Vadot		      <0x4000000 0x800000>,
23*b2d2a78aSEmmanuel Vadot		      <0x5000000 0x800000>;
24*b2d2a78aSEmmanuel Vadot	};
25*b2d2a78aSEmmanuel Vadot
26*b2d2a78aSEmmanuel Vadot	sound {
27*b2d2a78aSEmmanuel Vadot		compatible = "audio-graph-card2";
28*b2d2a78aSEmmanuel Vadot		label = "EDB93XX";
29*b2d2a78aSEmmanuel Vadot		links = <&i2s_port>;
30*b2d2a78aSEmmanuel Vadot	};
31*b2d2a78aSEmmanuel Vadot
32*b2d2a78aSEmmanuel Vadot	leds {
33*b2d2a78aSEmmanuel Vadot		compatible = "gpio-leds";
34*b2d2a78aSEmmanuel Vadot		led-0 {
35*b2d2a78aSEmmanuel Vadot			label = "grled";
36*b2d2a78aSEmmanuel Vadot			gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>;
37*b2d2a78aSEmmanuel Vadot			linux,default-trigger = "heartbeat";
38*b2d2a78aSEmmanuel Vadot			function = LED_FUNCTION_HEARTBEAT;
39*b2d2a78aSEmmanuel Vadot		};
40*b2d2a78aSEmmanuel Vadot
41*b2d2a78aSEmmanuel Vadot		led-1 {
42*b2d2a78aSEmmanuel Vadot			label = "rdled";
43*b2d2a78aSEmmanuel Vadot			gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
44*b2d2a78aSEmmanuel Vadot			function = LED_FUNCTION_FAULT;
45*b2d2a78aSEmmanuel Vadot		};
46*b2d2a78aSEmmanuel Vadot	};
47*b2d2a78aSEmmanuel Vadot};
48*b2d2a78aSEmmanuel Vadot
49*b2d2a78aSEmmanuel Vadot&adc {
50*b2d2a78aSEmmanuel Vadot	status = "okay";
51*b2d2a78aSEmmanuel Vadot};
52*b2d2a78aSEmmanuel Vadot
53*b2d2a78aSEmmanuel Vadot&ebi {
54*b2d2a78aSEmmanuel Vadot	flash@60000000 {
55*b2d2a78aSEmmanuel Vadot		compatible = "cfi-flash";
56*b2d2a78aSEmmanuel Vadot		reg = <0x60000000 0x1000000>;
57*b2d2a78aSEmmanuel Vadot		bank-width = <2>;
58*b2d2a78aSEmmanuel Vadot	};
59*b2d2a78aSEmmanuel Vadot};
60*b2d2a78aSEmmanuel Vadot
61*b2d2a78aSEmmanuel Vadot&eth0 {
62*b2d2a78aSEmmanuel Vadot	phy-handle = <&phy0>;
63*b2d2a78aSEmmanuel Vadot};
64*b2d2a78aSEmmanuel Vadot
65*b2d2a78aSEmmanuel Vadot&gpio0 {
66*b2d2a78aSEmmanuel Vadot	gpio-ranges = <&syscon 0 153 1>,
67*b2d2a78aSEmmanuel Vadot		      <&syscon 1 152 1>,
68*b2d2a78aSEmmanuel Vadot		      <&syscon 2 151 1>,
69*b2d2a78aSEmmanuel Vadot		      <&syscon 3 148 1>,
70*b2d2a78aSEmmanuel Vadot		      <&syscon 4 147 1>,
71*b2d2a78aSEmmanuel Vadot		      <&syscon 5 146 1>,
72*b2d2a78aSEmmanuel Vadot		      <&syscon 6 145 1>,
73*b2d2a78aSEmmanuel Vadot		      <&syscon 7 144 1>;
74*b2d2a78aSEmmanuel Vadot};
75*b2d2a78aSEmmanuel Vadot
76*b2d2a78aSEmmanuel Vadot&gpio1 {
77*b2d2a78aSEmmanuel Vadot	gpio-ranges = <&syscon 0 143 1>,
78*b2d2a78aSEmmanuel Vadot		      <&syscon 1 142 1>,
79*b2d2a78aSEmmanuel Vadot		      <&syscon 2 141 1>,
80*b2d2a78aSEmmanuel Vadot		      <&syscon 3 140 1>,
81*b2d2a78aSEmmanuel Vadot		      <&syscon 4 165 1>,
82*b2d2a78aSEmmanuel Vadot		      <&syscon 5 164 1>,
83*b2d2a78aSEmmanuel Vadot		      <&syscon 6 163 1>,
84*b2d2a78aSEmmanuel Vadot		      <&syscon 7 160 1>;
85*b2d2a78aSEmmanuel Vadot};
86*b2d2a78aSEmmanuel Vadot
87*b2d2a78aSEmmanuel Vadot&gpio2 {
88*b2d2a78aSEmmanuel Vadot	gpio-ranges = <&syscon 0 115 1>;
89*b2d2a78aSEmmanuel Vadot};
90*b2d2a78aSEmmanuel Vadot
91*b2d2a78aSEmmanuel Vadot/* edb9302 doesn't have GPIO Port D present */
92*b2d2a78aSEmmanuel Vadot&gpio3 {
93*b2d2a78aSEmmanuel Vadot	status = "disabled";
94*b2d2a78aSEmmanuel Vadot};
95*b2d2a78aSEmmanuel Vadot
96*b2d2a78aSEmmanuel Vadot&gpio4 {
97*b2d2a78aSEmmanuel Vadot	gpio-ranges = <&syscon 0 97 2>;
98*b2d2a78aSEmmanuel Vadot};
99*b2d2a78aSEmmanuel Vadot
100*b2d2a78aSEmmanuel Vadot&gpio5 {
101*b2d2a78aSEmmanuel Vadot	gpio-ranges = <&syscon 1 170 1>,
102*b2d2a78aSEmmanuel Vadot		      <&syscon 2 169 1>,
103*b2d2a78aSEmmanuel Vadot		      <&syscon 3 168 1>;
104*b2d2a78aSEmmanuel Vadot};
105*b2d2a78aSEmmanuel Vadot
106*b2d2a78aSEmmanuel Vadot&gpio6 {
107*b2d2a78aSEmmanuel Vadot	gpio-ranges = <&syscon 0 87 2>;
108*b2d2a78aSEmmanuel Vadot};
109*b2d2a78aSEmmanuel Vadot
110*b2d2a78aSEmmanuel Vadot&gpio7 {
111*b2d2a78aSEmmanuel Vadot	gpio-ranges = <&syscon 2 199 4>;
112*b2d2a78aSEmmanuel Vadot};
113*b2d2a78aSEmmanuel Vadot
114*b2d2a78aSEmmanuel Vadot&i2s {
115*b2d2a78aSEmmanuel Vadot	pinctrl-names = "default";
116*b2d2a78aSEmmanuel Vadot	pinctrl-0 = <&i2s_on_ac97_pins>;
117*b2d2a78aSEmmanuel Vadot	status = "okay";
118*b2d2a78aSEmmanuel Vadot	i2s_port: port {
119*b2d2a78aSEmmanuel Vadot		i2s_ep: endpoint {
120*b2d2a78aSEmmanuel Vadot			system-clock-direction-out;
121*b2d2a78aSEmmanuel Vadot			frame-master;
122*b2d2a78aSEmmanuel Vadot			bitclock-master;
123*b2d2a78aSEmmanuel Vadot			mclk-fs = <256>;
124*b2d2a78aSEmmanuel Vadot			dai-format = "i2s";
125*b2d2a78aSEmmanuel Vadot			convert-channels = <2>;
126*b2d2a78aSEmmanuel Vadot			convert-sample-format = "s32_le";
127*b2d2a78aSEmmanuel Vadot			remote-endpoint = <&codec_ep>;
128*b2d2a78aSEmmanuel Vadot		};
129*b2d2a78aSEmmanuel Vadot	};
130*b2d2a78aSEmmanuel Vadot};
131*b2d2a78aSEmmanuel Vadot
132*b2d2a78aSEmmanuel Vadot&mdio0 {
133*b2d2a78aSEmmanuel Vadot	phy0: ethernet-phy@1 {
134*b2d2a78aSEmmanuel Vadot		reg = <1>;
135*b2d2a78aSEmmanuel Vadot		device_type = "ethernet-phy";
136*b2d2a78aSEmmanuel Vadot	};
137*b2d2a78aSEmmanuel Vadot};
138*b2d2a78aSEmmanuel Vadot
139*b2d2a78aSEmmanuel Vadot&spi0 {
140*b2d2a78aSEmmanuel Vadot	cs-gpios = <&gpio0 6 GPIO_ACTIVE_LOW
141*b2d2a78aSEmmanuel Vadot		    &gpio0 7 GPIO_ACTIVE_LOW>;
142*b2d2a78aSEmmanuel Vadot	dmas = <&dma1 10 2>, <&dma1 10 1>;
143*b2d2a78aSEmmanuel Vadot	dma-names = "rx", "tx";
144*b2d2a78aSEmmanuel Vadot	status = "okay";
145*b2d2a78aSEmmanuel Vadot
146*b2d2a78aSEmmanuel Vadot	cs4271: codec@0 {
147*b2d2a78aSEmmanuel Vadot		compatible = "cirrus,cs4271";
148*b2d2a78aSEmmanuel Vadot		reg = <0>;
149*b2d2a78aSEmmanuel Vadot		#sound-dai-cells = <0>;
150*b2d2a78aSEmmanuel Vadot		spi-max-frequency = <6000000>;
151*b2d2a78aSEmmanuel Vadot		spi-cpol;
152*b2d2a78aSEmmanuel Vadot		spi-cpha;
153*b2d2a78aSEmmanuel Vadot		reset-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
154*b2d2a78aSEmmanuel Vadot		port {
155*b2d2a78aSEmmanuel Vadot			codec_ep: endpoint {
156*b2d2a78aSEmmanuel Vadot				remote-endpoint = <&i2s_ep>;
157*b2d2a78aSEmmanuel Vadot			};
158*b2d2a78aSEmmanuel Vadot		};
159*b2d2a78aSEmmanuel Vadot	};
160*b2d2a78aSEmmanuel Vadot
161*b2d2a78aSEmmanuel Vadot	at25f1024: eeprom@1 {
162*b2d2a78aSEmmanuel Vadot		compatible = "atmel,at25";
163*b2d2a78aSEmmanuel Vadot		reg = <1>;
164*b2d2a78aSEmmanuel Vadot		address-width = <8>;
165*b2d2a78aSEmmanuel Vadot		size = <0x20000>;
166*b2d2a78aSEmmanuel Vadot		pagesize = <256>;
167*b2d2a78aSEmmanuel Vadot		spi-max-frequency = <20000000>;
168*b2d2a78aSEmmanuel Vadot	};
169*b2d2a78aSEmmanuel Vadot};
170*b2d2a78aSEmmanuel Vadot
171*b2d2a78aSEmmanuel Vadot&uart0 {
172*b2d2a78aSEmmanuel Vadot	status = "okay";
173*b2d2a78aSEmmanuel Vadot};
174*b2d2a78aSEmmanuel Vadot
175*b2d2a78aSEmmanuel Vadot&uart1 {
176*b2d2a78aSEmmanuel Vadot	status = "okay";
177*b2d2a78aSEmmanuel Vadot};
178*b2d2a78aSEmmanuel Vadot
179*b2d2a78aSEmmanuel Vadot&usb0 {
180*b2d2a78aSEmmanuel Vadot	status = "okay";
181*b2d2a78aSEmmanuel Vadot};
182