Commit 17aa548cedd9a4c063590d29ac27160dc67f47f9

Authored by Simon Glass
1 parent 1b2fd5bf4e

rockchip: Add basic support for firefly-rk3288

The Firefly RK3288 is a suitable target board for initial mainline Rockchip
support. It includes a good set of peripherals, a recent SoC and it is
readily available.

This adds only some basic files required to allow the baord to display a
serial message in SPL and hang.

Signed-off-by: Simon Glass <sjg@chromium.org>

Showing 11 changed files with 733 additions and 0 deletions Side-by-side Diff

arch/arm/dts/Makefile
... ... @@ -15,6 +15,8 @@
15 15 exynos5420-peach-pit.dtb \
16 16 exynos5800-peach-pi.dtb \
17 17 exynos5422-odroidxu3.dtb
  18 +dtb-$(CONFIG_ARCH_ROCKCHIP) += \
  19 + rk3288-firefly.dtb
18 20 dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
19 21 tegra20-medcom-wide.dtb \
20 22 tegra20-paz00.dtb \
arch/arm/dts/rk3288-firefly.dts
  1 +/*
  2 + * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+ X11
  5 + */
  6 +
  7 +/dts-v1/;
  8 +#include "rk3288-firefly.dtsi"
  9 +
  10 +/ {
  11 + model = "Firefly-RK3288";
  12 + compatible = "firefly,firefly-rk3288", "rockchip,rk3288";
  13 +
  14 + chosen {
  15 + stdout-path = &uart2;
  16 + };
  17 +
  18 + config {
  19 + u-boot,dm-pre-reloc;
  20 + u-boot,boot-led = "firefly:green:power";
  21 + };
  22 +};
  23 +
  24 +&dmc {
  25 + rockchip,num-channels = <2>;
  26 + rockchip,pctl-timing = <0x29a 0xc8 0x1f8 0x42 0x4e 0x4 0xea 0xa
  27 + 0x5 0x0 0xa 0x7 0x19 0x24 0xa 0x7
  28 + 0x5 0xa 0x5 0x200 0x5 0x10 0x40 0x0
  29 + 0x1 0x7 0x7 0x4 0xc 0x43 0x100 0x0
  30 + 0x5 0x0>;
  31 + rockchip,phy-timing = <0x48f9aab4 0xea0910 0x1002c200
  32 + 0xa60 0x40 0x10 0x0>;
  33 + rockchip,sdram-channel = /bits/ 8 <0x1 0xa 0x3 0x2 0x1 0x0 0xf 0xf>;
  34 + rockchip,sdram-params = <0x30B25564 0x627 3 666000000 3 9 1>;
  35 +};
  36 +
  37 +&ir {
  38 + gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
  39 +};
  40 +
  41 +&pinctrl {
  42 + u-boot,dm-pre-reloc;
  43 + act8846 {
  44 + pmic_vsel: pmic-vsel {
  45 + rockchip,pins = <7 14 RK_FUNC_GPIO &pcfg_output_low>;
  46 + };
  47 + };
  48 +
  49 + ir {
  50 + ir_int: ir-int {
  51 + rockchip,pins = <7 0 RK_FUNC_GPIO &pcfg_pull_up>;
  52 + };
  53 + };
  54 +};
  55 +
  56 +&pwm1 {
  57 + status = "okay";
  58 +};
  59 +
  60 +&uart2 {
  61 + u-boot,dm-pre-reloc;
  62 + reg-shift = <2>;
  63 +};
  64 +
  65 +&sdmmc {
  66 + u-boot,dm-pre-reloc;
  67 +};
  68 +
  69 +&gpio3 {
  70 + u-boot,dm-pre-reloc;
  71 +};
  72 +
  73 +&gpio8 {
  74 + u-boot,dm-pre-reloc;
  75 +};
