diff options
author | Cooper Jr., Franklin | 2017-06-16 17:25:23 -0500 |
---|---|---|
committer | Tom Rini | 2017-07-10 14:25:58 -0400 |
commit | b9b342eaec7cf3c9d7836bc2bb302b26fd48af50 (patch) | |
tree | 42fadbf07f07ef3d16c9aa8ac7ca734ea0ed3fa3 /board | |
parent | e6e2435f3993e3a385b5dd85b82eba4eb1d9e56b (diff) |
ARM: k2g: Add pinmux support for K2G ICE evm
Add basic pinmux data for new K2G ICE evm. Also add pinmuxing for a
generic K2G evm which includes I2C 0 and 1 used for board detection
purposes.
Since multiple K2G boards are supported that means initially generic
pinmuxing should be used when board detection hasn't ran. Once board
detection runs the proper pinmuxing can be reran to match the board
being ran on.
Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/ti/ks2_evm/board_k2g.c | 2 | ||||
-rw-r--r-- | board/ti/ks2_evm/mux-k2g.h | 45 |
2 files changed, 46 insertions, 1 deletions
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index b4765f7939f..362231286bd 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -274,6 +274,8 @@ int embedded_dtb_select(void) fdtdec_setup(); + k2g_mux_config(); + k2g_reset_mux_config(); /* deassert FLASH_HOLD */ diff --git a/board/ti/ks2_evm/mux-k2g.h b/board/ti/ks2_evm/mux-k2g.h index 773f9b7f0ca..630103d0ff4 100644 --- a/board/ti/ks2_evm/mux-k2g.h +++ b/board/ti/ks2_evm/mux-k2g.h @@ -11,6 +11,22 @@ #include <asm/io.h> #include <asm/arch/mux-k2g.h> #include <asm/arch/hardware.h> +#include "board.h" + +struct pin_cfg k2g_generic_pin_cfg[] = { + /* UART0 */ + { 115, MODE(0) }, /* SOC_UART0_RXD */ + { 116, MODE(0) }, /* SOC_UART0_TXD */ + + /* I2C 0 */ + { 223, MODE(0) }, /* SOC_I2C0_SCL */ + { 224, MODE(0) }, /* SOC_I2C0_SDA */ + + /* I2C 1 */ + { 225, MODE(0) }, /* SOC_I2C1_SCL */ + { 226, MODE(0) }, /* SOC_I2C1_SDA */ + { MAX_PIN_N, } +}; struct pin_cfg k2g_evm_pin_cfg[] = { /* GPMC */ @@ -307,7 +323,34 @@ struct pin_cfg k2g_evm_pin_cfg[] = { { MAX_PIN_N, } }; +struct pin_cfg k2g_ice_evm_pin_cfg[] = { + /* MMC 1 */ + { 63, MODE(0) | PIN_PTD }, /* MMC1_DAT3.MMC1_DAT3 */ + { 64, MODE(0) | PIN_PTU }, /* MMC1_DAT2.MMC1_DAT2 */ + { 65, MODE(0) | PIN_PTU }, /* MMC1_DAT1.MMC1_DAT1 */ + { 66, MODE(0) | PIN_PTD }, /* MMC1_DAT0.MMC1_DAT0 */ + { 67, MODE(0) | PIN_PTD }, /* MMC1_CLK.MMC1_CLK */ + { 68, MODE(0) | PIN_PTD }, /* MMC1_CMD.MMC1_CMD */ + { 69, MODE(3) | PIN_PTU }, /* MMC1_SDCD.GPIO0_69 */ + { 70, MODE(0) | PIN_PTU }, /* MMC1_SDWP.MMC1_SDWP */ + { 71, MODE(0) | PIN_PTD }, /* MMC1_POW.MMC1_POW */ + + /* I2C 0 */ + { 223, MODE(0) }, /* SOC_I2C0_SCL */ + { 224, MODE(0) }, /* SOC_I2C0_SDA */ + { MAX_PIN_N, } +}; + void k2g_mux_config(void) { - configure_pin_mux(k2g_evm_pin_cfg); + if (!board_ti_was_eeprom_read()) { + configure_pin_mux(k2g_generic_pin_cfg); + } else if (board_is_k2g_gp()) { + configure_pin_mux(k2g_evm_pin_cfg); + } else if (board_is_k2g_ice()) { + configure_pin_mux(k2g_ice_evm_pin_cfg); + } else { + puts("Unknown board, cannot configure pinmux."); + hang(); + } } |