From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A156CE8D6B for ; Tue, 18 Nov 2025 01:41:33 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4d9S4Q3Mj2z30VL; Tue, 18 Nov 2025 12:40:54 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1763430054; cv=none; b=FSuVekG9CSCBVT4Gjc4hY3nrXZ6bA63LjZ8wTXqvJKr6VPhvzA4aiUuaSn1cwD4f9PJqrVw5sSZgrwGUNWvllMNGvdGGWKZy/q5UxvAn7tzzgvzDGjPBN5ntj/4gGHfpAPLVNc2+6AcFqJQV64LujqoAg5eM0jcXT0hjYxdNvkk7CC4e8R8gy2sbn80QDUK2VajdsZaDCpH3KAmcS4SzuyLvjz3AVQzz10Y7v8OdgyuuJcbrh91Jl9UvyRb9K7Nv8QrBJi1QKRA9nKx1zOb5BzxBNU0FS86r45fsPy3TW9t8ecCbBvSYgxbsRCaBQ1Dh5Qt6UjpS+c6/LT/G+B7v+g== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1763430054; c=relaxed/relaxed; bh=lo8sQOPWueVpLVcHoYM6yhb5bRqbRQLQjgFsQxkzdRI=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dnpV454P8yxUWJV2FLBD9CUQ/dk2HcTOjyKAo16ERMiASEepJn7O2tXKuOMW0/lFo5TTTwQenNBKnYGI9OXnCTIpDxOolP0sy20q1gwtSQTxyd5NEa2Wvgsuy6vxyJ/mGvJkYQTeZ5pbMrwv1Yj+CfGbNvvlIV/OLxhH5wZI5nuiP1PH1FZrcTCgL2tUTl4rYq0NnNW/0uMmU+moAW3jvwBOIJDGt6t/vsPPgmkltkQwlHWRMVnGS0cXDT09EbSxAKxcx3mojN0GIUGCwLsGmX80ycGGlouKyWjkF1i5rAkXjSVP/3FYAwJH1A80FsDhhbtBgM9vYTEcHKPLTdKPnA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass (client-ip=211.20.114.72; helo=twmbx01.aspeed.com; envelope-from=ryan_chen@aspeedtech.com; receiver=lists.ozlabs.org) smtp.mailfrom=aspeedtech.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=aspeedtech.com (client-ip=211.20.114.72; helo=twmbx01.aspeed.com; envelope-from=ryan_chen@aspeedtech.com; receiver=lists.ozlabs.org) Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4d9S4P3Xjzz300F; Tue, 18 Nov 2025 12:40:53 +1100 (AEDT) Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 18 Nov 2025 09:40:35 +0800 Received: from twmbx02.aspeed.com (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Tue, 18 Nov 2025 09:40:35 +0800 From: Ryan Chen To: , , , , , , , , , , , , , , , , , , Subject: [PATCH v24 2/4] dt-bindings: i2c: ast2600-i2c.yaml: Add global-regs and transfer-mode properties Date: Tue, 18 Nov 2025 09:40:32 +0800 Message-ID: <20251118014034.820988-3-ryan_chen@aspeedtech.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20251118014034.820988-1-ryan_chen@aspeedtech.com> References: <20251118014034.820988-1-ryan_chen@aspeedtech.com> X-Mailing-List: openbmc@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Subscribe: , , List-Unsubscribe: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain The AST2600 I2C controller supports three transfer modes: byte, buffer, and DMA. To allow board designers and firmware to explicitly select the preferred transfer mode for each controller instance. "aspeed,transfer-mode" to allow device tree to specify the desired transfer method used by each I2C controller instance. And AST2600 i2c controller have two register mode, one is legacy register layout which is mix controller/target register control together, another is new mode which is separate controller/target register control. Signed-off-by: Ryan Chen --- .../bindings/i2c/aspeed,ast2600-i2c.yaml | 29 +++++++++++++++++++ 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 e5484d18f616..4cb8a8a1bc84 100644 --- a/Documentation/devicetree/bindings/i2c/aspeed,ast2600-i2c.yaml +++ b/Documentation/devicetree/bindings/i2c/aspeed,ast2600-i2c.yaml @@ -40,6 +40,33 @@ properties: resets: maxItems: 1 + aspeed,transfer-mode: + description: | + ASPEED ast2600 platform equipped with 16 I2C controllers each i2c controller + have 1 byte transfer buffer(byte mode), 32 bytes buffer(buffer mode), and + 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. + - "dma": Each controller DMA mode is shared DMA engine. The AST2600 SoC + provides a single DMA engine shared for 16 I2C controllers, + so only a limited number of controllers can use DMA simultaneously. + Therefore, the DTS must explicitly assign which controllers are + 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 + + 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 @@ -62,4 +89,6 @@ examples: resets = <&syscon ASPEED_RESET_I2C>; clock-frequency = <100000>; interrupts = ; + aspeed,global-regs = <&i2c_global>; + aspeed,transfer-mode = "buffer"; }; -- 2.34.1