From patchwork Fri May 14 11:38:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Schramm X-Patchwork-Id: 12257529 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB9A6C433ED for ; Fri, 14 May 2021 11:37:27 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4FB961457 for ; Fri, 14 May 2021 11:37:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4FB961457 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=manjaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=AHxmsZbIQRBcxrpb2HdfhLNr3Lp1mUBBQOHbcfr2t3s=; b=kiUMgyYlFAmsOz8i3ODAf/ftJ I5bUsHVsu/3WxVJ2b5GQ0uGkKlCfaDnjVscUF/jvU9Ii1W0JWi92rRIOYt3bix4L8RgWqrH3CJzXN UlcJq7z6K0uZYiRpQLRJnWqSElqvMwXVZCLH+3xHdfB9PInioRN7ozhhlVnEu1gAwjlVg9Li8hhdZ CeuAGAhvQb6OlTw1J0gydoVcd+74gQN+w9Rjo2/pa6aNV1sl4wqNAl0s/YnzABgljFRBAMzp6lIdK LOAh9IpGmgeZNvc9RqBv508Z5exK05OVQtg1PCUqG6/RQHQE1Q8NaUMN++O+jnAYKtdxMD1tTbFhY unBSBPm1w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhW8B-007vEt-Ok; Fri, 14 May 2021 11:37:23 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhW7n-007vAT-TT; Fri, 14 May 2021 11:37:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=MzCfjuOUFwDNp7UwhDxIZLc94Gf2wI8JCFYwNoHCzzU=; b=LRlnEg9Fa/3RHjufZ3u72nVfIF kYxJZ5MRh0DDqaxYWdU/Xrs/4vnNoRPf0pWaLnCq9ZRP+BWzQEfjz9F89QTcdEAA/r7WovM24EPfA Pxu0cT2i2C5y0wnuGVbcJ5wbhZOWzajQE7UqnfxYTEVRTINCcMe1DXzYleAaqV6zP3yYqNRdr1VTR rfkOpEJF5B0FY2xR9DpSvnostNa0dTud5suF2ULJMpbZVu8WNeY46AfpgKF/szhwaVNmgYRA5JIO4 Iwj6CcowELubMXd5u+ko9VOklw6yE+MWt/2wt5bmgylJPSWHejzQs4TloU5xA/wjBh8MK4suuPhdO c86qPzgA==; Received: from mail.manjaro.org ([176.9.38.148]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhW7l-00BwPr-Cw; Fri, 14 May 2021 11:36:58 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.manjaro.org (Postfix) with ESMTP id D958F22111F; Fri, 14 May 2021 13:36:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at manjaro.org Received: from mail.manjaro.org ([127.0.0.1]) by localhost (manjaro.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OjnBuv_pq9NX; Fri, 14 May 2021 13:36:53 +0200 (CEST) From: Tobias Schramm To: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, Heiko Stuebner Cc: "David S . Miller" , Jakub Kicinski , Rob Herring , Giuseppe Cavallaro , David Wu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tobias Schramm Subject: [PATCH 1/3] dt-bindings: net: rockchip-dwmac: add rk3308 gmac compatible Date: Fri, 14 May 2021 13:38:11 +0200 Message-Id: <20210514113813.2093534-2-t.schramm@manjaro.org> In-Reply-To: <20210514113813.2093534-1-t.schramm@manjaro.org> References: <20210514113813.2093534-1-t.schramm@manjaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_043657_604311_5C1F4202 X-CRM114-Status: UNSURE ( 8.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The Rockchip RK3308 has a gmac that is not fully compatible with any of the other Rockchip gmacs. This patch adds a compatible string for it. Signed-off-by: Tobias Schramm --- Documentation/devicetree/bindings/net/rockchip-dwmac.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml index 5acddb6171bf..34a660ad6b30 100644 --- a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml @@ -19,6 +19,7 @@ select: - rockchip,rk3128-gmac - rockchip,rk3228-gmac - rockchip,rk3288-gmac + - rockchip,rk3308-gmac - rockchip,rk3328-gmac - rockchip,rk3366-gmac - rockchip,rk3368-gmac @@ -38,6 +39,7 @@ properties: - rockchip,rk3128-gmac - rockchip,rk3228-gmac - rockchip,rk3288-gmac + - rockchip,rk3308-gmac - rockchip,rk3328-gmac - rockchip,rk3366-gmac - rockchip,rk3368-gmac From patchwork Fri May 14 11:38:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Schramm X-Patchwork-Id: 12257531 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03105C433ED for ; Fri, 14 May 2021 11:37:41 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7332361451 for ; Fri, 14 May 2021 11:37:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7332361451 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=manjaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=7VtglHJNyu28sEeh3OOoIjAbu0E3K/WpXKT2m+EWQcE=; b=pHME6nZAdD1BEc0KdF3+wWULp 7Cy3W3d/ODlDs3jiBFrrbjNg+KrIQI/b8OeVwZ52T4WTkYBDxdB1bQ2W744A+tr8auxpDazqBRHTV jAqzUmSG3lLE7KEv446VCSf3kTEzIwjFhQwj1dVY8Ezta6Y6PhbsPE5KLfzYfv4EaRR8U0rYypjFl eCxyUL7envE+dlmMzmatLCin+uuy1RN7RMDJK+Qem9CiVoUVv2HPfYB3BG1R7Q9pA8AKL/VaGP1ra p7+dZ5tCDZ/FxcN2vqXFXWuiZT3GDWzgef2iGFSfECR2N/Ygkja2JAeyVeeoxah1Kq+CgCdW2P6AC UBQOGq+mg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhW8M-007vJS-RO; Fri, 14 May 2021 11:37:34 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhW7q-007vAw-0L; Fri, 14 May 2021 11:37:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=U94mi1TBzrRVcSaidd6uZprpowusYmo06FzDkd6Tj7Y=; b=SniPi1GUEYRMEtWW+o+eZn7/hl UklDeLjhHHS49c/plWAwcEfRmlx6GxMew+PrVI1T/NbdB35f4Ds1UlmJp3v2FoNGLpfc9CssR1aRC fz/bW6Mhfgy+DUgIDi2y2fH1j08/9ZMTFBXktXoeXNT3HCzV9ywvMTEEpOxdKG7FbJLqvB04HL8Es LvH6DUQj1JuLenNfDhlI1QfFNqeIqnZp2FullEqca0EmXxOIKFxgGIZiR0+7BanI7o+FxHywgFph+ 3btT90uTQKM699mi8zGs1Da1or+KHctBF10RmPW0iIr2YsjWk0QqXdVXcHy0O5tRqUPb/4v9TO21U 1V+kYYYg==; Received: from mail.manjaro.org ([2a01:4f8:150:448b::1]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhW7n-00BwQE-BG; Fri, 14 May 2021 11:37:00 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.manjaro.org (Postfix) with ESMTP id 4C64D22118F; Fri, 14 May 2021 13:36:57 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at manjaro.org Received: from mail.manjaro.org ([127.0.0.1]) by localhost (manjaro.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sDY3N2aaJo1G; Fri, 14 May 2021 13:36:53 +0200 (CEST) From: Tobias Schramm To: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, Heiko Stuebner Cc: "David S . Miller" , Jakub Kicinski , Rob Herring , Giuseppe Cavallaro , David Wu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tobias Schramm Subject: [PATCH 2/3] net: stmmac: dwmac-rk: add support for rk3308 gmac Date: Fri, 14 May 2021 13:38:12 +0200 Message-Id: <20210514113813.2093534-3-t.schramm@manjaro.org> In-Reply-To: <20210514113813.2093534-1-t.schramm@manjaro.org> References: <20210514113813.2093534-1-t.schramm@manjaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_043659_557652_A8B93F7B X-CRM114-Status: GOOD ( 13.27 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The Rockchip RK3308 SoC has a gmac with only the RMII interface signals exposed. This patch adds support for it. Signed-off-by: Tobias Schramm --- .../net/ethernet/stmicro/stmmac/dwmac-rk.c | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 8d28a536e1bb..584db4ce6e39 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -482,6 +482,54 @@ static const struct rk_gmac_ops rk3288_ops = { .set_rmii_speed = rk3288_set_rmii_speed, }; +#define RK3308_GRF_MAC_CON0 0x04a0 + +/* RK3308_GRF_MAC_CON0 */ +#define RK3308_GMAC_PHY_INTF_SEL_RMII (GRF_CLR_BIT(2) | GRF_CLR_BIT(3) | \ + GRF_BIT(4)) +#define RK3308_GMAC_FLOW_CTRL GRF_BIT(3) +#define RK3308_GMAC_FLOW_CTRL_CLR GRF_CLR_BIT(3) +#define RK3308_GMAC_SPEED_10M GRF_CLR_BIT(0) +#define RK3308_GMAC_SPEED_100M GRF_BIT(0) + +static void rk3308_set_to_rmii(struct rk_priv_data *bsp_priv) +{ + struct device *dev = &bsp_priv->pdev->dev; + + if (IS_ERR(bsp_priv->grf)) { + dev_err(dev, "Missing rockchip,grf property\n"); + return; + } + + regmap_write(bsp_priv->grf, RK3308_GRF_MAC_CON0, + RK3308_GMAC_PHY_INTF_SEL_RMII); +} + +static void rk3308_set_rmii_speed(struct rk_priv_data *bsp_priv, int speed) +{ + struct device *dev = &bsp_priv->pdev->dev; + + if (IS_ERR(bsp_priv->grf)) { + dev_err(dev, "Missing rockchip,grf property\n"); + return; + } + + if (speed == 10) { + regmap_write(bsp_priv->grf, RK3308_GRF_MAC_CON0, + RK3308_GMAC_SPEED_10M); + } else if (speed == 100) { + regmap_write(bsp_priv->grf, RK3308_GRF_MAC_CON0, + RK3308_GMAC_SPEED_100M); + } else { + dev_err(dev, "unknown speed value for RMII! speed=%d", speed); + } +} + +static const struct rk_gmac_ops rk3308_ops = { + .set_to_rmii = rk3308_set_to_rmii, + .set_rmii_speed = rk3308_set_rmii_speed, +}; + #define RK3328_GRF_MAC_CON0 0x0900 #define RK3328_GRF_MAC_CON1 0x0904 #define RK3328_GRF_MAC_CON2 0x0908 @@ -1477,6 +1525,7 @@ static const struct of_device_id rk_gmac_dwmac_match[] = { { .compatible = "rockchip,rk3128-gmac", .data = &rk3128_ops }, { .compatible = "rockchip,rk3228-gmac", .data = &rk3228_ops }, { .compatible = "rockchip,rk3288-gmac", .data = &rk3288_ops }, + { .compatible = "rockchip,rk3308-gmac", .data = &rk3308_ops }, { .compatible = "rockchip,rk3328-gmac", .data = &rk3328_ops }, { .compatible = "rockchip,rk3366-gmac", .data = &rk3366_ops }, { .compatible = "rockchip,rk3368-gmac", .data = &rk3368_ops }, From patchwork Fri May 14 11:38:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Schramm X-Patchwork-Id: 12257533 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D8B4C433B4 for ; Fri, 14 May 2021 11:37:50 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 529B9610EA for ; Fri, 14 May 2021 11:37:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 529B9610EA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=manjaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=bSkVq2wCVgkcfrCzXwlxir9qQJbRa+26b1xR/CF8LO4=; b=c2N22lm9kGitxU4p4H+LikX23 ITsfeyFqJ6lLv79QJmrVfzDVAgLirRHYvtwCnkkozJKQsvw247ss19LYjWblRhSSIQFr41E/v99Uz 9RDrEp/GMmlLcUskHiheweiiN3Wr/l1NIfc+TSz3BKh8oYDehtsu061RgH+otUpwAWoTXIGMrl5u1 kK9Dps6DQblENbsKvxkZJDdvTDfbmEgBpXbkgBTisTy9udLJLvUSrKmTmpT82vY1dFSWaCp4i6PXm qufH10XCIcJzRF8IRZ2TVB1FJWyvUBWvTcXZrrWD4KP4LTkaqSncryz6J/DmSGqN+D2WAm29+Mqmt 2JUX3lCTQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhW8Z-007vOZ-0l; Fri, 14 May 2021 11:37:47 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhW7q-007vAz-Ho; Fri, 14 May 2021 11:37:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=0/U0rlWwIVezjZJmLQxOlrunj3US2eW319IiRFW40tw=; b=e/FMrU9VynM9gg9VCYpgVTzz8X ghChnWxRCIdtCo1GoPF/flpeKOzvdqKjLEpBtNS29tWL9y7hs00wJg9hAVDlMQmV8Py++TIKbOm/t ualhSYODBvt7viL8miMy7DW0vOgCmudtEnMlRUf+QxLu7G7Qi+O1fYFBSORTY2lOghEgI8oKxWMer P7p9C26mRpRVObaWvhqusBM1lMqkCFRmp/YeWlj3HiUCUMVKHMKMVJGb9RusURJ5qS/371ue1aq80 WX4V30teq8224RtfzXqYlBk8EItZwkO/joDi6lyynqAjTVFRebHZTqcemkH4dvTof2Lc8hB1a9gcv 4gDNK9Jw==; Received: from mail.manjaro.org ([2a01:4f8:150:448b::1]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhW7o-00BwQQ-0S; Fri, 14 May 2021 11:37:01 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.manjaro.org (Postfix) with ESMTP id 7BD8C222567; Fri, 14 May 2021 13:36:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at manjaro.org Received: from mail.manjaro.org ([127.0.0.1]) by localhost (manjaro.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YuOpJ9Xe6iI3; Fri, 14 May 2021 13:36:55 +0200 (CEST) From: Tobias Schramm To: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, Heiko Stuebner Cc: "David S . Miller" , Jakub Kicinski , Rob Herring , Giuseppe Cavallaro , David Wu , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tobias Schramm Subject: [PATCH 3/3] arm64: dts: rockchip: add gmac to rk3308 dts Date: Fri, 14 May 2021 13:38:13 +0200 Message-Id: <20210514113813.2093534-4-t.schramm@manjaro.org> In-Reply-To: <20210514113813.2093534-1-t.schramm@manjaro.org> References: <20210514113813.2093534-1-t.schramm@manjaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_043700_222652_CCE4FE42 X-CRM114-Status: UNSURE ( 9.30 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org The RK3308 SoC has a gmac with only the RMII interface exposed. This commit adds it to the RK3308 dtsi. Signed-off-by: Tobias Schramm --- arch/arm64/boot/dts/rockchip/rk3308.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3308.dtsi b/arch/arm64/boot/dts/rockchip/rk3308.dtsi index 0c5fa9801e6f..b815ce73e5c6 100644 --- a/arch/arm64/boot/dts/rockchip/rk3308.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3308.dtsi @@ -637,6 +637,28 @@ nfc: nand-controller@ff4b0000 { status = "disabled"; }; + gmac: ethernet@ff4e0000 { + compatible = "rockchip,rk3308-gmac"; + reg = <0x0 0xff4e0000 0x0 0x10000>; + interrupts = ; + interrupt-names = "macirq"; + clocks = <&cru SCLK_MAC>, <&cru SCLK_MAC_RX_TX>, + <&cru SCLK_MAC_RX_TX>, <&cru SCLK_MAC_REF>, + <&cru SCLK_MAC>, <&cru ACLK_MAC>, + <&cru PCLK_MAC>, <&cru SCLK_MAC_RMII>; + clock-names = "stmmaceth", "mac_clk_rx", + "mac_clk_tx", "clk_mac_ref", + "clk_mac_refout", "aclk_mac", + "pclk_mac", "clk_mac_speed"; + phy-mode = "rmii"; + pinctrl-names = "default"; + pinctrl-0 = <&rmii_pins &mac_refclk_12ma>; + resets = <&cru SRST_MAC_A>; + reset-names = "stmmaceth"; + rockchip,grf = <&grf>; + status = "disabled"; + }; + cru: clock-controller@ff500000 { compatible = "rockchip,rk3308-cru"; reg = <0x0 0xff500000 0x0 0x1000>;