]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
Merge remote-tracking branch 'l2-mtd/master'
[karo-tx-linux.git] / arch / arm64 / boot / dts / renesas / r8a7795-salvator-x.dts
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
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
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;
44                 ethernet0 = &avb;
45         };
46
47         chosen {
48                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
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         };
57
58         x12_clk: x12_clk {
59                 compatible = "fixed-clock";
60                 #clock-cells = <0>;
61                 clock-frequency = <24576000>;
62         };
63
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
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         };
89 };
90
91 &extal_clk {
92         clock-frequency = <16666666>;
93 };
94
95 &pfc {
96         pinctrl-0 = <&scif_clk_pins>;
97         pinctrl-names = "default";
98
99         scif1_pins: scif1 {
100                 renesas,groups = "scif1_data_a", "scif1_ctrl";
101                 renesas,function = "scif1";
102         };
103         scif2_pins: scif2 {
104                 renesas,groups = "scif2_data_a";
105                 renesas,function = "scif2";
106         };
107         scif_clk_pins: scif_clk {
108                 renesas,groups = "scif_clk_a";
109                 renesas,function = "scif_clk";
110         };
111
112         i2c2_pins: i2c2 {
113                 renesas,groups = "i2c2_a";
114                 renesas,function = "i2c2";
115         };
116
117         avb_pins: avb {
118                 renesas,groups = "avb_mdc";
119                 renesas,function = "avb";
120         };
121
122         sound_pins: sound {
123                 renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
124                 renesas,function = "ssi";
125         };
126
127         sound_clk_pins: sound_clk {
128                 renesas,groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
129                                  "audio_clkout_a", "audio_clkout3_a";
130                 renesas,function = "audio_clk";
131         };
132 };
133
134 &scif1 {
135         pinctrl-0 = <&scif1_pins>;
136         pinctrl-names = "default";
137
138         status = "okay";
139 };
140
141 &scif2 {
142         pinctrl-0 = <&scif2_pins>;
143         pinctrl-names = "default";
144
145         status = "okay";
146 };
147
148 &scif_clk {
149         clock-frequency = <14745600>;
150         status = "okay";
151 };
152
153 &i2c2 {
154         pinctrl-0 = <&i2c2_pins>;
155         pinctrl-names = "default";
156
157         status = "okay";
158
159         clock-frequency = <100000>;
160
161         ak4613: codec@10 {
162                 compatible = "asahi-kasei,ak4613";
163                 #sound-dai-cells = <0>;
164                 reg = <0x10>;
165                 clocks = <&rcar_sound 3>;
166
167                 asahi-kasei,in1-single-end;
168                 asahi-kasei,in2-single-end;
169                 asahi-kasei,out1-single-end;
170                 asahi-kasei,out2-single-end;
171                 asahi-kasei,out3-single-end;
172                 asahi-kasei,out4-single-end;
173                 asahi-kasei,out5-single-end;
174                 asahi-kasei,out6-single-end;
175         };
176
177         cs2000: clk_multiplier@4f {
178                 #clock-cells = <0>;
179                 compatible = "cirrus,cs2000-cp";
180                 reg = <0x4f>;
181                 clocks = <&audio_clkout>, <&x12_clk>;
182                 clock-names = "clk_in", "ref_clk";
183
184                 assigned-clocks = <&cs2000>;
185                 assigned-clock-rates = <24576000>; /* 1/1 divide */
186         };
187 };
188
189 &rcar_sound {
190         pinctrl-0 = <&sound_pins &sound_clk_pins>;
191         pinctrl-names = "default";
192
193         /* Single DAI */
194         #sound-dai-cells = <0>;
195
196         /* audio_clkout0/1/2/3 */
197         #clock-cells = <1>;
198         clock-frequency = <11289600>;
199
200         status = "okay";
201
202         /* update <audio_clk_b> to <cs2000> */
203         clocks = <&cpg CPG_MOD 1005>,
204                  <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
205                  <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
206                  <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
207                  <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
208                  <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
209                  <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
210                  <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
211                  <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
212                  <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
213                  <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
214                  <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
215                  <&audio_clk_a>, <&cs2000>,
216                  <&audio_clk_c>,
217                  <&cpg CPG_CORE R8A7795_CLK_S0D4>;
218
219         rcar_sound,dai {
220                 dai0 {
221                         playback = <&ssi0 &src0 &dvc0>;
222                         capture  = <&ssi1 &src1 &dvc1>;
223                 };
224         };
225 };
226
227 &sata {
228         status = "okay";
229 };
230
231 &ssi1 {
232         shared-pin;
233 };
234
235 &audio_clk_a {
236         clock-frequency = <22579200>;
237 };
238
239 &avb {
240         pinctrl-0 = <&avb_pins>;
241         pinctrl-names = "default";
242         renesas,no-ether-link;
243         phy-handle = <&phy0>;
244         status = "okay";
245
246         phy0: ethernet-phy@0 {
247                 rxc-skew-ps = <900>;
248                 rxdv-skew-ps = <0>;
249                 rxd0-skew-ps = <0>;
250                 rxd1-skew-ps = <0>;
251                 rxd2-skew-ps = <0>;
252                 rxd3-skew-ps = <0>;
253                 txc-skew-ps = <900>;
254                 txen-skew-ps = <0>;
255                 txd0-skew-ps = <0>;
256                 txd1-skew-ps = <0>;
257                 txd2-skew-ps = <0>;
258                 txd3-skew-ps = <0>;
259                 reg = <0>;
260                 interrupt-parent = <&gpio2>;
261                 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
262         };
263 };
264
265 &xhci0 {
266         status = "okay";
267 };