arch/arm/dts/rk3288-firefly.dtsi
  1 +/*
  2 + * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+ X11
  5 + */
  6 +
  7 +#include "rk3288.dtsi"
  8 +
  9 +/ {
  10 + memory {
  11 + reg = <0 0x80000000>;
  12 + };
  13 +
  14 + ext_gmac: external-gmac-clock {
  15 + compatible = "fixed-clock";
  16 + #clock-cells = <0>;
  17 + clock-frequency = <125000000>;
  18 + clock-output-names = "ext_gmac";
  19 + };
  20 +
  21 + ir: ir-receiver {
  22 + compatible = "gpio-ir-receiver";
  23 + pinctrl-names = "default";
  24 + pinctrl-0 = <&ir_int>;
  25 + };
  26 +
  27 + keys: gpio-keys {
  28 + compatible = "gpio-keys";
  29 + #address-cells = <1>;
  30 + #size-cells = <0>;
  31 +
  32 + button@0 {
  33 + gpio-key,wakeup = <1>;
  34 + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
  35 + label = "GPIO Power";
  36 + linux,code = <116>;
  37 + pinctrl-names = "default";
  38 + pinctrl-0 = <&pwr_key>;
  39 + };
  40 + };
  41 +
  42 + leds {
  43 + u-boot,dm-pre-reloc;
  44 + compatible = "gpio-leds";
  45 +
  46 + work {
  47 + u-boot,dm-pre-reloc;
  48 + gpios = <&gpio8 1 GPIO_ACTIVE_LOW>;
  49 + label = "firefly:blue:user";
  50 + linux,default-trigger = "rc-feedback";
  51 + pinctrl-names = "default";
  52 + pinctrl-0 = <&work_led>;
  53 + };
  54 +
  55 + power {
  56 + u-boot,dm-pre-reloc;
  57 + gpios = <&gpio8 2 GPIO_ACTIVE_LOW>;
  58 + label = "firefly:green:power";
  59 + linux,default-trigger = "default-on";
  60 + pinctrl-names = "default";
  61 + pinctrl-0 = <&power_led>;
  62 + };
  63 + };
  64 +
  65 + vcc_sys: vsys-regulator {
  66 + compatible = "regulator-fixed";
  67 + regulator-name = "vcc_sys";
  68 + regulator-min-microvolt = <5000000>;
  69 + regulator-max-microvolt = <5000000>;
  70 + regulator-always-on;
  71 + regulator-boot-on;
  72 + };
  73 +
  74 + vcc_sd: sdmmc-regulator {
  75 + compatible = "regulator-fixed";
  76 + gpio = <&gpio7 11 GPIO_ACTIVE_LOW>;
  77 + pinctrl-names = "default";
  78 + pinctrl-0 = <&sdmmc_pwr>;
  79 + regulator-name = "vcc_sd";
  80 + regulator-min-microvolt = <3300000>;
  81 + regulator-max-microvolt = <3300000>;
  82 + startup-delay-us = <100000>;
  83 + vin-supply = <&vcc_io>;
  84 + };
  85 +
  86 + vcc_flash: flash-regulator {
  87 + compatible = "regulator-fixed";
  88 + regulator-name = "vcc_flash";
  89 + regulator-min-microvolt = <1800000>;
  90 + regulator-max-microvolt = <1800000>;
  91 + vin-supply = <&vcc_io>;
  92 + };
  93 +
  94 + vcc_5v: usb-regulator {
  95 + compatible = "regulator-fixed";
  96 + regulator-name = "vcc_5v";
  97 + regulator-min-microvolt = <5000000>;
  98 + regulator-max-microvolt = <5000000>;
  99 + regulator-always-on;
  100 + regulator-boot-on;
  101 + vin-supply = <&vcc_sys>;
  102 + };
  103 +
  104 + vcc_host_5v: usb-host-regulator {
  105 + compatible = "regulator-fixed";
  106 + enable-active-high;
  107 + gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
  108 + pinctrl-names = "default";
  109 + pinctrl-0 = <&host_vbus_drv>;
  110 + regulator-name = "vcc_host_5v";
  111 + regulator-min-microvolt = <5000000>;
  112 + regulator-max-microvolt = <5000000>;
  113 + regulator-always-on;
  114 + vin-supply = <&vcc_5v>;
  115 + };
  116 +
  117 + vcc_otg_5v: usb-otg-regulator {
  118 + compatible = "regulator-fixed";
  119 + enable-active-high;
  120 + gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  121 + pinctrl-names = "default";
  122 + pinctrl-0 = <&otg_vbus_drv>;
  123 + regulator-name = "vcc_otg_5v";
  124 + regulator-min-microvolt = <5000000>;
  125 + regulator-max-microvolt = <5000000>;
  126 + regulator-always-on;
  127 + vin-supply = <&vcc_5v>;
  128 + };
  129 +};
  130 +
  131 +&cpu0 {
  132 + cpu0-supply = <&vdd_cpu>;
  133 +};
  134 +
  135 +&emmc {
  136 + broken-cd;
  137 + bus-width = <8>;
  138 + cap-mmc-highspeed;
  139 + disable-wp;
  140 + non-removable;
  141 + num-slots = <1>;
  142 + pinctrl-names = "default";
  143 + pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
  144 + vmmc-supply = <&vcc_io>;
  145 + vqmmc-supply = <&vcc_flash>;
  146 + status = "okay";
  147 +};
  148 +
  149 +&hdmi {
  150 + ddc-i2c-bus = <&i2c5>;
  151 + status = "okay";
  152 +};
  153 +
  154 +&i2c0 {
  155 + clock-frequency = <400000>;
  156 + status = "okay";
  157 +
  158 + vdd_cpu: syr827@40 {
  159 + compatible = "silergy,syr827";
  160 + fcs,suspend-voltage-selector = <1>;
  161 + reg = <0x40>;
  162 + regulator-name = "vdd_cpu";
  163 + regulator-min-microvolt = <850000>;
  164 + regulator-max-microvolt = <1350000>;
  165 + regulator-always-on;
  166 + regulator-boot-on;
  167 + vin-supply = <&vcc_sys>;
  168 + };
  169 +
  170 + vdd_gpu: syr828@41 {
  171 + compatible = "silergy,syr828";
  172 + fcs,suspend-voltage-selector = <1>;
  173 + reg = <0x41>;
  174 + regulator-name = "vdd_gpu";
  175 + regulator-min-microvolt = <850000>;
  176 + regulator-max-microvolt = <1350000>;
  177 + regulator-always-on;
  178 + vin-supply = <&vcc_sys>;
  179 + };
  180 +
  181 + hym8563: hym8563@51 {
  182 + compatible = "haoyu,hym8563";
  183 + reg = <0x51>;
  184 + #clock-cells = <0>;
  185 + clock-frequency = <32768>;
  186 + clock-output-names = "xin32k";
  187 + interrupt-parent = <&gpio7>;
  188 + interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
  189 + pinctrl-names = "default";
  190 + pinctrl-0 = <&rtc_int>;
  191 + };
  192 +
  193 + act8846: act8846@5a {
  194 + compatible = "active-semi,act8846";
  195 + reg = <0x5a>;
  196 + pinctrl-names = "default";
  197 + pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
  198 + system-power-controller;
  199 +
  200 + regulators {
  201 + vcc_ddr: REG1 {
  202 + regulator-name = "vcc_ddr";
  203 + regulator-min-microvolt = <1200000>;
  204 + regulator-max-microvolt = <1200000>;
  205 + regulator-always-on;
  206 + };
  207 +
  208 + vcc_io: REG2 {
  209 + regulator-name = "vcc_io";
  210 + regulator-min-microvolt = <3300000>;
  211 + regulator-max-microvolt = <3300000>;
  212 + regulator-always-on;
  213 + };
  214 +
  215 + vdd_log: REG3 {
  216 + regulator-name = "vdd_log";
  217 + regulator-min-microvolt = <1100000>;
  218 + regulator-max-microvolt = <1100000>;
  219 + regulator-always-on;
  220 + };
  221 +
  222 + vcc_20: REG4 {
  223 + regulator-name = "vcc_20";
  224 + regulator-min-microvolt = <2000000>;
  225 + regulator-max-microvolt = <2000000>;
  226 + regulator-always-on;
  227 + };
  228 +
  229 + vccio_sd: REG5 {
  230 + regulator-name = "vccio_sd";
  231 + regulator-min-microvolt = <3300000>;
  232 + regulator-max-microvolt = <3300000>;
  233 + regulator-always-on;
  234 + };
  235 +
  236 + vdd10_lcd: REG6 {
  237 + regulator-name = "vdd10_lcd";
  238 + regulator-min-microvolt = <1000000>;
  239 + regulator-max-microvolt = <1000000>;
  240 + regulator-always-on;
  241 + };
  242 +
  243 + vcca_18: REG7 {
  244 + regulator-name = "vcca_18";
  245 + regulator-min-microvolt = <1800000>;
  246 + regulator-max-microvolt = <1800000>;
  247 + };
  248 +
  249 + vcca_33: REG8 {
  250 + regulator-name = "vcca_33";
  251 + regulator-min-microvolt = <3300000>;
  252 + regulator-max-microvolt = <3300000>;
  253 + };
  254 +
  255 + vcc_lan: REG9 {
  256 + regulator-name = "vcc_lan";
  257 + regulator-min-microvolt = <3300000>;
  258 + regulator-max-microvolt = <3300000>;
  259 + };
  260 +
  261 + vdd_10: REG10 {
  262 + regulator-name = "vdd_10";
  263 + regulator-min-microvolt = <1000000>;
  264 + regulator-max-microvolt = <1000000>;
  265 + regulator-always-on;
  266 + };
  267 +
  268 + vcc_18: REG11 {
  269 + regulator-name = "vcc_18";
  270 + regulator-min-microvolt = <1800000>;
  271 + regulator-max-microvolt = <1800000>;
  272 + regulator-always-on;
  273 + };
  274 +
  275 + vcc18_lcd: REG12 {
  276 + regulator-name = "vcc18_lcd";
  277 + regulator-min-microvolt = <1800000>;
  278 + regulator-max-microvolt = <1800000>;
  279 + regulator-always-on;
  280 + };
  281 + };
  282 + };
  283 +};
  284 +
  285 +&i2c1 {
  286 + status = "okay";
  287 +};
  288 +
  289 +&i2c2 {
  290 + status = "okay";
  291 +};
  292 +
  293 +&i2c4 {
  294 + status = "okay";
  295 +};
  296 +
  297 +&i2c5 {
  298 + status = "okay";
  299 +};
  300 +
  301 +&pinctrl {
  302 + pcfg_output_high: pcfg-output-high {
  303 + output-high;
  304 + };
  305 +
  306 + pcfg_output_low: pcfg-output-low {
  307 + output-low;
  308 + };
  309 +
  310 + act8846 {
  311 + pwr_hold: pwr-hold {
  312 + rockchip,pins = <0 1 RK_FUNC_GPIO &pcfg_output_high>;
  313 + };
  314 + };
  315 +
  316 + gmac {
  317 + phy_int: phy-int {
  318 + rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
  319 + };
  320 +
  321 + phy_pmeb: phy-pmeb {
  322 + rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
  323 + };
  324 +
  325 + phy_rst: phy-rst {
  326 + rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
  327 + };
  328 + };
  329 +
  330 + hym8563 {
  331 + rtc_int: rtc-int {
  332 + rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_up>;
  333 + };
  334 + };
  335 +
  336 + keys {
  337 + pwr_key: pwr-key {
  338 + rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>;
  339 + };
  340 + };
  341 +
  342 + leds {
  343 + power_led: power-led {
  344 + rockchip,pins = <8 2 RK_FUNC_GPIO &pcfg_pull_none>;
  345 + };
  346 +
  347 + work_led: work-led {
  348 + rockchip,pins = <8 1 RK_FUNC_GPIO &pcfg_pull_none>;
  349 + };
  350 + };
  351 +
  352 + sdmmc {
  353 + sdmmc_pwr: sdmmc-pwr {
  354 + rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
  355 + };
  356 + };
  357 +
  358 + usb_host {
  359 + host_vbus_drv: host-vbus-drv {
  360 + rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
  361 + };
  362 +
  363 + usbhub_rst: usbhub-rst {
  364 + rockchip,pins = <8 3 RK_FUNC_GPIO &pcfg_output_high>;
  365 + };
  366 + };
  367 +
  368 + usb_otg {
  369 + otg_vbus_drv: otg-vbus-drv {
  370 + rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
  371 + };
  372 + };
  373 +};
  374 +
  375 +&saradc {
  376 + vref-supply = <&vcc_18>;
  377 + status = "okay";
  378 +};
  379 +
  380 +&sdio0 {
  381 + broken-cd;
  382 + bus-width = <4>;
  383 + disable-wp;
  384 + non-removable;
  385 + num-slots = <1>;
  386 + pinctrl-names = "default";
  387 + pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
  388 + vmmc-supply = <&vcc_18>;
  389 + status = "okay";
  390 +};
  391 +
  392 +&sdmmc {
  393 + bus-width = <4>;
  394 + cap-mmc-highspeed;
  395 + cap-sd-highspeed;
  396 + card-detect-delay = <200>;
  397 + disable-wp;
  398 + num-slots = <1>;
  399 + pinctrl-names = "default";
  400 + pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
  401 + vmmc-supply = <&vcc_sd>;
  402 + status = "okay";
  403 +};
  404 +
  405 +&spi0 {
  406 + pinctrl-names = "default";
  407 + pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>;
  408 + status = "okay";
  409 +};
  410 +
  411 +&uart0 {
  412 + pinctrl-names = "default";
  413 + pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
  414 + status = "okay";
  415 +};
  416 +
  417 +&uart1 {
  418 + status = "okay";
  419 +};
  420 +
  421 +&uart2 {
  422 + status = "okay";
  423 +};
  424 +
  425 +&uart3 {
  426 + status = "okay";
  427 +};
  428 +
  429 +&usb_host1 {
  430 + pinctrl-names = "default";
  431 + pinctrl-0 = <&usbhub_rst>;
  432 + status = "okay";
  433 +};
  434 +
  435 +&usb_otg {
  436 + status = "okay";
  437 +};
  438 +
  439 +&vopb {
  440 + status = "okay";
  441 +};
  442 +
  443 +&vopb_mmu {
  444 + status = "okay";
  445 +};
  446 +
  447 +&vopl {
  448 + status = "okay";
  449 +};
  450 +
  451 +&vopl_mmu {
  452 + status = "okay";
  453 +};
  454 +
  455 +&wdt {
  456 + status = "okay";
  457 +};
