]> git.baikalelectronics.ru Git - uboot.git/commitdiff
riscv: Update Microchip MPFS Icicle Kit support
authorPadmarao Begari <padmarao.begari@microchip.com>
Wed, 17 Nov 2021 12:51:18 +0000 (18:21 +0530)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 2 Dec 2021 08:43:52 +0000 (16:43 +0800)
This patch updates Microchip MPFS Icicle Kit support. For now,
add Microchip I2C driver, set environment variables for
mac addresses and default build for SBI_V02.

Signed-off-by: Padmarao Begari <padmarao.begari@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
board/microchip/mpfs_icicle/Kconfig
board/microchip/mpfs_icicle/mpfs_icicle.c
configs/microchip_mpfs_icicle_defconfig

index 4678462378c6254bd4521a42ee3bdb87495ee6a9..092e41121513844452a39e1474bb281daddb4c57 100644 (file)
@@ -45,5 +45,10 @@ config BOARD_SPECIFIC_OPTIONS # dummy
        imply MMC_WRITE
        imply MMC_SDHCI
        imply MMC_SDHCI_CADENCE
+       imply MMC_SDHCI_ADMA
+       imply MMC_HS200_SUPPORT
+       imply CMD_I2C
+       imply DM_I2C
+       imply SYS_I2C_MICROCHIP
 
 endif
index afef719dffda7a45a6c372b06d965927701147a4..e74c9fb03cc50466eec40d079799823cc48e0904 100644 (file)
@@ -119,7 +119,22 @@ int board_late_init(void)
                if (icicle_mac_addr[idx] == ':')
                        icicle_mac_addr[idx] = ' ';
        }
-       env_set("icicle_mac_addr", icicle_mac_addr);
+       env_set("icicle_mac_addr0", icicle_mac_addr);
+
+       mac_addr[5] = device_serial_number[0] + 1;
+
+       icicle_mac_addr[0] = '[';
+
+       sprintf(&icicle_mac_addr[1], "%pM", mac_addr);
+
+       icicle_mac_addr[18] = ']';
+       icicle_mac_addr[19] = '\0';
+
+       for (idx = 0; idx < 20; idx++) {
+               if (icicle_mac_addr[idx] == ':')
+                       icicle_mac_addr[idx] = ' ';
+       }
+       env_set("icicle_mac_addr1", icicle_mac_addr);
 
        return 0;
 }
index 54458b7823dc74634e2df0a4e54a4c9b4fa75d6c..e51afc17e29e0edffdf66829afb2b3ed130dc6f7 100644 (file)
@@ -6,7 +6,6 @@ CONFIG_DEFAULT_DEVICE_TREE="microchip-mpfs-icicle-kit"
 CONFIG_TARGET_MICROCHIP_ICICLE=y
 CONFIG_ARCH_RV64I=y
 CONFIG_RISCV_SMODE=y
-CONFIG_SBI_V01=y
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_LOAD_ADDR=0x80200000
 CONFIG_FIT=y