mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-14 17:40:41 +09:00
i2c: add rockchip i2c driver
This commit is contained in:
@@ -12,6 +12,11 @@
|
||||
serial1 = &uart1;
|
||||
serial2 = &uart2;
|
||||
serial3 = &uart3;
|
||||
i2c0 = &i2c0;
|
||||
i2c1 = &i2c1;
|
||||
i2c2 = &i2c2;
|
||||
i2c3 = &i2c3;
|
||||
i2c4 = &i2c4;
|
||||
};
|
||||
|
||||
cpus {
|
||||
@@ -236,4 +241,58 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c0: i2c@2002d000 {
|
||||
compatible = "rockchip,rk30-i2c";
|
||||
reg = <0x2002d000 0x1000>;
|
||||
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0_sda &i2c0_scl>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c1: i2c@2002f000 {
|
||||
compatible = "rockchip,rk30-i2c";
|
||||
reg = <0x2002f000 0x1000>;
|
||||
interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c1_sda &i2c1_scl>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c2: i2c@20055000 {
|
||||
compatible = "rockchip,rk30-i2c";
|
||||
reg = <0x20055000 0x1000>;
|
||||
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c2_sda &i2c2_scl>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c3: i2c@20059000 {
|
||||
compatible = "rockchip,rk30-i2c";
|
||||
reg = <0x20059000 0x1000>;
|
||||
interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c3_sda &i2c3_scl>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c4: i2c@2005d000 {
|
||||
compatible = "rockchip,rk30-i2c";
|
||||
reg = <0x2005d000 0x1000>;
|
||||
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c4_sda &i2c4_scl>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "core.h"
|
||||
#include "cpu.h"
|
||||
#include "cpu_axi.h"
|
||||
#include "grf.h"
|
||||
#include "iomap.h"
|
||||
|
||||
#define RK3188_DEVICE(name) \
|
||||
@@ -93,6 +94,9 @@ static void __init rk3188_dt_map_io(void)
|
||||
&& readl_relaxed(RK_ROM_VIRT + 0x27f8) == 0x30313331
|
||||
&& readl_relaxed(RK_ROM_VIRT + 0x27fc) == 0x56313031)
|
||||
rockchip_soc_id = ROCKCHIP_SOC_RK3188PLUS;
|
||||
|
||||
/* rki2c is used instead of old i2c */
|
||||
writel_relaxed(0xF800F800, RK_GRF_VIRT + RK3188_GRF_SOC_CON1);
|
||||
}
|
||||
|
||||
static void __init rk3188_dt_init_timer(void)
|
||||
|
||||
@@ -629,6 +629,20 @@ config I2C_PXA_SLAVE
|
||||
is necessary for systems where the PXA may be a target on the
|
||||
I2C bus.
|
||||
|
||||
config I2C_ROCKCHIP
|
||||
tristate "Rockchip I2C interface"
|
||||
depends on ARCH_ROCKCHIP
|
||||
help
|
||||
If you say yes to this option, support will be included for the
|
||||
Rockchip I2C interface.
|
||||
|
||||
This driver can also be built as a module. If so, the module
|
||||
will be called i2c-rockchip.
|
||||
|
||||
config I2C_ROCKCHIP_COMPAT
|
||||
bool "Support set sclk rate on i2c_msg (DEPRECATED)"
|
||||
depends on I2C_ROCKCHIP
|
||||
|
||||
config HAVE_S3C2410_I2C
|
||||
bool
|
||||
help
|
||||
|
||||
@@ -62,6 +62,7 @@ obj-$(CONFIG_I2C_PNX) += i2c-pnx.o
|
||||
obj-$(CONFIG_I2C_PUV3) += i2c-puv3.o
|
||||
obj-$(CONFIG_I2C_PXA) += i2c-pxa.o
|
||||
obj-$(CONFIG_I2C_PXA_PCI) += i2c-pxa-pci.o
|
||||
obj-$(CONFIG_I2C_ROCKCHIP) += i2c-rockchip.o
|
||||
obj-$(CONFIG_I2C_S3C2410) += i2c-s3c2410.o
|
||||
obj-$(CONFIG_I2C_S6000) += i2c-s6000.o
|
||||
obj-$(CONFIG_I2C_SH7760) += i2c-sh7760.o
|
||||
|
||||
1065
drivers/i2c/busses/i2c-rockchip.c
Normal file
1065
drivers/i2c/busses/i2c-rockchip.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user