|
发表于 2022-12-16 11:53:42
1295 浏览 0 回复
T618 展锐 uboot GPIO口初始化 pinmap
需求:
如何修改T618 Android11 中GPIO口的模式
修改方法说明:
GPIO口初始化路径:
- bsp\bootloader\u-boot15\board\spreadtrum\ums512_1h10\pinmap.c
复制代码
若需修改某个口的模式,要先通过《23851_UMS512TGPIOSpecV1.0.xlsx》找到你需要修改口是在模式几,如修改REG_PIN_SIMDA2和REG_PIN_SIMCLK2改成I2C4口:
修改如下:
- --- a/sprd/bsp/bootloader/u-boot15/board/spreadtrum/ums512_1h10/pinmap.c
- +++ b/sprd/bsp/bootloader/u-boot15/board/spreadtrum/ums512_1h10/pinmap.c
- @@ -113,9 +113,9 @@ static pinmap_t pinmap[]={
- {REG_PIN_CHIP_SLEEP, BITS_PIN_AF(0)},
- {REG_MISC_PIN_CHIP_SLEEP, BITS_PIN_DS(1)|BIT_PIN_NULL|BIT_PIN_NUL|BIT_PIN_SLP_AP|BIT_PIN_SLP_NUL|BIT_PIN_SLP_OE},//CHIP_SLEEP
- {REG_PIN_SIMCLK2, BITS_PIN_AF(1)},
- -{REG_MISC_PIN_SIMCLK2, BITS_PIN_DS(1)|BIT_PIN_WPUS|BIT_PIN_WPU|BIT_PIN_SLP_AP|BIT_PIN_SLP_WPU|BIT_PIN_SLP_Z},//I2C4_SCL
- -{REG_PIN_SIMDA2, BITS_PIN_AF(3)},
- -{REG_MISC_PIN_SIMDA2, BITS_PIN_DS(1)|BIT_PIN_NULL|BIT_PIN_WPD|BIT_PIN_SLP_AP|BIT_PIN_SLP_NUL|BIT_PIN_SLP_OE},//I2C4_SDA
- +{REG_MISC_PIN_SIMCLK2, BITS_PIN_DS(3)|BIT_PIN_WPUS|BIT_PIN_WPU|BIT_PIN_SLP_AP|BIT_PIN_SLP_WPU|BIT_PIN_SLP_Z},//I2C4_SCL
- +{REG_PIN_SIMDA2, BITS_PIN_AF(1)},
- +{REG_MISC_PIN_SIMDA2, BITS_PIN_DS(3)|BIT_PIN_WPUS|BIT_PIN_WPU|BIT_PIN_SLP_AP|BIT_PIN_SLP_WPU|BIT_PIN_SLP_Z},//I2C4_SDA
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|
手机微信同号:13682654092
|
|
|
|
|
登录或注册
|