From patchwork Mon Feb 12 17:38:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josua Mayer X-Patchwork-Id: 13553828 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 EBEBFC4829E for ; Mon, 12 Feb 2024 17:39:53 +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=tcrhFAHeZ8Kh8nHoZSwAI3NQliFPIRRzvbVg2B8UoRE=; b=LdDP6IZE4pZslJiGqAMpAtaGMI zW36HgThfl3bMa9wzcY9efAJl4CmP/d13NvFMAbvBVV2u+tL6JgS4xLTXsXyRZ0SrhFeH36BaLYy+ vQphQIBFStThwf420WNlB6e0PgcXTnN79Le/CN8hdPZQYw2lNwrOueGB6CvSLuIbaoOrSZGPtptB6 f7kv6eoW2d50xAFoxsBAdMXq8LT9FYuKrlYA0ksnJkXz3Sin6gZpJTxDesLyaruB6dsHIpLWusbHR bveT6WvZjsYKFYg8EtXs8JdZa8Ho1K5zE7aEHxoYfJ/vYN8oHvtCKNI902dMaMDxx4y4zLT98A0G/ iuRYeo4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZaHO-00000006U4J-09k1; Mon, 12 Feb 2024 17:39:42 +0000 Received: from mail-ve1eur01on072e.outbound.protection.outlook.com ([2a01:111:f400:fe1f::72e] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZaGI-00000006TCR-2jf2; Mon, 12 Feb 2024 17:38:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JD6Q2S0ptnEeMsJkbavuwcniF2PU/ScEnBrz9VahK/iH9vNH3xPFzP12l16KBQqFErLvzkX28JK0wQ1rxon+Sl+NI1r4wHa1OKHwlkLR5HaGIBWri3T/3LkQw2H9K33GkoM9dCKXZ8f51G+PMxvRaVqNnbPIgHK74kOn0byA40L5Q/XDXBXRRXR9HND84keE9DUDAysC5W2DGaho+b9ynD2axcZ5d5OGEBz/Ggdsz7OYDZq+c5LSJqpVVdRaZOisvM1QldrG1cgyNyx0DqYriMGH0FRIqzaTtikLQw3Dx6kVHmWjABDUWm3CHHdpJjxyB/vq1yBW9F6Y+S6YaOqXgw== 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=M49RPVQDRuY+V2FKFZi99jgURfuAsNCh4dhWzC7A7ko=; b=gDGiMuDrrz1Qa3c5TatNeVHGD+r9IeWI3mi9dnD/s/u43z+nv2fICmAMGftx57gMKq3nxiWxqBeD1/AVjKuxYpxiRp8St5J6UHeu7ZBdqkQQ9Cqlu8Z/64qYZmWfyPwVyKDzoRDu8R7jWSqC/hRTU3aSLPrlhDnf0g36ny66VgC1mQ8ycg8ml7QeLi6mWTIZmv/EeGpYow9KsXIE4GoLYFExX9/wD9eglfzDA2mOkryf3jpRrCzVO+Go/PfWIyus58B97mwBGsdNYy3odqQicw5CMngFE7okl3EzRIKfKI1hvDKr7HhgX98OVjgguf4yvMvPgUEq4ps6Te5Hmd6H7A== 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=M49RPVQDRuY+V2FKFZi99jgURfuAsNCh4dhWzC7A7ko=; b=hz40hF1HNoX8Gjolcz9OwiuQN8Jyyh24unmY94On98UhwLEaYRJQyX4hLPA2vfo63jfAXx2fQzhDTybX6lMzzTCoFMHHn6SnmXHwbx+4f7wuTNnUaGLDyCoAeAw7bUSCVFhHwLChwtSJSilMGzMuagzcZVd5QV5kmoqQTVqe51E= 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 AS8PR04MB7909.eurprd04.prod.outlook.com (2603:10a6:20b:2a2::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.24; Mon, 12 Feb 2024 17:38:22 +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; Mon, 12 Feb 2024 17:38:22 +0000 From: Josua Mayer Date: Mon, 12 Feb 2024 18:38:14 +0100 Subject: [PATCH v6 7/7] arm64: dts: ti: hummingboard-t: add overlays for m.2 pci-e and usb-3 Message-Id: <20240212-add-am64-som-v6-7-b59edb2bc8c3@solid-run.com> References: <20240212-add-am64-som-v6-0-b59edb2bc8c3@solid-run.com> In-Reply-To: <20240212-add-am64-som-v6-0-b59edb2bc8c3@solid-run.com> To: Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alessandro Zummo , Alexandre Belloni , Jonathan Cameron , Lars-Peter Clausen , Eugene Zaikonnikov , Tudor Ambarus , Pratyush Yadav , Michael Walle , Miquel Raynal , Richard Weinberger Cc: Yazan Shhady , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, linux-iio@vger.kernel.org, Rob Herring , linux-mtd@lists.infradead.org, Josua Mayer X-Mailer: b4 0.12.4 X-ClientProxiedBy: FR3P281CA0027.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::14) To AM9PR04MB7586.eurprd04.prod.outlook.com (2603:10a6:20b:2d5::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB7586:EE_|AS8PR04MB7909:EE_ X-MS-Office365-Filtering-Correlation-Id: e4310427-08ae-4d48-93d2-08dc2bf16897 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qdq6OPuVv9mRpcEz7jVlQkS1ER2wmNY6wmWkXjOMqf8NTaSUJ/lP0AxQXXnoevSTmd095HD70fHRkJFSeWMvV9qriJbQg6U4kQHWHaIIbDOaO9KNL9gYRVkwICHdY3qBBssIw/ljBqBQ/HIkd6KQrE6vQ4tawQeXB1BpmtJjV3sqOzBAE/2+ohHV81QGs/tTuFmwRy3Z1w+3SQVPsrTEDb5ZaZMEJ21IPAt46Y+j/IRJgT9xrfuJ4lXCcFdE1/av1QvxHvy7N7Xj7qzFMNK1r93LMDXg3SOKCY7x+d0fNL6r070Jg63WTAdycrz+oJCRIkEAmFJiCaO9qRwBynfwYR/Q2jbNJOUo2rGSgHfDTjdChtR2yxubfdxCEkvdGRvJvavgjzaV8pTmtcVNfNvWYodzTjdsYw7m/MwTAtpTZQh7zuDnLDIgdfD37R2muwgO8ivj/JInrAJ+bXNKfnxiSNPwJ3dBwKP2o7d9Zg8ot1IbI7iw2U9AQb/+f+fwmCnYooNAvzOLQQgGVt17pXbcojplLSLea/OqX3IAwo0hsWRUcbFq018dTRwM77mSJHFTZ0VcwDFfWSYwNBJJH+YMVhvCmUGRtdkw1LpZCcSVy0Awynl/VZrF7p6zZXm/l9EW3HiJO0HSvBIkJn7rajHYZg== 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)(346002)(136003)(396003)(366004)(376002)(39840400004)(230922051799003)(64100799003)(1800799012)(451199024)(186009)(8936002)(7416002)(66946007)(4326008)(66476007)(8676002)(66556008)(5660300002)(2906002)(41300700001)(26005)(2616005)(38350700005)(36756003)(107886003)(38100700002)(86362001)(83380400001)(110136005)(54906003)(52116002)(6512007)(6666004)(6506007)(316002)(921011)(6486002)(478600001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0E8J7Oh7cZNy1VqruToQkQHoetgM?= =?utf-8?q?eGE8SlYedGssKTLrn2oxGO3ZW9MP+BHFimHRiVX/Fe8rsFOC26qKPVVvmqNMvF4Wb?= =?utf-8?q?CgT/AJD7iBnUeyaKzSrv34MHxJbTRLuzMVFDzGRFZe4RFDPYFFzjqnmmiPU6u/E+1?= =?utf-8?q?29uX5RmpKvDq/WhIOcP7UfpqLXUwsonuAL39qC63fzW+BQLjr+ed4LOXKtSSWUHbX?= =?utf-8?q?/u4zM8I0aZsQyA+lu85N5wueDYMY0EySUKIISZG2iP5U85lkLUzMJEACymZu+o+uz?= =?utf-8?q?nzxPqDQlCPm3glJW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aSAPhm6KfXGb17RX706XPekHyv7cZUlbzGKV1n9+1rrsc1o?= =?utf-8?q?nlWEp6jJfxqqON7fjNMeZBLDgj26or+YGoadues6xc8daRxa62Am2iPKi4pLo0hFo?= =?utf-8?q?pksaELg0ttDXl9K1jcQPd0JHm5QIFb0EDiH6n8YW5R4mvEVoDi3Ng0UVl7AONwb5Z?= =?utf-8?q?tjnPs1R9qElKhZipC2SWaIu7vT5wG255U7TFY7vnR3QDiW7655EKpUbVY/GXdJXyY?= =?utf-8?q?H/30RD7UatXWWkPxm7eb1HlZ752RjI8t2MtHscakbGT+4inAcw5SmqMwzMO0kELwu?= =?utf-8?q?J809a7OctXTUAWOU0v7laocgJoGLVFYg/x0qNRrsbBb4aaiHzz9v05kYBD0nKLv2D?= =?utf-8?q?qoNVuwTp4TtL?= X-OriginatorOrg: solid-run.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4310427-08ae-4d48-93d2-08dc2bf16897 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB7586.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2024 17:38:22.2329 (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: ARQsICIY9HsFYbr8Vt1cvKtoecpSsTCO2L8pgJHXyJKMd3kODcOQFGXfT50xFsPjoGYTOZP5oTeg57vxoIlplg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7909 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240212_093834_888275_754B5FF0 X-CRM114-Status: GOOD ( 11.46 ) 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 bd73ce06acba..cd12720638c7 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -37,8 +37,14 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-csi2-imx219.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-hdmi-audio.dtbo # 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..bd9a5caf20da --- /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_default_pins>; + 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"; +};