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 i2ccontrollerquoted
+ have 1 byte transfer buffer(byte mode), 32 bytes buffer(buffer mode),andquoted
+ 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. TheAST2600 SoCquoted
+ provides a single DMA engine shared for 16 I2Ccontrollers,quoted
+ so only a limited number of controllers can use DMAsimultaneously.quoted
+ Therefore, the DTS must explicitly assign whichcontrollers arequoted
+ configured to use DMA. + On AST2600, each controller supports all three modes. + If not specified, buffer mode is used by default. + enum: + - byte + - buffer + - dmaThis 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
- dmaquoted
+ + 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