From patchwork Fri Feb 2 14:22:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josua Mayer X-Patchwork-Id: 13542941 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 2DA7CC47DB3 for ; Fri, 2 Feb 2024 14:22:54 +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=iSeC0+NWPmhQkJ3A4ngbnRgxxt EfDVov7e0Sv5IPVQ4wDxgAdfn7gcLThWgTfcazG9lLXw4wdXe2WW/ooSOI8wyH9DEp0aJ4dWGsUBT GptdvE+U/PAM6cECdYROOKiTmlXKrTjdwh4mCnUBDizfZCjAUEkN61FR50uwku0BVJlnSO5+mWGPg fWA9l0mti7RNLrMqQfXGG5OJ5UWNLKYqmTQdvseGkRSuT1VAa22E6PpcJaQ87V9ai2rYYU+eO9x/M H+ro+MdbDoQVfvq7A2sy8ezI7weWr4bkflqLPIrMu3xs8L66FlI69DTnaV/DGkWOALzJAwbTulyEC /KYhOT3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVuRF-0000000BjWy-0eMJ; Fri, 02 Feb 2024 14:22:41 +0000 Received: from mail-db3eur04on072f.outbound.protection.outlook.com ([2a01:111:f400:fe0c::72f] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVuR9-0000000BjRZ-2wVu for linux-arm-kernel@lists.infradead.org; Fri, 02 Feb 2024 14:22:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zfebksbi+JfZvReZhlG4wEJ3knvZ2S3CZvHYXYAIE2Q13nmgDrBbnurnbYQBeY0B+6SNahDARs+xetixXPuv9hdmXWMg5rkNbZFTaowYi2yQ51+llRnLyKeXr8TBNWG7ALTtGzBty7XADs71Eg/7+pHeXikDqnbcI7TRw8PHoeNWhMM2ESjuIqgE6oPg1AYjyX3X9QJk1E4Lw1/USL5t+C1CuYGqhSCEV4zF6rKjvGx8tgB7RUWNzw9HsP7paDs7l0T+bCsK6URMi7V6e3FYyryMPrHhQiDBEWIUju63J6/8ZXP9T2Bm5SapDLEc9+J3Ss8G7YzqHBRzjMcQ2O9wUA== 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=GWSrvFye7SxzqmjPGa7sR9yXipSN06kB+NEz/ZEJmcZugL0QMd7gE8ie7nwtS6gKhTT94VsrNongsYRsDYQ+dI89MQ4nWXF2ZcgmrG+NJuRTMA09OI+7hE2+Ofv7thPtLRgtAyirE3XAGQUtB5NPMsDCigwIiWjx51Mdak+oojdTN9dgNiTu1JDe4q2W3ccm63S65MzGoHnSDgW5Ovjpaov87Edb/JLox1rbB4Mkb4L7FL39c3drhCt7LQgcX1An1sRAcf58kPxWwNlNpyOPVf4VPxQClUTPkOUtQT/45SUualmvOFUPyQk8FeZEWEwdSRpqAPkhD+T4VHQQ5JnmpA== 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=iyoOfk275Nc06DIwvieCgK8WqlFlYlFJOLn0eZTXpWRm8DQHlvDS76kPbYd/9QDO1qJ7Lif5qmTLq4h+OyYpYAkEBJfldVc+ZjpUr2EwU1D5nnY1TKUirOHc7vIe7Lgkr8UlmusrHIr3PjzfvOi7FLr4iF58T3y2xzBz4WJ2uQ8= 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 DUZPR04MB10063.eurprd04.prod.outlook.com (2603:10a6:10:4af::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.30; Fri, 2 Feb 2024 14:22:25 +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.027; Fri, 2 Feb 2024 14:22:25 +0000 From: Josua Mayer Date: Fri, 02 Feb 2024 15:22:21 +0100 Subject: [PATCH v3 5/5] arm64: dts: ti: hummingboard-t: add overlays for m.2 pci-e and usb-3 Message-Id: <20240202-add-am64-som-v3-5-2f44023d50e9@solid-run.com> References: <20240202-add-am64-som-v3-0-2f44023d50e9@solid-run.com> In-Reply-To: <20240202-add-am64-som-v3-0-2f44023d50e9@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: FR0P281CA0174.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b4::7) To AM9PR04MB7586.eurprd04.prod.outlook.com (2603:10a6:20b:2d5::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB7586:EE_|DUZPR04MB10063:EE_ X-MS-Office365-Filtering-Correlation-Id: 04499e16-1d1c-48c8-c440-08dc23fa609d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: G83ePnLPmBRVOdgEa3tPjI06NxrnCcDUMy5oCSuchDPwzTwC4/0vazHfIMaZqeNOgAP7ttoAxpuSSBP5uahf8FeDpBedyzAXOx4B2zy0O61lRyje4p2jF2xE28+uJV3G60MwEiI/JaPd4RfRzkanGpOugz+W7wNSokCG3hfxfTLsdlz2TsVRbQo+nDpW6S6rNQxxRqy5gPgZe6RcK1XXYRRhiJTWMQfRZR5PYiu6c224mNq03BZwVzYv5Rd73JyEPFZS2eKSkRo+GHWwzitZFpyGlaIFlglQRoVI7o/4ybYEcDOfQtP5hmXm3O31Vw+B7D6fTBLpn+7iuOUFbpjldMecw4YsHBOPbaUjIw51YAGfd3jgYMYazc476B6rlgaw06+tJI3r1mms24xDr2y+TUWMNpn4+NJUtbJI2mkFpjk/wZuyYCU7EVrk5z32xMZ5tJRikPn8KsGlNzgrImHyFPK5qaV5DXmlTbN55+YsDMgGPU4sQDRymAQJxBcpr3Z75HtlVzAzhJoPGB2UiW6lp4lK8lcL+R6HY2ptc9UzpNTiijYPPck7/tfPzLrNiFMFI8WxNy3mZCb/kSl5pR8Ah9SgAYjkpiBevKJjIPcBnSfsNLPw1FGnjvsPix8vk6ku 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)(396003)(39840400004)(376002)(136003)(346002)(366004)(230922051799003)(64100799003)(451199024)(186009)(1800799012)(38100700002)(52116002)(6506007)(83380400001)(2616005)(6512007)(4326008)(8676002)(2906002)(7416002)(54906003)(86362001)(5660300002)(38350700005)(36756003)(316002)(8936002)(6666004)(110136005)(66556008)(66476007)(66946007)(6486002)(41300700001)(107886003)(26005)(478600001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?KybvDHs2jvYBaCek/HfVYykTcnVO?= =?utf-8?q?HdfQUy9XYcFQVyhrnA5vHTOT9//7IReV8EZdmAYUWUTkWzxNw4AZc536lfTU7m4td?= =?utf-8?q?E63GZ3qUUaG7uDfCgs6MdwfcstSmRJlFccZr6u7bUzYOGUa3hikj0Bs33mebpgtIQ?= =?utf-8?q?d+pvIDytFXC1u1RYf8fFA2aibYyhfvwbwImZJqP1OuLq5rR+/ct56+YjwL8OE5CLD?= =?utf-8?q?tNh70WO9kdkvanCTZvlaW4EUuBeKRHWqTGLZnLo/B8tSoCkX7CvGQ68wsMVu8/u4N?= =?utf-8?q?uH4+ezqn+iKpz9nYzt6pyFCJwFYWZFUg4iOtRTfOughWC+ikunH+sA0mCgSQATNWr?= =?utf-8?q?WHog9XM8OwLEBjvz3QE2iMSQSFrEzXcx9s8GAV9JdGq4G0PO1+SGP+lTJw7OLfD7w?= =?utf-8?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iY7V3r3HMvp5jMgEOGwFwNTOR/57iG2nPdkRWVc5vrLsebLh8R8Ty3CmqAjt2E1Rb?= =?utf-8?q?Pl9ZzfwEdKvR9V/nS0lETFKuxtL2Uc5wIx5PdcNTvEa+2IL5zzh7a4BJLTgBNP/cp?= =?utf-8?q?VtUzN33QVp4P4fmRekMDpClCV11mkWIGa3tI7owOa7xo0fSmzynBjOnKSaI7W0NqT?= =?utf-8?q?Lke3+Sd0oTWGEpPHafrKp/qZE0xWUWSQJOkYBQNE74ZCMu1l3zDjUz9Ojfa0iwSG1?= =?utf-8?q?V8koW1t5WiLe?= X-OriginatorOrg: solid-run.com X-MS-Exchange-CrossTenant-Network-Message-Id: 04499e16-1d1c-48c8-c440-08dc23fa609d X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB7586.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 14:22:25.0368 (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: EBPGeb/vcKcQzp8MWG83jqw4DUzABxOMhTshKo50UHz2LoCZyauajULhiD2IeilYJmc3dcSO9SCJxOLw3UskOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DUZPR04MB10063 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240202_062235_803651_60F69EB3 X-CRM114-Status: GOOD ( 12.81 ) 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"; +};