openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] Add ASPEED AST2600 I2Cv2 controller driver
@ 2023-02-20  6:17 Ryan Chen
  2023-02-20  6:17 ` [PATCH v5 1/2] dt-bindings: i2c: Add support for ASPEED i2Cv2 Ryan Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Ryan Chen @ 2023-02-20  6:17 UTC (permalink / raw)
  To: Ryan Chen, Rob Herring, Krzysztof Kozlowski, Joel Stanley,
	Andrew Jeffery, Philipp Zabel, openbmc, linux-arm-kernel,
	linux-aspeed, linux-kernel

This series add AST2600 i2cv2 new register set driver. The i2cv2 new
register set have new clock divider option for more flexiable generation.
And also have separate i2c master and slave register set for control.

The legacy register layout is mix master/slave register control together.
The following is add more detail description about new register layout.
And new feature set add for register.

-Add new clock divider option for more flexible and accurate clock
rate generation
-Add tCKHighMin timing to guarantee SCL high pulse width.
-Add support dual pool buffer mode, split 32 bytes pool buffer of
each device into 2 x 16 bytes for Tx and Rx individually.
-Increase DMA buffer size to 4096 bytes and support byte alignment.
-Re-define the base address of BUS1 ~ BUS16 and Pool buffer.
-Re-define registers for separating master and slave mode control.
-Support 4 individual DMA buffers for master Tx and Rx, slave Tx and Rx.

And following is new register set for package transfer sequence.
-New Master operation mode:
 S -> Aw -> P
 S -> Aw -> TxD -> P
 S -> Ar -> RxD -> P
 S -> Aw -> RxD -> Sr -> Ar -> TxD -> P
-Bus SDA lock auto-release capability for new master DMA command mode.
-Bus auto timeout for new master/slave DMA mode.

The following is two versus register layout.
Old:
{I2CD00}: Function Control Register     
{I2CD04}: Clock and AC Timing Control Register
{I2CD08}: Clock and AC Timing Control Register
{I2CD0C}: Interrupt Control Register
{I2CD10}: Interrupt Status Register 
{I2CD14}: Command/Status Register   
{I2CD18}: Slave Device Address Register
{I2CD1C}: Pool Buffer Control Register
{I2CD20}: Transmit/Receive Byte Buffer Register
{I2CD24}: DMA Mode Buffer Address Register
{I2CD28}: DMA Transfer Length Register
{I2CD2C}: Original DMA Mode Buffer Address Setting
{I2CD30}: Original DMA Transfer Length Setting and Final Status

New Register mode
{I2CC00}: Master/Slave Function Control Register
{I2CC04}: Master/Slave Clock and AC Timing Control Register
{I2CC08}: Master/Slave Transmit/Receive Byte Buffer Register
{I2CC0C}: Master/Slave Pool Buffer Control Register
{I2CM10}: Master Interrupt Control Register
{I2CM14}: Master Interrupt Status Register  
{I2CM18}: Master Command/Status Register
{I2CM1C}: Master DMA Buffer Length Register
{I2CS20}: Slave~ Interrupt Control Register
{I2CS24}: Slave~ Interrupt Status Register
{I2CS28}: Slave~ Command/Status Register
{I2CS2C}: Slave~ DMA Buffer Length Register
{I2CM30}: Master DMA Mode Tx Buffer Base Address
{I2CM34}: Master DMA Mode Rx Buffer Base Address
{I2CS38}: Slave~ DMA Mode Tx Buffer Base Address
{I2CS3C}: Slave~ DMA Mode Rx Buffer Base Address
{I2CS40}: Slave Device Address Register
{I2CM48}: Master DMA Length Status Register
{I2CS4C}: Slave  DMA Length Status Register
{I2CC50}: Current DMA Operating Address Status
{I2CC54}: Current DMA Operating Length  Status

v5:
-remove ast2600-i2c-global.yaml, i2c-ast2600-global.c.
-i2c-ast2600.c
 -remove legacy clock divide, all go for new clock divide.
 -remove duplicated read isr.
 -remove no used driver match
 -fix probe return for each labels return.
 -global use mfd driver, driver use phandle to regmap read/write.
-rename aspeed,i2c-ast2600.yaml to aspeed,i2cv2.yaml
-remove bus-frequency.
-add required aspeed,gr
-add timeout, byte-mode, buff-mode properites.

v4:
-fix i2c-ast2600.c driver buffer mode use single buffer conflit in
 master slave mode both enable.
-fix kmemleak issue when use dma mode.
-fix typo aspeed,i2c-ast2600.yaml compatible is "aspeed,ast2600-i2c"
-fix typo aspeed,i2c-ast2600.ymal to aspeed,i2c-ast2600.yaml

v3:
-fix i2c global clock divide default value.
-remove i2c slave no used dev_dbg info.

v2:
-add i2c global ymal file commit.
-rename file name from new to ast2600.
 aspeed-i2c-new-global.c -> i2c-ast2600-global.c
 aspeed-i2c-new-global.h -> i2c-ast2600-global.h
 i2c-new-aspeed.c -> i2c-ast2600.c
-rename all driver function name to ast2600.

Ryan Chen (2):
  dt-bindings: i2c: Add support for ASPEED i2Cv2
  i2c: aspeed: support ast2600 i2cv2 new register mode driver

 .../devicetree/bindings/i2c/aspeed,i2cv2.yaml |   83 +
 MAINTAINERS                                   |    9 +
 drivers/i2c/busses/Kconfig                    |   11 +
 drivers/i2c/busses/Makefile                   |    1 +
 drivers/i2c/busses/i2c-ast2600.c              | 1703 +++++++++++++++++
 5 files changed, 1807 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/aspeed,i2cv2.yaml
 create mode 100644 drivers/i2c/busses/i2c-ast2600.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-02-23 10:28 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20  6:17 [PATCH v5 0/2] Add ASPEED AST2600 I2Cv2 controller driver Ryan Chen
2023-02-20  6:17 ` [PATCH v5 1/2] dt-bindings: i2c: Add support for ASPEED i2Cv2 Ryan Chen
2023-02-20  8:28   ` Jeremy Kerr
2023-02-20  9:50     ` Ryan Chen
2023-02-20 11:24       ` Jeremy Kerr
2023-02-21  3:32         ` Ryan Chen
2023-02-22  1:14           ` Dhananjay Phadke
2023-02-22  1:30           ` Jeremy Kerr
     [not found]   ` <676c7777-635c-cc1f-b919-d33e84a45442@linaro.org>
2023-02-21  2:43     ` Ryan Chen
     [not found]       ` <80d873d4-d813-6c25-8f47-f5ff9af718ec@linaro.org>
2023-02-21 10:42         ` Ryan Chen
     [not found]           ` <c0ac0ab3-87fc-e74a-b4e2-3cf1b3a8a5e2@linaro.org>
2023-02-22  2:59             ` Ryan Chen
     [not found]               ` <94238c42-1250-4d51-86e5-0a960dea0ffc@linaro.org>
2023-02-22 10:31                 ` Ryan Chen
     [not found]                   ` <b7ca24ea-a265-81cb-3da6-19f938b35878@linaro.org>
2023-02-22 10:47                     ` Ryan Chen
     [not found]                       ` <5c255eb3-ec9e-d66f-4a2b-ccc32edf5672@linaro.org>
2023-02-23 10:25                         ` Ryan Chen
2023-02-20  6:17 ` [PATCH v5 2/2] i2c: aspeed: support ast2600 i2cv2 new register mode driver Ryan Chen
     [not found]   ` <63986fb1-f8d4-f348-bae9-72e08369213b@linaro.org>
2023-02-22  3:36     ` Ryan Chen
     [not found]       ` <77480142-a2c0-f6da-af0e-d3f01f72ac53@linaro.org>
2023-02-23  0:58         ` Ryan Chen
     [not found] ` <54ef0dee-30dc-3ba9-d2f7-8270204b5505@linaro.org>
2023-02-20  9:56   ` [PATCH v5 0/2] Add ASPEED AST2600 I2Cv2 controller driver Ryan Chen
     [not found]     ` <abec828b-9b34-fc5a-cd36-8be6f20dfd25@linaro.org>
2023-02-21  1:12       ` Ryan Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).