1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0 2f126890aSEmmanuel Vadot/* 3f126890aSEmmanuel Vadot * Device Tree Source for the iWave-RZG1E SODIMM carrier board 4f126890aSEmmanuel Vadot * 5f126890aSEmmanuel Vadot * Copyright (C) 2017 Renesas Electronics Corp. 6f126890aSEmmanuel Vadot */ 7f126890aSEmmanuel Vadot 8f126890aSEmmanuel Vadot/* 9f126890aSEmmanuel Vadot * SSI-SGTL5000 10f126890aSEmmanuel Vadot * 11f126890aSEmmanuel Vadot * This command is required when Playback/Capture 12f126890aSEmmanuel Vadot * 13f126890aSEmmanuel Vadot * amixer set "DVC Out" 100% 14f126890aSEmmanuel Vadot * amixer set "DVC In" 100% 15f126890aSEmmanuel Vadot * 16f126890aSEmmanuel Vadot * You can use Mute 17f126890aSEmmanuel Vadot * 18f126890aSEmmanuel Vadot * amixer set "DVC Out Mute" on 19f126890aSEmmanuel Vadot * amixer set "DVC In Mute" on 20f126890aSEmmanuel Vadot * 21f126890aSEmmanuel Vadot * You can use Volume Ramp 22f126890aSEmmanuel Vadot * 23f126890aSEmmanuel Vadot * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps" 24f126890aSEmmanuel Vadot * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps" 25f126890aSEmmanuel Vadot * amixer set "DVC Out Ramp" on 26f126890aSEmmanuel Vadot * aplay xxx.wav & 27f126890aSEmmanuel Vadot * amixer set "DVC Out" 80% // Volume Down 28f126890aSEmmanuel Vadot * amixer set "DVC Out" 100% // Volume Up 29f126890aSEmmanuel Vadot */ 30f126890aSEmmanuel Vadot 31f126890aSEmmanuel Vadot/dts-v1/; 32f126890aSEmmanuel Vadot#include "r8a7745-iwg22m.dtsi" 33f126890aSEmmanuel Vadot#include <dt-bindings/pwm/pwm.h> 34f126890aSEmmanuel Vadot 35f126890aSEmmanuel Vadot/ { 36f126890aSEmmanuel Vadot model = "iWave Systems RainboW-G22D-SODIMM board based on RZ/G1E"; 37f126890aSEmmanuel Vadot compatible = "iwave,g22d", "iwave,g22m", "renesas,r8a7745"; 38f126890aSEmmanuel Vadot 39f126890aSEmmanuel Vadot aliases { 40f126890aSEmmanuel Vadot ethernet0 = &avb; 41f126890aSEmmanuel Vadot serial3 = &scif4; 42f126890aSEmmanuel Vadot serial5 = &hscif1; 43f126890aSEmmanuel Vadot }; 44f126890aSEmmanuel Vadot 45f126890aSEmmanuel Vadot chosen { 46f126890aSEmmanuel Vadot bootargs = "ignore_loglevel rw root=/dev/nfs ip=on"; 47f126890aSEmmanuel Vadot stdout-path = "serial3:115200n8"; 48f126890aSEmmanuel Vadot }; 49f126890aSEmmanuel Vadot 50f126890aSEmmanuel Vadot audio_clock: audio_clock { 51f126890aSEmmanuel Vadot compatible = "fixed-clock"; 52f126890aSEmmanuel Vadot #clock-cells = <0>; 53f126890aSEmmanuel Vadot clock-frequency = <26000000>; 54f126890aSEmmanuel Vadot }; 55f126890aSEmmanuel Vadot 56f126890aSEmmanuel Vadot backlight_lcd: backlight { 57f126890aSEmmanuel Vadot compatible = "pwm-backlight"; 58f126890aSEmmanuel Vadot pwms = <&tpu 3 5000000 PWM_POLARITY_INVERTED>; 59f126890aSEmmanuel Vadot brightness-levels = <0 4 8 16 32 64 128 255>; 60f126890aSEmmanuel Vadot default-brightness-level = <7>; 61f126890aSEmmanuel Vadot }; 62f126890aSEmmanuel Vadot 63f126890aSEmmanuel Vadot lcd_panel: lcd { 64f126890aSEmmanuel Vadot compatible = "edt,etm043080dh6gp"; 65f126890aSEmmanuel Vadot power-supply = <&vccq_panel>; 66f126890aSEmmanuel Vadot backlight = <&backlight_lcd>; 67f126890aSEmmanuel Vadot 68f126890aSEmmanuel Vadot port { 69f126890aSEmmanuel Vadot lcd_in: endpoint { 70f126890aSEmmanuel Vadot remote-endpoint = <&du_out_rgb0>; 71f126890aSEmmanuel Vadot }; 72f126890aSEmmanuel Vadot }; 73f126890aSEmmanuel Vadot }; 74f126890aSEmmanuel Vadot 75f126890aSEmmanuel Vadot vccq_panel: regulator-vccq-panel { 76f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 77f126890aSEmmanuel Vadot regulator-name = "Panel VccQ"; 78f126890aSEmmanuel Vadot regulator-min-microvolt = <3300000>; 79f126890aSEmmanuel Vadot regulator-max-microvolt = <3300000>; 80f126890aSEmmanuel Vadot gpio = <&gpio1 13 GPIO_ACTIVE_LOW>; 81f126890aSEmmanuel Vadot enable-active-high; 82f126890aSEmmanuel Vadot }; 83f126890aSEmmanuel Vadot 84f126890aSEmmanuel Vadot vccq_sdhi0: regulator-vccq-sdhi0 { 85f126890aSEmmanuel Vadot compatible = "regulator-gpio"; 86f126890aSEmmanuel Vadot 87f126890aSEmmanuel Vadot regulator-name = "SDHI0 VccQ"; 88f126890aSEmmanuel Vadot regulator-min-microvolt = <1800000>; 89f126890aSEmmanuel Vadot regulator-max-microvolt = <3300000>; 90f126890aSEmmanuel Vadot 91f126890aSEmmanuel Vadot gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; 92f126890aSEmmanuel Vadot gpios-states = <1>; 93f126890aSEmmanuel Vadot states = <3300000 1>, <1800000 0>; 94f126890aSEmmanuel Vadot }; 95f126890aSEmmanuel Vadot 96f126890aSEmmanuel Vadot rsnd_sgtl5000: sound { 97f126890aSEmmanuel Vadot compatible = "simple-audio-card"; 98f126890aSEmmanuel Vadot simple-audio-card,format = "i2s"; 99f126890aSEmmanuel Vadot simple-audio-card,bitclock-master = <&sndcodec>; 100f126890aSEmmanuel Vadot simple-audio-card,frame-master = <&sndcodec>; 101f126890aSEmmanuel Vadot 102f126890aSEmmanuel Vadot sndcpu: simple-audio-card,cpu { 103f126890aSEmmanuel Vadot sound-dai = <&rcar_sound>; 104f126890aSEmmanuel Vadot }; 105f126890aSEmmanuel Vadot 106f126890aSEmmanuel Vadot sndcodec: simple-audio-card,codec { 107f126890aSEmmanuel Vadot sound-dai = <&sgtl5000>; 108f126890aSEmmanuel Vadot }; 109f126890aSEmmanuel Vadot }; 110f126890aSEmmanuel Vadot}; 111f126890aSEmmanuel Vadot 112f126890aSEmmanuel Vadot&avb { 113f126890aSEmmanuel Vadot pinctrl-0 = <&avb_pins>; 114f126890aSEmmanuel Vadot pinctrl-names = "default"; 115f126890aSEmmanuel Vadot 116f126890aSEmmanuel Vadot phy-handle = <&phy3>; 117f126890aSEmmanuel Vadot phy-mode = "gmii"; 118f126890aSEmmanuel Vadot renesas,no-ether-link; 119f126890aSEmmanuel Vadot status = "okay"; 120f126890aSEmmanuel Vadot 121f126890aSEmmanuel Vadot phy3: ethernet-phy@3 { 122f126890aSEmmanuel Vadot /* 123f126890aSEmmanuel Vadot * On some older versions of the platform (before R4.0) the phy address 124f126890aSEmmanuel Vadot * may be 1 or 3. The address is fixed to 3 for R4.0 onwards. 125f126890aSEmmanuel Vadot */ 126f126890aSEmmanuel Vadot compatible = "ethernet-phy-id0022.1622", 127f126890aSEmmanuel Vadot "ethernet-phy-ieee802.3-c22"; 128f126890aSEmmanuel Vadot reg = <3>; 129f126890aSEmmanuel Vadot micrel,led-mode = <1>; 130f126890aSEmmanuel Vadot }; 131f126890aSEmmanuel Vadot}; 132f126890aSEmmanuel Vadot 133f126890aSEmmanuel Vadot&can0 { 134f126890aSEmmanuel Vadot pinctrl-0 = <&can0_pins>; 135f126890aSEmmanuel Vadot pinctrl-names = "default"; 136f126890aSEmmanuel Vadot 137f126890aSEmmanuel Vadot status = "okay"; 138f126890aSEmmanuel Vadot}; 139f126890aSEmmanuel Vadot 140f126890aSEmmanuel Vadot&du { 141f126890aSEmmanuel Vadot pinctrl-0 = <&du0_pins>; 142f126890aSEmmanuel Vadot pinctrl-names = "default"; 143f126890aSEmmanuel Vadot 144f126890aSEmmanuel Vadot status = "okay"; 145f126890aSEmmanuel Vadot 146f126890aSEmmanuel Vadot ports { 147f126890aSEmmanuel Vadot port@0 { 148f126890aSEmmanuel Vadot endpoint { 149f126890aSEmmanuel Vadot remote-endpoint = <&lcd_in>; 150f126890aSEmmanuel Vadot }; 151f126890aSEmmanuel Vadot }; 152f126890aSEmmanuel Vadot }; 153f126890aSEmmanuel Vadot}; 154f126890aSEmmanuel Vadot 155f126890aSEmmanuel Vadot&hscif1 { 156f126890aSEmmanuel Vadot pinctrl-0 = <&hscif1_pins>; 157f126890aSEmmanuel Vadot pinctrl-names = "default"; 158f126890aSEmmanuel Vadot 159f126890aSEmmanuel Vadot uart-has-rtscts; 160f126890aSEmmanuel Vadot status = "okay"; 161f126890aSEmmanuel Vadot}; 162f126890aSEmmanuel Vadot 163f126890aSEmmanuel Vadot&hsusb { 164f126890aSEmmanuel Vadot status = "okay"; 165f126890aSEmmanuel Vadot pinctrl-0 = <&usb0_pins>; 166f126890aSEmmanuel Vadot pinctrl-names = "default"; 167f126890aSEmmanuel Vadot}; 168f126890aSEmmanuel Vadot 169f126890aSEmmanuel Vadot&i2c5 { 170f126890aSEmmanuel Vadot pinctrl-0 = <&i2c5_pins>; 171f126890aSEmmanuel Vadot pinctrl-names = "default"; 172f126890aSEmmanuel Vadot 173f126890aSEmmanuel Vadot status = "okay"; 174f126890aSEmmanuel Vadot clock-frequency = <400000>; 175f126890aSEmmanuel Vadot 176f126890aSEmmanuel Vadot sgtl5000: codec@a { 177f126890aSEmmanuel Vadot compatible = "fsl,sgtl5000"; 178f126890aSEmmanuel Vadot #sound-dai-cells = <0>; 179f126890aSEmmanuel Vadot reg = <0x0a>; 180f126890aSEmmanuel Vadot clocks = <&audio_clock>; 181f126890aSEmmanuel Vadot VDDA-supply = <®_3p3v>; 182f126890aSEmmanuel Vadot VDDIO-supply = <®_3p3v>; 183f126890aSEmmanuel Vadot }; 184f126890aSEmmanuel Vadot 185*8d13bc63SEmmanuel Vadot port-expander@44 { 186f126890aSEmmanuel Vadot compatible = "st,stmpe811"; 187f126890aSEmmanuel Vadot reg = <0x44>; 188f126890aSEmmanuel Vadot interrupt-parent = <&gpio4>; 189f126890aSEmmanuel Vadot interrupts = <4 IRQ_TYPE_LEVEL_LOW>; 190f126890aSEmmanuel Vadot 191f126890aSEmmanuel Vadot /* 3.25 MHz ADC clock speed */ 192f126890aSEmmanuel Vadot st,adc-freq = <1>; 193f126890aSEmmanuel Vadot /* ADC conversion time: 80 clocks */ 194f126890aSEmmanuel Vadot st,sample-time = <4>; 195f126890aSEmmanuel Vadot /* 12-bit ADC */ 196f126890aSEmmanuel Vadot st,mod-12b = <1>; 197f126890aSEmmanuel Vadot /* internal ADC reference */ 198f126890aSEmmanuel Vadot st,ref-sel = <0>; 199f126890aSEmmanuel Vadot 200*8d13bc63SEmmanuel Vadot touchscreen { 201f126890aSEmmanuel Vadot compatible = "st,stmpe-ts"; 202f126890aSEmmanuel Vadot /* 8 sample average control */ 203f126890aSEmmanuel Vadot st,ave-ctrl = <3>; 204f126890aSEmmanuel Vadot /* 7 length fractional part in z */ 205f126890aSEmmanuel Vadot st,fraction-z = <7>; 206f126890aSEmmanuel Vadot /* 207f126890aSEmmanuel Vadot * 50 mA typical 80 mA max touchscreen drivers 208f126890aSEmmanuel Vadot * current limit value 209f126890aSEmmanuel Vadot */ 210f126890aSEmmanuel Vadot st,i-drive = <1>; 211f126890aSEmmanuel Vadot /* 1 ms panel driver settling time */ 212f126890aSEmmanuel Vadot st,settling = <3>; 213f126890aSEmmanuel Vadot /* 5 ms touch detect interrupt delay */ 214f126890aSEmmanuel Vadot st,touch-det-delay = <5>; 215f126890aSEmmanuel Vadot }; 216f126890aSEmmanuel Vadot }; 217f126890aSEmmanuel Vadot}; 218f126890aSEmmanuel Vadot 219f126890aSEmmanuel Vadot&pci1 { 220f126890aSEmmanuel Vadot status = "okay"; 221f126890aSEmmanuel Vadot pinctrl-0 = <&usb1_pins>; 222f126890aSEmmanuel Vadot pinctrl-names = "default"; 223f126890aSEmmanuel Vadot}; 224f126890aSEmmanuel Vadot 225f126890aSEmmanuel Vadot&pfc { 226f126890aSEmmanuel Vadot avb_pins: avb { 227f126890aSEmmanuel Vadot groups = "avb_mdio", "avb_gmii"; 228f126890aSEmmanuel Vadot function = "avb"; 229f126890aSEmmanuel Vadot }; 230f126890aSEmmanuel Vadot 231f126890aSEmmanuel Vadot backlight_pins: backlight { 232f126890aSEmmanuel Vadot groups = "tpu_to3_c"; 233f126890aSEmmanuel Vadot function = "tpu"; 234f126890aSEmmanuel Vadot }; 235f126890aSEmmanuel Vadot 236f126890aSEmmanuel Vadot can0_pins: can0 { 237f126890aSEmmanuel Vadot groups = "can0_data"; 238f126890aSEmmanuel Vadot function = "can0"; 239f126890aSEmmanuel Vadot }; 240f126890aSEmmanuel Vadot 241f126890aSEmmanuel Vadot du0_pins: du0 { 242f126890aSEmmanuel Vadot groups = "du0_rgb666", "du0_sync", "du0_disp", "du0_clk0_out"; 243f126890aSEmmanuel Vadot function = "du0"; 244f126890aSEmmanuel Vadot }; 245f126890aSEmmanuel Vadot 246f126890aSEmmanuel Vadot hscif1_pins: hscif1 { 247f126890aSEmmanuel Vadot groups = "hscif1_data", "hscif1_ctrl"; 248f126890aSEmmanuel Vadot function = "hscif1"; 249f126890aSEmmanuel Vadot }; 250f126890aSEmmanuel Vadot 251f126890aSEmmanuel Vadot i2c5_pins: i2c5 { 252f126890aSEmmanuel Vadot groups = "i2c5_b"; 253f126890aSEmmanuel Vadot function = "i2c5"; 254f126890aSEmmanuel Vadot }; 255f126890aSEmmanuel Vadot 256f126890aSEmmanuel Vadot scif4_pins: scif4 { 257f126890aSEmmanuel Vadot groups = "scif4_data_b"; 258f126890aSEmmanuel Vadot function = "scif4"; 259f126890aSEmmanuel Vadot }; 260f126890aSEmmanuel Vadot 261f126890aSEmmanuel Vadot sdhi0_pins: sd0 { 262f126890aSEmmanuel Vadot groups = "sdhi0_data4", "sdhi0_ctrl"; 263f126890aSEmmanuel Vadot function = "sdhi0"; 264f126890aSEmmanuel Vadot power-source = <3300>; 265f126890aSEmmanuel Vadot }; 266f126890aSEmmanuel Vadot 267f126890aSEmmanuel Vadot sound_pins: sound { 268f126890aSEmmanuel Vadot groups = "ssi34_ctrl", "ssi3_data", "ssi4_data"; 269f126890aSEmmanuel Vadot function = "ssi"; 270f126890aSEmmanuel Vadot }; 271f126890aSEmmanuel Vadot 272f126890aSEmmanuel Vadot usb0_pins: usb0 { 273f126890aSEmmanuel Vadot groups = "usb0"; 274f126890aSEmmanuel Vadot function = "usb0"; 275f126890aSEmmanuel Vadot }; 276f126890aSEmmanuel Vadot 277f126890aSEmmanuel Vadot usb1_pins: usb1 { 278f126890aSEmmanuel Vadot groups = "usb1"; 279f126890aSEmmanuel Vadot function = "usb1"; 280f126890aSEmmanuel Vadot }; 281f126890aSEmmanuel Vadot}; 282f126890aSEmmanuel Vadot 283f126890aSEmmanuel Vadot&rcar_sound { 284f126890aSEmmanuel Vadot pinctrl-0 = <&sound_pins>; 285f126890aSEmmanuel Vadot pinctrl-names = "default"; 286f126890aSEmmanuel Vadot status = "okay"; 287f126890aSEmmanuel Vadot 288f126890aSEmmanuel Vadot /* Single DAI */ 289f126890aSEmmanuel Vadot 290f126890aSEmmanuel Vadot #sound-dai-cells = <0>; 291f126890aSEmmanuel Vadot 292f126890aSEmmanuel Vadot rcar_sound,dai { 293f126890aSEmmanuel Vadot dai0 { 294f126890aSEmmanuel Vadot playback = <&ssi3>, <&src3>, <&dvc0>; 295f126890aSEmmanuel Vadot capture = <&ssi4>, <&src4>, <&dvc1>; 296f126890aSEmmanuel Vadot }; 297f126890aSEmmanuel Vadot }; 298f126890aSEmmanuel Vadot}; 299f126890aSEmmanuel Vadot 300f126890aSEmmanuel Vadot&scif4 { 301f126890aSEmmanuel Vadot pinctrl-0 = <&scif4_pins>; 302f126890aSEmmanuel Vadot pinctrl-names = "default"; 303f126890aSEmmanuel Vadot 304f126890aSEmmanuel Vadot status = "okay"; 305f126890aSEmmanuel Vadot}; 306f126890aSEmmanuel Vadot 307f126890aSEmmanuel Vadot&sdhi0 { 308f126890aSEmmanuel Vadot pinctrl-0 = <&sdhi0_pins>; 309f126890aSEmmanuel Vadot pinctrl-names = "default"; 310f126890aSEmmanuel Vadot 311f126890aSEmmanuel Vadot vmmc-supply = <®_3p3v>; 312f126890aSEmmanuel Vadot vqmmc-supply = <&vccq_sdhi0>; 313f126890aSEmmanuel Vadot cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>; 314f126890aSEmmanuel Vadot status = "okay"; 315f126890aSEmmanuel Vadot}; 316f126890aSEmmanuel Vadot 317f126890aSEmmanuel Vadot&ssi4 { 318f126890aSEmmanuel Vadot shared-pin; 319f126890aSEmmanuel Vadot}; 320f126890aSEmmanuel Vadot 321f126890aSEmmanuel Vadot&tpu { 322f126890aSEmmanuel Vadot pinctrl-0 = <&backlight_pins>; 323f126890aSEmmanuel Vadot pinctrl-names = "default"; 324f126890aSEmmanuel Vadot status = "okay"; 325f126890aSEmmanuel Vadot}; 326f126890aSEmmanuel Vadot 327f126890aSEmmanuel Vadot&usbphy { 328f126890aSEmmanuel Vadot status = "okay"; 329f126890aSEmmanuel Vadot}; 330