All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/18] Exynos: move i2c driver to dm api
@ 2015-01-08 11:28 Przemyslaw Marczak
  2015-01-08 11:33 ` [U-Boot] [PATCH 01/18] arndale: config: disable max77686 support Przemyslaw Marczak
                   ` (2 more replies)
  0 siblings, 3 replies; 92+ messages in thread
From: Przemyslaw Marczak @ 2015-01-08 11:28 UTC (permalink / raw)
  To: u-boot

This patchset adds support to driver model i2c api for Exynos i2c driver.
Few boards are using this driver, but the board peripherals are not ported to
the new api yet. So this can't be enabled with the full board functionality.

In this case each Exynos5 based boards have fixed config dependencies for
testing the dm i2c api with the new i2c driver. This will facilitate
the peripheral porting.

For test, just enable CONFIG_DM_I2C in exynos5-common.h. The i2c command
should work with this as previous.

This patchset also provides some changes related to Exynos4 boards.
Most Exynos4 boards requires only pmic support, and this will be done
with the new pmic framework soon.

Przemyslaw Marczak (18):
  arndale: config: disable max77686 support
  exynos5250: config: disable max77686 driver
  smdk5250: config: enable max77686 driver support
  exynos4: dts: add missing i2c properties
  arndale: dts: add missing i2c aliases
  exynos5: pinmux: check flag for i2c config
  dm: i2c: s3c24x0: adjust to dm-i2c api
  exynos5: config: prepare for dm i2c support
  exynos5250: config: temporary disable sound for dm i2c
  arndale: config: temporary disable pmic for dm i2c
  exynos5-dt: config: temporary disable pmic for dm i2c
  snow: config: temporary disable cros ec i2c for dm i2c
  smdk5250: config: temporary disable pmic for dm i2c
  smdk5420: board: fix build warning for testing dm i2c
  peach-pi: config: temporary disable video parade for dm i2c
  peach-pit: config: temporary disable video parade for dm i2c
  trats2: board: cleanup power init code
  trats2: config: disable i2c peripherals if testing dm i2c

 arch/arm/cpu/armv7/exynos/pinmux.c  |  27 ++--
 arch/arm/dts/exynos4.dtsi           |  24 ++--
 arch/arm/dts/exynos5250-arndale.dts |   8 ++
 board/samsung/smdk5420/smdk5420.c   |   2 +-
 board/samsung/trats2/trats2.c       | 144 +++++++++++---------
 drivers/i2c/s3c24x0_i2c.c           | 254 +++++++++++++++++++++++++++++++-----
 include/configs/arndale.h           |   5 +-
 include/configs/exynos5-common.h    |  29 ++--
 include/configs/exynos5-dt-common.h |   2 +
 include/configs/exynos5250-common.h |   5 +-
 include/configs/peach-pi.h          |   2 +
 include/configs/peach-pit.h         |   2 +
 include/configs/smdk5250.h          |   4 +
 include/configs/snow.h              |   4 +-
 include/configs/trats2.h            |  17 ++-
 15 files changed, 395 insertions(+), 134 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 92+ 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; 92+ 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] 92+ 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; 92+ 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] 92+ messages in thread

end of thread, other threads:[~2015-02-06 21:47 UTC | newest]

