From nobody Sun Feb 8 00:03:24 2026 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (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 C1AC12FC873; Tue, 21 Oct 2025 22:44:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761086678; cv=none; b=VOw5/526hLARzdGm7ZrQuorDvuv0TUTbsdL6uAXleESfazTKB2kjbwBqrM7rYWWtQpZkTaRM8aNl7zklpYqWLJxGV2c3NVTEACj8Uq4x6HKfFwv3F+gnzyuH/8jlI/yDEVSBuXdOoauWiWDvo8weNOSxNavK6fLHwgxy9sSs6xE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761086678; c=relaxed/simple; bh=8a0ujLCRHrcYmX01srLTIoTcPwKvrYwdagJW/lcPt6M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SDBhlFYXLiqyZWNprTYnGHRgifxElFlCjHLSV314y4MxhVvD+qXqmh6mtkuoe8XPJKFrbhiIauR2AzNRccPQ5dGw/RA8xFULKg7OPUl/TQ2RRP4V8ro2ywpGjnySiLHwRztlRO9FhIi5Y0HuUIOJd0r2uE1bG9q2lMcgaslrxZ0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b=ch6m+f/C; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b="ch6m+f/C" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type; bh=UYh/0i24HCJ6lXNDk9gAdvGbxmlL+x4q7FpUyO+HQ7o=; b=ch6m+f/CI9mAs2E4+YUWDjmvIP orPNQti3zb81TRTs+Q56UsjTTfydyVOgWktw43FYnUfwJzLobhu8RYf0Hk8FkXyGkyHvVm+4a6T9H PHKomt/+no5eaFYXUpdSiBbguqIiytJUC5pUBEB80+J35xLEraQb+DDPDk747WE67BCkQLvF/v7io G17DIuO7z1tgiXdDYqXZqPB61jRciY3GEK75G3fTJER6wmw/5n5fullbauxBw3+UbosvTxu9KTmn6 y7tg3n6Jlmp8sRSx8VdyjsqekuUyAM/zBJwU4+3of6TSwSeBZMCzL7VBAPUmLbUr+Ol7VM2RDKZa6 WuLs079g==; Received: from i53875b19.versanet.de ([83.135.91.25] helo=phil.fritz.box) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vBL5b-0006q7-Lh; Wed, 22 Oct 2025 00:44:23 +0200 From: Heiko Stuebner To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] dt-bindings: net: snps,dwmac: move rk3399 line to its correct position Date: Wed, 22 Oct 2025 00:43:54 +0200 Message-ID: <20251021224357.195015-2-heiko@sntech.de> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20251021224357.195015-1-heiko@sntech.de> References: <20251021224357.195015-1-heiko@sntech.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Move the rk3399 compatible to its alphabetically correct position. Signed-off-by: Heiko Stuebner Acked-by: Conor Dooley Reviewed-by: Andrew Lunn --- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Docume= ntation/devicetree/bindings/net/snps,dwmac.yaml index 658c004e6a5c..28113ac5e11a 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -86,9 +86,9 @@ properties: - rockchip,rk3328-gmac - rockchip,rk3366-gmac - rockchip,rk3368-gmac + - rockchip,rk3399-gmac - rockchip,rk3576-gmac - rockchip,rk3588-gmac - - rockchip,rk3399-gmac - rockchip,rv1108-gmac - snps,dwmac - snps,dwmac-3.40a --=20 2.47.2 From nobody Sun Feb 8 00:03:24 2026 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (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 604A72E7166; Tue, 21 Oct 2025 22:44:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761086678; cv=none; b=hMJbAxiUD6QdJNWX0R+qVWkiF/9nM+liI0smj2CSEy1hQd7rD2PhbdtYxr7vucgUoknkGb8yaFKPJXncWFLIbv//dgozYVrpdVJ+zXCCykb3+zrtggeAhahgF2mxSOISqvQh1dB35sf0jqCgZ4GYLh+5aOA5TZNe80d3pNztHbc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761086678; c=relaxed/simple; bh=e1O5MVtYX4Z52Hjj6r2rI9/2MLdhbBCdCttOZ5445tc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=i3dCW44V6Y5E6Q51YAMDaiwGLlMLqfGdJbCTcwDxpgi90yi/bblUJ0z32ti9zS3E3cqsBwj9ToReQ+dtCAdLG1htRscUqqoVxE8TFOfgQOZ7+E71ILft2QbVQM7iOKHbh+zzuv7AT1zM+G1IOYcNd0qsZmZvrLoopuMHSLb1h+8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b=DB8xmIlK; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b="DB8xmIlK" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type; bh=Ixw8Tn4SSAJGBrjXyuSJb8p28o5oWrElWJkI7VzZSGU=; b=DB8xmIlK9yrts9k7Vp7zIePx2U D8xZEER1XoamaJkNTPi/nWKcpuVf5Adid65lUbRAdyLLXZU+GANm5Vgq7HotEZq4isYxl6/EP0S/w Q7mYdS//j8SE+aHlYYf7qtoPxBLWjhOh6CZrMHFoeQXGQGIJGUkv31VF/rU8JKJ+QMplb0ptppQ4D oJbuV5iwGSLL4HmrG2akURKuNsaPUf9DDOQs/g+IrSnFFzJpTFHE1lAm9eVANCPenDsTV/CbS57uX JQlOSrS4WAlluTjXqe+KgK8TJt4+Hj5rRb/EBds8uL2RVjf7blLBKq0sw3ktBSqdTj5Upk9sLkX0q Y8NI6GMg==; Received: from i53875b19.versanet.de ([83.135.91.25] helo=phil.fritz.box) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vBL5c-0006q7-Eh; Wed, 22 Oct 2025 00:44:24 +0200 From: Heiko Stuebner To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] dt-bindings: net: snps,dwmac: Sync list of Rockchip compatibles Date: Wed, 22 Oct 2025 00:43:55 +0200 Message-ID: <20251021224357.195015-3-heiko@sntech.de> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20251021224357.195015-1-heiko@sntech.de> References: <20251021224357.195015-1-heiko@sntech.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A number of dwmac variants from Rockchip SoCs have turned up in the Rockchip-specific binding, but not in the main list in snps,dwmac.yaml which as the comment indicates is needed for accurate matching. So add the missing rk3528, rk3568 and rv1126 to the main list. Signed-off-by: Heiko Stuebner Acked-by: Conor Dooley Reviewed-by: Andrew Lunn --- Documentation/devicetree/bindings/net/snps,dwmac.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Docume= ntation/devicetree/bindings/net/snps,dwmac.yaml index 28113ac5e11a..1a0d6789a59b 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -87,9 +87,12 @@ properties: - rockchip,rk3366-gmac - rockchip,rk3368-gmac - rockchip,rk3399-gmac + - rockchip,rk3528-gmac + - rockchip,rk3568-gmac - rockchip,rk3576-gmac - rockchip,rk3588-gmac - rockchip,rv1108-gmac + - rockchip,rv1126-gmac - snps,dwmac - snps,dwmac-3.40a - snps,dwmac-3.50a --=20 2.47.2 From nobody Sun Feb 8 00:03:24 2026 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (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 03DE02E8E09; Tue, 21 Oct 2025 22:44:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761086678; cv=none; b=p/udh1M+RKO0rQxb6vnuRY9+NtCj3Lpz4yQap+TvpQ4fG9OMYnVOwegW04dh5jZ8ODUYzwzUFlE2St9ME6Sbw162IuHSzCGJZU4JyZ/X9971/uA1F06JGxro/OOKG+QR6mwmln60oDcVArdFyw36tCwR/yoTBAJVZYH7mBBlG7Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761086678; c=relaxed/simple; bh=WeJfmHyei00p447QjgsE9IiL48Ztq9qheHraxlDpeQA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K/VF/6dPosNBmO8ZWIJ7uVUSkfUdzpJuPDSiqk+7sURDnwxKDHQjAeAWnmRZevR8svqmIxvn5QCiZg3A+JXKOZ7XVb44X9c/GE7ewNTp58hmLGkmJx/mOA/6D7/j9N7gshWx14tZWB0sjRwA2UJPDRzow3t22zLLboIBIW6gU5o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b=Vftz7HtP; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b="Vftz7HtP" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type; bh=6FoTuurwhJCTzhxL1K844VeX/g2bvcWy2Z6GNdQEJ48=; b=Vftz7HtPLbA1u3G6kUjaIj5GyO iT5a7S8KYNwVz/N2s6wHcRVL3g5SOzyaP1nm0At4lqwRIOp0eVo5wp69yNZPweF1i7KfCeH/Yk7GD vdmTkDWPWZGwdoFqkut6NK5uGyO3iOPxzJ/RDyNUs3q1afzWxv9AWi58oI0jNigPkkuy+suE/NlMK x6JLNG0Ynt8tcf28Oxc+MccN5TXzjEvt52NHI1yGLKYNQh/Acp3p07acFdKccpDs5ZQ0Tg48FFWRs cGz2arFS9JeQ6AUJsz4X0wicf7lb4hyG4EeJv30kUxAO5U7KRxCY1qPfuQivbQ5UjkY6LlIwDXH5b Sx8pEvBQ==; Received: from i53875b19.versanet.de ([83.135.91.25] helo=phil.fritz.box) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vBL5d-0006q7-8A; Wed, 22 Oct 2025 00:44:25 +0200 From: Heiko Stuebner To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] dt-bindings: net: rockchip-dwmac: Add compatible string for RK3506 Date: Wed, 22 Oct 2025 00:43:56 +0200 Message-ID: <20251021224357.195015-4-heiko@sntech.de> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20251021224357.195015-1-heiko@sntech.de> References: <20251021224357.195015-1-heiko@sntech.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rockchip RK3506 has two Ethernet controllers based on Synopsys DWC Ethernet QoS IP. Add compatible string for the RK3506 variant. Signed-off-by: Heiko Stuebner Acked-by: Conor Dooley Reviewed-by: Andrew Lunn --- Documentation/devicetree/bindings/net/rockchip-dwmac.yaml | 3 +++ Documentation/devicetree/bindings/net/snps,dwmac.yaml | 1 + 2 files changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml b/Do= cumentation/devicetree/bindings/net/rockchip-dwmac.yaml index 0ac7c4b47d6b..d17112527dab 100644 --- a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml @@ -24,6 +24,7 @@ select: - rockchip,rk3366-gmac - rockchip,rk3368-gmac - rockchip,rk3399-gmac + - rockchip,rk3506-gmac - rockchip,rk3528-gmac - rockchip,rk3568-gmac - rockchip,rk3576-gmac @@ -50,6 +51,7 @@ properties: - rockchip,rv1108-gmac - items: - enum: + - rockchip,rk3506-gmac - rockchip,rk3528-gmac - rockchip,rk3568-gmac - rockchip,rk3576-gmac @@ -148,6 +150,7 @@ allOf: compatible: contains: enum: + - rockchip,rk3506-gmac - rockchip,rk3528-gmac then: properties: diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Docume= ntation/devicetree/bindings/net/snps,dwmac.yaml index 1a0d6789a59b..dd3c72e8363e 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -87,6 +87,7 @@ properties: - rockchip,rk3366-gmac - rockchip,rk3368-gmac - rockchip,rk3399-gmac + - rockchip,rk3506-gmac - rockchip,rk3528-gmac - rockchip,rk3568-gmac - rockchip,rk3576-gmac --=20 2.47.2 From nobody Sun Feb 8 00:03:24 2026 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (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 7AA682E9EAA; Tue, 21 Oct 2025 22:44:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761086679; cv=none; b=bhegAZ0I+PiZz4fSDU185RMqW05W8bqaw3D+HUr2G8AVWeFb3L+Od+2wLGAnuFUI303eTDPwXXqj1DtiodOfQyzo64qgZmXfvO3y+7hnaRuL2HXyW43Bacmj3bPsxpBgHc8a0WQr0W9KRPoqZn34+jNNd9FXsRQuJH+ogtsib8A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761086679; c=relaxed/simple; bh=d2i8l5d8l/iC4brGst0MSs82HZr1NyyBRW8AcbdQBxY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SzKyf2m5qzS207dnLCorq16d1Gz/p40AFBdbjJ5f3uKiRyA0R5aHwQvoFYQHGp9zoSZt50F/b+OYxgfd5ft4FRdegnzoi3mXibhbdtUo/q9TH9GC0D2LAOhsOfLQ48DeXcFNMr4ANgC12/hYQVojPRYJ+5jlKOP8I5QMq70d1Lw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b=EEWtocEY; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b="EEWtocEY" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type; bh=k337ivC7NrcTNieDT0Q2eCyvA/Xn4/BzwHpob3IicHE=; b=EEWtocEYifRPL35M5DCVbhER71 srkwVoDTTN1rShvLxlZPgXDd+EDeu3IKVfHdF/KCQNwpEXi85il3xhUFF03wq7Kyvj2+HhbbwyNYs s9CI6ljwDopEZw4/6xul6a/r5YfLVIMuwhhOlVisR9QHW8Magow4D5i57wZj/QKib4p//Wm4Ev79l 0D+ID/rOm4R3g8/SsRIrbUcl4QD7QF8rPZxyTw+aKrFbiQiTKjgzP2f8Ve2Snb/2npiCAQlXbVkle Oyp511ZNscRpQ0oVf8eVxnFW91yvE7J2QamQV7S6t77Rt+DQ1hvYY4GZZMVV1TccxgkNW2mbdSyAy WtItemvQ==; Received: from i53875b19.versanet.de ([83.135.91.25] helo=phil.fritz.box) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vBL5e-0006q7-2z; Wed, 22 Oct 2025 00:44:26 +0200 From: Heiko Stuebner To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, heiko@sntech.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, David Wu Subject: [PATCH 4/4] ethernet: stmmac: dwmac-rk: Add RK3506 GMAC support Date: Wed, 22 Oct 2025 00:43:57 +0200 Message-ID: <20251021224357.195015-5-heiko@sntech.de> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20251021224357.195015-1-heiko@sntech.de> References: <20251021224357.195015-1-heiko@sntech.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: David Wu Add the needed glue blocks for the RK3506-specific setup. The RK3506 dwmac only supports up to 100MBit with a RMII PHY, but no RGMII. Signed-off-by: David Wu Signed-off-by: Heiko Stuebner Reviewed-by: Andrew Lunn --- .../net/ethernet/stmicro/stmmac/dwmac-rk.c | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/e= thernet/stmicro/stmmac/dwmac-rk.c index 51ea0caf16c1..e1e036e7163c 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -827,6 +827,84 @@ static const struct rk_gmac_ops rk3399_ops =3D { .set_speed =3D rk3399_set_speed, }; =20 +#define RK3506_GRF_SOC_CON8 0X0020 +#define RK3506_GRF_SOC_CON11 0X002c + +#define RK3506_GMAC_RMII_MODE GRF_BIT(1) + +#define RK3506_GMAC_CLK_RMII_DIV2 GRF_BIT(3) +#define RK3506_GMAC_CLK_RMII_DIV20 GRF_CLR_BIT(3) + +#define RK3506_GMAC_CLK_SELET_CRU GRF_CLR_BIT(5) +#define RK3506_GMAC_CLK_SELET_IO GRF_BIT(5) + +#define RK3506_GMAC_CLK_RMII_GATE GRF_BIT(2) +#define RK3506_GMAC_CLK_RMII_NOGATE GRF_CLR_BIT(2) + +static void rk3506_set_to_rmii(struct rk_priv_data *bsp_priv) +{ + struct device *dev =3D bsp_priv->dev; + unsigned int id =3D bsp_priv->id, offset; + + if (IS_ERR(bsp_priv->grf)) { + dev_err(dev, "%s: Missing rockchip,grf property\n", __func__); + return; + } + + offset =3D (id =3D=3D 1) ? RK3506_GRF_SOC_CON11 : RK3506_GRF_SOC_CON8; + regmap_write(bsp_priv->grf, offset, RK3506_GMAC_RMII_MODE); +} + +static int rk3506_set_speed(struct rk_priv_data *bsp_priv, + phy_interface_t interface, int speed) +{ + struct device *dev =3D bsp_priv->dev; + unsigned int val, offset, id =3D bsp_priv->id; + + switch (speed) { + case 10: + val =3D RK3506_GMAC_CLK_RMII_DIV20; + break; + case 100: + val =3D RK3506_GMAC_CLK_RMII_DIV2; + break; + default: + dev_err(dev, "unknown speed value for RMII! speed=3D%d", speed); + return -EINVAL; + } + + offset =3D (id =3D=3D 1) ? RK3506_GRF_SOC_CON11 : RK3506_GRF_SOC_CON8; + regmap_write(bsp_priv->grf, offset, val); + + return 0; +} + +static void rk3506_set_clock_selection(struct rk_priv_data *bsp_priv, + bool input, bool enable) +{ + unsigned int value, offset, id =3D bsp_priv->id; + + offset =3D (id =3D=3D 1) ? RK3506_GRF_SOC_CON11 : RK3506_GRF_SOC_CON8; + + value =3D input ? RK3506_GMAC_CLK_SELET_IO : + RK3506_GMAC_CLK_SELET_CRU; + value |=3D enable ? RK3506_GMAC_CLK_RMII_NOGATE : + RK3506_GMAC_CLK_RMII_GATE; + regmap_write(bsp_priv->grf, offset, value); +} + +static const struct rk_gmac_ops rk3506_ops =3D { + .set_to_rmii =3D rk3506_set_to_rmii, + .set_speed =3D rk3506_set_speed, + .set_clock_selection =3D rk3506_set_clock_selection, + .regs_valid =3D true, + .regs =3D { + 0xff4c8000, /* gmac0 */ + 0xff4d0000, /* gmac1 */ + 0x0, /* sentinel */ + }, +}; + #define RK3528_VO_GRF_GMAC_CON 0x0018 #define RK3528_VO_GRF_MACPHY_CON0 0x001c #define RK3528_VO_GRF_MACPHY_CON1 0x0020 @@ -1808,6 +1886,7 @@ static const struct of_device_id rk_gmac_dwmac_match[= ] =3D { { .compatible =3D "rockchip,rk3366-gmac", .data =3D &rk3366_ops }, { .compatible =3D "rockchip,rk3368-gmac", .data =3D &rk3368_ops }, { .compatible =3D "rockchip,rk3399-gmac", .data =3D &rk3399_ops }, + { .compatible =3D "rockchip,rk3506-gmac", .data =3D &rk3506_ops }, { .compatible =3D "rockchip,rk3528-gmac", .data =3D &rk3528_ops }, { .compatible =3D "rockchip,rk3568-gmac", .data =3D &rk3568_ops }, { .compatible =3D "rockchip,rk3576-gmac", .data =3D &rk3576_ops }, --=20 2.47.2