From patchwork Tue Sep 26 01:08:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 9970865 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 99ED2602D8 for ; Tue, 26 Sep 2017 01:10:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CE7428AE5 for ; Tue, 26 Sep 2017 01:10:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FE3428E33; Tue, 26 Sep 2017 01:10:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0014528E30 for ; Tue, 26 Sep 2017 01:10:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=UDn+2t44oCwefdeSGGgu+EJUoBUnfx7KhGYCkvZ0Uho=; b=hy0xX6DUlK5FEWp4AHaW16vvDT +ZSesejXttzpSf4655gxnSAV99UXAIisPh8Zox6IG/ZcGxuAZT94Ig8j/B079euLzN8Yp4ilUbEPs /uHVHlE4bXbK78IWL/CjXZWpcu5BJIi1k5bfrag3YG4UmZsEzffoUAOw/C8UqrlBSwDYnAlBXii40 Pyr7FNk+xFqVpk8gnuIY4KJJlCMNbT3rsjHEB0B3xmUB1UbrOz/rwl41M0nfqof/nqkUu+PuaHyOX NLMsBFMzEfr10Vy/E5wOpd3zcrUdiAdQJeI7GrmhB2ziLdQQZOFsJJQF0Lq9299BKIBS5+jEaxEqq 6wUn1T7w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dweNW-0002E9-3T; Tue, 26 Sep 2017 01:09:38 +0000 Received: from mail.aperture-lab.de ([138.201.29.205]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dweNQ-0001xt-96 for linux-amlogic@lists.infradead.org; Tue, 26 Sep 2017 01:09:34 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.aperture-lab.de (Postfix) with ESMTP id 3EBF1E3941; Tue, 26 Sep 2017 03:09:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aperture-lab.de Received: from mail.aperture-lab.de ([127.0.0.1]) by localhost (mail.aperture-lab.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 1FaOQ-Ubb-1S; Tue, 26 Sep 2017 03:09:10 +0200 (CEST) Received: from localhost (unknown [IPv6:2001:67c:2d50:0:c85:8cff:fe0f:63fe]) (Authenticated sender: linus.luessing@c0d3.blue) by mail.aperture-lab.de (Postfix) with ESMTPSA; Tue, 26 Sep 2017 03:09:09 +0200 (CEST) From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: linux-amlogic@lists.infradead.org Subject: [RFC PATCH] ARM: meson: Add Ethernet for Odroid C1/C1+ Date: Tue, 26 Sep 2017 03:08:47 +0200 Message-Id: <20170926010847.30219-2-linus.luessing@c0d3.blue> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170926010847.30219-1-linus.luessing@c0d3.blue> References: <20170926010847.30219-1-linus.luessing@c0d3.blue> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170925_180932_676723_6B50F91B X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Linus=20L=C3=BCssing?= MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the necessary DT bindings to enable the Realtek RTL8211F chip used in the Odroid C1/C1+. --- Do not apply, this patch does not work yet! --- arch/arm/boot/dts/meson8b-odroidc1.dts | 26 ++++++++++++++++++++++++++ arch/arm/boot/dts/meson8b.dtsi | 31 +++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts index 9ff6ca4..071a568 100644 --- a/arch/arm/boot/dts/meson8b-odroidc1.dts +++ b/arch/arm/boot/dts/meson8b-odroidc1.dts @@ -77,6 +77,32 @@ pinctrl-names = "default"; }; +ðmac { + status = "okay"; + pinctrl-0 = <ð_rgmii_pins>; + pinctrl-names = "default"; + phy-handle = <ð_phy0>; + phy-mode = "rgmii"; + + snps,reset-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>; + snps,reset-delays-us = <0 10000 1000000>; + snps,reset-active-low; + + amlogic,tx-delay-ns = <2>; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + eth_phy0: ethernet-phy@0 { + /* Realtek RTL8211F (0x001cc916) */ + reg = <0>; + eee-broken-1000t; + }; + }; +}; + &gpio_ao { /* * WARNING: The USB Hub on the Odroid-C1/C1+ needs a reset signal diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi index b9b6600..259ef0f 100644 --- a/arch/arm/boot/dts/meson8b.dtsi +++ b/arch/arm/boot/dts/meson8b.dtsi @@ -184,6 +184,28 @@ #gpio-cells = <2>; gpio-ranges = <&pinctrl_cbus 0 0 130>; }; + + eth_rgmii_pins: eth-rgmii { + mux { + groups = + "eth_rxd1", + "eth_rxd0", + "eth_rx_clk", + "eth_rx_dv", + "eth_txd0_1", + "eth_txd1_1", + "eth_ref_clk", + "eth_tx_en", + "eth_mdio_en", + "eth_mdc", + "eth_txd1_0", + "eth_txd0_0", + "eth_txd3", + "eth_txd2", + "eth_tx_clk"; + function = "ethernet"; + }; + }; }; }; @@ -195,8 +217,13 @@ }; ðmac { - clocks = <&clkc CLKID_ETH>; - clock-names = "stmmaceth"; + compatible = "amlogic,meson8b-dwmac", "snps,dwmac"; + reg = <0xc9410000 0x10000 + 0xc1108140 0x4>; + clocks = <&clkc CLKID_ETH>, + <&clkc CLKID_FCLK_DIV2>, + <&clkc CLKID_MPLL2>; + clock-names = "stmmaceth", "clkin0", "clkin1"; }; &hwrng {