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 4B045C77B75 for ; Wed, 17 May 2023 22:55:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A6069862CD; Thu, 18 May 2023 00:53:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject 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="kkuORDdx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1CB22862A0; Thu, 18 May 2023 00:53:52 +0200 (CEST) Received: from s.wrqvtzvf.outbound-mail.sendgrid.net (s.wrqvtzvf.outbound-mail.sendgrid.net [149.72.126.143]) (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 CFDBA861C4 for ; Thu, 18 May 2023 00:53:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject 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:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=okn8a+Bcr14ZiY71JtcjJvSCJzxycFunr9XRCdP0Ruc=; b=kkuORDdxhdno5a6fStXV7trPvoTsFzLu6phI7oJvrKHncOSVvxjGHxBih3o7+Ksc9zk/ suaotcTIfyP4zmNNx2r0twcu4Yc12JWgm7DZHmScGnZqWvYtipLZ9H1gNttwv0APIyRQFI 8+LLliu/YBdT5UmvZhEbWX4+v4IPcWn7nSSVr6tcBF1Srd9XoW/qgUbRGFvo5EAWs0JzxS miwT22it7mo1hz7SI+J7Z9rr6GobGsxic+f6PMVFH2oQ+EPaQonkX6vFBZT9mj1yG1OdB9 lRE/s1a0v8YEWwn+g96DZ//K9oEktptpmMPrZ2W7j5I6ROyjNceLEl4QUsrYVVoA== Received: by filterdrecv-84b96456cb-jnxmg with SMTP id filterdrecv-84b96456cb-jnxmg-1-64655AFB-24 2023-05-17 22:53:47.937263033 +0000 UTC m=+602107.356172626 Received: from bionic.localdomain (unknown) by geopod-ismtpd-10 (SG) with ESMTP id _MvRh5S6Qn64mqRTSqBpQQ Wed, 17 May 2023 22:53:47.630 +0000 (UTC) From: Jonas Karlman Subject: [PATCH v2 8/9] rockchip: rk3568-rock-3a: Enable PCIe and NVMe support Date: Wed, 17 May 2023 22:53:48 +0000 (UTC) Message-Id: <20230517225337.2089287-9-jonas@kwiboo.se> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230517225337.2089287-1-jonas@kwiboo.se> References: <20230517225337.2089287-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxA?= =?us-ascii?Q?fZekEeQsTe+RrMu3cja6a0h79CDnpd9C3kxa1yw?= =?us-ascii?Q?qVvWQWZ61kVVf6fVrQAkZu1mFCKlS1fE2TLnUPn?= =?us-ascii?Q?qcWhbhc54H589+PEQaSZQ4RNorJiXNV7+Qc97m0?= =?us-ascii?Q?ACHj=2FTUoTJUGnsfyD93dzQxmC1wYiOZlDtGLdWM?= =?us-ascii?Q?VnB76g6H815HOpHz=2F1mJfumHxahhtTtG3WDN9l?= To: Kever Yang , Simon Glass , Philipp Tomsich , Akash Gajjar Cc: Eugen Hristev , 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 Add missing pinctrl and defconfig options to enable PCIe and NVMe support on Radxa ROCK 3 Model A. Use of pcie20m1_pins and pcie30x2m1_pins ensure IO mux selection M1. The following pcie_reset_h and pcie3x2_reset_h ensure GPIO func is restored to the perstn pin, a workaround to avoid having to define a new rockchip,pins. Signed-off-by: Jonas Karlman --- v2: - Update commit message - Disable pcie2x1 to work around a possible sys freeze issue arch/arm/dts/rk3568-rock-3a-u-boot.dtsi | 16 ++++++++++++++++ configs/rock-3a-rk3568_defconfig | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi b/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi index bbf54f888fa0..bbfce7f4c247 100644 --- a/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi +++ b/arch/arm/dts/rk3568-rock-3a-u-boot.dtsi @@ -36,8 +36,24 @@ bootph-all; }; +&pcie2x1 { + pinctrl-0 = <&pcie20m1_pins &pcie_reset_h>; + /* Shared vpcie3v3-supply may cause a sys freeze, disable for now */ + status = "disabled"; +}; + +&pcie3x2 { + pinctrl-0 = <&pcie30x2m1_pins &pcie3x2_reset_h>; +}; + &pinctrl { bootph-all; + + pcie { + pcie3x2_reset_h: pcie3x2-reset-h { + rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pcfg_pull_none { diff --git a/configs/rock-3a-rk3568_defconfig b/configs/rock-3a-rk3568_defconfig index 64864a300153..16775015afa2 100644 --- a/configs/rock-3a-rk3568_defconfig +++ b/configs/rock-3a-rk3568_defconfig @@ -23,6 +23,7 @@ CONFIG_DEBUG_UART_CLOCK=24000000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_SYS_LOAD_ADDR=0xc00800 +CONFIG_PCI=y CONFIG_DEBUG_UART=y CONFIG_FIT=y CONFIG_FIT_VERBOSE=y @@ -46,6 +47,7 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_GPT=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y CONFIG_CMD_USB=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_PMIC=y @@ -70,6 +72,8 @@ CONFIG_SPI_FLASH_MACRONIX=y CONFIG_SPI_FLASH_XTX=y CONFIG_ETH_DESIGNWARE=y CONFIG_GMAC_ROCKCHIP=y +CONFIG_NVME_PCI=y +CONFIG_PCIE_DW_ROCKCHIP=y CONFIG_PHY_ROCKCHIP_INNO_USB2=y CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y CONFIG_SPL_PINCTRL=y -- 2.40.1