Skip to contentSkip to conversation

Add ASPEED AST2600 I2C new controller driver

PATCH Superseded ryan_chen 2 participants 4 messages Jan 11, 2023 – Jan 15, 2023 I2C

v2 of 12 Superseded Latest is v12 →

lore
Share & tools
lore

ryan_chen

author
#0 lore raw

v2 cover Add ASPEED AST2600 I2C new controller driver

This series add AST2600 i2c new register set driver. The i2c new register set have new clock divider option for more flexiable generation.

v2:
add speed support desciption in Kconfig.
modify include header ordering.
separate include register define header.
modify wording reserver to reserved.
remove defined string AST2600.
modify signle-line comment style.
remove extra ().
modify local regs for register ctrl.

ryan_chen (1):
i2c:aspeed:support ast2600 i2c new register mode driver

 MAINTAINERS               |   6 +
 drivers/i2c/Kconfig       |  10 +
 drivers/i2c/Makefile      |   1 +
 drivers/i2c/ast2600_i2c.c | 375 ++++++++++++++++++++++++++++++++++++++
 drivers/i2c/ast2600_i2c.h | 120 ++++++++++++
 5 files changed, 512 insertions(+)
 create mode 100644 drivers/i2c/ast2600_i2c.c
 create mode 100644 drivers/i2c/ast2600_i2c.h
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH v2 1/1 i2c:aspeed:support ast2600 i2c new register mode driver

Add i2c new register mode driver to support AST2600 i2c new register mode. AST2600 i2c controller have legacy and new register mode. The new register mode have global register support 4 base clock for scl clock selection, and new clock divider mode.

---
 MAINTAINERS               |   6 +
 drivers/i2c/Kconfig       |  10 +
 drivers/i2c/Makefile      |   1 +
 drivers/i2c/ast2600_i2c.c | 375 ++++++++++++++++++++++++++++++++++++++
 drivers/i2c/ast2600_i2c.h | 120 ++++++++++++
 5 files changed, 512 insertions(+)
 create mode 100644 drivers/i2c/ast2600_i2c.c
 create mode 100644 drivers/i2c/ast2600_i2c.h
MAINTAINERS +6 -0
index 3fc4cd0f12..1cf54f0b4e 100644
@@ -769,6 +769,12 @@ S:	Maintained
 F:	drivers/pci/pcie_phytium.c
 F:	arch/arm/dts/phytium-durian.dts
 
+ASPEED AST2600 I2C DRIVER
+M:	Ryan Chen <[email protected]>
+R:	Aspeed BMC SW team <[email protected]>
+S:	Maintained
+F:	drivers/i2c/ast2600_i2c.c
+
 ASPEED FMC SPI DRIVER
 M:	Chin-Ting Kuo <[email protected]>
 M:	Cédric Le Goater <[email protected]>
drivers/i2c/Kconfig +10 -0
index 08b6c7bdcc..77e2a1c4c0 100644
@@ -221,6 +221,16 @@ config SYS_I2C_DW
 	  controller is used in various SoCs, e.g. the ST SPEAr, Altera
 	  SoCFPGA, Synopsys ARC700 and some Intel x86 SoCs.
 
+config SYS_I2C_AST2600
+    bool "AST2600 I2C Controller"
+    depends on DM_I2C && ARCH_ASPEED
+    help
+      Say yes here to select AST2600 I2C Host Controller. The driver
+      support AST2600 I2C new mode register. This I2C controller supports:
+      _Standard-mode (up to 100 kHz)
+      _Fast-mode (up to 400 kHz)
+      _Fast-mode Plus (up to 1 MHz)
+
 config SYS_I2C_ASPEED
 	bool "Aspeed I2C Controller"
 	depends on DM_I2C && ARCH_ASPEED
drivers/i2c/Makefile +1 -0
index 920aafb91c..89db2d8e37 100644
@@ -12,6 +12,7 @@ obj-$(CONFIG_$(SPL_)I2C_CROS_EC_LDO) += cros_ec_ldo.o
 
 obj-$(CONFIG_$(SPL_)SYS_I2C_LEGACY) += i2c_core.o
 obj-$(CONFIG_SYS_I2C_ASPEED) += ast_i2c.o
+obj-$(CONFIG_SYS_I2C_AST2600) += ast2600_i2c.o
 obj-$(CONFIG_SYS_I2C_AT91) += at91_i2c.o
 obj-$(CONFIG_SYS_I2C_CADENCE) += i2c-cdns.o
 obj-$(CONFIG_SYS_I2C_CA) += i2c-cortina.o
drivers/i2c/ast2600_i2c.c new file +375 -0

375 lines not on this page · raw message

drivers/i2c/ast2600_i2c.h new file +120 -0

120 lines not on this page · raw message

Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH 1/1] i2c:aspeed:support ast2600 i2c new register mode driver

Hi Ryan,

Quoted 8 lines · ryan_chen

Add i2c new register mode driver to support AST2600 i2c new register mode. AST2600 i2c controller have legacy and new register mode. The new register mode have global register support 4 base clock for scl clock selection, and new clock divider mode.

Quoted 9 lines
---
 MAINTAINERS               |   6 +
 drivers/i2c/Kconfig       |  10 +
 drivers/i2c/Makefile      |   1 +
 drivers/i2c/ast2600_i2c.c | 375 ++++++++++++++++++++++++++++++++++++++
 drivers/i2c/ast2600_i2c.h | 120 ++++++++++++
 5 files changed, 512 insertions(+)
 create mode 100644 drivers/i2c/ast2600_i2c.c
 create mode 100644 drivers/i2c/ast2600_i2c.h

Is this a new version?

Regards,
Simon

author
#3 lore raw

RE: [PATCH 1/1] i2c:aspeed:support ast2600 i2c new register mode driver

Hello,

	I resend the v2 version here
	https://www.mail-archive.com/[email protected]/msg460560.html

Ryan Chen

Quoted 35 lines

-----Original Message-----
From: Simon Glass <[email protected]>
Sent: Thursday, January 12, 2023 5:08 AM
To: Ryan Chen <[email protected]>
Cc: Heiko Schocher <[email protected]>; BMC-SW <[email protected]>; [email protected]
Subject: Re: [PATCH 1/1] i2c:aspeed:support ast2600 i2c new register mode driver

Hi Ryan,

Quoted 16 lines · ryan_chen

Add i2c new register mode driver to support AST2600 i2c new register mode. AST2600 i2c controller have legacy and new register mode. The new register mode have global register support 4 base clock for scl clock selection, and new clock divider mode.

---
 MAINTAINERS               |   6 +
 drivers/i2c/Kconfig       |  10 +
 drivers/i2c/Makefile      |   1 +
 drivers/i2c/ast2600_i2c.c | 375
++++++++++++++++++++++++++++++++++++++
 drivers/i2c/ast2600_i2c.h | 120 ++++++++++++
 5 files changed, 512 insertions(+)
 create mode 100644 drivers/i2c/ast2600_i2c.c  create mode 100644
Quoted 1 line

drivers/i2c/ast2600_i2c.h

Is this a new version?

Regards,
Simon