From patchwork Tue Oct 24 17:57:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 116980 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp6085242qgn; Tue, 24 Oct 2017 11:01:01 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SgLjOaHQNg9kjEBbG+icqUc3d+ly31QC7IpSjYiwlnLNyLLcMAqThkMK1DY5+tkeB099Na X-Received: by 10.98.77.195 with SMTP id a186mr17219448pfb.292.1508868061297; Tue, 24 Oct 2017 11:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508868061; cv=none; d=google.com; s=arc-20160816; b=xhU4FRPrMeGOWA2uFpe0T8i2wPYOSgqtwEau9oFwEdQrYxytqgEImMegaXwN940D5s o4HY1OxbcXiB54apccUrNY56Eto2bxb7I1HbkkYbk1zXENjzJrcYP7H8552alNPP7Zcn bYK9MB4tkERmU1rb8a+nOVg5kuzhFvc9O4M2ki19yd7/J4UvpSXeo90iMjuqKbwamFad hSUmtSbTlFur+GJcQcQim9D3HdQvK1ZH6nI4fOdIQ2r9UyHS21vuArlxdylCEVwLoecR MDD03kIlp3/Gd+FHcMDKfxnyMD+7QjfqHJhcvLnr4KNXmNkqpugwGKoBdVnYsOxdtl+T 3vww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=9UhNo9Ng56ZGLDi6osMl6R6ABKfZnknHpHhD/Djmoxs=; b=ZiM3uDQigNWY662Yt+ATSCfMYND2d/Mnv2Gt8Bmt07392hPSYv/JHAEKZz2AM/3v3w fKfawxbnOu5XGN3TiDqlLp28GbgSNwbCfLYh9Gq9d2XpkO5AAkdW3TJciCpAD5kf1Fot Jxixjo/6QetuA+rhuPI3sVEJnMTMhza1ix8DtSrWHpwZ9/Cpl3YgU/5Ii3/p9Tije2BV v8OUDqhAFh9hTC2i6RIrgCOhs7V0LwTJCcCZcKbRttEPb3Z82XKfqJx3xB5FgOtKEn0G hmLkpJx1wpnFSXiO2rEFrJIns32KdRLFHF124ZQs4SyYry+xLZmTbnFV8UDrvJFN8h+N lixA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W6lE8iw9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 137si482532pgd.277.2017.10.24.11.01.00; Tue, 24 Oct 2017 11:01:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=W6lE8iw9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932167AbdJXSA7 (ORCPT + 27 others); Tue, 24 Oct 2017 14:00:59 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:48046 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751781AbdJXSAt (ORCPT ); Tue, 24 Oct 2017 14:00:49 -0400 Received: by mail-wm0-f66.google.com with SMTP id r196so791689wmf.2; Tue, 24 Oct 2017 11:00:48 -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=9UhNo9Ng56ZGLDi6osMl6R6ABKfZnknHpHhD/Djmoxs=; b=W6lE8iw9HKgzIw3vCEu8R97faAawAO9iOob0nYpPnqmTMvyjQeuQKU0bZ6CRNuP4Oi HOoOIK76d8e/bBn5X+fMh1TCHvyBv7tAwHl/vtImHCz+8LIMvUA0teSobiIlkkxL3V5T vmdH+tPJghl2lhM+0CS8TcVBksvNhpGvIoYbRJrZbi12tW5TEnLQyBAcRr49qM2CdZCu VuOGnvZhxhDZ9ZIUBvtxbZZ8HbqP0ZzROTJjC/77ST4hGBODoVCrLaK83duwDHM94srZ kBjeIIsOh1jd7vfWEd/aH0rQWeJKlv3cHBJxcTiHfnUIiMfsPSf2sl1rjLgHoCdC6f75 iFVg== 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=9UhNo9Ng56ZGLDi6osMl6R6ABKfZnknHpHhD/Djmoxs=; b=qq7jbe9TRB7lXn43BYlzfH1XyY61tsbH2Tos4yFFmE4zTD/pM3OTxzFzCHFWP4BBkP Om5QuNqjo3E5fqwCZBOmunPb5FcnY97sQOSPgZ32Ei060328ulfKJo/O4rN8iinSxZDz 2l29qYF6XKoRdIhv/lzKZi+RLs3GZN4VRI3ErMEVNqO0f6OKsIvRdtx9q78uB5EM3kr3 aHdp2yUazh3BC4oY1ffmnp1hWz1NiWXkh/7ceDFzHQ9SLZsk24ghnjUAPvd4zy9msbTI e3oMtY2mYZ1xVxiu1GQ9yKgcwz/TWUoZ3Bst3ac4OZD4FPQLt3p91cQEdT8xtofXXah3 wbzg== X-Gm-Message-State: AMCzsaV32A4QnO+ButYb17dEmvM+Xt4A0ELU+xBW//Br4+Mw3wVCfZH1 dFqMIorQmoits74NSW5Qsu8= X-Received: by 10.28.211.69 with SMTP id k66mr8820133wmg.1.1508868048019; Tue, 24 Oct 2017 11:00:48 -0700 (PDT) Received: from Red.local (LFbn-MAR-1-580-96.w90-118.abo.wanadoo.fr. [90.118.159.96]) by smtp.googlemail.com with ESMTPSA id s18sm818968wrg.87.2017.10.24.11.00.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Oct 2017 11:00:47 -0700 (PDT) From: Corentin Labbe To: robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, andrew@lunn.ch, f.fainelli@gmail.com Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH v9 04/10] arm: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac Date: Tue, 24 Oct 2017 19:57:08 +0200 Message-Id: <20171024175714.15840-5-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171024175714.15840-1-clabbe.montjoie@gmail.com> References: <20171024175714.15840-1-clabbe.montjoie@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) -- 2.13.6 diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi index d762098fc589..0e97df490aba 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -422,14 +422,36 @@ #size-cells = <0>; status = "disabled"; - mdio: mdio { + mdio0: mdio { #address-cells = <1>; #size-cells = <0>; - int_mii_phy: ethernet-phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; + compatible = "snps,dwmac-mdio"; + }; + + mdio-mux { + compatible = "allwinner,sun8i-h3-mdio-mux"; + #address-cells = <1>; + #size-cells = <0>; + mdio-parent-bus = <&mdio0>; + /* Only one MDIO is usable at the time */ + internal_mdio: mdio@1 { + compatible = "allwinner,sun8i-h3-mdio-internal"; 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>; + }; + }; + + external_mdio: mdio@2 { + reg = <2>; + #address-cells = <1>; + #size-cells = <0>; }; }; };