Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Device Tree Source for the iWave-RZ/G1H Qseven board
0004  *
0005  * Copyright (C) 2020 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 "r8a7742-iwg21m.dtsi"
0033 #include <dt-bindings/pwm/pwm.h>
0034 
0035 / {
0036         model = "iWave Systems RainboW-G21D-Qseven board based on RZ/G1H";
0037         compatible = "iwave,g21d", "iwave,g21m", "renesas,r8a7742";
0038 
0039         aliases {
0040                 serial2 = &scifa2;
0041                 serial4 = &scifb2;
0042                 ethernet0 = &avb;
0043         };
0044 
0045         chosen {
0046                 bootargs = "ignore_loglevel root=/dev/mmcblk0p1 rw rootwait";
0047                 stdout-path = "serial2:115200n8";
0048         };
0049 
0050         audio_clock: audio_clock {
0051                 compatible = "fixed-clock";
0052                 #clock-cells = <0>;
0053                 clock-frequency = <26000000>;
0054         };
0055 
0056         lcd_backlight: backlight {
0057                 compatible = "pwm-backlight";
0058                 pwms = <&tpu 2 5000000 0>;
0059                 brightness-levels = <0 4 8 16 32 64 128 255>;
0060                 pinctrl-0 = <&backlight_pins>;
0061                 pinctrl-names = "default";
0062                 default-brightness-level = <7>;
0063                 enable-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;
0064         };
0065 
0066         leds {
0067                 compatible = "gpio-leds";
0068 
0069                 sdhi2_led {
0070                         label = "sdio-led";
0071                         gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>;
0072                         linux,default-trigger = "mmc1";
0073                 };
0074         };
0075 
0076         lvds-receiver {
0077                 compatible = "ti,ds90cf384a", "lvds-decoder";
0078                 power-supply = <&vcc_3v3_tft1>;
0079 
0080                 ports {
0081                         #address-cells = <1>;
0082                         #size-cells = <0>;
0083 
0084                         port@0 {
0085                                 reg = <0>;
0086                                 lvds_receiver_in: endpoint {
0087                                         remote-endpoint = <&lvds0_out>;
0088                                 };
0089                         };
0090                         port@1 {
0091                                 reg = <1>;
0092                                 lvds_receiver_out: endpoint {
0093                                         remote-endpoint = <&panel_in>;
0094                                 };
0095                         };
0096                 };
0097         };
0098 
0099         panel {
0100                 compatible = "edt,etm0700g0dh6";
0101                 backlight = <&lcd_backlight>;
0102                 power-supply = <&vcc_3v3_tft1>;
0103 
0104                 port {
0105                         panel_in: endpoint {
0106                                 remote-endpoint = <&lvds_receiver_out>;
0107                         };
0108                 };
0109         };
0110 
0111         reg_1p5v: 1p5v {
0112                 compatible = "regulator-fixed";
0113                 regulator-name = "1P5V";
0114                 regulator-min-microvolt = <1500000>;
0115                 regulator-max-microvolt = <1500000>;
0116                 regulator-always-on;
0117         };
0118 
0119         rsnd_sgtl5000: sound {
0120                 compatible = "simple-audio-card";
0121                 simple-audio-card,format = "i2s";
0122                 simple-audio-card,bitclock-master = <&sndcodec>;
0123                 simple-audio-card,frame-master = <&sndcodec>;
0124 
0125                 sndcpu: simple-audio-card,cpu {
0126                         sound-dai = <&rcar_sound>;
0127                 };
0128 
0129                 sndcodec: simple-audio-card,codec {
0130                         sound-dai = <&sgtl5000>;
0131                 };
0132         };
0133 
0134         vcc_3v3_tft1: regulator-panel {
0135                 compatible = "regulator-fixed";
0136 
0137                 regulator-name = "vcc-3v3-tft1";
0138                 regulator-min-microvolt = <3300000>;
0139                 regulator-max-microvolt = <3300000>;
0140                 enable-active-high;
0141                 startup-delay-us = <500>;
0142                 gpio = <&gpio5 28 GPIO_ACTIVE_HIGH>;
0143         };
0144 
0145         vcc_sdhi2: regulator-vcc-sdhi2 {
0146                 compatible = "regulator-fixed";
0147 
0148                 regulator-name = "SDHI2 Vcc";
0149                 regulator-min-microvolt = <3300000>;
0150                 regulator-max-microvolt = <3300000>;
0151 
0152                 gpio = <&gpio1 27 GPIO_ACTIVE_LOW>;
0153         };
0154 
0155         vccq_sdhi2: regulator-vccq-sdhi2 {
0156                 compatible = "regulator-gpio";
0157 
0158                 regulator-name = "SDHI2 VccQ";
0159                 regulator-min-microvolt = <1800000>;
0160                 regulator-max-microvolt = <3300000>;
0161 
0162                 gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
0163                 gpios-states = <1>;
0164                 states = <3300000 1>, <1800000 0>;
0165         };
0166 };
0167 
0168 &avb {
0169         pinctrl-0 = <&avb_pins>;
0170         pinctrl-names = "default";
0171 
0172         phy-handle = <&phy3>;
0173         phy-mode = "gmii";
0174         renesas,no-ether-link;
0175         status = "okay";
0176 
0177         phy3: ethernet-phy@3 {
0178                 compatible = "ethernet-phy-id0022.1622",
0179                              "ethernet-phy-ieee802.3-c22";
0180                 reg = <3>;
0181                 micrel,led-mode = <1>;
0182         };
0183 };
0184 
0185 &i2c2 {
0186         pinctrl-0 = <&i2c2_pins>;
0187         pinctrl-names = "default";
0188 
0189         status = "okay";
0190         clock-frequency = <400000>;
0191 
0192         sgtl5000: codec@a {
0193                 compatible = "fsl,sgtl5000";
0194                 #sound-dai-cells = <0>;
0195                 reg = <0x0a>;
0196                 clocks = <&audio_clock>;
0197                 VDDA-supply = <&reg_3p3v>;
0198                 VDDIO-supply = <&reg_3p3v>;
0199                 VDDD-supply = <&reg_1p5v>;
0200         };
0201 
0202         touch: touchpanel@38 {
0203                 compatible = "edt,edt-ft5406";
0204                 reg = <0x38>;
0205                 interrupt-parent = <&gpio0>;
0206                 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
0207                 /* GP1_29 is also shared with audio codec reset pin */
0208                 reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
0209                 vcc-supply = <&vcc_3v3_tft1>;
0210         };
0211 };
0212 
0213 &can1 {
0214         pinctrl-0 = <&can1_pins>;
0215         pinctrl-names = "default";
0216 
0217         status = "okay";
0218 };
0219 
0220 &cmt0 {
0221         status = "okay";
0222 };
0223 
0224 &du {
0225         status = "okay";
0226 };
0227 
0228 &gpio0 {
0229         touch-interrupt-hog {
0230                 gpio-hog;
0231                 gpios = <24 GPIO_ACTIVE_LOW>;
0232                 input;
0233         };
0234 };
0235 
0236 &gpio1 {
0237         can-trx-en-hog {
0238                 gpio-hog;
0239                 gpios = <28 GPIO_ACTIVE_HIGH>;
0240                 output-low;
0241                 line-name = "can-trx-en-gpio";
0242         };
0243 };
0244 
0245 &hsusb {
0246         pinctrl-0 = <&usb0_pins>;
0247         pinctrl-names = "default";
0248         status = "okay";
0249 };
0250 
0251 &lvds0 {
0252         status = "okay";
0253         ports {
0254                 port@1 {
0255                         lvds0_out: endpoint {
0256                                 remote-endpoint = <&lvds_receiver_in>;
0257                         };
0258                 };
0259         };
0260 };
0261 
0262 &msiof0 {
0263         pinctrl-0 = <&msiof0_pins>;
0264         pinctrl-names = "default";
0265         cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
0266 
0267         status = "okay";
0268 
0269         flash1: flash@0 {
0270                 compatible = "sst,sst25vf016b", "jedec,spi-nor";
0271                 reg = <0>;
0272                 spi-max-frequency = <50000000>;
0273                 m25p,fast-read;
0274 
0275                 partitions {
0276                         compatible = "fixed-partitions";
0277                         #address-cells = <1>;
0278                         #size-cells = <1>;
0279 
0280                         partition@0 {
0281                                 label = "user";
0282                                 reg = <0x00000000 0x00200000>;
0283                         };
0284                 };
0285         };
0286 };
0287 
0288 &pci0 {
0289         pinctrl-0 = <&usb0_pins>;
0290         pinctrl-names = "default";
0291         /* Disable hsusb to enable USB2.0 host mode support on J2 */
0292         /* status = "okay"; */
0293 };
0294 
0295 &pci1 {
0296         pinctrl-0 = <&usb1_pins>;
0297         pinctrl-names = "default";
0298         status = "okay";
0299 };
0300 
0301 &pci2 {
0302         /* Disable xhci to enable USB2.0 host mode support on J23 bottom port */
0303         /* status = "okay"; */
0304 };
0305 
0306 &pcie_bus_clk {
0307         clock-frequency = <100000000>;
0308 };
0309 
0310 &pciec {
0311         /* SW2[6] determines which connector is activated
0312          * ON = PCIe X4 (connector-J7)
0313          * OFF = mini-PCIe (connector-J26)
0314          */
0315         status = "okay";
0316 };
0317 
0318 &pfc {
0319         avb_pins: avb {
0320                 groups = "avb_mdio", "avb_gmii";
0321                 function = "avb";
0322         };
0323 
0324         backlight_pins: backlight {
0325                 groups = "tpu0_to2";
0326                 function = "tpu0";
0327         };
0328 
0329         can1_pins: can1 {
0330                 groups = "can1_data_b";
0331                 function = "can1";
0332         };
0333 
0334         i2c2_pins: i2c2 {
0335                 groups = "i2c2_b";
0336                 function = "i2c2";
0337         };
0338 
0339         msiof0_pins: msiof0 {
0340                 groups = "msiof0_clk", "msiof0_sync", "msiof0_tx", "msiof0_rx";
0341                 function = "msiof0";
0342         };
0343 
0344         scifa2_pins: scifa2 {
0345                 groups = "scifa2_data_c";
0346                 function = "scifa2";
0347         };
0348 
0349         scifb2_pins: scifb2 {
0350                 groups = "scifb2_data", "scifb2_ctrl";
0351                 function = "scifb2";
0352         };
0353 
0354         sdhi2_pins: sd2 {
0355                 groups = "sdhi2_data4", "sdhi2_ctrl";
0356                 function = "sdhi2";
0357                 power-source = <3300>;
0358         };
0359 
0360         sdhi2_pins_uhs: sd2_uhs {
0361                 groups = "sdhi2_data4", "sdhi2_ctrl";
0362                 function = "sdhi2";
0363                 power-source = <1800>;
0364         };
0365 
0366         sound_pins: sound {
0367                 groups = "ssi34_ctrl", "ssi3_data", "ssi4_data";
0368                 function = "ssi";
0369         };
0370 
0371         usb0_pins: usb0 {
0372                 groups = "usb0";
0373                 function = "usb0";
0374         };
0375 
0376         usb1_pins: usb1 {
0377                 groups = "usb1_pwen";
0378                 function = "usb1";
0379         };
0380 };
0381 
0382 &rcar_sound {
0383         pinctrl-0 = <&sound_pins>;
0384         pinctrl-names = "default";
0385         status = "okay";
0386 
0387         /* Single DAI */
0388         #sound-dai-cells = <0>;
0389 
0390         rcar_sound,dai {
0391                 dai0 {
0392                         playback = <&ssi4>, <&src4>, <&dvc1>;
0393                         capture = <&ssi3>, <&src3>, <&dvc0>;
0394                 };
0395         };
0396 };
0397 
0398 &rwdt {
0399         timeout-sec = <60>;
0400         status = "okay";
0401 };
0402 
0403 &scifa2 {
0404         pinctrl-0 = <&scifa2_pins>;
0405         pinctrl-names = "default";
0406 
0407         status = "okay";
0408 };
0409 
0410 &scifb2 {
0411         pinctrl-0 = <&scifb2_pins>;
0412         pinctrl-names = "default";
0413 
0414         uart-has-rtscts;
0415         status = "okay";
0416 };
0417 
0418 &sdhi2 {
0419         pinctrl-0 = <&sdhi2_pins>;
0420         pinctrl-1 = <&sdhi2_pins_uhs>;
0421         pinctrl-names = "default", "state_uhs";
0422 
0423         vmmc-supply = <&vcc_sdhi2>;
0424         vqmmc-supply = <&vccq_sdhi2>;
0425         cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
0426         wp-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>;
0427         sd-uhs-sdr50;
0428         status = "okay";
0429 };
0430 
0431 &ssi4 {
0432         shared-pin;
0433 };
0434 
0435 &tpu {
0436         status = "okay";
0437 };
0438 
0439 &usbphy {
0440         status = "okay";
0441 };
0442 
0443 &xhci {
0444         status = "okay";
0445 };