From patchwork Tue Jan 4 14:56:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12703530 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADA8AC43217 for ; Tue, 4 Jan 2022 14:56:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234488AbiADO4z (ORCPT ); Tue, 4 Jan 2022 09:56:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234411AbiADO4y (ORCPT ); Tue, 4 Jan 2022 09:56:54 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE873C061784 for ; Tue, 4 Jan 2022 06:56:53 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id w20so67711221wra.9 for ; Tue, 04 Jan 2022 06:56:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=neH7i+26OYLpeC5cMlHViFNMwrfPO3xPJ5Z7DAt5pN8=; b=6B4DUmzq2Lw2opUtv12zb3B4EY4CeYfQZzyD+DTHYfa5cAbiga8DiYxi6dYySc47UB JaLoqUDyIVYNusHpP3ruR2TxjjX3aQnJ1LXPFACQ57tSU3ADldPIC5LuZ9z333Mx1phi eRmL2R6KFJtsf+63IJbq5dkPUyk++tIHNKg0FOBvKa9keQkjxI31z2bd1g5jubfAT9eX X/+pYij9apXPDicOmXiq0AekeO3VW/xCSLTtNHwWE7tSSMs2v3G2+htCvJFX4N/L0ws6 rgxVwzorsoycd8aBuRT+jL/frWNcu6YAHRNrwyIpNN0TVHXsW8WVROF6y4qxA53J4/G0 xOwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=neH7i+26OYLpeC5cMlHViFNMwrfPO3xPJ5Z7DAt5pN8=; b=Ymw1b+ZPbgj+xOQIL2K8Ub+6gn1WTNv5LwiU8DuytTiToYi4cTW/vCfa8lGX0vPD/u n0mCnNy5gJbadpK0QE51ssOJ0bOfNdxDsPLuPxxgEiVC7kLTU1qS4nkG/Xj96TA3mCIw VX1tcpyIEWcLGGsfVrR63LUF+zyJS3hjH3UkVRXJo34rLYadVbHktwJLBDYcyZinJpBl VVmR7vufs1x7njpXpG6hjv8jMCPRlosdGMV3lk77SUzBOyJMHQTAJYCJy9/+Z1FxkgNb MqsFrAgAk6uYeM5MtjlNovhSMet+e5j3PYAUi4JV43OrNJ4p+c6FlNFCvK6mZQYhGZa0 EuhQ== X-Gm-Message-State: AOAM530VU8N9EXH6BiNB/qCpFOO8OwgSakRr++D4b/xeUicduIGbdawK oOE/Xyfc6w99SuamOdc+84HdvsTP/yM5mQ== X-Google-Smtp-Source: ABdhPJzpq3iDZwJh1M7Crwd08FIYBMlecfSVZrHd7FpM1bxy/phrabpFNFgGHzHZVJt0eB4nnnZWCQ== X-Received: by 2002:a5d:47cd:: with SMTP id o13mr43062755wrc.669.1641308212220; Tue, 04 Jan 2022 06:56:52 -0800 (PST) Received: from localhost.localdomain ([2001:861:44c0:66c0:f6da:6ac:481:1df0]) by smtp.gmail.com with ESMTPSA id k10sm19309859wrz.113.2022.01.04.06.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 06:56:51 -0800 (PST) From: Neil Armstrong To: davem@davemloft.net, kuba@kernel.org, devicetree@vger.kernel.org Cc: netdev@vger.kernel.org, linux-oxnas@groups.io, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: [PATCH net-next v2 1/3] dt-bindings: net: oxnas-dwmac: Add bindings for OX810SE Date: Tue, 4 Jan 2022 15:56:44 +0100 Message-Id: <20220104145646.135877-2-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220104145646.135877-1-narmstrong@baylibre.com> References: <20220104145646.135877-1-narmstrong@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Add SoC specific bindings for OX810SE support. Signed-off-by: Neil Armstrong Acked-by: Rob Herring --- Documentation/devicetree/bindings/net/oxnas-dwmac.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/oxnas-dwmac.txt b/Documentation/devicetree/bindings/net/oxnas-dwmac.txt index d7117a22fd87..27db496f1ce8 100644 --- a/Documentation/devicetree/bindings/net/oxnas-dwmac.txt +++ b/Documentation/devicetree/bindings/net/oxnas-dwmac.txt @@ -9,6 +9,9 @@ Required properties on all platforms: - compatible: For the OX820 SoC, it should be : - "oxsemi,ox820-dwmac" to select glue - "snps,dwmac-3.512" to select IP version. + For the OX810SE SoC, it should be : + - "oxsemi,ox810se-dwmac" to select glue + - "snps,dwmac-3.512" to select IP version. - clocks: Should contain phandles to the following clocks - clock-names: Should contain the following: From patchwork Tue Jan 4 14:56:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12703531 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 294A7C433EF for ; Tue, 4 Jan 2022 14:56:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234492AbiADO45 (ORCPT ); Tue, 4 Jan 2022 09:56:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234464AbiADO4z (ORCPT ); Tue, 4 Jan 2022 09:56:55 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C894C061761 for ; Tue, 4 Jan 2022 06:56:54 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id k66-20020a1ca145000000b00345fa984108so1580790wme.2 for ; Tue, 04 Jan 2022 06:56:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LdTwZGxCheARq/wJIuWjWJ8sp/mwhWyuDBxIP8mBS6U=; b=v34JDOGQMu4HacktV6iM+J7XQg8eVx9rVL1BZURGs/Bkd73fnh3VbcD9k/hOoJdBiZ LmFjvaSYnjzDphIZJHHV17WuCWl1meuqMYTQC+AOR40GZVIP8AlMsaGQue5C9/SGpDJ9 cJkgtzmNRipbLedhK+T8cvdx2IeDnM/93fk/JAVZDb3A03/QuuzEn9RCrb6c8TjO0JF3 aQcDXwXOI4D04RlLkvMIj45EnpaaHsjG+6SlhzAIbN33+dXhDrWAK/XMkuuI1SEoJRki P8d0E92BbJt1MGKgxPWCo722uXJvOQDcprwUhVs8HmDA8Ic3UrqcZ0FYak2D9FQRV9uc F0bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LdTwZGxCheARq/wJIuWjWJ8sp/mwhWyuDBxIP8mBS6U=; b=Nw0ZLlwebljrmStbr8GXvj2hKBRuGqRZB5iJlgqRauEswhmBFQFr9RyBLnWXTjac4K hIByxrKeQg0hemMsQCXNQEXPljiXnG/HUkHFwmyNd8vTJDdy4JkbTkhiQNfV72DLJae6 /bNkwRirrDkBAAk5e190KEyxafh2WeC4RAcUggQEpUTvl7XHLWWqezLrSQSMRJIrdxaQ PfAjso35zpaQg5hl21Blqigs+IBgsmKUa5iDmY/l/9cq2GU/cDyuvReWLDZzi67yD2LE Va4rz5+pp3/14EhAoHO+E9b8hXa3F96DB+6Hpi8XqKgAwjZlTptmKxTJHY9YoE7a5e3F U7/w== X-Gm-Message-State: AOAM531PhFKFNxCYwg+mpE6G1E4SZtEAO8oaSaLqLU7GxoPtNH4SArmQ SC1qOEoX3Iu87rRj+pWJseJKPg== X-Google-Smtp-Source: ABdhPJyPAQVAIEN6QjPhjubn7JUJTecOedR8UcJi+tZN4yoyb/o3gacSrdzgxDFAuOBwDmyCrOe/Ug== X-Received: by 2002:a1c:1d0d:: with SMTP id d13mr43100112wmd.78.1641308213002; Tue, 04 Jan 2022 06:56:53 -0800 (PST) Received: from localhost.localdomain ([2001:861:44c0:66c0:f6da:6ac:481:1df0]) by smtp.gmail.com with ESMTPSA id k10sm19309859wrz.113.2022.01.04.06.56.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 06:56:52 -0800 (PST) From: Neil Armstrong To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-oxnas@groups.io, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: [PATCH net-next v2 2/3] net: stmmac: dwmac-oxnas: Add support for OX810SE Date: Tue, 4 Jan 2022 15:56:45 +0100 Message-Id: <20220104145646.135877-3-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220104145646.135877-1-narmstrong@baylibre.com> References: <20220104145646.135877-1-narmstrong@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Add support for OX810SE dwmac glue setup, which is a simplified version of the OX820 introduced later with more control on the PHY interface. Signed-off-by: Neil Armstrong --- .../net/ethernet/stmicro/stmmac/dwmac-oxnas.c | 115 +++++++++++++----- 1 file changed, 86 insertions(+), 29 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c index adfeb8d3293d..62a69a91ab22 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -48,16 +49,75 @@ #define DWMAC_RX_VARDELAY(d) ((d) << DWMAC_RX_VARDELAY_SHIFT) #define DWMAC_RXN_VARDELAY(d) ((d) << DWMAC_RXN_VARDELAY_SHIFT) +struct oxnas_dwmac; + +struct oxnas_dwmac_data { + int (*setup)(struct oxnas_dwmac *dwmac); +}; + struct oxnas_dwmac { struct device *dev; struct clk *clk; struct regmap *regmap; + const struct oxnas_dwmac_data *data; }; +static int oxnas_dwmac_setup_ox810se(struct oxnas_dwmac *dwmac) +{ + unsigned int value; + int ret; + + ret = regmap_read(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, &value); + if (ret < 0) + return ret; + + /* Enable GMII_GTXCLK to follow GMII_REFCLK, required for gigabit PHY */ + value |= BIT(DWMAC_CKEN_GTX) | + /* Use simple mux for 25/125 Mhz clock switching */ + BIT(DWMAC_SIMPLE_MUX); + + regmap_write(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, value); + + return 0; +} + +static int oxnas_dwmac_setup_ox820(struct oxnas_dwmac *dwmac) +{ + unsigned int value; + int ret; + + ret = regmap_read(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, &value); + if (ret < 0) + return ret; + + /* Enable GMII_GTXCLK to follow GMII_REFCLK, required for gigabit PHY */ + value |= BIT(DWMAC_CKEN_GTX) | + /* Use simple mux for 25/125 Mhz clock switching */ + BIT(DWMAC_SIMPLE_MUX) | + /* set auto switch tx clock source */ + BIT(DWMAC_AUTO_TX_SOURCE) | + /* enable tx & rx vardelay */ + BIT(DWMAC_CKEN_TX_OUT) | + BIT(DWMAC_CKEN_TXN_OUT) | + BIT(DWMAC_CKEN_TX_IN) | + BIT(DWMAC_CKEN_RX_OUT) | + BIT(DWMAC_CKEN_RXN_OUT) | + BIT(DWMAC_CKEN_RX_IN); + regmap_write(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, value); + + /* set tx & rx vardelay */ + value = DWMAC_TX_VARDELAY(4) | + DWMAC_TXN_VARDELAY(2) | + DWMAC_RX_VARDELAY(10) | + DWMAC_RXN_VARDELAY(8); + regmap_write(dwmac->regmap, OXNAS_DWMAC_DELAY_REGOFFSET, value); + + return 0; +} + static int oxnas_dwmac_init(struct platform_device *pdev, void *priv) { struct oxnas_dwmac *dwmac = priv; - unsigned int value; int ret; /* Reset HW here before changing the glue configuration */ @@ -69,35 +129,11 @@ static int oxnas_dwmac_init(struct platform_device *pdev, void *priv) if (ret) return ret; - ret = regmap_read(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, &value); - if (ret < 0) { + ret = dwmac->data->setup(dwmac); + if (ret) clk_disable_unprepare(dwmac->clk); - return ret; - } - /* Enable GMII_GTXCLK to follow GMII_REFCLK, required for gigabit PHY */ - value |= BIT(DWMAC_CKEN_GTX) | - /* Use simple mux for 25/125 Mhz clock switching */ - BIT(DWMAC_SIMPLE_MUX) | - /* set auto switch tx clock source */ - BIT(DWMAC_AUTO_TX_SOURCE) | - /* enable tx & rx vardelay */ - BIT(DWMAC_CKEN_TX_OUT) | - BIT(DWMAC_CKEN_TXN_OUT) | - BIT(DWMAC_CKEN_TX_IN) | - BIT(DWMAC_CKEN_RX_OUT) | - BIT(DWMAC_CKEN_RXN_OUT) | - BIT(DWMAC_CKEN_RX_IN); - regmap_write(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, value); - - /* set tx & rx vardelay */ - value = DWMAC_TX_VARDELAY(4) | - DWMAC_TXN_VARDELAY(2) | - DWMAC_RX_VARDELAY(10) | - DWMAC_RXN_VARDELAY(8); - regmap_write(dwmac->regmap, OXNAS_DWMAC_DELAY_REGOFFSET, value); - - return 0; + return ret; } static void oxnas_dwmac_exit(struct platform_device *pdev, void *priv) @@ -128,6 +164,12 @@ static int oxnas_dwmac_probe(struct platform_device *pdev) goto err_remove_config_dt; } + dwmac->data = (const struct oxnas_dwmac_data *)of_device_get_match_data(&pdev->dev); + if (!dwmac->data) { + ret = -EINVAL; + goto err_remove_config_dt; + } + dwmac->dev = &pdev->dev; plat_dat->bsp_priv = dwmac; plat_dat->init = oxnas_dwmac_init; @@ -166,8 +208,23 @@ static int oxnas_dwmac_probe(struct platform_device *pdev) return ret; } +static const struct oxnas_dwmac_data ox810se_dwmac_data = { + .setup = oxnas_dwmac_setup_ox810se, +}; + +static const struct oxnas_dwmac_data ox820_dwmac_data = { + .setup = oxnas_dwmac_setup_ox820, +}; + static const struct of_device_id oxnas_dwmac_match[] = { - { .compatible = "oxsemi,ox820-dwmac" }, + { + .compatible = "oxsemi,ox810se-dwmac", + .data = &ox810se_dwmac_data, + }, + { + .compatible = "oxsemi,ox820-dwmac", + .data = &ox820_dwmac_data, + }, { } }; MODULE_DEVICE_TABLE(of, oxnas_dwmac_match); From patchwork Tue Jan 4 14:56:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 12703532 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6A5AC433FE for ; Tue, 4 Jan 2022 14:57:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234493AbiADO5C (ORCPT ); Tue, 4 Jan 2022 09:57:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234404AbiADO4z (ORCPT ); Tue, 4 Jan 2022 09:56:55 -0500 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71AE7C061792 for ; Tue, 4 Jan 2022 06:56:55 -0800 (PST) Received: by mail-wm1-x32d.google.com with SMTP id p1-20020a1c7401000000b00345c2d068bdso20348663wmc.3 for ; Tue, 04 Jan 2022 06:56:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EjC9RoatGf4NuVo6mZRinaRaNOZbl6EwcNrtjHiT4O4=; b=pVKyM/tpT8WV2u9dQSjWb2R2+yIp2RFRzYSVHtO1Z9f1E6ly/Q+A1sfyVjPJHK8nda 1CJXRxRLD/OQW9iXB6ddlL2BwpjbSXUNER2HA30aAcMNpF2hWRWBjQ1MfdRgBaSszfaT 7gC90tLlau/wWwAL8N8gqPmmRrrwOGD9o4epZ1DKNRWUDzPi0AEY0Z1hFazx9ec6m/eg 0MjTRqsZiLYS/tQqN6amr22bO4z8G4xpIz9HXtXucEYIkivGLk84vl2f2pAZdOJ0EqfT 44zO+/qQYMZQBqdw8zLkXXo/17FcLasTNYxAPFykx6ZMU5vw3N1D12Or/eZzMTe4QhEw AAug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EjC9RoatGf4NuVo6mZRinaRaNOZbl6EwcNrtjHiT4O4=; b=YISAYBs/mlB3NDxgRA7REMYHyGCGi8eSGpp3AB18yigyzThy9DMDiiPJV1tAh6YmDi RMDyE/OBSWgtfx+TSM02B3wWPh4rn7u7XMcJOtUcslTo93SSx26mdzRFVP8hLBEBo6fV Kg7CzcGsuiXvmH5hCVUV4pzBPDRSx5DrZOLT2inZYu5CId5CmatfdszJZe5E+EO6GtdJ b2jADarkL61m9ELIHS1G/lcqsp82sLYHZP+cTRUzHSyNT9PclOtx4/w7FiH21gbMPTw9 IVubk2E78YmTR517LZddpspg/8XQQapQ3w+UvEINJv18s9g7h0rM0yQLwsNQ5Ak0YrBd ztYQ== X-Gm-Message-State: AOAM533dZDs9EiOqNj7/xKxOtci+1LpoNgW//HIzdHfySdCYwjRsoPD6 feSDJiSNiswAcma3wX31+neIhQ== X-Google-Smtp-Source: ABdhPJxFptGtlJldG0ByIqvEYEbbrflwjVjobp1qK+74UeP6+B5JY8OVsdELT/IyNlyDInC3z44YDQ== X-Received: by 2002:a1c:4c08:: with SMTP id z8mr41067300wmf.48.1641308214010; Tue, 04 Jan 2022 06:56:54 -0800 (PST) Received: from localhost.localdomain ([2001:861:44c0:66c0:f6da:6ac:481:1df0]) by smtp.gmail.com with ESMTPSA id k10sm19309859wrz.113.2022.01.04.06.56.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jan 2022 06:56:53 -0800 (PST) From: Neil Armstrong To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, linux-oxnas@groups.io, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Neil Armstrong Subject: [PATCH arm-soc-next v2 3/3] ARM: dts: ox810se: Add Ethernet support Date: Tue, 4 Jan 2022 15:56:46 +0100 Message-Id: <20220104145646.135877-4-narmstrong@baylibre.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220104145646.135877-1-narmstrong@baylibre.com> References: <20220104145646.135877-1-narmstrong@baylibre.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add nodes for the embedded Synopsys DWMAC Ethernet controller. Signed-off-by: Neil Armstrong --- arch/arm/boot/dts/ox810se-wd-mbwe.dts | 4 ++++ arch/arm/boot/dts/ox810se.dtsi | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/arch/arm/boot/dts/ox810se-wd-mbwe.dts b/arch/arm/boot/dts/ox810se-wd-mbwe.dts index 7e2fcb220aea..c59e06ff2423 100644 --- a/arch/arm/boot/dts/ox810se-wd-mbwe.dts +++ b/arch/arm/boot/dts/ox810se-wd-mbwe.dts @@ -103,6 +103,10 @@ rtc0: rtc@48 { }; }; +ða { + status = "okay"; +}; + &uart1 { status = "okay"; diff --git a/arch/arm/boot/dts/ox810se.dtsi b/arch/arm/boot/dts/ox810se.dtsi index 0755e5864c4a..96c0745f7b70 100644 --- a/arch/arm/boot/dts/ox810se.dtsi +++ b/arch/arm/boot/dts/ox810se.dtsi @@ -81,6 +81,24 @@ soc { ranges; interrupt-parent = <&intc>; + etha: ethernet@40400000 { + compatible = "oxsemi,ox810se-dwmac", "snps,dwmac"; + reg = <0x40400000 0x2000>; + interrupts = <8>; + interrupt-names = "macirq"; + mac-address = [000000000000]; /* Filled in by U-Boot */ + phy-mode = "rgmii"; + + clocks = <&stdclk 6>, <&gmacclk>; + clock-names = "gmac", "stmmaceth"; + resets = <&reset 6>; + + /* Regmap for sys registers */ + oxsemi,sys-ctrl = <&sys>; + + status = "disabled"; + }; + apb-bridge@44000000 { #address-cells = <1>; #size-cells = <1>;