arch/arm/mach-rockchip/rk3288/Kconfig
1 1 if ROCKCHIP_RK3288
2 2  
  3 +config TARGET_FIREFLY_RK3288
  4 + bool "Firefly-RK3288"
  5 + help
  6 + Firefly is a RK3288-based development board with 2 USB ports,
  7 + HDMI, VGA, micro-SD card, audio, WiFi and Gigabit Ethernet, It
  8 + also includes on-board eMMC and 1GB of SDRAM. Expansion connectors
  9 + provide access to display pins, I2C, SPI, UART and GPIOs.
  10 +
3 11 config SYS_SOC
4 12 default "rockchip"
  13 +
  14 +source "board/firefly/firefly-rk3288/Kconfig"
5 15  
6 16 endif
board/firefly/firefly-rk3288/Kconfig
  1 +if TARGET_FIREFLY_RK3288
  2 +
  3 +config SYS_BOARD
  4 + default "firefly-rk3288"
  5 +
  6 +config SYS_VENDOR
  7 + default "firefly"
  8 +
  9 +config SYS_CONFIG_NAME
  10 + default "firefly-rk3288"
  11 +
  12 +config BOARD_SPECIFIC_OPTIONS # dummy
  13 + def_bool y
  14 +
  15 +endif
board/firefly/firefly-rk3288/MAINTAINERS
  1 +FIREFLY
  2 +M: Simon Glass <sjg@chromium.org>
  3 +S: Maintained
  4 +F: board/firefly/firefly-rk3288
  5 +F: include/configs/firefly-rk3288.h
  6 +F: configs/firefly-rk3288_defconfig
