xref: /linux/scripts/dtc/include-prefixes/arm64/renesas/r8a77951-salvator-xs.dts (revision 052e99db7c00864c67150a37cf2a615f58c09a32)
1*052e99dbSGeert Uytterhoeven// SPDX-License-Identifier: GPL-2.0
2*052e99dbSGeert Uytterhoeven/*
3*052e99dbSGeert Uytterhoeven * Device Tree Source for the Salvator-X 2nd version board with R-Car H3 ES2.0+
4*052e99dbSGeert Uytterhoeven *
5*052e99dbSGeert Uytterhoeven * Copyright (C) 2015-2017 Renesas Electronics Corp.
6*052e99dbSGeert Uytterhoeven */
7*052e99dbSGeert Uytterhoeven
8*052e99dbSGeert Uytterhoeven/dts-v1/;
9*052e99dbSGeert Uytterhoeven#include "r8a77951.dtsi"
10*052e99dbSGeert Uytterhoeven#include "salvator-xs.dtsi"
11*052e99dbSGeert Uytterhoeven
12*052e99dbSGeert Uytterhoeven/ {
13*052e99dbSGeert Uytterhoeven	model = "Renesas Salvator-X 2nd version board based on r8a77951";
14*052e99dbSGeert Uytterhoeven	compatible = "renesas,salvator-xs", "renesas,r8a7795";
15*052e99dbSGeert Uytterhoeven
16*052e99dbSGeert Uytterhoeven	memory@48000000 {
17*052e99dbSGeert Uytterhoeven		device_type = "memory";
18*052e99dbSGeert Uytterhoeven		/* first 128MB is reserved for secure area. */
19*052e99dbSGeert Uytterhoeven		reg = <0x0 0x48000000 0x0 0x38000000>;
20*052e99dbSGeert Uytterhoeven	};
21*052e99dbSGeert Uytterhoeven
22*052e99dbSGeert Uytterhoeven	memory@500000000 {
23*052e99dbSGeert Uytterhoeven		device_type = "memory";
24*052e99dbSGeert Uytterhoeven		reg = <0x5 0x00000000 0x0 0x40000000>;
25*052e99dbSGeert Uytterhoeven	};
26*052e99dbSGeert Uytterhoeven
27*052e99dbSGeert Uytterhoeven	memory@600000000 {
28*052e99dbSGeert Uytterhoeven		device_type = "memory";
29*052e99dbSGeert Uytterhoeven		reg = <0x6 0x00000000 0x0 0x40000000>;
30*052e99dbSGeert Uytterhoeven	};
31*052e99dbSGeert Uytterhoeven
32*052e99dbSGeert Uytterhoeven	memory@700000000 {
33*052e99dbSGeert Uytterhoeven		device_type = "memory";
34*052e99dbSGeert Uytterhoeven		reg = <0x7 0x00000000 0x0 0x40000000>;
35*052e99dbSGeert Uytterhoeven	};
36*052e99dbSGeert Uytterhoeven};
37*052e99dbSGeert Uytterhoeven
38*052e99dbSGeert Uytterhoeven&du {
39*052e99dbSGeert Uytterhoeven	clocks = <&cpg CPG_MOD 724>,
40*052e99dbSGeert Uytterhoeven		 <&cpg CPG_MOD 723>,
41*052e99dbSGeert Uytterhoeven		 <&cpg CPG_MOD 722>,
42*052e99dbSGeert Uytterhoeven		 <&cpg CPG_MOD 721>,
43*052e99dbSGeert Uytterhoeven		 <&versaclock6 1>,
44*052e99dbSGeert Uytterhoeven		 <&x21_clk>,
45*052e99dbSGeert Uytterhoeven		 <&x22_clk>,
46*052e99dbSGeert Uytterhoeven		 <&versaclock6 2>;
47*052e99dbSGeert Uytterhoeven	clock-names = "du.0", "du.1", "du.2", "du.3",
48*052e99dbSGeert Uytterhoeven		      "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
49*052e99dbSGeert Uytterhoeven};
50*052e99dbSGeert Uytterhoeven
51*052e99dbSGeert Uytterhoeven&ehci2 {
52*052e99dbSGeert Uytterhoeven	status = "okay";
53*052e99dbSGeert Uytterhoeven};
54*052e99dbSGeert Uytterhoeven
55*052e99dbSGeert Uytterhoeven&ehci3 {
56*052e99dbSGeert Uytterhoeven	dr_mode = "otg";
57*052e99dbSGeert Uytterhoeven	status = "okay";
58*052e99dbSGeert Uytterhoeven};
59*052e99dbSGeert Uytterhoeven
60*052e99dbSGeert Uytterhoeven&hdmi0 {
61*052e99dbSGeert Uytterhoeven	status = "okay";
62*052e99dbSGeert Uytterhoeven
63*052e99dbSGeert Uytterhoeven	ports {
64*052e99dbSGeert Uytterhoeven		port@1 {
65*052e99dbSGeert Uytterhoeven			reg = <1>;
66*052e99dbSGeert Uytterhoeven			rcar_dw_hdmi0_out: endpoint {
67*052e99dbSGeert Uytterhoeven				remote-endpoint = <&hdmi0_con>;
68*052e99dbSGeert Uytterhoeven			};
69*052e99dbSGeert Uytterhoeven		};
70*052e99dbSGeert Uytterhoeven		port@2 {
71*052e99dbSGeert Uytterhoeven			reg = <2>;
72*052e99dbSGeert Uytterhoeven			dw_hdmi0_snd_in: endpoint {
73*052e99dbSGeert Uytterhoeven				remote-endpoint = <&rsnd_endpoint1>;
74*052e99dbSGeert Uytterhoeven			};
75*052e99dbSGeert Uytterhoeven		};
76*052e99dbSGeert Uytterhoeven	};
77*052e99dbSGeert Uytterhoeven};
78*052e99dbSGeert Uytterhoeven
79*052e99dbSGeert Uytterhoeven&hdmi0_con {
80*052e99dbSGeert Uytterhoeven	remote-endpoint = <&rcar_dw_hdmi0_out>;
81*052e99dbSGeert Uytterhoeven};
82*052e99dbSGeert Uytterhoeven
83*052e99dbSGeert Uytterhoeven&hdmi1 {
84*052e99dbSGeert Uytterhoeven	status = "okay";
85*052e99dbSGeert Uytterhoeven
86*052e99dbSGeert Uytterhoeven	ports {
87*052e99dbSGeert Uytterhoeven		port@1 {
88*052e99dbSGeert Uytterhoeven			reg = <1>;
89*052e99dbSGeert Uytterhoeven			rcar_dw_hdmi1_out: endpoint {
90*052e99dbSGeert Uytterhoeven				remote-endpoint = <&hdmi1_con>;
91*052e99dbSGeert Uytterhoeven			};
92*052e99dbSGeert Uytterhoeven		};
93*052e99dbSGeert Uytterhoeven		port@2 {
94*052e99dbSGeert Uytterhoeven			reg = <2>;
95*052e99dbSGeert Uytterhoeven			dw_hdmi1_snd_in: endpoint {
96*052e99dbSGeert Uytterhoeven				remote-endpoint = <&rsnd_endpoint2>;
97*052e99dbSGeert Uytterhoeven			};
98*052e99dbSGeert Uytterhoeven		};
99*052e99dbSGeert Uytterhoeven	};
100*052e99dbSGeert Uytterhoeven};
101*052e99dbSGeert Uytterhoeven
102*052e99dbSGeert Uytterhoeven&hdmi1_con {
103*052e99dbSGeert Uytterhoeven	remote-endpoint = <&rcar_dw_hdmi1_out>;
104*052e99dbSGeert Uytterhoeven};
105*052e99dbSGeert Uytterhoeven
106*052e99dbSGeert Uytterhoeven&hsusb3 {
107*052e99dbSGeert Uytterhoeven	dr_mode = "otg";
108*052e99dbSGeert Uytterhoeven	status = "okay";
109*052e99dbSGeert Uytterhoeven};
110*052e99dbSGeert Uytterhoeven
111*052e99dbSGeert Uytterhoeven&ohci2 {
112*052e99dbSGeert Uytterhoeven	status = "okay";
113*052e99dbSGeert Uytterhoeven};
114*052e99dbSGeert Uytterhoeven
115*052e99dbSGeert Uytterhoeven&ohci3 {
116*052e99dbSGeert Uytterhoeven	dr_mode = "otg";
117*052e99dbSGeert Uytterhoeven	status = "okay";
118*052e99dbSGeert Uytterhoeven};
119*052e99dbSGeert Uytterhoeven
120*052e99dbSGeert Uytterhoeven&pca9654 {
121*052e99dbSGeert Uytterhoeven	pcie_sata_switch {
122*052e99dbSGeert Uytterhoeven		gpio-hog;
123*052e99dbSGeert Uytterhoeven		gpios = <7 GPIO_ACTIVE_HIGH>;
124*052e99dbSGeert Uytterhoeven		output-low; /* enable SATA by default */
125*052e99dbSGeert Uytterhoeven		line-name = "PCIE/SATA switch";
126*052e99dbSGeert Uytterhoeven	};
127*052e99dbSGeert Uytterhoeven};
128*052e99dbSGeert Uytterhoeven
129*052e99dbSGeert Uytterhoeven&pfc {
130*052e99dbSGeert Uytterhoeven	usb2_pins: usb2 {
131*052e99dbSGeert Uytterhoeven		groups = "usb2";
132*052e99dbSGeert Uytterhoeven		function = "usb2";
133*052e99dbSGeert Uytterhoeven	};
134*052e99dbSGeert Uytterhoeven
135*052e99dbSGeert Uytterhoeven	/*
136*052e99dbSGeert Uytterhoeven	 * - On Salvator-X[S], GP6_3[01] are connected to ADV7482 as irq pins
137*052e99dbSGeert Uytterhoeven	 *   (when SW31 is the default setting on Salvator-XS).
138*052e99dbSGeert Uytterhoeven	 * - If SW31 is the default setting, you cannot use USB2.0 ch3 on
139*052e99dbSGeert Uytterhoeven	 *   r8a77951 with Salvator-XS.
140*052e99dbSGeert Uytterhoeven	 *   Hence the SW31 setting must be changed like 2) below.
141*052e99dbSGeert Uytterhoeven	 *   1) Default setting of SW31: ON-ON-OFF-OFF-OFF-OFF:
142*052e99dbSGeert Uytterhoeven	 *	- Connect GP6_3[01] to ADV7842.
143*052e99dbSGeert Uytterhoeven	 *   2) Changed setting of SW31: OFF-OFF-ON-ON-ON-ON:
144*052e99dbSGeert Uytterhoeven	 *	- Connect GP6_3[01] to BD082065 (USB2.0 ch3's host power).
145*052e99dbSGeert Uytterhoeven	 *	- Connect GP6_{04,21} to ADV7842.
146*052e99dbSGeert Uytterhoeven	 */
147*052e99dbSGeert Uytterhoeven	usb2_ch3_pins: usb2_ch3 {
148*052e99dbSGeert Uytterhoeven		groups = "usb2_ch3";
149*052e99dbSGeert Uytterhoeven		function = "usb2_ch3";
150*052e99dbSGeert Uytterhoeven	};
151*052e99dbSGeert Uytterhoeven};
152*052e99dbSGeert Uytterhoeven
153*052e99dbSGeert Uytterhoeven&rcar_sound {
154*052e99dbSGeert Uytterhoeven	ports {
155*052e99dbSGeert Uytterhoeven		/* rsnd_port0 is on salvator-common */
156*052e99dbSGeert Uytterhoeven		rsnd_port1: port@1 {
157*052e99dbSGeert Uytterhoeven			reg = <1>;
158*052e99dbSGeert Uytterhoeven			rsnd_endpoint1: endpoint {
159*052e99dbSGeert Uytterhoeven				remote-endpoint = <&dw_hdmi0_snd_in>;
160*052e99dbSGeert Uytterhoeven
161*052e99dbSGeert Uytterhoeven				dai-format = "i2s";
162*052e99dbSGeert Uytterhoeven				bitclock-master = <&rsnd_endpoint1>;
163*052e99dbSGeert Uytterhoeven				frame-master = <&rsnd_endpoint1>;
164*052e99dbSGeert Uytterhoeven
165*052e99dbSGeert Uytterhoeven				playback = <&ssi2>;
166*052e99dbSGeert Uytterhoeven			};
167*052e99dbSGeert Uytterhoeven		};
168*052e99dbSGeert Uytterhoeven		rsnd_port2: port@2 {
169*052e99dbSGeert Uytterhoeven			reg = <2>;
170*052e99dbSGeert Uytterhoeven			rsnd_endpoint2: endpoint {
171*052e99dbSGeert Uytterhoeven				remote-endpoint = <&dw_hdmi1_snd_in>;
172*052e99dbSGeert Uytterhoeven
173*052e99dbSGeert Uytterhoeven				dai-format = "i2s";
174*052e99dbSGeert Uytterhoeven				bitclock-master = <&rsnd_endpoint2>;
175*052e99dbSGeert Uytterhoeven				frame-master = <&rsnd_endpoint2>;
176*052e99dbSGeert Uytterhoeven
177*052e99dbSGeert Uytterhoeven				playback = <&ssi3>;
178*052e99dbSGeert Uytterhoeven			};
179*052e99dbSGeert Uytterhoeven		};
180*052e99dbSGeert Uytterhoeven	};
181*052e99dbSGeert Uytterhoeven};
182*052e99dbSGeert Uytterhoeven
183*052e99dbSGeert Uytterhoeven/* SW12-7 must be set 'Off' (MD12 set to 1) which is not the default! */
184*052e99dbSGeert Uytterhoeven&sata {
185*052e99dbSGeert Uytterhoeven	status = "okay";
186*052e99dbSGeert Uytterhoeven};
187*052e99dbSGeert Uytterhoeven
188*052e99dbSGeert Uytterhoeven&sound_card {
189*052e99dbSGeert Uytterhoeven	dais = <&rsnd_port0	/* ak4613 */
190*052e99dbSGeert Uytterhoeven		&rsnd_port1	/* HDMI0  */
191*052e99dbSGeert Uytterhoeven		&rsnd_port2>;	/* HDMI1  */
192*052e99dbSGeert Uytterhoeven};
193*052e99dbSGeert Uytterhoeven
194*052e99dbSGeert Uytterhoeven&usb2_phy2 {
195*052e99dbSGeert Uytterhoeven	pinctrl-0 = <&usb2_pins>;
196*052e99dbSGeert Uytterhoeven	pinctrl-names = "default";
197*052e99dbSGeert Uytterhoeven
198*052e99dbSGeert Uytterhoeven	status = "okay";
199*052e99dbSGeert Uytterhoeven};
200*052e99dbSGeert Uytterhoeven
201*052e99dbSGeert Uytterhoeven&usb2_phy3 {
202*052e99dbSGeert Uytterhoeven	pinctrl-0 = <&usb2_ch3_pins>;
203*052e99dbSGeert Uytterhoeven	pinctrl-names = "default";
204*052e99dbSGeert Uytterhoeven
205*052e99dbSGeert Uytterhoeven	status = "okay";
206*052e99dbSGeert Uytterhoeven};
207