Thread overview: 92+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 02/18] exynos5250: config: disable max77686 driver Przemyslaw Marczak
2015-01-27  3:13     ` Simon Glass
2015-01-08 11:33   ` [U-Boot] [PATCH 03/18] smdk5250: config: enable max77686 driver support Przemyslaw Marczak
2015-01-27  3:13     ` Simon Glass
2015-01-08 11:33   ` [U-Boot] [PATCH 04/18] exynos4: dts: add missing i2c properties Przemyslaw Marczak
2015-01-27  3:13     ` Simon Glass
2015-01-08 11:33   ` [U-Boot] [PATCH 05/18] arndale: dts: add missing i2c aliases Przemyslaw Marczak
2015-01-27  3:13     ` Simon Glass
2015-01-08 11:33   ` [U-Boot] [PATCH 06/18] exynos5: pinmux: check flag for i2c config Przemyslaw Marczak
2015-01-27  3:13     ` Simon Glass
2015-01-08 11:33   ` [U-Boot] [PATCH 07/18] dm: i2c: s3c24x0: adjust to dm-i2c api Przemyslaw Marczak
2015-01-09  6:31     ` Heiko Schocher
2015-01-09  8:57       ` Przemyslaw Marczak
2015-01-20  3:18         ` Simon Glass
2015-01-23 15:15           ` 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
2015-01-08 11:33   ` [U-Boot] [PATCH 09/18] exynos5250: config: temporary disable sound for dm i2c Przemyslaw Marczak
2015-01-08 11:33   ` [U-Boot] [PATCH 10/18] arndale: config: temporary disable pmic " Przemyslaw Marczak
2015-01-08 11:33   ` [U-Boot] [PATCH 11/18] exynos5-dt: " Przemyslaw Marczak
2015-01-08 11:33   ` [U-Boot] [PATCH 12/18] snow: config: temporary disable cros ec i2c " Przemyslaw Marczak
2015-01-08 11:33   ` [U-Boot] [PATCH 13/18] smdk5250: config: temporary disable pmic " Przemyslaw Marczak
2015-01-08 11:33   ` [U-Boot] [PATCH 14/18] smdk5420: board: fix build warning for testing " Przemyslaw Marczak
2015-01-08 11:33   ` [U-Boot] [PATCH 15/18] peach-pi: config: temporary disable video parade for " Przemyslaw Marczak
2015-01-08 11:33   ` [U-Boot] [PATCH 16/18] peach-pit: " Przemyslaw Marczak
2015-01-08 11:33   ` [U-Boot] [PATCH 17/18] trats2: board: cleanup power init code Przemyslaw Marczak
2015-01-08 11:33   ` [U-Boot] [PATCH 18/18] trats2: config: disable i2c peripherals if testing dm i2c Przemyslaw Marczak
2015-01-08 14:11     ` Minkyu Kang
2015-01-09  8:49       ` Przemyslaw Marczak
2015-01-27  3:13   ` [U-Boot] [PATCH 01/18] arndale: config: disable max77686 support Simon Glass
2015-01-29 17:33     ` Simon Glass
2015-01-08 12:13 ` [U-Boot] [PATCH 00/18] Exynos: move i2c driver to dm api Przemyslaw Marczak
2015-01-26 15:21 ` [U-Boot] [PATCH v2 00/10] exynos: enable dm i2c Przemyslaw Marczak
2015-01-26 15:21   ` [U-Boot] [PATCH v2 01/10] arndale: config: disable max77686 support Przemyslaw Marczak
2015-01-26 15:21   ` [U-Boot] [PATCH v2 02/10] exynos5250: config: disable max77686 driver Przemyslaw Marczak
2015-01-26 15:21   ` [U-Boot] [PATCH v2 03/10] smdk5250: config: enable max77686 driver support Przemyslaw Marczak
2015-01-26 15:21   ` [U-Boot] [PATCH v2 04/10] exynos4: dts: add missing i2c properties Przemyslaw Marczak
2015-01-26 15:21   ` [U-Boot] [PATCH v2 05/10] arndale: dts: add missing i2c aliases Przemyslaw Marczak
2015-01-26 15:21   ` [U-Boot] [PATCH v2 06/10] exynos5: pinmux: check flag for i2c config Przemyslaw Marczak
2015-01-26 15:21   ` [U-Boot] [PATCH v2 07/10] dm: i2c: s3c24x0: adjust to dm-i2c api Przemyslaw Marczak
2015-01-27  3:13     ` Simon Glass
2015-01-27  8:01       ` Przemyslaw Marczak
2015-01-26 15:21   ` [U-Boot] [PATCH v2 08/10] odroid u3: dts: add missing i2c aliases Przemyslaw Marczak
2015-01-27  3:14     ` Simon Glass
2015-01-26 15:21   ` [U-Boot] [PATCH v2 09/10] odroid u3: enable dm i2c support Przemyslaw Marczak
2015-01-27  3:14     ` Simon Glass
2015-01-26 15:21   ` [U-Boot] [PATCH v2 10/10] exynos5: enable dm i2c Przemyslaw Marczak
2015-01-27  3:14     ` Simon Glass
2015-01-26 15:32   ` [U-Boot] [PATCH v2 00/10] exynos: " Przemyslaw Marczak
2015-01-27 12:36   ` [U-Boot] [PATCH v3 00/12] " Przemyslaw Marczak
2015-01-27 12:36     ` [U-Boot] [PATCH v3 01/12] dm: i2c-uclass-compat: fix missed argument Przemyslaw Marczak
2015-01-27 15:38       ` Simon Glass
2015-01-29 17:32         ` Simon Glass
2015-01-27 12:36     ` [U-Boot] [PATCH v3 02/12] arndale: config: disable max77686 support Przemyslaw Marczak
2015-01-27 12:36     ` [U-Boot] [PATCH v3 03/12] exynos5250: config: disable max77686 driver Przemyslaw Marczak
2015-01-29 17:33       ` Simon Glass
2015-01-27 12:36     ` [U-Boot] [PATCH v3 04/12] smdk5250: config: enable max77686 driver support Przemyslaw Marczak
2015-01-29 17:33       ` Simon Glass
2015-01-27 12:36     ` [U-Boot] [PATCH v3 05/12] exynos4: dts: add missing i2c properties Przemyslaw Marczak
2015-01-29 17:33       ` Simon Glass
2015-01-27 12:36     ` [U-Boot] [PATCH v3 06/12] arndale: dts: add missing i2c aliases Przemyslaw Marczak
2015-01-29 17:34       ` Simon Glass
2015-01-27 12:36     ` [U-Boot] [PATCH v3 07/12] exynos5: pinmux: check flag for i2c config Przemyslaw Marczak
2015-01-27 15:38       ` Simon Glass
2015-01-29 17:34         ` Simon Glass
2015-01-27 12:36     ` [U-Boot] [PATCH v3 08/12] i2c: s3c24x0: reduce transmission status timeout Przemyslaw Marczak
2015-01-27 15:38       ` Simon Glass
2015-01-27 15:44         ` Przemyslaw Marczak
2015-02-06 20:48           ` Simon Glass
2015-02-06 21:47             ` Simon Glass
2015-01-27 12:36     ` [U-Boot] [PATCH v3 09/12] dm: i2c: s3c24x0: adjust to dm-i2c api Przemyslaw Marczak
2015-01-27 15:38       ` Simon Glass
2015-01-29 17:34         ` Simon Glass
2015-01-27 12:36     ` [U-Boot] [PATCH v3 10/12] odroid u3: dts: add missing i2c aliases Przemyslaw Marczak
2015-01-29 17:34       ` Simon Glass
2015-01-27 12:36     ` [U-Boot] [PATCH v3 11/12] odroid u3: enable dm i2c support Przemyslaw Marczak
2015-01-29 17:34       ` Simon Glass
2015-01-27 12:36     ` [U-Boot] [PATCH v3 12/12] exynos5: enable dm i2c Przemyslaw Marczak
2015-01-29 17:35       ` Simon Glass
2015-01-27 12:40     ` [U-Boot] [PATCH v3 00/12] exynos: " Przemyslaw Marczak
2015-01-27 15:38     ` Simon Glass
2015-01-29  0:00       ` Simon Glass
2015-01-29  1:58       ` Minkyu Kang
2015-01-29  2:02         ` Simon Glass
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
2015-01-12 10:02 Akshay Saraswat

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.