aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Morgan <macromorgan@hotmail.com>2024-01-02 09:46:53 -0600
committerKever Yang <kever.yang@rock-chips.com>2024-01-19 10:57:36 +0800
commit0cc6cbe84d73ec64a0cb8025633460bd94497606 (patch)
tree3e851aed2d439ef24ba8214a2d08c547111a770a
parentd2048bafae4014fbfacb2fc860da72c1bc525354 (diff)
downloadu-boot-0cc6cbe84d73ec64a0cb8025633460bd94497606.zip
u-boot-0cc6cbe84d73ec64a0cb8025633460bd94497606.tar.gz
u-boot-0cc6cbe84d73ec64a0cb8025633460bd94497606.tar.bz2
board: rockchip: Add support for new boards to RGxx3
Add support for the Anbernic RG-ARC-D, Anbernic RG-ARC-S, Powkiddy RK2023, and Powkiddy RGB30 to the Anbernic RGxx3. While the Powkiddy devices are manufactured by Powkiddy instead of Anbernic, the hardware is so similar they can all use the same bootloader. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
-rw-r--r--board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c44
1 files changed, 39 insertions, 5 deletions
diff --git a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c
index 3ff2e94..d05502f 100644
--- a/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c
+++ b/board/anbernic/rgxx3_rk3566/rgxx3-rk3566.c
@@ -47,9 +47,13 @@ enum rgxx3_device_id {
RG353P,
RG353V,
RG503,
+ RGB30,
+ RK2023,
+ RGARCD,
/* Devices with duplicate ADC value */
RG353PS,
RG353VS,
+ RGARCS,
};
static const struct rg3xx_model rg3xx_model_details[] = {
@@ -82,6 +86,27 @@ static const struct rg3xx_model rg3xx_model_details[] = {
.fdtfile = DTB_DIR "rk3566-anbernic-rg503.dtb",
.detect_panel = 0,
},
+ [RGB30] = {
+ .adc_value = 383, /* Gathered from second hand information */
+ .board = "rk3566-powkiddy-rgb30",
+ .board_name = "RGB30",
+ .fdtfile = DTB_DIR "rk3566-powkiddy-rgb30.dtb",
+ .detect_panel = 0,
+ },
+ [RK2023] = {
+ .adc_value = 635, /* Observed average from device */
+ .board = "rk3566-powkiddy-rk2023",
+ .board_name = "RK2023",
+ .fdtfile = DTB_DIR "rk3566-powkiddy-rk2023.dtb",
+ .detect_panel = 0,
+ },
+ [RGARCD] = {
+ .adc_value = 183, /* Observed average from device */
+ .board = "rk3566-anbernic-rg-arc-d",
+ .board_name = "Anbernic RG ARC-D",
+ .fdtfile = DTB_DIR "rk3566-anbernic-rg-arc-d.dtb",
+ .detect_panel = 0,
+ },
/* Devices with duplicate ADC value */
[RG353PS] = {
.adc_value = 860, /* Observed average from device */
@@ -97,6 +122,13 @@ static const struct rg3xx_model rg3xx_model_details[] = {
.fdtfile = DTB_DIR "rk3566-anbernic-rg353vs.dtb",
.detect_panel = 1,
},
+ [RGARCS] = {
+ .adc_value = 183, /* Observed average from device */
+ .board = "rk3566-anbernic-rg-arc-s",
+ .board_name = "Anbernic RG ARC-S",
+ .fdtfile = DTB_DIR "rk3566-anbernic-rg-arc-s.dtb",
+ .detect_panel = 0,
+ },
};
struct rg353_panel {
@@ -328,19 +360,21 @@ int rgxx3_detect_device(void)
}
/*
- * Try to access the eMMC on an RG353V or RG353P. If it's
- * missing, it's an RG353VS or RG353PS. Note we could also
- * check for a touchscreen at 0x1a on i2c2.
+ * Try to access the eMMC on an RG353V, RG353P, or RG Arc D.
+ * If it's missing, it's an RG353VS, RG353PS, or RG Arc S.
+ * Note we could also check for a touchscreen at 0x1a on i2c2.
*/
- if (board_id == RG353V || board_id == RG353P) {
+ if (board_id == RG353V || board_id == RG353P || board_id == RGARCD) {
mmc = find_mmc_device(0);
if (mmc) {
ret = mmc_init(mmc);
if (ret) {
if (board_id == RG353V)
board_id = RG353VS;
- else
+ else if (board_id == RG353P)
board_id = RG353PS;
+ else
+ board_id = RGARCS;
}
}
}