1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Device Tree Source for the Draak board 4 * 5 * Copyright (C) 2016-2018 Renesas Electronics Corp. 6 * Copyright (C) 2017 Glider bvba 7 */ 8 9/dts-v1/; 10#include "r8a77995.dtsi" 11#include <dt-bindings/gpio/gpio.h> 12 13/ { 14 model = "Renesas Draak board based on r8a77995"; 15 compatible = "renesas,draak", "renesas,r8a77995"; 16 17 aliases { 18 serial0 = &scif2; 19 ethernet0 = &avb; 20 }; 21 22 backlight: backlight { 23 compatible = "pwm-backlight"; 24 pwms = <&pwm1 0 50000>; 25 26 brightness-levels = <512 511 505 494 473 440 392 327 241 133 0>; 27 default-brightness-level = <10>; 28 29 power-supply = <®_12p0v>; 30 enable-gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>; 31 }; 32 33 chosen { 34 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on"; 35 stdout-path = "serial0:115200n8"; 36 }; 37 38 composite-in { 39 compatible = "composite-video-connector"; 40 41 port { 42 composite_con_in: endpoint { 43 remote-endpoint = <&adv7180_in>; 44 }; 45 }; 46 }; 47 48 hdmi-in { 49 compatible = "hdmi-connector"; 50 type = "a"; 51 52 port { 53 hdmi_con_in: endpoint { 54 remote-endpoint = <&adv7612_in>; 55 }; 56 }; 57 }; 58 59 hdmi-out { 60 compatible = "hdmi-connector"; 61 type = "a"; 62 63 port { 64 hdmi_con_out: endpoint { 65 remote-endpoint = <&adv7511_out>; 66 }; 67 }; 68 }; 69 70 lvds-decoder { 71 compatible = "thine,thc63lvd1024"; 72 vcc-supply = <®_3p3v>; 73 74 ports { 75 #address-cells = <1>; 76 #size-cells = <0>; 77 78 port@0 { 79 reg = <0>; 80 thc63lvd1024_in: endpoint { 81 remote-endpoint = <&lvds0_out>; 82 }; 83 }; 84 85 port@2 { 86 reg = <2>; 87 thc63lvd1024_out: endpoint { 88 remote-endpoint = <&adv7511_in>; 89 }; 90 }; 91 }; 92 }; 93 94 memory@48000000 { 95 device_type = "memory"; 96 /* first 128MB is reserved for secure area. */ 97 reg = <0x0 0x48000000 0x0 0x18000000>; 98 }; 99 100 reg_1p8v: regulator-1p8v { 101 compatible = "regulator-fixed"; 102 regulator-name = "fixed-1.8V"; 103 regulator-min-microvolt = <1800000>; 104 regulator-max-microvolt = <1800000>; 105 regulator-boot-on; 106 regulator-always-on; 107 }; 108 109 reg_3p3v: regulator-3p3v { 110 compatible = "regulator-fixed"; 111 regulator-name = "fixed-3.3V"; 112 regulator-min-microvolt = <3300000>; 113 regulator-max-microvolt = <3300000>; 114 regulator-boot-on; 115 regulator-always-on; 116 }; 117 118 reg_12p0v: regulator-12p0v { 119 compatible = "regulator-fixed"; 120 regulator-name = "D12.0V"; 121 regulator-min-microvolt = <12000000>; 122 regulator-max-microvolt = <12000000>; 123 regulator-boot-on; 124 regulator-always-on; 125 }; 126 127 vga { 128 compatible = "vga-connector"; 129 130 port { 131 vga_in: endpoint { 132 remote-endpoint = <&adv7123_out>; 133 }; 134 }; 135 }; 136 137 vga-encoder { 138 compatible = "adi,adv7123"; 139 140 ports { 141 #address-cells = <1>; 142 #size-cells = <0>; 143 144 port@0 { 145 reg = <0>; 146 adv7123_in: endpoint { 147 remote-endpoint = <&du_out_rgb>; 148 }; 149 }; 150 port@1 { 151 reg = <1>; 152 adv7123_out: endpoint { 153 remote-endpoint = <&vga_in>; 154 }; 155 }; 156 }; 157 }; 158 159 x12_clk: x12 { 160 compatible = "fixed-clock"; 161 #clock-cells = <0>; 162 clock-frequency = <74250000>; 163 }; 164}; 165 166&avb { 167 pinctrl-0 = <&avb0_pins>; 168 pinctrl-names = "default"; 169 renesas,no-ether-link; 170 phy-handle = <&phy0>; 171 status = "okay"; 172 173 phy0: ethernet-phy@0 { 174 rxc-skew-ps = <1500>; 175 reg = <0>; 176 interrupt-parent = <&gpio5>; 177 interrupts = <19 IRQ_TYPE_LEVEL_LOW>; 178 /* 179 * TX clock internal delay mode is required for reliable 180 * 1Gbps communication using the KSZ9031RNX phy present on 181 * the Draak board, however, TX clock internal delay mode 182 * isn't supported on r8a77995. Thus, limit speed to 183 * 100Mbps for reliable communication. 184 */ 185 max-speed = <100>; 186 }; 187}; 188 189&can0 { 190 pinctrl-0 = <&can0_pins>; 191 pinctrl-names = "default"; 192 status = "okay"; 193}; 194 195&can1 { 196 pinctrl-0 = <&can1_pins>; 197 pinctrl-names = "default"; 198 status = "okay"; 199}; 200 201&du { 202 pinctrl-0 = <&du_pins>; 203 pinctrl-names = "default"; 204 status = "okay"; 205 206 clocks = <&cpg CPG_MOD 724>, 207 <&cpg CPG_MOD 723>, 208 <&x12_clk>; 209 clock-names = "du.0", "du.1", "dclkin.0"; 210 211 ports { 212 port@0 { 213 endpoint { 214 remote-endpoint = <&adv7123_in>; 215 }; 216 }; 217 }; 218}; 219 220&ehci0 { 221 dr_mode = "host"; 222 status = "okay"; 223}; 224 225&extal_clk { 226 clock-frequency = <48000000>; 227}; 228 229&hsusb { 230 dr_mode = "host"; 231 status = "okay"; 232}; 233 234&i2c0 { 235 pinctrl-0 = <&i2c0_pins>; 236 pinctrl-names = "default"; 237 status = "okay"; 238 239 composite-in@20 { 240 compatible = "adi,adv7180cp"; 241 reg = <0x20>; 242 243 ports { 244 #address-cells = <1>; 245 #size-cells = <0>; 246 247 port@0 { 248 reg = <0>; 249 adv7180_in: endpoint { 250 remote-endpoint = <&composite_con_in>; 251 }; 252 }; 253 254 port@3 { 255 reg = <3>; 256 257 /* 258 * The VIN4 video input path is shared between 259 * CVBS and HDMI inputs through SW[49-53] 260 * switches. 261 * 262 * CVBS is the default selection, link it to 263 * VIN4 here. 264 */ 265 adv7180_out: endpoint { 266 remote-endpoint = <&vin4_in>; 267 }; 268 }; 269 }; 270 271 }; 272 273 hdmi-encoder@39 { 274 compatible = "adi,adv7511w"; 275 reg = <0x39>, <0x3f>, <0x3c>, <0x38>; 276 reg-names = "main", "edid", "cec", "packet"; 277 interrupt-parent = <&gpio1>; 278 interrupts = <28 IRQ_TYPE_LEVEL_LOW>; 279 280 adi,input-depth = <8>; 281 adi,input-colorspace = "rgb"; 282 adi,input-clock = "1x"; 283 284 ports { 285 #address-cells = <1>; 286 #size-cells = <0>; 287 288 port@0 { 289 reg = <0>; 290 adv7511_in: endpoint { 291 remote-endpoint = <&thc63lvd1024_out>; 292 }; 293 }; 294 295 port@1 { 296 reg = <1>; 297 adv7511_out: endpoint { 298 remote-endpoint = <&hdmi_con_out>; 299 }; 300 }; 301 }; 302 }; 303 304 hdmi-decoder@4c { 305 compatible = "adi,adv7612"; 306 reg = <0x4c>; 307 default-input = <0>; 308 309 ports { 310 #address-cells = <1>; 311 #size-cells = <0>; 312 313 port@0 { 314 reg = <0>; 315 316 adv7612_in: endpoint { 317 remote-endpoint = <&hdmi_con_in>; 318 }; 319 }; 320 321 port@2 { 322 reg = <2>; 323 324 /* 325 * The VIN4 video input path is shared between 326 * CVBS and HDMI inputs through SW[49-53] 327 * switches. 328 * 329 * CVBS is the default selection, leave HDMI 330 * not connected here. 331 */ 332 adv7612_out: endpoint { 333 pclk-sample = <0>; 334 hsync-active = <0>; 335 vsync-active = <0>; 336 }; 337 }; 338 }; 339 }; 340 341 eeprom@50 { 342 compatible = "rohm,br24t01", "atmel,24c01"; 343 reg = <0x50>; 344 pagesize = <8>; 345 }; 346}; 347 348&i2c1 { 349 pinctrl-0 = <&i2c1_pins>; 350 pinctrl-names = "default"; 351 status = "okay"; 352}; 353 354&lvds0 { 355 status = "okay"; 356 357 clocks = <&cpg CPG_MOD 727>, 358 <&x12_clk>, 359 <&extal_clk>; 360 clock-names = "fck", "dclkin.0", "extal"; 361 362 ports { 363 port@1 { 364 lvds0_out: endpoint { 365 remote-endpoint = <&thc63lvd1024_in>; 366 }; 367 }; 368 }; 369}; 370 371&lvds1 { 372 /* 373 * Even though the LVDS1 output is not connected, the encoder must be 374 * enabled to supply a pixel clock to the DU for the DPAD output when 375 * LVDS0 is in use. 376 */ 377 status = "okay"; 378 379 clocks = <&cpg CPG_MOD 727>, 380 <&x12_clk>, 381 <&extal_clk>; 382 clock-names = "fck", "dclkin.0", "extal"; 383}; 384 385&ohci0 { 386 dr_mode = "host"; 387 status = "okay"; 388}; 389 390&pfc { 391 avb0_pins: avb { 392 groups = "avb0_link", "avb0_mdio", "avb0_mii"; 393 function = "avb0"; 394 }; 395 396 can0_pins: can0 { 397 groups = "can0_data_a"; 398 function = "can0"; 399 }; 400 401 can1_pins: can1 { 402 groups = "can1_data_a"; 403 function = "can1"; 404 }; 405 406 du_pins: du { 407 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0"; 408 function = "du"; 409 }; 410 411 i2c0_pins: i2c0 { 412 groups = "i2c0"; 413 function = "i2c0"; 414 }; 415 416 i2c1_pins: i2c1 { 417 groups = "i2c1"; 418 function = "i2c1"; 419 }; 420 421 pwm0_pins: pwm0 { 422 groups = "pwm0_c"; 423 function = "pwm0"; 424 }; 425 426 pwm1_pins: pwm1 { 427 groups = "pwm1_c"; 428 function = "pwm1"; 429 }; 430 431 scif2_pins: scif2 { 432 groups = "scif2_data"; 433 function = "scif2"; 434 }; 435 436 sdhi2_pins: sd2 { 437 groups = "mmc_data8", "mmc_ctrl"; 438 function = "mmc"; 439 power-source = <1800>; 440 }; 441 442 sdhi2_pins_uhs: sd2_uhs { 443 groups = "mmc_data8", "mmc_ctrl"; 444 function = "mmc"; 445 power-source = <1800>; 446 }; 447 448 usb0_pins: usb0 { 449 groups = "usb0"; 450 function = "usb0"; 451 }; 452 453 vin4_pins_cvbs: vin4 { 454 groups = "vin4_data8", "vin4_sync", "vin4_clk"; 455 function = "vin4"; 456 }; 457}; 458 459&pwm0 { 460 pinctrl-0 = <&pwm0_pins>; 461 pinctrl-names = "default"; 462 463 status = "okay"; 464}; 465 466&pwm1 { 467 pinctrl-0 = <&pwm1_pins>; 468 pinctrl-names = "default"; 469 470 status = "okay"; 471}; 472 473&rwdt { 474 timeout-sec = <60>; 475 status = "okay"; 476}; 477 478&scif2 { 479 pinctrl-0 = <&scif2_pins>; 480 pinctrl-names = "default"; 481 482 status = "okay"; 483}; 484 485&sdhi2 { 486 /* used for on-board eMMC */ 487 pinctrl-0 = <&sdhi2_pins>; 488 pinctrl-1 = <&sdhi2_pins_uhs>; 489 pinctrl-names = "default", "state_uhs"; 490 491 vmmc-supply = <®_3p3v>; 492 vqmmc-supply = <®_1p8v>; 493 bus-width = <8>; 494 mmc-hs200-1_8v; 495 non-removable; 496 status = "okay"; 497}; 498 499&usb2_phy0 { 500 pinctrl-0 = <&usb0_pins>; 501 pinctrl-names = "default"; 502 503 renesas,no-otg-pins; 504 status = "okay"; 505}; 506 507&vin4 { 508 pinctrl-0 = <&vin4_pins_cvbs>; 509 pinctrl-names = "default"; 510 511 status = "okay"; 512 513 ports { 514 port { 515 vin4_in: endpoint { 516 remote-endpoint = <&adv7180_out>; 517 }; 518 }; 519 }; 520}; 521