From patchwork Mon Nov 18 10:47:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacky Chou X-Patchwork-Id: 13878401 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 014A7D4920A for ; Mon, 18 Nov 2024 10:50:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=UDDXxi4uGLS5kcqxV/ikSmUx6b1SG0YGEBY1S1cB6EE=; b=OnP1biebT2xe96V5kVpC4d3oDs nxaTTPscq/PnG9LJF6sdi32xKZFfqGxYgJW2viDwO4VzkxCRNBg37PrpO14JLPoXqkSf8DVrlLNn0 WaPbRWxvJ9/64vhbUUHodM9FCZAlKSqx4hHrxUb4eF87pJ5x8JgR0pEptsvRMM54NgoDkGsm8Dqgp H3/XVYiuzqAJSSqLNQOMHNALyv43brhWLb3VnYXHEPbJ6qdXdOtyHwsm2gvmaI6lpmJgxoqv5w6Gc Cvo1xkeooqd9wOyqLXXf9/If8D3U0kGwDT1YiZcse20QlQe8DwgdJIQKlgNIKbscKs5y/d9IQt5A0 tU20A9Ig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tCzKO-000000098oU-3rqZ; Mon, 18 Nov 2024 10:49:56 +0000 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX01.aspeed.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tCzIa-000000098Sb-0mcW for linux-arm-kernel@lists.infradead.org; Mon, 18 Nov 2024 10:48:08 +0000 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.1258.12; Mon, 18 Nov 2024 18:47:35 +0800 Received: from mail.aspeedtech.com (192.168.10.10) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Mon, 18 Nov 2024 18:47:35 +0800 From: Jacky Chou To: , , , , , , , , , , , , , , , , CC: Subject: [net-next 1/3] dt-bindings: net: add support for AST2700 Date: Mon, 18 Nov 2024 18:47:33 +0800 Message-ID: <20241118104735.3741749-2-jacky_chou@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241118104735.3741749-1-jacky_chou@aspeedtech.com> References: <20241118104735.3741749-1-jacky_chou@aspeedtech.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241118_024804_222919_2DE40981 X-CRM114-Status: UNSURE ( 8.45 ) 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 The AST2700 is the 7th generation SoC from Aspeed. Add compatible support for AST2700 in yaml. Signed-off-by: Jacky Chou --- .../devicetree/bindings/net/aspeed,ast2600-mdio.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml b/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml index d6ef468495c5..6dadca099875 100644 --- a/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml +++ b/Documentation/devicetree/bindings/net/aspeed,ast2600-mdio.yaml @@ -19,7 +19,9 @@ allOf: properties: compatible: - const: aspeed,ast2600-mdio + enum: + - aspeed,ast2600-mdio + - aspeed,ast2700-mdio reg: maxItems: 1 From patchwork Mon Nov 18 10:47:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacky Chou X-Patchwork-Id: 13878402 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 16A45D49209 for ; Mon, 18 Nov 2024 10:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=SPU5goeuns660oHcMAGRdUiwdkcY7n2eVlOi32dIJk8=; b=MwYfr2nhpFVCygrIh5nsElC+kg yYWV2Ruh/op0LHEFVHQxKFyoTvIAxLNWt+/I80hPaRbjqlWZ2renoKIjowdpytBwGd9KwDJHKhcrr dgwI3tBYTHN17Dy9nTkLW4jqgFodqABJ6nLtTNOX9ufP29BN/yzZtO29QXhhdNBjI2snPbnpSWYOD Y3YZSUINKPdoAwFcG03l0/kHN+lYkl3aI9IJIxrQdqrMPlD8zdo/AisjZNlOFPZfmvKjQV5/qbhNd 44cnZisDpoeCbP99RXsN2aEGGQ9MXQlbxGuRWS5+jtSpw/QCPTw6gS3YPeIk7rXqM5NVgA2B41FcC +d9DcYFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tCzLI-000000098xi-2aiK; Mon, 18 Nov 2024 10:50:52 +0000 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX01.aspeed.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tCzIf-000000098Sb-0kE3 for linux-arm-kernel@lists.infradead.org; Mon, 18 Nov 2024 10:48:11 +0000 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.1258.12; Mon, 18 Nov 2024 18:47:35 +0800 Received: from mail.aspeedtech.com (192.168.10.10) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Mon, 18 Nov 2024 18:47:35 +0800 From: Jacky Chou To: , , , , , , , , , , , , , , , , CC: Subject: [net-next 2/3] net: mdio: aspeed: Add support for AST2700 Date: Mon, 18 Nov 2024 18:47:34 +0800 Message-ID: <20241118104735.3741749-3-jacky_chou@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241118104735.3741749-1-jacky_chou@aspeedtech.com> References: <20241118104735.3741749-1-jacky_chou@aspeedtech.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241118_024809_211095_317BDA1A X-CRM114-Status: UNSURE ( 8.83 ) 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 The Aspeed 7th generation SoC features three Aspeed MDIO. The design of AST2700 MDIO controller is the same as AST2600. Therefore, just add AST2700 compatible here. Signed-off-by: Jacky Chou --- drivers/net/mdio/mdio-aspeed.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/mdio/mdio-aspeed.c b/drivers/net/mdio/mdio-aspeed.c index e55be6dc9ae7..4d5a115baf85 100644 --- a/drivers/net/mdio/mdio-aspeed.c +++ b/drivers/net/mdio/mdio-aspeed.c @@ -188,6 +188,7 @@ static void aspeed_mdio_remove(struct platform_device *pdev) static const struct of_device_id aspeed_mdio_of_match[] = { { .compatible = "aspeed,ast2600-mdio", }, + { .compatible = "aspeed,ast2700-mdio", }, { }, }; MODULE_DEVICE_TABLE(of, aspeed_mdio_of_match); From patchwork Mon Nov 18 10:47:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacky Chou X-Patchwork-Id: 13878403 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 57001D4920A for ; Mon, 18 Nov 2024 10:51:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=ocZP62sqOruzfDRcHSC06VJ38d2NN114ZPSA7zd5WtQ=; b=VWbOzqme2qVswERDTZ709pwKe9 lCjU1q8AttNOMCiNIsjaGGMr7eWzOnPuA4zgQKHf2aq0wfgwmwocJXALor0/uQJDXpFzFUf6ZhXv2 Chy0ZrqRPOcRPWPD9zefgUh1QlEw4Z0DrGJ6cyBWeRvXapAnlKzckD5hxTACtMZYvLdHrRpQM9Bco sAtqlHvOoFI/LJRj0X0sZ/+G3bZZhqSAtlu2SmRh/m+uso+OAMck6sxyz6sR+JkDBRT35WBVLKVbR 7D6Eacwd4lebf6jPj+VdzhN3YhpmSfD9MgJlkreNzl7+RsJYwAtMDMtCd8SsgEJf+pIJa2aHAbYwh ZkWPgR7A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tCzMC-000000099HL-0zmE; Mon, 18 Nov 2024 10:51:48 +0000 Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX01.aspeed.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tCzIh-000000098Sb-2gkC for linux-arm-kernel@lists.infradead.org; Mon, 18 Nov 2024 10:48:13 +0000 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.1258.12; Mon, 18 Nov 2024 18:47:35 +0800 Received: from mail.aspeedtech.com (192.168.10.10) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1258.12 via Frontend Transport; Mon, 18 Nov 2024 18:47:35 +0800 From: Jacky Chou To: , , , , , , , , , , , , , , , , CC: Subject: [net-next 3/3] net: mdio: aspeed: Add dummy read for fire control Date: Mon, 18 Nov 2024 18:47:35 +0800 Message-ID: <20241118104735.3741749-4-jacky_chou@aspeedtech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241118104735.3741749-1-jacky_chou@aspeedtech.com> References: <20241118104735.3741749-1-jacky_chou@aspeedtech.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241118_024811_691157_22E4BA68 X-CRM114-Status: UNSURE ( 8.49 ) 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 a dummy read to ensure triggering mdio controller before starting polling the status of mdio controller. Signed-off-by: Jacky Chou --- drivers/net/mdio/mdio-aspeed.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mdio/mdio-aspeed.c b/drivers/net/mdio/mdio-aspeed.c index 4d5a115baf85..feae30bc3e78 100644 --- a/drivers/net/mdio/mdio-aspeed.c +++ b/drivers/net/mdio/mdio-aspeed.c @@ -62,6 +62,8 @@ static int aspeed_mdio_op(struct mii_bus *bus, u8 st, u8 op, u8 phyad, u8 regad, | FIELD_PREP(ASPEED_MDIO_DATA_MIIRDATA, data); iowrite32(ctrl, ctx->base + ASPEED_MDIO_CTRL); + /* Add dummy read to ensure triggering mdio controller */ + (void)ioread32(ctx->base + ASPEED_MDIO_CTRL); return readl_poll_timeout(ctx->base + ASPEED_MDIO_CTRL, ctrl, !(ctrl & ASPEED_MDIO_CTRL_FIRE),