1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Device Tree Source for the R-Car H1 (R8A77790) Marzen board 4 * 5 * Copyright (C) 2013 Renesas Solutions Corp. 6 * Copyright (C) 2013 Simon Horman 7 */ 8 9/dts-v1/; 10#include "r8a7779.dtsi" 11#include <dt-bindings/gpio/gpio.h> 12#include <dt-bindings/input/input.h> 13#include <dt-bindings/interrupt-controller/irq.h> 14 15/ { 16 model = "marzen"; 17 compatible = "renesas,marzen", "renesas,r8a7779"; 18 19 aliases { 20 serial0 = &scif2; 21 serial1 = &scif4; 22 }; 23 24 chosen { 25 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on"; 26 stdout-path = "serial0:115200n8"; 27 }; 28 29 memory@60000000 { 30 device_type = "memory"; 31 reg = <0x60000000 0x40000000>; 32 }; 33 34 fixedregulator3v3: regulator-3v3 { 35 compatible = "regulator-fixed"; 36 regulator-name = "fixed-3.3V"; 37 regulator-min-microvolt = <3300000>; 38 regulator-max-microvolt = <3300000>; 39 regulator-boot-on; 40 regulator-always-on; 41 }; 42 43 vccq_sdhi0: regulator-vccq-sdhi0 { 44 compatible = "regulator-gpio"; 45 46 regulator-name = "SDHI0 VccQ"; 47 regulator-min-microvolt = <1800000>; 48 regulator-max-microvolt = <3300000>; 49 50 gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>; 51 gpios-states = <1>; 52 states = <3300000 1>, <1800000 0>; 53 }; 54 55 keypad-0 { 56 compatible = "gpio-keys"; 57 58 pinctrl-0 = <&keypad0_pins>; 59 pinctrl-names = "default"; 60 61 key-1 { 62 interrupts-extended = <&gpio0 17 IRQ_TYPE_EDGE_FALLING>; 63 linux,code = <KEY_1>; 64 label = "SW1-1"; 65 wakeup-source; 66 debounce-interval = <20>; 67 }; 68 key-2 { 69 interrupts-extended = <&gpio0 18 IRQ_TYPE_EDGE_FALLING>; 70 linux,code = <KEY_2>; 71 label = "SW1-2"; 72 wakeup-source; 73 debounce-interval = <20>; 74 }; 75 }; 76 77 keypad-1 { 78 compatible = "gpio-keys-polled"; 79 poll-interval = <50>; 80 81 pinctrl-0 = <&keypad1_pins>; 82 pinctrl-names = "default"; 83 84 key-3 { 85 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; 86 linux,code = <KEY_3>; 87 label = "SW1-3"; 88 debounce-interval = <20>; 89 }; 90 key-4 { 91 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; 92 linux,code = <KEY_4>; 93 label = "SW1-4"; 94 debounce-interval = <20>; 95 }; 96 }; 97 98 leds { 99 compatible = "gpio-leds"; 100 led2 { 101 gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; 102 }; 103 led3 { 104 gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; 105 }; 106 led4 { 107 gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>; 108 }; 109 }; 110 111 vga-encoder { 112 compatible = "adi,adv7123"; 113 114 ports { 115 #address-cells = <1>; 116 #size-cells = <0>; 117 118 port@0 { 119 reg = <0>; 120 vga_enc_in: endpoint { 121 remote-endpoint = <&du_out_rgb0>; 122 }; 123 }; 124 port@1 { 125 reg = <1>; 126 vga_enc_out: endpoint { 127 remote-endpoint = <&vga_in>; 128 }; 129 }; 130 }; 131 }; 132 133 vga { 134 compatible = "vga-connector"; 135 136 port { 137 vga_in: endpoint { 138 remote-endpoint = <&vga_enc_out>; 139 }; 140 }; 141 }; 142 143 lvds-encoder { 144 compatible = "thine,thc63lvdm83d"; 145 146 ports { 147 #address-cells = <1>; 148 #size-cells = <0>; 149 150 port@0 { 151 reg = <0>; 152 lvds_enc_in: endpoint { 153 remote-endpoint = <&du_out_rgb1>; 154 }; 155 }; 156 port@1 { 157 reg = <1>; 158 lvds_connector: endpoint { 159 }; 160 }; 161 }; 162 }; 163 164 x3_clk: x3-clock { 165 compatible = "fixed-clock"; 166 #clock-cells = <0>; 167 clock-frequency = <65000000>; 168 }; 169}; 170 171&du { 172 pinctrl-0 = <&du_pins>; 173 pinctrl-names = "default"; 174 status = "okay"; 175 176 clocks = <&mstp1_clks R8A7779_CLK_DU>, <&x3_clk>; 177 clock-names = "du.0", "dclkin.0"; 178 179 ports { 180 port@0 { 181 endpoint { 182 remote-endpoint = <&vga_enc_in>; 183 }; 184 }; 185 port@1 { 186 endpoint { 187 remote-endpoint = <&lvds_enc_in>; 188 }; 189 }; 190 }; 191}; 192 193&gpio0 { 194 keypad0-hog { 195 gpio-hog; 196 gpios = <17 GPIO_ACTIVE_LOW>, <18 GPIO_ACTIVE_LOW>; 197 input; 198 }; 199}; 200 201&i2c0 { 202 status = "okay"; 203 204 clock-frequency = <100000>; 205}; 206 207&irqpin0 { 208 status = "okay"; 209}; 210 211&extal_clk { 212 clock-frequency = <31250000>; 213}; 214 215&lbsc { 216 flash@0 { 217 compatible = "cfi-flash"; 218 reg = <0x0 0x04000000>; 219 pinctrl-0 = <&flash_pins>; 220 pinctrl-names = "default"; 221 bank-width = <2>; 222 223 partitions { 224 compatible = "fixed-partitions"; 225 #address-cells = <1>; 226 #size-cells = <1>; 227 228 partition@0 { 229 label = "uboot"; 230 reg = <0x00000000 0x00040000>; 231 read-only; 232 }; 233 partition@40000 { 234 label = "uboot-env"; 235 reg = <0x00040000 0x00040000>; 236 read-only; 237 }; 238 partition@80000 { 239 label = "flash"; 240 reg = <0x00080000 0x03f80000>; 241 }; 242 }; 243 }; 244 245 ethernet@18000000 { 246 compatible = "smsc,lan89218", "smsc,lan9115"; 247 reg = <0x18000000 0x100>; 248 pinctrl-0 = <ðernet_pins>; 249 pinctrl-names = "default"; 250 251 phy-mode = "mii"; 252 interrupts-extended = <&irqpin0 1 IRQ_TYPE_EDGE_FALLING>; 253 smsc,irq-push-pull; 254 reg-io-width = <4>; 255 vddvario-supply = <&fixedregulator3v3>; 256 vdd33a-supply = <&fixedregulator3v3>; 257 }; 258}; 259 260&tmu0 { 261 status = "okay"; 262}; 263 264&pfc { 265 pinctrl-0 = <&scif_clk_pins>; 266 pinctrl-names = "default"; 267 268 du_pins: du { 269 du0 { 270 groups = "du0_rgb888", "du0_sync_1", "du0_clk_out_0", "du0_clk_in"; 271 function = "du0"; 272 }; 273 du1 { 274 groups = "du1_rgb666", "du1_sync_1", "du1_clk_out"; 275 function = "du1"; 276 }; 277 }; 278 279 scif_clk_pins: scif_clk { 280 groups = "scif_clk_b"; 281 function = "scif_clk"; 282 }; 283 284 ethernet_pins: ethernet { 285 intc { 286 groups = "intc_irq1_b"; 287 function = "intc"; 288 }; 289 lbsc { 290 groups = "lbsc_ex_cs0"; 291 function = "lbsc"; 292 }; 293 }; 294 295 flash_pins: flash { 296 groups = "lbsc_cs0"; 297 function = "lbsc"; 298 }; 299 300 scif2_pins: scif2 { 301 groups = "scif2_data_c"; 302 function = "scif2"; 303 }; 304 305 scif4_pins: scif4 { 306 groups = "scif4_data"; 307 function = "scif4"; 308 }; 309 310 sdhi0_pins: sd0 { 311 groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd"; 312 function = "sdhi0"; 313 }; 314 315 hspi0_pins: hspi0 { 316 groups = "hspi0"; 317 function = "hspi0"; 318 }; 319 320 keypad0_pins: keypad-0 { 321 pins = "GP_0_17", "GP_0_18"; 322 bias-pull-up; 323 }; 324 keypad1_pins: keypad-1 { 325 pins = "GP_0_19", "GP_0_20"; 326 bias-pull-up; 327 }; 328}; 329 330&sata { 331 status = "okay"; 332}; 333 334&scif2 { 335 pinctrl-0 = <&scif2_pins>; 336 pinctrl-names = "default"; 337 338 status = "okay"; 339}; 340 341&scif4 { 342 pinctrl-0 = <&scif4_pins>; 343 pinctrl-names = "default"; 344 345 status = "okay"; 346}; 347 348&scif_clk { 349 clock-frequency = <14745600>; 350}; 351 352&sdhi0 { 353 pinctrl-0 = <&sdhi0_pins>; 354 pinctrl-names = "default"; 355 356 vmmc-supply = <&fixedregulator3v3>; 357 vqmmc-supply = <&vccq_sdhi0>; 358 bus-width = <4>; 359 status = "okay"; 360}; 361 362&hspi0 { 363 pinctrl-0 = <&hspi0_pins>; 364 pinctrl-names = "default"; 365 status = "okay"; 366}; 367