| 1 |
|
| 2 |
|
| 3 |
#include <soc/gpio.h> |
| 4 |
#include <soc/gsbi.h> |
| 5 |
#include <soc/qup.h> |
| 6 |
|
| 7 |
#define GPIO_FUNC_I2C 0x1 |
| 8 |
|
| 9 |
int gsbi_init_board(gsbi_id_t gsbi_id) |
| 10 |
{ |
| 11 |
switch (gsbi_id) { |
| 12 |
case GSBI_ID_7: |
| 13 |
gpio_tlmm_config_set(8, GPIO_FUNC_I2C, |
| 14 |
GPIO_NO_PULL, GPIO_2MA, 1); |
| 15 |
gpio_tlmm_config_set(9, GPIO_FUNC_I2C, |
| 16 |
GPIO_NO_PULL, GPIO_2MA, 1); |
| 17 |
break; |
| 18 |
case GSBI_ID_4: |
| 19 |
|
| 20 |
gpio_tlmm_config_set(12, GPIO_FUNC_I2C, |
| 21 |
GPIO_NO_PULL, GPIO_2MA, 1); |
| 22 |
gpio_tlmm_config_set(13, GPIO_FUNC_I2C, |
| 23 |
GPIO_NO_PULL, GPIO_2MA, 1); |
| 24 |
break; |
| 25 |
case GSBI_ID_1: |
| 26 |
|
| 27 |
gpio_tlmm_config_set(54, GPIO_FUNC_I2C, |
| 28 |
GPIO_NO_PULL, GPIO_2MA, 1); |
| 29 |
gpio_tlmm_config_set(53, GPIO_FUNC_I2C, |
| 30 |
GPIO_NO_PULL, GPIO_2MA, 1); |
| 31 |
break; |
| 32 |
default: |
| 33 |
return 1; |
| 34 |
} |
| 35 |
|
| 36 |
return 0; |
| 37 |
} |