diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/arch/arm/mach-rockchip/rv1108 | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/arch/arm/mach-rockchip/rv1108')
5 files changed, 111 insertions, 0 deletions
diff --git a/roms/u-boot/arch/arm/mach-rockchip/rv1108/Kconfig b/roms/u-boot/arch/arm/mach-rockchip/rv1108/Kconfig new file mode 100644 index 000000000..a12216dcc --- /dev/null +++ b/roms/u-boot/arch/arm/mach-rockchip/rv1108/Kconfig @@ -0,0 +1,42 @@ +if ROCKCHIP_RV1108 + +choice + prompt "RV1108 board select" + +config TARGET_EVB_RV1108 + bool "EVB_RV1108" + help + RV1108 EVB is a evaluation board for Rockchp RV1108. + + Key features of the board include: + * one macro USB OTG port + * one USB HOST port + * one RS232 to USB port route to UART2 as debug port + * MIPI screen with resolution 720 x 1280 + * 128M DDR3 + * 64M SPI Nor Flash + * macro SD card interface + * HDMI output + * 10/100 Mbps Ethernet + * camera interface compatible with imx323 / ov2710 / ov4689 + +config TARGET_ELGIN_RV1108 + bool "ELGIN_RV1108" + help + RV1108 ELGIN is a board based on the Rockchip RV1108. + +endchoice + +config ROCKCHIP_BOOT_MODE_REG + default 0x10300580 + +config SYS_SOC + default "rv1108" + +config SYS_MALLOC_F_LEN + default 0x400 + +source board/rockchip/evb_rv1108/Kconfig +source board/elgin/elgin_rv1108/Kconfig + +endif diff --git a/roms/u-boot/arch/arm/mach-rockchip/rv1108/Makefile b/roms/u-boot/arch/arm/mach-rockchip/rv1108/Makefile new file mode 100644 index 000000000..9035a1a89 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-rockchip/rv1108/Makefile @@ -0,0 +1,11 @@ +# +# (C) Copyright 2016 Rockchip Electronics Co., Ltd +# +# SPDX-License-Identifier: GPL-2.0+ +# + +ifndef CONFIG_SPL_BUILD +obj-y += syscon_rv1108.o +endif +obj-y += rv1108.o +obj-y += clk_rv1108.o diff --git a/roms/u-boot/arch/arm/mach-rockchip/rv1108/clk_rv1108.c b/roms/u-boot/arch/arm/mach-rockchip/rv1108/clk_rv1108.c new file mode 100644 index 000000000..44b53c407 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-rockchip/rv1108/clk_rv1108.c @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + * Author: Andy Yan <andy.yan@rock-chips.com> + */ + +#include <common.h> +#include <dm.h> +#include <syscon.h> +#include <asm/arch-rockchip/clock.h> +#include <asm/arch-rockchip/cru_rv1108.h> +#include <linux/err.h> + +int rockchip_get_clk(struct udevice **devp) +{ + return uclass_get_device_by_driver(UCLASS_CLK, + DM_DRIVER_GET(clk_rv1108), devp); +} + +void *rockchip_get_cru(void) +{ + struct rv1108_clk_priv *priv; + struct udevice *dev; + int ret; + + ret = rockchip_get_clk(&dev); + if (ret) + return ERR_PTR(ret); + + priv = dev_get_priv(dev); + + return priv->cru; +} diff --git a/roms/u-boot/arch/arm/mach-rockchip/rv1108/rv1108.c b/roms/u-boot/arch/arm/mach-rockchip/rv1108/rv1108.c new file mode 100644 index 000000000..6362af995 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-rockchip/rv1108/rv1108.c @@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + * Author: Andy Yan <andy.yan@rock-chips.com> + */ diff --git a/roms/u-boot/arch/arm/mach-rockchip/rv1108/syscon_rv1108.c b/roms/u-boot/arch/arm/mach-rockchip/rv1108/syscon_rv1108.c new file mode 100644 index 000000000..babdf5720 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-rockchip/rv1108/syscon_rv1108.c @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2016 Rockchip Electronics Co., Ltd + */ + +#include <common.h> +#include <dm.h> +#include <syscon.h> +#include <asm/arch-rockchip/clock.h> + +static const struct udevice_id rv1108_syscon_ids[] = { + { .compatible = "rockchip,rv1108-grf", .data = ROCKCHIP_SYSCON_GRF }, + { } +}; + +U_BOOT_DRIVER(syscon_rv1108) = { + .name = "rv1108_syscon", + .id = UCLASS_SYSCON, + .of_match = rv1108_syscon_ids, +}; |