rockchip: dts: tinker: Add tinker-s board support
Support tinker-s board. The board is equivalent of tinker board
except of emmc.
TODO:
- support of usb current burst when the board is powered from pc
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
diff --git a/board/rockchip/tinker_rk3288/MAINTAINERS b/board/rockchip/tinker_rk3288/MAINTAINERS
index cddceaf..ed5de68 100644
--- a/board/rockchip/tinker_rk3288/MAINTAINERS
+++ b/board/rockchip/tinker_rk3288/MAINTAINERS
@@ -4,3 +4,10 @@
F: board/rockchip/tinker_rk3288
F: include/configs/tinker_rk3288.h
F: configs/tinker-rk3288_defconfig
+
+TINKER-S-RK3288
+M: Michael Trimarchi <michael@amarulasolutions.com>
+S: Maintained
+F: board/rockchip/tinker_rk3288
+F: include/configs/tinker_rk3288.h
+F: configs/tinker-s-rk3288_defconfig
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
index 6c76c3c..7a0c3c9 100644
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
@@ -8,6 +8,8 @@
#include <env.h>
#include <i2c_eeprom.h>
#include <netdev.h>
+#include <asm/arch-rockchip/bootrom.h>
+#include <asm/io.h>
static int get_ethaddr_from_eeprom(u8 *addr)
{
@@ -33,3 +35,13 @@
return 0;
}
+
+int mmc_get_env_dev(void)
+{
+ u32 bootdevice_brom_id = readl(BROM_BOOTSOURCE_ID_ADDR);
+
+ if (bootdevice_brom_id == BROM_BOOTSOURCE_EMMC)
+ return 0;
+
+ return 1;
+}