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 D54B8C04A94 for ; Wed, 2 Aug 2023 07:00:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0BAE286AB9; Wed, 2 Aug 2023 09:00:16 +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="YsUL/Pjo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CFDA986C7F; Wed, 2 Aug 2023 09:00:14 +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 5958786934 for ; Wed, 2 Aug 2023 09:00: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=1ZLsCpJw4X2cjs4y/SUmf70uoq1/DcdNuepVv6OjaA4=; b=YsUL/PjoRYmSi7x/kCUcjUUJWuE4WRPBToL4egFOSCD9WrwmPAbocwd3vcCOTpkt9iw6 D9pSAJRaBdtVp5og3ffCuUkXBuKmFfmJ+ByibZvvZYB80iMBOdVbJtiMHEd5slVcVHCHDm 1ZkbVWeGsqkwudrzLl5Ks4J7CIu9C3sAJZpuSv54DbhOHmmgLD6ICpEjFg8cQq9R7nQXCK 2XmhdaCr5erexVMwRu7EuF9cnarVQL/uNcyGzgETv6SAlxeFpGTkznkVmvS3eWnnbQcmN7 YgrHYHQw/143Dl7/+4kz97THeRReokNWFYvHOvYuSDFtvMQY67dK4TkXvzLNI21g== Received: by filterdrecv-77869f68cc-xxcxl with SMTP id filterdrecv-77869f68cc-xxcxl-1-64C9FE9C-14 2023-08-02 06:58:36.722243131 +0000 UTC m=+7197740.505247614 Received: from bionic.localdomain (unknown) by geopod-ismtpd-3 (SG) with ESMTP id tEZd4u4BRDySc8qumj5mQA Wed, 02 Aug 2023 06:58:36.452 +0000 (UTC) From: Jonas Karlman Subject: [PATCH 0/6] rockchip: rk3568: Fix use of PCIe bifurcation Date: Wed, 02 Aug 2023 06:58:36 +0000 (UTC) Message-ID: <20230802065834.2273853-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+RrMu3cja6a0h63ba4pfoxWT4Mjz=2F?= =?us-ascii?Q?oUTgUJbvpKRRCO8DnbDHmwn0QoUeLYTtSgweXVi?= =?us-ascii?Q?9mrA9mG5naa2AcNlVmoFiUD0qS5CXzGQBCY4bjC?= =?us-ascii?Q?zbzBmUdqEFS7NeTwoqAL6TI1zCuqs1L4EwOxU2W?= =?us-ascii?Q?cJsQeWYGb9b+DSgEnJk31lDEl4ZuRHA=2FFwS=2FVU?= To: Kever Yang , Simon Glass , Philipp Tomsich Cc: Eugen Hristev , Jon 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 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. Patch 6 enables the mini PCIe slot on Radxa E25. 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-v1 Jonas Karlman (6): 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 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 ++++- .../phy/rockchip/phy-rockchip-snps-pcie3.c | 230 ++++++++++++++---- 4 files changed, 235 insertions(+), 65 deletions(-) -- 2.41.0