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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0531CEB64DA for ; Tue, 18 Jul 2023 07:55:42 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 50B18866C2; Tue, 18 Jul 2023 09:55:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kwiboo.se header.i=@kwiboo.se header.b="L0JYWEmW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3B975866C0; Tue, 18 Jul 2023 09:55:40 +0200 (CEST) Received: from s.wrqvwxzv.outbound-mail.sendgrid.net (s.wrqvwxzv.outbound-mail.sendgrid.net [149.72.154.232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7698C8466A for ; Tue, 18 Jul 2023 09:55:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+31435339-7456-u-boot=lists.denx.de@em2124.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type:cc:content-type:from:subject:to; s=s1; bh=2WZT+Qkq9VPFeWKii09ptwF8mTdOb3XD/aDH/Abi66k=; b=L0JYWEmW8BYZmC4vUMyA4lyVTiCtYa/miu3MYxf6me3GNhex42bpQWlxohevm9msY6h0 5+i8G9klaeKL1N9JlPDFdpyj9B3czVkBD16iW649GvgfPrK9+0991uhLPcbPvEioxni61M Y868AFrnl59Bsdq00px3e8wZNfiNWrsUf6zUGiMYA4ezBZIsTSSTMsTwuzqj6B5hlApAPt xhBAVPr+FhzwrlFrSSn6JuPoy4j3WUVdPPdiwCzNcE/vFKku0MotJElMp13psRQ1NFlEFw beTtp0aJSw5Bq+580xQbk3LAda/8M/BA+aYWhTMOJfUUByN2DePUGF0byNJ0drQQ== Received: by filterdrecv-65f68489c8-4txpj with SMTP id filterdrecv-65f68489c8-4txpj-1-64B64577-8 2023-07-18 07:55:35.399650128 +0000 UTC m=+5905170.327229474 Received: from bionic.localdomain (unknown) by geopod-ismtpd-7 (SG) with ESMTP id -BCzxIzxQOWNTDAcwSrkCw Tue, 18 Jul 2023 07:55:35.120 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v3 0/9] rockchip: Fix PCIe and NVMe support on RK3568 Date: Tue, 18 Jul 2023 07:55:35 +0000 (UTC) Message-ID: <20230718075529.78776-1-jonas@kwiboo.se> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h6LWGZ5dr6wECWDmD?= =?us-ascii?Q?pdd4PN+r2T9s8141on2LeUILhc86hb=2Fed4pUkWU?= =?us-ascii?Q?WszaNu+ljiDegLVvwSUqxgXenY=2FbAAlaDbnen6k?= =?us-ascii?Q?KU26ZRs6RETk+MtnCsHYBdAoF2SQ8g2fnnsn16A?= =?us-ascii?Q?wQmsSG+6Et+85S8m1JCzWtbSSSrsJryTjpGisZ?= To: Kever Yang , Simon Glass , Philipp Tomsich Cc: Eugen Hristev , Shawn Lin , u-boot@lists.denx.de, Jonas Karlman X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This series fixes and enables PCIe and NVMe support on RK3568. Patch 1 adds a dev_read_addr_size_index_ptr function. Patch 2-3 fixes main issue in the driver to be usable on RK3568. Patch 4 fixes a long wait time during probe when no device is attached. Patch 5 hides BARs of the root complex that could claim the entire memory region during PCI autoconfig. Patch 6 adds support for the gpios prop to the fixed regulators driver. Patch 7 adds a missing clock to the clock driver. Patch 8 enables PCIe and NVMe support on rk3568-rock-3a. Patch 9 updates the device tree with new reg and ranges values. I have tested that a Samsung 970 EVO NVMe is detected on a ROCK 3A, BusDevFun VendorId DeviceId Device Class Sub-Class 01.00.00 0x1d87 0x3566 Bridge device 0x04 02.00.00 0x144d 0xa808 Mass storage controller 0x08 and I have also verified that the network controller continues to be detected on a ROCK 5B. BusDevFun VendorId DeviceId Device Class Sub-Class 00.00.00 0x1d87 0x3588 Bridge device 0x04 01.00.00 0x10ec 0x8125 Network controller 0x00 Changed in v3: - Rebased on master branch, all dependencies has been merged. - Remove rk3568-rock-3a pcie2x1 workaround added in v2, basic reference counting of gpio regulators series has been merged. - Enable options for AHCI/SCSI on rk3568-rock-3a. - Collect r-b tags. Changes in v2: - Rebased on custodians/u-boot-rockchip master branch and the defconfig and spi v2 series at [1]. - Drop dependency on basic reference counting of gpio regulators series, pcie2x1 is disabled for rk3568-rock-3a to avoid a system freeze due to disable of a shared vpcie3v3-supply regulator while in use by pcie3x2. - Add and use dev_read_addr_size_index_ptr function. - Update commit messages. - Collect r-b tags. This series can also be found at [2]. [1] https://patchwork.ozlabs.org/project/uboot/cover/20230517182624.1765359-1-jonas@kwiboo.se/ [2] https://github.com/Kwiboo/u-boot-rockchip/commits/rk3568-pcie-v3 Jonas Karlman (9): core: read: add dev_read_addr_size_index_ptr function pci: pcie_dw_rockchip: Get config region from reg prop pci: pcie_dw_rockchip: Use regulator_set_enable_if_allowed pci: pcie_dw_rockchip: Speed up link probe pci: pcie_dw_rockchip: Hide BARs of the root complex regulator: fixed: Add support for gpios prop rockchip: clk: clk_rk3568: Add CLK_PCIEPHY2_REF support rockchip: rk3568-rock-3a: Enable PCIe and NVMe support rockchip: rk356x: Update PCIe config, IO and memory regions arch/arm/dts/rk3568-rock-3a-u-boot.dtsi | 14 +++ arch/arm/dts/rk3568.dtsi | 14 +-- arch/arm/dts/rk356x.dtsi | 7 +- configs/rock-3a-rk3568_defconfig | 9 ++ drivers/clk/rockchip/clk_rk3568.c | 1 + drivers/core/read.c | 11 +++ drivers/pci/pcie_dw_common.c | 10 +- drivers/pci/pcie_dw_rockchip.c | 120 +++++++++++++++--------- drivers/power/regulator/fixed.c | 4 +- include/dm/read.h | 21 +++++ 10 files changed, 155 insertions(+), 56 deletions(-) -- 2.41.0