1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Device Tree Source for the iWave-RZ/G1H Qseven board 4 * 5 * Copyright (C) 2020 Renesas Electronics Corp. 6 */ 7 8/* 9 * SSI-SGTL5000 10 * 11 * This command is required when Playback/Capture 12 * 13 * amixer set "DVC Out" 100% 14 * amixer set "DVC In" 100% 15 * 16 * You can use Mute 17 * 18 * amixer set "DVC Out Mute" on 19 * amixer set "DVC In Mute" on 20 * 21 * You can use Volume Ramp 22 * 23 * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps" 24 * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps" 25 * amixer set "DVC Out Ramp" on 26 * aplay xxx.wav & 27 * amixer set "DVC Out" 80% // Volume Down 28 * amixer set "DVC Out" 100% // Volume Up 29 */ 30 31/dts-v1/; 32#include "r8a7742-iwg21m.dtsi" 33#include <dt-bindings/pwm/pwm.h> 34 35/ { 36 model = "iWave Systems RainboW-G21D-Qseven board based on RZ/G1H"; 37 compatible = "iwave,g21d", "iwave,g21m", "renesas,r8a7742"; 38 39 aliases { 40 serial2 = &scifa2; 41 serial4 = &scifb2; 42 ethernet0 = &avb; 43 }; 44 45 chosen { 46 bootargs = "ignore_loglevel root=/dev/mmcblk0p1 rw rootwait"; 47 stdout-path = "serial2:115200n8"; 48 }; 49 50 audio_clock: audio_clock { 51 compatible = "fixed-clock"; 52 #clock-cells = <0>; 53 clock-frequency = <26000000>; 54 }; 55 56 lcd_backlight: backlight { 57 compatible = "pwm-backlight"; 58 pwms = <&tpu 2 5000000 0>; 59 brightness-levels = <0 4 8 16 32 64 128 255>; 60 pinctrl-0 = <&backlight_pins>; 61 pinctrl-names = "default"; 62 default-brightness-level = <7>; 63 enable-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>; 64 }; 65 66 leds { 67 compatible = "gpio-leds"; 68 69 sdhi2_led { 70 label = "sdio-led"; 71 gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; 72 linux,default-trigger = "mmc1"; 73 }; 74 }; 75 76 lvds-receiver { 77 compatible = "ti,ds90cf384a", "lvds-decoder"; 78 power-supply = <&vcc_3v3_tft1>; 79 80 ports { 81 #address-cells = <1>; 82 #size-cells = <0>; 83 84 port@0 { 85 reg = <0>; 86 lvds_receiver_in: endpoint { 87 remote-endpoint = <&lvds0_out>; 88 }; 89 }; 90 port@1 { 91 reg = <1>; 92 lvds_receiver_out: endpoint { 93 remote-endpoint = <&panel_in>; 94 }; 95 }; 96 }; 97 }; 98 99 panel { 100 compatible = "edt,etm0700g0dh6"; 101 backlight = <&lcd_backlight>; 102 power-supply = <&vcc_3v3_tft1>; 103 104 port { 105 panel_in: endpoint { 106 remote-endpoint = <&lvds_receiver_out>; 107 }; 108 }; 109 }; 110 111 reg_1p5v: 1p5v { 112 compatible = "regulator-fixed"; 113 regulator-name = "1P5V"; 114 regulator-min-microvolt = <1500000>; 115 regulator-max-microvolt = <1500000>; 116 regulator-always-on; 117 }; 118 119 rsnd_sgtl5000: sound { 120 compatible = "simple-audio-card"; 121 simple-audio-card,format = "i2s"; 122 simple-audio-card,bitclock-master = <&sndcodec>; 123 simple-audio-card,frame-master = <&sndcodec>; 124 125 sndcpu: simple-audio-card,cpu { 126 sound-dai = <&rcar_sound>; 127 }; 128 129 sndcodec: simple-audio-card,codec { 130 sound-dai = <&sgtl5000>; 131 }; 132 }; 133 134 vcc_3v3_tft1: regulator-panel { 135 compatible = "regulator-fixed"; 136 137 regulator-name = "vcc-3v3-tft1"; 138 regulator-min-microvolt = <3300000>; 139 regulator-max-microvolt = <3300000>; 140 enable-active-high; 141 startup-delay-us = <500>; 142 gpio = <&gpio5 28 GPIO_ACTIVE_HIGH>; 143 }; 144 145 vcc_sdhi2: regulator-vcc-sdhi2 { 146 compatible = "regulator-fixed"; 147 148 regulator-name = "SDHI2 Vcc"; 149 regulator-min-microvolt = <3300000>; 150 regulator-max-microvolt = <3300000>; 151 152 gpio = <&gpio1 27 GPIO_ACTIVE_LOW>; 153 }; 154 155 vccq_sdhi2: regulator-vccq-sdhi2 { 156 compatible = "regulator-gpio"; 157 158 regulator-name = "SDHI2 VccQ"; 159 regulator-min-microvolt = <1800000>; 160 regulator-max-microvolt = <3300000>; 161 162 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; 163 gpios-states = <1>; 164 states = <3300000 1>, <1800000 0>; 165 }; 166}; 167 168&avb { 169 pinctrl-0 = <&avb_pins>; 170 pinctrl-names = "default"; 171 172 phy-handle = <&phy3>; 173 phy-mode = "gmii"; 174 renesas,no-ether-link; 175 status = "okay"; 176 177 phy3: ethernet-phy@3 { 178 compatible = "ethernet-phy-id0022.1622", 179 "ethernet-phy-ieee802.3-c22"; 180 reg = <3>; 181 micrel,led-mode = <1>; 182 }; 183}; 184 185&i2c2 { 186 pinctrl-0 = <&i2c2_pins>; 187 pinctrl-names = "default"; 188 189 status = "okay"; 190 clock-frequency = <400000>; 191 192 sgtl5000: codec@a { 193 compatible = "fsl,sgtl5000"; 194 #sound-dai-cells = <0>; 195 reg = <0x0a>; 196 clocks = <&audio_clock>; 197 VDDA-supply = <®_3p3v>; 198 VDDIO-supply = <®_3p3v>; 199 VDDD-supply = <®_1p5v>; 200 }; 201 202 touch: touchpanel@38 { 203 compatible = "edt,edt-ft5406"; 204 reg = <0x38>; 205 interrupts-extended = <&gpio0 24 IRQ_TYPE_EDGE_FALLING>; 206 /* GP1_29 is also shared with audio codec reset pin */ 207 reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; 208 vcc-supply = <&vcc_3v3_tft1>; 209 }; 210}; 211 212&can1 { 213 pinctrl-0 = <&can1_pins>; 214 pinctrl-names = "default"; 215 216 status = "okay"; 217}; 218 219&cmt0 { 220 status = "okay"; 221}; 222 223&du { 224 status = "okay"; 225}; 226 227&gpio0 { 228 touch-interrupt-hog { 229 gpio-hog; 230 gpios = <24 GPIO_ACTIVE_LOW>; 231 input; 232 }; 233}; 234 235&gpio1 { 236 can-trx-en-hog { 237 gpio-hog; 238 gpios = <28 GPIO_ACTIVE_HIGH>; 239 output-low; 240 line-name = "can-trx-en-gpio"; 241 }; 242}; 243 244&hsusb { 245 pinctrl-0 = <&usb0_pins>; 246 pinctrl-names = "default"; 247 status = "okay"; 248}; 249 250&lvds0 { 251 status = "okay"; 252 ports { 253 port@1 { 254 lvds0_out: endpoint { 255 remote-endpoint = <&lvds_receiver_in>; 256 }; 257 }; 258 }; 259}; 260 261&msiof0 { 262 pinctrl-0 = <&msiof0_pins>; 263 pinctrl-names = "default"; 264 cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; 265 266 status = "okay"; 267 268 flash1: flash@0 { 269 compatible = "sst,sst25vf016b", "jedec,spi-nor"; 270 reg = <0>; 271 spi-max-frequency = <50000000>; 272 m25p,fast-read; 273 274 partitions { 275 compatible = "fixed-partitions"; 276 #address-cells = <1>; 277 #size-cells = <1>; 278 279 partition@0 { 280 label = "user"; 281 reg = <0x00000000 0x00200000>; 282 }; 283 }; 284 }; 285}; 286 287&pci0 { 288 pinctrl-0 = <&usb0_pins>; 289 pinctrl-names = "default"; 290 /* Disable hsusb to enable USB2.0 host mode support on J2 */ 291 /* status = "okay"; */ 292}; 293 294&pci1 { 295 pinctrl-0 = <&usb1_pins>; 296 pinctrl-names = "default"; 297 status = "okay"; 298}; 299 300&pci2 { 301 /* Disable xhci to enable USB2.0 host mode support on J23 bottom port */ 302 /* status = "okay"; */ 303}; 304 305&pcie_bus_clk { 306 clock-frequency = <100000000>; 307}; 308 309&pciec { 310 /* SW2[6] determines which connector is activated 311 * ON = PCIe X4 (connector-J7) 312 * OFF = mini-PCIe (connector-J26) 313 */ 314 status = "okay"; 315}; 316 317&pfc { 318 avb_pins: avb { 319 groups = "avb_mdio", "avb_gmii"; 320 function = "avb"; 321 }; 322 323 backlight_pins: backlight { 324 groups = "tpu0_to2"; 325 function = "tpu0"; 326 }; 327 328 can1_pins: can1 { 329 groups = "can1_data_b"; 330 function = "can1"; 331 }; 332 333 i2c2_pins: i2c2 { 334 groups = "i2c2_b"; 335 function = "i2c2"; 336 }; 337 338 msiof0_pins: msiof0 { 339 groups = "msiof0_clk", "msiof0_sync", "msiof0_tx", "msiof0_rx"; 340 function = "msiof0"; 341 }; 342 343 scifa2_pins: scifa2 { 344 groups = "scifa2_data_c"; 345 function = "scifa2"; 346 }; 347 348 scifb2_pins: scifb2 { 349 groups = "scifb2_data", "scifb2_ctrl"; 350 function = "scifb2"; 351 }; 352 353 sdhi2_pins: sd2 { 354 groups = "sdhi2_data4", "sdhi2_ctrl"; 355 function = "sdhi2"; 356 power-source = <3300>; 357 }; 358 359 sdhi2_pins_uhs: sd2_uhs { 360 groups = "sdhi2_data4", "sdhi2_ctrl"; 361 function = "sdhi2"; 362 power-source = <1800>; 363 }; 364 365 sound_pins: sound { 366 groups = "ssi34_ctrl", "ssi3_data", "ssi4_data"; 367 function = "ssi"; 368 }; 369 370 usb0_pins: usb0 { 371 groups = "usb0"; 372 function = "usb0"; 373 }; 374 375 usb1_pins: usb1 { 376 groups = "usb1_pwen"; 377 function = "usb1"; 378 }; 379}; 380 381&rcar_sound { 382 pinctrl-0 = <&sound_pins>; 383 pinctrl-names = "default"; 384 status = "okay"; 385 386 /* Single DAI */ 387 #sound-dai-cells = <0>; 388 389 rcar_sound,dai { 390 dai0 { 391 playback = <&ssi4>, <&src4>, <&dvc1>; 392 capture = <&ssi3>, <&src3>, <&dvc0>; 393 }; 394 }; 395}; 396 397&rwdt { 398 timeout-sec = <60>; 399 status = "okay"; 400}; 401 402&scifa2 { 403 pinctrl-0 = <&scifa2_pins>; 404 pinctrl-names = "default"; 405 406 status = "okay"; 407}; 408 409&scifb2 { 410 pinctrl-0 = <&scifb2_pins>; 411 pinctrl-names = "default"; 412 413 uart-has-rtscts; 414 status = "okay"; 415}; 416 417&sdhi2 { 418 pinctrl-0 = <&sdhi2_pins>; 419 pinctrl-1 = <&sdhi2_pins_uhs>; 420 pinctrl-names = "default", "state_uhs"; 421 422 vmmc-supply = <&vcc_sdhi2>; 423 vqmmc-supply = <&vccq_sdhi2>; 424 cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>; 425 wp-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; 426 sd-uhs-sdr50; 427 status = "okay"; 428}; 429 430&ssi4 { 431 shared-pin; 432}; 433 434&tpu { 435 status = "okay"; 436}; 437 438&usbphy { 439 status = "okay"; 440}; 441 442&xhci { 443 status = "okay"; 444}; 445