diff options
Diffstat (limited to 'board/keymile')
-rw-r--r-- | board/keymile/Kconfig | 16 | ||||
-rw-r--r-- | board/keymile/km83xx/Kconfig | 62 | ||||
-rw-r--r-- | board/keymile/km_arm/Kconfig | 10 | ||||
-rw-r--r-- | board/keymile/km_arm/km_arm.c | 23 | ||||
-rw-r--r-- | board/keymile/kmp204x/Kconfig | 8 |
5 files changed, 117 insertions, 2 deletions
diff --git a/board/keymile/Kconfig b/board/keymile/Kconfig new file mode 100644 index 0000000000..e30d64818c --- /dev/null +++ b/board/keymile/Kconfig @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2019, Pascal Linder <pascal.linder@edu.hefr.ch> + +config VENDOR_KM + bool + help + Selected by any KM board to have additional configurations. + +if VENDOR_KM + +source "board/keymile/km83xx/Kconfig" +source "board/keymile/kmp204x/Kconfig" +source "board/keymile/km_arm/Kconfig" + +endif diff --git a/board/keymile/km83xx/Kconfig b/board/keymile/km83xx/Kconfig index fbbbb17034..0a41be57f5 100644 --- a/board/keymile/km83xx/Kconfig +++ b/board/keymile/km83xx/Kconfig @@ -9,6 +9,13 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "kmeter1" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_MPC8360 + imply CMD_CRAMFS + imply CMD_DIAG + imply FS_CRAMFS + endif if TARGET_KMCOGE5NE @@ -22,6 +29,13 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "kmcoge5ne" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_MPC8360 + imply CMD_CRAMFS + imply CMD_DIAG + imply FS_CRAMFS + endif if TARGET_KMVECT1 @@ -35,6 +49,12 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "kmvect1" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_MPC8309 + imply CMD_CRAMFS + imply FS_CRAMFS + endif if TARGET_KMTEGR1 @@ -48,6 +68,12 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "kmtegr1" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_MPC8309 + imply CMD_CRAMFS + imply FS_CRAMFS + endif if TARGET_SUVD3 @@ -61,6 +87,12 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "suvd3" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_MPC832X + imply CMD_CRAMFS + imply FS_CRAMFS + endif if TARGET_TUXX1 @@ -74,6 +106,12 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "tuxx1" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_MPC832X + imply CMD_CRAMFS + imply FS_CRAMFS + endif if TARGET_KMSUPX5 @@ -87,6 +125,12 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "kmsupx5" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_MPC832X + imply CMD_CRAMFS + imply FS_CRAMFS + endif if TARGET_TUGE1 @@ -100,6 +144,12 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "tuge1" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_MPC832X + imply CMD_CRAMFS + imply FS_CRAMFS + endif if TARGET_KMOPTI2 @@ -113,6 +163,12 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "kmopti2" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_MPC832X + imply CMD_CRAMFS + imply FS_CRAMFS + endif if TARGET_KMTEPR2 @@ -126,4 +182,10 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "kmtepr2" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_MPC832X + imply CMD_CRAMFS + imply FS_CRAMFS + endif diff --git a/board/keymile/km_arm/Kconfig b/board/keymile/km_arm/Kconfig index 3476780847..19c1db3bc2 100644 --- a/board/keymile/km_arm/Kconfig +++ b/board/keymile/km_arm/Kconfig @@ -9,4 +9,14 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "km_kirkwood" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select BOARD_LATE_INIT + select DM + select DM_SPI + select DM_SPI_FLASH + imply CMD_CRAMFS + imply CMD_DIAG + imply FS_CRAMFS + endif diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c index ea03be9eb3..3db80615ef 100644 --- a/board/keymile/km_arm/km_arm.c +++ b/board/keymile/km_arm/km_arm.c @@ -310,16 +310,35 @@ int board_late_init(void) return 0; } -int board_spi_claim_bus(struct spi_slave *slave) +static const u32 spi_mpp_config[] = { + MPP1_SPI_MOSI, + MPP2_SPI_SCK, + MPP3_SPI_MISO, + 0 +}; + +static u32 spi_mpp_backup[4]; + +int mvebu_board_spi_claim_bus(struct udevice *dev) { + spi_mpp_backup[3] = 0; + + /* set new spi mpp config and save current one */ + kirkwood_mpp_conf(spi_mpp_config, spi_mpp_backup); + kw_gpio_set_value(KM_FLASH_GPIO_PIN, 0); return 0; } -void board_spi_release_bus(struct spi_slave *slave) +int mvebu_board_spi_release_bus(struct udevice *dev) { + /* restore saved mpp config */ + kirkwood_mpp_conf(spi_mpp_backup, NULL); + kw_gpio_set_value(KM_FLASH_GPIO_PIN, 1); + + return 0; } #if (defined(CONFIG_KM_PIGGY4_88E6061)) diff --git a/board/keymile/kmp204x/Kconfig b/board/keymile/kmp204x/Kconfig index 7b45a13cfb..f74d4295c7 100644 --- a/board/keymile/kmp204x/Kconfig +++ b/board/keymile/kmp204x/Kconfig @@ -9,4 +9,12 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "kmp204x" +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select ARCH_P2041 + select FSL_DDR_INTERACTIVE + select PHYS_64BIT + imply CMD_CRAMFS + imply FS_CRAMFS + endif |