ARM: S5PC210: I2C3 support
Subsystems (3)
RFC PATCH 1/1 ARM: S5PC210: I2C3 support
S5PC210 has total 8 I2C devices. It's not easy to use existing i2c device framework since it's designed for the 3 I2Cs at previous samsung socs.
To support 3/4/5/6/7 I2Cs. I created the dev-i2c{3..7} at mach-s5pv310 directory since it's only valid in this cpu.
Signed-off-by Kyungmin Park <[email protected]>
---
arch/arm/mach-s5pv310/Kconfig +5 -0
@@ -25,6 +25,11 @@ 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. + # machine support config MACH_SMDKV310
arch/arm/mach-s5pv310/Makefile +1 -0
@@ -28,3 +28,4 @@ obj-$(CONFIG_MACH_UNIVERSAL) += mach-universal.o obj-$(CONFIG_S5PV310_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S5PV310_SETUP_I2C2) += setup-i2c2.o +obj-$(CONFIG_S5PV310_SETUP_I2C3) += dev-i2c3.o
arch/arm/mach-s5pv310/dev-i2c3.c new file +64 -0
64 lines not on this page · raw message
arch/arm/mach-s5pv310/include/mach/irqs.h +7 -0
@@ -64,6 +64,13 @@#define IRQ_UART3 COMBINER_IRQ(26, 3)#define IRQ_UART4 COMBINER_IRQ(26, 4) +#define IRQ_I2C7 COMBINER_IRQ(27, 7) +#define IRQ_I2C6 COMBINER_IRQ(27, 6) +#define IRQ_I2C5 COMBINER_IRQ(27, 5) +#define IRQ_I2C4 COMBINER_IRQ(27, 4) +#define IRQ_I2C3 COMBINER_IRQ(27, 3) +#define IRQ_IIC2 COMBINER_IRQ(27, 2) +#define IRQ_IIC1 COMBINER_IRQ(27, 1)#define IRQ_IIC COMBINER_IRQ(27, 0)/* Set the default NR_IRQS */
arch/arm/mach-s5pv310/include/mach/map.h +11 -2
@@ -55,7 +55,16 @@#define S5P_SZ_UART SZ_256 -#define S5PV310_PA_IIC0 (0x13860000) +#define S5PV310_PA_I2C (0x13860000) +#define S5P_PA_I2C (x) (S5PV310_PA_I2C + ((x) * 0x10000)) +#define S5PV310_PA_I2C0 S5P_PA_I2C(0) +#define S5PV310_PA_I2C1 S5P_PA_I2C(1) +#define S5PV310_PA_I2C2 S5P_PA_I2C(2) +#define S5PV310_PA_I2C3 S5P_PA_I2C(3) +#define S5PV310_PA_I2C4 S5P_PA_I2C(4) +#define S5PV310_PA_I2C5 S5P_PA_I2C(5) +#define S5PV310_PA_I2C6 S5P_PA_I2C(6) +#define S5PV310_PA_I2C7 S5P_PA_I2C(7)#define S5PV310_PA_TIMER (0x139D0000)#define S5P_PA_TIMER S5PV310_PA_TIMER
@@ -65,7 +74,7 @@/* compatibiltiy defines. */ #define S3C_PA_UART S5PV310_PA_UART -#define S3C_PA_IIC S5PV310_PA_IIC0 +#define S3C_PA_IIC S5PV310_PA_I2C0#define S3C_PA_WDT S5PV310_PA_WATCHDOG#endif /* __ASM_ARCH_MAP_H */
arch/arm/plat-samsung/include/plat/devs.h +1 -0
@@ -46,6 +46,7 @@ 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 s5p_device_i2c3;extern struct platform_device s3c_device_rtc;extern struct platform_device s3c_device_adc;extern struct platform_device s3c_device_sdi;