Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp379401pxj; Thu, 17 Jun 2021 05:02:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5OWZd3aHWh03bywrVoucUKtchJ+7AglJH5bRtcG37BM5ZwEtFfaoDLREjT/mPA2MMu87E X-Received: by 2002:a92:c852:: with SMTP id b18mr1240515ilq.18.1623931375188; Thu, 17 Jun 2021 05:02:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623931375; cv=none; d=google.com; s=arc-20160816; b=gv6vF2L2MgJpXV4TDhn+pgErtmzKOaJrUGabL5b2fzRh8jCDLmg+iblOoO9owBQzpV vL0Q0Sa9Z9xkzsUMxmbrRT6ca45min2K0XEDHNIzyrAOSSMfE0ZVMPIub/+k1kjub63i jOGyOhWDthrBh+gy6CJ7FTdw1YW250LRR4ul2aBQtI+/4YvqYKUnzSJjMeTpthhOK9My Si5j8TDegZuFl/cZ/frytts2Mi2G09v8cj2fyyZdocKn6GAPXGeGRbMmGQx+wqV0G9N4 fD6EDIw6eJXEq0Dp+Ns+VZde8ftsDcW11NiKzeh81DdFa/7yGj88jzET0QBJe/I931yI EgEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=KNTpi9737bb0DtSYt+7M2Zo5NTWIV3Z59cikpyyXmG8=; b=X3saXC8r0SZOHGHTl+dvypIu+ehys6sXqx6wzdT9TqiavmXDkWNMxablYr8afq1B9J tVSgB0/g6Q0wVax/Td46mhdGpzeRYUzQciaN0ybm+57Wk4XHmUozVjUfXqYA3bX7Sn/0 GEmT5Pd9x1DA8LvwBBov5unpjFRieopaiRtfFBN63TjorDCHBdFY7MGGc+WavpeIPiCj +1yQLA4nvpoU13kksVrmCgxMuAyb10mBAXZrm3jvVpAzKeN8HI3VQT4EAtaU/nS8KoZ6 R7QzAXEfLlagL/3kD69maJcb+C0h/NhBIvDjgK4fQ0pFR+jWN19m8Wj7BoPJgq0zzfRi SYvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si5499090ilm.43.2021.06.17.05.02.37; Thu, 17 Jun 2021 05:02:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231785AbhFQJs2 (ORCPT + 99 others); Thu, 17 Jun 2021 05:48:28 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:42778 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231702AbhFQJs1 (ORCPT ); Thu, 17 Jun 2021 05:48:27 -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?q?Bence=20Cs=C3=B3k=C3=A1s?= , Mike Rapoport , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , 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 Content-Type: text/plain 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-kernel@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"; + }; + +}; -- 2.17.1