Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp549704rdb; Fri, 26 Jan 2024 03:57:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGwR8xkuYjpMR7U24dGKebd+sLCTa6lxE+6WIIViMna+gdXVhVePaGwvCLE4hof63BOqV9H X-Received: by 2002:a05:6808:1b0a:b0:3bd:cddd:7634 with SMTP id bx10-20020a0568081b0a00b003bdcddd7634mr1711224oib.29.1706270224424; Fri, 26 Jan 2024 03:57:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706270224; cv=pass; d=google.com; s=arc-20160816; b=cBGIXEUC33OrkqwDFaaBojEChP+SFvpeA8OhCWWeJAQ7T4CHm6uJ7DqWbQmwUKvd/4 M7FLwJmnrOPoR/+tJKEkv8X86pgdydJEkVNcUjisgC5kRrXE6qkVS+MEHWK8hmiX4T4d 5TdWk6Cd3wsZOf/7M6qsgsZahJR6e5Ix/OwjQxKl/WakMH8pjTIZaNQDFg5OpCi7RqdV ij8DVGlP/SP9hO9x55aL7bdQecRNOHlW9FyWMPVpM1K1g3+bO3STaco5TJrEHm1GDZsv DwOG8zdD8plu3Ih7SW7Dor3KZ30keJiyYToy782h4wlNTnPcW27Z9SzuZ4QP2KuOHjO4 tkew== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=rEUK/3bAjbqtz3T9e73Q5b2sqJi8CFrQMZA+Hqjz8AE=; fh=hdhOi0QIaSbm4cKNBK8KHtSncyW10V9Uc7G5ZCCRO5Y=; b=CbM+1L/Ue4v5NbHRpsAvhHe1rax3SbJFj1aJiyi9CXwZ3jcDX+oKHKtvBPM1F9xWtr Nwq13K6DcmEzXHSm6Kt5ZqhXYhl5yIKz6m3GA2BcGIOoz/qPYhtUGEMUZ8XncHID+C9V cUvFvlHktnthznSXi6J6CexkKfD6RV+ZH+eyOVcqVfaeFGJ74DzaTYSmqR5U3sh9GFpb IWpikNrOFESDK7ZPuRpAUzCuFnh6LC6UxfTUnL24NywjPdAwZQUF9zl8RSd+hTiJiFhW 1szE+4tr68lWwbakY0I7Q0Bf7OExSUAE38P5VUhO+KP2qrJ3rWo4CViGl3ufyn27K8jf dNPg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TQd7Shze; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-40061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40061-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ck27-20020a056a02091b00b005cd813c23besi1076842pgb.415.2024.01.26.03.57.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 03:57:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TQd7Shze; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-40061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40061-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 32E5C295EA3 for ; Fri, 26 Jan 2024 11:46:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3302E1AAAE; Fri, 26 Jan 2024 11:45:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TQd7Shze" 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 52A5C1AAA5; Fri, 26 Jan 2024 11:45:45 +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=1706269545; cv=none; b=JRKv0gGOdzcRGvOzxH2eLitM56HewjOP44v1OyCZb+p36qN2YlTyWhwUQvHF8mBAXfQ+KaAJ4RZ1NLC+Qo1tuOItggR9qpUxDUfYN7yKjIo3FdDc7dSLmOFPv1NTKiGVWhY+7/or7XwDpOnonVQPMjbO4aUEg0L2VJ8/g3wfitk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706269545; c=relaxed/simple; bh=OuirhCCHZ98J4MrOZEW1SlsIyTfgSodFP1d/+6512CQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qN8UOjLrxoz0HN6ORa1nsLj5aSsYROEQlBog4zOgy+Eney6Nd/Jw62Zc67TfU4qGFTdkRFtSgWf2ee7xWhFcXjqiXxJYoAzs6nOIXJf+uU7j4gXjXHihKdOPyc4eHIP7w103GzMegcv5Cl9BHTK/rj80SpzGMCj6060y+MYZnUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TQd7Shze; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD2C7C433F1; Fri, 26 Jan 2024 11:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706269545; bh=OuirhCCHZ98J4MrOZEW1SlsIyTfgSodFP1d/+6512CQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TQd7Shzed29xtU+vRhQ/dTiK9gLFasan4qNcpfCP2Kq3lYs4PQ2hpYM5somYXQiwC Muaj9S7YySwYdbfMKagl/wm+9uGcmog5dpvd1LQfDhdnfO6FIi5wFKJGkTrTbzurf1 BxRo7DEL4E+AcOOgYf6hiUQngPXHyDB9QLE8hy4wF79mTo4Colp5vTMFKo3KIA8HLD cy0/9ulWZEk55KnXoUMrDlMbNbV2fI1nvj+4IXQdNWKXCcFMaJjgXLzz8s7/je5EAC GBSyrBYpOcDBxx6XKut0Lo+lIsjqKt8GXJs5GiIdK62xnKiQTvjL8Dn6zE5MCDobty KcDseFxmxgvKQ== From: Roger Quadros To: nm@ti.com, vigneshr@ti.com Cc: afd@ti.com, a-bhatia1@ti.com, kristo@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, srk@ti.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros , Kishon Vijay Abraham I Subject: [PATCH 2/3] arm64: dts: ti: Add DT overlay for PCIe + USB2.0 SERDES personality card Date: Fri, 26 Jan 2024 13:45:29 +0200 Message-Id: <20240126114530.40913-3-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240126114530.40913-1-rogerq@kernel.org> References: <20240126114530.40913-1-rogerq@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Roger Quadros Enable both Serdes and PCIe dt nodes in order to get PCIe working in the SERDES PCIe x2 personality card. The daughter card also has a USB 2.0 dual-role port. As the base board already supports a 2.0 dual-role port, enable the port on the SERDES card to be a host only port. This will prevent user confusion as having 2 ports in device mode often leads to confusion as to which port is bound to the gadget function driver. The PCIe x2 card is provided with the AM65x IDK configuration [1] so apply the overlay to k3-am654-idk.dtb [1] https://www.ti.com/lit/ug/spruim6a/spruim6a.pdf Co-developed-by: Kishon Vijay Abraham I Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Roger Quadros --- arch/arm64/boot/dts/ti/Makefile | 3 +- .../arm64/boot/dts/ti/k3-am654-pcie-usb2.dtso | 65 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/ti/k3-am654-pcie-usb2.dtso diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index 08ce34d21d5d..3c008623b693 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -47,7 +47,7 @@ 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-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-idk-dtbs := k3-am654-evm.dtb k3-am654-idk.dtbo k3-am654-pcie-usb2.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic.dtb dtb-$(CONFIG_ARCH_K3) += k3-am6528-iot2050-basic-pg2.dtb dtb-$(CONFIG_ARCH_K3) += k3-am6548-iot2050-advanced.dtb @@ -58,6 +58,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am654-gp-evm.dtb 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 # 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-usb2.dtso b/arch/arm64/boot/dts/ti/k3-am654-pcie-usb2.dtso new file mode 100644 index 000000000000..477027b033da --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am654-pcie-usb2.dtso @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT +/** + * DT overlay for SERDES personality card: 2lane PCIe + USB2.0 Host on AM654 EVM + * + * Copyright (C) 2018-2024 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; +#include +#include +#include +#include "k3-pinctrl.h" + +&serdes0 { + assigned-clocks = <&k3_clks 153 4>, + <&serdes0 AM654_SERDES_CMU_REFCLK>, + <&serdes0 AM654_SERDES_RO_REFCLK>; + assigned-clock-parents = <&k3_clks 153 8>, + <&k3_clks 153 4>, + <&k3_clks 153 4>; + status = "okay"; +}; + +&serdes1 { + assigned-clocks = <&serdes1 AM654_SERDES_CMU_REFCLK>; + assigned-clock-parents = <&serdes0 AM654_SERDES_RO_REFCLK>; + status = "okay"; +}; + +&pcie0_rc { + num-lanes = <2>; + phys = <&serdes0 PHY_TYPE_PCIE 1>, <&serdes1 PHY_TYPE_PCIE 1>; + phy-names = "pcie-phy0", "pcie-phy1"; + reset-gpios = <&pca9555 5 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&pcie0_ep { + num-lanes = <2>; + phys = <&serdes0 PHY_TYPE_PCIE 1>, <&serdes1 PHY_TYPE_PCIE 1>; + phy-names = "pcie-phy0", "pcie-phy1"; +}; + +&main_pmx0 { + usb0_pins_default: usb0-pins-default { + pinctrl-single,pins = < + AM65X_IOPAD(0x02bc, PIN_OUTPUT, 0) /* (AD9) USB0_DRVVBUS */ + >; + }; +}; + +&dwc3_0 { + status = "okay"; +}; + +&usb0_phy { + status = "okay"; +}; + +&usb0 { + pinctrl-names = "default"; + pinctrl-0 = <&usb0_pins_default>; + dr_mode = "host"; +}; -- 2.34.1