From patchwork Fri Aug 18 12:21:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9908553 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 512BC602C8 for ; Fri, 18 Aug 2017 12:34:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C4B928C9A for ; Fri, 18 Aug 2017 12:34:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 30A3D28CB3; Fri, 18 Aug 2017 12:34:19 +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=-2.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW 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 A4D1728C9A for ; Fri, 18 Aug 2017 12:34:18 +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=lJCAkFmoonOnCGuPf9tZbmrokhhaU5z7xo3YEJqM6Rc=; b=dj/qKSZutRJh5LSlDkJtJHkzvy ffKt9wmWaZF9YweFg7lfCU0CXTWm2MUXWEzOOSvOEcCn+2utR1717o0do4b3SD7J/BOKcN8v+ezWw XKoF9gctgrk7E4ussGnwIP2F9PQU1xtJ2hHRku2jbTMd5zLNcVdFTonMvXMwRUkWEZw/gMghxjmyU Hla5dVfac54/n1Uua9657CVMGDi3q3wEGjeRpV8ciYh3IuHVPxgO3aeUs/DgrD+UC/2vH1CS6nTUY +OL/kIiVt4MbpLb7lIvLtD6rid1ULLJh0OgkCmq4fnF5bWfadIoAu3zTzvZgcAF4R1tVAoLHcHgiH iTI5tldw==; 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 1digTh-0007Uu-BZ; Fri, 18 Aug 2017 12:34:17 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1digK9-0007Lz-SI for linux-arm-kernel@lists.infradead.org; Fri, 18 Aug 2017 12:24:27 +0000 Received: by mail-wr0-x241.google.com with SMTP id z91so10259871wrc.4 for ; Fri, 18 Aug 2017 05:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0Dg7IPHKFGJ3exnHHRaf25OZmTgbdCA43me6Tp3Toaw=; b=HWwCgcgwO16FHBYI9zEUY3vfHXN8x9oBqtk8HuwHw2MYqCSi+e8obdBlOest6C4QIF TeizjmzvBCCdpNOlHVA8hHH7JPXfyM5ACPM7ffsSTYt98c1qOrWAKkqMUONK6BNo0bGq Y3f6yfZGEwHz80NdM1e/+dNXJwAzP06nyUWTaIO+DrlrX0G8aLmHjhTfgdE8FrOILBlH 9jETwgMldWSfOOKQvikxay0rvZsr2pX84O7XlM7n+YfncTbfGTBFvTm3wGVCNbhCkzHm ooTlkon907/AAAFJWChKVr0rrRryJ2rNLfaQgwg4qIOMdOD4KwsISH12kHHrKRFKcM44 GzJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0Dg7IPHKFGJ3exnHHRaf25OZmTgbdCA43me6Tp3Toaw=; b=Y0vrj01Wf4iQYO2lh4ztz1xQ+hXh66wPD4y3YtX2VFXzHydxhpg/KvVe3uPctHPALk OD9lh1P5Jtv1qpgp/fMs/sm/taS7R98S9SWtvUJbfODMmyTpwigjspgriQghziKqv8tY Es0g8T46PZAiKVCV1oMmSblM0qM9/qg43nz9uUY/cD4kPENxOZqcXCDMPc80gZ+V74/6 IylWq1HFn5XLPQLp7v5dED4jkNsqU8L73aEWMuLVm9UifWJtvVKyxBa15rkVU5bjyInP YqzFIfZZogW1YqAUjACaO1AnFR4iXDhODyhvONzKnnBUj8UHgGBNmFSklHpFhG3/dj69 zaoQ== X-Gm-Message-State: AHYfb5ixUDgD5JjEE1GWqCO0aw5TKh6hYyHxlFKDcqXamMZR7GQeMkUA RopamgG+xqGmCQ== X-Received: by 10.223.136.198 with SMTP id g6mr5897656wrg.280.1503059044138; Fri, 18 Aug 2017 05:24:04 -0700 (PDT) Received: from Red.local (LFbn-1-7109-228.w90-116.abo.wanadoo.fr. [90.116.45.228]) by smtp.googlemail.com with ESMTPSA id b23sm7754738wrd.40.2017.08.18.05.24.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Aug 2017 05:24:03 -0700 (PDT) From: Corentin Labbe To: robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, wens@csie.org, peppe.cavallaro@st.com, alexandre.torgue@st.com Subject: [PATCH v3 1/4] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac Date: Fri, 18 Aug 2017 14:21:15 +0200 Message-Id: <20170818122118.4925-2-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170818122118.4925-1-clabbe.montjoie@gmail.com> References: <20170818122118.4925-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170818_052426_075394_BFF46E23 X-CRM114-Status: UNSURE ( 9.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Corentin Labbe , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since dwmac-sun8i could use either an integrated PHY or an external PHY (which could be at same MDIO address), we need to represent this selection by a MDIO switch. Signed-off-by: Corentin Labbe --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index 4b599b5d26f6..74fdfcc9dfd3 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -417,14 +417,32 @@ #size-cells = <0>; status = "disabled"; - mdio: mdio { + mdio_parent: mdio { #address-cells = <1>; #size-cells = <0>; - int_mii_phy: ethernet-phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; + }; + mdio-mux { + compatible = "allwinner,sun8i-h3-mdio-switch"; + mdio-parent-bus = <&mdio_parent>; + #address-cells = <1>; + #size-cells = <0>; + + internal_mdio: mdio@1 { reg = <1>; - clocks = <&ccu CLK_BUS_EPHY>; - resets = <&ccu RST_BUS_EPHY>; + #address-cells = <1>; + #size-cells = <0>; + int_mii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + clocks = <&ccu CLK_BUS_EPHY>; + resets = <&ccu RST_BUS_EPHY>; + phy-is-integrated; + }; + }; + mdio: mdio@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; }; }; };