public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support
  2015-01-08 11:33 ` [U-Boot] [PATCH 01/18] arndale: config: disable max77686 support Przemyslaw Marczak
@ 2015-01-08 11:33   ` Przemyslaw Marczak
  2015-01-08 14:11     ` Minkyu Kang
  2015-01-09  6:37     ` Heiko Schocher
  0 siblings, 2 replies; 8+ messages in thread
From: Przemyslaw Marczak @ 2015-01-08 11:33 UTC (permalink / raw)
  To: u-boot

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 <p.marczak@samsung.com>
Cc: Akshay Saraswat <akshay.s@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
 include/configs/exynos5-common.h | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index ad63f3c..b7af8a5 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -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
@@ -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 */
+#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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support
  2015-01-08 11:33   ` [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support Przemyslaw Marczak
@ 2015-01-08 14:11     ` Minkyu Kang
  2015-01-09  6:37     ` Heiko Schocher
  1 sibling, 0 replies; 8+ messages in thread
From: Minkyu Kang @ 2015-01-08 14:11 UTC (permalink / raw)
  To: u-boot

Hi,

On 08/01/15 20:33, Przemyslaw Marczak wrote:
> 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 <p.marczak@samsung.com>
> Cc: Akshay Saraswat <akshay.s@samsung.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> ---
>  include/configs/exynos5-common.h | 29 ++++++++++++++++++-----------
>  1 file changed, 18 insertions(+), 11 deletions(-)
> 
> diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
> index ad63f3c..b7af8a5 100644
> --- a/include/configs/exynos5-common.h
> +++ b/include/configs/exynos5-common.h
> @@ -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
> @@ -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 */
> +#define CONFIG_DM_I2C
> +#endif

please remove test code

>  #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
> 

Thanks,
Minkyu Kang.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support
  2015-01-08 11:33   ` [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support Przemyslaw Marczak
  2015-01-08 14:11     ` Minkyu Kang
@ 2015-01-09  6:37     ` Heiko Schocher
  2015-01-09 20:51       ` Przemyslaw Marczak
  1 sibling, 1 reply; 8+ messages in thread
From: Heiko Schocher @ 2015-01-09  6:37 UTC (permalink / raw)
  To: u-boot

Hello Przemyslaw Marczak,

Am 08.01.2015 12:33, schrieb Przemyslaw Marczak:
> 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.

Hmm... so this is just a patch for test purposes not for mainline?

> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
> Cc: Akshay Saraswat <akshay.s@samsung.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> ---
>   include/configs/exynos5-common.h | 29 ++++++++++++++++++-----------
>   1 file changed, 18 insertions(+), 11 deletions(-)
>
> diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
> index ad63f3c..b7af8a5 100644
> --- a/include/configs/exynos5-common.h
> +++ b/include/configs/exynos5-common.h
> @@ -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
> @@ -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 */
> +#define CONFIG_DM_I2C
> +#endif

Hmm.. no, please no dead code in mainline ... maybe you
enable "CONFIG_DM_I2C" if "CONFIG_DM" is set?

bye,
Heiko

>   #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
>

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support
@ 2015-01-09  9:21 Akshay Saraswat
  2015-01-12  9:19 ` Przemyslaw Marczak
  0 siblings, 1 reply; 8+ messages in thread
From: Akshay Saraswat @ 2015-01-09  9:21 UTC (permalink / raw)
  To: u-boot

Hi Przemyslaw,

>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 <p.marczak@samsung.com>
>Cc: Akshay Saraswat <akshay.s@samsung.com>
>Cc: Simon Glass <sjg@chromium.org>
>Cc: Minkyu Kang <mk7.kang@samsung.com>
>---
> include/configs/exynos5-common.h | 29 ++++++++++++++++++-----------
> 1 file changed, 18 insertions(+), 11 deletions(-)
>
>diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
>index ad63f3c..b7af8a5 100644
>--- a/include/configs/exynos5-common.h
>+++ b/include/configs/exynos5-common.h
>@@ -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
>@@ -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.

>+#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
>-- 
>1.9.1

Regards,
Akshay Saraswat

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support
  2015-01-09  6:37     ` Heiko Schocher
@ 2015-01-09 20:51       ` Przemyslaw Marczak
  0 siblings, 0 replies; 8+ messages in thread
From: Przemyslaw Marczak @ 2015-01-09 20:51 UTC (permalink / raw)
  To: u-boot

Hello Heiko Schocher,

Sorry, I missed this message this morning.

On 01/09/2015 07:37 AM, Heiko Schocher wrote:
> Hello Przemyslaw Marczak,
>
> Am 08.01.2015 12:33, schrieb Przemyslaw Marczak:
>> 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.
>
> Hmm... so this is just a patch for test purposes not for mainline?
>

This patch is for the mainline, but I left the "if 0" just for the 
developers, who want to port the required i2c drivers. I will remove the 
"if 0".
There are some i2c drivers for Exynos based boards, which should be 
ported to the new i2c api.

At present I'm not able to do this at once and as I know someone needs 
the i2c driver for the present work. I required the i2c bus driver for 
the pmic framework, on which now I'm working.

>> Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
>> Cc: Akshay Saraswat <akshay.s@samsung.com>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Minkyu Kang <mk7.kang@samsung.com>
>> ---
>>   include/configs/exynos5-common.h | 29 ++++++++++++++++++-----------
>>   1 file changed, 18 insertions(+), 11 deletions(-)
>>
>> diff --git a/include/configs/exynos5-common.h
>> b/include/configs/exynos5-common.h
>> index ad63f3c..b7af8a5 100644
>> --- a/include/configs/exynos5-common.h
>> +++ b/include/configs/exynos5-common.h
>> @@ -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
>> @@ -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 */
>> +#define CONFIG_DM_I2C
>> +#endif
>
> Hmm.. no, please no dead code in mainline ... maybe you
> enable "CONFIG_DM_I2C" if "CONFIG_DM" is set?
>
> bye,
> Heiko
>

Yes, will be removed. I can't use the CONFIG_DM because of the rest of 
the i2c drivers, which are waiting for the adjust to new i2c api.

>>   #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
>>
>

Also I'm not going to move the current pmic framework/drivers to the new 
i2c api, since I hope to send the new framework soon.

Thank you and best regards,
-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support
  2015-01-09  9:21 [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support Akshay Saraswat
@ 2015-01-12  9:19 ` Przemyslaw Marczak
  2015-01-12  9:28   ` Przemyslaw Marczak
  0 siblings, 1 reply; 8+ messages in thread
From: Przemyslaw Marczak @ 2015-01-12  9:19 UTC (permalink / raw)
  To: u-boot

Hello Akshay,

On 01/09/2015 10:21 AM, Akshay Saraswat wrote:
> Hi Przemyslaw,
>
>> 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 <p.marczak@samsung.com>
>> Cc: Akshay Saraswat <akshay.s@samsung.com>
>> Cc: Simon Glass <sjg@chromium.org>
>> Cc: Minkyu Kang <mk7.kang@samsung.com>
>> ---
>> include/configs/exynos5-common.h | 29 ++++++++++++++++++-----------
>> 1 file changed, 18 insertions(+), 11 deletions(-)
>>
>> diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
>> index ad63f3c..b7af8a5 100644
>> --- a/include/configs/exynos5-common.h
>> +++ b/include/configs/exynos5-common.h
>> @@ -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
>> @@ -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.
>
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>.

>> +#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
>> --
>> 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,
-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support
  2015-01-12  9:19 ` Przemyslaw Marczak
@ 2015-01-12  9:28   ` Przemyslaw Marczak
  0 siblings, 0 replies; 8+ messages in thread
From: Przemyslaw Marczak @ 2015-01-12  9:28 UTC (permalink / raw)
  To: u-boot

+ fixed address to Sjoerd Simons.

On 01/12/2015 10:19 AM, Przemyslaw Marczak wrote:
> Hello Akshay,
>
> On 01/09/2015 10:21 AM, Akshay Saraswat wrote:
>> Hi Przemyslaw,
>>
>>> 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 <p.marczak@samsung.com>
>>> Cc: Akshay Saraswat <akshay.s@samsung.com>
>>> Cc: Simon Glass <sjg@chromium.org>
>>> Cc: Minkyu Kang <mk7.kang@samsung.com>
>>> ---
>>> include/configs/exynos5-common.h | 29 ++++++++++++++++++-----------
>>> 1 file changed, 18 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/include/configs/exynos5-common.h
>>> b/include/configs/exynos5-common.h
>>> index ad63f3c..b7af8a5 100644
>>> --- a/include/configs/exynos5-common.h
>>> +++ b/include/configs/exynos5-common.h
>>> @@ -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
>>> @@ -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.
>>
> 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>.
>
>>> +#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
>>> --
>>> 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,

Best regards,
-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support
@ 2015-01-12 10:02 Akshay Saraswat
  0 siblings, 0 replies; 8+ messages in thread
From: Akshay Saraswat @ 2015-01-12 10:02 UTC (permalink / raw)
  To: u-boot

Hi Przemyslaw,

>Hello Akshay,
>
>On 01/09/2015 10:21 AM, Akshay Saraswat wrote:
>> Hi Przemyslaw,
>>
>>> 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 <p.marczak@samsung.com>
>>> Cc: Akshay Saraswat <akshay.s@samsung.com>
>>> Cc: Simon Glass <sjg@chromium.org>
>>> Cc: Minkyu Kang <mk7.kang@samsung.com>
>>> ---
>>> include/configs/exynos5-common.h | 29 ++++++++++++++++++-----------
>>> 1 file changed, 18 insertions(+), 11 deletions(-)
>>>
>>> diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
>>> index ad63f3c..b7af8a5 100644
>>> --- a/include/configs/exynos5-common.h
>>> +++ b/include/configs/exynos5-common.h
>>> @@ -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
>>> @@ -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.
>>
>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>.
>

Yes, you are right, I didn't refer UM. We need only 0-7 for 5250.

>>> +#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
>>> --
>>> 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,
>-- 
>Przemyslaw Marczak
>Samsung R&D Institute Poland
>Samsung Electronics
>p.marczak at samsung.com
 

Regards,
Akshay Saraswat

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-01-12 10:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-09  9:21 [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support Akshay Saraswat
2015-01-12  9:19 ` Przemyslaw Marczak
2015-01-12  9:28   ` Przemyslaw Marczak
  -- strict thread matches above, loose matches on Subject: below --
2015-01-12 10:02 Akshay Saraswat
2015-01-08 11:28 [U-Boot] [PATCH 00/18] Exynos: move i2c driver to dm api Przemyslaw Marczak
2015-01-08 11:33 ` [U-Boot] [PATCH 01/18] arndale: config: disable max77686 support Przemyslaw Marczak
2015-01-08 11:33   ` [U-Boot] [PATCH 08/18] exynos5: config: prepare for dm i2c support Przemyslaw Marczak
2015-01-08 14:11     ` Minkyu Kang
2015-01-09  6:37     ` Heiko Schocher
2015-01-09 20:51       ` Przemyslaw Marczak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox