Message ID | 20170326164947.21821-1-jernej.skrabec@siol.net |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
Hi Jernej 2017-03-27 0:49 GMT+08:00 Jernej Skrabec <jernej.skrabec@siol.net>: > MiQi is rk3288 based development board with 1 or 2 GB SDRAM, 16 GB eMMC, > micro SD card interface, 4 USB 2.0 ports, HDMI, gigabit Ethernet and > expansion ports. > > Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> > --- > > Changes in v2: > - change license to SPDX identifier > - reorder boards in alphabetical order in Kconfig and Makefile > > arch/arm/dts/Makefile | 11 +- > arch/arm/dts/rk3288-miqi.dts | 46 ++++ > arch/arm/dts/rk3288-miqi.dtsi | 423 > ++++++++++++++++++++++++++++++++ > arch/arm/mach-rockchip/rk3288/Kconfig | 101 ++++---- > board/mqmaker/miqi_rk3288/Kconfig | 15 ++ > board/mqmaker/miqi_rk3288/MAINTAINERS | 6 + > board/mqmaker/miqi_rk3288/Makefile | 7 + > board/mqmaker/miqi_rk3288/miqi-rk3288.c | 15 ++ > configs/miqi-rk3288_defconfig | 73 ++++++ > doc/README.rockchip | 5 +- > include/configs/miqi_rk3288.h | 22 ++ > 11 files changed, 672 insertions(+), 52 deletions(-) > create mode 100644 arch/arm/dts/rk3288-miqi.dts > create mode 100644 arch/arm/dts/rk3288-miqi.dtsi > create mode 100644 board/mqmaker/miqi_rk3288/Kconfig > create mode 100644 board/mqmaker/miqi_rk3288/MAINTAINERS > create mode 100644 board/mqmaker/miqi_rk3288/Makefile > create mode 100644 board/mqmaker/miqi_rk3288/miqi-rk3288.c > create mode 100644 configs/miqi-rk3288_defconfig > create mode 100644 include/configs/miqi_rk3288.h > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > index afeb43ff66..9e95386ca5 100644 > --- a/arch/arm/dts/Makefile > +++ b/arch/arm/dts/Makefile > @@ -29,15 +29,16 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ > dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb > dtb-$(CONFIG_ARCH_ROCKCHIP) += \ > rk3036-sdk.dtb \ > + rk3288-evb.dtb \ > + rk3288-fennec.dtb \ > rk3288-firefly.dtb \ > + rk3288-miqi.dtb \ > + rk3288-popmetal.dtb \ > + rk3288-rock2-square.dtb \ > + rk3288-tinker.dtb \ > rk3288-veyron-jerry.dtb \ > rk3288-veyron-mickey.dtb \ > rk3288-veyron-minnie.dtb \ > - rk3288-rock2-square.dtb \ > - rk3288-evb.dtb \ > - rk3288-fennec.dtb \ > - rk3288-tinker.dtb \ > - rk3288-popmetal.dtb \ > rk3328-evb.dtb \ > rk3399-evb.dtb > dtb-$(CONFIG_ARCH_MESON) += \ > diff --git a/arch/arm/dts/rk3288-miqi.dts b/arch/arm/dts/rk3288-miqi.dts > new file mode 100644 > index 0000000000..7b92caf024 > --- /dev/null > +++ b/arch/arm/dts/rk3288-miqi.dts > @@ -0,0 +1,46 @@ > +/* > + * (C) Copyright 2016 Rockchip Electronics Co., Ltd > + * > + * SPDX-License-Identifier: GPL-2.0+ X11 > + */ > + > +/dts-v1/; > +#include "rk3288-miqi.dtsi" > + > +/ { > + model = "mqmaker MiQi"; > + compatible = "mqmaker,miqi", "rockchip,rk3288"; > + > + chosen { > + stdout-path = "serial2:115200n8"; > + }; > +}; > + > +&dmc { > + rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa > + 0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7 > + 0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0 > + 0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0 > + 0x5 0x0>; > + rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200 > + 0xa60 0x40 0x10 0x0>; > + rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>; > +}; > + > + > +&pinctrl { > + u-boot,dm-pre-reloc; > +}; > + > +&uart2 { > + u-boot,dm-pre-reloc; > + reg-shift = <2>; > +}; > + > +&sdmmc { > + u-boot,dm-pre-reloc; > +}; > + > +&emmc { > + u-boot,dm-pre-reloc; > +}; > diff --git a/arch/arm/dts/rk3288-miqi.dtsi b/arch/arm/dts/rk3288-miqi.dtsi > new file mode 100644 > index 0000000000..47dc0f9d74 > --- /dev/null > +++ b/arch/arm/dts/rk3288-miqi.dtsi > @@ -0,0 +1,423 @@ > +/* > + * Copyright (c) 2016 Heiko Stuebner <heiko@sntech.de> > + * > + * SPDX-License-Identifier: GPL-2.0+ X11 > + */ > + > +#include "rk3288.dtsi" > + > +/ { > + memory { > + device_type = "memory"; > + reg = <0 0x80000000>; > + }; > + > + ext_gmac: external-gmac-clock { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <125000000>; > + clock-output-names = "ext_gmac"; > + }; > + > + io_domains: io-domains { > + compatible = "rockchip,rk3288-io-voltage-domain"; > + rockchip,grf = <&grf>; > + > + audio-supply = <&vcca_33>; > + flash0-supply = <&vcc_flash>; > + flash1-supply = <&vcc_lan>; > + gpio30-supply = <&vcc_io>; > + gpio1830-supply = <&vcc_io>; > + lcdc-supply = <&vcc_io>; > + sdcard-supply = <&vccio_sd>; > + wifi-supply = <&vcc_18>; > + }; > + > + > + leds { > + u-boot,dm-pre-reloc; > + compatible = "gpio-leds"; > + > + work { > + u-boot,dm-pre-reloc; > + gpios = <&gpio7 4 GPIO_ACTIVE_LOW>; > + label = "miqi:green:user"; > + linux,default-trigger = "default-on"; > + pinctrl-names = "default"; > + pinctrl-0 = <&led_ctl>; > + }; > + }; > + > + vcc_flash: flash-regulator { > + compatible = "regulator-fixed"; > + regulator-name = "vcc_flash"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + vin-supply = <&vcc_io>; > + }; > + > + vcc_host: usb-host-regulator { > + compatible = "regulator-fixed"; > + enable-active-high; > + gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; > + pinctrl-names = "default"; > + pinctrl-0 = <&host_vbus_drv>; > + regulator-name = "vcc_host"; > + regulator-min-microvolt = <5000000>; > + regulator-max-microvolt = <5000000>; > + regulator-always-on; > + vin-supply = <&vcc_sys>; > + }; > + > + vcc_sd: sdmmc-regulator { > + compatible = "regulator-fixed"; > + gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; > + pinctrl-names = "default"; > + pinctrl-0 = <&sdmmc_pwr>; > + regulator-name = "vcc_sd"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + startup-delay-us = <100000>; > + vin-supply = <&vcc_io>; > + }; > + > + 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; > + }; > +}; > + > +&cpu0 { > + cpu0-supply = <&vdd_cpu>; > +}; > + > +&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>; > + vmmc-supply = <&vcc_io>; > + vqmmc-supply = <&vcc_flash>; > + status = "okay"; > +}; > + > +&gmac { > + assigned-clocks = <&cru SCLK_MAC>; > + assigned-clock-parents = <&ext_gmac>; > + clock_in_out = "input"; > + pinctrl-names = "default"; > + pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>; > + phy-supply = <&vcc_lan>; > + phy-mode = "rgmii"; > + snps,reset-active-low; > + snps,reset-delays-us = <0 10000 1000000>; > + snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>; > + tx_delay = <0x30>; > + rx_delay = <0x10>; > + status = "okay"; > +}; > + > +&hdmi { > + ddc-i2c-bus = <&i2c5>; > + status = "okay"; > +}; > + > +&i2c0 { > + clock-frequency = <400000>; > + status = "okay"; > + > + vdd_cpu: syr827@40 { > + compatible = "silergy,syr827"; > + fcs,suspend-voltage-selector = <1>; > + reg = <0x40>; > + regulator-name = "vdd_cpu"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1350000>; > + regulator-always-on; > + regulator-boot-on; > + regulator-enable-ramp-delay = <300>; > + regulator-ramp-delay = <8000>; > + vin-supply = <&vcc_sys>; > + }; > + > + vdd_gpu: syr828@41 { > + compatible = "silergy,syr828"; > + fcs,suspend-voltage-selector = <1>; > + reg = <0x41>; > + regulator-name = "vdd_gpu"; > + regulator-min-microvolt = <850000>; > + regulator-max-microvolt = <1350000>; > + regulator-always-on; > + vin-supply = <&vcc_sys>; > + }; > + > + hym8563: hym8563@51 { > + compatible = "haoyu,hym8563"; > + reg = <0x51>; > + #clock-cells = <0>; > + clock-frequency = <32768>; > + clock-output-names = "xin32k"; > + }; > + > + act8846: act8846@5a { > + compatible = "active-semi,act8846"; > + reg = <0x5a>; > + pinctrl-names = "default"; > + pinctrl-0 = <&pmic_vsel>; > + system-power-controller; > + > + vp1-supply = <&vcc_sys>; > + vp2-supply = <&vcc_sys>; > + vp3-supply = <&vcc_sys>; > + vp4-supply = <&vcc_sys>; > + inl1-supply = <&vcc_sys>; > + inl2-supply = <&vcc_sys>; > + inl3-supply = <&vcc_20>; > + > + regulators { > + vcc_ddr: REG1 { > + regulator-name = "vcc_ddr"; > + regulator-always-on; > + }; > + > + vcc_io: REG2 { > + regulator-name = "vcc_io"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + }; > + > + vdd_log: REG3 { > + regulator-name = "vdd_log"; > + regulator-min-microvolt = <1100000>; > + regulator-max-microvolt = <1100000>; > + regulator-always-on; > + }; > + > + vcc_20: REG4 { > + regulator-name = "vcc_20"; > + regulator-min-microvolt = <2000000>; > + regulator-max-microvolt = <2000000>; > + regulator-always-on; > + }; > + > + vccio_sd: REG5 { > + regulator-name = "vccio_sd"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-always-on; > + }; > + > + vdd10_lcd: REG6 { > + regulator-name = "vdd10_lcd"; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1000000>; > + regulator-always-on; > + }; > + > + vcca_18: REG7 { > + regulator-name = "vcca_18"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + }; > + > + vcca_33: REG8 { > + regulator-name = "vcca_33"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + vcc_lan: REG9 { > + regulator-name = "vcc_lan"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + }; > + > + vdd_10: REG10 { > + regulator-name = "vdd_10"; > + regulator-min-microvolt = <1000000>; > + regulator-max-microvolt = <1000000>; > + regulator-always-on; > + }; > + > + vcc_18: REG11 { > + regulator-name = "vcc_18"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + }; > + > + vcc18_lcd: REG12 { > + regulator-name = "vcc18_lcd"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <1800000>; > + regulator-always-on; > + }; > + }; > + }; > +}; > + > +&i2c1 { > + status = "okay"; > +}; > + > +&i2c2 { > + status = "okay"; > +}; > + > +&i2c4 { > + status = "okay"; > +}; > + > +&i2c5 { > + status = "okay"; > +}; > + > +&pinctrl { > + pcfg_output_high: pcfg-output-high { > + output-high; > + }; > + > + pcfg_output_low: pcfg-output-low { > + output-low; > + }; > + > + pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma { > + bias-pull-up; > + drive-strength = <12>; > + }; > + > + act8846 { > + pmic_int: pmic-int { > + rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>; > + }; > + > + pmic_sleep: pmic-sleep { > + rockchip,pins = <0 0 RK_FUNC_GPIO > &pcfg_output_low>; > + }; > + > + pmic_vsel: pmic-vsel { > + rockchip,pins = <7 1 RK_FUNC_GPIO > &pcfg_output_low>; > + }; > + }; > + > + gmac { > + phy_int: phy-int { > + rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>; > + }; > + > + phy_pmeb: phy-pmeb { > + rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>; > + }; > + > + phy_rst: phy-rst { > + rockchip,pins = <4 8 RK_FUNC_GPIO > &pcfg_output_high>; > + }; > + }; > + > + leds { > + led_ctl: led-ctl { > + rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>; > + }; > + }; > + > + sdmmc { > + /* > + * Default drive strength isn't enough to achieve even > + * high-speed mode on firefly board so bump up to 12ma. > + */ > + sdmmc_bus4: sdmmc-bus4 { > + rockchip,pins = <6 16 RK_FUNC_1 > &pcfg_pull_up_drv_12ma>, > + <6 17 RK_FUNC_1 > &pcfg_pull_up_drv_12ma>, > + <6 18 RK_FUNC_1 > &pcfg_pull_up_drv_12ma>, > + <6 19 RK_FUNC_1 > &pcfg_pull_up_drv_12ma>; > + }; > + > + sdmmc_clk: sdmmc-clk { > + rockchip,pins = <6 20 RK_FUNC_1 > &pcfg_pull_none_12ma>; > + }; > + > + sdmmc_cmd: sdmmc-cmd { > + rockchip,pins = <6 21 RK_FUNC_1 > &pcfg_pull_up_drv_12ma>; > + }; > + > + sdmmc_pwr: sdmmc-pwr { > + rockchip,pins = <7 11 RK_FUNC_GPIO > &pcfg_pull_none>; > + }; > + }; > + > + usb_host { > + host_vbus_drv: host-vbus-drv { > + rockchip,pins = <0 14 RK_FUNC_GPIO > &pcfg_pull_none>; > + }; > + }; > +}; > + > +&saradc { > + vref-supply = <&vcc_18>; > + status = "okay"; > +}; > + > +&sdmmc { > + bus-width = <4>; > + cap-mmc-highspeed; > + cap-sd-highspeed; > + card-detect-delay = <200>; > + disable-wp; > + num-slots = <1>; > + pinctrl-names = "default"; > + pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; > + vmmc-supply = <&vcc_sd>; > + vqmmc-supply = <&vccio_sd>; > + status = "okay"; > +}; > + > +&tsadc { > + rockchip,hw-tshut-mode = <0>; > + rockchip,hw-tshut-polarity = <0>; > + status = "okay"; > +}; > + > +&uart2 { > + status = "okay"; > +}; > + > +&uart3 { > + status = "okay"; > +}; > + > +&usbphy { > + status = "okay"; > +}; > + > +&usb_host1 { > + vbus-supply = <&vcc_host>; > + status = "okay"; > +}; > + > +&vopb { > + status = "okay"; > +}; > + > +&vopb_mmu { > + status = "okay"; > +}; > + > +&vopl { > + status = "okay"; > +}; > + > +&vopl_mmu { > + status = "okay"; > +}; > + > +&wdt { > + status = "okay"; > +}; > diff --git a/arch/arm/mach-rockchip/rk3288/Kconfig > b/arch/arm/mach-rockchip/rk3288/Kconfig > index 738a20d07c..8e7355ece4 100644 > --- a/arch/arm/mach-rockchip/rk3288/Kconfig > +++ b/arch/arm/mach-rockchip/rk3288/Kconfig > You should not touch other code as this patch is target to adding Miqi support only. Please submit another patch if you want to reorder the code. > @@ -1,13 +1,34 @@ > if ROCKCHIP_RK3288 > > -config TARGET_FIREFLY_RK3288 > - bool "Firefly-RK3288" > +config TARGET_CHROMEBOOK_JERRY > + bool "Google/Rockchip Veyron-Jerry Chromebook" > select BOARD_LATE_INIT > help > - Firefly is a RK3288-based development board with 2 USB ports, > - HDMI, VGA, micro-SD card, audio, WiFi and Gigabit Ethernet, It > - also includes on-board eMMC and 1GB of SDRAM. Expansion > connectors > - provide access to display pins, I2C, SPI, UART and GPIOs. > + Jerry is a RK3288-based clamshell device with 2 USB 3.0 ports, > + HDMI, an 11.9 inch EDP display, micro-SD card, touchpad and > + WiFi. It includes a Chrome OS EC (Cortex-M3) to provide access to > + the keyboard and battery functions. > + > +config TARGET_CHROMEBIT_MICKEY > + bool "Google/Rockchip Veyron-Mickey Chromebit" > + select BOARD_LATE_INIT > + help > + Mickey is a small RK3288-based device with one USB 3.0 port, HDMI > + and WiFi. It has a separate power port and is designed to connect > + to the HDMI input of a monitor or TV. It has no internal battery. > + Typically a USB hub or wireless keyboard/touchpad is used to get > + keyboard and mouse access. > + > +config TARGET_CHROMEBOOK_MINNIE > + bool "Google/Rockchip Veyron-Minnie Chromebook" > + select BOARD_LATE_INIT > + help > + Minnie is a RK3288-based convertible clamshell device with 2 USB > 3.0 > + ports, micro HDMI, a 10.1-inch 1280x800 EDP display, micro-SD > card, > + HD camera, touchpad, WiFi and Bluetooth. It includes a Chrome OS > + EC (Cortex-M3) to provide access to the keyboard and battery > + functions. It includes 2 or 4GB of SDRAM and 16 or 32GB of > + internal MMC. The product name is ASUS Chromebook Flip. > > config TARGET_EVB_RK3288 > bool "Evb-RK3288" > @@ -27,6 +48,24 @@ config TARGET_FENNEC_RK3288 > includes on-board eMMC and 2GB of SDRAM. Expansion connectors > provide access to display pins, I2C, SPI, UART and GPIOs. > > +config TARGET_FIREFLY_RK3288 > + bool "Firefly-RK3288" > + select BOARD_LATE_INIT > + help > + Firefly is a RK3288-based development board with 2 USB ports, > + HDMI, VGA, micro-SD card, audio, WiFi and Gigabit Ethernet, It > + also includes on-board eMMC and 1GB of SDRAM. Expansion > connectors > + provide access to display pins, I2C, SPI, UART and GPIOs. > + > +config TARGET_MIQI_RK3288 > + bool "MiQi-RK3288" > + select BOARD_LATE_INIT > + help > + MiQi-RK3288 is a RK3288-based development board with 4 USB 2.0 > + ports, HDMI, micro-SD card, 16 GB eMMC and Gigabit Ethernet. It > + has 1 or 2 GiB SDRAM. Expansion connectors provide access to > + I2C, SPI, UART, GPIOs and fan control. > + > config TARGET_POPMETAL_RK3288 > bool "PopMetal-RK3288" > select BOARD_LATE_INIT > @@ -37,45 +76,6 @@ config TARGET_POPMETAL_RK3288 > 2GB DDR3. Expansion connectors provide access to I2C, SPI, UART, > GPIOs and display interface. > > -config TARGET_TINKER_RK3288 > - bool "Tinker-RK3288" > - select BOARD_LATE_INIT > - help > - Tinker is a RK3288-based development board with 2 USB ports, > HDMI, > - micro-SD card, audio, Gigabit Ethernet. It also includes on-board > - 8GB eMMC and 2GB of SDRAM. Expansion connectors provide access to > - I2C, SPI, UART, GPIOs. > - > -config TARGET_CHROMEBOOK_JERRY > - bool "Google/Rockchip Veyron-Jerry Chromebook" > - select BOARD_LATE_INIT > - help > - Jerry is a RK3288-based clamshell device with 2 USB 3.0 ports, > - HDMI, an 11.9 inch EDP display, micro-SD card, touchpad and > - WiFi. It includes a Chrome OS EC (Cortex-M3) to provide access to > - the keyboard and battery functions. > - > -config TARGET_CHROMEBIT_MICKEY > - bool "Google/Rockchip Veyron-Mickey Chromebit" > - select BOARD_LATE_INIT > - help > - Mickey is a small RK3288-based device with one USB 3.0 port, HDMI > - and WiFi. It has a separate power port and is designed to connect > - to the HDMI input of a monitor or TV. It has no internal battery. > - Typically a USB hub or wireless keyboard/touchpad is used to get > - keyboard and mouse access. > - > -config TARGET_CHROMEBOOK_MINNIE > - bool "Google/Rockchip Veyron-Minnie Chromebook" > - select BOARD_LATE_INIT > - help > - Minnie is a RK3288-based convertible clamshell device with 2 USB > 3.0 > - ports, micro HDMI, a 10.1-inch 1280x800 EDP display, micro-SD > card, > - HD camera, touchpad, WiFi and Bluetooth. It includes a Chrome OS > - EC (Cortex-M3) to provide access to the keyboard and battery > - functions. It includes 2 or 4GB of SDRAM and 16 or 32GB of > - internal MMC. The product name is ASUS Chromebook Flip. > - > config TARGET_ROCK2 > bool "Radxa Rock 2" > select BOARD_LATE_INIT > @@ -85,6 +85,15 @@ config TARGET_ROCK2 > space for a real-time-clock battery. There is also an expansion > interface which provides access to many pins. > > +config TARGET_TINKER_RK3288 > + bool "Tinker-RK3288" > + select BOARD_LATE_INIT > + help > + Tinker is a RK3288-based development board with 2 USB ports, > HDMI, > + micro-SD card, audio, Gigabit Ethernet. It also includes on-board > + 8GB eMMC and 2GB of SDRAM. Expansion connectors provide access to > + I2C, SPI, UART, GPIOs. > + > config ROCKCHIP_FAST_SPL > bool "Change the CPU to full speed in SPL" > depends on TARGET_CHROMEBOOK_JERRY > @@ -118,6 +127,8 @@ source "board/firefly/firefly-rk3288/Kconfig" > > source "board/google/veyron/Kconfig" > > +source "board/mqmaker/miqi_rk3288/Kconfig" > + > source "board/radxa/rock2/Kconfig" > > source "board/rockchip/evb_rk3288/Kconfig" > diff --git a/board/mqmaker/miqi_rk3288/Kconfig > b/board/mqmaker/miqi_rk3288/Kconfig > new file mode 100644 > index 0000000000..232a112090 > --- /dev/null > +++ b/board/mqmaker/miqi_rk3288/Kconfig > The same as above. > @@ -0,0 +1,15 @@ > +if TARGET_MIQI_RK3288 > + > +config SYS_BOARD > + default "miqi_rk3288" > + > +config SYS_VENDOR > + default "mqmaker" > + > +config SYS_CONFIG_NAME > + default "miqi_rk3288" > + > +config BOARD_SPECIFIC_OPTIONS # dummy > + def_bool y > + > +endif > diff --git a/board/mqmaker/miqi_rk3288/MAINTAINERS > b/board/mqmaker/miqi_rk3288/MAINTAINERS > new file mode 100644 > index 0000000000..053a5e6028 > --- /dev/null > +++ b/board/mqmaker/miqi_rk3288/MAINTAINERS > @@ -0,0 +1,6 @@ > +MIQI > +M: Jernej Skrabec <jernej.skrabec@siol.net> > +S: Maintained > +F: board/mqmaker/miqi_rk3288 > +F: include/configs/miqi_rk3288.h > +F: configs/miqi-rk3288_defconfig > diff --git a/board/mqmaker/miqi_rk3288/Makefile > b/board/mqmaker/miqi_rk3288/Makefile > new file mode 100644 > index 0000000000..ec95affb39 > --- /dev/null > +++ b/board/mqmaker/miqi_rk3288/Makefile > @@ -0,0 +1,7 @@ > +# > +# (C) Copyright 2016 Rockchip Electronics Co., Ltd > +# > +# SPDX-License-Identifier: GPL-2.0+ > +# > + > +obj-y += miqi-rk3288.o > diff --git a/board/mqmaker/miqi_rk3288/miqi-rk3288.c > b/board/mqmaker/miqi_rk3288/miqi-rk3288.c > new file mode 100644 > index 0000000000..a82f0ae283 > --- /dev/null > +++ b/board/mqmaker/miqi_rk3288/miqi-rk3288.c > @@ -0,0 +1,15 @@ > +/* > + * (C) Copyright 2016 Rockchip Electronics Co., Ltd > + * > + * SPDX-License-Identifier: GPL-2.0+ > + */ > + > +#include <common.h> > +#include <spl.h> > + > +void board_boot_order(u32 *spl_boot_list) > +{ > + /* eMMC prior to sdcard. */ > + spl_boot_list[0] = BOOT_DEVICE_MMC2; > + spl_boot_list[1] = BOOT_DEVICE_MMC1; > +} > diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig > new file mode 100644 > index 0000000000..203824b893 > --- /dev/null > +++ b/configs/miqi-rk3288_defconfig > @@ -0,0 +1,73 @@ > +CONFIG_ARM=y > +CONFIG_ARCH_ROCKCHIP=y > +CONFIG_SYS_MALLOC_F_LEN=0x2000 > +CONFIG_ROCKCHIP_RK3288=y > +CONFIG_ROCKCHIP_SPL_BACK_TO_BROM=y > +CONFIG_TARGET_MIQI_RK3288=y > +CONFIG_SPL_STACK_R_ADDR=0x80000 > +CONFIG_DEFAULT_DEVICE_TREE="rk3288-miqi" > +CONFIG_SILENT_CONSOLE=y > +# CONFIG_DISPLAY_CPUINFO is not set > +CONFIG_SPL_STACK_R=y > +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000 > +# CONFIG_CMD_IMLS is not set > +CONFIG_CMD_GPT=y > +CONFIG_CMD_MMC=y > +CONFIG_CMD_SF=y > +CONFIG_CMD_SPI=y > +CONFIG_CMD_I2C=y > +CONFIG_CMD_USB=y > +CONFIG_CMD_GPIO=y > +# CONFIG_CMD_SETEXPR is not set > +CONFIG_CMD_CACHE=y > +CONFIG_CMD_TIME=y > +CONFIG_CMD_PMIC=y > +CONFIG_CMD_REGULATOR=y > +# CONFIG_SPL_DOS_PARTITION is not set > +# CONFIG_SPL_ISO_PARTITION is not set > +# CONFIG_SPL_EFI_PARTITION is not set > +CONFIG_SPL_PARTITION_UUIDS=y > +CONFIG_SPL_OF_CONTROL=y > +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names > interrupt-parent assigned-clocks assigned-clock-rates > assigned-clock-parents" > +CONFIG_NET_RANDOM_ETHADDR=y > +CONFIG_REGMAP=y > +CONFIG_SPL_REGMAP=y > +CONFIG_SYSCON=y > +CONFIG_SPL_SYSCON=y > +# CONFIG_SPL_SIMPLE_BUS is not set > +CONFIG_CLK=y > +CONFIG_SPL_CLK=y > +CONFIG_ROCKCHIP_GPIO=y > +CONFIG_SYS_I2C_ROCKCHIP=y > +CONFIG_MMC_DW=y > +CONFIG_MMC_DW_ROCKCHIP=y > +CONFIG_DM_ETH=y > +CONFIG_ETH_DESIGNWARE=y > +CONFIG_GMAC_ROCKCHIP=y > +CONFIG_PINCTRL=y > +CONFIG_SPL_PINCTRL=y > +# CONFIG_SPL_PINCTRL_FULL is not set > +CONFIG_ROCKCHIP_RK3288_PINCTRL=y > +CONFIG_DM_PMIC=y > +CONFIG_PMIC_ACT8846=y > +CONFIG_REGULATOR_ACT8846=y > +CONFIG_DM_REGULATOR_FIXED=y > +CONFIG_PWM_ROCKCHIP=y > +CONFIG_RAM=y > +CONFIG_SPL_RAM=y > +CONFIG_DEBUG_UART=y > +CONFIG_DEBUG_UART_BASE=0xff690000 > +CONFIG_DEBUG_UART_CLOCK=24000000 > +CONFIG_DEBUG_UART_SHIFT=2 > +CONFIG_SYS_NS16550=y > +CONFIG_ROCKCHIP_SERIAL=y > +CONFIG_SYSRESET=y > +CONFIG_USB=y > +CONFIG_USB_STORAGE=y > +CONFIG_DM_VIDEO=y > +CONFIG_DISPLAY=y > +CONFIG_VIDEO_ROCKCHIP=y > +CONFIG_CONSOLE_SCROLL_LINES=10 > +CONFIG_USE_TINY_PRINTF=y > +CONFIG_CMD_DHRYSTONE=y > +CONFIG_ERRNO_STR=y > diff --git a/doc/README.rockchip b/doc/README.rockchip > index 186a1a007e..cdeab2d961 100644 > --- a/doc/README.rockchip > +++ b/doc/README.rockchip > @@ -36,15 +36,16 @@ You will need: > Building > ======== > > -At present seven RK3288 boards are supported: > +At present eight RK3288 boards are supported: > > - EVB RK3288 - use evb-rk3288 configuration > - Fennec RK3288 - use fennec-rk3288 configuration > - Firefly RK3288 - use firefly-rk3288 configuration > - Hisense Chromebook - use chromebook_jerry configuration > - - Tinker RK3288 - use tinker-rk3288 configuration > + - MiQi RK3288 - use miqi-rk3288 configuration > - PopMetal RK3288 - use popmetal-rk3288 configuration > - Radxa Rock 2 - use rock2 configuration > + - Tinker RK3288 - use tinker-rk3288 configuration > The same as above > > Two RK3036 board are supported: > > diff --git a/include/configs/miqi_rk3288.h b/include/configs/miqi_rk3288.h > new file mode 100644 > index 0000000000..f686042499 > --- /dev/null > +++ b/include/configs/miqi_rk3288.h > @@ -0,0 +1,22 @@ > +/* > + * (C) Copyright 2016 Rockchip Electronics Co., Ltd > + * > + * SPDX-License-Identifier: GPL-2.0+ > + */ > + > +#ifndef __CONFIG_H > +#define __CONFIG_H > + > +#define ROCKCHIP_DEVICE_SETTINGS \ > + "stdin=serial,cros-ec-keyb\0" \ > + "stdout=serial,vidconsole\0" \ > + "stderr=serial,vidconsole\0" > + > +#include <configs/rk3288_common.h> > + > +#define CONFIG_ENV_IS_IN_MMC > +#define CONFIG_SYS_MMC_ENV_DEV 0 > + > +#define CONFIG_SYS_WHITE_ON_BLACK > + > +#endif > -- > 2.12.1 > >
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index afeb43ff66..9e95386ca5 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -29,15 +29,16 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3036-sdk.dtb \ + rk3288-evb.dtb \ + rk3288-fennec.dtb \ rk3288-firefly.dtb \ + rk3288-miqi.dtb \ + rk3288-popmetal.dtb \ + rk3288-rock2-square.dtb \ + rk3288-tinker.dtb \ rk3288-veyron-jerry.dtb \ rk3288-veyron-mickey.dtb \ rk3288-veyron-minnie.dtb \ - rk3288-rock2-square.dtb \ - rk3288-evb.dtb \ - rk3288-fennec.dtb \ - rk3288-tinker.dtb \ - rk3288-popmetal.dtb \ rk3328-evb.dtb \ rk3399-evb.dtb dtb-$(CONFIG_ARCH_MESON) += \ diff --git a/arch/arm/dts/rk3288-miqi.dts b/arch/arm/dts/rk3288-miqi.dts new file mode 100644 index 0000000000..7b92caf024 --- /dev/null +++ b/arch/arm/dts/rk3288-miqi.dts @@ -0,0 +1,46 @@ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ X11 + */ + +/dts-v1/; +#include "rk3288-miqi.dtsi" + +/ { + model = "mqmaker MiQi"; + compatible = "mqmaker,miqi", "rockchip,rk3288"; + + chosen { + stdout-path = "serial2:115200n8"; + }; +}; + +&dmc { + rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa + 0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7 + 0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0 + 0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0 + 0x5 0x0>; + rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200 + 0xa60 0x40 0x10 0x0>; + rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>; +}; + + +&pinctrl { + u-boot,dm-pre-reloc; +}; + +&uart2 { + u-boot,dm-pre-reloc; + reg-shift = <2>; +}; + +&sdmmc { + u-boot,dm-pre-reloc; +}; + +&emmc { + u-boot,dm-pre-reloc; +}; diff --git a/arch/arm/dts/rk3288-miqi.dtsi b/arch/arm/dts/rk3288-miqi.dtsi new file mode 100644 index 0000000000..47dc0f9d74 --- /dev/null +++ b/arch/arm/dts/rk3288-miqi.dtsi @@ -0,0 +1,423 @@ +/* + * Copyright (c) 2016 Heiko Stuebner <heiko@sntech.de> + * + * SPDX-License-Identifier: GPL-2.0+ X11 + */ + +#include "rk3288.dtsi" + +/ { + memory { + device_type = "memory"; + reg = <0 0x80000000>; + }; + + ext_gmac: external-gmac-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <125000000>; + clock-output-names = "ext_gmac"; + }; + + io_domains: io-domains { + compatible = "rockchip,rk3288-io-voltage-domain"; + rockchip,grf = <&grf>; + + audio-supply = <&vcca_33>; + flash0-supply = <&vcc_flash>; + flash1-supply = <&vcc_lan>; + gpio30-supply = <&vcc_io>; + gpio1830-supply = <&vcc_io>; + lcdc-supply = <&vcc_io>; + sdcard-supply = <&vccio_sd>; + wifi-supply = <&vcc_18>; + }; + + + leds { + u-boot,dm-pre-reloc; + compatible = "gpio-leds"; + + work { + u-boot,dm-pre-reloc; + gpios = <&gpio7 4 GPIO_ACTIVE_LOW>; + label = "miqi:green:user"; + linux,default-trigger = "default-on"; + pinctrl-names = "default"; + pinctrl-0 = <&led_ctl>; + }; + }; + + vcc_flash: flash-regulator { + compatible = "regulator-fixed"; + regulator-name = "vcc_flash"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vcc_io>; + }; + + vcc_host: usb-host-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&host_vbus_drv>; + regulator-name = "vcc_host"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-always-on; + vin-supply = <&vcc_sys>; + }; + + vcc_sd: sdmmc-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_pwr>; + regulator-name = "vcc_sd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + vin-supply = <&vcc_io>; + }; + + 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; + }; +}; + +&cpu0 { + cpu0-supply = <&vdd_cpu>; +}; + +&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>; + vmmc-supply = <&vcc_io>; + vqmmc-supply = <&vcc_flash>; + status = "okay"; +}; + +&gmac { + assigned-clocks = <&cru SCLK_MAC>; + assigned-clock-parents = <&ext_gmac>; + clock_in_out = "input"; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>; + phy-supply = <&vcc_lan>; + phy-mode = "rgmii"; + snps,reset-active-low; + snps,reset-delays-us = <0 10000 1000000>; + snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>; + tx_delay = <0x30>; + rx_delay = <0x10>; + status = "okay"; +}; + +&hdmi { + ddc-i2c-bus = <&i2c5>; + status = "okay"; +}; + +&i2c0 { + clock-frequency = <400000>; + status = "okay"; + + vdd_cpu: syr827@40 { + compatible = "silergy,syr827"; + fcs,suspend-voltage-selector = <1>; + reg = <0x40>; + regulator-name = "vdd_cpu"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + regulator-boot-on; + regulator-enable-ramp-delay = <300>; + regulator-ramp-delay = <8000>; + vin-supply = <&vcc_sys>; + }; + + vdd_gpu: syr828@41 { + compatible = "silergy,syr828"; + fcs,suspend-voltage-selector = <1>; + reg = <0x41>; + regulator-name = "vdd_gpu"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + vin-supply = <&vcc_sys>; + }; + + hym8563: hym8563@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + #clock-cells = <0>; + clock-frequency = <32768>; + clock-output-names = "xin32k"; + }; + + act8846: act8846@5a { + compatible = "active-semi,act8846"; + reg = <0x5a>; + pinctrl-names = "default"; + pinctrl-0 = <&pmic_vsel>; + system-power-controller; + + vp1-supply = <&vcc_sys>; + vp2-supply = <&vcc_sys>; + vp3-supply = <&vcc_sys>; + vp4-supply = <&vcc_sys>; + inl1-supply = <&vcc_sys>; + inl2-supply = <&vcc_sys>; + inl3-supply = <&vcc_20>; + + regulators { + vcc_ddr: REG1 { + regulator-name = "vcc_ddr"; + regulator-always-on; + }; + + vcc_io: REG2 { + regulator-name = "vcc_io"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vdd_log: REG3 { + regulator-name = "vdd_log"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-always-on; + }; + + vcc_20: REG4 { + regulator-name = "vcc_20"; + regulator-min-microvolt = <2000000>; + regulator-max-microvolt = <2000000>; + regulator-always-on; + }; + + vccio_sd: REG5 { + regulator-name = "vccio_sd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vdd10_lcd: REG6 { + regulator-name = "vdd10_lcd"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + }; + + vcca_18: REG7 { + regulator-name = "vcca_18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vcca_33: REG8 { + regulator-name = "vcca_33"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vcc_lan: REG9 { + regulator-name = "vcc_lan"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vdd_10: REG10 { + regulator-name = "vdd_10"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-always-on; + }; + + vcc_18: REG11 { + regulator-name = "vcc_18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + vcc18_lcd: REG12 { + regulator-name = "vcc18_lcd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + }; + }; +}; + +&i2c1 { + status = "okay"; +}; + +&i2c2 { + status = "okay"; +}; + +&i2c4 { + status = "okay"; +}; + +&i2c5 { + status = "okay"; +}; + +&pinctrl { + pcfg_output_high: pcfg-output-high { + output-high; + }; + + pcfg_output_low: pcfg-output-low { + output-low; + }; + + pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma { + bias-pull-up; + drive-strength = <12>; + }; + + act8846 { + pmic_int: pmic-int { + rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + pmic_sleep: pmic-sleep { + rockchip,pins = <0 0 RK_FUNC_GPIO &pcfg_output_low>; + }; + + pmic_vsel: pmic-vsel { + rockchip,pins = <7 1 RK_FUNC_GPIO &pcfg_output_low>; + }; + }; + + gmac { + phy_int: phy-int { + rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + phy_pmeb: phy-pmeb { + rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + phy_rst: phy-rst { + rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>; + }; + }; + + leds { + led_ctl: led-ctl { + rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + sdmmc { + /* + * Default drive strength isn't enough to achieve even + * high-speed mode on firefly board so bump up to 12ma. + */ + sdmmc_bus4: sdmmc-bus4 { + rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_12ma>, + <6 17 RK_FUNC_1 &pcfg_pull_up_drv_12ma>, + <6 18 RK_FUNC_1 &pcfg_pull_up_drv_12ma>, + <6 19 RK_FUNC_1 &pcfg_pull_up_drv_12ma>; + }; + + sdmmc_clk: sdmmc-clk { + rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_12ma>; + }; + + sdmmc_cmd: sdmmc-cmd { + rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_12ma>; + }; + + sdmmc_pwr: sdmmc-pwr { + rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + usb_host { + host_vbus_drv: host-vbus-drv { + rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&saradc { + vref-supply = <&vcc_18>; + status = "okay"; +}; + +&sdmmc { + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + card-detect-delay = <200>; + disable-wp; + num-slots = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; + vmmc-supply = <&vcc_sd>; + vqmmc-supply = <&vccio_sd>; + status = "okay"; +}; + +&tsadc { + rockchip,hw-tshut-mode = <0>; + rockchip,hw-tshut-polarity = <0>; + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&uart3 { + status = "okay"; +}; + +&usbphy { + status = "okay"; +}; + +&usb_host1 { + vbus-supply = <&vcc_host>; + status = "okay"; +}; + +&vopb { + status = "okay"; +}; + +&vopb_mmu { + status = "okay"; +}; + +&vopl { + status = "okay"; +}; + +&vopl_mmu { + status = "okay"; +}; + +&wdt { + status = "okay"; +}; diff --git a/arch/arm/mach-rockchip/rk3288/Kconfig b/arch/arm/mach-rockchip/rk3288/Kconfig index 738a20d07c..8e7355ece4 100644 --- a/arch/arm/mach-rockchip/rk3288/Kconfig +++ b/arch/arm/mach-rockchip/rk3288/Kconfig @@ -1,13 +1,34 @@ if ROCKCHIP_RK3288 -config TARGET_FIREFLY_RK3288 - bool "Firefly-RK3288" +config TARGET_CHROMEBOOK_JERRY + bool "Google/Rockchip Veyron-Jerry Chromebook" select BOARD_LATE_INIT help - Firefly is a RK3288-based development board with 2 USB ports, - HDMI, VGA, micro-SD card, audio, WiFi and Gigabit Ethernet, It - also includes on-board eMMC and 1GB of SDRAM. Expansion connectors - provide access to display pins, I2C, SPI, UART and GPIOs. + Jerry is a RK3288-based clamshell device with 2 USB 3.0 ports, + HDMI, an 11.9 inch EDP display, micro-SD card, touchpad and + WiFi. It includes a Chrome OS EC (Cortex-M3) to provide access to + the keyboard and battery functions. + +config TARGET_CHROMEBIT_MICKEY + bool "Google/Rockchip Veyron-Mickey Chromebit" + select BOARD_LATE_INIT + help + Mickey is a small RK3288-based device with one USB 3.0 port, HDMI + and WiFi. It has a separate power port and is designed to connect + to the HDMI input of a monitor or TV. It has no internal battery. + Typically a USB hub or wireless keyboard/touchpad is used to get + keyboard and mouse access. + +config TARGET_CHROMEBOOK_MINNIE + bool "Google/Rockchip Veyron-Minnie Chromebook" + select BOARD_LATE_INIT + help + Minnie is a RK3288-based convertible clamshell device with 2 USB 3.0 + ports, micro HDMI, a 10.1-inch 1280x800 EDP display, micro-SD card, + HD camera, touchpad, WiFi and Bluetooth. It includes a Chrome OS + EC (Cortex-M3) to provide access to the keyboard and battery + functions. It includes 2 or 4GB of SDRAM and 16 or 32GB of + internal MMC. The product name is ASUS Chromebook Flip. config TARGET_EVB_RK3288 bool "Evb-RK3288" @@ -27,6 +48,24 @@ config TARGET_FENNEC_RK3288 includes on-board eMMC and 2GB of SDRAM. Expansion connectors provide access to display pins, I2C, SPI, UART and GPIOs. +config TARGET_FIREFLY_RK3288 + bool "Firefly-RK3288" + select BOARD_LATE_INIT + help + Firefly is a RK3288-based development board with 2 USB ports, + HDMI, VGA, micro-SD card, audio, WiFi and Gigabit Ethernet, It + also includes on-board eMMC and 1GB of SDRAM. Expansion connectors + provide access to display pins, I2C, SPI, UART and GPIOs. + +config TARGET_MIQI_RK3288 + bool "MiQi-RK3288" + select BOARD_LATE_INIT + help + MiQi-RK3288 is a RK3288-based development board with 4 USB 2.0 + ports, HDMI, micro-SD card, 16 GB eMMC and Gigabit Ethernet. It + has 1 or 2 GiB SDRAM. Expansion connectors provide access to + I2C, SPI, UART, GPIOs and fan control. + config TARGET_POPMETAL_RK3288 bool "PopMetal-RK3288" select BOARD_LATE_INIT @@ -37,45 +76,6 @@ config TARGET_POPMETAL_RK3288 2GB DDR3. Expansion connectors provide access to I2C, SPI, UART, GPIOs and display interface. -config TARGET_TINKER_RK3288 - bool "Tinker-RK3288" - select BOARD_LATE_INIT - help - Tinker is a RK3288-based development board with 2 USB ports, HDMI, - micro-SD card, audio, Gigabit Ethernet. It also includes on-board - 8GB eMMC and 2GB of SDRAM. Expansion connectors provide access to - I2C, SPI, UART, GPIOs. - -config TARGET_CHROMEBOOK_JERRY - bool "Google/Rockchip Veyron-Jerry Chromebook" - select BOARD_LATE_INIT - help - Jerry is a RK3288-based clamshell device with 2 USB 3.0 ports, - HDMI, an 11.9 inch EDP display, micro-SD card, touchpad and - WiFi. It includes a Chrome OS EC (Cortex-M3) to provide access to - the keyboard and battery functions. - -config TARGET_CHROMEBIT_MICKEY - bool "Google/Rockchip Veyron-Mickey Chromebit" - select BOARD_LATE_INIT - help - Mickey is a small RK3288-based device with one USB 3.0 port, HDMI - and WiFi. It has a separate power port and is designed to connect - to the HDMI input of a monitor or TV. It has no internal battery. - Typically a USB hub or wireless keyboard/touchpad is used to get - keyboard and mouse access. - -config TARGET_CHROMEBOOK_MINNIE - bool "Google/Rockchip Veyron-Minnie Chromebook" - select BOARD_LATE_INIT - help - Minnie is a RK3288-based convertible clamshell device with 2 USB 3.0 - ports, micro HDMI, a 10.1-inch 1280x800 EDP display, micro-SD card, - HD camera, touchpad, WiFi and Bluetooth. It includes a Chrome OS - EC (Cortex-M3) to provide access to the keyboard and battery - functions. It includes 2 or 4GB of SDRAM and 16 or 32GB of - internal MMC. The product name is ASUS Chromebook Flip. - config TARGET_ROCK2 bool "Radxa Rock 2" select BOARD_LATE_INIT @@ -85,6 +85,15 @@ config TARGET_ROCK2 space for a real-time-clock battery. There is also an expansion interface which provides access to many pins. +config TARGET_TINKER_RK3288 + bool "Tinker-RK3288" + select BOARD_LATE_INIT + help + Tinker is a RK3288-based development board with 2 USB ports, HDMI, + micro-SD card, audio, Gigabit Ethernet. It also includes on-board + 8GB eMMC and 2GB of SDRAM. Expansion connectors provide access to + I2C, SPI, UART, GPIOs. + config ROCKCHIP_FAST_SPL bool "Change the CPU to full speed in SPL" depends on TARGET_CHROMEBOOK_JERRY @@ -118,6 +127,8 @@ source "board/firefly/firefly-rk3288/Kconfig" source "board/google/veyron/Kconfig" +source "board/mqmaker/miqi_rk3288/Kconfig" + source "board/radxa/rock2/Kconfig" source "board/rockchip/evb_rk3288/Kconfig" diff --git a/board/mqmaker/miqi_rk3288/Kconfig b/board/mqmaker/miqi_rk3288/Kconfig new file mode 100644 index 0000000000..232a112090 --- /dev/null +++ b/board/mqmaker/miqi_rk3288/Kconfig @@ -0,0 +1,15 @@ +if TARGET_MIQI_RK3288 + +config SYS_BOARD + default "miqi_rk3288" + +config SYS_VENDOR + default "mqmaker" + +config SYS_CONFIG_NAME + default "miqi_rk3288" + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + +endif diff --git a/board/mqmaker/miqi_rk3288/MAINTAINERS b/board/mqmaker/miqi_rk3288/MAINTAINERS new file mode 100644 index 0000000000..053a5e6028 --- /dev/null +++ b/board/mqmaker/miqi_rk3288/MAINTAINERS @@ -0,0 +1,6 @@ +MIQI +M: Jernej Skrabec <jernej.skrabec@siol.net> +S: Maintained +F: board/mqmaker/miqi_rk3288 +F: include/configs/miqi_rk3288.h +F: configs/miqi-rk3288_defconfig diff --git a/board/mqmaker/miqi_rk3288/Makefile b/board/mqmaker/miqi_rk3288/Makefile new file mode 100644 index 0000000000..ec95affb39 --- /dev/null +++ b/board/mqmaker/miqi_rk3288/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += miqi-rk3288.o diff --git a/board/mqmaker/miqi_rk3288/miqi-rk3288.c b/board/mqmaker/miqi_rk3288/miqi-rk3288.c new file mode 100644 index 0000000000..a82f0ae283 --- /dev/null +++ b/board/mqmaker/miqi_rk3288/miqi-rk3288.c @@ -0,0 +1,15 @@ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <spl.h> + +void board_boot_order(u32 *spl_boot_list) +{ + /* eMMC prior to sdcard. */ + spl_boot_list[0] = BOOT_DEVICE_MMC2; + spl_boot_list[1] = BOOT_DEVICE_MMC1; +} diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig new file mode 100644 index 0000000000..203824b893 --- /dev/null +++ b/configs/miqi-rk3288_defconfig @@ -0,0 +1,73 @@ +CONFIG_ARM=y +CONFIG_ARCH_ROCKCHIP=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_ROCKCHIP_RK3288=y +CONFIG_ROCKCHIP_SPL_BACK_TO_BROM=y +CONFIG_TARGET_MIQI_RK3288=y +CONFIG_SPL_STACK_R_ADDR=0x80000 +CONFIG_DEFAULT_DEVICE_TREE="rk3288-miqi" +CONFIG_SILENT_CONSOLE=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_SPL_STACK_R=y +CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000 +# CONFIG_CMD_IMLS is not set +CONFIG_CMD_GPT=y +CONFIG_CMD_MMC=y +CONFIG_CMD_SF=y +CONFIG_CMD_SPI=y +CONFIG_CMD_I2C=y +CONFIG_CMD_USB=y +CONFIG_CMD_GPIO=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_CACHE=y +CONFIG_CMD_TIME=y +CONFIG_CMD_PMIC=y +CONFIG_CMD_REGULATOR=y +# CONFIG_SPL_DOS_PARTITION is not set +# CONFIG_SPL_ISO_PARTITION is not set +# CONFIG_SPL_EFI_PARTITION is not set +CONFIG_SPL_PARTITION_UUIDS=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" +CONFIG_NET_RANDOM_ETHADDR=y +CONFIG_REGMAP=y +CONFIG_SPL_REGMAP=y +CONFIG_SYSCON=y +CONFIG_SPL_SYSCON=y +# CONFIG_SPL_SIMPLE_BUS is not set +CONFIG_CLK=y +CONFIG_SPL_CLK=y +CONFIG_ROCKCHIP_GPIO=y +CONFIG_SYS_I2C_ROCKCHIP=y +CONFIG_MMC_DW=y +CONFIG_MMC_DW_ROCKCHIP=y +CONFIG_DM_ETH=y +CONFIG_ETH_DESIGNWARE=y +CONFIG_GMAC_ROCKCHIP=y +CONFIG_PINCTRL=y +CONFIG_SPL_PINCTRL=y +# CONFIG_SPL_PINCTRL_FULL is not set +CONFIG_ROCKCHIP_RK3288_PINCTRL=y +CONFIG_DM_PMIC=y +CONFIG_PMIC_ACT8846=y +CONFIG_REGULATOR_ACT8846=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_PWM_ROCKCHIP=y +CONFIG_RAM=y +CONFIG_SPL_RAM=y +CONFIG_DEBUG_UART=y +CONFIG_DEBUG_UART_BASE=0xff690000 +CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_DEBUG_UART_SHIFT=2 +CONFIG_SYS_NS16550=y +CONFIG_ROCKCHIP_SERIAL=y +CONFIG_SYSRESET=y +CONFIG_USB=y +CONFIG_USB_STORAGE=y +CONFIG_DM_VIDEO=y +CONFIG_DISPLAY=y +CONFIG_VIDEO_ROCKCHIP=y +CONFIG_CONSOLE_SCROLL_LINES=10 +CONFIG_USE_TINY_PRINTF=y +CONFIG_CMD_DHRYSTONE=y +CONFIG_ERRNO_STR=y diff --git a/doc/README.rockchip b/doc/README.rockchip index 186a1a007e..cdeab2d961 100644 --- a/doc/README.rockchip +++ b/doc/README.rockchip @@ -36,15 +36,16 @@ You will need: Building ======== -At present seven RK3288 boards are supported: +At present eight RK3288 boards are supported: - EVB RK3288 - use evb-rk3288 configuration - Fennec RK3288 - use fennec-rk3288 configuration - Firefly RK3288 - use firefly-rk3288 configuration - Hisense Chromebook - use chromebook_jerry configuration - - Tinker RK3288 - use tinker-rk3288 configuration + - MiQi RK3288 - use miqi-rk3288 configuration - PopMetal RK3288 - use popmetal-rk3288 configuration - Radxa Rock 2 - use rock2 configuration + - Tinker RK3288 - use tinker-rk3288 configuration Two RK3036 board are supported: diff --git a/include/configs/miqi_rk3288.h b/include/configs/miqi_rk3288.h new file mode 100644 index 0000000000..f686042499 --- /dev/null +++ b/include/configs/miqi_rk3288.h @@ -0,0 +1,22 @@ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#define ROCKCHIP_DEVICE_SETTINGS \ + "stdin=serial,cros-ec-keyb\0" \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + +#include <configs/rk3288_common.h> + +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV 0 + +#define CONFIG_SYS_WHITE_ON_BLACK + +#endif
MiQi is rk3288 based development board with 1 or 2 GB SDRAM, 16 GB eMMC, micro SD card interface, 4 USB 2.0 ports, HDMI, gigabit Ethernet and expansion ports. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> --- Changes in v2: - change license to SPDX identifier - reorder boards in alphabetical order in Kconfig and Makefile arch/arm/dts/Makefile | 11 +- arch/arm/dts/rk3288-miqi.dts | 46 ++++ arch/arm/dts/rk3288-miqi.dtsi | 423 ++++++++++++++++++++++++++++++++ arch/arm/mach-rockchip/rk3288/Kconfig | 101 ++++---- board/mqmaker/miqi_rk3288/Kconfig | 15 ++ board/mqmaker/miqi_rk3288/MAINTAINERS | 6 + board/mqmaker/miqi_rk3288/Makefile | 7 + board/mqmaker/miqi_rk3288/miqi-rk3288.c | 15 ++ configs/miqi-rk3288_defconfig | 73 ++++++ doc/README.rockchip | 5 +- include/configs/miqi_rk3288.h | 22 ++ 11 files changed, 672 insertions(+), 52 deletions(-) create mode 100644 arch/arm/dts/rk3288-miqi.dts create mode 100644 arch/arm/dts/rk3288-miqi.dtsi create mode 100644 board/mqmaker/miqi_rk3288/Kconfig create mode 100644 board/mqmaker/miqi_rk3288/MAINTAINERS create mode 100644 board/mqmaker/miqi_rk3288/Makefile create mode 100644 board/mqmaker/miqi_rk3288/miqi-rk3288.c create mode 100644 configs/miqi-rk3288_defconfig create mode 100644 include/configs/miqi_rk3288.h