Tho Vu | 2ea98fc | 2023-02-28 22:37:06 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | /* |
| 3 | * Device Tree Source for the White Hawk CPU board |
| 4 | * |
| 5 | * Copyright (C) 2022 Renesas Electronics Corp. |
| 6 | */ |
| 7 | |
| 8 | #include "r8a779g0.dtsi" |
| 9 | |
| 10 | #include <dt-bindings/gpio/gpio.h> |
| 11 | #include <dt-bindings/input/input.h> |
| 12 | #include <dt-bindings/leds/common.h> |
| 13 | |
| 14 | / { |
| 15 | model = "Renesas White Hawk CPU board"; |
| 16 | compatible = "renesas,white-hawk-cpu", "renesas,r8a779g0"; |
| 17 | |
| 18 | aliases { |
| 19 | ethernet0 = &avb0; |
| 20 | serial0 = &hscif0; |
| 21 | }; |
| 22 | |
| 23 | chosen { |
| 24 | bootargs = "ignore_loglevel rw root=/dev/nfs ip=on"; |
| 25 | stdout-path = "serial0:921600n8"; |
| 26 | }; |
| 27 | |
| 28 | keys { |
| 29 | compatible = "gpio-keys"; |
| 30 | |
| 31 | pinctrl-0 = <&keys_pins>; |
| 32 | pinctrl-names = "default"; |
| 33 | |
| 34 | key-1 { |
| 35 | gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; |
| 36 | linux,code = <KEY_1>; |
| 37 | label = "SW47"; |
| 38 | wakeup-source; |
| 39 | debounce-interval = <20>; |
| 40 | }; |
| 41 | |
| 42 | key-2 { |
| 43 | gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; |
| 44 | linux,code = <KEY_2>; |
| 45 | label = "SW48"; |
| 46 | wakeup-source; |
| 47 | debounce-interval = <20>; |
| 48 | }; |
| 49 | |
| 50 | key-3 { |
| 51 | gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; |
| 52 | linux,code = <KEY_3>; |
| 53 | label = "SW49"; |
| 54 | wakeup-source; |
| 55 | debounce-interval = <20>; |
| 56 | }; |
| 57 | }; |
| 58 | |
| 59 | leds { |
| 60 | compatible = "gpio-leds"; |
| 61 | |
| 62 | led-1 { |
| 63 | gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>; |
| 64 | color = <LED_COLOR_ID_GREEN>; |
| 65 | function = LED_FUNCTION_INDICATOR; |
| 66 | function-enumerator = <1>; |
| 67 | }; |
| 68 | |
| 69 | led-2 { |
| 70 | gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; |
| 71 | color = <LED_COLOR_ID_GREEN>; |
| 72 | function = LED_FUNCTION_INDICATOR; |
| 73 | function-enumerator = <2>; |
| 74 | }; |
| 75 | |
| 76 | led-3 { |
| 77 | gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>; |
| 78 | color = <LED_COLOR_ID_GREEN>; |
| 79 | function = LED_FUNCTION_INDICATOR; |
| 80 | function-enumerator = <3>; |
| 81 | }; |
| 82 | }; |
| 83 | |
| 84 | memory@48000000 { |
| 85 | device_type = "memory"; |
| 86 | /* first 128MB is reserved for secure area. */ |
| 87 | reg = <0x0 0x48000000 0x0 0x78000000>; |
| 88 | }; |
| 89 | |
| 90 | memory@480000000 { |
| 91 | device_type = "memory"; |
| 92 | reg = <0x4 0x80000000 0x0 0x80000000>; |
| 93 | }; |
| 94 | |
| 95 | memory@600000000 { |
| 96 | device_type = "memory"; |
| 97 | reg = <0x6 0x00000000 0x1 0x00000000>; |
| 98 | }; |
| 99 | |
| 100 | mini-dp-con { |
| 101 | compatible = "dp-connector"; |
| 102 | label = "CN5"; |
| 103 | type = "mini"; |
| 104 | |
| 105 | port { |
| 106 | mini_dp_con_in: endpoint { |
| 107 | remote-endpoint = <&sn65dsi86_out>; |
| 108 | }; |
| 109 | }; |
| 110 | }; |
| 111 | |
| 112 | reg_1p2v: regulator-1p2v { |
| 113 | compatible = "regulator-fixed"; |
| 114 | regulator-name = "fixed-1.2V"; |
| 115 | regulator-min-microvolt = <1200000>; |
| 116 | regulator-max-microvolt = <1200000>; |
| 117 | regulator-boot-on; |
| 118 | regulator-always-on; |
| 119 | }; |
| 120 | |
| 121 | reg_1p8v: regulator-1p8v { |
| 122 | compatible = "regulator-fixed"; |
| 123 | regulator-name = "fixed-1.8V"; |
| 124 | regulator-min-microvolt = <1800000>; |
| 125 | regulator-max-microvolt = <1800000>; |
| 126 | regulator-boot-on; |
| 127 | regulator-always-on; |
| 128 | }; |
| 129 | |
| 130 | reg_3p3v: regulator-3p3v { |
| 131 | compatible = "regulator-fixed"; |
| 132 | regulator-name = "fixed-3.3V"; |
| 133 | regulator-min-microvolt = <3300000>; |
| 134 | regulator-max-microvolt = <3300000>; |
| 135 | regulator-boot-on; |
| 136 | regulator-always-on; |
| 137 | }; |
| 138 | |
| 139 | sn65dsi86_refclk: clk-x6 { |
| 140 | compatible = "fixed-clock"; |
| 141 | #clock-cells = <0>; |
| 142 | clock-frequency = <38400000>; |
| 143 | }; |
| 144 | }; |
| 145 | |
| 146 | &avb0 { |
| 147 | pinctrl-0 = <&avb0_pins>; |
| 148 | pinctrl-names = "default"; |
| 149 | phy-handle = <&phy0>; |
| 150 | tx-internal-delay-ps = <2000>; |
| 151 | status = "okay"; |
| 152 | |
| 153 | phy0: ethernet-phy@0 { |
| 154 | compatible = "ethernet-phy-id0022.1622", |
| 155 | "ethernet-phy-ieee802.3-c22"; |
| 156 | rxc-skew-ps = <1500>; |
| 157 | reg = <0>; |
| 158 | interrupt-parent = <&gpio7>; |
| 159 | interrupts = <5 IRQ_TYPE_LEVEL_LOW>; |
| 160 | reset-gpios = <&gpio7 10 GPIO_ACTIVE_LOW>; |
| 161 | }; |
| 162 | }; |
| 163 | |
| 164 | &dsi0 { |
| 165 | status = "okay"; |
| 166 | |
| 167 | ports { |
| 168 | port@1 { |
| 169 | dsi0_out: endpoint { |
| 170 | remote-endpoint = <&sn65dsi86_in>; |
| 171 | data-lanes = <1 2 3 4>; |
| 172 | }; |
| 173 | }; |
| 174 | }; |
| 175 | }; |
| 176 | |
| 177 | &du { |
| 178 | status = "okay"; |
| 179 | }; |
| 180 | |
| 181 | &extal_clk { |
| 182 | clock-frequency = <16666666>; |
| 183 | }; |
| 184 | |
| 185 | &extalr_clk { |
| 186 | clock-frequency = <32768>; |
| 187 | }; |
| 188 | |
| 189 | &hscif0 { |
| 190 | status = "okay"; |
| 191 | }; |
| 192 | |
| 193 | &i2c0 { |
| 194 | pinctrl-0 = <&i2c0_pins>; |
| 195 | pinctrl-names = "default"; |
| 196 | |
| 197 | status = "okay"; |
| 198 | clock-frequency = <400000>; |
| 199 | |
| 200 | io_expander_a: gpio@20 { |
| 201 | compatible = "onnn,pca9654"; |
| 202 | reg = <0x20>; |
| 203 | interrupt-parent = <&gpio0>; |
| 204 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; |
| 205 | gpio-controller; |
| 206 | #gpio-cells = <2>; |
| 207 | interrupt-controller; |
| 208 | #interrupt-cells = <2>; |
| 209 | }; |
| 210 | |
| 211 | eeprom@50 { |
| 212 | compatible = "rohm,br24g01", "atmel,24c01"; |
| 213 | label = "cpu-board"; |
| 214 | reg = <0x50>; |
| 215 | pagesize = <8>; |
| 216 | }; |
| 217 | }; |
| 218 | |
| 219 | &i2c1 { |
| 220 | pinctrl-0 = <&i2c1_pins>; |
| 221 | pinctrl-names = "default"; |
| 222 | |
| 223 | status = "okay"; |
| 224 | clock-frequency = <400000>; |
| 225 | |
| 226 | bridge@2c { |
| 227 | compatible = "ti,sn65dsi86"; |
| 228 | reg = <0x2c>; |
| 229 | |
| 230 | clocks = <&sn65dsi86_refclk>; |
| 231 | clock-names = "refclk"; |
| 232 | |
| 233 | interrupt-parent = <&intc_ex>; |
| 234 | interrupts = <0 IRQ_TYPE_LEVEL_HIGH>; |
| 235 | |
| 236 | enable-gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>; |
| 237 | |
| 238 | vccio-supply = <®_1p8v>; |
| 239 | vpll-supply = <®_1p8v>; |
| 240 | vcca-supply = <®_1p2v>; |
| 241 | vcc-supply = <®_1p2v>; |
| 242 | |
| 243 | ports { |
| 244 | #address-cells = <1>; |
| 245 | #size-cells = <0>; |
| 246 | |
| 247 | port@0 { |
| 248 | reg = <0>; |
| 249 | sn65dsi86_in: endpoint { |
| 250 | remote-endpoint = <&dsi0_out>; |
| 251 | }; |
| 252 | }; |
| 253 | |
| 254 | port@1 { |
| 255 | reg = <1>; |
| 256 | sn65dsi86_out: endpoint { |
| 257 | remote-endpoint = <&mini_dp_con_in>; |
| 258 | }; |
| 259 | }; |
| 260 | }; |
| 261 | }; |
| 262 | }; |
| 263 | |
| 264 | &mmc0 { |
| 265 | pinctrl-0 = <&mmc_pins>; |
| 266 | pinctrl-1 = <&mmc_pins>; |
| 267 | pinctrl-names = "default", "state_uhs"; |
| 268 | |
| 269 | vmmc-supply = <®_3p3v>; |
| 270 | vqmmc-supply = <®_1p8v>; |
| 271 | mmc-hs200-1_8v; |
| 272 | mmc-hs400-1_8v; |
| 273 | bus-width = <8>; |
| 274 | no-sd; |
| 275 | no-sdio; |
| 276 | non-removable; |
| 277 | full-pwr-cycle-in-suspend; |
| 278 | status = "okay"; |
| 279 | }; |
| 280 | |
| 281 | &pfc { |
| 282 | pinctrl-0 = <&scif_clk_pins>; |
| 283 | pinctrl-names = "default"; |
| 284 | |
| 285 | avb0_pins: avb0 { |
| 286 | mux { |
| 287 | groups = "avb0_link", "avb0_mdio", "avb0_rgmii", |
| 288 | "avb0_txcrefclk"; |
| 289 | function = "avb0"; |
| 290 | }; |
| 291 | |
| 292 | pins_mdio { |
| 293 | groups = "avb0_mdio"; |
| 294 | drive-strength = <21>; |
| 295 | }; |
| 296 | |
| 297 | pins_mii { |
| 298 | groups = "avb0_rgmii"; |
| 299 | drive-strength = <21>; |
| 300 | }; |
| 301 | |
| 302 | }; |
| 303 | hscif0_pins: hscif0 { |
| 304 | groups = "hscif0_data"; |
| 305 | function = "hscif0"; |
| 306 | }; |
| 307 | |
| 308 | i2c0_pins: i2c0 { |
| 309 | groups = "i2c0"; |
| 310 | function = "i2c0"; |
| 311 | }; |
| 312 | |
| 313 | i2c1_pins: i2c1 { |
| 314 | groups = "i2c1"; |
| 315 | function = "i2c1"; |
| 316 | }; |
| 317 | |
| 318 | keys_pins: keys { |
| 319 | pins = "GP_5_0", "GP_5_1", "GP_5_2"; |
| 320 | bias-pull-up; |
| 321 | }; |
| 322 | |
| 323 | mmc_pins: mmc { |
| 324 | groups = "mmc_data8", "mmc_ctrl", "mmc_ds"; |
| 325 | function = "mmc"; |
| 326 | power-source = <1800>; |
| 327 | }; |
| 328 | |
| 329 | qspi0_pins: qspi0 { |
| 330 | groups = "qspi0_ctrl", "qspi0_data4"; |
| 331 | function = "qspi0"; |
| 332 | }; |
| 333 | |
| 334 | scif_clk_pins: scif_clk { |
| 335 | groups = "scif_clk"; |
| 336 | function = "scif_clk"; |
| 337 | }; |
| 338 | }; |
| 339 | |
| 340 | &rpc { |
| 341 | pinctrl-0 = <&qspi0_pins>; |
| 342 | pinctrl-names = "default"; |
| 343 | |
| 344 | status = "okay"; |
| 345 | |
| 346 | flash@0 { |
| 347 | compatible = "spansion,s25fs512s", "jedec,spi-nor"; |
| 348 | reg = <0>; |
| 349 | spi-max-frequency = <40000000>; |
| 350 | spi-rx-bus-width = <4>; |
| 351 | |
| 352 | partitions { |
| 353 | compatible = "fixed-partitions"; |
| 354 | #address-cells = <1>; |
| 355 | #size-cells = <1>; |
| 356 | |
| 357 | boot@0 { |
| 358 | reg = <0x0 0x1200000>; |
| 359 | read-only; |
| 360 | }; |
| 361 | user@1200000 { |
| 362 | reg = <0x1200000 0x2e00000>; |
| 363 | }; |
| 364 | }; |
| 365 | }; |
| 366 | }; |
| 367 | |
| 368 | &rwdt { |
| 369 | timeout-sec = <60>; |
| 370 | status = "okay"; |
| 371 | }; |
| 372 | |
| 373 | &scif_clk { |
| 374 | clock-frequency = <24000000>; |
| 375 | }; |