Marek Vasut | 36f83d9 | 2017-09-12 23:01:51 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Device Tree Source for the R-Car Gen3 ULCB board |
| 3 | * |
| 4 | * Copyright (C) 2016 Renesas Electronics Corp. |
| 5 | * Copyright (C) 2016 Cogent Embedded, Inc. |
| 6 | * |
| 7 | * This file is licensed under the terms of the GNU General Public License |
| 8 | * version 2. This program is licensed "as is" without any warranty of any |
| 9 | * kind, whether express or implied. |
| 10 | */ |
| 11 | |
| 12 | #include <dt-bindings/gpio/gpio.h> |
| 13 | #include <dt-bindings/input/input.h> |
| 14 | |
| 15 | / { |
| 16 | model = "Renesas R-Car Gen3 ULCB board"; |
| 17 | |
| 18 | aliases { |
| 19 | serial0 = &scif2; |
| 20 | ethernet0 = &avb; |
| 21 | }; |
| 22 | |
| 23 | chosen { |
| 24 | stdout-path = "serial0:115200n8"; |
| 25 | }; |
| 26 | |
| 27 | audio_clkout: audio-clkout { |
| 28 | /* |
| 29 | * This is same as <&rcar_sound 0> |
| 30 | * but needed to avoid cs2000/rcar_sound probe dead-lock |
| 31 | */ |
| 32 | compatible = "fixed-clock"; |
| 33 | #clock-cells = <0>; |
| 34 | clock-frequency = <11289600>; |
| 35 | }; |
| 36 | |
| 37 | keyboard { |
| 38 | compatible = "gpio-keys"; |
| 39 | |
| 40 | key-1 { |
| 41 | linux,code = <KEY_1>; |
| 42 | label = "SW3"; |
| 43 | wakeup-source; |
| 44 | debounce-interval = <20>; |
| 45 | gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; |
| 46 | }; |
| 47 | }; |
| 48 | |
| 49 | leds { |
| 50 | compatible = "gpio-leds"; |
| 51 | |
| 52 | led5 { |
| 53 | gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; |
| 54 | }; |
| 55 | led6 { |
| 56 | gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>; |
| 57 | }; |
| 58 | }; |
| 59 | |
| 60 | reg_1p8v: regulator0 { |
| 61 | compatible = "regulator-fixed"; |
| 62 | regulator-name = "fixed-1.8V"; |
| 63 | regulator-min-microvolt = <1800000>; |
| 64 | regulator-max-microvolt = <1800000>; |
| 65 | regulator-boot-on; |
| 66 | regulator-always-on; |
| 67 | }; |
| 68 | |
| 69 | reg_3p3v: regulator1 { |
| 70 | compatible = "regulator-fixed"; |
| 71 | regulator-name = "fixed-3.3V"; |
| 72 | regulator-min-microvolt = <3300000>; |
| 73 | regulator-max-microvolt = <3300000>; |
| 74 | regulator-boot-on; |
| 75 | regulator-always-on; |
| 76 | }; |
| 77 | |
| 78 | rsnd_ak4613: sound { |
| 79 | compatible = "simple-audio-card"; |
| 80 | |
| 81 | simple-audio-card,format = "left_j"; |
| 82 | simple-audio-card,bitclock-master = <&sndcpu>; |
| 83 | simple-audio-card,frame-master = <&sndcpu>; |
| 84 | |
| 85 | sndcpu: simple-audio-card,cpu { |
| 86 | sound-dai = <&rcar_sound>; |
| 87 | }; |
| 88 | |
| 89 | sndcodec: simple-audio-card,codec { |
| 90 | sound-dai = <&ak4613>; |
| 91 | }; |
| 92 | }; |
| 93 | |
| 94 | vcc_sdhi0: regulator-vcc-sdhi0 { |
| 95 | compatible = "regulator-fixed"; |
| 96 | |
| 97 | regulator-name = "SDHI0 Vcc"; |
| 98 | regulator-min-microvolt = <3300000>; |
| 99 | regulator-max-microvolt = <3300000>; |
| 100 | |
| 101 | gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; |
| 102 | enable-active-high; |
| 103 | }; |
| 104 | |
| 105 | vccq_sdhi0: regulator-vccq-sdhi0 { |
| 106 | compatible = "regulator-gpio"; |
| 107 | |
| 108 | regulator-name = "SDHI0 VccQ"; |
| 109 | regulator-min-microvolt = <1800000>; |
| 110 | regulator-max-microvolt = <3300000>; |
| 111 | |
| 112 | gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; |
| 113 | gpios-states = <1>; |
| 114 | states = <3300000 1 |
| 115 | 1800000 0>; |
| 116 | }; |
| 117 | |
| 118 | x12_clk: x12 { |
| 119 | compatible = "fixed-clock"; |
| 120 | #clock-cells = <0>; |
| 121 | clock-frequency = <24576000>; |
| 122 | }; |
| 123 | }; |
| 124 | |
| 125 | &audio_clk_a { |
| 126 | clock-frequency = <22579200>; |
| 127 | }; |
| 128 | |
| 129 | &avb { |
| 130 | pinctrl-0 = <&avb_pins>; |
| 131 | pinctrl-names = "default"; |
| 132 | renesas,no-ether-link; |
| 133 | phy-handle = <&phy0>; |
Marek Vasut | 4c3070f | 2017-09-15 21:11:40 +0200 | [diff] [blame] | 134 | reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>; |
Marek Vasut | 36f83d9 | 2017-09-12 23:01:51 +0200 | [diff] [blame] | 135 | status = "okay"; |
| 136 | |
| 137 | phy0: ethernet-phy@0 { |
| 138 | rxc-skew-ps = <1500>; |
| 139 | reg = <0>; |
| 140 | interrupt-parent = <&gpio2>; |
| 141 | interrupts = <11 IRQ_TYPE_LEVEL_LOW>; |
| 142 | }; |
| 143 | }; |
| 144 | |
| 145 | &ehci1 { |
| 146 | status = "okay"; |
| 147 | }; |
| 148 | |
| 149 | &extal_clk { |
| 150 | clock-frequency = <16666666>; |
| 151 | }; |
| 152 | |
| 153 | &extalr_clk { |
| 154 | clock-frequency = <32768>; |
| 155 | }; |
| 156 | |
| 157 | &i2c2 { |
| 158 | pinctrl-0 = <&i2c2_pins>; |
| 159 | pinctrl-names = "default"; |
| 160 | |
| 161 | status = "okay"; |
| 162 | |
| 163 | clock-frequency = <100000>; |
| 164 | |
| 165 | ak4613: codec@10 { |
| 166 | compatible = "asahi-kasei,ak4613"; |
| 167 | #sound-dai-cells = <0>; |
| 168 | reg = <0x10>; |
| 169 | clocks = <&rcar_sound 3>; |
| 170 | |
| 171 | asahi-kasei,in1-single-end; |
| 172 | asahi-kasei,in2-single-end; |
| 173 | asahi-kasei,out1-single-end; |
| 174 | asahi-kasei,out2-single-end; |
| 175 | asahi-kasei,out3-single-end; |
| 176 | asahi-kasei,out4-single-end; |
| 177 | asahi-kasei,out5-single-end; |
| 178 | asahi-kasei,out6-single-end; |
| 179 | }; |
| 180 | |
| 181 | cs2000: clk-multiplier@4f { |
| 182 | #clock-cells = <0>; |
| 183 | compatible = "cirrus,cs2000-cp"; |
| 184 | reg = <0x4f>; |
| 185 | clocks = <&audio_clkout>, <&x12_clk>; |
| 186 | clock-names = "clk_in", "ref_clk"; |
| 187 | |
| 188 | assigned-clocks = <&cs2000>; |
| 189 | assigned-clock-rates = <24576000>; /* 1/1 divide */ |
| 190 | }; |
| 191 | }; |
| 192 | |
Marek Vasut | c00ab67 | 2017-11-27 07:36:22 +0100 | [diff] [blame^] | 193 | &i2c_dvfs { |
| 194 | status = "okay"; |
| 195 | }; |
| 196 | |
Marek Vasut | 36f83d9 | 2017-09-12 23:01:51 +0200 | [diff] [blame] | 197 | &ohci1 { |
| 198 | status = "okay"; |
| 199 | }; |
| 200 | |
| 201 | &pfc { |
| 202 | pinctrl-0 = <&scif_clk_pins>; |
| 203 | pinctrl-names = "default"; |
| 204 | |
| 205 | avb_pins: avb { |
| 206 | mux { |
| 207 | groups = "avb_link", "avb_phy_int", "avb_mdc", |
| 208 | "avb_mii"; |
| 209 | function = "avb"; |
| 210 | }; |
| 211 | |
| 212 | pins_mdc { |
| 213 | groups = "avb_mdc"; |
| 214 | drive-strength = <24>; |
| 215 | }; |
| 216 | |
| 217 | pins_mii_tx { |
| 218 | pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0", |
| 219 | "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3"; |
| 220 | drive-strength = <12>; |
| 221 | }; |
| 222 | }; |
| 223 | |
| 224 | i2c2_pins: i2c2 { |
| 225 | groups = "i2c2_a"; |
| 226 | function = "i2c2"; |
| 227 | }; |
| 228 | |
| 229 | scif2_pins: scif2 { |
| 230 | groups = "scif2_data_a"; |
| 231 | function = "scif2"; |
| 232 | }; |
| 233 | |
| 234 | scif_clk_pins: scif_clk { |
| 235 | groups = "scif_clk_a"; |
| 236 | function = "scif_clk"; |
| 237 | }; |
| 238 | |
| 239 | sdhi0_pins: sd0 { |
| 240 | groups = "sdhi0_data4", "sdhi0_ctrl"; |
| 241 | function = "sdhi0"; |
| 242 | power-source = <3300>; |
| 243 | }; |
| 244 | |
| 245 | sdhi0_pins_uhs: sd0_uhs { |
| 246 | groups = "sdhi0_data4", "sdhi0_ctrl"; |
| 247 | function = "sdhi0"; |
| 248 | power-source = <1800>; |
| 249 | }; |
| 250 | |
| 251 | sdhi2_pins: sd2 { |
| 252 | groups = "sdhi2_data8", "sdhi2_ctrl"; |
| 253 | function = "sdhi2"; |
Marek Vasut | 86019b4 | 2017-11-26 14:50:37 +0100 | [diff] [blame] | 254 | power-source = <1800>; |
Marek Vasut | 36f83d9 | 2017-09-12 23:01:51 +0200 | [diff] [blame] | 255 | }; |
| 256 | |
| 257 | sdhi2_pins_uhs: sd2_uhs { |
| 258 | groups = "sdhi2_data8", "sdhi2_ctrl"; |
| 259 | function = "sdhi2"; |
| 260 | power-source = <1800>; |
| 261 | }; |
| 262 | |
| 263 | sound_pins: sound { |
| 264 | groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; |
| 265 | function = "ssi"; |
| 266 | }; |
| 267 | |
| 268 | sound_clk_pins: sound-clk { |
| 269 | groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a", |
| 270 | "audio_clkout_a", "audio_clkout3_a"; |
| 271 | function = "audio_clk"; |
| 272 | }; |
| 273 | |
| 274 | usb1_pins: usb1 { |
| 275 | groups = "usb1"; |
| 276 | function = "usb1"; |
| 277 | }; |
| 278 | }; |
| 279 | |
| 280 | &rcar_sound { |
| 281 | pinctrl-0 = <&sound_pins &sound_clk_pins>; |
| 282 | pinctrl-names = "default"; |
| 283 | |
| 284 | /* Single DAI */ |
| 285 | #sound-dai-cells = <0>; |
| 286 | |
| 287 | /* audio_clkout0/1/2/3 */ |
| 288 | #clock-cells = <1>; |
| 289 | clock-frequency = <12288000 11289600>; |
| 290 | |
| 291 | status = "okay"; |
| 292 | |
| 293 | /* update <audio_clk_b> to <cs2000> */ |
| 294 | clocks = <&cpg CPG_MOD 1005>, |
| 295 | <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>, |
| 296 | <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>, |
| 297 | <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>, |
| 298 | <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>, |
| 299 | <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>, |
| 300 | <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>, |
| 301 | <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>, |
| 302 | <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>, |
| 303 | <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>, |
| 304 | <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>, |
| 305 | <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>, |
| 306 | <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>, |
| 307 | <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>, |
| 308 | <&audio_clk_a>, <&cs2000>, |
| 309 | <&audio_clk_c>, |
| 310 | <&cpg CPG_CORE CPG_AUDIO_CLK_I>; |
| 311 | |
| 312 | rcar_sound,dai { |
| 313 | dai0 { |
| 314 | playback = <&ssi0 &src0 &dvc0>; |
| 315 | capture = <&ssi1 &src1 &dvc1>; |
| 316 | }; |
| 317 | }; |
| 318 | }; |
| 319 | |
| 320 | &scif2 { |
| 321 | pinctrl-0 = <&scif2_pins>; |
| 322 | pinctrl-names = "default"; |
| 323 | |
| 324 | status = "okay"; |
| 325 | }; |
| 326 | |
| 327 | &scif_clk { |
| 328 | clock-frequency = <14745600>; |
| 329 | }; |
| 330 | |
| 331 | &sdhi0 { |
| 332 | pinctrl-0 = <&sdhi0_pins>; |
| 333 | pinctrl-1 = <&sdhi0_pins_uhs>; |
| 334 | pinctrl-names = "default", "state_uhs"; |
| 335 | |
| 336 | vmmc-supply = <&vcc_sdhi0>; |
| 337 | vqmmc-supply = <&vccq_sdhi0>; |
| 338 | cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; |
| 339 | bus-width = <4>; |
| 340 | sd-uhs-sdr50; |
| 341 | status = "okay"; |
| 342 | }; |
| 343 | |
| 344 | &sdhi2 { |
| 345 | /* used for on-board 8bit eMMC */ |
| 346 | pinctrl-0 = <&sdhi2_pins>; |
| 347 | pinctrl-1 = <&sdhi2_pins_uhs>; |
| 348 | pinctrl-names = "default", "state_uhs"; |
| 349 | |
| 350 | vmmc-supply = <®_3p3v>; |
| 351 | vqmmc-supply = <®_1p8v>; |
| 352 | bus-width = <8>; |
| 353 | mmc-hs200-1_8v; |
| 354 | non-removable; |
| 355 | status = "okay"; |
| 356 | }; |
| 357 | |
| 358 | &ssi1 { |
| 359 | shared-pin; |
| 360 | }; |
| 361 | |
| 362 | &usb2_phy1 { |
| 363 | pinctrl-0 = <&usb1_pins>; |
| 364 | pinctrl-names = "default"; |
| 365 | |
| 366 | status = "okay"; |
| 367 | }; |
| 368 | |
| 369 | &wdt0 { |
| 370 | timeout-sec = <60>; |
| 371 | status = "okay"; |
| 372 | }; |