// SPDX-License-Identifier: (GPL-2.0+ OR MIT) // Copyright (c) 2020 Fuzhou Rockchip Electronics Co., Ltd #include #include #include "rk3288.dtsi" #include "rk3288-android.dtsi" / { model = "Rockchip RK3288 EVB RK628 Board"; compatible = "rockchip,rk3288-evb-rk628", "rockchip,rk3288"; chosen: chosen { bootargs = "rootwait earlycon=uart8250,mmio32,0xff690000 vmalloc=496M console=ttyFIQ0 androidboot.baseband=N/A androidboot.veritymode=enforcing androidboot.hardware=rk30board androidboot.console=ttyFIQ0 init=/init kpti=0"; }; adc-keys { compatible = "adc-keys"; io-channels = <&saradc 1>; io-channel-names = "buttons"; keyup-threshold-microvolt = <1800000>; poll-interval = <100>; vol-up-key { label = "volume up"; linux,code = ; press-threshold-microvolt = <1000>; }; vol-down-key { label = "volume down"; linux,code = ; press-threshold-microvolt = <170000>; }; menu { label = "menu"; linux,code = ; press-threshold-microvolt = <640000>; }; esc { label = "esc"; linux,code = ; press-threshold-microvolt = <1000000>; }; home { label = "home"; linux,code = ; press-threshold-microvolt = <1300000>; }; }; backlight: backlight { compatible = "pwm-backlight"; pwms = <&pwm0 0 1000000 0>; brightness-levels = < 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255>; default-brightness-level = <128>; }; i2s_mclkin: i2s-mclkin { compatible = "fixed-factor-clock"; #clock-cells = <0>; clocks = <&cru SCLK_I2S0_OUT>; clock-mult = <1>; clock-div = <1>; clock-output-names = "i2s_mclkin"; }; sound: sound { compatible = "simple-audio-card"; simple-audio-card,format = "i2s"; simple-audio-card,name = "realtek,rt5651-codec"; simple-audio-card,mclk-fs = <256>; simple-audio-card,widgets = "Microphone", "Microphone Jack", "Headphone", "Headphone Jack"; simple-audio-card,routing = "MIC1", "Microphone Jack", "MIC2", "Microphone Jack", "Microphone Jack", "micbias1", "Headphone Jack", "HPOL", "Headphone Jack", "HPOR"; status = "disabled"; simple-audio-card,dai-link@0 { format = "i2s"; cpu { sound-dai = <&i2s>; }; codec { sound-dai = <&rt5651>; }; }; simple-audio-card,dai-link@1 { format = "i2s"; cpu { sound-dai = <&i2s>; }; codec { sound-dai = <&rk628_hdmi>; }; }; }; vcc_host: vcc-host-regulator { compatible = "regulator-fixed"; enable-active-high; gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; pinctrl-names = "default"; pinctrl-0 = <&host_vbus_drv>; regulator-name = "vcc_host"; regulator-always-on; regulator-boot-on; }; vcc_sys: vsys-regulator { compatible = "regulator-fixed"; regulator-name = "vcc_sys"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-always-on; regulator-boot-on; }; vdd_log: vdd-logic { compatible = "pwm-regulator"; rockchip,pwm_id = <1>; rockchip,pwm_voltage = <1100000>; pwms = <&pwm1 0 25000 1>; regulator-name = "vcc_log"; regulator-min-microvolt = <860000>; regulator-max-microvolt = <1360000>; regulator-always-on; regulator-boot-on; }; xin32k: xin32k { compatible = "fixed-clock"; clock-frequency = <32768>; clock-output-names = "xin32k"; #clock-cells = <0>; }; }; &backlight { /delete-property/ enable-gpios; }; &cpu0 { cpu-supply = <&vdd_cpu>; }; &dfi { status = "okay"; }; &dmc { center-supply = <&vdd_log>; status = "okay"; }; &gpu { mali-supply = <&vdd_gpu>; status = "okay"; }; &i2c0 { clock-frequency = <400000>; status = "okay"; rk808: pmic@1b { compatible = "rockchip,rk808"; reg = <0x1b>; interrupt-parent = <&gpio0>; interrupts = <4 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pmic_int &global_pwroff>; rockchip,system-power-controller; wakeup-source; #clock-cells = <1>; clock-output-names = "rk808-clkout1", "rk808-clkout2"; vcc1-supply = <&vcc_sys>; vcc2-supply = <&vcc_sys>; vcc3-supply = <&vcc_sys>; vcc4-supply = <&vcc_sys>; vcc6-supply = <&vcc_sys>; vcc8-supply = <&vcc_io>; vcc9-supply = <&vcc_io>; vcc12-supply = <&vcc_io>; vddio-supply = <&vcc_io>; regulators { vdd_cpu: DCDC_REG1 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <750000>; regulator-max-microvolt = <1400000>; regulator-name = "vdd_arm"; regulator-state-mem { regulator-off-in-suspend; }; }; vdd_gpu: DCDC_REG2 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <850000>; regulator-max-microvolt = <1250000>; regulator-name = "vdd_gpu"; regulator-ramp-delay = <6000>; regulator-state-mem { regulator-off-in-suspend; }; }; vcc_ddr: DCDC_REG3 { regulator-always-on; regulator-boot-on; regulator-name = "vcc_ddr"; regulator-state-mem { regulator-on-in-suspend; }; }; vcc_io: DCDC_REG4 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc_io"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <3300000>; }; }; vcc_tp: LDO_REG1 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc_tp"; regulator-state-mem { regulator-off-in-suspend; }; }; vcca_codec: LDO_REG2 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcca_codec"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <3300000>; }; }; vdd_10: LDO_REG3 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; regulator-name = "vdd_10"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <1000000>; }; }; vccio_wl: LDO_REG4 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-name = "vccio_wl"; regulator-state-mem { regulator-on-in-suspend; }; }; vccio_sd: LDO_REG5 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-name = "vccio_sd"; regulator-state-mem { regulator-off-in-suspend; }; }; vdd10_lcd: LDO_REG6 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; regulator-name = "vdd10_lcd"; regulator-state-mem { regulator-off-in-suspend; }; }; vcc_18: LDO_REG7 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-name = "vcc_18"; regulator-state-mem { regulator-on-in-suspend; regulator-suspend-microvolt = <1800000>; }; }; vcc18_lcd: LDO_REG8 { regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-name = "vcc18_lcd"; regulator-state-mem { regulator-off-in-suspend; }; }; vcc_sd: SWITCH_REG1 { regulator-always-on; regulator-boot-on; regulator-name = "vcc_sd"; regulator-state-mem { regulator-off-in-suspend; }; }; vcc_lcd: SWITCH_REG2 { regulator-always-on; regulator-boot-on; regulator-name = "vcc_lcd"; regulator-state-mem { regulator-off-in-suspend; }; }; }; }; }; &i2c1 { clock-frequency = <400000>; status = "okay"; rk628: rk628@50 { reg = <0x50>; interrupt-parent = <&gpio7>; interrupts = <15 IRQ_TYPE_LEVEL_HIGH>; enable-gpios = <&gpio5 RK_PC2 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio7 RK_PB6 GPIO_ACTIVE_LOW>; status = "okay"; }; }; &i2c2 { status = "okay"; rt5651: rt5651@1a { compatible = "rockchip,rt5651"; reg = <0x1a>; clocks = <&cru SCLK_I2S0_OUT>; clock-names = "mclk"; pinctrl-names = "default"; pinctrl-0 = <&i2s0_mclk>; spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; hp-det-gpio = <&gpio4 28 GPIO_ACTIVE_LOW>; #sound-dai-cells = <0>; }; }; &i2s { #sound-dai-cells = <0>; status = "okay"; }; #include "rk628.dtsi" &io_domains { audio-supply = <&vcc_io>; bb-supply = <&vcc_io>; dvp-supply = <&vcc_io>; flash0-supply = <&vcc_18>; gpio30-supply = <&vcc_io>; gpio1830 = <&vcc_io>; lcdc-supply = <&vcc_lcd>; sdcard-supply = <&vccio_sd>; wifi-supply = <&vccio_wl>; status = "okay"; }; &rockchip_suspend { rockchip,pwm-regulator-config = < (0 | PWM1_REGULATOR_EN ) >; status = "okay"; }; &pwm0 { status = "okay"; }; &pwm1 { pinctrl-names = "active"; pinctrl-0 = <&pwm1_pin_pull_down>; status = "okay"; }; &emmc { bus-width = <8>; cap-mmc-highspeed; disable-wp; non-removable; num-slots = <1>; pinctrl-names = "default"; pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; max-frequency = <100000000>; mmc-hs200-1_8v; mmc-ddr-1_8v; status = "okay"; }; &saradc { vref-supply = <&vcc_18>; status = "okay"; }; &sdmmc { supports-sd; bus-width = <4>; cap-mmc-highspeed; sd-uhs-sdr12; sd-uhs-sdr25; sd-uhs-sdr50; sd-uhs-sdr104; cap-sd-highspeed; card-detect-delay = <200>; disable-wp; /* wp not hooked up */ num-slots = <1>; pinctrl-names = "default"; pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; vmmc-supply = <&vcc_sd>; vqmmc-supply = <&vccio_sd>; supports-sd; status = "okay"; }; &wdt { status = "okay"; }; &pwm0 { status = "okay"; }; &backlight { status = "okay"; }; &rga { status = "okay"; }; &tsadc { rockchip,hw-tshut-polarity = <0>; status = "okay"; }; &usbphy { status = "okay"; }; &usb_host0_ehci { rockchip-relinquish-port; status = "okay"; }; &usb_host0_ohci { status = "okay"; }; &usb_host1 { status = "okay"; }; &usb_otg { status = "okay"; }; &vopb { status = "okay"; }; &vopb_mmu { status = "okay"; }; &vopl { status = "okay"; }; &vopl_mmu { status = "okay"; }; &pinctrl { pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { drive-strength = <8>; }; pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { bias-pull-up; drive-strength = <8>; }; pmic { pmic_int: pmic-int { rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; }; }; sdmmc { /* * Default drive strength isn't enough to achieve even * high-speed mode on EVB board so bump up to 8ma. */ sdmmc_bus4: sdmmc-bus4 { rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_8ma>, <6 RK_PC1 1 &pcfg_pull_up_drv_8ma>, <6 RK_PC2 1 &pcfg_pull_up_drv_8ma>, <6 RK_PC3 1 &pcfg_pull_up_drv_8ma>; }; sdmmc_clk: sdmmc-clk { rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>; }; sdmmc_cmd: sdmmc-cmd { rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>; }; sdmmc_pwr: sdmmc-pwr { rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; }; }; usb { host_vbus_drv: host-vbus-drv { rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; }; }; };