Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Device Tree Source for the iWave-RZG1E SODIMM carrier board
0004  *
0005  * Copyright (C) 2017 Renesas Electronics Corp.
0006  */
0007 
0008 /*
0009  * SSI-SGTL5000
0010  *
0011  * This command is required when Playback/Capture
0012  *
0013  *      amixer set "DVC Out" 100%
0014  *      amixer set "DVC In" 100%
0015  *
0016  * You can use Mute
0017  *
0018  *      amixer set "DVC Out Mute" on
0019  *      amixer set "DVC In Mute" on
0020  *
0021  * You can use Volume Ramp
0022  *
0023  *      amixer set "DVC Out Ramp Up Rate"   "0.125 dB/64 steps"
0024  *      amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
0025  *      amixer set "DVC Out Ramp" on
0026  *      aplay xxx.wav &
0027  *      amixer set "DVC Out"  80%  // Volume Down
0028  *      amixer set "DVC Out" 100%  // Volume Up
0029  */
0030 
0031 /dts-v1/;
0032 #include "r8a7745-iwg22m.dtsi"
0033 #include <dt-bindings/pwm/pwm.h>
0034 
0035 / {
0036         model = "iWave Systems RainboW-G22D-SODIMM board based on RZ/G1E";
0037         compatible = "iwave,g22d", "iwave,g22m", "renesas,r8a7745";
0038 
0039         aliases {
0040                 ethernet0 = &avb;
0041                 serial3 = &scif4;
0042                 serial5 = &hscif1;
0043         };
0044 
0045         chosen {
0046                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
0047                 stdout-path = "serial3:115200n8";
0048         };
0049 
0050         audio_clock: audio_clock {
0051                 compatible = "fixed-clock";
0052                 #clock-cells = <0>;
0053                 clock-frequency = <26000000>;
0054         };
0055 
0056         backlight_lcd: backlight {
0057                 compatible = "pwm-backlight";
0058                 pwms = <&tpu 3 5000000 PWM_POLARITY_INVERTED>;
0059                 brightness-levels = <0 4 8 16 32 64 128 255>;
0060                 default-brightness-level = <7>;
0061         };
0062 
0063         lcd_panel: lcd {
0064                 compatible = "edt,etm043080dh6gp";
0065                 power-supply = <&vccq_panel>;
0066                 backlight = <&backlight_lcd>;
0067 
0068                 port {
0069                         lcd_in: endpoint {
0070                                 remote-endpoint = <&du_out_rgb0>;
0071                         };
0072                 };
0073         };
0074 
0075         vccq_panel: regulator-vccq-panel {
0076                 compatible = "regulator-fixed";
0077                 regulator-name = "Panel VccQ";
0078                 regulator-min-microvolt = <3300000>;
0079                 regulator-max-microvolt = <3300000>;
0080                 gpio = <&gpio1 13 GPIO_ACTIVE_LOW>;
0081                 enable-active-high;
0082         };
0083 
0084         vccq_sdhi0: regulator-vccq-sdhi0 {
0085                 compatible = "regulator-gpio";
0086 
0087                 regulator-name = "SDHI0 VccQ";
0088                 regulator-min-microvolt = <1800000>;
0089                 regulator-max-microvolt = <3300000>;
0090 
0091                 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
0092                 gpios-states = <1>;
0093                 states = <3300000 1>, <1800000 0>;
0094         };
0095 
0096         rsnd_sgtl5000: sound {
0097                 compatible = "simple-audio-card";
0098                 simple-audio-card,format = "i2s";
0099                 simple-audio-card,bitclock-master = <&sndcodec>;
0100                 simple-audio-card,frame-master = <&sndcodec>;
0101 
0102                 sndcpu: simple-audio-card,cpu {
0103                         sound-dai = <&rcar_sound>;
0104                 };
0105 
0106                 sndcodec: simple-audio-card,codec {
0107                         sound-dai = <&sgtl5000>;
0108                 };
0109         };
0110 };
0111 
0112 &avb {
0113         pinctrl-0 = <&avb_pins>;
0114         pinctrl-names = "default";
0115 
0116         phy-handle = <&phy3>;
0117         phy-mode = "gmii";
0118         renesas,no-ether-link;
0119         status = "okay";
0120 
0121         phy3: ethernet-phy@3 {
0122         /*
0123          * On some older versions of the platform (before R4.0) the phy address
0124          * may be 1 or 3. The address is fixed to 3 for R4.0 onwards.
0125          */
0126                 compatible = "ethernet-phy-id0022.1622",
0127                              "ethernet-phy-ieee802.3-c22";
0128                 reg = <3>;
0129                 micrel,led-mode = <1>;
0130         };
0131 };
0132 
0133 &can0 {
0134         pinctrl-0 = <&can0_pins>;
0135         pinctrl-names = "default";
0136 
0137         status = "okay";
0138 };
0139 
0140 &du {
0141         pinctrl-0 = <&du0_pins>;
0142         pinctrl-names = "default";
0143 
0144         status = "okay";
0145 
0146         ports {
0147                 port@0 {
0148                         endpoint {
0149                                 remote-endpoint = <&lcd_in>;
0150                         };
0151                 };
0152         };
0153 };
0154 
0155 &hscif1 {
0156         pinctrl-0 = <&hscif1_pins>;
0157         pinctrl-names = "default";
0158 
0159         uart-has-rtscts;
0160         status = "okay";
0161 };
0162 
0163 &hsusb {
0164         status = "okay";
0165         pinctrl-0 = <&usb0_pins>;
0166         pinctrl-names = "default";
0167 };
0168 
0169 &i2c5 {
0170         pinctrl-0 = <&i2c5_pins>;
0171         pinctrl-names = "default";
0172 
0173         status = "okay";
0174         clock-frequency = <400000>;
0175 
0176         sgtl5000: codec@a {
0177                 compatible = "fsl,sgtl5000";
0178                 #sound-dai-cells = <0>;
0179                 reg = <0x0a>;
0180                 clocks = <&audio_clock>;
0181                 VDDA-supply = <&reg_3p3v>;
0182                 VDDIO-supply = <&reg_3p3v>;
0183         };
0184 
0185         stmpe811@44 {
0186                 compatible = "st,stmpe811";
0187                 reg = <0x44>;
0188                 interrupt-parent = <&gpio4>;
0189                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
0190 
0191                 /* 3.25 MHz ADC clock speed */
0192                 st,adc-freq = <1>;
0193                 /* ADC conversion time: 80 clocks */
0194                 st,sample-time = <4>;
0195                 /* 12-bit ADC */
0196                 st,mod-12b = <1>;
0197                 /* internal ADC reference */
0198                 st,ref-sel = <0>;
0199 
0200                 stmpe_touchscreen {
0201                         compatible = "st,stmpe-ts";
0202                         /* 8 sample average control */
0203                         st,ave-ctrl = <3>;
0204                         /* 7 length fractional part in z */
0205                         st,fraction-z = <7>;
0206                         /*
0207                          * 50 mA typical 80 mA max touchscreen drivers
0208                          * current limit value
0209                          */
0210                         st,i-drive = <1>;
0211                         /* 1 ms panel driver settling time */
0212                         st,settling = <3>;
0213                         /* 5 ms touch detect interrupt delay */
0214                         st,touch-det-delay = <5>;
0215                 };
0216         };
0217 };
0218 
0219 &pci1 {
0220         status = "okay";
0221         pinctrl-0 = <&usb1_pins>;
0222         pinctrl-names = "default";
0223 };
0224 
0225 &pfc {
0226         avb_pins: avb {
0227                 groups = "avb_mdio", "avb_gmii";
0228                 function = "avb";
0229         };
0230 
0231         backlight_pins: backlight {
0232                 groups = "tpu_to3_c";
0233                 function = "tpu";
0234         };
0235 
0236         can0_pins: can0 {
0237                 groups = "can0_data";
0238                 function = "can0";
0239         };
0240 
0241         du0_pins: du0 {
0242                 groups = "du0_rgb666", "du0_sync", "du0_disp", "du0_clk0_out";
0243                 function = "du0";
0244         };
0245 
0246         hscif1_pins: hscif1 {
0247                 groups = "hscif1_data", "hscif1_ctrl";
0248                 function = "hscif1";
0249         };
0250 
0251         i2c5_pins: i2c5 {
0252                 groups = "i2c5_b";
0253                 function = "i2c5";
0254         };
0255 
0256         scif4_pins: scif4 {
0257                 groups = "scif4_data_b";
0258                 function = "scif4";
0259         };
0260 
0261         sdhi0_pins: sd0 {
0262                 groups = "sdhi0_data4", "sdhi0_ctrl";
0263                 function = "sdhi0";
0264                 power-source = <3300>;
0265         };
0266 
0267         sound_pins: sound {
0268                 groups = "ssi34_ctrl", "ssi3_data", "ssi4_data";
0269                 function = "ssi";
0270         };
0271 
0272         usb0_pins: usb0 {
0273                 groups = "usb0";
0274                 function = "usb0";
0275         };
0276 
0277         usb1_pins: usb1 {
0278                 groups = "usb1";
0279                 function = "usb1";
0280         };
0281 };
0282 
0283 &rcar_sound {
0284         pinctrl-0 = <&sound_pins>;
0285         pinctrl-names = "default";
0286         status = "okay";
0287 
0288         /* Single DAI */
0289 
0290         #sound-dai-cells = <0>;
0291 
0292         rcar_sound,dai {
0293                 dai0 {
0294                         playback = <&ssi3>, <&src3>, <&dvc0>;
0295                         capture = <&ssi4>, <&src4>, <&dvc1>;
0296                 };
0297         };
0298 };
0299 
0300 &scif4 {
0301         pinctrl-0 = <&scif4_pins>;
0302         pinctrl-names = "default";
0303 
0304         status = "okay";
0305 };
0306 
0307 &sdhi0 {
0308         pinctrl-0 = <&sdhi0_pins>;
0309         pinctrl-names = "default";
0310 
0311         vmmc-supply = <&reg_3p3v>;
0312         vqmmc-supply = <&vccq_sdhi0>;
0313         cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
0314         status = "okay";
0315 };
0316 
0317 &ssi4 {
0318         shared-pin;
0319 };
0320 
0321 &tpu {
0322         pinctrl-0 = <&backlight_pins>;
0323         pinctrl-names = "default";
0324         status = "okay";
0325 };
0326 
0327 &usbphy {
0328         status = "okay";
0329 };