From patchwork Thu Feb 8 13:51:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 198428 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp180952dyd; Thu, 8 Feb 2024 05:56:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFCcX62qCiGqmhAJ2m2j7XRWH49cAHTQ4bqxgn6qbyowgWUI+i9xmbOyRMaDRFTg5Mz65Il X-Received: by 2002:ae9:e509:0:b0:785:6884:f333 with SMTP id w9-20020ae9e509000000b007856884f333mr3793416qkf.10.1707400579391; Thu, 08 Feb 2024 05:56:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707400579; cv=pass; d=google.com; s=arc-20160816; b=d6xch5y5mn1PjHbTKA5Q7n5vCNv0J3uSFfETxzMQ0pp7Yjd+Rqf0dCNWBFtfDyh5Bj xNB9jCsXDsd741RBMuSEUmZo/HK23Elks6UGRY90TVluTYn++F78vagtrni4eQLRWEIt XH3x/ATde3JTKB8P8tsygNs4VabO+riDwzYsq2DAVA5l3O9yl7d6WBN5Tvb9T1WaO1V0 IX05nEu4vQ+adObRqwkm1RvKiN5m0jE7sUHV51zYvL2lDujo780c8rbSNyh5GOA5KfR/ 8PgfH6EXOUA48RZ8pj6kea2T1ijBXb1K+XCRVlkvCGsicggcC8TBGB3putENA+JkTN5w 7yiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=IDiR8WKu9BhVnRXAmzKy9w3dzXQS9g7h42ODaYBwU0c=; fh=6GaF5sDz1YUB74uR189cK6fTp7AAAznXqzNbtNY5YFA=; b=ZnULD93vUxR35exWkmQ9r+YtrCsjJ3vRNRETXJa7a0+urY+MTuSWEA4hxZXvAaAb9o p1owFmGZCwE9zi42t7ev+ieb/eXWdUKOqAZ+s8vaYbKA5EY4EVrqePej4xegovgux++N r8b6N7/NqlL8PqY8sE3NbR2w0r+vtdleH72fe4e7YlmIO/O/C6Gcrp4vbABPeRSeK2vM zVv9ig9HDvBdHESBnnz1oGwbUi69tAYsUK4Mw1ojaPZG9YINPN8W6III6lGcthJU3EO+ rtNvEkWx/i6gfu5pwlovHIImaMG/pMQrN0CnWVDBFaHn9rJVY65E23+eYgdAuxxwypKp +q8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PLjiG6vV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-58191-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58191-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWWQQLzoaBsCKK5WMLgsRgr70nN85XIDeF+OYGKtalUD3Bs4+/6+ODl7vB4dVlHj1CHxJGrimI+TED96vwzLLe3QrvfLw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pa39-20020a05620a832700b00783d5831645si32278qkn.666.2024.02.08.05.56.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 05:56:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58191-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PLjiG6vV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-58191-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58191-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 56DDB1C290B0 for ; Thu, 8 Feb 2024 13:55:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 76E8C7D3F0; Thu, 8 Feb 2024 13:52:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PLjiG6vV" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 374317CF2B; Thu, 8 Feb 2024 13:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707400350; cv=none; b=cCfLYp0Gs6WE/rgsp6A3HzKn19iq2HFPlfAY6uL0sQIu38AfAgs56nzFMAwy3T8bhqPOHfDdKvMte5gokdiD2A6GJ1I0yKZ3dprc13D+/bAVDX66Kh+AwYuQ2T/QwbtwlxNG8a3P4dRRXN949guopGI0D1/zSL2yz/EEoSuinKs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707400350; c=relaxed/simple; bh=kYztuwBHKj80b91I8rCKfMS/3L636fHRS+pTX9G+Poc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=q4zbr8TXGcVGYaaGYUH98oCrLyR+jWQtU3zXeaFwYBGKxeGzScYW4esxdXbN5/F/t7qK5WAFo+JLht0/LRGAbjWH12IECW2o8NnUFlkNBSH3YJLRIWYXP1XlmP63vkWhRwwn0P2A3+4miIGeV+5POQnHvcn8Iua3gsCq0620wCE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PLjiG6vV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28A4AC43399; Thu, 8 Feb 2024 13:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707400349; bh=kYztuwBHKj80b91I8rCKfMS/3L636fHRS+pTX9G+Poc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PLjiG6vVM0s3p+fyOguNaTY5WlAKfZxfIpsNuncBhDt7LZOasVt8cHoQk7tYOJDms Jcbzwh11Hn8AEcf9gl3qOW0T0FglczA1D8pJkfSGI9rgfNkPiVLE0aEirCIaZQZSHV eKEgEcgfgg2uvLYB/pDUdzs+QbVdFJ7HIx0rQZzE1SY+r0itspBDaU3I3P0uzYjZ9D Oa/zMHYj17dNI3c59dxN2q2hHgwgRcwLVATEklo0NG37x6vClOsqyWe2OGNUd4OBVp u4FE0EpwHYCVbzqIFcnKY8vsgYvA/1uPoZTj8E18tCZhk7ytQGI6fqszQ5T2jVWLfw g8kZY4Xq+qvgQ== From: Roger Quadros Date: Thu, 08 Feb 2024 15:51:45 +0200 Subject: [PATCH v2 3/3] arm64: dts: ti: Add DT overlay for PCIe + USB3.0 SERDES personality card Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240208-for-v6-9-am65-overlays-2-0-v2-3-70bae3e91597@kernel.org> References: <20240208-for-v6-9-am65-overlays-2-0-v2-0-70bae3e91597@kernel.org> In-Reply-To: <20240208-for-v6-9-am65-overlays-2-0-v2-0-70bae3e91597@kernel.org> To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Andrew Davis , Tomi Valkeinen , Aradhya Bhatia , Nikhil Devshatwar , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros , srk@ti.com, r-gunasekaran@ti.com, Kishon Vijay Abraham I X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3697; i=rogerq@kernel.org; h=from:subject:message-id; bh=QXycpi9i6PTUYgnWc7XUT7n2X/NNWxiXbCqvtx5c3DI=; b=owEBbQKS/ZANAwAIAdJaa9O+djCTAcsmYgBlxNyNOGciqQDX2eC55qyEZqsPQY3lP/ckM0rjB ZnwpftmC1GJAjMEAAEIAB0WIQRBIWXUTJ9SeA+rEFjSWmvTvnYwkwUCZcTcjQAKCRDSWmvTvnYw kxgqD/9OMh55y/8CG9uEpPg4NQ2Xa4ZnVgCISNYgI6jzVxdmuO1yCTrfSBDVV7bJrTgNAOdd2Mo DV1peZ6MWhLmagQhOm1SfZARFeOYcNXtEi15Y662wtQdQxIDOQLWAYt+W7m40Jv5r3ZyXm3Qxfe 5/8z0VQcLXMWcQivshpAWF/dUGuypxlGjiWOCVwZbd+i+Q+2yLpIIw9rut17hrQD0XQybCg5PuW C4GfpmpebVGRuzFz8pzdL8d6fbPut935RZKlgF3af7JRDJjyHHFMBDBBPP9H8WU4YF6WugogIia EeSFqB13Kf8RDzuFYwZeTnhkaBT7NR2vIJR+0KFpOqoTB/ZUMBEP+5ZTcLKjWfvicOsUklqMIq9 f73UnzthNc1O3St/71eBdZtTqNhuD09xEdzLUKVyfqN8rcoHUTePyZ/+GyFObWprB9ZDiOAwiuv XGBOKJHBGjMSs8O/Y7Sdn0fFlD5BjWObTAA66e/vasSiYq5TVnDQH/vuiWgjJHb2jJfcw1SFLz7 7iQ2B8eSV2e0BBBrjjoQx5jDA2kjpOvrUzTB6RN+f3bf7EAlbJnM4RmGDIOGM4zRuh5Hu2TZsDO +DmU84NdtdqKT4/RGVkrViYNZdT95vf4izZ1wjMtezybht/TB4mNrpnd7QMemG8SIbNzKGXENhr 5azW5u176kcnjvQ== X-Developer-Key: i=rogerq@kernel.org; a=openpgp; fpr=412165D44C9F52780FAB1058D25A6BD3BE763093 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790339269680129307 X-GMAIL-MSGID: 1790339269680129307 From: Kishon Vijay Abraham I Add overlay for PCIe (uses the second instance of PCIe in AM654x) and USB3.0 SERDES personality card The PCI3/USB3 card is provided with the AM65x GP EVM configurtion [1] so apply the overlay to k3-am654-gp-evm.dtb [1] https://www.ti.com/lit/ug/spruim7/spruim7.pdf Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Roger Quadros --- Changelog: v2: - drop PCIe endpoint settings as it no longer exists in base tree. v1: https://lore.kernel.org/all/20240126114530.40913-4-rogerq@kernel.org/ --- arch/arm64/boot/dts/ti/Makefile | 5 ++- arch/arm64/boot/dts/ti/k3-am654-pcie-usb3.dtso | 61 ++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index f534c373c958..75033b6e8693 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -45,7 +45,9 @@ dtb-$(CONFIG_ARCH_K3) += k3-am64-tqma64xxl-mbax4xxl-sdcard.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am64-tqma64xxl-mbax4xxl-wlan.dtbo # Boards with AM65x SoC -k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb k3-am654-base-board-rocktech-rk101-panel.dtbo +k3-am654-gp-evm-dtbs := k3-am654-base-board.dtb \ + k3-am654-base-board-rocktech-rk101-panel.dtbo \ + k3-am654-pcie-usb3.dtbo k3-am654-evm-dtbs := k3-am654-base-board.dtb k3-am654-icssg2.dtbo k3-am654-idk-dtbs := k3-am654-evm.dtb k3-am654-idk.dtbo k3-am654-pcie-usb2.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb @@ -59,6 +61,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am654-evm.dtb dtb-$(CONFIG_ARCH_K3) += k3-am654-idk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am654-base-board-rocktech-rk101-panel.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am654-pcie-usb2.dtbo +dtb-$(CONFIG_ARCH_K3) += k3-am654-pcie-usb3.dtbo # Boards with J7200 SoC k3-j7200-evm-dtbs := k3-j7200-common-proc-board.dtb k3-j7200-evm-quad-port-eth-exp.dtbo diff --git a/arch/arm64/boot/dts/ti/k3-am654-pcie-usb3.dtso b/arch/arm64/boot/dts/ti/k3-am654-pcie-usb3.dtso new file mode 100644 index 000000000000..e463163f2b7b --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am654-pcie-usb3.dtso @@ -0,0 +1,61 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT +/** + * DT overlay for SERDES personality card: 1lane PCIe + USB3.0 DRD on AM654 EVM + * + * Copyright (C) 2018-2024 Texas Instruments Incorporated - http://www.ti.com/ + */ + +/dts-v1/; +/plugin/; +#include +#include +#include + +#include "k3-pinctrl.h" + +&serdes1 { + status = "okay"; +}; + +&pcie1_rc { + num-lanes = <1>; + phys = <&serdes1 PHY_TYPE_PCIE 0>; + phy-names = "pcie-phy0"; + reset-gpios = <&pca9555 5 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&main_pmx0 { + usb0_pins_default: usb0_pins_default { + pinctrl-single,pins = < + AM65X_IOPAD(0x02bc, PIN_OUTPUT, 0) /* (AD9) USB0_DRVVBUS */ + >; + }; +}; + +&serdes0 { + status = "okay"; + assigned-clocks = <&k3_clks 153 4>, <&serdes0 AM654_SERDES_CMU_REFCLK>; + assigned-clock-parents = <&k3_clks 153 7>, <&k3_clks 153 4>; +}; + +&dwc3_0 { + status = "okay"; + assigned-clock-parents = <&k3_clks 151 4>, /* set REF_CLK to 20MHz i.e. PER0_PLL/48 */ + <&k3_clks 151 8>; /* set PIPE3_TXB_CLK to WIZ8B2M4VSB */ + phys = <&serdes0 PHY_TYPE_USB3 0>; + phy-names = "usb3-phy"; +}; + +&usb0 { + pinctrl-names = "default"; + pinctrl-0 = <&usb0_pins_default>; + dr_mode = "host"; + maximum-speed = "super-speed"; + snps,dis-u1-entry-quirk; + snps,dis-u2-entry-quirk; +}; + +&usb0_phy { + status = "okay"; +};