From patchwork Sun Feb 11 15:08:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josua Mayer X-Patchwork-Id: 13552495 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34EC8C4829A for ; Sun, 11 Feb 2024 15:08:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=mgskJVMEmZQEuKW7R3Vd/0ZFGwMGXqa7XVDXwzCgDfU=; b=n0z7Q7dbzqTFS8684Z4rVfGKji 4d4RCKirGuqwAOj6poqB/6fNJ1uklI2LHJ7AXffqsbUkg+WjEcINaoSwYJ4FWzkCOiOu7FEH8l0e6 rndmFcyG61LApJe3QSuADhypsKCc0Am7UqDm5xZDqoHLQL6Aj51EwzoHU05xVxI1IXs9kJAutTi7z 8HanCoiXVQC317wec8JOG9uUwOVp7I6QXxc/eu59jlzi21g9iWGQdgGkT7x/uIh31wYYsMXG/NPi/ QzmJ34fCBXR1jMueGs83Ua6G8rL0ap4wO1CDWS9Nw8prKU4C5+6+9I27cT/+DDqN06ntEXAaJra+3 NgW7sF0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZBRM-00000002t0C-1gPW; Sun, 11 Feb 2024 15:08:20 +0000 Received: from mail-am0eur02on20701.outbound.protection.outlook.com ([2a01:111:f403:2606::701] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZBRC-00000002stt-0f9Z for linux-arm-kernel@lists.infradead.org; Sun, 11 Feb 2024 15:08:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mmosyrB8K6qDq+50S0sZvRbymSgoWYLIAYFVXwsaZeklJtXIGE0pU+50/cvuDhzxDAWfnqV074UY7zu62m2moybKvCLVhLn7/maoh3yHlHGdpmNfh1SqyhnCHNf0BD4OWsJ92nfnjMaH4pWWRADI6GxFo+6f6crTakVLOprorFiobIW3+bEV/aiblPZOSfOJ7speQQgK/aoIutt9nKU41p4jmukVkcnZas5CLLnbigtz7I7p4ekY2HldlkNfWNZAhPsRej2E5JYDE1zxtSooBC26EyZcX+d27m5nfMt2g3xCT5LRgq7iBV2jfuClCAhzJjIASDzBiLbk4nVcLUpbiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EAVYcajPH+cQj7PkDwcqf/iS4zG1WdQUnJL/lsNg9N0=; b=YPHWeRyjRpHiW6KHT1TvrmI8oG4bfH1bYxrAdv3A3VmftSdLPLruKoPugvfAjuKn5JaIwMPOqE6b4tyWJlbm6dFvc4ugoQmMf8WX7af/ArOXq0ctTnUP7P+sQHuM1aXB/l4HcfpYxrVKsQiF1FtbcE/W9Hh7FewujnJ3IWOli4arXb5hZ4vM2AAO/iyMvpS0wnsZhdKZ4qMyIWipufVEVK7lvQJ188dKzzn3K7+6BFTsqBgw8PQl9La7vTBi1hv82cDUHhfWpNQ0IbkwG+uBJUt4s7GbNwkJ6RvplsC0zSUpzxs92gpmnvvqnlGTS5AwhHSqXaR2qG7K9eOvcHFCpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=solid-run.com; dmarc=pass action=none header.from=solid-run.com; dkim=pass header.d=solid-run.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=solidrn.onmicrosoft.com; s=selector1-solidrn-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EAVYcajPH+cQj7PkDwcqf/iS4zG1WdQUnJL/lsNg9N0=; b=GhnlCmuptVqnt7UA69CYmGLJrVPezwQj4HMB2Z0CXSDLEqc1xhqhDM5hTUPwRFNH+UV6pgU8aUE6avNBrVlir3oi4IR0CdlS6aDnmIMKaY1K2b5L1zWKI5rB/crxb7d74uvX1hF+VMF/e0XAQgtzg/BxE72H7u41t3GRRWerJxk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=solid-run.com; Received: from AM9PR04MB7586.eurprd04.prod.outlook.com (2603:10a6:20b:2d5::17) by DU2PR04MB8725.eurprd04.prod.outlook.com (2603:10a6:10:2dc::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.39; Sun, 11 Feb 2024 15:08:00 +0000 Received: from AM9PR04MB7586.eurprd04.prod.outlook.com ([fe80::3b94:f607:ebe1:7d6c]) by AM9PR04MB7586.eurprd04.prod.outlook.com ([fe80::3b94:f607:ebe1:7d6c%7]) with mapi id 15.20.7249.039; Sun, 11 Feb 2024 15:08:00 +0000 From: Josua Mayer Date: Sun, 11 Feb 2024 16:08:00 +0100 Subject: [PATCH v5 5/5] arm64: dts: ti: hummingboard-t: add overlays for m.2 pci-e and usb-3 Message-Id: <20240211-add-am64-som-v5-5-790ed7121249@solid-run.com> References: <20240211-add-am64-som-v5-0-790ed7121249@solid-run.com> In-Reply-To: <20240211-add-am64-som-v5-0-790ed7121249@solid-run.com> To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alessandro Zummo , Alexandre Belloni Cc: Yazan Shhady , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, Josua Mayer X-Mailer: b4 0.12.4 X-ClientProxiedBy: FR0P281CA0264.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b5::19) To AM9PR04MB7586.eurprd04.prod.outlook.com (2603:10a6:20b:2d5::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB7586:EE_|DU2PR04MB8725:EE_ X-MS-Office365-Filtering-Correlation-Id: 6cb83a50-5f82-4503-e70a-08dc2b133ced X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lyfZVyWxW1u0EgnZWZRlqBOOrXjlSQxC+FdMYQhyMt5PPWExMICJUrsX5eOcovpPfzhj8ODoaU2KJSFO1srqVKmk7Y27jIDPnezCFw8xJ/XS/DgXtDLihNofTx5qgZqbxyR9Rs2spoNiBbAHjeUjBZJreio/vF8jhAHBF5DE6gJSW7cNAS5+qhBlXZ4g5+MeQGXQKNpwNwnCYy4p2FF+N1dX6zhsIpWBk7vVkvgnnULQoBAQ38KI5kNGhOUGO6cFsEq7GftU+zAs/Zj9OKLv3zKpujr5JTA2hm82MsKdp6+9SA+f4pihwl3uKs9YhrsTe0GyywReDBXanwejnb63mmaB2DTC+uNZSYx1wPdM6/6sCzF7ncTaPa1HU/2HcNvD66b2kwze1V6YrvgFdK5RWuTGBPoG0wB/rhnjyGLDoyBGYSU1I6LRiwToIJqAw1RtJ2RZk59lRLb1sAJTeQ3FCKDFi2PhsAkux1cMiatm7Y3Jg+R2OZEXq/LjnC34QmZC5rfqgLe+o3DMroIPeRmTzA7zAQpH55C9iOTgOIpwOguyUb67um0wcXZdJ0Q9eoE3TrTBJ651mwUg/jXprpZmhDeHZe1GZioFlKrhLa7SW8PK/eND+9u+j6W/0jeB+NVP X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB7586.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39830400003)(366004)(136003)(396003)(376002)(346002)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(83380400001)(41300700001)(2616005)(316002)(36756003)(6512007)(6486002)(66476007)(66946007)(8676002)(54906003)(478600001)(52116002)(6506007)(66556008)(38350700005)(4326008)(8936002)(86362001)(107886003)(38100700002)(110136005)(26005)(5660300002)(2906002)(7416002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LxXIzkRl4GekV2+Po+SXbd4UhRgM?= =?utf-8?q?h9+wXwwlNTdeM/mFf+lqmVjk2lDvhZktnCgedl93ItgG5wvL3HuzNyOzNQrLrhgnI?= =?utf-8?q?4DQe3L6AouXsTRUpTYNEUAWNm77aMeTNa8rMbU5ZW63PfggOQ2a+twZ2S+QMslBv1?= =?utf-8?q?PhXwaP2vst6GAlQG61XUxnYygRfJFkiijubLP/oButKUvLTdoUNmCdPK6JmIBL1nB?= =?utf-8?q?HvSm4j9iA8yDbr700y3XNG6lXsIrBgfz+W0HEZVRm5gJ8CMdaeb59dxzup8jmcX7/?= =?utf-8?q?FJ4X7VRCzDu8TJRlfFeL39KV6Y2bMiLlOLyk1wetl39LKJfOk4xcvMpBefktZUiiV?= =?utf-8?q?kJ9IeCaR/YKL8kCgT90FGV73pFXFhKUo4kMHYvrFryNiJfH/+iqQQJXzf9n3Z4sBt?= =?utf-8?q?OxhmaVI7BZNgbOQ+lOYp9F4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0n8xO3LeqjqzKpOzrXhENtkzSy2Ac38DwP3TzAlprt?= =?utf-8?q?g5y/bXSGhqMkE74QuvzolVfFjhE8tLz72zW2nYQN3K5m/zDOgU9JBecrXsu4hSb1U?= =?utf-8?q?p/RcOcKqWReLNxhysLolOy8kRLMduZFjiHb7BCzIk3HMCdsAtuZzWWEnDcZA9pPBu?= =?utf-8?q?AxCIWtQFbleNLmkEn2CweJE13w5uEi9Kx7W/QoyCgzQY90ev1PeCgyy3BYbfFKDJE?= =?utf-8?q?fs4Oqdo+Gzxk?= X-OriginatorOrg: solid-run.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6cb83a50-5f82-4503-e70a-08dc2b133ced X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB7586.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2024 15:08:00.6943 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a4a8aaf3-fd27-4e27-add2-604707ce5b82 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yp97c3lFsUKabWCXVnVRree9zmnOMiYe4Xb2/Yp2lIk6Je6RitoL91aQjaGKPr66yGBz/NzhYCZ1fiACLai1CA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB8725 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240211_070810_246381_0D657F13 X-CRM114-Status: GOOD ( 11.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org HummingBoard-T features two M.2 connectors labeled "M1" and "M2". The single SerDes lane of the SoC can be routed to either M1 pci-e signals, or M2 usb-3 signals by a gpio-controlled mux. Add overlays for each configuration. Signed-off-by: Josua Mayer --- arch/arm64/boot/dts/ti/Makefile | 6 +++ .../boot/dts/ti/k3-am642-hummingboard-t-pcie.dtso | 45 ++++++++++++++++++++++ .../boot/dts/ti/k3-am642-hummingboard-t-usb3.dtso | 44 +++++++++++++++++++++ 3 files changed, 95 insertions(+) diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index 041c3b71155e..ace72b4b85b0 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -31,8 +31,14 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62a7-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb # Boards with AM64x SoC +k3-am642-hummingboard-t-pcie-dtbs := \ + k3-am642-hummingboard-t.dtb k3-am642-hummingboard-t-pcie.dtbo +k3-am642-hummingboard-t-usb3-dtbs := \ + k3-am642-hummingboard-t.dtb k3-am642-hummingboard-t-usb3.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t-pcie.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am642-hummingboard-t-usb3.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb diff --git a/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-pcie.dtso b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-pcie.dtso new file mode 100644 index 000000000000..fd3f8d00c56a --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-pcie.dtso @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2023 Josua Mayer + * + * Overlay for SolidRun AM642 HummingBoard-T to enable PCI-E. + */ + +/dts-v1/; +/plugin/; + +#include +#include + +#include "k3-serdes.h" + +&pcie0_rc { + pinctrl-names = "default"; + pinctrl-0 = <&pcie0_pins_default>; + reset-gpios = <&main_gpio1 15 GPIO_ACTIVE_HIGH>; + phys = <&serdes0_link>; + phy-names = "pcie-phy"; + num-lanes = <1>; + status = "okay"; +}; + +&serdes0 { + #address-cells = <1>; + #size-cells = <0>; + + serdes0_link: phy@0 { + reg = <0>; + cdns,num-lanes = <1>; + cdns,phy-type = ; + #phy-cells = <0>; + resets = <&serdes_wiz0 1>; + }; +}; + +&serdes_ln_ctrl { + idle-states = ; +}; + +&serdes_mux { + idle-state = <1>; +}; diff --git a/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dtso b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dtso new file mode 100644 index 000000000000..ffcc3bd3c7bc --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am642-hummingboard-t-usb3.dtso @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2023 Josua Mayer + * + * Overlay for SolidRun AM642 HummingBoard-T to enable USB-3.1. + */ + +/dts-v1/; +/plugin/; + +#include + +#include "k3-serdes.h" + +&serdes0 { + #address-cells = <1>; + #size-cells = <0>; + + serdes0_link: phy@0 { + reg = <0>; + cdns,num-lanes = <1>; + cdns,phy-type = ; + #phy-cells = <0>; + resets = <&serdes_wiz0 1>; + }; +}; + +&serdes_ln_ctrl { + idle-states = ; +}; + +&serdes_mux { + idle-state = <0>; +}; + +&usbss0 { + /delete-property/ ti,usb2-only; +}; + +&usb0 { + maximum-speed = "super-speed"; + phys = <&serdes0_link>; + phy-names = "cdns3,usb3-phy"; +};