devicetree: i2c: add binding for Sigma Designs SMP8642 I2C master
Subsystems (2)
PATCH 1/2 devicetree: i2c: add binding for Sigma Designs SMP8642 I2C master
This adds a binding for the Sigma Designs SMP8642 built-in I2C master controller.
--- .../devicetree/bindings/i2c/sigma,smp8642-i2c.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/sigma,smp8642-i2c.txt
Documentation/devicetree/bindings/i2c/sigma,smp8642-i2c.txt new file +24 -0
@@ -0,0 +1,24 @@ +Sigma Designs SMP8642 I2C master + +Required properties: +- compatible: should be "sigma,smp8642-i2c" +- reg: physical address space of the device +- interrupts: the interrupt of the device +- clocks: phandle of the clock for the device +- #address-cells: should be <1> +- #size-cells: should be <0> + +Optional properties: +- clock-frequency: frequency of bus clock in Hz, default 100kHz + +Example: + +i2c@10480 { + compatible = "sigma,smp8642-i2c"; + reg = <0x10480 0x2c>; + interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sys_clk>; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; +};
Signature · 6 lines
2.6.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 i2c: add driver for Sigma Designs SMP8642 I2C master
This adds a driver for the Sigma Designs SMP8642 built-in I2C master controller. The hardware is very similar to the I2C controller in the Ralink RT3050 chip with the addition of interrupt generation and an inverted busy/idle status bit. There are typically two controllers with a shared IRQ.
--- drivers/i2c/busses/Kconfig | 8 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-tangox.c | 330 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 339 insertions(+) create mode 100644 drivers/i2c/busses/i2c-tangox.c
drivers/i2c/busses/Kconfig +8 -0
@@ -974,6 +974,14 @@ config I2C_RCAR This driver can also be built as a module. If so, the module will be called i2c-rcar. +config I2C_TANGOX + tristate "SMP86xx I2C master support" + depends on ARCH_TANGOX + help + This driver supports the Sigma Designs SMP86xx built-in I2c master. + + If built as a module, it will be called i2c-tangox. + comment "External I2C/SMBus adapter drivers" config I2C_DIOLAN_U2C
drivers/i2c/busses/Makefile +1 -0
@@ -94,6 +94,7 @@ obj-$(CONFIG_I2C_XILINX) += i2c-xiic.o obj-$(CONFIG_I2C_XLR) += i2c-xlr.o obj-$(CONFIG_I2C_XLP9XX) += i2c-xlp9xx.o obj-$(CONFIG_I2C_RCAR) += i2c-rcar.o +obj-$(CONFIG_I2C_TANGOX) += i2c-tangox.o # External I2C/SMBus adapter drivers obj-$(CONFIG_I2C_DIOLAN_U2C) += i2c-diolan-u2c.o
drivers/i2c/busses/i2c-tangox.c new file +330 -0
330 lines not on this page · raw message
Signature · 1 line
2.6.2
Quoted 4 lines · Mans Rullgard
This adds a binding for the Sigma Designs SMP8642 built-in I2C master controller.
Signed-off-by Mans Rullgard <[email protected]>
Quoted 36 lines
--- .../devicetree/bindings/i2c/sigma,smp8642-i2c.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/sigma,smp8642-i2c.txtDocumentation/devicetree/bindings/i2c/sigma,smp8642-i2c.txt new file +24
-1@@ -0,0 +1,24 @@ +Sigma Designs SMP8642 I2C master + +Required properties: +- compatible: should be "sigma,smp8642-i2c" +- reg: physical address space of the device +- interrupts: the interrupt of the device +- clocks: phandle of the clock for the device +- #address-cells: should be <1> +- #size-cells: should be <0> + +Optional properties: +- clock-frequency: frequency of bus clock in Hz, default 100kHz + +Example: + +i2c@10480 { + compatible = "sigma,smp8642-i2c"; + reg = <0x10480 0x2c>; + interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sys_clk>; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; +}; --
Quoted 2 lines
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] i2c: add driver for Sigma Designs SMP8642 I2C master
In reply to Mans RullgardQuoted 7 lines · Mans Rullgard
This adds a driver for the Sigma Designs SMP8642 built-in I2C master controller. The hardware is very similar to the I2C controller in the Ralink RT3050 chip with the addition of interrupt generation and an inverted busy/idle status bit. There are typically two controllers with a shared IRQ.
Signed-off-by Mans Rullgard <[email protected]>
Thanks for the driver. Same answer as here, though:
http://www.spinics.net/lists/linux-i2c/msg17001.html
drivers/i2c/busses/i2c-tangox.c line 31
Quoted 11 lines
drivers/i2c/busses/i2c-tangox.c new file +11
-0+#define TANGOX_I2C_CONFIG 0x00 +#define TANGOX_I2C_CLKDIV 0x04 +#define TANGOX_I2C_DEVADDR 0x08 +#define TANGOX_I2C_ADDR 0x0c +#define TANGOX_I2C_DATAOUT 0x10 +#define TANGOX_I2C_DATAIN 0x14 +#define TANGOX_I2C_STATUS 0x18 +#define TANGOX_I2C_STARTXFER 0x1c +#define TANGOX_I2C_BYTECNT 0x20 +#define TANGOX_I2C_INT_EN 0x24 +#define TANGOX_I2C_INT_STAT 0x28
The register set looks like the one from i2c-xlr.c, only that they are 32 bit apart instead of 8. Can you check if you can reuse that driver?
Thanks,
Wolfram
Re: [PATCH 2/2] i2c: add driver for Sigma Designs SMP8642 I2C master
Quoted 13 lines · Wolfram Sang
Quoted 7 lines · Mans Rullgard
This adds a driver for the Sigma Designs SMP8642 built-in I2C master controller. The hardware is very similar to the I2C controller in the Ralink RT3050 chip with the addition of interrupt generation and an inverted busy/idle status bit. There are typically two controllers with a shared IRQ.
Signed-off-by Mans Rullgard <[email protected]>Thanks for the driver. Same answer as here, though:
Quoted 14 lines
drivers/i2c/busses/i2c-tangox.c line 31
Quoted 11 lines
drivers/i2c/busses/i2c-tangox.c new file +11
-0+#define TANGOX_I2C_CONFIG 0x00 +#define TANGOX_I2C_CLKDIV 0x04 +#define TANGOX_I2C_DEVADDR 0x08 +#define TANGOX_I2C_ADDR 0x0c +#define TANGOX_I2C_DATAOUT 0x10 +#define TANGOX_I2C_DATAIN 0x14 +#define TANGOX_I2C_STATUS 0x18 +#define TANGOX_I2C_STARTXFER 0x1c +#define TANGOX_I2C_BYTECNT 0x20 +#define TANGOX_I2C_INT_EN 0x24 +#define TANGOX_I2C_INT_STAT 0x28The register set looks like the one from
i2c-xlr.c, only that they are 32 bit apart instead of 8. Can you check if you can reuse that driver?
It does look very similar indeed. I thought I'd checked for an existing driver, but apparently I missed that one. I'll modify the xlr driver to handle this hardware as well instead.
Signature · 2 lines
Måns Rullgård [email protected]
Re: [PATCH 2/2] i2c: add driver for Sigma Designs SMP8642 I2C master
Quoted 7 lines
Quoted 3 lines
The register set looks like the one from
i2c-xlr.c, only that they are 32 bit apart instead of 8. Can you check if you can reuse that driver?It does look very similar indeed. I thought I'd checked for an existing driver, but apparently I missed that one. I'll modify the xlr driver to handle this hardware as well instead.
Thanks, much appreciated!