From patchwork Mon Oct 23 18:56:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 116862 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp4975120qgn; Mon, 23 Oct 2017 12:02:27 -0700 (PDT) X-Received: by 10.99.109.75 with SMTP id i72mr12590966pgc.268.1508785347480; Mon, 23 Oct 2017 12:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508785347; cv=none; d=google.com; s=arc-20160816; b=BsQLC6Kdv3klhV+VIigYUoBfo88I1T/AEI6eaDd+7p+ZzV9HBdEbWA6GcAu4IL+3aq GHWoOZAuZBw15aK6TxCnj+AIAnXQwhhhKpee6DYL9mH9/oEkhgcOc/CEEE+mP7VYFQ+C 43H/HigjsnV3UBK+56hMrBHOWmye1QrNcZKz/bSDgv7SStigPCCEXIQ6pXqtgzC5jSLR OhFpRCEvdACiGZayB82D+K6Wg4lnxSPO/ro57PlL9QA5XAynqxeJTxPfRxdpvXmvgNsi LRyuvmMu0J8Y2rKil8uwbuDRpG36FE8rZxsyqIQIcLdw2PTwCFvXs9e2xj7SAAcBRdZ+ ssHw== 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=FsFsbIiqmHBRnLpB+InMslJ3S9ZLQSUWBUH/FfTP94E=; b=hlyTmhwyDiAtrdhXL8rlF+8++r6J0EXmdImfo9wDRFLlyqKF7/fkQcEABgOez3dT3W eJxLSSMMhJtxmQk/O/BOKzy/Qx3S9mWGbLWpi4KYEDep3LCEHq6BLVcuGQc3hS6xGLxD ocs6fCVpgWUflIYzeG0WT/b6k3zbeOBrIMegP4phESp3Lb6vJ0UmxGOoFkke/qHophQJ kG0xFjgo0rObf6U2zduiWsSaswHvVsIXLBdUdgCOtu2plYfctCVSlv9mABWRYxW9CMVB rBsPdF0LEXBg4+EC4levR4culY/ryWpmbcYkdo6uhCYxdwi0mQAV7++MP1nBHz0O6g6t lzRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cV12/qCJ; 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 n22si4368372plp.580.2017.10.23.12.02.27; Mon, 23 Oct 2017 12:02:27 -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=cV12/qCJ; 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 S932336AbdJWTCX (ORCPT + 27 others); Mon, 23 Oct 2017 15:02:23 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:46096 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751857AbdJWS6q (ORCPT ); Mon, 23 Oct 2017 14:58:46 -0400 Received: by mail-wm0-f67.google.com with SMTP id m72so11436376wmc.1; Mon, 23 Oct 2017 11:58:45 -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=FsFsbIiqmHBRnLpB+InMslJ3S9ZLQSUWBUH/FfTP94E=; b=cV12/qCJ8HqgRvaa3drlNoNJhLkH9yxnMl+wOyzT5cImtCzEmkOpnZKU/MzZAh5Ll7 9H1/ozoUGNeYjGvB5NgeW75raI3gVg3+G5jz7tMcTiKhqCJX2MmhO5jNTfDZvO8KrcK8 ewYfegUztYKy9m420/Ck5/5qa/BblNlrxtu/LNokWBJfMZEuNaQMrZCtpYLqZwnpkrfL ZAv6okc7o4pmx6QUuypDbmCjrR2TxCpRQA4qURMzpiIFYNXuciNvxVMb2ZKGyLN7jwZv QF3/zEUUn7IMMlB1HQaaS/ULLDAbamc5yPyjSx6dELmUdavrKcHBgCvzNqFfRvcBTvGo 0Mcg== 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=FsFsbIiqmHBRnLpB+InMslJ3S9ZLQSUWBUH/FfTP94E=; b=JSSj1Old3Q0qDoLAnipTnQFFHjOni26ZyAhE5oWPd9VivPoeQt6eIjw/PpyMhUuIPm g5X+2kehULPyADbLteIFpxRdFmx1bqx2YPtuToKFsVlzc4ANGz3hznJ47BNW/n+EUq2v JOrq1ScEDl2Sb0xM1lAkwp7SCI3PpywjZhbySdnfJd96yAegTVj4nB27BPTPbkiUu2LQ M+IQtQiv3N+FuAOgGnXYO70Am+ulLj7GLN6eSBpfNIxmClIRMJPVE+OKQf9n0iohYTon NlYxa4ju5hEodRhDfRUUYSp470TnUX/dzH4m3ziIGGrtuew5hS1/MLi0PMXt6Ba4yHl0 l/gQ== X-Gm-Message-State: AMCzsaWX6Cf0Guqt+yc3u+puQj8kfw7pQ56xODEsvzvP2r9DEEHUS7mc aQh9aO3zsrExocJ/u52XESY= X-Google-Smtp-Source: ABhQp+QoQGb0g0UNgCe/fQzSeLiMQ1eXnKS3gGtUli2Lr/BgrAFxXe12Vrq51b+GHN/MuP82bxjLkg== X-Received: by 10.28.231.25 with SMTP id e25mr4606502wmh.157.1508785125134; Mon, 23 Oct 2017 11:58:45 -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 s196sm5370490wmb.26.2017.10.23.11.58.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Oct 2017 11:58:44 -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 v8 04/10] arm: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac Date: Mon, 23 Oct 2017 20:56:20 +0200 Message-Id: <20171023185626.31793-5-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171023185626.31793-1-clabbe.montjoie@gmail.com> References: <20171023185626.31793-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 | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 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..aa60b7fd18f2 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -422,14 +422,35 @@ #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 = "mdio-mux", "allwinner,sun8i-h3-mdio-mux"; + #address-cells = <1>; + #size-cells = <0>; + /* 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>; }; }; };