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: 10033707 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 EDEC3603B5 for ; Tue, 31 Oct 2017 08:23:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DBCA028614 for ; Tue, 31 Oct 2017 08:23:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D07A7289A8; Tue, 31 Oct 2017 08:23:24 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED 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 5FA7B289A1 for ; Tue, 31 Oct 2017 08:23:24 +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=FwWa7hjErWPJPoQoeW2n+K0YjpQjEVSkR8r8000xUzY=; b=fznB9gnuvj20PcX5xfVk31sntx KlNT3PgLw4yxg/oEKksrmN8VsZ7ne77wDhcqHO7iG4ruBVKQ7kXc7S+W0EnrtElIEZbhayXK89DYC jkVG+bQ/MI8IhSGBwpvxjcYS41sahIpx/zyCgmGEsSo9SSd1OvvDhb1qzxRqJ5/xEcSlhGbZciw+4 INHQcVaUoKXAFMrONJWlIF24njgYPJqV7AHiAZ1+TzhRpNH0lCudlGM7HD3BNad+ZOotjFEKTgDkX b7LastIpzdUJxOUDoV8fsj355OkVcBDzJGO1c20rp7OuPU6AueiO/Qom04wWY4KXbKIOLslnkDt5T 3vHLGBaA==; 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 1e9RpP-0003TR-HT; Tue, 31 Oct 2017 08:23:19 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e9Rnv-0002HW-Qg for linux-arm-kernel@lists.infradead.org; Tue, 31 Oct 2017 08:21:49 +0000 Received: by mail-wm0-x242.google.com with SMTP id r196so21259699wmf.2 for ; Tue, 31 Oct 2017 01:21:27 -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=c518aqMVA2YtCr9sKNE1CM371A/drqDsJ/uIw36emu5RduZ2QUlUldd3YqyVSogxj1 Rt5A1mVdwSPMmQS10+y+RvHTF9fVIn+TuIVxciR9aBCx0GM5To0cX0TwuqaDxP+qqtsu /pUE2sy1L1fpnmIFyCq7uBbRt/fdEWjbcO7xyuN61VUjT9laNfEBDL75exle+xd41fmb UicCMVTyCIZHM4nqjeDNiC8ZDQB1VZMCUbwFkbFhqT+3aDb0UNlW2Eq7bl+6I3SUTbxe yfBy6dTPYNMQU+t+lu1DcD0/gl8W2Ed62N16hYWDqticxkdGkhF95zPe+SdUhfU5U/Hx gXfg== X-Gm-Message-State: AMCzsaUhWk0623X0BqpttFtZPHKE6NyEiblMvpNtWrI03nnLJgTk5WuE nepBbHVG7n5YibKNj9QYJZA= X-Google-Smtp-Source: ABhQp+QXr2ceAI55OUOWRkigi6ijO3Hp6z/hod+JWNM/hMis8pfoECLH23+3Mu61I5u5H+1C1nB3LQ== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171031_012148_036559_4CE883F5 X-CRM114-Status: GOOD ( 10.36 ) 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: netdev@vger.kernel.org, Corentin Labbe , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@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 Acked-by: Florian Fainelli Reviewed-by: Andrew Lunn --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) 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>; }; }; };