Add driver for Synopsys DesignWare I3C master IP
Subsystems (6)
v3 cover Add driver for Synopsys DesignWare I3C master IP
This patch series is a proposal for the I3C master driver for Synopsys IP. This patch is to be applied on top of I3C subsystem RFC V10 submitted by Boris Brezillon.
Supported features:
Regular CCC commands.
I3C private transfers.
I2C transfers.
Missing functionalities:
Support DMA interface.
Support for I3C_BUS_MODE_MIXED_SLOW.
Hot-join.
IBI.
Main change between v2 and v3:
- Minor fixes. They are described in each patch
Main change between v1 and v2:
- Add controller version on dt-binding
- The driver now calls writesl/readsl() instead readl/writel
- Rename some variables in the driver
Vitor soares (3):
i3c: master: Add driver for Synopsys DesignWare IP
dt-bindings: i3c: Document Synopsys DesignWare I3C master bindings
MAINTAINERS: Add myself as the dw-i3c-master module maintainer
.../devicetree/bindings/i3c/snps,dw-i3c-master.txt | 42 + MAINTAINERS | 6 + drivers/i3c/master/Kconfig | 15 + drivers/i3c/master/Makefile | 1 + drivers/i3c/master/dw-i3c-master.c | 1216 ++++++++++++++++++++ 5 files changed, 1280 insertions(+) create mode 100644 Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt create mode 100644 drivers/i3c/master/dw-i3c-master.c
Signature · 1 line
2.7.4
PATCH v3 1/3 i3c: master: Add driver for Synopsys DesignWare IP
Add driver for Synopsys DesignWare I3C master IP
---
Change in v3:
- Use struct_size() (suggested by Matthew)
Change in v2:
- Rename some variables
- Remove dw_i3c_master_dev_set_info()
- Ajust code to match the changes made of i3c subsystem
- Use readsl/writesl() to populate TX/RX buffers
drivers/i3c/master/Kconfig | 15 + drivers/i3c/master/Makefile | 1 + drivers/i3c/master/dw-i3c-master.c | 1216 ++++++++++++++++++++++++++++++++++++ 3 files changed, 1232 insertions(+) create mode 100644 drivers/i3c/master/dw-i3c-master.c
drivers/i3c/master/Kconfig +14 -0
@@ -4,3 +4,18 @@ config CDNS_I3C_MASTER depends on !(ALPHA || PARISC) help Enable this driver if you want to support Cadence I3C master block. + +config DW_I3C_MASTER + tristate "Synospsys DesignWare I3C master driver" + depends on I3C + depends on !(ALPHA || PARISC) + # ALPHA and PARISC needs {read,write}sl() + help + Support for Synopsys DesignWare MIPI I3C Controller. + + For details please see + https://www.synopsys.com/dw/ipdir.php?ds=mipi_i3c + + This driver can also be built as a module. If so, the module + will be called dw-i3c-master.
drivers/i3c/master/Makefile +1 -0
@@ -1 +1,2 @@ obj-$(CONFIG_CDNS_I3C_MASTER) += i3c-master-cdns.o +obj-$(CONFIG_DW_I3C_MASTER) += dw-i3c-master.o
drivers/i3c/master/dw-i3c-master.c new file +1216 -0
1,216 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v3 2/3 dt-bindings: i3c: Document Synopsys DesignWare I3C master bindings
In reply to Vitor soaresDocument Synopsys DesignWare I3C master module
---
Changes in v3:
- Remove dummy characters
Changes in v2:
- Address the changes in Documentation/devicetree/bindings/i3c/i3c.txt
- Add controller version on compatible string
.../devicetree/bindings/i3c/snps,dw-i3c-master.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt new file +42 -0
@@ -0,0 +1,42 @@ +Bindings for Synopsys DesignWare I3C master block +================================================= + +Required properties: +-------------------- +- compatible: shall be "snps,dw-i3c-master-1.00a" +- clocks: shall reference the core_clk +- interrupts: the interrupt line connected to this I3C master +- reg: Offset and length of I3C master registers + +Mandatory properties defined by the generic binding (see +Documentation/devicetree/bindings/i3c/i3c.txt for more details): + +- #address-cells: shall be set to 3 +- #size-cells: shall be set to 0 + +Optional properties defined by the generic binding (see +Documentation/devicetree/bindings/i3c/i3c.txt for more details): + +- i2c-scl-hz +- i3c-scl-hz + +I3C device connected on the bus follow the generic description (see +Documentation/devicetree/bindings/i3c/i3c.txt for more details). + +Example: + + i3c-master@2000 { + compatible = "snps,dw-i3c-master-1.00a"; + #address-cells = <3>; + #size-cells = <0>; + reg = <0x02000 0x1000>; + interrupts = <0>; + clocks = <&i3cclk>; + + eeprom@57{ + compatible = "atmel,24c01"; + reg = < 0x57 0x0 0x10>; + pagesize = <0x8>; + }; + }; +
Signature · 1 line
2.7.4
Re: [PATCH v3 2/3] dt-bindings: i3c: Document Synopsys DesignWare I3C master bindings
Quoted 21 lines · On Thu, 8 Nov 2018 17:14:10 +0000 Vitor soares <[email protected]>…
Document Synopsys DesignWare I3C master module
Signed-off-by Vitor soares <[email protected]>---
Changes in v3:
- Remove dummy charactersChanges in v2:
- Address the changes inDocumentation/devicetree/bindings/i3c/i3c.txt
- Add controller version on compatible string.../devicetree/bindings/i3c/snps,dw-i3c-master.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txtDocumentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt new file +0
-0
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt line 7
Quoted 7 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt new file +7
-0@@ -0,0 +1,42 @@ +Bindings for Synopsys DesignWare I3C master block +================================================= + +Required properties: +-------------------- +- compatible: shall be "snps,dw-i3c-master-1.00a" +- clocks: shall reference the core_clk
Are you sure this IP only requires only one clock? If you're unsure, you'd better have a clock-names prop.
Quoted 21 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt new file +21
-0+- interrupts: the interrupt line connected to this I3C master +- reg: Offset and length of I3C master registers + +Mandatory properties defined by the generic binding (see +Documentation/devicetree/bindings/i3c/i3c.txt for more details): + +- #address-cells: shall be set to 3 +- #size-cells: shall be set to 0 + +Optional properties defined by the generic binding (see +Documentation/devicetree/bindings/i3c/i3c.txt for more details): + +- i2c-scl-hz +- i3c-scl-hz + +I3C device connected on the bus follow the generic description (see +Documentation/devicetree/bindings/i3c/i3c.txt for more details). + +Example: + + i3c-master@2000 {
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt line 38
Quoted 10 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt new file +10
-0+ compatible = "snps,dw-i3c-master-1.00a"; + #address-cells = <3>; + #size-cells = <0>; + reg = <0x02000 0x1000>; + interrupts = <0>; + clocks = <&i3cclk>; + + eeprom@57{ + compatible = "atmel,24c01"; + reg = < 0x57 0x0 0x10>;
^ remove this white space.
Quoted 4 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt new file +4
-0+ pagesize = <0x8>; + }; + }; +
Re: [PATCH v3 2/3] dt-bindings: i3c: Document Synopsys DesignWare I3C master bindings
Hi Boris,
Quoted 18 lines · Boris Brezillon
Quoted 15 lines · On Thu, 8 Nov 2018 17:14:10 +0000 Vitor soares <[email protected]>…
Document Synopsys DesignWare I3C master module
Signed-off-by Vitor soares <[email protected]>---
Changes in v3:
- Remove dummy charactersChanges in v2:
- Address the changes inDocumentation/devicetree/bindings/i3c/i3c.txt
- Add controller version on compatible string.../devicetree/bindings/i3c/snps,dw-i3c-master.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)create mode 100644
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt
Quoted 15 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt line 7
Quoted 13 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt new file +7
-0@@ -0,0 +1,42 @@ +Bindings for Synopsys DesignWare I3C master block +================================================= + +Required properties: +-------------------- +- compatible: shall be "snps,dw-i3c-master-1.00a" +- clocks: shall reference the core_clkAre you sure this IP only requires only one clock? If you're unsure, you'd better have a clock-names prop.
Yes, the controller only has this clock dependency to configure the SCL.
Quoted 34 lines
Quoted 22 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt new file +21
-0+- interrupts: the interrupt line connected to this I3C master +- reg: Offset and length of I3C master registers + +Mandatory properties defined by the generic binding (see +Documentation/devicetree/bindings/i3c/i3c.txt for more details): + +- #address-cells: shall be set to 3 +- #size-cells: shall be set to 0 + +Optional properties defined by the generic binding (see +Documentation/devicetree/bindings/i3c/i3c.txt for more details): + +- i2c-scl-hz +- i3c-scl-hz + +I3C device connected on the bus follow the generic description (see +Documentation/devicetree/bindings/i3c/i3c.txt for more details). + +Example: + + i3c-master@2000 {Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt line 38
Quoted 10 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt new file +10
-0+ compatible = "snps,dw-i3c-master-1.00a"; + #address-cells = <3>; + #size-cells = <0>; + reg = <0x02000 0x1000>; + interrupts = <0>; + clocks = <&i3cclk>; + + eeprom@57{ + compatible = "atmel,24c01"; + reg = < 0x57 0x0 0x10>;^ remove this white space.
Quoted 4 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt line 42
Quoted 4 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt new file +4
-0+ pagesize = <0x8>; + }; + }; +
Best regards,
Vitor Soares
Re: [PATCH v3 2/3] dt-bindings: i3c: Document Synopsys DesignWare I3C master bindings
In reply to Vitor soaresQuoted 3 lines · Vitor soares
Document Synopsys DesignWare I3C master module
Signed-off-by Vitor soares <[email protected]>
Please make your author and S-o-b emails match.
Quoted 11 lines
---
Changes in v3:
- Remove dummy charactersChanges in v2:
- Address the changes inDocumentation/devicetree/bindings/i3c/i3c.txt
- Add controller version on compatible string.../devicetree/bindings/i3c/snps,dw-i3c-master.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt
Otherwise,
Re: [PATCH v3 2/3] dt-bindings: i3c: Document Synopsys DesignWare I3C master bindings
Hi Rob,
Quoted 5 lines · Rob Herring
Quoted 3 lines · Vitor soares
Document Synopsys DesignWare I3C master module
Signed-off-by Vitor soares <[email protected]>Please make your author and S-o-b emails match.
This is an alias and both email will work. Anyway I agree that should be the same that appear in the mailing list and I will change it.
Quoted 8 lines
Quoted 8 lines
---
Changes in v3:
- Remove dummy charactersChanges in v2:
- Address the changes inDocumentation/devicetree/bindings/i3c/i3c.txt
- Add controller version on compatible string
Quoted 6 lines
Quoted 3 lines
.../devicetree/bindings/i3c/snps,dw-i3c-master.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)create mode 100644
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txtOtherwise,
Reviewed-by Rob Herring <[email protected]>
Thanks for review.
Best regards,
Vitor Soares
PATCH v3 3/3 MAINTAINERS: Add myself as the dw-i3c-master module maintainer
In reply to Vitor soares---
Change in v3:
- Remove dummy characters
Change in v2:
- None
MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -6930,6 +6930,12 @@ F: drivers/i3c/ F: include/linux/i3c/ F: include/dt-bindings/i3c/ +I3C DRIVER FOR SYNOPSYS DESIGNWARE +M: Vitor Soares <[email protected]> +S: Maintained +F: Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt +F: drivers/i3c/master/dw* + IA64 (Itanium) PLATFORM M: Tony Luck <[email protected]> M: Fenghua Yu <[email protected]>
Signature · 1 line
2.7.4
Quoted 3 lines · Vitor soares
This patch series is a proposal for the I3C master driver for Synopsys IP. This patch is to be applied on top of I3C subsystem RFC V10 submitted by Boris Brezillon.
I'd like to get Boris's reviewed/signed-off on these before I take them.
thanks,
greg k-h
Quoted 3 lines · On Thu, 8 Nov 2018 17:14:08 +0000 Vitor soares <[email protected]>…
This patch series is a proposal for the I3C master driver for Synopsys IP. This patch is to be applied on top of I3C subsystem RFC V10 submitted by Boris Brezillon.
The patch series looks to me. I'm just waiting an ack from Rob on the bindings to queue it to the i3c/next branch.
Thanks,
Boris
Quoted 34 lines
Supported features:
Regular CCC commands.
I3C private transfers.
I2C transfers.Missing functionalities:
Support DMA interface.
Support forI3C_BUS_MODE_MIXED_SLOW.
Hot-join.
IBI.Main change between v2 and v3:
- Minor fixes. They are described in each patchMain change between v1 and v2:
- Add controller version on dt-binding
- The driver now calls writesl/readsl() instead readl/writel
- Rename some variables in the driverVitor soares (3):
i3c: master: Add driver for Synopsys DesignWare IP
dt-bindings: i3c: Document Synopsys DesignWare I3C master bindings
MAINTAINERS: Add myself as the dw-i3c-master module maintainer.../devicetree/bindings/i3c/snps,dw-i3c-master.txt | 42 + MAINTAINERS | 6 + drivers/i3c/master/Kconfig | 15 + drivers/i3c/master/Makefile | 1 + drivers/i3c/master/dw-i3c-master.c | 1216 ++++++++++++++++++++ 5 files changed, 1280 insertions(+) create mode 100644 Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.txt create mode 100644 drivers/i3c/master/dw-i3c-master.c