From patchwork Thu Aug 22 10:26:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 1151456 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=public-files.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46DghS4Tvgz9s3Z for ; Thu, 22 Aug 2019 20:27:33 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 976A2C2204F; Thu, 22 Aug 2019 10:27:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 6B845C2203E; Thu, 22 Aug 2019 10:27:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BE055C2203E; Thu, 22 Aug 2019 10:27:23 +0000 (UTC) Received: from mxwww.masterlogin.de (mxwww.masterlogin.de [95.129.51.220]) by lists.denx.de (Postfix) with ESMTPS id 71ADCC2202A for ; Thu, 22 Aug 2019 10:27:23 +0000 (UTC) Received: from mxout2.routing.net (unknown [192.168.10.82]) by new.mxwww.masterlogin.de (Postfix) with ESMTPS id B061996D28; Thu, 22 Aug 2019 10:27:22 +0000 (UTC) Received: from mxbox3.masterlogin.de (unknown [192.168.10.253]) by mxout2.routing.net (Postfix) with ESMTP id 23AAA61FD8; Thu, 22 Aug 2019 10:27:23 +0000 (UTC) Received: from localhost.localdomain (fttx-pool-217.61.154.89.bambit.de [217.61.154.89]) by mxbox3.masterlogin.de (Postfix) with ESMTPSA id 6F253360458; Thu, 22 Aug 2019 12:27:22 +0200 (CEST) From: Frank Wunderlich To: u-boot@lists.denx.de Date: Thu, 22 Aug 2019 12:26:48 +0200 Message-Id: <20190822102656.4993-1-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 Cc: Ryder Lee , GSS_MTK_Uboot_upstream Subject: [U-Boot] [PATCH v4 0/8] add PCIe, its PHY and AHCI support for mt7623 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This series adds PCIe/PHY drivers which were adapted from Linux version. The related drivers were tested on bpi-r2. To get AHCI (SATA) working on R2 (ASM1061 PCIe2SATA-Controller) 2 addional changes are needed (see Parts 5+6 from Oleksandr Rybalko) changes since v3: - fix build-warning on x86_64 in commit "Don't forget to clear upper address regs" - move history below --- changes since v2: - rename pcie-driver to "MediaTek PCIe Gen2 controller" - replaced readl/writel with (clr/set)bits_le32 - add dt-binding documents for pcie and phy changes since v1: - replaced mt2701 PCIe driver with version (PHY+PCIe) from Ryder Oleksandr Rybalko (2): ahci-pci: ASM1061 report wrong class, but support AHCI. ata: ahci: Don't forget to clear upper address regs. Ryder Lee (6): pci: mediatek: add PCIe controller support for MT7623 phy: mediatek: add MediaTek T-PHY support for PCIe arm: dts: add PCIe controller for MT7623 SoC arm: dts: split mtk-reset.h into per-chip header dt-bindings: pcie: add a document for MT7623 PCIe controller dt-bindings: phy: add a document for MediaTek tphy arch/arm/dts/mt7623.dtsi | 130 ++++++- arch/arm/dts/mt7623n-bananapi-bpi-r2.dts | 29 ++ arch/arm/dts/mt7629.dtsi | 2 +- .../pci/mediatek-pcie.txt | 122 ++++++ doc/device-tree-bindings/phy/phy-mtk-tphy.txt | 86 +++++ drivers/ata/ahci-pci.c | 1 + drivers/ata/ahci.c | 11 +- drivers/pci/Kconfig | 8 + drivers/pci/Makefile | 1 + drivers/pci/pcie_mediatek.c | 279 ++++++++++++++ drivers/phy/Kconfig | 11 + drivers/phy/Makefile | 1 + drivers/phy/phy-mtk-tphy.c | 362 ++++++++++++++++++ .../reset/{mtk-reset.h => mt7623-reset.h} | 4 +- include/dt-bindings/reset/mt7629-reset.h | 36 ++ 15 files changed, 1074 insertions(+), 9 deletions(-) create mode 100644 doc/device-tree-bindings/pci/mediatek-pcie.txt create mode 100644 doc/device-tree-bindings/phy/phy-mtk-tphy.txt create mode 100644 drivers/pci/pcie_mediatek.c create mode 100644 drivers/phy/phy-mtk-tphy.c rename include/dt-bindings/reset/{mtk-reset.h => mt7623-reset.h} (88%) create mode 100644 include/dt-bindings/reset/mt7629-reset.h