Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1268594ybi; Fri, 31 May 2019 17:09:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYvh4kuqf4q6AOvrKMVJD96Ic7AaRf+IuxzD0VI0aEA4RMbE9tNn0mVNoyFrSesjvfsDMT X-Received: by 2002:a62:4c5:: with SMTP id 188mr13553000pfe.19.1559347793131; Fri, 31 May 2019 17:09:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559347793; cv=none; d=google.com; s=arc-20160816; b=Ogxv/kkbGJQPqbezLJd4Kfl49IQBqqLbqw5lRvLLVfOfZj6sDJbfODdumjL7caenAg CeCR5fcsEB+7LofyYm2OBaY8OcGqUHh3yu44cc4NAEr8q/4bTZFyQVr6uEQDms6rpok9 ARdlnq1XKr9KyFIwoqeXCz9Eqp5EXWurY+ga51mXsP3mX/fd7osqDj4Rlue+BJInEmCP 9xB3XPBaa29ItDX4x2wqO/OHJCL3/VZSsxkD0SxjgCBSQvU3yW76TPsGmm8n9/bxsLLP TGlRxDzgPrskmK6vnEUXglB8zElm0NoS5G7K4MIY5UyhjxtHsQ7YokmmwzLOBkqsHzy7 R2xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=hhAzhznZs1h+xGmPmwlS+nqqhm6WwVRb9k8vbqSMJhw=; b=oLM932QVuqyXclYKAOsrlduMg6hBjGVddBDwLCPt/NToeRHQV61Y0i7yXex/ov6ey6 6aOZgWpa9FoWJhA17svrx8DOjDrdiYIkANDbQAaUT7QNN4H4efdkFAom0bChBWTdUI07 OmB6zpXVrJ89YYGFHZJ3CGwnN+mxdT/jvzs8vYUPYVyILAKUx0a28qHudKF3LtEoic1t +62uy/iqAE+709XnaCebTdeG2VZQC1U/2whW4Xl0nlZC8Xfi8bfRltAk4pHZyK9RGF4s CO8Ariwc7LSP0tuTGzJxekQCIdy4tZCGqhlrrNM31fhwp1g/nEIG/l5Bl1TmGLGZPm8G Hsug== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si8587898plu.126.2019.05.31.17.09.33; Fri, 31 May 2019 17:09:53 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726881AbfFAAI1 (ORCPT + 99 others); Fri, 31 May 2019 20:08:27 -0400 Received: from mailgw02.mediatek.com ([216.200.240.185]:33651 "EHLO mailgw02.mediatek.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726483AbfFAAI0 (ORCPT ); Fri, 31 May 2019 20:08:26 -0400 X-Greylist: delayed 300 seconds by postgrey-1.27 at vger.kernel.org; Fri, 31 May 2019 20:08:26 EDT X-UUID: a8890faa009e4b42a9d51a1661fd203d-20190531 X-UUID: a8890faa009e4b42a9d51a1661fd203d-20190531 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1633841494; Fri, 31 May 2019 16:03:20 -0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 31 May 2019 17:03:19 -0700 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sat, 1 Jun 2019 08:03:17 +0800 From: To: , CC: , , , , Sean Wang Subject: [PATCH net-next v1 0/6] Add MT7629 ethernet support Date: Sat, 1 Jun 2019 08:03:09 +0800 Message-ID: <1559347395-14058-1-git-send-email-sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Wang MT7629 inlcudes two sets of SGMIIs used for external switch or PHY, and embedded switch (ESW) via GDM1, GePHY via GMAC2, so add several patches in the series to make the code base common with the old SoCs. The patch 1, 3 and 6, adds extension for SGMII to have the hardware configured for 1G, 2.5G and AN to fit the capability of the target PHY. In patch 6 could be an example showing how to use these configurations for underlying PHY speed to match up the link speed of the target PHY. The patch 4 is used for automatically configured the hardware path from GMACx to the target PHY by the description in deviceetree topology to determine the proper value for the corresponding MUX. The patch 2 and 5 is for the update for MT7629 including dt-binding document and its driver. Sean Wang (6): dt-bindings: clock: mediatek: Add an extra required property to sgmiisys dt-bindings: net: mediatek: Add support for MediaTek MT7629 SoC net: ethernet: mediatek: Extend SGMII related functions net: ethernet: mediatek: Integrate hardware path from GMAC to PHY variants net: ethernet: mediatek: Add MT7629 ethernet support arm64: dts: mt7622: Enlarge the SGMII register range .../arm/mediatek/mediatek,sgmiisys.txt | 2 + .../devicetree/bindings/net/mediatek-net.txt | 14 +- arch/arm64/boot/dts/mediatek/mt7622.dtsi | 3 +- drivers/net/ethernet/mediatek/Makefile | 3 +- drivers/net/ethernet/mediatek/mtk_eth_path.c | 323 ++++++++++++++++++ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 97 +++--- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 177 +++++++++- drivers/net/ethernet/mediatek/mtk_sgmii.c | 105 ++++++ 8 files changed, 647 insertions(+), 77 deletions(-) create mode 100644 drivers/net/ethernet/mediatek/mtk_eth_path.c create mode 100644 drivers/net/ethernet/mediatek/mtk_sgmii.c -- 2.17.1