Commit | Line | Data |
---|---|---|
1950fab0 KM |
1 | /* |
2 | * Device Tree Source for the Salvator-X board | |
3 | * | |
4 | * Copyright (C) 2015 Renesas Electronics Corp. | |
5 | * | |
6 | * This file is licensed under the terms of the GNU General Public License | |
7 | * version 2. This program is licensed "as is" without any warranty of any | |
8 | * kind, whether express or implied. | |
9 | */ | |
10 | ||
672b7931 KM |
11 | /* |
12 | * SSI-AK4613 | |
13 | * | |
14 | * This command is required when Playback/Capture | |
15 | * | |
16 | * amixer set "DVC Out" 100% | |
17 | * amixer set "DVC In" 100% | |
18 | * | |
19 | * You can use Mute | |
20 | * | |
21 | * amixer set "DVC Out Mute" on | |
22 | * amixer set "DVC In Mute" on | |
23 | * | |
24 | * You can use Volume Ramp | |
25 | * | |
26 | * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps" | |
27 | * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps" | |
28 | * amixer set "DVC Out Ramp" on | |
29 | * aplay xxx.wav & | |
30 | * amixer set "DVC Out" 80% // Volume Down | |
31 | * amixer set "DVC Out" 100% // Volume Up | |
32 | */ | |
33 | ||
1950fab0 KM |
34 | /dts-v1/; |
35 | #include "r8a7795.dtsi" | |
36 | ||
37 | / { | |
38 | model = "Renesas Salvator-X board based on r8a7795"; | |
39 | compatible = "renesas,salvator-x", "renesas,r8a7795"; | |
40 | ||
41 | aliases { | |
42 | serial0 = &scif2; | |
43 | serial1 = &scif1; | |
10ca6db7 | 44 | ethernet0 = &avb; |
1950fab0 KM |
45 | }; |
46 | ||
47 | chosen { | |
b2407c56 | 48 | bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp"; |
1950fab0 KM |
49 | stdout-path = "serial0:115200n8"; |
50 | }; | |
51 | ||
52 | memory@48000000 { | |
53 | device_type = "memory"; | |
54 | /* first 128MB is reserved for secure area. */ | |
55 | reg = <0x0 0x48000000 0x0 0x38000000>; | |
56 | }; | |
994aadf0 KM |
57 | |
58 | x12_clk: x12_clk { | |
59 | compatible = "fixed-clock"; | |
60 | #clock-cells = <0>; | |
61 | clock-frequency = <24576000>; | |
62 | }; | |
63 | ||
8a8f181d KM |
64 | audio_clkout: audio_clkout { |
65 | /* | |
66 | * This is same as <&rcar_sound 0> | |
67 | * but needed to avoid cs2000/rcar_sound probe dead-lock | |
68 | */ | |
69 | compatible = "fixed-clock"; | |
70 | #clock-cells = <0>; | |
71 | clock-frequency = <11289600>; | |
72 | }; | |
73 | ||
994aadf0 KM |
74 | rsnd_ak4613: sound { |
75 | compatible = "simple-audio-card"; | |
76 | ||
77 | simple-audio-card,format = "left_j"; | |
78 | simple-audio-card,bitclock-master = <&sndcpu>; | |
79 | simple-audio-card,frame-master = <&sndcpu>; | |
80 | ||
81 | sndcpu: simple-audio-card,cpu { | |
82 | sound-dai = <&rcar_sound>; | |
83 | }; | |
84 | ||
85 | sndcodec: simple-audio-card,codec { | |
86 | sound-dai = <&ak4613>; | |
87 | }; | |
88 | }; | |
1950fab0 KM |
89 | }; |
90 | ||
91 | &extal_clk { | |
92 | clock-frequency = <16666666>; | |
93 | }; | |
94 | ||
95 | &pfc { | |
96 | scif1_pins: scif1 { | |
97 | renesas,groups = "scif1_data_a", "scif1_ctrl"; | |
98 | renesas,function = "scif1"; | |
99 | }; | |
100 | scif2_pins: scif2 { | |
101 | renesas,groups = "scif2_data_a"; | |
102 | renesas,function = "scif2"; | |
103 | }; | |
6fa501c5 | 104 | |
637d801e KM |
105 | i2c2_pins: i2c2 { |
106 | renesas,groups = "i2c2_a"; | |
107 | renesas,function = "i2c2"; | |
108 | }; | |
109 | ||
6fa501c5 KM |
110 | avb_pins: avb { |
111 | renesas,groups = "avb_mdc"; | |
112 | renesas,function = "avb"; | |
113 | }; | |
994aadf0 KM |
114 | |
115 | sound_pins: sound { | |
116 | renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; | |
117 | renesas,function = "ssi"; | |
118 | }; | |
119 | ||
120 | sound_clk_pins: sound_clk { | |
121 | renesas,groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a", | |
122 | "audio_clkout_a", "audio_clkout3_a"; | |
123 | renesas,function = "audio_clk"; | |
124 | }; | |
1950fab0 KM |
125 | }; |
126 | ||
127 | &scif1 { | |
128 | pinctrl-0 = <&scif1_pins>; | |
129 | pinctrl-names = "default"; | |
130 | ||
131 | status = "okay"; | |
132 | }; | |
133 | ||
134 | &scif2 { | |
135 | pinctrl-0 = <&scif2_pins>; | |
136 | pinctrl-names = "default"; | |
137 | ||
138 | status = "okay"; | |
139 | }; | |
6fa501c5 | 140 | |
637d801e KM |
141 | &i2c2 { |
142 | pinctrl-0 = <&i2c2_pins>; | |
143 | pinctrl-names = "default"; | |
144 | ||
145 | status = "okay"; | |
994aadf0 KM |
146 | |
147 | clock-frequency = <100000>; | |
148 | ||
149 | ak4613: codec@10 { | |
150 | compatible = "asahi-kasei,ak4613"; | |
151 | #sound-dai-cells = <0>; | |
152 | reg = <0x10>; | |
153 | clocks = <&rcar_sound 3>; | |
40fbe14b KM |
154 | |
155 | asahi-kasei,in1-single-end; | |
156 | asahi-kasei,in2-single-end; | |
157 | asahi-kasei,out1-single-end; | |
158 | asahi-kasei,out2-single-end; | |
159 | asahi-kasei,out3-single-end; | |
160 | asahi-kasei,out4-single-end; | |
161 | asahi-kasei,out5-single-end; | |
162 | asahi-kasei,out6-single-end; | |
994aadf0 | 163 | }; |
8a8f181d KM |
164 | |
165 | cs2000: clk_multiplier@4f { | |
166 | #clock-cells = <0>; | |
167 | compatible = "cirrus,cs2000-cp"; | |
168 | reg = <0x4f>; | |
169 | clocks = <&audio_clkout>, <&x12_clk>; | |
170 | clock-names = "clk_in", "ref_clk"; | |
171 | ||
172 | assigned-clocks = <&cs2000>; | |
173 | assigned-clock-rates = <24576000>; /* 1/1 divide */ | |
174 | }; | |
994aadf0 KM |
175 | }; |
176 | ||
177 | &rcar_sound { | |
178 | pinctrl-0 = <&sound_pins &sound_clk_pins>; | |
179 | pinctrl-names = "default"; | |
180 | ||
181 | /* Single DAI */ | |
182 | #sound-dai-cells = <0>; | |
183 | ||
184 | /* audio_clkout0/1/2/3 */ | |
185 | #clock-cells = <1>; | |
186 | clock-frequency = <11289600>; | |
187 | ||
188 | status = "okay"; | |
189 | ||
8a8f181d KM |
190 | /* update <audio_clk_b> to <cs2000> */ |
191 | clocks = <&cpg CPG_MOD 1005>, | |
192 | <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>, | |
193 | <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>, | |
194 | <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>, | |
195 | <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>, | |
196 | <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>, | |
197 | <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>, | |
198 | <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>, | |
199 | <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>, | |
200 | <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>, | |
201 | <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>, | |
202 | <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>, | |
203 | <&audio_clk_a>, <&cs2000>, | |
204 | <&audio_clk_c>, | |
205 | <&cpg CPG_CORE R8A7795_CLK_S0D4>; | |
206 | ||
994aadf0 KM |
207 | rcar_sound,dai { |
208 | dai0 { | |
672b7931 KM |
209 | playback = <&ssi0 &src0 &dvc0>; |
210 | capture = <&ssi1 &src1 &dvc1>; | |
994aadf0 KM |
211 | }; |
212 | }; | |
213 | }; | |
214 | ||
52ee9fb3 KA |
215 | &sata { |
216 | status = "okay"; | |
217 | }; | |
218 | ||
994aadf0 | 219 | &ssi1 { |
994aadf0 KM |
220 | shared-pin; |
221 | }; | |
222 | ||
223 | &audio_clk_a { | |
224 | clock-frequency = <22579200>; | |
637d801e KM |
225 | }; |
226 | ||
6fa501c5 KM |
227 | &avb { |
228 | pinctrl-0 = <&avb_pins>; | |
229 | pinctrl-names = "default"; | |
230 | renesas,no-ether-link; | |
231 | phy-handle = <&phy0>; | |
232 | status = "okay"; | |
233 | ||
234 | phy0: ethernet-phy@0 { | |
235 | rxc-skew-ps = <900>; | |
236 | rxdv-skew-ps = <0>; | |
237 | rxd0-skew-ps = <0>; | |
238 | rxd1-skew-ps = <0>; | |
239 | rxd2-skew-ps = <0>; | |
240 | rxd3-skew-ps = <0>; | |
241 | txc-skew-ps = <900>; | |
242 | txen-skew-ps = <0>; | |
243 | txd0-skew-ps = <0>; | |
244 | txd1-skew-ps = <0>; | |
245 | txd2-skew-ps = <0>; | |
246 | txd3-skew-ps = <0>; | |
247 | reg = <0>; | |
248 | interrupt-parent = <&gpio2>; | |
249 | interrupts = <11 IRQ_TYPE_LEVEL_LOW>; | |
250 | }; | |
251 | }; | |
856ea9ed YS |
252 | |
253 | &xhci0 { | |
254 | status = "okay"; | |
255 | }; |