rockchip: add px3se evb board support
Change-Id: If1ab2bc8f166833ea882a0d4d134eb5c05151462 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
parent
b45ec7ccd8
commit
a5c82e2bba
|
|
@ -57,7 +57,8 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \
|
||||||
rk3399-puma-ddr1333.dtb \
|
rk3399-puma-ddr1333.dtb \
|
||||||
rk3399-puma-ddr1600.dtb \
|
rk3399-puma-ddr1600.dtb \
|
||||||
rk3399-puma-ddr1866.dtb \
|
rk3399-puma-ddr1866.dtb \
|
||||||
rv1108-evb.dtb
|
rv1108-evb.dtb \
|
||||||
|
px3se-evb.dtb
|
||||||
dtb-$(CONFIG_ARCH_MESON) += \
|
dtb-$(CONFIG_ARCH_MESON) += \
|
||||||
meson-gxbb-odroidc2.dtb
|
meson-gxbb-odroidc2.dtb
|
||||||
dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
|
dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
/*
|
||||||
|
* (C) Copyright 2017 Rockchip Electronics Co., Ltd
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: GPL-2.0+
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include "rk3128.dtsi"
|
||||||
|
#include "rk3128-u-boot.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Rockchip RK3128 Evaluation board";
|
||||||
|
compatible = "rockchip,rk3128-evb", "rockchip,rk3128";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
stdout-path = &uart2;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc5v0_otg: vcc5v0-otg-drv {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc5v0_otg";
|
||||||
|
gpio = <&gpio0 26 GPIO_ACTIVE_HIGH>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&otg_vbus_drv>;
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vcc5v0_host: vcc5v0-host-drv {
|
||||||
|
compatible = "regulator-fixed";
|
||||||
|
regulator-name = "vcc5v0_host";
|
||||||
|
gpio = <&gpio2 23 GPIO_ACTIVE_HIGH>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&host_vbus_drv>;
|
||||||
|
regulator-min-microvolt = <5000000>;
|
||||||
|
regulator-max-microvolt = <5000000>;
|
||||||
|
regulator-always-on;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c1 {
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
hym8563: hym8563@51 {
|
||||||
|
compatible = "haoyu,hym8563";
|
||||||
|
reg = <0x51>;
|
||||||
|
#clock-cells = <0>;
|
||||||
|
clock-frequency = <32768>;
|
||||||
|
clock-output-names = "xin32k";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&u2phy {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&u2phy_otg {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&u2phy_host {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb_host_ehci {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb_host_ohci {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&usb_otg {
|
||||||
|
vbus-supply = <&vcc5v0_otg>;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&emmc {
|
||||||
|
fifo-mode;
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&pinctrl {
|
||||||
|
usb_otg {
|
||||||
|
otg_vbus_drv: otg-vbus-drv {
|
||||||
|
rockchip,pins = <0 26 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
usb_host {
|
||||||
|
host_vbus_drv: host-vbus-drv {
|
||||||
|
rockchip,pins = <2 23 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
CONFIG_ARM=y
|
||||||
|
CONFIG_ARCH_ROCKCHIP=y
|
||||||
|
CONFIG_ROCKCHIP_RK3128=y
|
||||||
|
CONFIG_DEFAULT_DEVICE_TREE="px3se-evb"
|
||||||
|
CONFIG_DEBUG_UART=y
|
||||||
|
CONFIG_FIT=y
|
||||||
|
# CONFIG_DISPLAY_CPUINFO is not set
|
||||||
|
CONFIG_FASTBOOT=y
|
||||||
|
CONFIG_USB_FUNCTION_FASTBOOT=y
|
||||||
|
CONFIG_CMD_FASTBOOT=y
|
||||||
|
CONFIG_FASTBOOT_BUF_ADDR=0x60800800
|
||||||
|
CONFIG_FASTBOOT_BUF_SIZE=0x04000000
|
||||||
|
CONFIG_FASTBOOT_FLASH=y
|
||||||
|
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
|
||||||
|
# CONFIG_CMD_IMLS is not set
|
||||||
|
CONFIG_CMD_GPT=y
|
||||||
|
CONFIG_CMD_MMC=y
|
||||||
|
CONFIG_CMD_USB=y
|
||||||
|
CONFIG_CMD_USB_MASS_STORAGE=y
|
||||||
|
# CONFIG_CMD_SETEXPR is not set
|
||||||
|
CONFIG_CMD_TIME=y
|
||||||
|
CONFIG_REGMAP=y
|
||||||
|
CONFIG_SYSCON=y
|
||||||
|
CONFIG_CLK=y
|
||||||
|
CONFIG_ROCKCHIP_GPIO=y
|
||||||
|
CONFIG_SYS_I2C_ROCKCHIP=y
|
||||||
|
CONFIG_MMC_DW=y
|
||||||
|
CONFIG_MMC_DW_ROCKCHIP=y
|
||||||
|
CONFIG_PHY=y
|
||||||
|
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||||
|
CONFIG_PINCTRL=y
|
||||||
|
CONFIG_REGULATOR_PWM=y
|
||||||
|
CONFIG_DM_REGULATOR_FIXED=y
|
||||||
|
CONFIG_RAM=y
|
||||||
|
CONFIG_DM_RESET=y
|
||||||
|
CONFIG_DEBUG_UART_BASE=0x20068000
|
||||||
|
CONFIG_DEBUG_UART_CLOCK=24000000
|
||||||
|
CONFIG_DEBUG_UART_SHIFT=2
|
||||||
|
CONFIG_SYS_NS16550=y
|
||||||
|
CONFIG_SYSRESET=y
|
||||||
|
CONFIG_USB=y
|
||||||
|
CONFIG_USB_EHCI_HCD=y
|
||||||
|
CONFIG_USB_EHCI_GENERIC=y
|
||||||
|
CONFIG_USB_OHCI_HCD=y
|
||||||
|
CONFIG_USB_OHCI_GENERIC=y
|
||||||
|
CONFIG_USB_DWC2=y
|
||||||
|
CONFIG_USB_STORAGE=y
|
||||||
|
CONFIG_USB_GADGET=y
|
||||||
|
CONFIG_USB_GADGET_DWC2_OTG=y
|
||||||
|
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||||
|
CONFIG_G_DNL_MANUFACTURER="Rockchip"
|
||||||
|
CONFIG_G_DNL_VENDOR_NUM=0x2207
|
||||||
|
CONFIG_G_DNL_PRODUCT_NUM=0x310c
|
||||||
|
CONFIG_USE_TINY_PRINTF=y
|
||||||
|
CONFIG_ERRNO_STR=y
|
||||||
63
make.sh
63
make.sh
|
|
@ -2,8 +2,9 @@
|
||||||
set -e
|
set -e
|
||||||
BOARD=$1
|
BOARD=$1
|
||||||
SUBCMD=$2
|
SUBCMD=$2
|
||||||
RKCHIP=${BOARD##*-}
|
RKTRUST_CHIP=${BOARD##*-}
|
||||||
RKCHIP=$(echo ${RKCHIP} | tr '[a-z]' '[A-Z]')
|
RKTRUST_CHIP=$(echo ${RKTRUST_CHIP} | tr '[a-z]' '[A-Z]')
|
||||||
|
RKBOOT_CHIP=$RKTRUST_CHIP
|
||||||
JOB=`sed -n "N;/processor/p" /proc/cpuinfo|wc -l`
|
JOB=`sed -n "N;/processor/p" /proc/cpuinfo|wc -l`
|
||||||
SUPPROT_LIST=`ls configs/*-r[v,k][0-9][0-9][0-9][0-9]_defconfig`
|
SUPPROT_LIST=`ls configs/*-r[v,k][0-9][0-9][0-9][0-9]_defconfig`
|
||||||
|
|
||||||
|
|
@ -129,8 +130,12 @@ sub_commands()
|
||||||
|
|
||||||
fixup_chip_name()
|
fixup_chip_name()
|
||||||
{
|
{
|
||||||
if [ "$RKCHIP" = 'RK3228' -o "$RKCHIP" = 'RK3229' ]; then
|
if [ "$RKTRUST_CHIP" = 'RK3228' -o "$RKTRUST_CHIP" = 'RK3229' ]; then
|
||||||
RKCHIP=RK322X
|
RKBOOT_CHIP=RK322X
|
||||||
|
RKTRUST_CHIP=RK322X
|
||||||
|
elif [ "$RKTRUST_CHIP" = 'PX3SE' ]; then
|
||||||
|
RKBOOT_CHIP=PX3SE
|
||||||
|
RKTRUST_CHIP=RK3126
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -154,26 +159,26 @@ pack_uboot_image()
|
||||||
|
|
||||||
pack_loader_image()
|
pack_loader_image()
|
||||||
{
|
{
|
||||||
if [ ! -f ${RKBIN}/RKBOOT/${RKCHIP}MINIALL.ini ]; then
|
if [ ! -f ${RKBIN}/RKBOOT/${RKBOOT_CHIP}MINIALL.ini ]; then
|
||||||
echo "pack loader failed! Can't find: ${RKBIN}/RKBOOT/${RKCHIP}MINIALL.ini"
|
echo "pack loader failed! Can't find: ${RKBIN}/RKBOOT/${RKBOOT_CHIP}MINIALL.ini"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${RKBIN}
|
cd ${RKBIN}
|
||||||
${TOOLCHAIN_RKBIN}/boot_merger --replace tools/rk_tools/ ./ ${RKBIN}/RKBOOT/${RKCHIP}MINIALL.ini
|
${TOOLCHAIN_RKBIN}/boot_merger --replace tools/rk_tools/ ./ ${RKBIN}/RKBOOT/${RKBOOT_CHIP}MINIALL.ini
|
||||||
cd -
|
cd -
|
||||||
mv ${RKBIN}/*_loader_*.bin ./
|
mv ${RKBIN}/*_loader_*.bin ./
|
||||||
echo "pack loader okay! Input: ${RKBIN}/RKBOOT/${RKCHIP}MINIALL.ini"
|
echo "pack loader okay! Input: ${RKBIN}/RKBOOT/${RKBOOT_CHIP}MINIALL.ini"
|
||||||
}
|
}
|
||||||
|
|
||||||
pack_mass_trust_image()
|
pack_mass_trust_image()
|
||||||
{
|
{
|
||||||
local TOS0 TOS1 IMG0 IMG1 DARM_BASE TEE_LOAD_ADDR TEE_OFFSET=0x8400000
|
local TOS0 TOS1 IMG0 IMG1 DARM_BASE TEE_LOAD_ADDR TEE_OFFSET=0x8400000
|
||||||
|
|
||||||
TOS0=`sed -n "/TOS0=/s/TOS0=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'`
|
TOS0=`sed -n "/TOS0=/s/TOS0=//p" ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini|tr -d '\r'`
|
||||||
TOS1=`sed -n "/TOS1=/s/TOS1=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'`
|
TOS1=`sed -n "/TOS1=/s/TOS1=//p" ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini|tr -d '\r'`
|
||||||
IMG0=`sed -n "/PATH0=/s/PATH0=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'`
|
IMG0=`sed -n "/PATH0=/s/PATH0=//p" ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini|tr -d '\r'`
|
||||||
IMG1=`sed -n "/PATH1=/s/PATH1=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'`
|
IMG1=`sed -n "/PATH1=/s/PATH1=//p" ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini|tr -d '\r'`
|
||||||
|
|
||||||
# OP-TEE is 132M(0x8400000) offset from DRAM base.
|
# OP-TEE is 132M(0x8400000) offset from DRAM base.
|
||||||
DARM_BASE=`sed -n "/CONFIG_SYS_SDRAM_BASE=/s/CONFIG_SYS_SDRAM_BASE=//p" ${OUTDIR}/include/autoconf.mk|tr -d '\r'`
|
DARM_BASE=`sed -n "/CONFIG_SYS_SDRAM_BASE=/s/CONFIG_SYS_SDRAM_BASE=//p" ${OUTDIR}/include/autoconf.mk|tr -d '\r'`
|
||||||
|
|
@ -183,10 +188,10 @@ pack_mass_trust_image()
|
||||||
TEE_LOAD_ADDR=$(echo "obase=16;${TEE_LOAD_ADDR}"|bc)
|
TEE_LOAD_ADDR=$(echo "obase=16;${TEE_LOAD_ADDR}"|bc)
|
||||||
|
|
||||||
# Parse orignal path
|
# Parse orignal path
|
||||||
TOS0=`sed -n "/TOS0=/s/TOS0=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'`
|
TOS0=`sed -n "/TOS0=/s/TOS0=//p" ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini|tr -d '\r'`
|
||||||
TOS1=`sed -n "/TOS1=/s/TOS1=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'`
|
TOS1=`sed -n "/TOS1=/s/TOS1=//p" ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini|tr -d '\r'`
|
||||||
IMG0=`sed -n "/PATH0=/s/PATH0=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'`
|
IMG0=`sed -n "/PATH0=/s/PATH0=//p" ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini|tr -d '\r'`
|
||||||
IMG1=`sed -n "/PATH1=/s/PATH1=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'`
|
IMG1=`sed -n "/PATH1=/s/PATH1=//p" ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini|tr -d '\r'`
|
||||||
|
|
||||||
# replace "./tools/rk_tools/" with "./" to compatible legacy ini content of rkdevelop branch
|
# replace "./tools/rk_tools/" with "./" to compatible legacy ini content of rkdevelop branch
|
||||||
TOS0=$(echo ${TOS0} | sed "s/tools\/rk_tools\//\.\//g")
|
TOS0=$(echo ${TOS0} | sed "s/tools\/rk_tools\//\.\//g")
|
||||||
|
|
@ -213,30 +218,30 @@ pack_trust_image()
|
||||||
|
|
||||||
# ARM64 uses trust_merger
|
# ARM64 uses trust_merger
|
||||||
if grep -q '^CONFIG_ARM64=y' ${OUTDIR}/.config ; then
|
if grep -q '^CONFIG_ARM64=y' ${OUTDIR}/.config ; then
|
||||||
if [ ! -f ${RKBIN}/RKTRUST/${RKCHIP}TRUST.ini ]; then
|
if [ ! -f ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TRUST.ini ]; then
|
||||||
echo "pack trust failed! Can't find: ${RKBIN}/RKTRUST/${RKCHIP}TRUST.ini"
|
echo "pack trust failed! Can't find: ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TRUST.ini"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${RKBIN}
|
cd ${RKBIN}
|
||||||
|
|
||||||
# RK3308/PX30/RK3326 use RSA-PKCS1 V2.1, it's pack magic is "3"
|
# RK3308/PX30/RK3326 use RSA-PKCS1 V2.1, it's pack magic is "3"
|
||||||
if [ $RKCHIP = "PX30" -o $RKCHIP = "RK3326" -o $RKCHIP = "RK3308" ]; then
|
if [ $RKTRUST_CHIP = "PX30" -o $RKTRUST_CHIP = "RK3326" -o $RKTRUST_CHIP = "RK3308" ]; then
|
||||||
${TOOLCHAIN_RKBIN}/trust_merger --rsa 3 --replace tools/rk_tools/ ./ ${RKBIN}/RKTRUST/${RKCHIP}TRUST.ini
|
${TOOLCHAIN_RKBIN}/trust_merger --rsa 3 --replace tools/rk_tools/ ./ ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TRUST.ini
|
||||||
# RK3368 use rk big endian SHA256, it's pack magic is "2"
|
# RK3368 use rk big endian SHA256, it's pack magic is "2"
|
||||||
elif [ $RKCHIP = "RK3368" ]; then
|
elif [ $RKTRUST_CHIP = "RK3368" ]; then
|
||||||
${TOOLCHAIN_RKBIN}/trust_merger --sha 2 --replace tools/rk_tools/ ./ ${RKBIN}/RKTRUST/${RKCHIP}TRUST.ini
|
${TOOLCHAIN_RKBIN}/trust_merger --sha 2 --replace tools/rk_tools/ ./ ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TRUST.ini
|
||||||
else
|
else
|
||||||
${TOOLCHAIN_RKBIN}/trust_merger --replace tools/rk_tools/ ./ ${RKBIN}/RKTRUST/${RKCHIP}TRUST.ini
|
${TOOLCHAIN_RKBIN}/trust_merger --replace tools/rk_tools/ ./ ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TRUST.ini
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd -
|
cd -
|
||||||
mv ${RKBIN}/trust.img ./trust.img
|
mv ${RKBIN}/trust.img ./trust.img
|
||||||
echo "pack trust okay! Input: ${RKBIN}/RKTRUST/${RKCHIP}TRUST.ini"
|
echo "pack trust okay! Input: ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TRUST.ini"
|
||||||
# ARM uses loaderimage
|
# ARM uses loaderimage
|
||||||
else
|
else
|
||||||
if [ ! -f ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini ]; then
|
if [ ! -f ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini ]; then
|
||||||
echo "pack trust failed! Can't find: ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini"
|
echo "pack trust failed! Can't find: ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -248,8 +253,8 @@ pack_trust_image()
|
||||||
TEE_LOAD_ADDR=$(echo "obase=16;${TEE_LOAD_ADDR}"|bc)
|
TEE_LOAD_ADDR=$(echo "obase=16;${TEE_LOAD_ADDR}"|bc)
|
||||||
|
|
||||||
# Parse orignal path
|
# Parse orignal path
|
||||||
TOS=`sed -n "/TOS=/s/TOS=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'`
|
TOS=`sed -n "/TOS=/s/TOS=//p" ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini|tr -d '\r'`
|
||||||
TOS_TA=`sed -n "/TOSTA=/s/TOSTA=//p" ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini|tr -d '\r'`
|
TOS_TA=`sed -n "/TOSTA=/s/TOSTA=//p" ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini|tr -d '\r'`
|
||||||
|
|
||||||
# replace "./tools/rk_tools/" with "./" to compatible legacy ini content of rkdevelop branch
|
# replace "./tools/rk_tools/" with "./" to compatible legacy ini content of rkdevelop branch
|
||||||
TOS=$(echo ${TOS} | sed "s/tools\/rk_tools\//\.\//g")
|
TOS=$(echo ${TOS} | sed "s/tools\/rk_tools\//\.\//g")
|
||||||
|
|
@ -270,7 +275,7 @@ pack_trust_image()
|
||||||
pack_mass_trust_image
|
pack_mass_trust_image
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "pack trust okay! Input: ${RKBIN}/RKTRUST/${RKCHIP}TOS.ini"
|
echo "pack trust okay! Input: ${RKBIN}/RKTRUST/${RKTRUST_CHIP}TOS.ini"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue