Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8892747ybi; Tue, 23 Jul 2019 17:31:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqygDro+kHTwN72M4uwkWnL8kYwykbm4lcPWiz0XmT4PYFWhdDVZE1SM+Qvt0EbvBsCnCWvO X-Received: by 2002:a17:902:f082:: with SMTP id go2mr86949561plb.25.1563928305979; Tue, 23 Jul 2019 17:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563928305; cv=none; d=google.com; s=arc-20160816; b=YnlBosWYBrdCTaa/T7mt58gdGdRPSPWm7uHWVVWDlOClhoZri4rCGxlwvPHxoi1tm9 UUSazoJ76aRdbUVLLw3CHHS/NZwirErXxPjkHvr72edvfjkLJ8N+r6ZXZGGpTxTU1S8e NXyU9NNMjDtS+/xjITwJshHR33PEcJ/UhZh2QiEnArTJM9MQpdxaPeQWnMWXOH8/WA/E K5h5mCEeaagK7k0tAtv2BjMbD2TL4WR+rQGOqhqpW/gxfbHcrIgYKo5Hy4ykxLNih7TD YSQh+BomVkeUyvA3TebTtZp6owO+ifDPEUiwuTfv2540TmW5IBUcPzrARfSdmYmruCJ3 mTsA== 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; bh=9nxsIXDyPw6T61xdQynNRNGdOqD02XJoMQ+6PhrQON8=; b=gkBvyyYmc/qSQfx3L65++ZGAysUaBIhs7KbqUhMyyiUc3JymwSLs0PNqGReZamKlt7 vmADcLr83XN6U4SkeL/zmVwkzDTlusjtIabwUsv5Tq1rMCe7WbF5o8PKNq5Nhn0EnAH7 d4KxF8k+VJuKzbHXJw++TFg1qO6ztfZgEd9sWR6K8Cq/EcNPYDjnIdza6n6DBfHo+WNz lynPyxki9ZIIxao0zhl1escyJ3Gak738oFJopXE9e7xB19NOb0K3LfKg0udeFRpEOnMp nidho4fvcEAmFIV68ikjS4CtM1ZyCR63q0pEIgj4eC4lqxfxJDGNmyqBknpUxvhD3lx2 diag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si14278399plq.93.2019.07.23.17.31.30; Tue, 23 Jul 2019 17:31:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730579AbfGWPQH (ORCPT + 99 others); Tue, 23 Jul 2019 11:16:07 -0400 Received: from inva021.nxp.com ([92.121.34.21]:59536 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726819AbfGWPQB (ORCPT ); Tue, 23 Jul 2019 11:16:01 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 883192001D2; Tue, 23 Jul 2019 17:15:58 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 7A1992000FF; Tue, 23 Jul 2019 17:15:58 +0200 (CEST) Received: from fsr-ub1664-016.ea.freescale.net (fsr-ub1664-016.ea.freescale.net [10.171.71.216]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 1CEE9205DD; Tue, 23 Jul 2019 17:15:58 +0200 (CEST) From: Claudiu Manoil To: "David S . Miller" Cc: Rob Herring , Li Yang , alexandru.marginean@nxp.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 3/3] arm64: dts: ls1028a: Enable eth port1 on the ls1028a QDS board Date: Tue, 23 Jul 2019 18:15:55 +0300 Message-Id: <1563894955-545-4-git-send-email-claudiu.manoil@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1563894955-545-1-git-send-email-claudiu.manoil@nxp.com> References: <1563894955-545-1-git-send-email-claudiu.manoil@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org LS1028a has one Ethernet management interface. On the QDS board, the MDIO signals are multiplexed to either on-board AR8035 PHY device or to 4 PCIe slots allowing for SGMII cards. To enable the Ethernet ENETC Port 1, which can only be connected to a RGMII PHY, the multiplexer needs to be configured to route the MDIO to the AR8035 PHY. The MDIO/MDC routing is controlled by bits 7:4 of FPGA board config register 0x54, and value 0 selects the on-board RGMII PHY. The FPGA board config registers are accessible on the i2c bus, at address 0x66. The PF3 MDIO PCIe integrated endpoint device allows for centralized access to the MDIO bus. Add the corresponding devicetree node and set it to be the MDIO bus parent. Signed-off-by: Alex Marginean Signed-off-by: Claudiu Manoil --- .../boot/dts/freescale/fsl-ls1028a-qds.dts | 40 +++++++++++++++++++ .../arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 6 +++ 2 files changed, 46 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts index de6ef39f3118..663c4b728c07 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts @@ -85,6 +85,26 @@ system-clock-frequency = <25000000>; }; }; + + mdio-mux { + compatible = "mdio-mux-multiplexer"; + mux-controls = <&mux 0>; + mdio-parent-bus = <&enetc_mdio_pf3>; + #address-cells=<1>; + #size-cells = <0>; + + /* on-board RGMII PHY */ + mdio@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + qds_phy1: ethernet-phy@5 { + /* Atheros 8035 */ + reg = <5>; + }; + }; + }; }; &duart0 { @@ -164,6 +184,26 @@ }; }; }; + + fpga@66 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "fsl,ls1028aqds-fpga", "fsl,fpga-qixis-i2c", + "simple-mfd"; + reg = <0x66>; + + mux: mux-controller { + compatible = "reg-mux"; + #mux-control-cells = <1>; + mux-reg-masks = <0x54 0xf0>; /* 0: reg 0x54, bits 7:4 */ + }; + }; + +}; + +&enetc_port1 { + phy-handle = <&qds_phy1>; + phy-connection-type = "rgmii-id"; }; &sai1 { diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi index 7975519b4f56..de71153fda00 100644 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi @@ -536,6 +536,12 @@ compatible = "fsl,enetc"; reg = <0x000100 0 0 0 0>; }; + enetc_mdio_pf3: mdio@0,3 { + compatible = "fsl,enetc-mdio"; + reg = <0x000300 0 0 0 0>; + #address-cells = <1>; + #size-cells = <0>; + }; ethernet@0,4 { compatible = "fsl,enetc-ptp"; reg = <0x000400 0 0 0 0>; -- 2.17.1