0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2016 Heiko Stuebner <heiko@sntech.de>
0004 */
0005
0006 /dts-v1/;
0007 #include <dt-bindings/input/input.h>
0008 #include "rk3288.dtsi"
0009
0010 / {
0011 model = "mqmaker MiQi";
0012 compatible = "mqmaker,miqi", "rockchip,rk3288";
0013
0014 chosen {
0015 stdout-path = "serial2:115200n8";
0016 };
0017
0018 memory@0 {
0019 device_type = "memory";
0020 reg = <0x0 0x0 0x0 0x80000000>;
0021 };
0022
0023 ext_gmac: external-gmac-clock {
0024 compatible = "fixed-clock";
0025 #clock-cells = <0>;
0026 clock-frequency = <125000000>;
0027 clock-output-names = "ext_gmac";
0028 };
0029
0030 leds {
0031 compatible = "gpio-leds";
0032
0033 work_led: led-0 {
0034 gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
0035 label = "miqi:green:user";
0036 linux,default-trigger = "timer";
0037 };
0038 };
0039
0040 vcc_flash: flash-regulator {
0041 compatible = "regulator-fixed";
0042 regulator-name = "vcc_flash";
0043 regulator-min-microvolt = <1800000>;
0044 regulator-max-microvolt = <1800000>;
0045 vin-supply = <&vcc_io>;
0046 };
0047
0048 vcc_host: usb-host-regulator {
0049 compatible = "regulator-fixed";
0050 enable-active-high;
0051 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
0052 pinctrl-names = "default";
0053 pinctrl-0 = <&host_vbus_drv>;
0054 regulator-name = "vcc_host";
0055 regulator-min-microvolt = <5000000>;
0056 regulator-max-microvolt = <5000000>;
0057 regulator-always-on;
0058 vin-supply = <&vcc_sys>;
0059 };
0060
0061 vcc_sd: sdmmc-regulator {
0062 compatible = "regulator-fixed";
0063 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
0064 pinctrl-names = "default";
0065 pinctrl-0 = <&sdmmc_pwr>;
0066 regulator-name = "vcc_sd";
0067 regulator-min-microvolt = <3300000>;
0068 regulator-max-microvolt = <3300000>;
0069 startup-delay-us = <100000>;
0070 vin-supply = <&vcc_io>;
0071 };
0072
0073 vcc_sys: vsys-regulator {
0074 compatible = "regulator-fixed";
0075 regulator-name = "vcc_sys";
0076 regulator-min-microvolt = <5000000>;
0077 regulator-max-microvolt = <5000000>;
0078 regulator-always-on;
0079 regulator-boot-on;
0080 };
0081 };
0082
0083 &cpu0 {
0084 cpu-supply = <&vdd_cpu>;
0085 };
0086
0087 &cpu1 {
0088 cpu-supply = <&vdd_cpu>;
0089 };
0090
0091 &cpu2 {
0092 cpu-supply = <&vdd_cpu>;
0093 };
0094
0095 &cpu3 {
0096 cpu-supply = <&vdd_cpu>;
0097 };
0098
0099 &emmc {
0100 bus-width = <8>;
0101 cap-mmc-highspeed;
0102 non-removable;
0103 pinctrl-names = "default";
0104 pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
0105 vmmc-supply = <&vcc_io>;
0106 vqmmc-supply = <&vcc_flash>;
0107 status = "okay";
0108 };
0109
0110 &gmac {
0111 assigned-clocks = <&cru SCLK_MAC>;
0112 assigned-clock-parents = <&ext_gmac>;
0113 clock_in_out = "input";
0114 pinctrl-names = "default";
0115 pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
0116 phy-supply = <&vcc_lan>;
0117 phy-mode = "rgmii";
0118 snps,reset-active-low;
0119 snps,reset-delays-us = <0 10000 1000000>;
0120 snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
0121 tx_delay = <0x30>;
0122 rx_delay = <0x10>;
0123 status = "okay";
0124 };
0125
0126 &gpu {
0127 mali-supply = <&vdd_gpu>;
0128 status = "okay";
0129 };
0130
0131 &hdmi {
0132 ddc-i2c-bus = <&i2c5>;
0133 status = "okay";
0134 };
0135
0136 &i2c0 {
0137 clock-frequency = <400000>;
0138 status = "okay";
0139
0140 vdd_cpu: syr827@40 {
0141 compatible = "silergy,syr827";
0142 fcs,suspend-voltage-selector = <1>;
0143 reg = <0x40>;
0144 regulator-name = "vdd_cpu";
0145 regulator-min-microvolt = <850000>;
0146 regulator-max-microvolt = <1350000>;
0147 regulator-always-on;
0148 regulator-boot-on;
0149 regulator-enable-ramp-delay = <300>;
0150 regulator-ramp-delay = <8000>;
0151 vin-supply = <&vcc_sys>;
0152 };
0153
0154 vdd_gpu: syr828@41 {
0155 compatible = "silergy,syr828";
0156 fcs,suspend-voltage-selector = <1>;
0157 reg = <0x41>;
0158 regulator-name = "vdd_gpu";
0159 regulator-min-microvolt = <850000>;
0160 regulator-max-microvolt = <1350000>;
0161 regulator-always-on;
0162 vin-supply = <&vcc_sys>;
0163 };
0164
0165 hym8563: hym8563@51 {
0166 compatible = "haoyu,hym8563";
0167 reg = <0x51>;
0168 #clock-cells = <0>;
0169 clock-frequency = <32768>;
0170 clock-output-names = "xin32k";
0171 };
0172
0173 act8846: act8846@5a {
0174 compatible = "active-semi,act8846";
0175 reg = <0x5a>;
0176 pinctrl-names = "default";
0177 pinctrl-0 = <&pmic_vsel>;
0178 system-power-controller;
0179
0180 vp1-supply = <&vcc_sys>;
0181 vp2-supply = <&vcc_sys>;
0182 vp3-supply = <&vcc_sys>;
0183 vp4-supply = <&vcc_sys>;
0184 inl1-supply = <&vcc_sys>;
0185 inl2-supply = <&vcc_sys>;
0186 inl3-supply = <&vcc_20>;
0187
0188 regulators {
0189 vcc_ddr: REG1 {
0190 regulator-name = "vcc_ddr";
0191 regulator-always-on;
0192 };
0193
0194 vcc_io: REG2 {
0195 regulator-name = "vcc_io";
0196 regulator-min-microvolt = <3300000>;
0197 regulator-max-microvolt = <3300000>;
0198 regulator-always-on;
0199 };
0200
0201 vdd_log: REG3 {
0202 regulator-name = "vdd_log";
0203 regulator-min-microvolt = <1100000>;
0204 regulator-max-microvolt = <1100000>;
0205 regulator-always-on;
0206 };
0207
0208 vcc_20: REG4 {
0209 regulator-name = "vcc_20";
0210 regulator-min-microvolt = <2000000>;
0211 regulator-max-microvolt = <2000000>;
0212 regulator-always-on;
0213 };
0214
0215 vccio_sd: REG5 {
0216 regulator-name = "vccio_sd";
0217 regulator-min-microvolt = <3300000>;
0218 regulator-max-microvolt = <3300000>;
0219 regulator-always-on;
0220 };
0221
0222 vdd10_lcd: REG6 {
0223 regulator-name = "vdd10_lcd";
0224 regulator-min-microvolt = <1000000>;
0225 regulator-max-microvolt = <1000000>;
0226 regulator-always-on;
0227 };
0228
0229 vcca_18: REG7 {
0230 regulator-name = "vcca_18";
0231 regulator-min-microvolt = <1800000>;
0232 regulator-max-microvolt = <1800000>;
0233 };
0234
0235 vcca_33: REG8 {
0236 regulator-name = "vcca_33";
0237 regulator-min-microvolt = <3300000>;
0238 regulator-max-microvolt = <3300000>;
0239 };
0240
0241 vcc_lan: REG9 {
0242 regulator-name = "vcc_lan";
0243 regulator-min-microvolt = <3300000>;
0244 regulator-max-microvolt = <3300000>;
0245 };
0246
0247 vdd_10: REG10 {
0248 regulator-name = "vdd_10";
0249 regulator-min-microvolt = <1000000>;
0250 regulator-max-microvolt = <1000000>;
0251 regulator-always-on;
0252 };
0253
0254 vcc_18: REG11 {
0255 regulator-name = "vcc_18";
0256 regulator-min-microvolt = <1800000>;
0257 regulator-max-microvolt = <1800000>;
0258 regulator-always-on;
0259 };
0260
0261 vcc18_lcd: REG12 {
0262 regulator-name = "vcc18_lcd";
0263 regulator-min-microvolt = <1800000>;
0264 regulator-max-microvolt = <1800000>;
0265 regulator-always-on;
0266 };
0267 };
0268 };
0269 };
0270
0271 &i2c1 {
0272 status = "okay";
0273 };
0274
0275 &i2c2 {
0276 status = "okay";
0277 };
0278
0279 &i2c4 {
0280 status = "okay";
0281 };
0282
0283 &i2c5 {
0284 status = "okay";
0285 };
0286
0287 &io_domains {
0288 status = "okay";
0289
0290 audio-supply = <&vcca_33>;
0291 flash0-supply = <&vcc_flash>;
0292 flash1-supply = <&vcc_lan>;
0293 gpio30-supply = <&vcc_io>;
0294 gpio1830-supply = <&vcc_io>;
0295 lcdc-supply = <&vcc_io>;
0296 sdcard-supply = <&vccio_sd>;
0297 wifi-supply = <&vcc_18>;
0298 };
0299
0300 &pinctrl {
0301 pcfg_output_high: pcfg-output-high {
0302 output-high;
0303 };
0304
0305 pcfg_output_low: pcfg-output-low {
0306 output-low;
0307 };
0308
0309 pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
0310 bias-pull-up;
0311 drive-strength = <12>;
0312 };
0313
0314 act8846 {
0315 pmic_int: pmic-int {
0316 rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
0317 };
0318
0319 pmic_sleep: pmic-sleep {
0320 rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_output_low>;
0321 };
0322
0323 pmic_vsel: pmic-vsel {
0324 rockchip,pins = <7 RK_PA1 RK_FUNC_GPIO &pcfg_output_low>;
0325 };
0326 };
0327
0328 gmac {
0329 phy_int: phy-int {
0330 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
0331 };
0332
0333 phy_pmeb: phy-pmeb {
0334 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
0335 };
0336
0337 phy_rst: phy-rst {
0338 rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
0339 };
0340 };
0341
0342 sdmmc {
0343 /*
0344 * Default drive strength isn't enough to achieve even
0345 * high-speed mode on firefly board so bump up to 12ma.
0346 */
0347 sdmmc_bus4: sdmmc-bus4 {
0348 rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
0349 <6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
0350 <6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
0351 <6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
0352 };
0353
0354 sdmmc_clk: sdmmc-clk {
0355 rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
0356 };
0357
0358 sdmmc_cmd: sdmmc-cmd {
0359 rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
0360 };
0361
0362 sdmmc_pwr: sdmmc-pwr {
0363 rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
0364 };
0365 };
0366
0367 usb_host {
0368 host_vbus_drv: host-vbus-drv {
0369 rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
0370 };
0371 };
0372 };
0373
0374 &saradc {
0375 vref-supply = <&vcc_18>;
0376 status = "okay";
0377 };
0378
0379 &sdmmc {
0380 bus-width = <4>;
0381 cap-mmc-highspeed;
0382 cap-sd-highspeed;
0383 card-detect-delay = <200>;
0384 disable-wp;
0385 pinctrl-names = "default";
0386 pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
0387 vmmc-supply = <&vcc_sd>;
0388 vqmmc-supply = <&vccio_sd>;
0389 status = "okay";
0390 };
0391
0392 &tsadc {
0393 rockchip,hw-tshut-mode = <0>;
0394 rockchip,hw-tshut-polarity = <0>;
0395 status = "okay";
0396 };
0397
0398 &uart2 {
0399 status = "okay";
0400 };
0401
0402 &uart3 {
0403 status = "okay";
0404 };
0405
0406 &usbphy {
0407 status = "okay";
0408 };
0409
0410 &usb_host1 {
0411 status = "okay";
0412 };
0413
0414 &usb_otg {
0415 /*
0416 * The otg controller is the only system power source,
0417 * so needs to always stay in device mode.
0418 */
0419 dr_mode = "peripheral";
0420 status = "okay";
0421 };
0422
0423 &vopb {
0424 status = "okay";
0425 };
0426
0427 &vopb_mmu {
0428 status = "okay";
0429 };
0430
0431 &vopl {
0432 status = "okay";
0433 };
0434
0435 &vopl_mmu {
0436 status = "okay";
0437 };
0438
0439 &wdt {
0440 status = "okay";
0441 };