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: 10025315 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 576A26035E for ; Tue, 24 Oct 2017 18:13:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44A9228A1A for ; Tue, 24 Oct 2017 18:13:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 398DB28A1D; Tue, 24 Oct 2017 18:13:49 +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 52A6228A1C for ; Tue, 24 Oct 2017 18:13:46 +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=BJHnTVtvjjO5ZWv8cYxUcG1wpwJ0T9G6ps1IY1ETZfE=; b=bH8rZuwt1K1cH4R4mJzTkNWciG jueoI+GXybXHiNel1fWNq3yui6bWS5wXPM4+IDxGoPWLW6xQb+aXfEue9M5KArXYKS+WCu7Dlw7BO NdynqR6yCQwbnFQUS3UQpxWpeMLprSWjmOUIATjb0fyOkHr0OrvhEJ0KuAT8cNOJrrrlEHwkaXFIX m0Lbn+7rde5VypA5dKr0urx6qnH1J3eySJctA8ZdqthqMUbxaOaDrDguWAffOp3TtNgpuDXWVlyBV RB9Vyk212PVIfWEpRKKrJRG4EWKYe7bqT9XBuVic90MTm5KMo65qcEiaWVC9/3rHXtQBNcyjczePS tBuVTAQQ==; 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 1e73hx-0004dw-KP; Tue, 24 Oct 2017 18:13:45 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e73Vk-0006GB-Lo for linux-arm-kernel@lists.infradead.org; Tue, 24 Oct 2017 18:01:11 +0000 Received: by mail-wm0-x243.google.com with SMTP id r196so5081081wmf.2 for ; Tue, 24 Oct 2017 11:00:49 -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=h8Gj2mnAAFuFQ7yd6c5RY92E7uX7H7EwUR420n/XWQu1DXkIYjxe64IviPR9ZnP7LO Bpz6jlOeraLwUz5j1POOjUyGxujMWCzOFdaWDWXE8JcrJ4AGFbDVwUEWVARwQvG/RHWz wItCFQ9gY4u/DVbhZfjliOKZFVzEHNOa5mZH0VDnvgaaGutJK1g7+LM78NVK5Q0uyWVp u78voKZz+ALE8SM8CvWLfSGYTmowMSuQKM6HKVd+uQaFygPXMcfaIIqthCO1cKfGdVSw iFscXF6SgR//k+kaY3iKciHjvpSYb+EhaHj1w1ad+kIA821TVUQPew2mf959vfsAMaqv bXgw== X-Gm-Message-State: AMCzsaVUajP5Ri8E9feeIwqRC9P4LqESby/IHMqEbb1zCsaMwjaitT3k bSjsw6MObN2QQD76ZZBph3Y= X-Google-Smtp-Source: ABhQp+SdJzrlrgBvrYapFqTUb1C2vAvXS8gqSep4gExFi5ghcz8P0FVe/24VnQKJEbR+/s6ddtvKjQ== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171024_110109_006295_76B94748 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 Reviewed-by: Andrew Lunn --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) 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>; }; }; };