board/firefly/firefly-rk3288/Makefile
  1 +#
  2 +# (C) Copyright 2015 Google, Inc
  3 +#
  4 +# SPDX-License-Identifier: GPL-2.0+
  5 +#
  6 +
  7 +obj-y += firefly-rk3288.o
board/firefly/firefly-rk3288/firefly-rk3288.c
  1 +/*
  2 + * (C) Copyright 2015 Google, Inc
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+
  5 + */
  6 +
  7 +#include <common.h>
configs/firefly-rk3288_defconfig
  1 +CONFIG_ARM=y
  2 +CONFIG_ARCH_ROCKCHIP=y
  3 +CONFIG_SYS_MALLOC_F_LEN=0x2000
  4 +CONFIG_ROCKCHIP_RK3288=y
  5 +CONFIG_TARGET_FIREFLY_RK3288=y
  6 +CONFIG_DEFAULT_DEVICE_TREE="rk3288-firefly"
  7 +CONFIG_SPL_STACK_R=y
  8 +CONFIG_SPL_STACK_R_ADDR=0x80000
  9 +# CONFIG_CMD_IMLS is not set
  10 +# CONFIG_CMD_SETEXPR is not set
  11 +CONFIG_CMD_PMIC=y
  12 +CONFIG_CMD_REGULATOR=y
  13 +CONFIG_SPL_OF_CONTROL=y
  14 +CONFIG_CLK=y
  15 +CONFIG_SPL_CLK=y
  16 +CONFIG_REGMAP=y
  17 +CONFIG_SYSCON=y
  18 +CONFIG_RESET=y
  19 +CONFIG_LED=y
  20 +CONFIG_SPL_LED=y
  21 +CONFIG_LED_GPIO=y
  22 +CONFIG_DEBUG_UART=y
  23 +CONFIG_DEBUG_UART_BASE=0xff690000
  24 +CONFIG_DEBUG_UART_CLOCK=24000000
  25 +CONFIG_DEBUG_UART_SHIFT=2
  26 +CONFIG_SYS_I2C_ROCKCHIP=y
  27 +CONFIG_PINCTRL=y
  28 +CONFIG_SPL_PINCTRL=y
  29 +# CONFIG_PINCTRL_FULL is not set
  30 +# CONFIG_SPL_PINCTRL_FULL is not set
  31 +CONFIG_ROCKCHIP_PINCTRL=y
  32 +CONFIG_ROCKCHIP_GPIO=y
  33 +CONFIG_DM_PMIC=y
  34 +CONFIG_PMIC_ACT8846=y
  35 +CONFIG_DM_REGULATOR=y
  36 +CONFIG_REGULATOR_ACT8846=y
  37 +CONFIG_RAM=y
  38 +CONFIG_SPL_RAM=y
  39 +CONFIG_DM_MMC=y
  40 +CONFIG_ROCKCHIP_DWMMC=y
  41 +CONFIG_USE_PRIVATE_LIBGCC=y
  42 +CONFIG_CMD_DHRYSTONE=y
  43 +CONFIG_ERRNO_STR=y
