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: 10014457 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 84BE2601E7 for ; Wed, 18 Oct 2017 11:49:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83D4628B05 for ; Wed, 18 Oct 2017 11:49:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77E8528B24; Wed, 18 Oct 2017 11:49:04 +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 2C7F328B05 for ; Wed, 18 Oct 2017 11:49:04 +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=VZ3fU8EIpzvu/KexOgLwtUuRfa/TqUPGAeCHHGcDj8s=; b=ZUqYa9GoLx4cPIXoxSvIH5Xhmy Q7nNFj7NXwqS4kttFFKAsMkUSHWxowkBv9FhCwuASXGn6z+sc1qyW9z8bKkyueJ2z/deDS0ac2nWA gmQnGqvzUmMm1LeltZaRO1t1wXH8lX+oedzld1wTVwwCbRvT4FsjUXbzYljsqIIV9aB/scrFAiDS6 DClVe4i0Lrc76x8zNebbDeATTMHh+9bcew4hC1Wc4vAqnF2f/uRAbgqQg4QmA9vvMCjsS4ZhYnXrJ /4fHnIvqBE5roTocaDkSDsiqJh3JdlzVs7WUei5bogsD1nkRd+ozy4Zh/NkhiK1Ye6ggOsQYXuxSn 7/XfJEyQ==; 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 1e4mq1-0007ii-7f; Wed, 18 Oct 2017 11:48:41 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e4mox-0006cV-7N for linux-arm-kernel@lists.infradead.org; Wed, 18 Oct 2017 11:47:37 +0000 Received: by mail-wr0-x243.google.com with SMTP id k7so4706937wre.2 for ; Wed, 18 Oct 2017 04:47:19 -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=YiYcb3NvlLeKcIVCR0C+JmGbkLuqVQ4HGwxdkVc3QSHFVtpVEsTEUILYbuRtIaURHC HQvtUc2KqvcXWl0COVf/gPMxgzObyQIcSZlA9Yqpd/+yKxcHefByCH91xkjjd/DIoDZP dx7LErOhXjQmYhiH5fbwDKwYWN8HCXtx5rZSt28xFbmUFgvnPJZzS8+5vdbbIQIs/hur bSctkIAQXUz2SOhSGH+LKGOBEntvIBMOdoKNLXW+oK6x71f4bL0oZVgJkIdjz3ibiOrU zuUUe7rndfN0Kxnf45f7n+x3ehQABkIsyeDb39Fqj9o7dw31ZMnx2mTenButZxyF/4LE VTPw== X-Gm-Message-State: AMCzsaXUNNqJsM2I/L/2dRLWCtc5MO/Ojp6u89UhVkMBf4whJr3Pb0PX 0FP2YarcKhMB2hTFX7HDNxI= 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171018_044735_450893_80B722CC X-CRM114-Status: GOOD ( 10.16 ) 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: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Corentin Labbe , linux-arm-kernel@lists.infradead.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 --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) 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>; + }; }; }; };