exynos5: config: prepare for dm i2c support
PATCH 8/18 exynos5: config: prepare for dm i2c support
Hi Przemyslaw,
Quoted 35 lines
This commit allows for test i2c drivers with new i2c api on Exynos5xxx based boards.
The S3C24X0 I2C driver supports driver model I2C api, but i2c peripherials drivers on exynos5 boards doesn't. So this commit allows for test ported driver before switch the Exynos5 boards to DM I2C at all.
Signed-off-by Przemyslaw Marczak <[email protected]>Cc Akshay Saraswat <[email protected]>Cc Simon Glass <[email protected]>Cc Minkyu Kang <[email protected]>---
include/configs/exynos5-common.h| 29 ++++++++++++++++++-----------1 file changed, 18 insertions(+), 11 deletions(-)include/configs/exynos5-common.h +0
-7@@ -54,13 +54,6 @@#define CONFIG_CMD_DTT #define CONFIG_TMU_CMD_DTT -/* TPM */ -#define CONFIG_TPM -#define CONFIG_CMD_TPM -#define CONFIG_TPM_TIS_I2C -#define CONFIG_TPM_TIS_I2C_BUS_NUMBER 3 -#define CONFIG_TPM_TIS_I2C_SLAVE_ADDR 0x20 -/* MMC SPL */ #define COPY_BL2_FNPTR_ADDR 0x02020030#define CONFIG_SUPPORT_EMMC_BOOT
include/configs/exynos5-common.h line 122
Quoted 6 lines
include/configs/exynos5-common.h +1
-2@@ -126,15 +119,29 @@#define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)/* I2C */ -#define CONFIG_SYS_I2C_INIT_BOARD -#define CONFIG_SYS_I2C +#if 0 /* For test */
Quick test over SMDK 5250 after replacing #if 0 -> 1. Looks like there is some problem in changing bus beyond 7. Please check.
Console prints are as follows -
SMDK5250 # i2c dev 8
Setting bus to 8
Failure changing bus number (-19)
exit not allowed from main input shell.
Quoted 29 lines
include/configs/exynos5-common.h +17
-2+#define CONFIG_DM_I2C +#endif #define CONFIG_CMD_I2C -#define CONFIG_SYS_I2C_S3C24X0_SPEED 100000/* 100 Kbps */ #define CONFIG_SYS_I2C_S3C24X0 -#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C_S3C24X0_SPEED 100000/* 100 Kbps */ #define CONFIG_SYS_I2C_S3C24X0_SLAVE 0x0 +#ifndef CONFIG_DM_I2C +#define CONFIG_SYS_I2C_INIT_BOARD +#define CONFIG_SYS_I2C +#define CONFIG_I2C_MULTI_BUS +#endif /* ifndef CONFIG_DM_I2C */ #define CONFIG_I2C_EDID +/* TPM */ +#ifndef CONFIG_DM_I2C +#define CONFIG_TPM +#define CONFIG_CMD_TPM +#define CONFIG_TPM_TIS_I2C +#define CONFIG_TPM_TIS_I2C_BUS_NUMBER 3 +#define CONFIG_TPM_TIS_I2C_SLAVE_ADDR 0x20 +#endif +/* SPI */ #ifdef CONFIG_SPI_FLASH #define CONFIG_EXYNOS_SPI Signature · 1 line
1.9.1
Regards,
Akshay Saraswat
PATCH 8/18 exynos5: config: prepare for dm i2c support
Hello Akshay,
Quoted 48 lines · Akshay Saraswat
Hi Przemyslaw,
Quoted 35 lines
This commit allows for test i2c drivers with new i2c api on Exynos5xxx based boards.
The S3C24X0 I2C driver supports driver model I2C api, but i2c peripherials drivers on exynos5 boards doesn't. So this commit allows for test ported driver before switch the Exynos5 boards to DM I2C at all.
Signed-off-by Przemyslaw Marczak <[email protected]>Cc Akshay Saraswat <[email protected]>Cc Simon Glass <[email protected]>Cc Minkyu Kang <[email protected]>---
include/configs/exynos5-common.h| 29 ++++++++++++++++++-----------1 file changed, 18 insertions(+), 11 deletions(-)include/configs/exynos5-common.h +0
-7@@ -54,13 +54,6 @@#define CONFIG_CMD_DTT #define CONFIG_TMU_CMD_DTT -/* TPM */ -#define CONFIG_TPM -#define CONFIG_CMD_TPM -#define CONFIG_TPM_TIS_I2C -#define CONFIG_TPM_TIS_I2C_BUS_NUMBER 3 -#define CONFIG_TPM_TIS_I2C_SLAVE_ADDR 0x20 -/* MMC SPL */ #define COPY_BL2_FNPTR_ADDR 0x02020030#define CONFIG_SUPPORT_EMMC_BOOT include/configs/exynos5-common.h line 122
Quoted 6 lines
include/configs/exynos5-common.h +1
-2@@ -126,15 +119,29 @@#define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)/* I2C */ -#define CONFIG_SYS_I2C_INIT_BOARD -#define CONFIG_SYS_I2C +#if 0 /* For test */ Quick test over SMDK 5250 after replacing #if 0 -> 1. Looks like there is some problem in changing bus beyond 7. Please check.
Quoted 7 lines
Console prints are as follows -
SMDK5250 # i2c dev 8
Setting bus to 8
Failure changing bus number (-19)
exit not allowed from main input shell.
I think that this is right, because, the defined buses are:
- exynos5.dtsi - 0, 1, 2, 3 (periph_id: 56, 57, 58, 59),
- exynos5250.dtsi - 4, 5, 6, 7 (periph_id: 60, 61, 62, 63) but there are no additional i2c nodes in exynos5250-smdk5250.dts file. So, you can use only i2c bus <0:7>.
The additional i2c bus nodes are defined in:
- exynos54xx.dtsi - 8, 9, 10 (periph_id: 87, 88, 203), So for exynos54xx boards we can switch between i2c <0:10>.
Quoted 24 lines
Quoted 24 lines
include/configs/exynos5-common.h +17
-2+#define CONFIG_DM_I2C +#endif #define CONFIG_CMD_I2C -#define CONFIG_SYS_I2C_S3C24X0_SPEED 100000/* 100 Kbps */ #define CONFIG_SYS_I2C_S3C24X0 -#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C_S3C24X0_SPEED 100000/* 100 Kbps */ #define CONFIG_SYS_I2C_S3C24X0_SLAVE 0x0 +#ifndef CONFIG_DM_I2C +#define CONFIG_SYS_I2C_INIT_BOARD +#define CONFIG_SYS_I2C +#define CONFIG_I2C_MULTI_BUS +#endif /* ifndef CONFIG_DM_I2C */ #define CONFIG_I2C_EDID +/* TPM */ +#ifndef CONFIG_DM_I2C +#define CONFIG_TPM +#define CONFIG_CMD_TPM +#define CONFIG_TPM_TIS_I2C +#define CONFIG_TPM_TIS_I2C_BUS_NUMBER 3 +#define CONFIG_TPM_TIS_I2C_SLAVE_ADDR 0x20 +#endif +
Quoted 9 lines
Quoted 5 lines
include/configs/exynos5-common.h +0
-1/* SPI */ #ifdef CONFIG_SPI_FLASH #define CONFIG_EXYNOS_SPI --1.9.1
Regards,
Akshay Saraswat
So if you would like to use i2c 8, then please add proper nodes to dts - but please notice that the "reg" addresses are different for 5250/54xx.
Best regards,
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com
PATCH 8/18 exynos5: config: prepare for dm i2c support
+ fixed address to Sjoerd Simons.
Quoted 102 lines · Przemyslaw Marczak
Hello Akshay,
Quoted 49 lines · Akshay Saraswat
Hi Przemyslaw,
Quoted 36 lines
This commit allows for test i2c drivers with new i2c api on Exynos5xxx based boards.
The S3C24X0 I2C driver supports driver model I2C api, but i2c peripherials drivers on exynos5 boards doesn't. So this commit allows for test ported driver before switch the Exynos5 boards to DM I2C at all.
Signed-off-by Przemyslaw Marczak <[email protected]>Cc Akshay Saraswat <[email protected]>Cc Simon Glass <[email protected]>Cc Minkyu Kang <[email protected]>---
include/configs/exynos5-common.h| 29 ++++++++++++++++++-----------1 file changed, 18 insertions(+), 11 deletions(-)include/configs/exynos5-common.h +0
-7@@ -54,13 +54,6 @@#define CONFIG_CMD_DTT #define CONFIG_TMU_CMD_DTT -/* TPM */ -#define CONFIG_TPM -#define CONFIG_CMD_TPM -#define CONFIG_TPM_TIS_I2C -#define CONFIG_TPM_TIS_I2C_BUS_NUMBER 3 -#define CONFIG_TPM_TIS_I2C_SLAVE_ADDR 0x20 -/* MMC SPL */ #define COPY_BL2_FNPTR_ADDR 0x02020030#define CONFIG_SUPPORT_EMMC_BOOT include/configs/exynos5-common.h line 122
Quoted 6 lines
include/configs/exynos5-common.h +1
-2@@ -126,15 +119,29 @@#define SPI_FLASH_UBOOT_POS (CONFIG_SEC_FW_SIZE + CONFIG_BL1_SIZE)/* I2C */ -#define CONFIG_SYS_I2C_INIT_BOARD -#define CONFIG_SYS_I2C +#if 0 /* For test */ Quick test over SMDK 5250 after replacing #if 0 -> 1. Looks like there is some problem in changing bus beyond 7. Please check.
Quoted 7 lines
Console prints are as follows -
SMDK5250 # i2c dev 8
Setting bus to 8
Failure changing bus number (-19)
exit not allowed from main input shell.I think that this is right, because, the defined buses are:
-exynos5.dtsi- 0, 1, 2, 3 (periph_id: 56, 57, 58, 59),
-exynos5250.dtsi- 4, 5, 6, 7 (periph_id: 60, 61, 62, 63) but there are no additional i2c nodes inexynos5250-smdk5250.dtsfile. So, you can use only i2c bus <0:7>.The additional i2c bus nodes are defined in:
-exynos54xx.dtsi- 8, 9, 10 (periph_id: 87, 88, 203), So for exynos54xx boards we can switch between i2c <0:10>.Quoted 24 lines
Quoted 24 lines
include/configs/exynos5-common.h +17
-2+#define CONFIG_DM_I2C +#endif #define CONFIG_CMD_I2C -#define CONFIG_SYS_I2C_S3C24X0_SPEED 100000/* 100 Kbps */ #define CONFIG_SYS_I2C_S3C24X0 -#define CONFIG_I2C_MULTI_BUS +#define CONFIG_SYS_I2C_S3C24X0_SPEED 100000/* 100 Kbps */ #define CONFIG_SYS_I2C_S3C24X0_SLAVE 0x0 +#ifndef CONFIG_DM_I2C +#define CONFIG_SYS_I2C_INIT_BOARD +#define CONFIG_SYS_I2C +#define CONFIG_I2C_MULTI_BUS +#endif /* ifndef CONFIG_DM_I2C */ #define CONFIG_I2C_EDID +/* TPM */ +#ifndef CONFIG_DM_I2C +#define CONFIG_TPM +#define CONFIG_CMD_TPM +#define CONFIG_TPM_TIS_I2C +#define CONFIG_TPM_TIS_I2C_BUS_NUMBER 3 +#define CONFIG_TPM_TIS_I2C_SLAVE_ADDR 0x20 +#endif +Quoted 9 lines
Quoted 5 lines
include/configs/exynos5-common.h +0
-1/* SPI */ #ifdef CONFIG_SPI_FLASH #define CONFIG_EXYNOS_SPI --1.9.1
Regards,
Akshay Saraswat
Quoted 4 lines
So if you would like to use i2c 8, then please add proper nodes to dts - but please notice that the "reg" addresses are different for 5250/54xx.
Best regards,
Best regards,
Signature · 4 lines
Przemyslaw Marczak Samsung R&D Institute Poland Samsung Electronics p.marczak at samsung.com