From patchwork Fri Oct 21 17:24:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 13015193 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 F34BCC433FE for ; Fri, 21 Oct 2022 17:25:24 +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: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:In-Reply-To:References: List-Owner; bh=/2dcTA1qzHnorBtdtEqWymeLXgHc+j7RaNlQ3xg9tvI=; b=pnL5d4s8AwKnJP Pd4x909A1Xzb7kS030fSd4Lllgw59jDMnWb2VzdPnVh+Ov8zpCcvqUIfB96ZxcoEJCq8dOtxVZEff vL4TdQ3gvV+towxBqaemgEg9QVsEoRjdNNMyk7PA1+8CDLsh+ueY1pNSXK2VDrMKMZgRzAgb+yvt4 YDmT36IH5BfEFAZtKgVaIJjRWjq9FFyxj1brIjRLmuDVHE9yWrmtL3BXIx3SSuRhNENSVwe+tACS5 ObXeq9mdLayGjjaQRzXMJG9F0njhmRK2Lp4SKf7rKTR6mfBqrSM99kqMwrRzfXh4Tw0rN1k4UFKAG 9nH9njzY1SeW9Zmb7VDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1olvl4-009B0e-DB; Fri, 21 Oct 2022 17:24:34 +0000 Received: from madras.collabora.co.uk ([46.235.227.172]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1olvl1-009Azp-Rg; Fri, 21 Oct 2022 17:24:33 +0000 Received: from jupiter.universe (dyndsl-037-138-189-087.ewe-ip-backbone.de [37.138.189.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id 4A5CD660226D; Fri, 21 Oct 2022 18:24:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1666373070; bh=gen1/fy7A3678eOhQrY2FyxvyBfzVMxM5cZuLTNcfxg=; h=From:To:Cc:Subject:Date:From; b=WjH72eSkpt6cPaaqKOfkiCfZm7nCxegMsTCW4cpKg6l6+touZvz/t+QIYEqZ8U55v /AsRiUhqMzGkF7hLjPZfKzKhK1IqmLf/FNRwprDVYXDDMBXW1kjwkv70RuKQHM8W+p NWKYtRT8TP/WbJWq0do1BKrDdqdID2TchoByABezEq8QhRnxmSTGlHQaRnw/YcnMCO D/kKAU/1SGVU8b8xxwDLzT0ojAEYv5YsRJ7XxbFBAnur5lt7TXnKqth4GV0Z9RhOSk PZTdrDdRCg5EsMNnMmk4V2FhR3dEeJV/t6d0YDVU8R9Es6KgoChvEVyXBS1noI8fZo Tj3x+DlPUNAUw== Received: by jupiter.universe (Postfix, from userid 1000) id 6E72148082E; Fri, 21 Oct 2022 19:24:28 +0200 (CEST) From: Sebastian Reichel To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Benjamin Gaignard , kernel@collabora.com, Sebastian Reichel Subject: [PATCH 1/1] net: stmmac: rk3588: Allow multiple gmac controller Date: Fri, 21 Oct 2022 19:24:22 +0200 Message-Id: <20221021172422.88534-1-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221021_102432_051788_29B71A3E X-CRM114-Status: GOOD ( 10.33 ) 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 From: Benjamin Gaignard RK3588(s) can have multiple gmac controllers. Re-use rk3568 logic to distinguish them. Fixes: 2f2b60a0ec28 ("net: ethernet: stmmac: dwmac-rk: Add gmac support for rk3588") Signed-off-by: Benjamin Gaignard Signed-off-by: Sebastian Reichel --- This is required to access gmac1, which is the only existing controller in the rk3588s (slim variant of rk3588). --- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index f7269d79a385..6656d76b6766 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -1243,6 +1243,12 @@ static const struct rk_gmac_ops rk3588_ops = { .set_rgmii_speed = rk3588_set_gmac_speed, .set_rmii_speed = rk3588_set_gmac_speed, .set_clock_selection = rk3588_set_clock_selection, + .regs_valid = true, + .regs = { + 0xfe1b0000, /* gmac0 */ + 0xfe1c0000, /* gmac1 */ + 0x0, /* sentinel */ + }, }; #define RV1108_GRF_GMAC_CON0 0X0900