ARM: S5PC210: I2C devices updates
Subsystems (3)
PATCH v2 1/1 ARM: S5PC210: I2C devices updates
Hello,
This is an updated version of I2C patches posted by Kyungmin Park in '[PATCH 0/7] ARM: S5PC210: I2C devices support and Universal board updates' thread.
All issues related to i2c device definitions reported by Kukjin Kim have been fixed. We also merged some of the patches together to avoid build breaks.
Best regards
Signature · 45 lines
Marek Szyprowski
Samsung Poland R&D Center
---
Patch summary:
Kyungmin Park (3):
ARM: S5PC110: Fix wrong interrupt I2C2 and I2C3 number
ARM: S5PC210: Define address & interrupt for all I2C blocks
ARM: S5PC210: add I2C{3, 4, 5, 6, 7} device support
arch/arm/mach-s5pv210/include/mach/irqs.h | 4 +-
arch/arm/mach-s5pv310/Kconfig | 25 +++++++++++
arch/arm/mach-s5pv310/Makefile | 5 ++
arch/arm/mach-s5pv310/include/mach/irqs.h | 7 +++
arch/arm/mach-s5pv310/include/mach/map.h | 11 ++++-
arch/arm/mach-s5pv310/setup-i2c3.c | 25 +++++++++++
arch/arm/mach-s5pv310/setup-i2c4.c | 25 +++++++++++
arch/arm/mach-s5pv310/setup-i2c5.c | 25 +++++++++++
arch/arm/mach-s5pv310/setup-i2c6.c | 25 +++++++++++
arch/arm/mach-s5pv310/setup-i2c7.c | 25 +++++++++++
arch/arm/plat-samsung/Kconfig | 25 +++++++++++
arch/arm/plat-samsung/Makefile | 5 ++
arch/arm/plat-samsung/dev-i2c2.c | 4 +-
arch/arm/plat-samsung/dev-i2c3.c | 68 +++++++++++++++++++++++++++++
arch/arm/plat-samsung/dev-i2c4.c | 68 +++++++++++++++++++++++++++++
arch/arm/plat-samsung/dev-i2c5.c | 68 +++++++++++++++++++++++++++++
arch/arm/plat-samsung/dev-i2c6.c | 68 +++++++++++++++++++++++++++++
arch/arm/plat-samsung/dev-i2c7.c | 68 +++++++++++++++++++++++++++++
arch/arm/plat-samsung/include/plat/iic.h | 5 ++
19 files changed, 550 insertions(+), 6 deletions(-)
create mode 100644 arch/arm/mach-s5pv310/setup-i2c3.c
create mode 100644 arch/arm/mach-s5pv310/setup-i2c4.c
create mode 100644 arch/arm/mach-s5pv310/setup-i2c5.c
create mode 100644 arch/arm/mach-s5pv310/setup-i2c6.c
create mode 100644 arch/arm/mach-s5pv310/setup-i2c7.c
create mode 100644 arch/arm/plat-samsung/dev-i2c3.c
create mode 100644 arch/arm/plat-samsung/dev-i2c4.c
create mode 100644 arch/arm/plat-samsung/dev-i2c5.c
create mode 100644 arch/arm/plat-samsung/dev-i2c6.c
create mode 100644 arch/arm/plat-samsung/dev-i2c7.c
--
1.7.1.569.g6f426PATCH 1/3 ARM: S5PC110: Fix wrong interrupt I2C2 and I2C3 number
From: Kyungmin Park <[email protected]>
The name of the interrupt should be IIC2 and IIC3 instead of CAN0 and CAN1.
--- arch/arm/mach-s5pv210/include/mach/irqs.h | 4 ++-- arch/arm/plat-samsung/dev-i2c2.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-s5pv210/include/mach/irqs.h +2 -2
@@ -55,8 +55,8 @@#define IRQ_SPI1 S5P_IRQ_VIC1(16)#define IRQ_SPI2 S5P_IRQ_VIC1(17)#define IRQ_IRDA S5P_IRQ_VIC1(18) -#define IRQ_CAN0 S5P_IRQ_VIC1(19) -#define IRQ_CAN1 S5P_IRQ_VIC1(20) +#define IRQ_IIC2 S5P_IRQ_VIC1(19) +#define IRQ_IIC3 S5P_IRQ_VIC1(20)#define IRQ_HSIRX S5P_IRQ_VIC1(21)#define IRQ_HSITX S5P_IRQ_VIC1(22)#define IRQ_UHOST S5P_IRQ_VIC1(23)
arch/arm/plat-samsung/dev-i2c2.c +2 -2
@@ -32,8 +32,8 @@ static struct resource s3c_i2c_resource[] = { .flags = IORESOURCE_MEM, }, [1] = { - .start = IRQ_CAN0, - .end = IRQ_CAN0, + .start = IRQ_IIC2, + .end = IRQ_IIC2, .flags = IORESOURCE_IRQ, }, };
Signature · 1 line
1.7.1.569.g6f426
PATCH 2/3 ARM: S5PC210: Define address & interrupt for all I2C blocks
In reply to Marek SzyprowskiFrom: Kyungmin Park <[email protected]>
S5PC210 supports total 8 (+ 1 dedicated for HDMI) I2C devices.
--- arch/arm/mach-s5pv310/include/mach/irqs.h | 7 +++++++ arch/arm/mach-s5pv310/include/mach/map.h | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-)
arch/arm/mach-s5pv310/include/mach/irqs.h +7 -0
@@ -70,6 +70,13 @@#define IRQ_UART4 COMBINER_IRQ(26, 4)#define IRQ_IIC COMBINER_IRQ(27, 0) +#define IRQ_IIC1 COMBINER_IRQ(27, 1) +#define IRQ_IIC2 COMBINER_IRQ(27, 2) +#define IRQ_IIC3 COMBINER_IRQ(27, 3) +#define IRQ_IIC4 COMBINER_IRQ(27, 4) +#define IRQ_IIC5 COMBINER_IRQ(27, 5) +#define IRQ_IIC6 COMBINER_IRQ(27, 6) +#define IRQ_IIC7 COMBINER_IRQ(27, 7)#define IRQ_HSMMC0 COMBINER_IRQ(29, 0)#define IRQ_HSMMC1 COMBINER_IRQ(29, 1)
arch/arm/mach-s5pv310/include/mach/map.h +9 -2
@@ -69,7 +69,7 @@#define S5P_SZ_UART SZ_256 -#define S5PV310_PA_IIC0 (0x13860000) +#define S5PV310_PA_IIC (x) (0x13860000 + ((x) * 0x10000))#define S5PV310_PA_TIMER (0x139D0000)#define S5P_PA_TIMER S5PV310_PA_TIMER
@@ -83,7 +83,14 @@#define S3C_PA_HSMMC1 S5PV310_PA_HSMMC(1)#define S3C_PA_HSMMC2 S5PV310_PA_HSMMC(2)#define S3C_PA_HSMMC3 S5PV310_PA_HSMMC(3) -#define S3C_PA_IIC S5PV310_PA_IIC0 +#define S3C_PA_IIC S5PV310_PA_IIC(0) +#define S3C_PA_IIC1 S5PV310_PA_IIC(1) +#define S3C_PA_IIC2 S5PV310_PA_IIC(2) +#define S3C_PA_IIC3 S5PV310_PA_IIC(3) +#define S3C_PA_IIC4 S5PV310_PA_IIC(4) +#define S3C_PA_IIC5 S5PV310_PA_IIC(5) +#define S3C_PA_IIC6 S5PV310_PA_IIC(6) +#define S3C_PA_IIC7 S5PV310_PA_IIC(7)#define S3C_PA_RTC S5PV310_PA_RTC#define S3C_PA_WDT S5PV310_PA_WATCHDOG
Signature · 1 line
1.7.1.569.g6f426
PATCH 3/3 ARM: S5PC210: add I2C{3, 4, 5, 6, 7} device support
In reply to Marek SzyprowskiFrom: Kyungmin Park <[email protected]>
S5PC210 support more I2C devices than previous SoCs. Add the device support code for them.
--- arch/arm/mach-s5pv310/Kconfig | 25 +++++++++++ arch/arm/mach-s5pv310/Makefile | 5 ++ arch/arm/mach-s5pv310/setup-i2c3.c | 25 +++++++++++ arch/arm/mach-s5pv310/setup-i2c4.c | 25 +++++++++++ arch/arm/mach-s5pv310/setup-i2c5.c | 25 +++++++++++ arch/arm/mach-s5pv310/setup-i2c6.c | 25 +++++++++++ arch/arm/mach-s5pv310/setup-i2c7.c | 25 +++++++++++ arch/arm/plat-samsung/Kconfig | 25 +++++++++++ arch/arm/plat-samsung/Makefile | 5 ++ arch/arm/plat-samsung/dev-i2c3.c | 68 ++++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c4.c | 68 ++++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c5.c | 68 ++++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c6.c | 68 ++++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c7.c | 68 ++++++++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/iic.h | 5 ++ 15 files changed, 530 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pv310/setup-i2c3.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c4.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c5.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c6.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c7.c create mode 100644 arch/arm/plat-samsung/dev-i2c3.c create mode 100644 arch/arm/plat-samsung/dev-i2c4.c create mode 100644 arch/arm/plat-samsung/dev-i2c5.c create mode 100644 arch/arm/plat-samsung/dev-i2c6.c create mode 100644 arch/arm/plat-samsung/dev-i2c7.c
arch/arm/mach-s5pv310/Kconfig +25 -0
@@ -24,6 +24,31 @@ config S5PV310_SETUP_I2C2 help Common setup code for i2c bus 2. +config S5PV310_SETUP_I2C3 + bool + help + Common setup code for i2c bus 3. + +config S5PV310_SETUP_I2C4 + bool + help + Common setup code for i2c bus 4. + +config S5PV310_SETUP_I2C5 + bool + help + Common setup code for i2c bus 5. + +config S5PV310_SETUP_I2C6 + bool + help + Common setup code for i2c bus 6. + +config S5PV310_SETUP_I2C7 + bool + help + Common setup code for i2c bus 7. + # machine support menu "S5PC210 Machines"
arch/arm/mach-s5pv310/Makefile +5 -0
@@ -30,3 +30,8 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o obj-$(CONFIG_S5PV310_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S5PV310_SETUP_I2C2) += setup-i2c2.o +obj-$(CONFIG_S5PV310_SETUP_I2C3) += setup-i2c3.o +obj-$(CONFIG_S5PV310_SETUP_I2C4) += setup-i2c4.o +obj-$(CONFIG_S5PV310_SETUP_I2C5) += setup-i2c5.o +obj-$(CONFIG_S5PV310_SETUP_I2C6) += setup-i2c6.o +obj-$(CONFIG_S5PV310_SETUP_I2C7) += setup-i2c7.o
arch/arm/mach-s5pv310/setup-i2c3.c new file +25 -0
@@ -0,0 +1,25 @@ +/* +* linux/arch/arm/mach-s5pv310/setup-i2c3.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* +* I2C3 GPIO configuration. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +struct platform_device ;/* don't need the contents */ + +#include <linux/gpio.h> +#include <plat/iic.h> +#include <plat/gpio-cfg.h> + +void s3c_i2c3_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgpin (S5PV310_GPA1 (2 ),S3C_GPIO_SFN (3 )); +s3c_gpio_setpull (S5PV310_GPA1 (2 ),S3C_GPIO_PULL_UP ); +s3c_gpio_cfgpin (S5PV310_GPA1 (3 ),S3C_GPIO_SFN (3 )); +s3c_gpio_setpull (S5PV310_GPA1 (3 ),S3C_GPIO_PULL_UP ); +}
arch/arm/mach-s5pv310/setup-i2c4.c new file +25 -0
@@ -0,0 +1,25 @@ +/* +* linux/arch/arm/mach-s5pv310/setup-i2c4.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* +* I2C4 GPIO configuration. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +struct platform_device ;/* don't need the contents */ + +#include <linux/gpio.h> +#include <plat/iic.h> +#include <plat/gpio-cfg.h> + +void s3c_i2c4_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgpin (S5PV310_GPB (0 ),S3C_GPIO_SFN (3 )); +s3c_gpio_setpull (S5PV310_GPB (0 ),S3C_GPIO_PULL_UP ); +s3c_gpio_cfgpin (S5PV310_GPB (1 ),S3C_GPIO_SFN (3 )); +s3c_gpio_setpull (S5PV310_GPB (1 ),S3C_GPIO_PULL_UP ); +}
arch/arm/mach-s5pv310/setup-i2c5.c new file +25 -0
@@ -0,0 +1,25 @@ +/* +* linux/arch/arm/mach-s5pv310/setup-i2c5.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* +* I2C5 GPIO configuration. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +struct platform_device ;/* don't need the contents */ + +#include <linux/gpio.h> +#include <plat/iic.h> +#include <plat/gpio-cfg.h> + +void s3c_i2c5_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgpin (S5PV310_GPB (6 ),S3C_GPIO_SFN (3 )); +s3c_gpio_setpull (S5PV310_GPB (6 ),S3C_GPIO_PULL_UP ); +s3c_gpio_cfgpin (S5PV310_GPB (7 ),S3C_GPIO_SFN (3 )); +s3c_gpio_setpull (S5PV310_GPB (7 ),S3C_GPIO_PULL_UP ); +}
arch/arm/mach-s5pv310/setup-i2c6.c new file +25 -0
@@ -0,0 +1,25 @@ +/* +* linux/arch/arm/mach-s5pv310/setup-i2c6.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* +* I2C6 GPIO configuration. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +struct platform_device ;/* don't need the contents */ + +#include <linux/gpio.h> +#include <plat/iic.h> +#include <plat/gpio-cfg.h> + +void s3c_i2c6_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgpin (S5PV310_GPC1 (3 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S5PV310_GPC1 (3 ),S3C_GPIO_PULL_UP ); +s3c_gpio_cfgpin (S5PV310_GPC1 (4 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S5PV310_GPC1 (4 ),S3C_GPIO_PULL_UP ); +}
arch/arm/mach-s5pv310/setup-i2c7.c new file +25 -0
@@ -0,0 +1,25 @@ +/* +* linux/arch/arm/mach-s5pv310/setup-i2c7.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* +* I2C7 GPIO configuration. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +struct platform_device ;/* don't need the contents */ + +#include <linux/gpio.h> +#include <plat/iic.h> +#include <plat/gpio-cfg.h> + +void s3c_i2c7_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgpin (S5PV310_GPD0 (2 ),S3C_GPIO_SFN (3 )); +s3c_gpio_setpull (S5PV310_GPD0 (2 ),S3C_GPIO_PULL_UP ); +s3c_gpio_cfgpin (S5PV310_GPD0 (3 ),S3C_GPIO_SFN (3 )); +s3c_gpio_setpull (S5PV310_GPD0 (3 ),S3C_GPIO_PULL_UP ); +}
arch/arm/plat-samsung/Kconfig +25 -0
@@ -180,6 +180,31 @@ config S3C_DEV_I2C2 help Compile in platform device definitions for I2C channel 2 +config S3C_DEV_I2C3 + bool + help + Compile in platform device definition for I2C controller 3 + +config S3C_DEV_I2C4 + bool + help + Compile in platform device definition for I2C controller 4 + +config S3C_DEV_I2C5 + bool + help + Compile in platform device definition for I2C controller 5 + +config S3C_DEV_I2C6 + bool + help + Compile in platform device definition for I2C controller 6 + +config S3C_DEV_I2C7 + bool + help + Compile in platform device definition for I2C controller 7 + config S3C_DEV_FB bool help
arch/arm/plat-samsung/Makefile +5 -0
@@ -40,6 +40,11 @@ obj-$(CONFIG_S3C_DEV_HWMON) += dev-hwmon.o obj-y += dev-i2c0.o obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o obj-$(CONFIG_S3C_DEV_I2C2) += dev-i2c2.o +obj-$(CONFIG_S3C_DEV_I2C3) += dev-i2c3.o +obj-$(CONFIG_S3C_DEV_I2C4) += dev-i2c4.o +obj-$(CONFIG_S3C_DEV_I2C5) += dev-i2c5.o +obj-$(CONFIG_S3C_DEV_I2C6) += dev-i2c6.o +obj-$(CONFIG_S3C_DEV_I2C7) += dev-i2c7.o obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o obj-y += dev-uart.o obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
arch/arm/plat-samsung/dev-i2c3.c new file +68 -0
68 lines not on this page · raw message
arch/arm/plat-samsung/dev-i2c4.c new file +68 -0
68 lines not on this page · raw message
arch/arm/plat-samsung/dev-i2c5.c new file +68 -0
68 lines not on this page · raw message
arch/arm/plat-samsung/dev-i2c6.c new file +68 -0
68 lines not on this page · raw message
arch/arm/plat-samsung/dev-i2c7.c new file +68 -0
68 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/iic.h +5 -0
@@ -60,5 +60,10 @@ extern void s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *i2c);extern void s3c_i2c0_cfg_gpio (struct platform_device *dev);extern void s3c_i2c1_cfg_gpio (struct platform_device *dev);extern void s3c_i2c2_cfg_gpio (struct platform_device *dev); +extern void s3c_i2c3_cfg_gpio (struct platform_device *dev); +extern void s3c_i2c4_cfg_gpio (struct platform_device *dev); +extern void s3c_i2c5_cfg_gpio (struct platform_device *dev); +extern void s3c_i2c6_cfg_gpio (struct platform_device *dev); +extern void s3c_i2c7_cfg_gpio (struct platform_device *dev);#endif /* __ASM_ARCH_IIC_H */
Signature · 1 line
1.7.1.569.g6f426
PATCH v3 1/1 ARM: S5PV310: Add I2C channel 3, 4, 5, 6, and 7 device support
S5PV310 and S5PC210 support more I2C devices than previous SoCs. Add the device support code for them.
---
Changes since V2:
- removed some s5p reference leftovers from V1
- adapted setup-i2cX.c to use s3c_gpio_cfgall_range()
- added missing entries in plat-samsung/include/plat/devs.h
- added missing 'select HAVE_S3C2410_I2C' in KConfig
--- arch/arm/Kconfig | 1 + arch/arm/mach-s5pv310/Kconfig | 25 +++++++++++ arch/arm/mach-s5pv310/Makefile | 5 ++ arch/arm/mach-s5pv310/setup-i2c3.c | 23 ++++++++++ arch/arm/mach-s5pv310/setup-i2c4.c | 23 ++++++++++ arch/arm/mach-s5pv310/setup-i2c5.c | 23 ++++++++++ arch/arm/mach-s5pv310/setup-i2c6.c | 23 ++++++++++ arch/arm/mach-s5pv310/setup-i2c7.c | 23 ++++++++++ arch/arm/plat-samsung/Kconfig | 25 +++++++++++ arch/arm/plat-samsung/Makefile | 5 ++ arch/arm/plat-samsung/dev-i2c3.c | 68 +++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c4.c | 68 +++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c5.c | 68 +++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c6.c | 68 +++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c7.c | 68 +++++++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 5 ++ arch/arm/plat-samsung/include/plat/iic.h | 10 ++++ 17 files changed, 531 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pv310/setup-i2c3.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c4.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c5.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c6.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c7.c create mode 100644 arch/arm/plat-samsung/dev-i2c3.c create mode 100644 arch/arm/plat-samsung/dev-i2c4.c create mode 100644 arch/arm/plat-samsung/dev-i2c5.c create mode 100644 arch/arm/plat-samsung/dev-i2c6.c create mode 100644 arch/arm/plat-samsung/dev-i2c7.c
arch/arm/Kconfig +1 -0
@@ -737,6 +737,7 @@ config ARCH_S5PV310 select ARCH_HAS_CPUFREQ select GENERIC_CLOCKEVENTS select HAVE_S3C_RTC + select HAVE_S3C2410_I2C select HAVE_S3C2410_WATCHDOG help Samsung S5PV310 series based systems
arch/arm/mach-s5pv310/Kconfig +25 -0
@@ -24,6 +24,31 @@ config S5PV310_SETUP_I2C2 help Common setup code for i2c bus 2. +config S5PV310_SETUP_I2C3 + bool + help + Common setup code for i2c bus 3. + +config S5PV310_SETUP_I2C4 + bool + help + Common setup code for i2c bus 4. + +config S5PV310_SETUP_I2C5 + bool + help + Common setup code for i2c bus 5. + +config S5PV310_SETUP_I2C6 + bool + help + Common setup code for i2c bus 6. + +config S5PV310_SETUP_I2C7 + bool + help + Common setup code for i2c bus 7. + config S5PV310_SETUP_SDHCI bool select S5PV310_SETUP_SDHCI_GPIO
arch/arm/mach-s5pv310/Makefile +5 -0
@@ -30,5 +30,10 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o obj-$(CONFIG_S5PV310_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S5PV310_SETUP_I2C2) += setup-i2c2.o +obj-$(CONFIG_S5PV310_SETUP_I2C3) += setup-i2c3.o +obj-$(CONFIG_S5PV310_SETUP_I2C4) += setup-i2c4.o +obj-$(CONFIG_S5PV310_SETUP_I2C5) += setup-i2c5.o +obj-$(CONFIG_S5PV310_SETUP_I2C6) += setup-i2c6.o +obj-$(CONFIG_S5PV310_SETUP_I2C7) += setup-i2c7.o obj-$(CONFIG_S5PV310_SETUP_SDHCI) += setup-sdhci.o obj-$(CONFIG_S5PV310_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
arch/arm/mach-s5pv310/setup-i2c3.c new file +23 -0
@@ -0,0 +1,23 @@ +/* +* linux/arch/arm/mach-s5pv310/setup-i2c3.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* +* I2C3 GPIO configuration. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +struct platform_device ;/* don't need the contents */ + +#include <linux/gpio.h> +#include <plat/iic.h> +#include <plat/gpio-cfg.h> + +void s3c_i2c3_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgall_range (S5PV310_GPA1 (2 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +}
arch/arm/mach-s5pv310/setup-i2c4.c new file +23 -0
@@ -0,0 +1,23 @@ +/* +* linux/arch/arm/mach-s5pv310/setup-i2c4.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* +* I2C4 GPIO configuration. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +struct platform_device ;/* don't need the contents */ + +#include <linux/gpio.h> +#include <plat/iic.h> +#include <plat/gpio-cfg.h> + +void s3c_i2c4_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgall_range (S5PV310_GPB (2 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +}
arch/arm/mach-s5pv310/setup-i2c5.c new file +23 -0
@@ -0,0 +1,23 @@ +/* +* linux/arch/arm/mach-s5pv310/setup-i2c5.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* +* I2C5 GPIO configuration. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +struct platform_device ;/* don't need the contents */ + +#include <linux/gpio.h> +#include <plat/iic.h> +#include <plat/gpio-cfg.h> + +void s3c_i2c5_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgall_range (S5PV310_GPB (6 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +}
arch/arm/mach-s5pv310/setup-i2c6.c new file +23 -0
@@ -0,0 +1,23 @@ +/* +* linux/arch/arm/mach-s5pv310/setup-i2c6.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* +* I2C6 GPIO configuration. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +struct platform_device ;/* don't need the contents */ + +#include <linux/gpio.h> +#include <plat/iic.h> +#include <plat/gpio-cfg.h> + +void s3c_i2c6_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgall_range (S5PV310_GPC1 (3 ),2 , +S3C_GPIO_SFN (4 ),S3C_GPIO_PULL_UP ); +}
arch/arm/mach-s5pv310/setup-i2c7.c new file +23 -0
@@ -0,0 +1,23 @@ +/* +* linux/arch/arm/mach-s5pv310/setup-i2c7.c +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* +* I2C7 GPIO configuration. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +struct platform_device ;/* don't need the contents */ + +#include <linux/gpio.h> +#include <plat/iic.h> +#include <plat/gpio-cfg.h> + +void s3c_i2c7_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgall_range (S5PV310_GPD0 (2 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP ); +}
arch/arm/plat-samsung/Kconfig +25 -0
@@ -180,6 +180,31 @@ config S3C_DEV_I2C2 help Compile in platform device definitions for I2C channel 2 +config S3C_DEV_I2C3 + bool + help + Compile in platform device definition for I2C controller 3 + +config S3C_DEV_I2C4 + bool + help + Compile in platform device definition for I2C controller 4 + +config S3C_DEV_I2C5 + bool + help + Compile in platform device definition for I2C controller 5 + +config S3C_DEV_I2C6 + bool + help + Compile in platform device definition for I2C controller 6 + +config S3C_DEV_I2C7 + bool + help + Compile in platform device definition for I2C controller 7 + config S3C_DEV_FB bool help
arch/arm/plat-samsung/Makefile +5 -0
@@ -40,6 +40,11 @@ obj-$(CONFIG_S3C_DEV_HWMON) += dev-hwmon.o obj-y += dev-i2c0.o obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o obj-$(CONFIG_S3C_DEV_I2C2) += dev-i2c2.o +obj-$(CONFIG_S3C_DEV_I2C3) += dev-i2c3.o +obj-$(CONFIG_S3C_DEV_I2C4) += dev-i2c4.o +obj-$(CONFIG_S3C_DEV_I2C5) += dev-i2c5.o +obj-$(CONFIG_S3C_DEV_I2C6) += dev-i2c6.o +obj-$(CONFIG_S3C_DEV_I2C7) += dev-i2c7.o obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o obj-y += dev-uart.o obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
arch/arm/plat-samsung/dev-i2c3.c new file +68 -0
68 lines not on this page · raw message
arch/arm/plat-samsung/dev-i2c4.c new file +68 -0
68 lines not on this page · raw message
arch/arm/plat-samsung/dev-i2c5.c new file +68 -0
68 lines not on this page · raw message
arch/arm/plat-samsung/dev-i2c6.c new file +68 -0
68 lines not on this page · raw message
arch/arm/plat-samsung/dev-i2c7.c new file +68 -0
68 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/devs.h +5 -0
@@ -46,6 +46,11 @@ extern struct platform_device s3c_device_wdt;extern struct platform_device s3c_device_i2c0;extern struct platform_device s3c_device_i2c1;extern struct platform_device s3c_device_i2c2; +extern struct platform_device s3c_device_i2c3; +extern struct platform_device s3c_device_i2c4; +extern struct platform_device s3c_device_i2c5; +extern struct platform_device s3c_device_i2c6; +extern struct platform_device s3c_device_i2c7;extern struct platform_device s3c_device_rtc;extern struct platform_device s3c_device_adc;extern struct platform_device s3c_device_sdi;
arch/arm/plat-samsung/include/plat/iic.h +10 -0
@@ -55,10 +55,20 @@ struct s3c2410_platform_i2c {extern void s3c_i2c0_set_platdata (struct s3c2410_platform_i2c *i2c);extern void s3c_i2c1_set_platdata (struct s3c2410_platform_i2c *i2c);extern void s3c_i2c2_set_platdata (struct s3c2410_platform_i2c *i2c); +extern void s3c_i2c3_set_platdata (struct s3c2410_platform_i2c *i2c); +extern void s3c_i2c4_set_platdata (struct s3c2410_platform_i2c *i2c); +extern void s3c_i2c5_set_platdata (struct s3c2410_platform_i2c *i2c); +extern void s3c_i2c6_set_platdata (struct s3c2410_platform_i2c *i2c); +extern void s3c_i2c7_set_platdata (struct s3c2410_platform_i2c *i2c);/* defined by architecture to configure gpio */ extern void s3c_i2c0_cfg_gpio (struct platform_device *dev);extern void s3c_i2c1_cfg_gpio (struct platform_device *dev);extern void s3c_i2c2_cfg_gpio (struct platform_device *dev); +extern void s3c_i2c3_cfg_gpio (struct platform_device *dev); +extern void s3c_i2c4_cfg_gpio (struct platform_device *dev); +extern void s3c_i2c5_cfg_gpio (struct platform_device *dev); +extern void s3c_i2c6_cfg_gpio (struct platform_device *dev); +extern void s3c_i2c7_cfg_gpio (struct platform_device *dev);#endif /* __ASM_ARCH_IIC_H */
Signature · 1 line
1.7.1.569.g6f426
PATCH v3 1/1 ARM: S5PV310: Add I2C channel 3, 4, 5, 6, and 7 device support
Quoted 7 lines · Marek Szyprowski
S5PV310 and S5PC210 support more I2C devices than previous SoCs. Add the device support code for them.
Signed-off-by Kyungmin Park <[email protected]>Signed-off-by Marek Szyprowski <[email protected]>Signed-off-by Kukjin Kim <[email protected]>
Quoted 8 lines
---
Changes since V2:
- removed some s5p reference leftovers from V1
- adaptedsetup-i2cX.cto uses3c_gpio_cfgall_range()
- added missing entries inplat-samsung/include/plat/devs.h
- added missing 'selectHAVE_S3C2410_I2C' in KConfig
Hi, Marek
Thanks for your update.
(snip)
arch/arm/mach-s5pv310/setup-i2c4.c line 22
Quoted 4 lines
arch/arm/mach-s5pv310/setup-i2c4.c new file +4
-0+void s3c_i2c4_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgall_range (S5PV310_GPB (2 ),2 , +S3C_GPIO_SFN (3 ),S3C_GPIO_PULL_UP );
Following is from your previous patch.
void s3c_i2c4_cfg_gpio(struct platform_device *dev)
{
s3c_gpio_cfgpin(S5PV310_GPB(0), S3C_GPIO_SFN(3));
s3c_gpio_setpull(S5PV310_GPB(0), S3C_GPIO_PULL_UP);
s3c_gpio_cfgpin(S5PV310_GPB(1), S3C_GPIO_SFN(3));
s3c_gpio_setpull(S5PV310_GPB(1), S3C_GPIO_PULL_UP);
}So...should be...s3c_gpio_cfgall_range(S5PV310_GPB(0), 2, S3C_GPIO_SFN(3), S3C_GPIO_PULL_UP);
will fix it myself :-)
(snip)
others, ok to me...will apply.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH v2 1/1 ARM: S5PC210: I2C devices updates
In reply to Marek SzyprowskiQuoted 61 lines · Marek Szyprowski
Hello,
This is an updated version of I2C patches posted by Kyungmin Park in '[PATCH 0/7] ARM: S5PC210: I2C devices support and Universal board updates' thread.
All issues related to i2c device definitions reported by Kukjin Kim have been fixed. We also merged some of the patches together to avoid build breaks.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center---
Patch summary:
Kyungmin Park (3):
ARM: S5PC110: Fix wrong interrupt I2C2 and I2C3 number
ARM: S5PC210: Define address & interrupt for all I2C blocks
ARM: S5PC210: add I2C{3, 4, 5, 6, 7} device supportarch/arm/mach-s5pv210/include/mach/irqs.h | 4 +- arch/arm/mach-s5pv310/Kconfig | 25 +++++++++++ arch/arm/mach-s5pv310/Makefile | 5 ++ arch/arm/mach-s5pv310/include/mach/irqs.h | 7 +++ arch/arm/mach-s5pv310/include/mach/map.h | 11 ++++- arch/arm/mach-s5pv310/setup-i2c3.c | 25 +++++++++++ arch/arm/mach-s5pv310/setup-i2c4.c | 25 +++++++++++ arch/arm/mach-s5pv310/setup-i2c5.c | 25 +++++++++++ arch/arm/mach-s5pv310/setup-i2c6.c | 25 +++++++++++ arch/arm/mach-s5pv310/setup-i2c7.c | 25 +++++++++++ arch/arm/plat-samsung/Kconfig | 25 +++++++++++ arch/arm/plat-samsung/Makefile | 5 ++ arch/arm/plat-samsung/dev-i2c2.c | 4 +- arch/arm/plat-samsung/dev-i2c3.c | 68 +++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c4.c | 68 +++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c5.c | 68 +++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c6.c | 68 +++++++++++++++++++++++++++++ arch/arm/plat-samsung/dev-i2c7.c | 68 +++++++++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/iic.h | 5 ++ 19 files changed, 550 insertions(+), 6 deletions(-) create mode 100644 arch/arm/mach-s5pv310/setup-i2c3.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c4.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c5.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c6.c create mode 100644 arch/arm/mach-s5pv310/setup-i2c7.c create mode 100644 arch/arm/plat-samsung/dev-i2c3.c create mode 100644 arch/arm/plat-samsung/dev-i2c4.c create mode 100644 arch/arm/plat-samsung/dev-i2c5.c create mode 100644 arch/arm/plat-samsung/dev-i2c6.c create mode 100644 arch/arm/plat-samsung/dev-i2c7.c
Quoted 1 line
--
Ok...will apply...but we need to sort out this next time. And need to change C100 IRQ names...will submit it myself.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.