Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 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 | keyboard-irq { |
| 56 | compatible = "gpio-keys"; |
| 57 | |
| 58 | pinctrl-0 = <&keyboard_irq_pins>; |
| 59 | pinctrl-names = "default"; |
| 60 | |
| 61 | interrupt-parent = <&gpio0>; |
| 62 | |
| 63 | key-1 { |
| 64 | interrupts = <17 IRQ_TYPE_EDGE_FALLING>; |
| 65 | linux,code = <KEY_1>; |
| 66 | label = "SW1-1"; |
| 67 | wakeup-source; |
| 68 | debounce-interval = <20>; |
| 69 | }; |
| 70 | key-2 { |
| 71 | interrupts = <18 IRQ_TYPE_EDGE_FALLING>; |
| 72 | linux,code = <KEY_2>; |
| 73 | label = "SW1-2"; |
| 74 | wakeup-source; |
| 75 | debounce-interval = <20>; |
| 76 | }; |
| 77 | }; |
| 78 | |
| 79 | keyboard-gpio { |
| 80 | compatible = "gpio-keys-polled"; |
| 81 | poll-interval = <50>; |
| 82 | |
| 83 | pinctrl-0 = <&keyboard_gpio_pins>; |
| 84 | pinctrl-names = "default"; |
| 85 | |
| 86 | key-3 { |
| 87 | gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; |
| 88 | linux,code = <KEY_3>; |
| 89 | label = "SW1-3"; |
| 90 | debounce-interval = <20>; |
| 91 | }; |
| 92 | key-4 { |
| 93 | gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; |
| 94 | linux,code = <KEY_4>; |
| 95 | label = "SW1-4"; |
| 96 | debounce-interval = <20>; |
| 97 | }; |
| 98 | }; |
| 99 | |
| 100 | leds { |
| 101 | compatible = "gpio-leds"; |
| 102 | led2 { |
| 103 | gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; |
| 104 | }; |
| 105 | led3 { |
| 106 | gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>; |
| 107 | }; |
| 108 | led4 { |
| 109 | gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>; |
| 110 | }; |
| 111 | }; |
| 112 | |
| 113 | vga-encoder { |
| 114 | compatible = "adi,adv7123"; |
| 115 | |
| 116 | ports { |
| 117 | #address-cells = <1>; |
| 118 | #size-cells = <0>; |
| 119 | |
| 120 | port@0 { |
| 121 | reg = <0>; |
| 122 | vga_enc_in: endpoint { |
| 123 | remote-endpoint = <&du_out_rgb0>; |
| 124 | }; |
| 125 | }; |
| 126 | port@1 { |
| 127 | reg = <1>; |
| 128 | vga_enc_out: endpoint { |
| 129 | remote-endpoint = <&vga_in>; |
| 130 | }; |
| 131 | }; |
| 132 | }; |
| 133 | }; |
| 134 | |
| 135 | vga { |
| 136 | compatible = "vga-connector"; |
| 137 | |
| 138 | port { |
| 139 | vga_in: endpoint { |
| 140 | remote-endpoint = <&vga_enc_out>; |
| 141 | }; |
| 142 | }; |
| 143 | }; |
| 144 | |
| 145 | lvds-encoder { |
| 146 | compatible = "thine,thc63lvdm83d"; |
| 147 | |
| 148 | ports { |
| 149 | #address-cells = <1>; |
| 150 | #size-cells = <0>; |
| 151 | |
| 152 | port@0 { |
| 153 | reg = <0>; |
| 154 | lvds_enc_in: endpoint { |
| 155 | remote-endpoint = <&du_out_rgb1>; |
| 156 | }; |
| 157 | }; |
| 158 | port@1 { |
| 159 | reg = <1>; |
| 160 | lvds_connector: endpoint { |
| 161 | }; |
| 162 | }; |
| 163 | }; |
| 164 | }; |
| 165 | |
| 166 | x3_clk: x3-clock { |
| 167 | compatible = "fixed-clock"; |
| 168 | #clock-cells = <0>; |
| 169 | clock-frequency = <65000000>; |
| 170 | }; |
| 171 | }; |
| 172 | |
| 173 | &du { |
| 174 | pinctrl-0 = <&du_pins>; |
| 175 | pinctrl-names = "default"; |
| 176 | status = "okay"; |
| 177 | |
| 178 | clocks = <&mstp1_clks R8A7779_CLK_DU>, <&x3_clk>; |
| 179 | clock-names = "du.0", "dclkin.0"; |
| 180 | |
| 181 | ports { |
| 182 | port@0 { |
| 183 | endpoint { |
| 184 | remote-endpoint = <&vga_enc_in>; |
| 185 | }; |
| 186 | }; |
| 187 | port@1 { |
| 188 | endpoint { |
| 189 | remote-endpoint = <&lvds_enc_in>; |
| 190 | }; |
| 191 | }; |
| 192 | }; |
| 193 | }; |
| 194 | |
| 195 | &gpio0 { |
| 196 | keyboard-irq-hog { |
| 197 | gpio-hog; |
| 198 | gpios = <17 GPIO_ACTIVE_LOW>, <18 GPIO_ACTIVE_LOW>; |
| 199 | input; |
| 200 | }; |
| 201 | }; |
| 202 | |
| 203 | &i2c0 { |
| 204 | status = "okay"; |
| 205 | |
| 206 | clock-frequency = <100000>; |
| 207 | }; |
| 208 | |
| 209 | &irqpin0 { |
| 210 | status = "okay"; |
| 211 | }; |
| 212 | |
| 213 | &extal_clk { |
| 214 | clock-frequency = <31250000>; |
| 215 | }; |
| 216 | |
| 217 | &lbsc { |
| 218 | ethernet@18000000 { |
| 219 | compatible = "smsc,lan89218", "smsc,lan9115"; |
| 220 | reg = <0x18000000 0x100>; |
| 221 | pinctrl-0 = <ðernet_pins>; |
| 222 | pinctrl-names = "default"; |
| 223 | |
| 224 | phy-mode = "mii"; |
| 225 | interrupt-parent = <&irqpin0>; |
| 226 | interrupts = <1 IRQ_TYPE_EDGE_FALLING>; |
| 227 | smsc,irq-push-pull; |
| 228 | reg-io-width = <4>; |
| 229 | vddvario-supply = <&fixedregulator3v3>; |
| 230 | vdd33a-supply = <&fixedregulator3v3>; |
| 231 | }; |
| 232 | }; |
| 233 | |
| 234 | &tmu0 { |
| 235 | status = "okay"; |
| 236 | }; |
| 237 | |
| 238 | &pfc { |
| 239 | pinctrl-0 = <&scif_clk_pins>; |
| 240 | pinctrl-names = "default"; |
| 241 | |
| 242 | du_pins: du { |
| 243 | du0 { |
| 244 | groups = "du0_rgb888", "du0_sync_1", "du0_clk_out_0", "du0_clk_in"; |
| 245 | function = "du0"; |
| 246 | }; |
| 247 | du1 { |
| 248 | groups = "du1_rgb666", "du1_sync_1", "du1_clk_out"; |
| 249 | function = "du1"; |
| 250 | }; |
| 251 | }; |
| 252 | |
| 253 | scif_clk_pins: scif_clk { |
| 254 | groups = "scif_clk_b"; |
| 255 | function = "scif_clk"; |
| 256 | }; |
| 257 | |
| 258 | ethernet_pins: ethernet { |
| 259 | intc { |
| 260 | groups = "intc_irq1_b"; |
| 261 | function = "intc"; |
| 262 | }; |
| 263 | lbsc { |
| 264 | groups = "lbsc_ex_cs0"; |
| 265 | function = "lbsc"; |
| 266 | }; |
| 267 | }; |
| 268 | |
| 269 | scif2_pins: scif2 { |
| 270 | groups = "scif2_data_c"; |
| 271 | function = "scif2"; |
| 272 | }; |
| 273 | |
| 274 | scif4_pins: scif4 { |
| 275 | groups = "scif4_data"; |
| 276 | function = "scif4"; |
| 277 | }; |
| 278 | |
| 279 | sdhi0_pins: sd0 { |
| 280 | groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd"; |
| 281 | function = "sdhi0"; |
| 282 | }; |
| 283 | |
| 284 | hspi0_pins: hspi0 { |
| 285 | groups = "hspi0"; |
| 286 | function = "hspi0"; |
| 287 | }; |
| 288 | |
| 289 | keyboard_irq_pins: keyboard-irq { |
| 290 | pins = "GP_0_17", "GP_0_18"; |
| 291 | bias-pull-up; |
| 292 | }; |
| 293 | keyboard_gpio_pins: keyboard-gpio { |
| 294 | pins = "GP_0_19", "GP_0_20"; |
| 295 | bias-pull-up; |
| 296 | }; |
| 297 | }; |
| 298 | |
| 299 | &sata { |
| 300 | status = "okay"; |
| 301 | }; |
| 302 | |
| 303 | &scif2 { |
| 304 | pinctrl-0 = <&scif2_pins>; |
| 305 | pinctrl-names = "default"; |
| 306 | |
| 307 | status = "okay"; |
| 308 | }; |
| 309 | |
| 310 | &scif4 { |
| 311 | pinctrl-0 = <&scif4_pins>; |
| 312 | pinctrl-names = "default"; |
| 313 | |
| 314 | status = "okay"; |
| 315 | }; |
| 316 | |
| 317 | &scif_clk { |
| 318 | clock-frequency = <14745600>; |
| 319 | }; |
| 320 | |
| 321 | &sdhi0 { |
| 322 | pinctrl-0 = <&sdhi0_pins>; |
| 323 | pinctrl-names = "default"; |
| 324 | |
| 325 | vmmc-supply = <&fixedregulator3v3>; |
| 326 | vqmmc-supply = <&vccq_sdhi0>; |
| 327 | bus-width = <4>; |
| 328 | status = "okay"; |
| 329 | }; |
| 330 | |
| 331 | &hspi0 { |
| 332 | pinctrl-0 = <&hspi0_pins>; |
| 333 | pinctrl-names = "default"; |
| 334 | status = "okay"; |
| 335 | }; |