[U-Boot] [PATCH] rockchip: rk3399: Add Khadas Edge board support

Jagan Teki jagan at amarulasolutions.com
Fri May 24 18:23:21 UTC 2019


+ CCed to mainatiners.

On Fri, May 24, 2019 at 5:52 PM <xieqinick at gmail.com> wrote:
>
> From: Nick <nick at khadas.com>
>
> Khadas Edge is a board from Khadas, you can find the detail about it here:
> https://www.khadas.com/edge

Drop this http from commit message, we usually don't keep.

>
> This patch add basic node for the board and make it able to bring up.
>
> Specification
> - Rockchip RK3399
> - Dual-Channel 2GB/4GB LPDDR4
> - SD card slot
> - Onboard 16GB/32GB/128GB eMMC
> - RTL8211FD 1Gbps
> - AP6356S/AP6398S WiFI/BT
> - HDMI Out, DP, MIPI DSI/CSI, eDP
> - USB 3.0, 2.0
> - USB Type C power and data
> - GPIO expansion ports
> - Full 4 Lane M.2 Socket
> - 16MB SPI Flash
> - IR
> - Programmable MCU
>

Hope you sync the dts from Linux, if not please submit it and aprove
first, if yes then add commit sha1. This would help to keep track of
syncing dts from Linux later and since dts files are more relatives
same from Linux it always better to approve Linux first interms of
binidngs and all.

> Signed-off-by: Nick <nick at khadas.com>
> ---
>  arch/arm/dts/Makefile                 |   1 +
>  arch/arm/dts/rk3399-kedge-u-boot.dtsi |  10 +
>  arch/arm/dts/rk3399-kedge.dts         | 611 ++++++++++++++++++++++++++++++++++
>  board/rockchip/evb_rk3399/MAINTAINERS |   7 +
>  configs/khadas-edge-rk3399_defconfig  |  63 ++++
>  5 files changed, 692 insertions(+)
>  create mode 100644 arch/arm/dts/rk3399-kedge-u-boot.dtsi
>  create mode 100644 arch/arm/dts/rk3399-kedge.dts
>  create mode 100644 configs/khadas-edge-rk3399_defconfig
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 31ef2b6..d9adecf 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -113,6 +113,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
>         rk3399-puma-ddr1600.dtb \
>         rk3399-puma-ddr1866.dtb \
>         rk3399-rock960.dtb \
> +       rk3399-kedge.dtb

Keep it in accending order.

>
>  dtb-$(CONFIG_ROCKCHIP_RV1108) += \
>         rv1108-elgin-r1.dtb \
> diff --git a/arch/arm/dts/rk3399-kedge-u-boot.dtsi b/arch/arm/dts/rk3399-kedge-u-boot.dtsi
> new file mode 100644
> index 0000000..bf0d54c
> --- /dev/null
> +++ b/arch/arm/dts/rk3399-kedge-u-boot.dtsi
> @@ -0,0 +1,10 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (C) 2019 Nick <nick at khadas.com>
> + */
> +
> +#include "rk3399-u-boot.dtsi"
> +
> +&sdmmc {
> +       pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>;
> +};
> diff --git a/arch/arm/dts/rk3399-kedge.dts b/arch/arm/dts/rk3399-kedge.dts
> new file mode 100644
> index 0000000..e07e699
> --- /dev/null
> +++ b/arch/arm/dts/rk3399-kedge.dts
> @@ -0,0 +1,611 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * RK3399-based Khadas boards device tree source
> + *
> + * Copyright (c) 2019 Shenzhen Wesion Technology Co., Ltd.
> + * (https://www.khadas.com/edge)
> + */
> +
> +/dts-v1/;
> +#include <dt-bindings/input/linux-event-codes.h>
> +#include "rk3399.dtsi"
> +#include "rk3399-opp.dtsi"
> +
> +/ {
> +       model = "Khadas Edge";
> +       compatible = "khadas,edge", "rockchip,rk3399";
> +

[snip]

> +       status = "okay";
> +};
> diff --git a/board/rockchip/evb_rk3399/MAINTAINERS b/board/rockchip/evb_rk3399/MAINTAINERS
> index f55c92f..bcb058c 100644
> --- a/board/rockchip/evb_rk3399/MAINTAINERS
> +++ b/board/rockchip/evb_rk3399/MAINTAINERS
> @@ -24,3 +24,10 @@ S:   Maintained
>  F:     configs/orangepi-rk3399_defconfig
>  F:     arch/arm/dts/rk3399-u-boot.dtsi
>  F:     arch/arm/dts/rk3399-orangepi-u-boot.dtsi
> +
> +KHADAS-EDGE

Same here keep maintain the order.

> +M:     Nick <nick at khadas.com>
> +S:     Maintained
> +F:     configs/khadas-edge-rk3399_defconfig
> +F:     arch/arm/dts/rk3399-kedge.dts
> +F:     arch/arm/dts/rk3399-kedge-u-boot.dtsi
> diff --git a/configs/khadas-edge-rk3399_defconfig b/configs/khadas-edge-rk3399_defconfig
> new file mode 100644
> index 0000000..a9def59
> --- /dev/null
> +++ b/configs/khadas-edge-rk3399_defconfig
> @@ -0,0 +1,63 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_ROCKCHIP=y
> +CONFIG_SYS_TEXT_BASE=0x00200000
> +CONFIG_SPL_LIBCOMMON_SUPPORT=y
> +CONFIG_SPL_LIBGENERIC_SUPPORT=y
> +CONFIG_SYS_MALLOC_F_LEN=0x4000
> +CONFIG_ROCKCHIP_RK3399=y
> +CONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0x4000
> +CONFIG_NR_DRAM_BANKS=1
> +CONFIG_SPL_STACK_R_ADDR=0x80000
> +CONFIG_DEBUG_UART_BASE=0xFF1A0000
> +CONFIG_DEBUG_UART_CLOCK=24000000
> +CONFIG_DEBUG_UART=y
> +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3399-kedge.dtb"
> +# CONFIG_DISPLAY_CPUINFO is not set
> +CONFIG_DISPLAY_BOARDINFO_LATE=y
> +CONFIG_SPL_TEXT_BASE=0xff8c2000
> +CONFIG_SPL_STACK_R=y

Seems like you are not using SPL, so use TPL that would take care of
rkbin ddr init like this patch does [1]

[1] https://patchwork.ozlabs.org/patch/1100945/


More information about the U-Boot mailing list