From 458a2c6d259895b5346613ab746e1f55ff639d34 Mon Sep 17 00:00:00 2001 From: Daniel Kucera Date: Sun, 28 Nov 2021 21:13:28 +0100 Subject: add V536 SoC support HW very similar to V831, for the purpose of fel practically identical --- fel-spiflash.c | 4 ++++ soc_info.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/fel-spiflash.c b/fel-spiflash.c index fa728f9..eb47a6c 100644 --- a/fel-spiflash.c +++ b/fel-spiflash.c @@ -122,6 +122,7 @@ static uint32_t gpio_base(feldev_handle *dev) { soc_info_t *soc_info = dev->soc_info; switch (soc_info->soc_id) { + case 0x1816: /* V536 */ case 0x1817: /* V831 */ case 0x1728: /* H6 */ case 0x1823: /* H616 */ @@ -140,6 +141,7 @@ static uint32_t spi_base(feldev_handle *dev) case 0x1651: /* A20 */ case 0x1701: /* R40 */ return 0x01C05000; + case 0x1816: /* V536 */ case 0x1817: /* V831 */ case 0x1728: /* H6 */ case 0x1823: /* H616 */ @@ -181,6 +183,7 @@ static bool soc_is_h6_style(feldev_handle *dev) { soc_info_t *soc_info = dev->soc_info; switch (soc_info->soc_id) { + case 0x1816: /* V536 */ case 0x1817: /* V831 */ case 0x1728: /* H6 */ case 0x1823: /* H616 */ @@ -228,6 +231,7 @@ static bool spi0_init(feldev_handle *dev) gpio_set_cfgpin(dev, PC, 2, SUN50I_GPC_SPI0); gpio_set_cfgpin(dev, PC, 3, SUN50I_GPC_SPI0); break; + case 0x1816: /* Allwinner V536 */ case 0x1817: /* Allwinner V831 */ gpio_set_cfgpin(dev, PC, 1, SUN50I_GPC_SPI0); /* SPI0-CS */ /* fall-through */ diff --git a/soc_info.c b/soc_info.c index 6414fa7..cba2b77 100644 --- a/soc_info.c +++ b/soc_info.c @@ -307,6 +307,17 @@ soc_info_t soc_info_table[] = { /* Check L.NOP in the OpenRISC reset vector */ .needs_smc_workaround_if_zero_word_at_addr = 0x100004, .watchdog = &wd_h6_compat, + },{ + .soc_id = 0x1816, /* Allwinner V536 */ + .name = "V536", + .spl_addr = 0x20000, + .scratch_addr = 0x21000, + .thunk_addr = 0x2A200, .thunk_size = 0x200, + .swap_buffers = v831_sram_swap_buffers, + .sram_size = 228 * 1024, + .sid_base = 0x03006000, + .sid_offset = 0x200, + .watchdog = &wd_h6_compat, },{ .soc_id = 0x1817, /* Allwinner V831 */ .name = "V831", -- cgit v1.2.3