1/* 2 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd 3 * 4 * SPDX-License-Identifier: (GPL-2.0+ OR MIT) 5 */ 6 7/dts-v1/; 8#include <dt-bindings/input/input.h> 9#include <dt-bindings/pwm/pwm.h> 10#include <dt-bindings/display/media-bus-format.h> 11#include"rk3288-firefly.dtsi" 12#include"rk3288-rkisp1.dtsi" 13#include "rk3288-linux.dtsi" 14 15/ { 16 model = "Firefly-RK3288"; 17 compatible = "firefly,firefly-rk3288", "rockchip,rk3288"; 18 19 /delete-node/ sdmmc-regulator; 20 vcc_sd: sdmmc-regulator { 21 compatible = "regulator-fixed"; 22 gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; 23 pinctrl-names = "default"; 24 pinctrl-0 = <&sdmmc_pwr>; 25 regulator-name = "vcc_sd"; 26 regulator-min-microvolt = <3300000>; 27 regulator-max-microvolt = <3300000>; 28 startup-delay-us = <100000>; 29 vin-supply = <&vcc_io>; 30 }; 31 32 vcc_lcd: vcc-lcd { 33 compatible = "regulator-fixed"; 34 regulator-boot-on; 35 enable-active-high; 36 pinctrl-names = "default"; 37 pinctrl-0 = <&lcd_en>; 38 regulator-name = "vcc_lcd"; 39 vin-supply = <&vcc_io>; 40 }; 41 42 sound: sound { 43 status = "okay"; 44 compatible = "simple-audio-card"; 45 simple-audio-card,format = "i2s"; 46 simple-audio-card,name = "rockchip,firefly-codec"; 47 simple-audio-card,mclk-fs = <512>; 48 simple-audio-card,widgets = 49 "Microphone", "Microphone Jack", 50 "Headphone", "Headphone Jack"; 51 simple-audio-card,routing = 52 "MIC1", "Microphone Jack", 53 "MIC2", "Microphone Jack", 54 "Microphone Jack", "micbias1", 55 "Headphone Jack", "HPOL", 56 "Headphone Jack", "HPOR"; 57 58 simple-audio-card,dai-link@0 { 59 format = "i2s"; 60 cpu { 61 sound-dai = <&i2s>; 62 }; 63 64 codec { 65 sound-dai = <&es8323>; 66 }; 67 }; 68 69 simple-audio-card,dai-link@1 { 70 format = "i2s"; 71 cpu { 72 sound-dai = <&i2s>; 73 }; 74 75 codec { 76 sound-dai = <&hdmi>; 77 }; 78 }; 79 }; 80 81 spdif-sound { 82 status = "okay"; 83 compatible = "simple-audio-card"; 84 simple-audio-card,name = "ROCKCHIP,SPDIF"; 85 simple-audio-card,mclk-fs = <128>; 86 simple-audio-card,cpu { 87 sound-dai = <&spdif>; 88 }; 89 simple-audio-card,codec { 90 sound-dai = <&spdif_out>; 91 }; 92 }; 93 94 backlight: backlight { 95 pwms = <&pwm1 0 1000000 0>; 96 }; 97 98 hdmi_analog_sound: hdmi-analog-sound { 99 status = "disabled"; 100 rockchip,codec = <&es8323>, <&hdmi>; 101 }; 102 103 vccadc_ref: vccadc-ref { 104 compatible = "regulator-fixed"; 105 regulator-name = "vcc1v8_sys"; 106 regulator-always-on; 107 regulator-boot-on; 108 regulator-min-microvolt = <1800000>; 109 regulator-max-microvolt = <1800000>; 110 }; 111 112 /* 113 * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from 114 * vcc_io directly. Those boards won't be able to power cycle SD cards 115 * but it shouldn't hurt to toggle this pin there anyway. 116 */ 117 118 wireless-bluetooth { 119 clocks = <&hym8563>; 120 clock-names = "ext_clock"; 121 }; 122 123 ext_cam_clk: external-camera-clock { 124 compatible = "fixed-clock"; 125 clock-frequency = <27000000>; 126 clock-output-names = "CLK_CAMERA_27MHZ"; 127 #clock-cells = <0>; 128 }; 129}; 130 131&ir{ 132 /delete-property/ pinctrl-0; 133}; 134 135&hdmi { 136 #address-cells = <1>; 137 #size-cells = <0>; 138 #sound-dai-cells = <0>; 139 status = "okay"; 140 ports { 141 hdmi_in: port { 142 #address-cells = <1>; 143 #size-cells = <0>; 144 hdmi_in_vopb: endpoint@0 { 145 reg = <0>; 146 remote-endpoint = <&vopb_out_hdmi>; 147 }; 148 hdmi_in_vopl: endpoint@1 { 149 reg = <1>; 150 remote-endpoint = <&vopl_out_hdmi>; 151 }; 152 }; 153 }; 154}; 155 156&hdmi_in_vopb { 157 status = "disabled"; 158}; 159 160&hdmi_in_vopl { 161 status = "okay"; 162}; 163 164&gmac { 165 snps,reset-gpio = <&gpio4 7 0>; 166 pinctrl-0 = <&rgmii_pins>; 167 max-speed = <100>; 168 status = "okay"; 169}; 170 171&saradc { 172 vref-supply = <&vccadc_ref>; 173 status = "okay"; 174}; 175 176&sdmmc { 177 sd-uhs-sdr12; 178 sd-uhs-sdr25; 179 sd-uhs-sdr50; 180 sd-uhs-sdr104; 181 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; 182 status = "okay"; 183}; 184 185&edp { 186 status = "disabled"; 187}; 188 189&i2c0{ 190 /delete-node/ act8846@5a; 191}; 192 193&i2c0 { 194 act8846: act8846@5a { 195 compatible = "active-semi,act8846"; 196 reg = <0x5a>; 197 pinctrl-names = "default"; 198 pinctrl-0 = <&pmic_vsel>, <&pwr_hold>; 199 system-power-controller; 200 201 vp1-supply = <&vcc_sys>; 202 vp2-supply = <&vcc_sys>; 203 vp3-supply = <&vcc_sys>; 204 vp4-supply = <&vcc_sys>; 205 inl1-supply = <&vcc_sys>; 206 inl2-supply = <&vcc_sys>; 207 inl3-supply = <&vcc_20>; 208 209 regulators { 210 vcc_ddr: REG1 { 211 regulator-name = "vcc_ddr"; 212 regulator-min-microvolt = <1200000>; 213 regulator-max-microvolt = <1200000>; 214 regulator-always-on; 215 }; 216 217 vcc_io: REG2 { 218 regulator-name = "vcc_io"; 219 regulator-min-microvolt = <3300000>; 220 regulator-max-microvolt = <3300000>; 221 regulator-always-on; 222 }; 223 224 vdd_log: REG3 { 225 regulator-name = "vdd_log"; 226 regulator-min-microvolt = <1100000>; 227 regulator-max-microvolt = <1100000>; 228 regulator-always-on; 229 }; 230 231 vcc_20: REG4 { 232 regulator-name = "vcc_20"; 233 regulator-min-microvolt = <2000000>; 234 regulator-max-microvolt = <2000000>; 235 regulator-always-on; 236 }; 237 238 vccio_sd: REG5 { 239 regulator-name = "vccio_sd"; 240 regulator-min-microvolt = <3300000>; 241 regulator-max-microvolt = <3300000>; 242 regulator-always-on; 243 }; 244 245 vdd10_lcd: REG6 { 246 regulator-name = "vdd10_lcd"; 247 regulator-min-microvolt = <1000000>; 248 regulator-max-microvolt = <1000000>; 249 regulator-always-on; 250 }; 251 252 vcca_33: REG7 { 253 regulator-name = "vcca_33"; 254 regulator-min-microvolt = <3300000>; 255 regulator-max-microvolt = <3300000>; 256 regulator-always-on; 257 }; 258 259 vcc_lan: REG8 { 260 regulator-name = "vcc_lan"; 261 regulator-min-microvolt = <3300000>; 262 regulator-max-microvolt = <3300000>; 263 regulator-always-on; 264 regulator-boot-on; 265 }; 266 267 vcc_pmu: REG9 { 268 regulator-name = "vcc_pmu"; 269 regulator-min-microvolt = <3300000>; 270 regulator-max-microvolt = <3300000>; 271 regulator-always-on; 272 }; 273 274 vdd_10: REG10 { 275 regulator-name = "vdd_10"; 276 regulator-min-microvolt = <1000000>; 277 regulator-max-microvolt = <1000000>; 278 regulator-always-on; 279 }; 280 281 vccio_wl: vcc_18: REG11 { 282 regulator-name = "vcc_18"; 283 regulator-min-microvolt = <1800000>; 284 regulator-max-microvolt = <1800000>; 285 regulator-always-on; 286 }; 287 288 vcc18_lcd: REG12 { 289 regulator-name = "vcc18_lcd"; 290 regulator-min-microvolt = <1800000>; 291 regulator-max-microvolt = <1800000>; 292 regulator-always-on; 293 }; 294 }; 295 }; 296}; 297 298&i2c1 { 299 status = "okay"; 300 clock-frequency = <400000>; 301 302 camera: tc358749@0f { 303 compatible = "toshiba,tc358749"; 304 reg = <0x0f>; 305 clocks = <&ext_cam_clk>; 306 clock-names = "refclk"; 307 308 pinctrl-names = "default"; 309 pinctrl-0 = <&hdmiin_gpios>; 310 311 reset-gpios = <&gpio8 8 GPIO_ACTIVE_LOW>; 312 313 interrupt-parent = <&gpio8>; 314 interrupts = <9 IRQ_TYPE_LEVEL_LOW>; 315 316 port { 317 camera_out: endpoint { 318 remote-endpoint = <&mipi_rx0_in>; 319 clock-lanes = <0>; 320 data-lanes = <1 2 3 4>; 321 clock-noncontinuous; 322 link-frequencies = 323 /bits/ 64 <297000000>; 324 }; 325 }; 326 }; 327}; 328 329&i2c2 { 330 status = "okay"; 331 332 es8323: es8323@10 { 333 status = "okay"; 334 compatible = "everest,es8323"; 335 reg = <0x10>; 336 spk-con-gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>; 337 hp-det-gpio = <&gpio7 15 GPIO_ACTIVE_LOW>; 338 clock-names = "mclk"; 339 clocks = <&cru SCLK_I2S0_OUT>; 340 pinctrl-names = "default"; 341 pinctrl-0 = <&i2s0_mclk>; 342 #sound-dai-cells = <0>; 343 }; 344}; 345 346&i2c3 { 347 status = "okay"; 348}; 349 350&i2c4 { 351 status = "okay"; 352}; 353 354&i2s { 355 #sound-dai-cells = <0>; 356 status = "okay"; 357}; 358 359&pwm1 { 360 status = "okay"; 361}; 362 363&isp { 364 status = "okay"; 365 366 port { 367 isp_mipi_in: endpoint { 368 remote-endpoint = <&dphy_rx0_out>; 369 }; 370 }; 371}; 372 373&isp_mmu { 374 status = "okay"; 375}; 376 377&mipi_phy_rx0 { 378 status = "okay"; 379 380 ports { 381 #address-cells = <1>; 382 #size-cells = <0>; 383 384 port@0 { 385 reg = <0>; 386 387 mipi_rx0_in: endpoint { 388 remote-endpoint = <&camera_out>; 389 data-lanes = <1 2 3 4>; 390 }; 391 }; 392 393 port@1 { 394 reg = <1>; 395 396 dphy_rx0_out: endpoint { 397 remote-endpoint = <&isp_mipi_in>; 398 }; 399 }; 400 }; 401}; 402 403&vopb { 404 status = "okay"; 405 vopb_out: port { 406 vopb_out_edp: endpoint@1 { 407 reg = <1>; 408 remote-endpoint = <&edp_in_vopb>; 409 }; 410 }; 411}; 412 413&vopl { 414 status = "okay"; 415 vopl_out: port { 416 #address-cells = <1>; 417 #size-cells = <0>; 418 419 vopl_out_hdmi: endpoint@0 { 420 reg = <0>; 421 remote-endpoint = <&hdmi_in_vopl>; 422 }; 423 }; 424}; 425 426&rga { 427 status = "okay"; 428}; 429 430&tsadc { 431 rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ 432}; 433 434&pinctrl { 435 436 /* sata:gpio0 c1 */ 437 init-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; 438 439 pcfg_output_high: pcfg-output-high { 440 output-high; 441 }; 442 443 pcfg_output_low: pcfg-output-low { 444 output-low; 445 }; 446 pmic { 447 pmic_int: pmic-int { 448 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; 449 }; 450 }; 451 452 lcd { 453 lcd_cs: lcd-cs { 454 rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; 455 }; 456 457 lcd_en: lcd-en { 458 rockchip,pins = <7 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; 459 }; 460 }; 461 462 act8846 { 463 pmic_vsel: pmic-vsel { 464 rockchip,pins = <7 RK_PB6 RK_FUNC_GPIO &pcfg_output_low>; 465 }; 466 467 pwr_hold: pwr-hold { 468 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_output_high>; 469 }; 470 }; 471 472 backlight { 473 bl_en: bl-en { 474 rockchip,pins = <7 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 475 }; 476 }; 477 478 buttons { 479 pwrbtn: pwrbtn { 480 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>; 481 }; 482 }; 483 484 hdmiin { 485 hdmiin_gpios: hdmiin_gpios { 486 rockchip,pins = 487 <7 RK_PA5 RK_FUNC_GPIO &pcfg_output_high>, 488 <7 RK_PC5 RK_FUNC_GPIO &pcfg_output_high>, 489 <8 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>, 490 <8 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; 491 }; 492 }; 493 494 i2c1 { 495 i2c1_xfer: i2c1-xfer { 496 rockchip,pins = <8 RK_PA4 1 &pcfg_pull_up>, 497 <8 RK_PA5 1 &pcfg_pull_up>; 498 }; 499 }; 500}; 501