0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd
0004 * Copyright (c) 2019 Vamrs Limited
0005 * Copyright (c) 2019 Amarula Solutions(India)
0006 */
0007
0008 #include <dt-bindings/gpio/gpio.h>
0009 #include <dt-bindings/pinctrl/rockchip.h>
0010
0011 / {
0012 compatible = "vamrs,rk3288-vmarc-som", "rockchip,rk3288";
0013
0014 vccio_flash: vccio-flash-regulator {
0015 compatible = "regulator-fixed";
0016 regulator-name = "vccio_flash";
0017 regulator-min-microvolt = <1800000>;
0018 regulator-max-microvolt = <1800000>;
0019 vin-supply = <&vcc_io>;
0020 };
0021 };
0022
0023 &emmc {
0024 bus-width = <8>;
0025 cap-mmc-highspeed;
0026 disable-wp;
0027 non-removable;
0028 pinctrl-names = "default";
0029 pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
0030 vmmc-supply = <&vcc_io>;
0031 vqmmc-supply = <&vccio_flash>;
0032 status = "okay";
0033 };
0034
0035 &gmac {
0036 assigned-clocks = <&cru SCLK_MAC>;
0037 phy-supply = <&vcc_io>;
0038 snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
0039 };
0040
0041 &hdmi {
0042 ddc-i2c-bus = <&i2c5>;
0043 pinctrl-names = "default";
0044 pinctrl-0 = <&hdmi_cec_c0>;
0045 };
0046
0047 &i2c0 {
0048 clock-frequency = <400000>;
0049 status = "okay";
0050
0051 rk808: pmic@1b {
0052 compatible = "rockchip,rk808";
0053 reg = <0x1b>;
0054 interrupt-parent = <&gpio0>;
0055 interrupts = <RK_PA4 IRQ_TYPE_LEVEL_LOW>;
0056 pinctrl-names = "default";
0057 pinctrl-0 = <&pmic_int &global_pwroff>;
0058 rockchip,system-power-controller;
0059 wakeup-source;
0060 #clock-cells = <1>;
0061 clock-output-names = "rk808-clkout1", "rk808-clkout2";
0062
0063 vcc1-supply = <&vcc5v0_sys>;
0064 vcc2-supply = <&vcc5v0_sys>;
0065 vcc3-supply = <&vcc5v0_sys>;
0066 vcc4-supply = <&vcc5v0_sys>;
0067 vcc6-supply = <&vcc5v0_sys>;
0068 vcc7-supply = <&vcc5v0_sys>;
0069 vcc8-supply = <&vcc_io>;
0070 vcc9-supply = <&vcc_io>;
0071 vcc10-supply = <&vcc5v0_sys>;
0072 vcc11-supply = <&vcc5v0_sys>;
0073 vcc12-supply = <&vcc_io>;
0074 vddio-supply = <&vcc_io>;
0075
0076 regulators {
0077 vdd_cpu: DCDC_REG1 {
0078 regulator-name = "vdd_arm";
0079 regulator-always-on;
0080 regulator-boot-on;
0081 regulator-min-microvolt = <750000>;
0082 regulator-max-microvolt = <1400000>;
0083 regulator-state-mem {
0084 regulator-off-in-suspend;
0085 };
0086 };
0087
0088 vdd_gpu: DCDC_REG2 {
0089 regulator-name = "vdd_gpu";
0090 regulator-always-on;
0091 regulator-boot-on;
0092 regulator-min-microvolt = <850000>;
0093 regulator-max-microvolt = <1250000>;
0094 regulator-ramp-delay = <6000>;
0095 regulator-state-mem {
0096 regulator-off-in-suspend;
0097 };
0098 };
0099
0100 vcc_ddr: DCDC_REG3 {
0101 regulator-name = "vcc_ddr";
0102 regulator-always-on;
0103 regulator-boot-on;
0104 regulator-state-mem {
0105 regulator-on-in-suspend;
0106 };
0107 };
0108
0109 vcc_io: DCDC_REG4 {
0110 regulator-name = "vcc_io";
0111 regulator-always-on;
0112 regulator-boot-on;
0113 regulator-min-microvolt = <3300000>;
0114 regulator-max-microvolt = <3300000>;
0115 regulator-state-mem {
0116 regulator-on-in-suspend;
0117 regulator-suspend-microvolt = <3300000>;
0118 };
0119 };
0120
0121 vcc_tp: LDO_REG1 {
0122 regulator-name = "vcc_tp";
0123 regulator-always-on;
0124 regulator-boot-on;
0125 regulator-min-microvolt = <3300000>;
0126 regulator-max-microvolt = <3300000>;
0127 regulator-state-mem {
0128 regulator-off-in-suspend;
0129 };
0130 };
0131
0132 vcca_codec: LDO_REG2 {
0133 regulator-name = "vcca_codec";
0134 regulator-always-on;
0135 regulator-boot-on;
0136 regulator-min-microvolt = <3300000>;
0137 regulator-max-microvolt = <3300000>;
0138 regulator-state-mem {
0139 regulator-on-in-suspend;
0140 regulator-suspend-microvolt = <3300000>;
0141 };
0142 };
0143
0144 vdd_10: LDO_REG3 {
0145 regulator-name = "vdd_10";
0146 regulator-always-on;
0147 regulator-boot-on;
0148 regulator-min-microvolt = <1000000>;
0149 regulator-max-microvolt = <1000000>;
0150 regulator-state-mem {
0151 regulator-on-in-suspend;
0152 regulator-suspend-microvolt = <1000000>;
0153 };
0154 };
0155
0156 vcc_wl: LDO_REG4 {
0157 regulator-name = "vcc_wl";
0158 regulator-always-on;
0159 regulator-boot-on;
0160 regulator-min-microvolt = <1800000>;
0161 regulator-max-microvolt = <1800000>;
0162 regulator-state-mem {
0163 regulator-on-in-suspend;
0164 };
0165 };
0166
0167 vccio_sd: LDO_REG5 {
0168 regulator-name = "vccio_sd";
0169 regulator-always-on;
0170 regulator-boot-on;
0171 regulator-min-microvolt = <1800000>;
0172 regulator-max-microvolt = <3300000>;
0173 regulator-state-mem {
0174 regulator-on-in-suspend;
0175 regulator-suspend-microvolt = <3300000>;
0176 };
0177 };
0178
0179 vdd10_lcd: LDO_REG6 {
0180 regulator-name = "vdd10_lcd";
0181 regulator-always-on;
0182 regulator-boot-on;
0183 regulator-min-microvolt = <1000000>;
0184 regulator-max-microvolt = <1000000>;
0185 regulator-state-mem {
0186 regulator-off-in-suspend;
0187 };
0188 };
0189
0190 vcc_18: LDO_REG7 {
0191 regulator-name = "vcc_18";
0192 regulator-always-on;
0193 regulator-boot-on;
0194 regulator-min-microvolt = <1800000>;
0195 regulator-max-microvolt = <1800000>;
0196 regulator-state-mem {
0197 regulator-on-in-suspend;
0198 regulator-suspend-microvolt = <1800000>;
0199 };
0200 };
0201
0202 vcc18_lcd: LDO_REG8 {
0203 regulator-name = "vcc18_lcd";
0204 regulator-always-on;
0205 regulator-boot-on;
0206 regulator-min-microvolt = <1800000>;
0207 regulator-max-microvolt = <1800000>;
0208 regulator-state-mem {
0209 regulator-off-in-suspend;
0210 };
0211 };
0212
0213 vcc_sd: SWITCH_REG1 {
0214 regulator-name = "vcc_sd";
0215 regulator-always-on;
0216 regulator-boot-on;
0217 regulator-state-mem {
0218 regulator-off-in-suspend;
0219 };
0220 };
0221
0222 vcc_lcd: SWITCH_REG2 {
0223 regulator-name = "vcc_lcd";
0224 regulator-always-on;
0225 regulator-boot-on;
0226 regulator-state-mem {
0227 regulator-off-in-suspend;
0228 };
0229 };
0230 };
0231 };
0232 };
0233
0234 &i2c1 {
0235 clock-frequency = <400000>;
0236 status = "okay";
0237
0238 hym8563: rtc@51 {
0239 compatible = "haoyu,hym8563";
0240 reg = <0x51>;
0241 interrupt-parent = <&gpio5>;
0242 interrupts = <RK_PC3 IRQ_TYPE_LEVEL_LOW>;
0243 #clock-cells = <0>;
0244 clock-frequency = <32768>;
0245 clock-output-names = "hym8563";
0246 pinctrl-names = "default";
0247 pinctrl-0 = <&hym8563_int>;
0248 };
0249 };
0250
0251 &i2c5 {
0252 status = "okay";
0253 };
0254
0255 &io_domains {
0256 bb-supply = <&vcc_io>;
0257 flash0-supply = <&vccio_flash>;
0258 gpio1830-supply = <&vcc_18>;
0259 gpio30-supply = <&vcc_io>;
0260 sdcard-supply = <&vccio_sd>;
0261 wifi-supply = <&vcc_wl>;
0262 status = "okay";
0263 };
0264
0265 &pinctrl {
0266 hym8563 {
0267 hym8563_int: hym8563-int {
0268 rockchip,pins = <5 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
0269 };
0270 };
0271
0272 pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
0273 drive-strength = <8>;
0274 };
0275
0276 pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
0277 bias-pull-up;
0278 drive-strength = <8>;
0279 };
0280
0281 pmic {
0282 pmic_int: pmic-int {
0283 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
0284 };
0285 };
0286
0287 sdio-pwrseq {
0288 wifi_enable_h: wifi-enable-h {
0289 rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
0290 };
0291 };
0292
0293 sdmmc {
0294 sdmmc_bus4: sdmmc-bus4 {
0295 rockchip,pins =
0296 <6 RK_PC0 1 &pcfg_pull_up_drv_8ma>,
0297 <6 RK_PC1 1 &pcfg_pull_up_drv_8ma>,
0298 <6 RK_PC2 1 &pcfg_pull_up_drv_8ma>,
0299 <6 RK_PC3 1 &pcfg_pull_up_drv_8ma>;
0300 };
0301
0302 sdmmc_clk: sdmmc-clk {
0303 rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_drv_8ma>;
0304 };
0305
0306 sdmmc_cmd: sdmmc-cmd {
0307 rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_8ma>;
0308 };
0309 };
0310
0311 vbus_host {
0312 usb1_en_oc: usb1-en-oc {
0313 rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>;
0314 };
0315 };
0316
0317 vbus_typec {
0318 usb0_en_oc: usb0-en-oc {
0319 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
0320 };
0321 };
0322 };
0323
0324 &sdio_pwrseq {
0325 /*
0326 * On the module itself this is one of these (depending
0327 * on the actual card populated):
0328 * - SDIO_RESET_L_WL_REG_ON
0329 * - PDN (power down when low)
0330 */
0331 reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>; /* WIFI_REG_ON */
0332 };
0333
0334 &usbphy {
0335 status = "okay";
0336 };
0337
0338 &usb_host0_ehci {
0339 status = "okay";
0340 };
0341
0342 &usb_host0_ohci {
0343 status = "okay";
0344 };
0345
0346 &usb_host1 {
0347 status = "okay";
0348 };
0349
0350 &usb_otg {
0351 status = "okay";
0352 };
0353
0354 &vbus_host {
0355 enable-active-high;
0356 gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; /* USB1_EN_OC# */
0357 };
0358
0359 &vbus_typec {
0360 enable-active-high;
0361 gpio = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; /* USB0_EN_OC# */
0362 };