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 D64B9C001DF for ; Wed, 2 Aug 2023 19:23:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 53BEB868C9; Wed, 2 Aug 2023 21:23:17 +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="AklB3GZ0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 80C1486885; Wed, 2 Aug 2023 21:23:16 +0200 (CEST) Received: from wfbtzhsw.outbound-mail.sendgrid.net (wfbtzhsw.outbound-mail.sendgrid.net [159.183.224.105]) (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 991FD86934 for ; Wed, 2 Aug 2023 21:23:12 +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=tYCW1n6lpmL8C7qAwFZHCj1+V0cqybUfU6PymlTVKx8=; b=AklB3GZ0MhfvmudCZ/33NNtFwXYQhA9Zge/OPOP92yXH6EnU8pA1OFucxs3OF9ayYppW vHti3NaRrzQmyfxP9kcgvcpqOl641gs9GB8wm3dpr9K0Sm0UBbpwkhXI921bz0CwGF4Zcc j7f8REU4gZWKd2dCUwRc8DfCi3Sje8wcyt7+Ph2x1GE+x9NwKxQulhT1strxUFlQZf2Oa/ bE8PAlc8lSOxsh8n59eidd7dvv1bO8pRe0WjPkBq35VHkuW1mcFA89tkWKhy9Hq4Jl+rdK t8pGq3E4uG1FViwsXVJN6TVVM8PIJdowM5MXIbBZes4qenxWTYMCgd/bsPo9ZpYA== Received: by filterdrecv-66949dbc98-mtdwq with SMTP id filterdrecv-66949dbc98-mtdwq-1-64CAACFF-C 2023-08-02 19:22:39.309686899 +0000 UTC m=+3343658.559476839 Received: from bionic.localdomain (unknown) by geopod-ismtpd-9 (SG) with ESMTP id AoiWaoSaRpe6TXnB1_d68g for ; Wed, 02 Aug 2023 19:22:38.945 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v2 0/7] rockchip: rk3568: Fix use of PCIe bifurcation Date: Wed, 02 Aug 2023 19:22:39 +0000 (UTC) Message-ID: <20230802190424.2963185-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+RrMu3cja6a0hw4m=2FwnWI6Xh8HlZH?= =?us-ascii?Q?00uPfEWxFCg2EDaXGS9E12h4wlcfp3lF0E3Mcvx?= =?us-ascii?Q?MwAN5uw5jdYYghtVLAuGMX3Ggp3iYFXr0NR1Zob?= =?us-ascii?Q?AG4zpDenVE2TfCWXtXxNxIY9qKPEZxszODBRIhf?= =?us-ascii?Q?6sGUzGpGyqnLD3O+aOqyIMNQpnIBXQYvnhhmhQ?= To: Kever Yang , Simon Glass , Philipp Tomsich Cc: Eugen Hristev , Jon Lin , FUKAUMI Naoki , John Clark , 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 add support for use of PCIe bifurcation on RK3568, and as a bonus support for the RK3588 PHY is also included. With PCIe bifurcation supported it is possible to enable PCIe on more RK3568 boards, e.g. on NanoPi R5C and NanoPi R5S. This series only include fixing the mini PCIe slot on Radxa E25. Most parts of this series was imported almost 1:1 from mainline linux. Patch 1 fixes configuration of number of lanes in pcie_dw_rockchip. Patch 2-3 refactor the snps-pcie3 phy driver. Patch 4 add bifurcation support for RK3568. Patch 5 add support for RK3588 to snps-pcie3 driver. Patch 6 fixes use of pcie2x1l0 on ROCK 5B. Patch 7 enables the mini PCIe slot on Radxa E25. Changes in v2: - Fix use of signal from comb PHY on RK3588 - Add fixes tag The RK3588 PHY part was tested on a ROCK 5B together with device tree files picked from Sebastian Reichel's rk3588 branch at [1]. Patches in this series is also aviliable at [2]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-misc.git/tree/?h=rk3588 [2] https://github.com/Kwiboo/u-boot-rockchip/commits/rk35xx-pcie-bifurcation-v2 Jonas Karlman (7): pci: pcie_dw_rockchip: Configure number of lanes and link width speed phy: rockchip: snps-pcie3: Refactor to use clk_bulk API phy: rockchip: snps-pcie3: Refactor to use a phy_init ops phy: rockchip: snps-pcie3: Add bifurcation support for RK3568 phy: rockchip: snps-pcie3: Add support for RK3588 phy: rockchip: naneng-combphy: Use signal from comb PHY on RK3588 rockchip: rk3568-radxa-e25: Enable pcie3x1 node arch/arm/dts/rk3568-radxa-e25-u-boot.dtsi | 11 +- configs/radxa-e25-rk3568_defconfig | 1 - drivers/pci/pcie_dw_rockchip.c | 58 ++++- .../rockchip/phy-rockchip-naneng-combphy.c | 6 + .../phy/rockchip/phy-rockchip-snps-pcie3.c | 230 ++++++++++++++---- 5 files changed, 241 insertions(+), 65 deletions(-) -- 2.41.0