From patchwork Mon Oct 18 07:07:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 12565211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7130C433FE for ; Mon, 18 Oct 2021 07:07:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8705B6127B for ; Mon, 18 Oct 2021 07:07:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230407AbhJRHJw (ORCPT ); Mon, 18 Oct 2021 03:09:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:53826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230380AbhJRHJu (ORCPT ); Mon, 18 Oct 2021 03:09:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B63F6610A6; Mon, 18 Oct 2021 07:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634540859; bh=sq8bIQQ/eEGYcPaW/ICYIrClwaQfOiGgNSyoUzf1Fk8=; h=From:To:Cc:Subject:Date:From; b=ELkkHS80C+ay2r1JCaiJrqqMvZ3YQnobV80HpIulgVAphj38Py+z5up9vmSv156RR iXwWezGR1jvDiqegxeOxaDsimB8ipeN1CEJC/Ztp1MYYIfkQWFdUkneu8AQ1QAFM/i N0jlDR/muzqZ1AVF/n22zO59zT8rc9e/etkE4BB7lf8HWxLRRAGWDb0YphS9QPUE00 oOIBL97t7qu8bImUz0FzN8gVviF5oy2xKpDWdQaoBq6ZGthWzoRJ8coEUinqP/Axs3 4ra90NkWO4U4A1JfnfBl3nEBC5xCm4WGQSZUzKxxTiXQ7vnph2Fwn+syJKTr2yxuHk 0uu25IO79WDgQ== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mcMkC-000Icp-Li; Mon, 18 Oct 2021 08:07:36 +0100 From: Mauro Carvalho Chehab To: Lorenzo Pieralisi Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , "Songxiaowei (Kirin_DRV)" , =?utf-8?q?Krzysztof_?= =?utf-8?q?Wilczy=C5=84ski?= , Alex Dewar , Andy Shevchenko , Binghui Wang , Bjorn Helgaas , Jaehoon Chung , Luca Ceresoli , Manivannan Sadhasivam , Nobuhiro Iwamatsu , Paul Walmsley , Rob Herring , Simon Xue , Srikanth Thokala , Wesley Sheng , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v13 00/10] Add support for Hikey 970 PCIe Date: Mon, 18 Oct 2021 08:07:25 +0100 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hi Lorenzo, That's basically the same patches sent on v12, with the acked-by from the driver's maintainer (Xiaowei Song) properly added on each patch of the series. The pcie-kirin PCIe driver contains internally a PHY interface for Kirin 960, but it misses support for Kirin 970. Patch1 contains a PHY for Kirin 970 PCIe. The remaining patches add support for Kirin 970 at the pcie-kirin driver, and add the needed logic to compile it as module and to allow to dynamically remove the driver in runtime. Tested on HiKey970: # lspci -D -PP 0000:00:00.0 PCI bridge: Huawei Technologies Co., Ltd. Device 3670 (rev 01) 0000:00:00.0/01:00.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 0000:00:00.0/01:00.0/02:01.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 0000:00:00.0/01:00.0/02:04.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 0000:00:00.0/01:00.0/02:05.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 0000:00:00.0/01:00.0/02:07.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 0000:00:00.0/01:00.0/02:09.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 0000:00:00.0/01:00.0/02:01.0/03:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a809 0000:00:00.0/01:00.0/02:07.0/06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07) Tested on HiKey960: # lspci -D 0000:00:00.0 PCI bridge: Huawei Technologies Co., Ltd. Device 3660 (rev 01) --- v13: - Added Xiaowei's ack for the series. v12: - Change a comment at patch 1 to not use c99 style. v11: - patch 5 changed to use the right PCIe topology - all other patches are identical to v10. v10: - patch 1: dropped magic numbers from PHY driver - patch 5: allow pcie child nodes without reset-gpios - all other patches are identical to v9. v9: - Did some cleanups at patches 1 and 5 Mauro Carvalho Chehab (10): PCI: kirin: Reorganize the PHY logic inside the driver PCI: kirin: Add support for a PHY layer PCI: kirin: Use regmap for APB registers PCI: kirin: Add support for bridge slot DT schema PCI: kirin: Add Kirin 970 compatible PCI: kirin: Add MODULE_* macros PCI: kirin: Allow building it as a module PCI: kirin: Add power_off support for Kirin 960 PHY PCI: kirin: fix poweroff sequence PCI: kirin: Allow removing the driver drivers/pci/controller/dwc/Kconfig | 2 +- drivers/pci/controller/dwc/pcie-kirin.c | 644 ++++++++++++++++++------ 2 files changed, 498 insertions(+), 148 deletions(-)