From mboxrd@z Thu Jan 1 00:00:00 1970 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 97AE1C433EF for ; Mon, 29 Nov 2021 00:33:58 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=m4xc9TtEO4gunHB3WBWt4FCXGTRoqOC/uDBOW9HwzeQ=; b=lWvp+XRRE1mzoR 77+QS1z0N4VQF9NDtUdoRjg/I3XPS3Hym0Y1HcKM07hS+TX4ScX83SBBH5UFSxs/S6vDYWUWfi7Yv Siz+TjIpcAjFa3I6DQM0+7wqTjxBLm6GgQ20JVCiQiTWIgxdtCohLp2wViy7hSjrM38jhx/l8feGp xh5zNZbYJuuLol7u2fhAIh1W1nB0wHj7YG2RPsEuGV5ds3Nhp9Yj055Uv9y4UYq1UYIRBy7Y9aZDy F+EqGfproPzdgZZthDto2xtwk5CNeQxHMARlaqDme0bwBYTRyszH+sk/VcCVKieO/wVN+mbZxqzSu perBiWmsFLwVOnOQCRfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrUar-00Gwqx-Ov; Mon, 29 Nov 2021 00:32:29 +0000 Received: from mail-qv1-f48.google.com ([209.85.219.48]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mrUao-00Gwq2-6E for linux-arm-kernel@lists.infradead.org; Mon, 29 Nov 2021 00:32:27 +0000 Received: by mail-qv1-f48.google.com with SMTP id jo22so12813154qvb.13 for ; Sun, 28 Nov 2021 16:32:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=MyZRAlXP/e/AePu0s+Zwakx21d3S9mVf149IxObIrqI=; b=HKAmG3SHvS1k3wOBLAZt0YNdy3sFRmS0h5VcAwy70u4n8jYVvzzGepmy3QE2NxmIt5 HtXodCOvprnPYfM/dxo2s2Y6FSzsXgEHCW0/gDFFNmmr+TJwVRk9gsBn/OGp2Uy1UmCZ k42Q7mUOTR+40zCNl6axfywsuvyMER2M1KI7q0cP/pBXe2gqC9AJsjM3XhL+PDrbrUPK mqazoBhb16UYk9lDgq4IKRCgrtzoZIzZCALqJ8Fb6XrXu68XIqCx93aftCuK+UBwnNOM PhFYXuksi9QJDsg7fWQiMw0QMs+VhOapxDNIQ8O6KR/cFi9Yumy+gez7+ITSTfAQhFXz +Tjw== X-Gm-Message-State: AOAM532+sSAzhVSXWjX5WyUzRCxdUTxodyf/z2yN01MLr7d8EHXya1xy uSbNfzdQhDmLjV7ASCVB6g== X-Google-Smtp-Source: ABdhPJzHiwW1fPPH4MokDrlAnYt8RfzKC0ldQeYu5/M+OmWm2g8ZSiMwwNcqdJPo0HjtoWNCUZcXsA== X-Received: by 2002:a05:6214:1d26:: with SMTP id f6mr40719839qvd.19.1638145944847; Sun, 28 Nov 2021 16:32:24 -0800 (PST) Received: from robh.at.kernel.org ([172.58.99.229]) by smtp.gmail.com with ESMTPSA id t35sm8210564qtc.83.2021.11.28.16.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Nov 2021 16:32:24 -0800 (PST) Received: (nullmailer pid 2885884 invoked by uid 1000); Mon, 29 Nov 2021 00:26:58 -0000 Date: Sun, 28 Nov 2021 18:26:58 -0600 From: Rob Herring To: Evgeny Boger Cc: Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH v3 3/3] dts: r40: add second ethernet support Message-ID: References: <20211121195337.230475-1-boger@wirenboard.com> <20211121195337.230475-4-boger@wirenboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211121195337.230475-4-boger@wirenboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211128_163226_261048_002C7E11 X-CRM114-Status: GOOD ( 19.89 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Nov 21, 2021 at 10:53:37PM +0300, Evgeny Boger wrote: > R40 (aka V40, A40i, T3) has two different Ethernet IP > called EMAC and GMAC. > EMAC only support 10/100 Mbit in MII mode, > while GMAC support both 10/100 (MII) and 10/100/1000 (RGMII). > > In contrast to A10/A20 where GMAC and EMAC share the same pins > making EMAC somewhat pointless, on R40 EMAC can be routed to port H. > Both EMAC (on port H) and GMAC (on port A) > can be then enabled at the same time, allowing for two ethernet ports. > > Signed-off-by: Evgeny Boger > --- > arch/arm/boot/dts/sun8i-r40.dtsi | 50 ++++++++++++++++++++++++++++++++ > 1 file changed, 50 insertions(+) > > diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r40.dtsi > index 1d87fc0c24ee..19ea33421c63 100644 > --- a/arch/arm/boot/dts/sun8i-r40.dtsi > +++ b/arch/arm/boot/dts/sun8i-r40.dtsi > @@ -217,6 +217,20 @@ syscon: system-control@1c00000 { > #size-cells = <1>; > ranges; > > + sram_a: sram@0 { > + compatible = "mmio-sram"; > + reg = <0x00000000 0xc000>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0 0x00000000 0xc000>; > + > + emac_sram: sram-section@8000 { > + compatible = "allwinner,sun4i-a10-sram-a3-a4"; > + reg = <0x8000 0x4000>; > + status = "okay"; 'okay' is the default, so you don't need it. > + }; > + }; > + > sram_c: sram@1d00000 { > compatible = "mmio-sram"; > reg = <0x01d00000 0xd0000>; > @@ -543,6 +557,24 @@ gmac_rgmii_pins: gmac-rgmii-pins { > drive-strength = <40>; > }; > > + emac_pa_pins: emac-pa-pins { > + pins = "PA0", "PA1", "PA2", > + "PA3", "PA4", "PA5", "PA6", > + "PA7", "PA8", "PA9", "PA10", > + "PA11", "PA12", "PA13", "PA14", > + "PA15", "PA16"; > + function = "emac"; > + }; > + > + emac_ph_pins: emac-ph-pins { > + pins = "PH8", "PH9", "PH10", "PH11", > + "PH14", "PH15", "PH16", "PH17", > + "PH18","PH19", "PH20", "PH21", > + "PH22", "PH23", "PH24", "PH25", > + "PH26", "PH27"; > + function = "emac"; > + }; > + > i2c0_pins: i2c0-pins { > pins = "PB0", "PB1"; > function = "i2c0"; > @@ -980,6 +1012,24 @@ gmac_mdio: mdio { > }; > }; > > + emac: ethernet@1c0b000 { > + compatible = "allwinner,sun4i-r40-emac"; > + reg = <0x01c0b000 0x1000>; > + interrupts = ; > + clocks = <&ccu CLK_BUS_EMAC>; > + resets = <&ccu RST_BUS_EMAC>; > + allwinner,sram = <&emac_sram 1>; > + status = "disabled"; > + }; > + > + emac_mdio: mdio@1c0b080 { > + compatible = "allwinner,sun4i-a10-mdio"; > + reg = <0x01c0b080 0x14>; > + status = "disabled"; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > + > mbus: dram-controller@1c62000 { > compatible = "allwinner,sun8i-r40-mbus"; > reg = <0x01c62000 0x1000>; > -- > 2.25.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel