From patchwork Thu Jun 17 09:43:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jamin Lin X-Patchwork-Id: 462496 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D5BAC2B9F4 for ; Thu, 17 Jun 2021 09:45:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 165D261209 for ; Thu, 17 Jun 2021 09:45:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231332AbhFQJrQ (ORCPT ); Thu, 17 Jun 2021 05:47:16 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:42725 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231276AbhFQJrQ (ORCPT ); Thu, 17 Jun 2021 05:47:16 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 15H9Ug1G024610; Thu, 17 Jun 2021 17:30:42 +0800 (GMT-8) (envelope-from jamin_lin@aspeedtech.com) Received: from localhost.localdomain (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 17 Jun 2021 17:45:05 +0800 From: Jamin Lin To: Rob Herring , Joel Stanley , "Andrew Jeffery" , Philipp Zabel , "Wolfram Sang" , Arnd Bergmann , Jarkko Nikula , Jean Delvare , Geert Uytterhoeven , "Krzysztof Kozlowski" , Khalil Blaiech , Yicong Yang , =?utf-8?b?QmVuY2UgQ3PDs2vDoXM=?= , Mike Rapoport , =?utf-8?q?Uwe_Kleine-K=C3=B6n?= =?utf-8?q?ig?= , Ryan Chen , "open list:I2C SUBSYSTEM HOST DRIVERS" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list CC: , , Subject: [PATCH 1/3] dts: aspeed: Add node for AST2600 I2C and I2CS Date: Thu, 17 Jun 2021 17:43:38 +0800 Message-ID: <20210617094424.27123-2-jamin_lin@aspeedtech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210617094424.27123-1-jamin_lin@aspeedtech.com> References: <20210617094424.27123-1-jamin_lin@aspeedtech.com> MIME-Version: 1.0 X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 15H9Ug1G024610 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Support byte-mode, dma-mode and buffer-mode for data transfer of I2C. Add i2c-global-regs node to support the new register set Add node to support I2CS. Signed-off-by: Jamin Lin --- arch/arm/boot/dts/aspeed-g6.dtsi | 150 ++++++++++++++++++++++++------- 1 file changed, 118 insertions(+), 32 deletions(-) diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi index f96607b7b4e2..e83df01123fe 100644 --- a/arch/arm/boot/dts/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed-g6.dtsi @@ -667,6 +667,13 @@ clocks = <&syscon ASPEED_CLK_GATE_FSICLK>; status = "disabled"; }; + + i2csec: bus@1e7a8000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x1e7a8000 0x1000>; + }; }; }; }; @@ -674,12 +681,20 @@ #include "aspeed-g6-pinctrl.dtsi" &i2c { + + i2c_gr: i2c-global-regs@0 { + compatible = "aspeed,ast2600-i2c-global", "syscon"; + reg = <0x0 0x20>; + clocks = <&syscon ASPEED_CLK_APB2>; + resets = <&syscon ASPEED_RESET_I2C>; + }; + i2c0: i2c-bus@80 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x80 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x80 0x80>, <0xC00 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -690,11 +705,11 @@ }; i2c1: i2c-bus@100 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x100 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x100 0x80>, <0xC20 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -705,11 +720,11 @@ }; i2c2: i2c-bus@180 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x180 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x180 0x80>, <0xC40 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -720,11 +735,11 @@ }; i2c3: i2c-bus@200 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x200 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x200 0x80>, <0xC60 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -735,11 +750,11 @@ }; i2c4: i2c-bus@280 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x280 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x280 0x80>, <0xC80 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -750,11 +765,11 @@ }; i2c5: i2c-bus@300 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x300 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x300 0x80>, <0xCA0 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -765,11 +780,11 @@ }; i2c6: i2c-bus@380 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x380 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x380 0x80>, <0xCC0 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -780,11 +795,11 @@ }; i2c7: i2c-bus@400 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x400 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x400 0x80>, <0xCE0 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -795,11 +810,11 @@ }; i2c8: i2c-bus@480 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x480 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x480 0x80>, <0xD00 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -810,11 +825,11 @@ }; i2c9: i2c-bus@500 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x500 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x500 0x80>, <0xD20 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -825,11 +840,11 @@ }; i2c10: i2c-bus@580 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x580 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x580 0x80>, <0xD40 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -840,11 +855,11 @@ }; i2c11: i2c-bus@600 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x600 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x600 0x80>, <0xD60 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -855,11 +870,11 @@ }; i2c12: i2c-bus@680 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x680 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x680 0x80>, <0xD80 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -870,11 +885,11 @@ }; i2c13: i2c-bus@700 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x700 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x700 0x80>, <0xDA0 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -885,11 +900,11 @@ }; i2c14: i2c-bus@780 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x780 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x780 0x80>, <0xDC0 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -900,11 +915,11 @@ }; i2c15: i2c-bus@800 { + compatible = "aspeed,ast2600-i2c-bus"; #address-cells = <1>; #size-cells = <0>; #interrupt-cells = <1>; - reg = <0x800 0x80>; - compatible = "aspeed,ast2600-i2c-bus"; + reg = <0x800 0x80>, <0xDE0 0x20>; clocks = <&syscon ASPEED_CLK_APB2>; resets = <&syscon ASPEED_RESET_I2C>; interrupts = ; @@ -914,3 +929,74 @@ status = "disabled"; }; }; + +&i2csec { + + i2c_gr0: i2c-global-regs@0 { + compatible = "aspeed,ast2600-i2c-global", "syscon"; + reg = <0x0 0x20>; + clocks = <&syscon ASPEED_CLK_APB2>; + status = "disabled"; + }; + + i2c16: i2c-bus@80 { + compatible = "aspeed,ast2600-i2c-bus"; + #address-cells = <1>; + #size-cells = <0>; + #interrupt-cells = <1>; + reg = <0x80 0x80>, <0xC00 0x20>; + clocks = <&syscon ASPEED_CLK_APB2>; + interrupts = ; + bus-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1_default>; + buff-mode; + status = "disabled"; + }; + + i2c17: i2c-bus@100 { + compatible = "aspeed,ast2600-i2c-bus"; + #address-cells = <1>; + #size-cells = <0>; + #interrupt-cells = <1>; + reg = <0x100 0x80>, <0xC20 0x20>; + clocks = <&syscon ASPEED_CLK_APB2>; + interrupts = ; + bus-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c2_default>; + buff-mode; + status = "disabled"; + }; + + i2c18: i2c-bus@180 { + compatible = "aspeed,ast2600-i2c-bus"; + #address-cells = <1>; + #size-cells = <0>; + #interrupt-cells = <1>; + reg = <0x180 0x80>, <0xC40 0x20>; + clocks = <&syscon ASPEED_CLK_APB2>; + interrupts = ; + bus-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3_default>; + buff-mode; + status = "disabled"; + }; + + i2c19: i2c-bus@200 { + compatible = "aspeed,ast2600-i2c-bus"; + #address-cells = <1>; + #size-cells = <0>; + #interrupt-cells = <1>; + reg = <0x200 0x80>, <0xC60 0x20>; + clocks = <&syscon ASPEED_CLK_APB2>; + interrupts = ; + bus-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c4_default>; + buff-mode; + status = "disabled"; + }; + +};