From patchwork Wed Oct 18 11:44:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 116269 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp5965212qgn; Wed, 18 Oct 2017 04:47:27 -0700 (PDT) X-Received: by 10.84.211.79 with SMTP id b73mr14928918pli.214.1508327247299; Wed, 18 Oct 2017 04:47:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508327247; cv=none; d=google.com; s=arc-20160816; b=Y5M8/Vwl1n14TzbWYvEm9xu/UjQ1eUQMVnGDHvkwZn4OlaSlTSXkYiDZoalo6iu+pm 4HSBP9C0KyIbZH+hlcQ2tVqS54vBxb/C8AUm1FFxH+B+UCMndkEx/hgv3tRDEwNk7O80 XuP1WuaDmufrOxvZv9aEN2uwl2xrP3nACwGNnQ64hjb1PIMvRaAD+X9rv3cPlh+sBaCC c6J2MfCHk5wQUg72N1vldSC389Wa19uhxWf8YjranmCAIjXEZLBvRzfk02XOY0BQIZoY 3XtJKrSc1KWFdS5L4UscTIlLPRqugO7PQlSDhzYCsRWhyVLQNOs/z4kd8AjAvaB8Vmur 4eYQ== 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=Lv7RDQhJG4bETTumew24ke21WaCXhBTbZLi5r0SVAak=; b=bx4yb19Q8bee/SGxCMYjsAfLKzKlaNT5zeMSc6J3ayQibIMfjwpZspAzdcBBaaGwaj y1dwjHAdEhLFaR9LX9lq3IE0rMVxcmboNQHwN8OLSfBb4ghtDuCGr5twm6EAgSQAL6ak sjJYj8w028/7TQtxxpVjehDoH/s21gvSIRNoGqo5YDEsylZffWusLXi5rVZqEhnvmq6P 9HBvY7JyyNKVSKwKAocWpCsltssUXentjRObDb8Jz9cNjREEUzL/cNyoboEhErXXT7P4 v80QGoIcbBr9lAyWzQXaCNKC9hK/+FLodDlxQul1q5yl/i91vfbxVeKLVIpW1Mu2Jv0r /0BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=R9bpmghQ; 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 f6si7609860plt.152.2017.10.18.04.47.26; Wed, 18 Oct 2017 04:47: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=R9bpmghQ; 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 S932683AbdJRLrZ (ORCPT + 27 others); Wed, 18 Oct 2017 07:47:25 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:50173 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754406AbdJRLrT (ORCPT ); Wed, 18 Oct 2017 07:47:19 -0400 Received: by mail-wr0-f196.google.com with SMTP id g90so4700249wrd.6; Wed, 18 Oct 2017 04:47:18 -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=Lv7RDQhJG4bETTumew24ke21WaCXhBTbZLi5r0SVAak=; b=R9bpmghQXYY+MdE+1kH/RYjmzBOIdz0a2ZpFXul4XiYmD5M6hSxHp5Pb0EgOtYeIg3 oBXP9ZMkbyt4yLgI+QE1MMXLWbhPC/FUDqJkbX/cz+CxkHxRdt3u7kF96oX/7ZyVtBWt sWHkKmPeg82NAgA30FbrfqKB9qS3L+kxI5MiMdUzOz6Bic3+OdI+ERaKCa3gbuMg4Fog qkcw/nUfWgZG/S1igbxFj7oflzK2vq4G+T/fPIXBEN/V2jC26kD37aKxWw9wrm1SWr57 6bd0DzrgYDYwZ6zZ8CnmUlovvHhz0/DWKvSa28ohoUWd87VlKS6DTwq6FuxMOODkoKOs 080A== 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=Lv7RDQhJG4bETTumew24ke21WaCXhBTbZLi5r0SVAak=; b=ELfCaJFhPEFKhwu60drXc7ElT4teS9f702n/9ihqyfGLOZdYQahPA16q2hBKEsUsBb QHqV1mGHgDPCbU3YCj7Zvh7nT3kWMk3y4a50xkYTnFlUF+IjJswyxF4r5v8AUFRwdJ3A UH8YTpusgmBuABd5OhSz9OunypoD5KhYBUi7/thIsFPuya61Er+aZ4Ow26dOvsKaeoGX 0GsWWvQWDbxAUcWHxQho8WcsBOwMFjIqvrTMjywGFlUBbbg0cV+R5kF11c8iylrzzTSu zAm5I0/A32w2oOY1Z5BXuyxPFOu9pXSgUO52LhmEnUePHgZX/T/a4KgOObIpcfGYcB1u oudA== X-Gm-Message-State: AMCzsaVhVcngVl1Dc1yO8gu2n9mi2ov1ENyFz+4ZupmRJONKfWitFXgY 3Jff1vt6eydwshKL4dy3D1w= X-Google-Smtp-Source: ABhQp+Sq5IRluZT6wHcRgXPqcc7e3T6YstaGDGcGlzSBaRx1pionM9giftePDOwc9LdXmQx2gCqnHQ== X-Received: by 10.223.188.133 with SMTP id g5mr5882549wrh.204.1508327238122; Wed, 18 Oct 2017 04:47:18 -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 61sm8444391wrg.58.2017.10.18.04.47.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Oct 2017 04:47:17 -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, frowand.list@gmail.com Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe Subject: [PATCH v7 06/10] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac Date: Wed, 18 Oct 2017 13:44:54 +0200 Message-Id: <20171018114458.17891-7-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171018114458.17891-1-clabbe.montjoie@gmail.com> References: <20171018114458.17891-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 | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 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..895816f4d741 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"; - reg = <1>; - clocks = <&ccu CLK_BUS_EPHY>; - resets = <&ccu RST_BUS_EPHY>; + 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>; + #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>; + }; }; }; };