Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Device Tree Source for the R-Car Gen3 ULCB board
0004  *
0005  * Copyright (C) 2016 Renesas Electronics Corp.
0006  * Copyright (C) 2016 Cogent Embedded, Inc.
0007  */
0008 
0009 /*
0010  * SSI-AK4613
0011  *      aplay   -D plughw:0,0 xxx.wav
0012  *      arecord -D plughw:0,0 xxx.wav
0013  * SSI-HDMI
0014  *      aplay   -D plughw:0,1 xxx.wav
0015  */
0016 
0017 #include <dt-bindings/gpio/gpio.h>
0018 #include <dt-bindings/input/input.h>
0019 
0020 / {
0021         model = "Renesas R-Car Gen3 ULCB board";
0022 
0023         aliases {
0024                 serial0 = &scif2;
0025                 ethernet0 = &avb;
0026                 mmc0 = &sdhi2;
0027                 mmc1 = &sdhi0;
0028         };
0029 
0030         chosen {
0031                 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
0032                 stdout-path = "serial0:115200n8";
0033         };
0034 
0035         audio_clkout: audio-clkout {
0036                 /*
0037                  * This is same as <&rcar_sound 0>
0038                  * but needed to avoid cs2000/rcar_sound probe dead-lock
0039                  */
0040                 compatible = "fixed-clock";
0041                 #clock-cells = <0>;
0042                 clock-frequency = <12288000>;
0043         };
0044 
0045         hdmi0-out {
0046                 compatible = "hdmi-connector";
0047                 type = "a";
0048 
0049                 port {
0050                         hdmi0_con: endpoint {
0051                                 remote-endpoint = <&rcar_dw_hdmi0_out>;
0052                         };
0053                 };
0054         };
0055 
0056         keyboard {
0057                 compatible = "gpio-keys";
0058 
0059                 key-1 {
0060                         linux,code = <KEY_1>;
0061                         label = "SW3";
0062                         wakeup-source;
0063                         debounce-interval = <20>;
0064                         gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
0065                 };
0066         };
0067 
0068         leds {
0069                 compatible = "gpio-leds";
0070 
0071                 led5 {
0072                         gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
0073                 };
0074                 led6 {
0075                         gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>;
0076                 };
0077         };
0078 
0079         reg_1p8v: regulator-1p8v {
0080                 compatible = "regulator-fixed";
0081                 regulator-name = "fixed-1.8V";
0082                 regulator-min-microvolt = <1800000>;
0083                 regulator-max-microvolt = <1800000>;
0084                 regulator-boot-on;
0085                 regulator-always-on;
0086         };
0087 
0088         reg_3p3v: regulator-3p3v {
0089                 compatible = "regulator-fixed";
0090                 regulator-name = "fixed-3.3V";
0091                 regulator-min-microvolt = <3300000>;
0092                 regulator-max-microvolt = <3300000>;
0093                 regulator-boot-on;
0094                 regulator-always-on;
0095         };
0096 
0097         sound_card: sound {
0098                 compatible = "audio-graph-card2";
0099                 label = "rcar-sound";
0100 
0101                 links = <&rsnd_port0    /* ak4613 */
0102                          &rsnd_port1    /* HDMI0  */
0103                         >;
0104         };
0105 
0106         vcc_sdhi0: regulator-vcc-sdhi0 {
0107                 compatible = "regulator-fixed";
0108 
0109                 regulator-name = "SDHI0 Vcc";
0110                 regulator-min-microvolt = <3300000>;
0111                 regulator-max-microvolt = <3300000>;
0112 
0113                 gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
0114                 enable-active-high;
0115         };
0116 
0117         vccq_sdhi0: regulator-vccq-sdhi0 {
0118                 compatible = "regulator-gpio";
0119 
0120                 regulator-name = "SDHI0 VccQ";
0121                 regulator-min-microvolt = <1800000>;
0122                 regulator-max-microvolt = <3300000>;
0123 
0124                 gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
0125                 gpios-states = <1>;
0126                 states = <3300000 1>, <1800000 0>;
0127         };
0128 
0129         x12_clk: x12 {
0130                 compatible = "fixed-clock";
0131                 #clock-cells = <0>;
0132                 clock-frequency = <24576000>;
0133         };
0134 
0135         x23_clk: x23-clock {
0136                 compatible = "fixed-clock";
0137                 #clock-cells = <0>;
0138                 clock-frequency = <25000000>;
0139         };
0140 };
0141 
0142 &a57_0 {
0143         cpu-supply = <&dvfs>;
0144 };
0145 
0146 &audio_clk_a {
0147         clock-frequency = <22579200>;
0148 };
0149 
0150 &avb {
0151         pinctrl-0 = <&avb_pins>;
0152         pinctrl-names = "default";
0153         phy-handle = <&phy0>;
0154         tx-internal-delay-ps = <2000>;
0155         status = "okay";
0156 
0157         phy0: ethernet-phy@0 {
0158                 compatible = "ethernet-phy-id0022.1622",
0159                              "ethernet-phy-ieee802.3-c22";
0160                 rxc-skew-ps = <1500>;
0161                 reg = <0>;
0162                 interrupt-parent = <&gpio2>;
0163                 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
0164                 reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
0165         };
0166 };
0167 
0168 &du {
0169         status = "okay";
0170 };
0171 
0172 &ehci1 {
0173         status = "okay";
0174 };
0175 
0176 &extal_clk {
0177         clock-frequency = <16666666>;
0178 };
0179 
0180 &extalr_clk {
0181         clock-frequency = <32768>;
0182 };
0183 
0184 &hdmi0 {
0185         status = "okay";
0186 
0187         ports {
0188                 port@1 {
0189                         reg = <1>;
0190                         rcar_dw_hdmi0_out: endpoint {
0191                                 remote-endpoint = <&hdmi0_con>;
0192                         };
0193                 };
0194                 port@2 {
0195                         reg = <2>;
0196                         dw_hdmi0_snd_in: endpoint {
0197                                 remote-endpoint = <&rsnd_for_hdmi>;
0198                         };
0199                 };
0200         };
0201 };
0202 
0203 &i2c2 {
0204         pinctrl-0 = <&i2c2_pins>;
0205         pinctrl-names = "default";
0206 
0207         status = "okay";
0208 
0209         clock-frequency = <100000>;
0210 
0211         ak4613: codec@10 {
0212                 compatible = "asahi-kasei,ak4613";
0213                 #sound-dai-cells = <0>;
0214                 reg = <0x10>;
0215                 clocks = <&rcar_sound 3>;
0216 
0217                 asahi-kasei,in1-single-end;
0218                 asahi-kasei,in2-single-end;
0219                 asahi-kasei,out1-single-end;
0220                 asahi-kasei,out2-single-end;
0221                 asahi-kasei,out3-single-end;
0222                 asahi-kasei,out4-single-end;
0223                 asahi-kasei,out5-single-end;
0224                 asahi-kasei,out6-single-end;
0225 
0226                 port {
0227                         ak4613_endpoint: endpoint {
0228                                 remote-endpoint = <&rsnd_for_ak4613>;
0229                         };
0230                 };
0231         };
0232 
0233         cs2000: clk-multiplier@4f {
0234                 #clock-cells = <0>;
0235                 compatible = "cirrus,cs2000-cp";
0236                 reg = <0x4f>;
0237                 clocks = <&audio_clkout>, <&x12_clk>;
0238                 clock-names = "clk_in", "ref_clk";
0239 
0240                 assigned-clocks = <&cs2000>;
0241                 assigned-clock-rates = <24576000>; /* 1/1 divide */
0242         };
0243 };
0244 
0245 &i2c4 {
0246         status = "okay";
0247 
0248         clock-frequency = <400000>;
0249 
0250         versaclock5: clock-generator@6a {
0251                 compatible = "idt,5p49v5925";
0252                 reg = <0x6a>;
0253                 #clock-cells = <1>;
0254                 clocks = <&x23_clk>;
0255                 clock-names = "xin";
0256         };
0257 };
0258 
0259 &i2c_dvfs {
0260         status = "okay";
0261 
0262         clock-frequency = <400000>;
0263 
0264         pmic: pmic@30 {
0265                 pinctrl-0 = <&irq0_pins>;
0266                 pinctrl-names = "default";
0267 
0268                 compatible = "rohm,bd9571mwv";
0269                 reg = <0x30>;
0270                 interrupt-parent = <&intc_ex>;
0271                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0272                 interrupt-controller;
0273                 #interrupt-cells = <2>;
0274                 gpio-controller;
0275                 #gpio-cells = <2>;
0276                 rohm,ddr-backup-power = <0xf>;
0277                 rohm,rstbmode-pulse;
0278 
0279                 regulators {
0280                         dvfs: dvfs {
0281                                 regulator-name = "dvfs";
0282                                 regulator-min-microvolt = <750000>;
0283                                 regulator-max-microvolt = <1030000>;
0284                                 regulator-boot-on;
0285                                 regulator-always-on;
0286                         };
0287                 };
0288         };
0289 };
0290 
0291 &ohci1 {
0292         status = "okay";
0293 };
0294 
0295 &pfc {
0296         pinctrl-0 = <&scif_clk_pins>;
0297         pinctrl-names = "default";
0298 
0299         avb_pins: avb {
0300                 mux {
0301                         groups = "avb_link", "avb_mdio", "avb_mii";
0302                         function = "avb";
0303                 };
0304 
0305                 pins_mdio {
0306                         groups = "avb_mdio";
0307                         drive-strength = <24>;
0308                 };
0309 
0310                 pins_mii_tx {
0311                         pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0",
0312                                "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3";
0313                         drive-strength = <12>;
0314                 };
0315         };
0316 
0317         i2c2_pins: i2c2 {
0318                 groups = "i2c2_a";
0319                 function = "i2c2";
0320         };
0321 
0322         irq0_pins: irq0 {
0323                 groups = "intc_ex_irq0";
0324                 function = "intc_ex";
0325         };
0326 
0327         scif2_pins: scif2 {
0328                 groups = "scif2_data_a";
0329                 function = "scif2";
0330         };
0331 
0332         scif_clk_pins: scif_clk {
0333                 groups = "scif_clk_a";
0334                 function = "scif_clk";
0335         };
0336 
0337         sdhi0_pins: sd0 {
0338                 groups = "sdhi0_data4", "sdhi0_ctrl";
0339                 function = "sdhi0";
0340                 power-source = <3300>;
0341         };
0342 
0343         sdhi0_pins_uhs: sd0_uhs {
0344                 groups = "sdhi0_data4", "sdhi0_ctrl";
0345                 function = "sdhi0";
0346                 power-source = <1800>;
0347         };
0348 
0349         sdhi2_pins: sd2 {
0350                 groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
0351                 function = "sdhi2";
0352                 power-source = <1800>;
0353         };
0354 
0355         sound_pins: sound {
0356                 groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
0357                 function = "ssi";
0358         };
0359 
0360         sound_clk_pins: sound-clk {
0361                 groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
0362                          "audio_clkout_a", "audio_clkout3_a";
0363                 function = "audio_clk";
0364         };
0365 
0366         usb1_pins: usb1 {
0367                 groups = "usb1";
0368                 function = "usb1";
0369         };
0370 };
0371 
0372 &rcar_sound {
0373         pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
0374         pinctrl-names = "default";
0375 
0376         /* Single DAI */
0377         #sound-dai-cells = <0>;
0378 
0379         /* audio_clkout0/1/2/3 */
0380         #clock-cells = <1>;
0381         clock-frequency = <12288000 11289600>;
0382 
0383         status = "okay";
0384 
0385         /* update <audio_clk_b> to <cs2000> */
0386         clocks = <&cpg CPG_MOD 1005>,
0387                  <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
0388                  <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
0389                  <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
0390                  <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
0391                  <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
0392                  <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
0393                  <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
0394                  <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
0395                  <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
0396                  <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
0397                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
0398                  <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
0399                  <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
0400                  <&audio_clk_a>, <&cs2000>,
0401                  <&audio_clk_c>,
0402                  <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
0403 
0404         ports {
0405                 #address-cells = <1>;
0406                 #size-cells = <0>;
0407                 rsnd_port0: port@0 {
0408                         reg = <0>;
0409                         rsnd_for_ak4613: endpoint {
0410                                 remote-endpoint = <&ak4613_endpoint>;
0411                                 bitclock-master;
0412                                 frame-master;
0413                                 playback = <&ssi0>, <&src0>, <&dvc0>;
0414                                 capture = <&ssi1>, <&src1>, <&dvc1>;
0415                         };
0416                 };
0417                 rsnd_port1: port@1 {
0418                         reg = <1>;
0419                         rsnd_for_hdmi: endpoint {
0420                                 remote-endpoint = <&dw_hdmi0_snd_in>;
0421                                 bitclock-master;
0422                                 frame-master;
0423                                 playback = <&ssi2>;
0424                         };
0425                 };
0426         };
0427 };
0428 
0429 &rpc {
0430         /* Left disabled.  To be enabled by firmware when unlocked. */
0431 
0432         flash@0 {
0433                 compatible = "cypress,hyperflash", "cfi-flash";
0434                 reg = <0>;
0435 
0436                 partitions {
0437                         compatible = "fixed-partitions";
0438                         #address-cells = <1>;
0439                         #size-cells = <1>;
0440 
0441                         bootparam@0 {
0442                                 reg = <0x00000000 0x040000>;
0443                                 read-only;
0444                         };
0445                         bl2@40000 {
0446                                 reg = <0x00040000 0x140000>;
0447                                 read-only;
0448                         };
0449                         cert_header_sa6@180000 {
0450                                 reg = <0x00180000 0x040000>;
0451                                 read-only;
0452                         };
0453                         bl31@1c0000 {
0454                                 reg = <0x001c0000 0x040000>;
0455                                 read-only;
0456                         };
0457                         tee@200000 {
0458                                 reg = <0x00200000 0x440000>;
0459                                 read-only;
0460                         };
0461                         uboot@640000 {
0462                                 reg = <0x00640000 0x100000>;
0463                                 read-only;
0464                         };
0465                         dtb@740000 {
0466                                 reg = <0x00740000 0x080000>;
0467                         };
0468                         kernel@7c0000 {
0469                                 reg = <0x007c0000 0x1400000>;
0470                         };
0471                         user@1bc0000 {
0472                                 reg = <0x01bc0000 0x2440000>;
0473                         };
0474                 };
0475         };
0476 };
0477 
0478 &rwdt {
0479         timeout-sec = <60>;
0480         status = "okay";
0481 };
0482 
0483 &scif2 {
0484         pinctrl-0 = <&scif2_pins>;
0485         pinctrl-names = "default";
0486 
0487         status = "okay";
0488 };
0489 
0490 &scif_clk {
0491         clock-frequency = <14745600>;
0492 };
0493 
0494 &sdhi0 {
0495         pinctrl-0 = <&sdhi0_pins>;
0496         pinctrl-1 = <&sdhi0_pins_uhs>;
0497         pinctrl-names = "default", "state_uhs";
0498 
0499         vmmc-supply = <&vcc_sdhi0>;
0500         vqmmc-supply = <&vccq_sdhi0>;
0501         cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
0502         bus-width = <4>;
0503         sd-uhs-sdr50;
0504         sd-uhs-sdr104;
0505         status = "okay";
0506 };
0507 
0508 &sdhi2 {
0509         /* used for on-board 8bit eMMC */
0510         pinctrl-0 = <&sdhi2_pins>;
0511         pinctrl-1 = <&sdhi2_pins>;
0512         pinctrl-names = "default", "state_uhs";
0513 
0514         vmmc-supply = <&reg_3p3v>;
0515         vqmmc-supply = <&reg_1p8v>;
0516         bus-width = <8>;
0517         mmc-hs200-1_8v;
0518         mmc-hs400-1_8v;
0519         no-sd;
0520         no-sdio;
0521         non-removable;
0522         full-pwr-cycle-in-suspend;
0523         status = "okay";
0524 };
0525 
0526 &ssi1 {
0527         shared-pin;
0528 };
0529 
0530 &usb2_phy1 {
0531         pinctrl-0 = <&usb1_pins>;
0532         pinctrl-names = "default";
0533 
0534         status = "okay";
0535 };