aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishal Mahaveer2017-09-27 17:08:56 -0500
committerVishal Mahaveer2017-09-27 17:19:45 -0500
commit5310ba895673f1286d418fceb23c0ffdd32a49d2 (patch)
treeb83d26e422e3a1bdc9f14d91a1fb80bf3dc69231
parent8b51a2aeadd7c66fd4b965541b47dbd467cba0c7 (diff)
downloadu-boot-5310ba895673f1286d418fceb23c0ffdd32a49d2.tar.gz
u-boot-5310ba895673f1286d418fceb23c0ffdd32a49d2.tar.xz
u-boot-5310ba895673f1286d418fceb23c0ffdd32a49d2.zip
dra71x: lcard: updates for rev-B EEPROM
New version of LCARD has EEPROM populated to identify LCARD board from regular EVM. Update code based on the EEPROM value. Change-Id: Ifedbe2019673651b2d2fabffff2cfaa8862f9303 Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
-rw-r--r--board/ti/dra7xx/evm.c30
-rw-r--r--board/ti/dra7xx/mux_data.h12
-rw-r--r--include/configs/dra7xx_evm.h2
3 files changed, 22 insertions, 22 deletions
diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index 5b59f21773..ea1df4e4ff 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -39,6 +39,7 @@
39#define board_is_dra74x_evm() board_ti_is("5777xCPU") 39#define board_is_dra74x_evm() board_ti_is("5777xCPU")
40#define board_is_dra72x_evm() board_ti_is("DRA72x-T") 40#define board_is_dra72x_evm() board_ti_is("DRA72x-T")
41#define board_is_dra71x_evm() board_ti_is("DRA79x,D") 41#define board_is_dra71x_evm() board_ti_is("DRA79x,D")
42#define board_is_dra71x_lcard() board_ti_is("DRA71x_L")
42#define board_is_dra74x_revh_or_later() (board_is_dra74x_evm() && \ 43#define board_is_dra74x_revh_or_later() (board_is_dra74x_evm() && \
43 (strncmp("H", board_ti_get_rev(), 1) <= 0)) 44 (strncmp("H", board_ti_get_rev(), 1) <= 0))
44#define board_is_dra72x_revc_or_later() (board_is_dra72x_evm() && \ 45#define board_is_dra72x_revc_or_later() (board_is_dra72x_evm() && \
@@ -788,11 +789,9 @@ void vcores_update(void)
788 } else if (board_is_dra72x_evm()) { 789 } else if (board_is_dra72x_evm()) {
789 *omap_vcores = &dra722_volts; 790 *omap_vcores = &dra722_volts;
790 } else if (board_is_dra71x_evm()) { 791 } else if (board_is_dra71x_evm()) {
791#ifdef CONFIG_DRA71X_LCARD
792 *omap_vcores = &dra718_lcard_volts;
793#else
794 *omap_vcores = &dra718_volts; 792 *omap_vcores = &dra718_volts;
795#endif 793 } else if (board_is_dra71x_lcard()) {
794 *omap_vcores = &dra718_lcard_volts;
796 } else if (board_is_dra76x_evm()) { 795 } else if (board_is_dra76x_evm()) {
797 *omap_vcores = &dra76x_volts; 796 *omap_vcores = &dra76x_volts;
798 } else { 797 } else {
@@ -806,8 +805,13 @@ void vcores_update(void)
806 805
807void set_muxconf_regs(void) 806void set_muxconf_regs(void)
808{ 807{
809 do_set_mux32((*ctrl)->control_padconf_core_base, 808 if (board_is_dra71x_lcard()) {
810 early_padconf, ARRAY_SIZE(early_padconf)); 809 do_set_mux32((*ctrl)->control_padconf_core_base,
810 dra71x_lcard_early_padconf, ARRAY_SIZE(dra71x_lcard_early_padconf));
811 } else {
812 do_set_mux32((*ctrl)->control_padconf_core_base,
813 early_padconf, ARRAY_SIZE(early_padconf));
814 }
811} 815}
812 816
813#ifdef CONFIG_IODELAY_RECALIBRATION 817#ifdef CONFIG_IODELAY_RECALIBRATION
@@ -825,17 +829,15 @@ void recalibrate_iodelay(void)
825 pads = dra72x_core_padconf_array_common; 829 pads = dra72x_core_padconf_array_common;
826 npads = ARRAY_SIZE(dra72x_core_padconf_array_common); 830 npads = ARRAY_SIZE(dra72x_core_padconf_array_common);
827 if (board_is_dra71x_evm()) { 831 if (board_is_dra71x_evm()) {
828#ifdef CONFIG_DRA71X_LCARD
829 pads = dra71x_lcard_core_padconf_array;
830 npads = ARRAY_SIZE(dra71x_lcard_core_padconf_array);
831 iodelay = dra71_lcard_iodelay_cfg_array;
832 niodelays = ARRAY_SIZE(dra71_lcard_iodelay_cfg_array);
833#else
834 pads = dra71x_core_padconf_array; 832 pads = dra71x_core_padconf_array;
835 npads = ARRAY_SIZE(dra71x_core_padconf_array); 833 npads = ARRAY_SIZE(dra71x_core_padconf_array);
836 iodelay = dra71_iodelay_cfg_array; 834 iodelay = dra71_iodelay_cfg_array;
837 niodelays = ARRAY_SIZE(dra71_iodelay_cfg_array); 835 niodelays = ARRAY_SIZE(dra71_iodelay_cfg_array);
838#endif 836 } else if (board_is_dra71x_lcard()) {
837 pads = dra71x_lcard_core_padconf_array;
838 npads = ARRAY_SIZE(dra71x_lcard_core_padconf_array);
839 iodelay = dra71_lcard_iodelay_cfg_array;
840 niodelays = ARRAY_SIZE(dra71_lcard_iodelay_cfg_array);
839 } else if (board_is_dra72x_revc_or_later()) { 841 } else if (board_is_dra72x_revc_or_later()) {
840 delta_pads = dra72x_rgmii_padconf_array_revc; 842 delta_pads = dra72x_rgmii_padconf_array_revc;
841 delta_npads = 843 delta_npads =
@@ -906,13 +908,11 @@ int board_mmc_init(bd_t *bis)
906void board_mmc_poweron_ldo(uint voltage) 908void board_mmc_poweron_ldo(uint voltage)
907{ 909{
908 if (board_is_dra71x_evm()) { 910 if (board_is_dra71x_evm()) {
909#ifndef CONFIG_DRA71X_LCARD
910 if (voltage == LDO_VOLT_3V0) 911 if (voltage == LDO_VOLT_3V0)
911 voltage = 0x19; 912 voltage = 0x19;
912 else if (voltage == LDO_VOLT_1V8) 913 else if (voltage == LDO_VOLT_1V8)
913 voltage = 0xa; 914 voltage = 0xa;
914 lp873x_mmc1_poweron_ldo(voltage); 915 lp873x_mmc1_poweron_ldo(voltage);
915#endif
916 } else if (board_is_dra76x_evm()) { 916 } else if (board_is_dra76x_evm()) {
917 palmas_mmc1_poweron_ldo(LDO4_VOLTAGE, LDO4_CTRL, voltage); 917 palmas_mmc1_poweron_ldo(LDO4_VOLTAGE, LDO4_CTRL, voltage);
918 } else { 918 } else {
diff --git a/board/ti/dra7xx/mux_data.h b/board/ti/dra7xx/mux_data.h
index 0e1cb2d2dc..0ec13a8471 100644
--- a/board/ti/dra7xx/mux_data.h
+++ b/board/ti/dra7xx/mux_data.h
@@ -627,14 +627,16 @@ const struct pad_conf_entry early_padconf[] = {
627 {UART1_RXD, (PIN_INPUT_SLEW | M0)}, /* UART1_RXD */ 627 {UART1_RXD, (PIN_INPUT_SLEW | M0)}, /* UART1_RXD */
628 {UART1_TXD, (PIN_INPUT_SLEW | M0)}, /* UART1_TXD */ 628 {UART1_TXD, (PIN_INPUT_SLEW | M0)}, /* UART1_TXD */
629#elif (CONFIG_CONS_INDEX == 3) 629#elif (CONFIG_CONS_INDEX == 3)
630#ifdef CONFIG_DRA71X_LCARD
631 {UART2_CTSN, (M2 | PIN_INPUT_SLEW)}, /* uart2_ctsn.uart3_rxd */
632 {UART2_RTSN, (M1 | PIN_INPUT_SLEW)}, /* uart2_rtsn.uart3_txd */
633#else
634 {UART3_RXD, (PIN_INPUT_SLEW | M0)}, /* UART3_RXD */ 630 {UART3_RXD, (PIN_INPUT_SLEW | M0)}, /* UART3_RXD */
635 {UART3_TXD, (PIN_INPUT_SLEW | M0)}, /* UART3_TXD */ 631 {UART3_TXD, (PIN_INPUT_SLEW | M0)}, /* UART3_TXD */
636#endif 632#endif
637#endif 633 {I2C1_SDA, (PIN_INPUT | M0)}, /* I2C1_SDA */
634 {I2C1_SCL, (PIN_INPUT | M0)}, /* I2C1_SCL */
635};
636
637const struct pad_conf_entry dra71x_lcard_early_padconf[] = {
638 {UART2_CTSN, (M2 | PIN_INPUT_SLEW)}, /* uart2_ctsn.uart3_rxd */
639 {UART2_RTSN, (M1 | PIN_INPUT_SLEW)}, /* uart2_rtsn.uart3_txd */
638 {I2C1_SDA, (PIN_INPUT | M0)}, /* I2C1_SDA */ 640 {I2C1_SDA, (PIN_INPUT | M0)}, /* I2C1_SDA */
639 {I2C1_SCL, (PIN_INPUT | M0)}, /* I2C1_SCL */ 641 {I2C1_SCL, (PIN_INPUT | M0)}, /* I2C1_SCL */
640}; 642};
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 29bdabdee8..8c6a7803d1 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -17,8 +17,6 @@
17#define CONFIG_DRA7XX 17#define CONFIG_DRA7XX
18#define CONFIG_BOARD_EARLY_INIT_F 18#define CONFIG_BOARD_EARLY_INIT_F
19 19
20#define CONFIG_DRA71X_LCARD
21
22#define CONFIG_IODELAY_RECALIBRATION 20#define CONFIG_IODELAY_RECALIBRATION
23#define CONFIG_SPL_SAVEENV 21#define CONFIG_SPL_SAVEENV
24 22