i2c: busses: xgene: I2C proxy driver for X-Gene
Subsystems (4)
v4 cover i2c: busses: xgene: I2C proxy driver for X-Gene
This is a proxy I2C driver for APM X-Gene SoC. It uses the mailbox driver to tunnel i2c transactions via the SLIMpro processor.
V4 Change:
- Remove PRP0001 and use a real ACPI id
V3 Change:
- Add ACPI support
- Fix previous comments.
Feng Kan (4):
i2c: busses: add SLIMpro I2C device driver on APM X-Gene platform
i2c: busses: xgene: add acpi support for i2c xgene SLIMpro driver
Documentation: i2c: Add APM X-Gene platform SLIMpro I2C driver
documentation
arm64: dts: add proxy I2C device driver on APM X-Gene platform
.../devicetree/bindings/i2c/i2c-xgene-slimpro.txt | 15 + arch/arm64/boot/dts/apm/apm-storm.dtsi | 5 + drivers/i2c/busses/Kconfig | 9 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-xgene-slimpro.c | 469 +++++++++++++++++++++ 5 files changed, 499 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-xgene-slimpro.txt create mode 100644 drivers/i2c/busses/i2c-xgene-slimpro.c
Signature · 1 line
1.9.1
PATCH RESEND v4 1/4 i2c: busses: add SLIMpro I2C device driver on APM X-Gene platform
Add SLIMpro I2C device driver on APM X-Gene platform. This I2C device driver use the SLIMpro Mailbox driver to tunnel message to the SLIMpro coprocessor to do the work of accessing I2C components.
--- drivers/i2c/busses/Kconfig | 9 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-xgene-slimpro.c | 459 +++++++++++++++++++++++++++++++++ 3 files changed, 469 insertions(+) create mode 100644 drivers/i2c/busses/i2c-xgene-slimpro.c
drivers/i2c/busses/Kconfig +9 -0
@@ -1082,6 +1082,15 @@ config I2C_CROS_EC_TUNNEL connected there. This will work whatever the interface used to talk to the EC (SPI, I2C or LPC). +config I2C_XGENE_SLIMPRO + tristate "APM X-Gene SoC I2C SLIMpro devices support" + depends on ARCH_XGENE && MAILBOX + help + Enable I2C bus access using the APM X-Gene SoC SLIMpro + co-processor. The I2C device access the I2C bus via the X-Gene + to SLIMpro (On chip coprocessor) mailbox mechanism. + If unsure, say N. + config SCx200_ACB tristate "Geode ACCESS.bus support" depends on X86_32 && PCI
drivers/i2c/busses/Makefile +1 -0
@@ -107,6 +107,7 @@ obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o obj-$(CONFIG_I2C_OPAL) += i2c-opal.o obj-$(CONFIG_I2C_PCA_ISA) += i2c-pca-isa.o obj-$(CONFIG_I2C_SIBYTE) += i2c-sibyte.o +obj-$(CONFIG_I2C_XGENE_SLIMPRO) += i2c-xgene-slimpro.o obj-$(CONFIG_SCx200_ACB) += scx200_acb.o ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG
drivers/i2c/busses/i2c-xgene-slimpro.c new file +459 -0
459 lines not on this page · raw message
Signature · 6 lines
1.9.1 -- 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
Wolfram Sang
AppliedRe: [PATCH RESEND V4 1/4] i2c: busses: add SLIMpro I2C device driver on APM X-Gene platform
Quoted 6 lines · Feng Kan
Add SLIMpro I2C device driver on APM X-Gene platform. This I2C device driver use the SLIMpro Mailbox driver to tunnel message to the SLIMpro coprocessor to do the work of accessing I2C components.
Signed-off-by Feng Kan <[email protected]>Signed-off-by Hieu Le <[email protected]>
Applied to for-next, thanks!
One comment though:
drivers/i2c/busses/i2c-xgene-slimpro.c line 415
Quoted 1 line
drivers/i2c/busses/i2c-xgene-slimpro.c new file +1
-0+ adapter->class =I2C_CLASS_HWMON ;
Since you have DT and ACPI, you most likely won't need that, or? It speeds up boot time if you don't use classes. Send me an incremental patch if you want to change this.
PATCH RESEND v4 2/4 i2c: busses: xgene: add acpi support for i2c xgene SLIMpro driver
In reply to Feng KanThis adds support for ACPI for the APM X-Gene I2C SLIMpro proxy driver.
--- drivers/i2c/busses/i2c-xgene-slimpro.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/i2c/busses/i2c-xgene-slimpro.c +10 -0
@@ -22,6 +22,7 @@* using the APM X-Gene SLIMpro mailbox driver. * */ +#include <linux/acpi.h> #include <linux/dma-mapping.h> #include <linux/i2c.h> #include <linux/interrupt.h>
@@ -442,12 +443,21 @@ static const struct of_device_id xgene_slimpro_i2c_dt_ids[] = { };MODULE_DEVICE_TABLE (of, xgene_slimpro_i2c_dt_ids); +#ifdef CONFIG_ACPI +static const struct acpi_device_id xgene_slimpro_i2c_acpi_ids[] = { + {"APMC0D40" ,0 }, + {} +}; +MODULE_DEVICE_TABLE (acpi, xgene_slimpro_i2c_acpi_ids); +#endif +static struct platform_driver xgene_slimpro_i2c_driver = { .probe = xgene_slimpro_i2c_probe, .remove = xgene_slimpro_i2c_remove, .driver = { .name ="xgene-slimpro-i2c" , .of_match_table =of_match_ptr (xgene_slimpro_i2c_dt_ids), + .acpi_match_table =ACPI_PTR (xgene_slimpro_i2c_acpi_ids) }, };
Signature · 1 line
1.9.1
Re: [PATCH RESEND V4 2/4] i2c: busses: xgene: add acpi support for i2c xgene SLIMpro driver
Quoted 4 lines · Feng Kan
This adds support for ACPI for the APM X-Gene I2C SLIMpro proxy driver.
Signed-off-by Feng Kan <[email protected]>
I squashed this into the previous patch, thanks.
PATCH RESEND v4 3/4 Documentation: i2c: Add APM X-Gene platform SLIMpro I2C driver documentation
In reply to Feng KanAdd APM X-Gene platform SLIMpro I2C driver documentation.
--- .../devicetree/bindings/i2c/i2c-xgene-slimpro.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-xgene-slimpro.txt
Documentation/devicetree/bindings/i2c/i2c-xgene-slimpro.txt new file +15 -0
@@ -0,0 +1,15 @@ +APM X-Gene SLIMpro Mailbox I2C Driver + +An I2C controller accessed over the "SLIMpro" mailbox. + +Required properties : + + - compatible : should be "apm,xgene-slimpro-i2c" + - mboxes : use the label reference for the mailbox as the first parameter. + The second parameter is the channel number. + +Example : + i2cslimpro { + compatible = "apm,xgene-slimpro-i2c"; + mboxes = <&mailbox 0>; + };
Signature · 1 line
1.9.1
Wolfram Sang
AppliedRe: [PATCH RESEND V4 3/4] Documentation: i2c: Add APM X-Gene platform SLIMpro I2C driver documentation
Quoted 4 lines · Feng Kan
Add APM X-Gene platform SLIMpro I2C driver documentation.
Signed-off-by Feng Kan <[email protected]>Signed-off-by Hieu Le <[email protected]>
Applied to for-next, thanks!
PATCH RESEND v4 4/4 arm64: dts: add proxy I2C device driver on APM X-Gene platform
In reply to Feng KanAdd proxy I2C device driver on APM X-Gene platform.
--- arch/arm64/boot/dts/apm/apm-storm.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/apm/apm-storm.dtsi +5 -0
@@ -483,6 +483,11 @@ <0x0 0x7 0x4>; }; + i2cslimpro { + compatible = "apm,xgene-slimpro-i2c"; + mboxes = <&mailbox 0>; + }; + serial0: serial@1c020000 { status = "disabled"; device_type = "serial";
Signature · 1 line
1.9.1
Re: [PATCH RESEND V4 4/4] arm64: dts: add proxy I2C device driver on APM X-Gene platform
Quoted 4 lines · Feng Kan
Add proxy I2C device driver on APM X-Gene platform.
Signed-off-by Feng Kan <[email protected]>Signed-off-by Hieu Le <[email protected]>
DTS updates need to go via arm trees usually.
Quoted 2 lines
- Fix previous comments.
Next time, please specify what exactly you changed. This speeds up reviewing *a lot*, because otherwise I have to do this myself.