nmhw21,26: change sim_sel to timepulse

gpio2_16 is re-defined as timepulse input on hw26.
On hw21 it was the non-working SIM_SEL_N.
Mux config changed, keeping pin input.
This commit is contained in:
Rene Straub 2020-06-15 15:08:56 +02:00
parent 7336361d5c
commit e0f24ed684
2 changed files with 20 additions and 12 deletions

View File

@ -64,7 +64,7 @@ DECLARE_GLOBAL_DATA_PTR;
* (V17) GPIO1_27: WLAN_IRQ * (V17) GPIO1_27: WLAN_IRQ
* (U18) GPIO1_28: LED0.GN * (U18) GPIO1_28: LED0.GN
* *
* (U3) GPIO2_16: SIM_PRES~ (V2.0) * (U3) GPIO2_16: TIMEPULSE~ (HW26)
* (R6) GPIO2_25: RST_ETH~ * (R6) GPIO2_25: RST_ETH~
* *
* (J17) GPIO3_4: GNSS_EXTINT * (J17) GPIO3_4: GNSS_EXTINT
@ -102,7 +102,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define CAN1_TERM_N GPIO_TO_PIN(0, 23) #define CAN1_TERM_N GPIO_TO_PIN(0, 23)
#define GPIO_SIM_SEL GPIO_TO_PIN(1, 12) #define GPIO_SIM_SEL GPIO_TO_PIN(1, 12)
#define GPIO_SIM_PRES_N GPIO_TO_PIN(2, 16) #define GPIO_TIMEPULSE GPIO_TO_PIN(2, 16)
#define GPIO_UART2_RX GPIO_TO_PIN(0, 2) /* UART Rx Pin as GPIO */ #define GPIO_UART2_RX GPIO_TO_PIN(0, 2) /* UART Rx Pin as GPIO */
@ -819,14 +819,6 @@ static void init_sim_mux(void)
* Switch pluggable micro SIM to onboard modem (mux = 1) * Switch pluggable micro SIM to onboard modem (mux = 1)
*/ */
REQUEST_AND_SET_GPIO(GPIO_SIM_SEL); REQUEST_AND_SET_GPIO(GPIO_SIM_SEL);
/*
* Inform modem that SIM is installed
* - uBlox TOBY-L2 Datasheet UBX-13004573 - R24
* - uBlox TOBY-L2-MPCI-L2_SysIntegrManual_(UBX-13004618) - R26
* 1.8.2 SIM detection interface
*/
REQUEST_AND_CLEAR_GPIO(GPIO_SIM_PRES_N);
} }
static void init_gsm(void) static void init_gsm(void)
@ -909,6 +901,21 @@ static void init_gnss(void)
REQUEST_AND_SET_GPIO(GPIO_RST_GNSS); REQUEST_AND_SET_GPIO(GPIO_RST_GNSS);
} }
static void init_timepulse(void)
{
/*
* Configure timepulse as input.
*
* Note:
* Was output on HW21, function SIM_PRES_N, never worked.
* Therefore reused as timepulse input on hw26.
*/
/*
* Action: None, just leave pin at reset default = input
*/
}
#endif /* !defined(CONFIG_SPL_BUILD) */ #endif /* !defined(CONFIG_SPL_BUILD) */
@ -1659,6 +1666,7 @@ int board_late_init(void)
init_sim_mux(); init_sim_mux();
init_gsm(); init_gsm();
init_gnss(); init_gnss();
init_timepulse();
/* /*
* Check if a user action is requested * Check if a user action is requested

View File

@ -40,7 +40,7 @@ static struct module_pin_mux gpio_pin_mux[] = {
* (V17) GPIO1_27: WLAN_IRQ * (V17) GPIO1_27: WLAN_IRQ
* (U18) GPIO1_28: LED0.RD * (U18) GPIO1_28: LED0.RD
* *
* (U3) GPIO2_16: SIM_PRES~ (V2.0) * (U3) GPIO2_16: TIMEPULSE (HW26)
* (R6) GPIO2_25: RST_ETH~ * (R6) GPIO2_25: RST_ETH~
* *
* (J17) GPIO3_4: GNSS_EXTINT * (J17) GPIO3_4: GNSS_EXTINT
@ -73,7 +73,7 @@ static struct module_pin_mux gpio_pin_mux[] = {
/* TODO: What about all the unused GPMC pins ? */ /* TODO: What about all the unused GPMC pins ? */
/* Bank 2 */ /* Bank 2 */
{OFFSET(lcd_data10), (MODE(7) | PULLUDDIS)}, /* (U3) GPIO2_16: SIM_PRES~ */ {OFFSET(lcd_data10), (MODE(7) | PULLUDEN | PULLDOWN_EN | RXACTIVE)}, /* (U3) GPIO2_16: TIMEPULSE input */
{OFFSET(lcd_ac_bias_en), (MODE(7) | PULLUDDIS)}, /* (R6) GPIO2_25: RST_ETH~ */ {OFFSET(lcd_ac_bias_en), (MODE(7) | PULLUDDIS)}, /* (R6) GPIO2_25: RST_ETH~ */
#if 0 #if 0