Kuninori Morimoto | 1950fab | 2015-10-02 11:56:12 +0900 | [diff] [blame] | 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 | |
Kuninori Morimoto | 672b793 | 2015-11-25 06:39:13 +0000 | [diff] [blame] | 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 | |
Kuninori Morimoto | 1950fab | 2015-10-02 11:56:12 +0900 | [diff] [blame] | 34 | /dts-v1/; |
| 35 | #include "r8a7795.dtsi" |
Ai Kyuse | 1c0e7b9 | 2016-02-15 16:01:50 +0100 | [diff] [blame^] | 36 | #include <dt-bindings/gpio/gpio.h> |
Kuninori Morimoto | 1950fab | 2015-10-02 11:56:12 +0900 | [diff] [blame] | 37 | |
| 38 | / { |
| 39 | model = "Renesas Salvator-X board based on r8a7795"; |
| 40 | compatible = "renesas,salvator-x", "renesas,r8a7795"; |
| 41 | |
| 42 | aliases { |
| 43 | serial0 = &scif2; |
| 44 | serial1 = &scif1; |
Geert Uytterhoeven | 10ca6db | 2015-11-02 13:31:48 +0900 | [diff] [blame] | 45 | ethernet0 = &avb; |
Kuninori Morimoto | 1950fab | 2015-10-02 11:56:12 +0900 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | chosen { |
Simon Horman | b2407c5 | 2015-11-02 13:31:46 +0900 | [diff] [blame] | 49 | bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp"; |
Kuninori Morimoto | 1950fab | 2015-10-02 11:56:12 +0900 | [diff] [blame] | 50 | stdout-path = "serial0:115200n8"; |
| 51 | }; |
| 52 | |
| 53 | memory@48000000 { |
| 54 | device_type = "memory"; |
| 55 | /* first 128MB is reserved for secure area. */ |
| 56 | reg = <0x0 0x48000000 0x0 0x38000000>; |
| 57 | }; |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 58 | |
| 59 | x12_clk: x12_clk { |
| 60 | compatible = "fixed-clock"; |
| 61 | #clock-cells = <0>; |
| 62 | clock-frequency = <24576000>; |
| 63 | }; |
| 64 | |
Ai Kyuse | 1c0e7b9 | 2016-02-15 16:01:50 +0100 | [diff] [blame^] | 65 | vcc_sdhi0: regulator@1 { |
| 66 | compatible = "regulator-fixed"; |
| 67 | |
| 68 | regulator-name = "SDHI0 Vcc"; |
| 69 | regulator-min-microvolt = <3300000>; |
| 70 | regulator-max-microvolt = <3300000>; |
| 71 | |
| 72 | gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; |
| 73 | enable-active-high; |
| 74 | }; |
| 75 | |
| 76 | vccq_sdhi0: regulator@2 { |
| 77 | compatible = "regulator-gpio"; |
| 78 | |
| 79 | regulator-name = "SDHI0 VccQ"; |
| 80 | regulator-min-microvolt = <1800000>; |
| 81 | regulator-max-microvolt = <3300000>; |
| 82 | |
| 83 | gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; |
| 84 | gpios-states = <1>; |
| 85 | states = <3300000 1 |
| 86 | 1800000 0>; |
| 87 | }; |
| 88 | |
| 89 | vcc_sdhi3: regulator@3 { |
| 90 | compatible = "regulator-fixed"; |
| 91 | |
| 92 | regulator-name = "SDHI3 Vcc"; |
| 93 | regulator-min-microvolt = <3300000>; |
| 94 | regulator-max-microvolt = <3300000>; |
| 95 | |
| 96 | gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>; |
| 97 | enable-active-high; |
| 98 | }; |
| 99 | |
| 100 | vccq_sdhi3: regulator@4 { |
| 101 | compatible = "regulator-gpio"; |
| 102 | |
| 103 | regulator-name = "SDHI3 VccQ"; |
| 104 | regulator-min-microvolt = <1800000>; |
| 105 | regulator-max-microvolt = <3300000>; |
| 106 | |
| 107 | gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; |
| 108 | gpios-states = <1>; |
| 109 | states = <3300000 1 |
| 110 | 1800000 0>; |
| 111 | }; |
| 112 | |
Kuninori Morimoto | 8a8f181 | 2015-12-01 05:36:34 +0000 | [diff] [blame] | 113 | audio_clkout: audio_clkout { |
| 114 | /* |
| 115 | * This is same as <&rcar_sound 0> |
| 116 | * but needed to avoid cs2000/rcar_sound probe dead-lock |
| 117 | */ |
| 118 | compatible = "fixed-clock"; |
| 119 | #clock-cells = <0>; |
| 120 | clock-frequency = <11289600>; |
| 121 | }; |
| 122 | |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 123 | rsnd_ak4613: sound { |
| 124 | compatible = "simple-audio-card"; |
| 125 | |
| 126 | simple-audio-card,format = "left_j"; |
| 127 | simple-audio-card,bitclock-master = <&sndcpu>; |
| 128 | simple-audio-card,frame-master = <&sndcpu>; |
| 129 | |
| 130 | sndcpu: simple-audio-card,cpu { |
| 131 | sound-dai = <&rcar_sound>; |
| 132 | }; |
| 133 | |
| 134 | sndcodec: simple-audio-card,codec { |
| 135 | sound-dai = <&ak4613>; |
| 136 | }; |
| 137 | }; |
Kuninori Morimoto | 1950fab | 2015-10-02 11:56:12 +0900 | [diff] [blame] | 138 | }; |
| 139 | |
| 140 | &extal_clk { |
| 141 | clock-frequency = <16666666>; |
| 142 | }; |
| 143 | |
| 144 | &pfc { |
Geert Uytterhoeven | a3fc85e | 2016-01-29 11:17:26 +0100 | [diff] [blame] | 145 | pinctrl-0 = <&scif_clk_pins>; |
| 146 | pinctrl-names = "default"; |
| 147 | |
Kuninori Morimoto | 1950fab | 2015-10-02 11:56:12 +0900 | [diff] [blame] | 148 | scif1_pins: scif1 { |
| 149 | renesas,groups = "scif1_data_a", "scif1_ctrl"; |
| 150 | renesas,function = "scif1"; |
| 151 | }; |
| 152 | scif2_pins: scif2 { |
| 153 | renesas,groups = "scif2_data_a"; |
| 154 | renesas,function = "scif2"; |
| 155 | }; |
Geert Uytterhoeven | a3fc85e | 2016-01-29 11:17:26 +0100 | [diff] [blame] | 156 | scif_clk_pins: scif_clk { |
| 157 | renesas,groups = "scif_clk_a"; |
| 158 | renesas,function = "scif_clk"; |
| 159 | }; |
Kazuya Mizuguchi | 6fa501c | 2015-11-02 13:31:45 +0900 | [diff] [blame] | 160 | |
Kuninori Morimoto | 637d801 | 2015-10-28 08:05:28 +0900 | [diff] [blame] | 161 | i2c2_pins: i2c2 { |
| 162 | renesas,groups = "i2c2_a"; |
| 163 | renesas,function = "i2c2"; |
| 164 | }; |
| 165 | |
Kazuya Mizuguchi | 6fa501c | 2015-11-02 13:31:45 +0900 | [diff] [blame] | 166 | avb_pins: avb { |
| 167 | renesas,groups = "avb_mdc"; |
| 168 | renesas,function = "avb"; |
| 169 | }; |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 170 | |
Ai Kyuse | 1c0e7b9 | 2016-02-15 16:01:50 +0100 | [diff] [blame^] | 171 | sdhi0_pins: sd0 { |
| 172 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl"; |
| 173 | renesas,function = "sdhi0"; |
| 174 | }; |
| 175 | |
| 176 | sdhi3_pins: sd3 { |
| 177 | renesas,groups = "sdhi3_data4", "sdhi3_ctrl"; |
| 178 | renesas,function = "sdhi3"; |
| 179 | }; |
| 180 | |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 181 | sound_pins: sound { |
| 182 | renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; |
| 183 | renesas,function = "ssi"; |
| 184 | }; |
| 185 | |
| 186 | sound_clk_pins: sound_clk { |
| 187 | renesas,groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a", |
| 188 | "audio_clkout_a", "audio_clkout3_a"; |
| 189 | renesas,function = "audio_clk"; |
| 190 | }; |
Kuninori Morimoto | 1950fab | 2015-10-02 11:56:12 +0900 | [diff] [blame] | 191 | }; |
| 192 | |
| 193 | &scif1 { |
| 194 | pinctrl-0 = <&scif1_pins>; |
| 195 | pinctrl-names = "default"; |
| 196 | |
| 197 | status = "okay"; |
| 198 | }; |
| 199 | |
| 200 | &scif2 { |
| 201 | pinctrl-0 = <&scif2_pins>; |
| 202 | pinctrl-names = "default"; |
| 203 | |
| 204 | status = "okay"; |
| 205 | }; |
Kazuya Mizuguchi | 6fa501c | 2015-11-02 13:31:45 +0900 | [diff] [blame] | 206 | |
Geert Uytterhoeven | a3fc85e | 2016-01-29 11:17:26 +0100 | [diff] [blame] | 207 | &scif_clk { |
| 208 | clock-frequency = <14745600>; |
| 209 | status = "okay"; |
| 210 | }; |
| 211 | |
Kuninori Morimoto | 637d801 | 2015-10-28 08:05:28 +0900 | [diff] [blame] | 212 | &i2c2 { |
| 213 | pinctrl-0 = <&i2c2_pins>; |
| 214 | pinctrl-names = "default"; |
| 215 | |
| 216 | status = "okay"; |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 217 | |
| 218 | clock-frequency = <100000>; |
| 219 | |
| 220 | ak4613: codec@10 { |
| 221 | compatible = "asahi-kasei,ak4613"; |
| 222 | #sound-dai-cells = <0>; |
| 223 | reg = <0x10>; |
| 224 | clocks = <&rcar_sound 3>; |
Kuninori Morimoto | 40fbe14 | 2015-11-27 01:04:41 +0000 | [diff] [blame] | 225 | |
| 226 | asahi-kasei,in1-single-end; |
| 227 | asahi-kasei,in2-single-end; |
| 228 | asahi-kasei,out1-single-end; |
| 229 | asahi-kasei,out2-single-end; |
| 230 | asahi-kasei,out3-single-end; |
| 231 | asahi-kasei,out4-single-end; |
| 232 | asahi-kasei,out5-single-end; |
| 233 | asahi-kasei,out6-single-end; |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 234 | }; |
Kuninori Morimoto | 8a8f181 | 2015-12-01 05:36:34 +0000 | [diff] [blame] | 235 | |
| 236 | cs2000: clk_multiplier@4f { |
| 237 | #clock-cells = <0>; |
| 238 | compatible = "cirrus,cs2000-cp"; |
| 239 | reg = <0x4f>; |
| 240 | clocks = <&audio_clkout>, <&x12_clk>; |
| 241 | clock-names = "clk_in", "ref_clk"; |
| 242 | |
| 243 | assigned-clocks = <&cs2000>; |
| 244 | assigned-clock-rates = <24576000>; /* 1/1 divide */ |
| 245 | }; |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 246 | }; |
| 247 | |
| 248 | &rcar_sound { |
| 249 | pinctrl-0 = <&sound_pins &sound_clk_pins>; |
| 250 | pinctrl-names = "default"; |
| 251 | |
| 252 | /* Single DAI */ |
| 253 | #sound-dai-cells = <0>; |
| 254 | |
| 255 | /* audio_clkout0/1/2/3 */ |
| 256 | #clock-cells = <1>; |
| 257 | clock-frequency = <11289600>; |
| 258 | |
| 259 | status = "okay"; |
| 260 | |
Kuninori Morimoto | 8a8f181 | 2015-12-01 05:36:34 +0000 | [diff] [blame] | 261 | /* update <audio_clk_b> to <cs2000> */ |
| 262 | clocks = <&cpg CPG_MOD 1005>, |
| 263 | <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>, |
| 264 | <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>, |
| 265 | <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>, |
| 266 | <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>, |
| 267 | <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>, |
| 268 | <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>, |
| 269 | <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>, |
| 270 | <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>, |
| 271 | <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>, |
| 272 | <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>, |
| 273 | <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>, |
| 274 | <&audio_clk_a>, <&cs2000>, |
| 275 | <&audio_clk_c>, |
| 276 | <&cpg CPG_CORE R8A7795_CLK_S0D4>; |
| 277 | |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 278 | rcar_sound,dai { |
| 279 | dai0 { |
Kuninori Morimoto | 672b793 | 2015-11-25 06:39:13 +0000 | [diff] [blame] | 280 | playback = <&ssi0 &src0 &dvc0>; |
| 281 | capture = <&ssi1 &src1 &dvc1>; |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 282 | }; |
| 283 | }; |
| 284 | }; |
| 285 | |
Kouei Abe | 52ee9fb | 2015-12-14 16:42:35 +0100 | [diff] [blame] | 286 | &sata { |
| 287 | status = "okay"; |
| 288 | }; |
| 289 | |
Ai Kyuse | 1c0e7b9 | 2016-02-15 16:01:50 +0100 | [diff] [blame^] | 290 | &sdhi0 { |
| 291 | pinctrl-0 = <&sdhi0_pins>; |
| 292 | pinctrl-names = "default"; |
| 293 | |
| 294 | vmmc-supply = <&vcc_sdhi0>; |
| 295 | vqmmc-supply = <&vccq_sdhi0>; |
| 296 | cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; |
| 297 | wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; |
| 298 | bus-width = <4>; |
| 299 | status = "okay"; |
| 300 | }; |
| 301 | |
| 302 | &sdhi3 { |
| 303 | pinctrl-0 = <&sdhi3_pins>; |
| 304 | pinctrl-names = "default"; |
| 305 | |
| 306 | vmmc-supply = <&vcc_sdhi3>; |
| 307 | vqmmc-supply = <&vccq_sdhi3>; |
| 308 | cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; |
| 309 | wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>; |
| 310 | bus-width = <4>; |
| 311 | status = "okay"; |
| 312 | }; |
| 313 | |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 314 | &ssi1 { |
Kuninori Morimoto | 994aadf | 2015-11-25 06:37:49 +0000 | [diff] [blame] | 315 | shared-pin; |
| 316 | }; |
| 317 | |
| 318 | &audio_clk_a { |
| 319 | clock-frequency = <22579200>; |
Kuninori Morimoto | 637d801 | 2015-10-28 08:05:28 +0900 | [diff] [blame] | 320 | }; |
| 321 | |
Kazuya Mizuguchi | 6fa501c | 2015-11-02 13:31:45 +0900 | [diff] [blame] | 322 | &avb { |
| 323 | pinctrl-0 = <&avb_pins>; |
| 324 | pinctrl-names = "default"; |
| 325 | renesas,no-ether-link; |
| 326 | phy-handle = <&phy0>; |
| 327 | status = "okay"; |
| 328 | |
| 329 | phy0: ethernet-phy@0 { |
| 330 | rxc-skew-ps = <900>; |
| 331 | rxdv-skew-ps = <0>; |
| 332 | rxd0-skew-ps = <0>; |
| 333 | rxd1-skew-ps = <0>; |
| 334 | rxd2-skew-ps = <0>; |
| 335 | rxd3-skew-ps = <0>; |
| 336 | txc-skew-ps = <900>; |
| 337 | txen-skew-ps = <0>; |
| 338 | txd0-skew-ps = <0>; |
| 339 | txd1-skew-ps = <0>; |
| 340 | txd2-skew-ps = <0>; |
| 341 | txd3-skew-ps = <0>; |
| 342 | reg = <0>; |
| 343 | interrupt-parent = <&gpio2>; |
| 344 | interrupts = <11 IRQ_TYPE_LEVEL_LOW>; |
| 345 | }; |
| 346 | }; |
Yoshihiro Shimoda | 856ea9e | 2016-01-22 19:03:23 +0900 | [diff] [blame] | 347 | |
| 348 | &xhci0 { |
| 349 | status = "okay"; |
| 350 | }; |