Thread (18 messages) 18 messages, 3 authors, 2026-03-18

RE: [PATCH v26 2/4] dt-bindings: i2c: ast2600-i2c.yaml: Add global-regs and transfer-mode properties

From: Ryan Chen <ryan_chen@aspeedtech.com>
Date: 2026-03-14 00:24:42
Also in: linux-arm-kernel, linux-aspeed, linux-i2c, lkml, openbmc

Subject: Re: [PATCH v26 2/4] dt-bindings: i2c: ast2600-i2c.yaml: Add global-regs
and transfer-mode properties

On Mon, Mar 09, 2026 at 02:53:53PM +0800, Ryan Chen wrote:
quoted
The AST2600 I2C controller supports three transfer modes (byte,
buffer, DMA). Add "aspeed,transfer-mode" so DT can select the
preferred transfer method per controller instance. Also add the
"aspeed,global-regs"
quoted
phandle to reference the AST2600 global registers syscon/regmap used
by the controller.

These properties apply only to the AST2600 binding and are not part of
the legacy binding, which uses a mixed controller/target register
layout and does not have the split register blocks or these new
configuration registers. Legacy DTs remain unchanged.

Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
---
 .../bindings/i2c/aspeed,ast2600-i2c.yaml           | 29
++++++++++++++++++++++
quoted
 1 file changed, 29 insertions(+)

diff --git
a/Documentation/devicetree/bindings/i2c/aspeed,ast2600-i2c.yaml
b/Documentation/devicetree/bindings/i2c/aspeed,ast2600-i2c.yaml
index de2c359037da..323e4f9b290a 100644
--- a/Documentation/devicetree/bindings/i2c/aspeed,ast2600-i2c.yaml
+++ b/Documentation/devicetree/bindings/i2c/aspeed,ast2600-i2c.yaml
@@ -37,6 +37,33 @@ properties:
   resets:
     maxItems: 1

+  aspeed,transfer-mode:
+    description: |
+      ASPEED ast2600 platform equipped with 16 I2C controllers each i2c
controller
quoted
+      have 1 byte transfer buffer(byte mode), 32 bytes buffer(buffer mode),
and
quoted
+      share a DMA engine.
+      Select I2C transfer mode for this controller. Supported values are:
+        - "byte": Use 1 byte for i2c transmit (1-byte buffer).
+        - "buffer": Use buffer (32-byte buffer) for i2c transmit. (default)
+                    Better performance then byte mode.
Good, I like worse performance so I can use byte mode.
Thanks your review.
Will remove performance statement.
quoted
+        - "dma": Each controller DMA mode is shared DMA engine. The
AST2600 SoC
quoted
+                 provides a single DMA engine shared for 16 I2C
controllers,
quoted
+                 so only a limited number of controllers can use DMA
simultaneously.
quoted
+                 Therefore, the DTS must explicitly assign which
controllers are
quoted
+                 configured to use DMA.
+      On AST2600, each controller supports all three modes.
+      If not specified, buffer mode is used by default.
+    enum:
+      - byte
+      - buffer
+      - dma
This is not required, so what is the default mode? If there's a default, you don't
need the default value in the first place as the default is the property omitted.
Thanks, Will update with following.

aspeed,transfer-mode:
  description:
    Selects the AST2600 I2C transfer mode:
      - byte: 1-byte transfer buffer
      - buffer: 32-byte transfer buffer
      - dma: DMA-based transfers
  enum:
    - byte
    - buffer
    - dma
quoted
+
+  aspeed,global-regs:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      Phandle reference to the i2c global syscon node, containing the
+      SoC-common i2c register set.
+
 required:
   - reg
   - compatible
@@ -59,4 +86,6 @@ examples:
         resets = <&syscon ASPEED_RESET_I2C>;
         clock-frequency = <100000>;
         interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
+        aspeed,global-regs = <&i2c_global>;
+        aspeed,transfer-mode = "buffer";
     };

--
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help