From patchwork Mon Oct 23 18:56:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 10022969 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 9A81D60245 for ; Mon, 23 Oct 2017 19:00:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D7A6288AA for ; Mon, 23 Oct 2017 19:00:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81ACE2894D; Mon, 23 Oct 2017 19:00:44 +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 1D6F1288B6 for ; Mon, 23 Oct 2017 19:00:42 +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=Wd3vwLCoLQ+T1OnEg0exUIv6mA+ESoodfWEBtmZtwxI=; b=b3Fhr+PjqcREVow5nXuXVPcIhx q55EYjDyHOxQ6OXFIi5/Gn2H+w8n+88qocyKSmC4t5sEpfbdGy391ZDohlvZu6uyE1QtoFbjQgONd IOL1T2J2ra6KjbZNgT2ANtb5JSggYsjg5dnv2Cl/RbrvbGocTECqf1UTjC1dOZsqmkwELgEvYvJLp RxxkNzMfZfpLGvca1ixanvEe+SwbgwPeq5lSBI+j+yitw5lFVXaD+bR9P3ilAVjgDF5mXej1RphNl BI4qjzeUBsq0KyaEq5J8nW6L2e61tgzAhZELsiTn6psOPvzuMsZC/+W2BvppzLeTou8RmL44Kml7c BscIxBNw==; 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 1e6hxm-0006gG-FB; Mon, 23 Oct 2017 19:00:38 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e6hwH-0004RG-Ln for linux-arm-kernel@lists.infradead.org; Mon, 23 Oct 2017 18:59:08 +0000 Received: by mail-wm0-x244.google.com with SMTP id q124so11438815wmb.0 for ; Mon, 23 Oct 2017 11:58:46 -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=FsFsbIiqmHBRnLpB+InMslJ3S9ZLQSUWBUH/FfTP94E=; b=cV12/qCJ8HqgRvaa3drlNoNJhLkH9yxnMl+wOyzT5cImtCzEmkOpnZKU/MzZAh5Ll7 9H1/ozoUGNeYjGvB5NgeW75raI3gVg3+G5jz7tMcTiKhqCJX2MmhO5jNTfDZvO8KrcK8 ewYfegUztYKy9m420/Ck5/5qa/BblNlrxtu/LNokWBJfMZEuNaQMrZCtpYLqZwnpkrfL ZAv6okc7o4pmx6QUuypDbmCjrR2TxCpRQA4qURMzpiIFYNXuciNvxVMb2ZKGyLN7jwZv QF3/zEUUn7IMMlB1HQaaS/ULLDAbamc5yPyjSx6dELmUdavrKcHBgCvzNqFfRvcBTvGo 0Mcg== 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=FsFsbIiqmHBRnLpB+InMslJ3S9ZLQSUWBUH/FfTP94E=; b=hYGUeyjMYTwkY7kVoco+ePTb6xEVhs4yOFr35PN0YP9Zc4BaW8VlR4JBknFsSbZj1D omNh8Rk70TDUohka0+ppKbfdKyLf8ejblqcupunmGt8NJXDv6bnnses/OkhLKLMlK6nn T9wzUoOThaZq8KXLGza8uqafwl4ADAzHbqtvI3C2pWGKOY5S/ECJrqG8rTdm8A97ZKY0 ZwusIuwuqp8TqvoCe/RrvrCBlbjNzlCnzlJJ79mjG92BK1E0a7GTX/CVhDRpPNbWle07 te5FHpnnh8mxmhrxN+uCPNOKxaJFs63kl5pCxdKgJRpEjWYWiflXlWyXkR/q1qzNP8or 1hGg== X-Gm-Message-State: AMCzsaXTBHd1LoT+Ujb5dbq562DHWQ0k6cDieomHRN3jBHnqAp6skLXb 98Io7tJ1GGOwhHYYTJMH+BQ= X-Google-Smtp-Source: ABhQp+QoQGb0g0UNgCe/fQzSeLiMQ1eXnKS3gGtUli2Lr/BgrAFxXe12Vrq51b+GHN/MuP82bxjLkg== X-Received: by 10.28.231.25 with SMTP id e25mr4606502wmh.157.1508785125134; Mon, 23 Oct 2017 11:58:45 -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 s196sm5370490wmb.26.2017.10.23.11.58.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Oct 2017 11:58:44 -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 v8 04/10] arm: dts: sunxi: h3/h5: represent the mdio switch used by sun8i-h3-emac Date: Mon, 23 Oct 2017 20:56:20 +0200 Message-Id: <20171023185626.31793-5-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171023185626.31793-1-clabbe.montjoie@gmail.com> References: <20171023185626.31793-1-clabbe.montjoie@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171023_115905_995732_BF9EFC01 X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. 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 --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 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..aa60b7fd18f2 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"; + 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>; - 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>; }; }; };