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: 13878390 X-Patchwork-Delegate: kuba@kernel.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 smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A4E8194AD6; Mon, 18 Nov 2024 10:47:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731926876; cv=none; b=EIKxShL+CAye1J1EMlPCOEv+2xU2+Yg3/JYLIf4JyZxFdHk8fRyCfNXKGukUn78gOvnjpVti5gmKQoRiYnFZlRTXLyGrk3eUQUECTlXbliasYmFboii7u7GSW/xlsN9C7Q5qEpXYN+/SFrzNEm5U3t+6KpIk12tk7bqu+jB1Oxo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731926876; c=relaxed/simple; bh=MFJtfGhQG+eUUL07mlL/G5apKuXSm2L4i8KUzokOPHw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HzXhf4baMfSDrREFXg4dE8QnqgZ5x6Tkwep3vO9W9EC0+hn34lhiwGIiolnRwhWFM51fcUZ16z5Vo9HCXyCIyVw1l2Mns5hLv6Xhx25hFDmbbNxFbqbJiJ/NsqJy4vPFntehL01MU6NJOQh1ptekzhb9MxtFEWG3joOtX4TodFk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com 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> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.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: 13878391 X-Patchwork-Delegate: kuba@kernel.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 smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A288196C6C; Mon, 18 Nov 2024 10:47:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731926878; cv=none; b=hMmXEybEXcaYOIf3IAIgD+LDoM3MVeWjPtRJalErPizSvx7Kg0RiY9ERcT1rsNLIeRlhV1Dz8b5lVJRzgWooM1YRxxaZKVfcy2vsoaY/BvvKVbIuSf+Gf2pNF3hETv2uT+fD3sA84bL1tmosV/EHw8EWGcLUURx6VGJaqmiZ3BY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731926878; c=relaxed/simple; bh=dXLOxAWUC9uvWEp4IdnazNBiiiYWM19Awg/Y3cHQtN8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cWn8mdW0RvqXyIajpSPWo4UrKyF3R+jJGaBmQj5L9Eg3ZZkb5xSg/VA5pi1xCOX3zaSbK7vZA5+HYHOJmawRxC8KDPeHnPkX1JZJaelP+aZFEyKECpnHR8Y0boXtgH3MpcRAFaq9ILhIeShnVEQCxQ/eRmKzTIgXCp1o6QPvQvU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com 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> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.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: 13878392 X-Patchwork-Delegate: kuba@kernel.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 smtp.subspace.kernel.org (Postfix) with ESMTPS id 803171991AF; Mon, 18 Nov 2024 10:47:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731926880; cv=none; b=r5QQEVc/Y7prvIbtChdr+Qb+KLkn8PVYanXLu7eudqwHimXEtxp0PsNUTW12FaM2PnNRfRuc8hRgnI3HgUtn2PHqe14O2EhIIycXPAdwIZv2IOYlSDm2ZZlxfriHQyXQYgBiOdz1p3MWUilqn/woWNY0Z2+PaCvaACPJPTFFVH4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731926880; c=relaxed/simple; bh=UrWPpTx4MwnWXf2qpZmAB3pF1AYWlHqHVxM3NaUcazE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=O+CbO2eVW0elsEaVXRWZzf5RKilCYYpE0LMKqHaEhUSzncorr5unnrdJigG+Ok6Xpg+u0BAZ/ug1YYrdR4RAiiYULEa3g3T65/PLe/zgZySXOcLVrwZ+Mb31YOp9Azh3EiW4eoktkqU2+BhyRodiman8oifD1E8rLPd4IErgFFA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com 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> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.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),