From patchwork Tue Aug 8 15:42:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Hung X-Patchwork-Id: 13346160 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 80370C001DB for ; Tue, 8 Aug 2023 15:43:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E2DDMX536vvbSzADhUWZ0TpaUS2C9wGXRsT3IL4td34=; b=s8CPXmDzqxugXs akWZHQQ58RJrdqt0TKXKMEsjUyEtBVU/lAd3KfqSMl6qHgSVHpU01hF1ZqxGHjFcrJhncDixYu91t qp8GQ8Un+ftb4q6w4FbRHR9kT6BFTg2CvCLWC1S1nrV6Ebe6lS820lRxBL4PQkNRKMsUW8TTy5yUM B1gz/eO9AMFOYbHCPR6L3i/0IKCyofADvV4SlRAIcvuyKRjai4Xu/Cow3M+WH4OMaaDv+XGCwYIvd oJN+99sA1iZGcgZ1KQ0Rszfd7iYm6CDObkqIG6mfOj4wdD1vMUnXeOYk+7HCi789O0YPf258HSkhP eutFBqn0IZaSXUcMAuSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTOrM-002pZW-19; Tue, 08 Aug 2023 15:43:00 +0000 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX02.aspeed.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTOrE-002pVn-3A; Tue, 08 Aug 2023 15:42:54 +0000 Received: from TWMBX02.aspeed.com (192.168.0.24) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 8 Aug 2023 23:42:44 +0800 Received: from localhost.localdomain (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 8 Aug 2023 23:42:44 +0800 From: Dylan Hung To: , , , , , , , , , , , , CC: , Subject: [PATCH 1/3] ARM: dts: pinctrl-aspeed-g6: Add I3C1 and I3C2 control pins Date: Tue, 8 Aug 2023 23:42:39 +0800 Message-ID: <20230808154241.749641-2-dylan_hung@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230808154241.749641-1-dylan_hung@aspeedtech.com> References: <20230808154241.749641-1-dylan_hung@aspeedtech.com> MIME-Version: 1.0 Received-SPF: Fail (TWMBX02.aspeed.com: domain of dylan_hung@aspeedtech.com does not designate 192.168.10.10 as permitted sender) receiver=TWMBX02.aspeed.com; client-ip=192.168.10.10; helo=localhost.localdomain; X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230808_084253_020035_5577EFE7 X-CRM114-Status: UNSURE ( 7.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add pinctrl support for the I3C1 and I3C2 pins. Signed-off-by: Dylan Hung --- arch/arm/boot/dts/aspeed/aspeed-g6-pinctrl.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/aspeed/aspeed-g6-pinctrl.dtsi b/arch/arm/boot/dts/aspeed/aspeed-g6-pinctrl.dtsi index 7cd4f075e325..289668f051eb 100644 --- a/arch/arm/boot/dts/aspeed/aspeed-g6-pinctrl.dtsi +++ b/arch/arm/boot/dts/aspeed/aspeed-g6-pinctrl.dtsi @@ -297,6 +297,16 @@ pinctrl_i2c9_default: i2c9_default { groups = "I2C9"; }; + pinctrl_i3c1_default: i3c1_default { + function = "I3C1"; + groups = "I3C1"; + }; + + pinctrl_i3c2_default: i3c2_default { + function = "I3C2"; + groups = "I3C2"; + }; + pinctrl_i3c3_default: i3c3_default { function = "I3C3"; groups = "I3C3"; From patchwork Tue Aug 8 15:42:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Hung X-Patchwork-Id: 13346162 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E9086C001DB for ; Tue, 8 Aug 2023 15:43:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9+pKrmQnS8iW7593TfEXJpZXBuRz4IaANW83XdTQXRI=; b=cpyt2fr62ousgg 5++wb6yNbY75UD+sMsCQ/7fDhX+lK9YVZ0JiMN4KI2Gn7LrejdBRWUsnbxg5m4MwSD5t8U/Vx9hsE LGmKRllCOMkp1w4iFpqY4ZyO8dUI9A59Uj65bdZL8og1G9nz4fpItjHGdERkafg+2ig2YDmZkbRTV JWxTeZ1j8OT5D0E422C9ScOyAo+DCFmZrsEWK1h9AmCNx19fcPsR94zzZtk1Ao0ioSMuAkJ6UqvV9 gqLEkZOPwlOTGBH+cumKN8ojU6RaT9wTVDE3E6QK3B10m4361OL9gLXRIK5/gcrmbt7Qx1YWMgg79 CUh6lNf0V3XSnP6t8odQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTOrN-002pZr-0E; Tue, 08 Aug 2023 15:43:01 +0000 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX02.aspeed.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTOrG-002pVn-1k; Tue, 08 Aug 2023 15:42:55 +0000 Received: from TWMBX02.aspeed.com (192.168.0.24) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 8 Aug 2023 23:42:45 +0800 Received: from localhost.localdomain (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 8 Aug 2023 23:42:45 +0800 From: Dylan Hung To: , , , , , , , , , , , , CC: , Subject: [PATCH 2/3] dt-bindings: i3c: ast2600: Add resets and reset-names Date: Tue, 8 Aug 2023 23:42:40 +0800 Message-ID: <20230808154241.749641-3-dylan_hung@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230808154241.749641-1-dylan_hung@aspeedtech.com> References: <20230808154241.749641-1-dylan_hung@aspeedtech.com> MIME-Version: 1.0 Received-SPF: Fail (TWMBX02.aspeed.com: domain of dylan_hung@aspeedtech.com does not designate 192.168.10.10 as permitted sender) receiver=TWMBX02.aspeed.com; client-ip=192.168.10.10; helo=localhost.localdomain; X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230808_084254_575479_B477A1D8 X-CRM114-Status: UNSURE ( 9.00 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add two reset lines to the AST2600 I3C controller: - core_rst: the reset line of the controller itself - global_rst: the reset line of the I3C global register block. Since all six I3C controllers in AST2600 share this global register block, the driver needs to handle this carefully. Generally, this reset line should only need to be de-asserted. Signed-off-by: Dylan Hung --- .../devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml b/Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml index fcc3dbff9c9a..3166d6f3a39c 100644 --- a/Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml +++ b/Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml @@ -23,7 +23,12 @@ properties: maxItems: 1 resets: - maxItems: 1 + maxItems: 2 + + reset-names: + items: + - const: core_rst + - const: global_rst interrupts: maxItems: 1 @@ -48,6 +53,8 @@ required: - compatible - reg - clocks + - resets + - reset-names - interrupts - aspeed,global-regs @@ -63,7 +70,8 @@ examples: #address-cells = <3>; #size-cells = <0>; clocks = <&syscon 0>; - resets = <&syscon 0>; + resets = <&syscon 40>, <&syscon 39>; + reset-names = "core_rst", "global_rst"; aspeed,global-regs = <&i3c_global 0>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i3c1_default>; From patchwork Tue Aug 8 15:42:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dylan Hung X-Patchwork-Id: 13346161 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 17828C001DB for ; Tue, 8 Aug 2023 15:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MC7mvF/NVLBmBjZXQk+29t9+MOcjn2fACSAC/4qiGW8=; b=x0dac+K/oldb06 Au16WMJO1D0MW2oLHD5gMA1NDpm3sEz0MnfSzy6bPPWvpyq8jtUEN6OEgAw3LhJRvDN7k7oDHU4tG 91gLfmzUkl2SdTHEV8k+0i1B7I99ytaRUHT/0JLV5tNOkZns2sN+dUBlBF1gBwHnc7l4FPeuGuTYA VlQkSykY+1COPeccG2fFRUiQvHEjn76x2/rCgJ1Gw8LKjEdddrl40O2O5Eu4krlA7HKCNn1z+kisS yxnwI51d7F55R3A68Z0YXX5idQ9u38Ez5ys3QuYMBpvofS2mrNZ4iH4MqK8mz+sz/IxwBNPaB84kC 4gJ0FVsqfqIWKa+sCCcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTOrG-002pXi-2d; Tue, 08 Aug 2023 15:42:54 +0000 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX03.aspeed.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTOrB-002pVw-03; Tue, 08 Aug 2023 15:42:52 +0000 Received: from TWMBX02.aspeed.com (192.168.0.24) by TWMBX03.aspeed.com (192.168.0.62) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 8 Aug 2023 23:42:45 +0800 Received: from localhost.localdomain (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 8 Aug 2023 23:42:45 +0800 From: Dylan Hung To: , , , , , , , , , , , , CC: , Subject: [PATCH 3/3] i3c: ast2600: Add reset deassertion for global registers Date: Tue, 8 Aug 2023 23:42:41 +0800 Message-ID: <20230808154241.749641-4-dylan_hung@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230808154241.749641-1-dylan_hung@aspeedtech.com> References: <20230808154241.749641-1-dylan_hung@aspeedtech.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230808_084249_069951_C300A240 X-CRM114-Status: UNSURE ( 8.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add missing reset deassertion of the I3C global control registers. Signed-off-by: Dylan Hung --- drivers/i3c/master/ast2600-i3c-master.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/i3c/master/ast2600-i3c-master.c b/drivers/i3c/master/ast2600-i3c-master.c index 09ed19d489e9..5d9d060134e0 100644 --- a/drivers/i3c/master/ast2600-i3c-master.c +++ b/drivers/i3c/master/ast2600-i3c-master.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "dw-i3c-master.h" @@ -128,6 +129,7 @@ static int ast2600_i3c_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct of_phandle_args gspec; struct ast2600_i3c *i3c; + struct reset_control *rst; int rc; i3c = devm_kzalloc(&pdev->dev, sizeof(*i3c), GFP_KERNEL); @@ -156,6 +158,13 @@ static int ast2600_i3c_probe(struct platform_device *pdev) dev_err(&pdev->dev, "invalid sda-pullup value %d\n", i3c->sda_pullup); + rst = devm_reset_control_get_shared(&pdev->dev, "global_rst"); + if (IS_ERR(rst)) { + dev_err(&pdev->dev, "missing of invalid reset entry"); + return PTR_ERR(rst); + } + reset_control_deassert(rst); + i3c->dw.platform_ops = &ast2600_i3c_ops; i3c->dw.ibi_capable = true; return dw_i3c_common_probe(&i3c->dw, pdev);