From patchwork Tue Oct 31 08:19:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 117524 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3596387qgn; Tue, 31 Oct 2017 01:21:37 -0700 (PDT) X-Google-Smtp-Source: ABhQp+R1ITO7rY+jii9I7PWPjy+nq37+jYqWBlFL5Ea6Mdr9Da0z3NIdqLB1eMtEINHKO5wqKIPr X-Received: by 10.98.68.8 with SMTP id r8mr1218085pfa.161.1509438097217; Tue, 31 Oct 2017 01:21:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509438097; cv=none; d=google.com; s=arc-20160816; b=Twyooe+nSZ50NTohwg6N00R3mGs2OgGvfuc0eoSCEJ5gxd97KWLoW9ciI6116VQMU6 OutzNEzRrNPibcs2wXGwyd1IrTEGZBg7C9/BBBA5C2rXoyVchrUDvQL/cEQFENUJM6y3 v1ZHHEWdz/tsIhFQVYDSZUv8qUaDlR4alkkok640GWoXCOGs/DIimC4F6Qf3VhWUlwRW wjTiMJMveI5Vsew92Y7nHdKeYJhfgjiCSFyBJMfXvXX3z0SmnBYyXaS50YBNn4dOl5KJ 8pKSb4M/LCWp3bQQi2f9sceULPfhefht6HyviDeEu+n7WMRrIKwJAq2R5xxJejFe6qi+ HXwA== 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=WUj2A17fMGzjQwNYvdVSyoiJnoWPJxxnMrzOkInDpys=; b=DWiM1cyxBJkUMi31EYJxTQnyOtqRcL17n6J0hNDBpLvA7SyDWQFKsT99xKVoBIlLgd oLYRKZebd44ULby7rHJpqbIp4JBFa4FZmKdCIpyMAAC4w3uD6LU4VkKmPJXcm3GKalGZ JsQojwDAYgN0eQJd45um8EiWQ554/M3NxbFJkyVfPSXHshKd4sNJKXYnrvjE7quJ1k28 Z79RePJrGH6myus9Nzs5hU6nzQvTc2hr+udcaTgOt6gl1376fzzlGwBYldjl/9reavvP 6rAoFEJrd2Brv7sW1EIkxI3ksi+aBK3x5aGelYJ+jAfAyFbXY9ZVidHL4I7W80W1hgZ1 Sv1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=al6KwbJu; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 z33si1044066plb.136.2017.10.31.01.21.37; Tue, 31 Oct 2017 01:21:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=al6KwbJu; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 S1752981AbdJaIVd (ORCPT + 8 others); Tue, 31 Oct 2017 04:21:33 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:53159 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752823AbdJaIV1 (ORCPT ); Tue, 31 Oct 2017 04:21:27 -0400 Received: by mail-wm0-f68.google.com with SMTP id t139so21248840wmt.1; Tue, 31 Oct 2017 01:21:26 -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=WUj2A17fMGzjQwNYvdVSyoiJnoWPJxxnMrzOkInDpys=; b=al6KwbJupLf4iy3oXA75Bcz4vGpGJPk/RlEibgz1BTmAKjL+v90G14gWpW5cqnfXMh 3VB9pF26nEI6pvG/38eELG++qXJIAW09ytm9uU1OSG5zEymOqveLMpp995q78hBwuvV/ LcK/Kjr3mejoA53aStMl6gc2L6ddG4B6rO5z49Fu0QYThddEQsK0++P8YGFjhB22MhL8 JsF+PMEQAPoigAbNqZPVE99hxtw+rk8K7+oGqZqfEeB0vQbyzBbYC4VjNO6tM/SkF51i jehVor6mSjq61In5Qhp0yNnSv/mbfc4xGzx3S9gLBPzazXPSJ4ZJnBjqCX5cU3qOSbPG z1Uw== 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=WUj2A17fMGzjQwNYvdVSyoiJnoWPJxxnMrzOkInDpys=; b=qLejvGxvnMGIKSca+vfr9SscRYmIyb9EiqeIMZEvH/MQ6XydmD8bxFG8WwlF5DG+P8 64vtNb1xB99c/Yqwi/O7P3ybOE0b7qLFt6UUQaxF5/teGOGsUTDTBCN+ggBcgADsrjIG Q6nLca9Sb/v32bggzDkrO7U7Z/35RImY7MLK2YbDB+/aBjYYipMr/L3L5LtVCHOWii4G DO6MIRVDC27ql7MxP2VLAlxulW6b4NWaKU+Z74v0Oe4q+n4vItWj6cYmHjcdCJrqflE0 nj00w+wpv/sRETcmpxW1ZqdzbXRwVC2TLCUBGDo9VlTPgHY15VK5Vl/o9wRRQg5JKiK0 XVQw== X-Gm-Message-State: AMCzsaXOXuSNPv2H2D38f9MISWrRJib+Fa5LgWcdzHP4RBYysUQzwan5 AQufIrDD/O9DY5B8U/FJJKY= X-Received: by 10.28.93.200 with SMTP id r191mr564024wmb.141.1509438085828; Tue, 31 Oct 2017 01:21:25 -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 d18sm796423wra.50.2017.10.31.01.21.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Oct 2017 01:21:25 -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 Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH v10 4/8] ARM: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac Date: Tue, 31 Oct 2017 09:19:11 +0100 Message-Id: <20171031081915.18960-5-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171031081915.18960-1-clabbe.montjoie@gmail.com> References: <20171031081915.18960-1-clabbe.montjoie@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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 Acked-by: Florian Fainelli Reviewed-by: Andrew Lunn --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 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..408df33e947b 100644 --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi @@ -425,11 +425,34 @@ mdio: 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 = <&mdio>; + /* 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>; }; }; };