1*726fd781SBiju Das// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*726fd781SBiju Das/*
3*726fd781SBiju Das * Device Tree Source for the RZ/{G2L,G2LC,V2L} SMARC EVK common parts
4*726fd781SBiju Das *
5*726fd781SBiju Das * Copyright (C) 2022 Renesas Electronics Corp.
6*726fd781SBiju Das */
7*726fd781SBiju Das
8*726fd781SBiju Das#include <dt-bindings/gpio/gpio.h>
9*726fd781SBiju Das#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
10*726fd781SBiju Das
11*726fd781SBiju Das/*
12*726fd781SBiju Das * SSI-WM8978
13*726fd781SBiju Das *
14*726fd781SBiju Das * This command is required when Playback/Capture
15*726fd781SBiju Das *
16*726fd781SBiju Das *	amixer cset name='Left Input Mixer L2 Switch' on
17*726fd781SBiju Das *	amixer cset name='Right Input Mixer R2 Switch' on
18*726fd781SBiju Das *	amixer cset name='Headphone Playback Volume' 100
19*726fd781SBiju Das *	amixer cset name='PCM Volume' 100%
20*726fd781SBiju Das *	amixer cset name='Input PGA Volume' 25
21*726fd781SBiju Das *
22*726fd781SBiju Das */
23*726fd781SBiju Das
24*726fd781SBiju Das/ {
25*726fd781SBiju Das	aliases {
26*726fd781SBiju Das		serial0 = &scif0;
27*726fd781SBiju Das		i2c0 = &i2c0;
28*726fd781SBiju Das		i2c1 = &i2c1;
29*726fd781SBiju Das	};
30*726fd781SBiju Das
31*726fd781SBiju Das	chosen {
32*726fd781SBiju Das		stdout-path = "serial0:115200n8";
33*726fd781SBiju Das	};
34*726fd781SBiju Das
35*726fd781SBiju Das	audio_mclock: audio_mclock {
36*726fd781SBiju Das		compatible = "fixed-clock";
37*726fd781SBiju Das		#clock-cells = <0>;
38*726fd781SBiju Das		clock-frequency = <11289600>;
39*726fd781SBiju Das	};
40*726fd781SBiju Das
41*726fd781SBiju Das	snd_rzg2l: sound {
42*726fd781SBiju Das		compatible = "simple-audio-card";
43*726fd781SBiju Das		simple-audio-card,format = "i2s";
44*726fd781SBiju Das		simple-audio-card,bitclock-master = <&cpu_dai>;
45*726fd781SBiju Das		simple-audio-card,frame-master = <&cpu_dai>;
46*726fd781SBiju Das		simple-audio-card,mclk-fs = <256>;
47*726fd781SBiju Das
48*726fd781SBiju Das		simple-audio-card,widgets = "Microphone", "Microphone Jack";
49*726fd781SBiju Das		simple-audio-card,routing =
50*726fd781SBiju Das			    "L2", "Mic Bias",
51*726fd781SBiju Das			    "R2", "Mic Bias",
52*726fd781SBiju Das			    "Mic Bias", "Microphone Jack";
53*726fd781SBiju Das
54*726fd781SBiju Das		cpu_dai: simple-audio-card,cpu {
55*726fd781SBiju Das		};
56*726fd781SBiju Das
57*726fd781SBiju Das		codec_dai: simple-audio-card,codec {
58*726fd781SBiju Das			clocks = <&audio_mclock>;
59*726fd781SBiju Das			sound-dai = <&wm8978>;
60*726fd781SBiju Das		};
61*726fd781SBiju Das	};
62*726fd781SBiju Das
63*726fd781SBiju Das	usb0_vbus_otg: regulator-usb0-vbus-otg {
64*726fd781SBiju Das		compatible = "regulator-fixed";
65*726fd781SBiju Das
66*726fd781SBiju Das		regulator-name = "USB0_VBUS_OTG";
67*726fd781SBiju Das		regulator-min-microvolt = <5000000>;
68*726fd781SBiju Das		regulator-max-microvolt = <5000000>;
69*726fd781SBiju Das	};
70*726fd781SBiju Das
71*726fd781SBiju Das	vccq_sdhi1: regulator-vccq-sdhi1 {
72*726fd781SBiju Das		compatible = "regulator-gpio";
73*726fd781SBiju Das		regulator-name = "SDHI1 VccQ";
74*726fd781SBiju Das		regulator-min-microvolt = <1800000>;
75*726fd781SBiju Das		regulator-max-microvolt = <3300000>;
76*726fd781SBiju Das		gpios-states = <1>;
77*726fd781SBiju Das		states = <3300000 1>, <1800000 0>;
78*726fd781SBiju Das	};
79*726fd781SBiju Das};
80*726fd781SBiju Das
81*726fd781SBiju Das&audio_clk1 {
82*726fd781SBiju Das	clock-frequency = <11289600>;
83*726fd781SBiju Das};
84*726fd781SBiju Das
85*726fd781SBiju Das&audio_clk2 {
86*726fd781SBiju Das	clock-frequency = <12288000>;
87*726fd781SBiju Das};
88*726fd781SBiju Das
89*726fd781SBiju Das&canfd {
90*726fd781SBiju Das	pinctrl-0 = <&can0_pins &can1_pins>;
91*726fd781SBiju Das	pinctrl-names = "default";
92*726fd781SBiju Das	status = "okay";
93*726fd781SBiju Das
94*726fd781SBiju Das	channel0 {
95*726fd781SBiju Das		status = "okay";
96*726fd781SBiju Das	};
97*726fd781SBiju Das
98*726fd781SBiju Das	channel1 {
99*726fd781SBiju Das		status = "okay";
100*726fd781SBiju Das	};
101*726fd781SBiju Das};
102*726fd781SBiju Das
103*726fd781SBiju Das&ehci0 {
104*726fd781SBiju Das	dr_mode = "otg";
105*726fd781SBiju Das	status = "okay";
106*726fd781SBiju Das};
107*726fd781SBiju Das
108*726fd781SBiju Das&ehci1 {
109*726fd781SBiju Das	status = "okay";
110*726fd781SBiju Das};
111*726fd781SBiju Das
112*726fd781SBiju Das&hsusb {
113*726fd781SBiju Das	dr_mode = "otg";
114*726fd781SBiju Das	status = "okay";
115*726fd781SBiju Das};
116*726fd781SBiju Das
117*726fd781SBiju Das&i2c0 {
118*726fd781SBiju Das	pinctrl-0 = <&i2c0_pins>;
119*726fd781SBiju Das	pinctrl-names = "default";
120*726fd781SBiju Das
121*726fd781SBiju Das	status = "okay";
122*726fd781SBiju Das};
123*726fd781SBiju Das
124*726fd781SBiju Das&i2c1 {
125*726fd781SBiju Das	pinctrl-0 = <&i2c1_pins>;
126*726fd781SBiju Das	pinctrl-names = "default";
127*726fd781SBiju Das
128*726fd781SBiju Das	status = "okay";
129*726fd781SBiju Das};
130*726fd781SBiju Das
131*726fd781SBiju Das&ohci0 {
132*726fd781SBiju Das	dr_mode = "otg";
133*726fd781SBiju Das	status = "okay";
134*726fd781SBiju Das};
135*726fd781SBiju Das
136*726fd781SBiju Das&ohci1 {
137*726fd781SBiju Das	status = "okay";
138*726fd781SBiju Das};
139*726fd781SBiju Das
140*726fd781SBiju Das&phyrst {
141*726fd781SBiju Das	status = "okay";
142*726fd781SBiju Das};
143*726fd781SBiju Das
144*726fd781SBiju Das&scif0 {
145*726fd781SBiju Das	pinctrl-0 = <&scif0_pins>;
146*726fd781SBiju Das	pinctrl-names = "default";
147*726fd781SBiju Das	status = "okay";
148*726fd781SBiju Das};
149*726fd781SBiju Das
150*726fd781SBiju Das&sdhi1 {
151*726fd781SBiju Das	pinctrl-0 = <&sdhi1_pins>;
152*726fd781SBiju Das	pinctrl-1 = <&sdhi1_pins_uhs>;
153*726fd781SBiju Das	pinctrl-names = "default", "state_uhs";
154*726fd781SBiju Das
155*726fd781SBiju Das	vmmc-supply = <&reg_3p3v>;
156*726fd781SBiju Das	vqmmc-supply = <&vccq_sdhi1>;
157*726fd781SBiju Das	bus-width = <4>;
158*726fd781SBiju Das	sd-uhs-sdr50;
159*726fd781SBiju Das	sd-uhs-sdr104;
160*726fd781SBiju Das	status = "okay";
161*726fd781SBiju Das};
162*726fd781SBiju Das
163*726fd781SBiju Das&spi1 {
164*726fd781SBiju Das	pinctrl-0 = <&spi1_pins>;
165*726fd781SBiju Das	pinctrl-names = "default";
166*726fd781SBiju Das
167*726fd781SBiju Das	status = "okay";
168*726fd781SBiju Das};
169*726fd781SBiju Das
170*726fd781SBiju Das&usb2_phy0 {
171*726fd781SBiju Das	pinctrl-0 = <&usb0_pins>;
172*726fd781SBiju Das	pinctrl-names = "default";
173*726fd781SBiju Das
174*726fd781SBiju Das	vbus-supply = <&usb0_vbus_otg>;
175*726fd781SBiju Das	status = "okay";
176*726fd781SBiju Das};
177*726fd781SBiju Das
178*726fd781SBiju Das&usb2_phy1 {
179*726fd781SBiju Das	pinctrl-0 = <&usb1_pins>;
180*726fd781SBiju Das	pinctrl-names = "default";
181*726fd781SBiju Das
182*726fd781SBiju Das	status = "okay";
183*726fd781SBiju Das};
184