include/configs/firefly-rk3288.h
  1 +/*
  2 + * (C) Copyright 2015 Google, Inc
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+
  5 + */
  6 +
  7 +#ifndef __CONFIG_H
  8 +#define __CONFIG_H
  9 +
  10 +#include <configs/rk3288_common.h>
  11 +
  12 +#define CONFIG_SPL_MMC_SUPPORT
  13 +
  14 +#endif
include/configs/rk3288_common.h
  1 +/*
  2 + * (C) Copyright 2015 Google, Inc
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+
  5 + */
  6 +
  7 +#ifndef __CONFIG_RK3288_COMMON_H
  8 +#define __CONFIG_RK3288_COMMON_H
  9 +
  10 +#include <asm/arch/hardware.h>
  11 +
  12 +#define CONFIG_SYS_NO_FLASH
  13 +#define CONFIG_NR_DRAM_BANKS 1
  14 +#define CONFIG_ENV_IS_NOWHERE
  15 +#define CONFIG_ENV_SIZE 0x2000
  16 +#define CONFIG_SYS_GENERIC_BOARD
  17 +#define CONFIG_SYS_MAXARGS 16
  18 +#define CONFIG_BAUDRATE 115200
  19 +#define CONFIG_SYS_MALLOC_LEN (32 << 20)
  20 +#define CONFIG_SYS_CBSIZE 1024
  21 +#define CONFIG_SKIP_LOWLEVEL_INIT
  22 +#define CONFIG_SYS_THUMB_BUILD
  23 +#define CONFIG_OF_LIBFDT
  24 +#define CONFIG_DISPLAY_BOARDINFO
  25 +
  26 +#define CONFIG_SYS_TIMER_RATE (24 * 1000 * 1000)
  27 +#define CONFIG_SYS_TIMER_COUNTER (TIMER7_BASE + 8)
  28 +
  29 +#define CONFIG_SPL_FRAMEWORK
  30 +#define CONFIG_SPL_LIBCOMMON_SUPPORT
  31 +#define CONFIG_SPL_LIBGENERIC_SUPPORT
  32 +#define CONFIG_SPL_SERIAL_SUPPORT
  33 +#define CONFIG_SYS_NS16550
  34 +#define CONFIG_SYS_NS16550_MEM32
  35 +#define CONFIG_SPL_BOARD_INIT
  36 +
  37 +#ifdef CONFIG_SPL_BUILD
  38 +#define CONFIG_SYS_MALLOC_SIMPLE
  39 +#endif
  40 +
  41 +#define CONFIG_SYS_TEXT_BASE 0x00100000
  42 +#define CONFIG_SYS_INIT_SP_ADDR 0x00100000
  43 +#define CONFIG_SYS_LOAD_ADDR 0x00800800
  44 +#define CONFIG_SPL_STACK 0xff718000
  45 +#define CONFIG_SPL_TEXT_BASE 0xff704004
  46 +
  47 +/* MMC/SD IP block */
  48 +#define CONFIG_MMC
  49 +#define CONFIG_GENERIC_MMC
  50 +#define CONFIG_CMD_MMC
  51 +#define CONFIG_SDHCI
  52 +#define CONFIG_DWMMC
  53 +#define CONFIG_BOUNCE_BUFFER
  54 +
  55 +#define CONFIG_DOS_PARTITION
  56 +#define CONFIG_CMD_FAT
  57 +#define CONFIG_FAT_WRITE
  58 +#define CONFIG_CMD_EXT2
  59 +#define CONFIG_CMD_EXT4
  60 +#define CONFIG_CMD_FS_GENERIC
  61 +#define CONFIG_PARTITION_UUIDS
  62 +#define CONFIG_CMD_PART
  63 +
  64 +/* RAW SD card / eMMC locations. */
  65 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 256
  66 +#define CONFIG_SYS_SPI_U_BOOT_OFFS (128 << 10)
  67 +
  68 +/* FAT sd card locations. */
  69 +#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
  70 +#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
  71 +
  72 +#define CONFIG_SPL_PINCTRL_SUPPORT
  73 +#define CONFIG_SPL_GPIO_SUPPORT
  74 +#define CONFIG_SPL_RAM_SUPPORT
  75 +#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
  76 +
  77 +#define CONFIG_CMD_CACHE
  78 +#define CONFIG_CMD_TIME
  79 +
  80 +#define CONFIG_SYS_SDRAM_BASE 0
  81 +#define CONFIG_NR_DRAM_BANKS 1
  82 +#define SDRAM_BANK_SIZE (2UL << 30)
  83 +
  84 +#define CONFIG_SPI_FLASH
  85 +#define CONFIG_SPI
  86 +#define CONFIG_CMD_SF
  87 +#define CONFIG_CMD_SPI
  88 +#define CONFIG_SPI_FLASH_GIGADEVICE
  89 +#define CONFIG_SF_DEFAULT_SPEED 20000000
  90 +
  91 +#define CONFIG_CMD_I2C
  92 +
  93 +#ifndef CONFIG_SPL_BUILD
  94 +#include <config_distro_defaults.h>
  95 +#endif
  96 +
  97 +#endif