From patchwork Wed Jan 31 15:16:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 768500 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp1910477wro; Wed, 31 Jan 2024 07:17:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEMzyKgQz96atLf+K77ptnMAINoeDP4xyMjhkqtgvl2cMAUw34wiTqG4pmw49NgAJW2E5ic X-Received: by 2002:a5d:5090:0:b0:337:c39a:1fbd with SMTP id a16-20020a5d5090000000b00337c39a1fbdmr1327128wrt.42.1706714227457; Wed, 31 Jan 2024 07:17:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706714227; cv=none; d=google.com; s=arc-20160816; b=DrAwdO5Y6fIkiQqwCV2UOD2fbGFnc7SGhMqgq73FWHM9bMET12t0ni/NFXeVjDiln3 f+ywTeaGkcFHxywY1h+FC/W4HUT0ZE5Ocpe/ITFspRU5otxLx8VfvrHVlnxz9Eag4klN vFDWMHlaWoqOdgDeeQJf2NM/e/SkkvgWas6s0iB8PAuesxLms0cJ4XevsyVd4YPV75Ae LuyLpOfu7SwT4QaNwGEUdXtuJV3j3dF5pHJh43ZibLgXR5xAMT5YCqcaHggjh3ZgRxUZ 0ifx0E6PnQB9r4I05CyTvLwML8ktZ1rW8+qCISd5LdiOETXJMx6FiLm4CdcDgldW7BR2 ULog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:content-transfer-encoding :mime-version:message-id:date:subject:from:dkim-signature; bh=7hcaLvjotK3SWkVPPIHbtX4d2j0pF3XwOtAF53m7jZs=; fh=IUJzsJXR8tzOhtgP/Qm7FzQrRAC2ZStJPTaXNXY0swo=; b=EzVhLyKTik97R4GX7sTTu86BX3wN6qtghPI9gtBG1dg1SsXvC2/K2qncZV0QSAuD41 6PG3loHh2ooxDWwTM+H0Xjfw/srp4W1m7MhRIsMhE4VAIpQ+npvgIlwHoKK6VOkdkheL r8vhwlmBpDXNii+oCgNUalB7UxnNrZKrTlT9y60VLObncneu3PoykF68M1Ll29LeqeFZ AzF8EEiavYB7JO5H01ih0mK8VorDCnJ6+PqYEvB9cw8O+i4h0k8r8qqnSFceBujuMvDZ L7GEwuvPirmhDIdUh1BVswbaJ9BrqQcezo3IYdoZLwITec1Hp5Vt7EHmi6tyDAZqu1HV QHAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=StlbPi95; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id bt11-20020a056000080b00b0033ae6d823afsi5116201wrb.121.2024.01.31.07.17.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:17:07 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=StlbPi95; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 253B187D60; Wed, 31 Jan 2024 16:17:06 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="StlbPi95"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F032B87239; Wed, 31 Jan 2024 16:17:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AB05D87B1D for ; Wed, 31 Jan 2024 16:17:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40e8d3b29f2so57495175e9.1 for ; Wed, 31 Jan 2024 07:17:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706714222; x=1707319022; darn=lists.denx.de; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=7hcaLvjotK3SWkVPPIHbtX4d2j0pF3XwOtAF53m7jZs=; b=StlbPi95TLsrp/7NTqMJpjBfdGi9X9sL+xh6WtIdLoj3iwyifPYMynDFZgwys4aWSY QuGflOOQqvDFdsaqsOIZRQeRD+mb/caIL8WignfmVmbb+3k8Cy0NOhc/9v9GFhpxYuuN ukueor4KXmndlVDqF9LAxwGwMSkQqyRDIQrb4Dz8E9qBZrOYou9QsQJvcaURLay3umz0 qMqBhoWeLQ8zBt2Xx9oTMtM5n+AG4hlwQDbj8ns7bX9SWambXx87eAG8yqrVQJKbbUJ1 juJBO84Qr6yDAWC3WcoDQPxBSRU6PdA/AjOJnMpS2+MzZx5ZHlwSVp4EZfk14wOB/E+q vxug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706714222; x=1707319022; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7hcaLvjotK3SWkVPPIHbtX4d2j0pF3XwOtAF53m7jZs=; b=KXCNjeL9V1kuanTY/ppEODWJfnFva0xKSgwLaj4QIl2T5fHOO3ItnnAmUts7IfkwkH fQ4Jg8xX9xZ0XAq+w7HVV6+RHA7Auk+Z0hKGfqC5VMD1GzKIHMQfqyXlH3Ma7jidICgR vjvOzup9au0tGd+M8SetEZ8U8eRirO6Z+C4EAl2rZAKapU5YLT6Cx3EmVUH3lUMDqo39 xJOWOmZVJg9EmC6AnCap15pIpLbO3c7mMX4zP772f1NQ9RPJmBFKRWvPDvF6SKg26bRU 5YByyJO0ovuaCL3hzqrZyR6xQ/0ASw0oCldh2y+/DVrTaFmEWxRdcrAlQ7HpeaeAWyLR bpBw== X-Gm-Message-State: AOJu0YxsnUTjWgzq7enF8spSxbhRzoCHgbzHYv3E7Bd1+hXcVrvl/4C1 3MH9Vu6eAnNN4z1hqrDkHJB1cV4QGChSUwwr8jLtytUAJbgmJzcLqNz688SKyRyAo3lkK+sOOje n X-Received: by 2002:a5d:4b50:0:b0:33a:ed44:6679 with SMTP id w16-20020a5d4b50000000b0033aed446679mr1161882wrs.71.1706714221753; Wed, 31 Jan 2024 07:17:01 -0800 (PST) Received: from lion.localdomain (host-92-17-96-232.as13285.net. [92.17.96.232]) by smtp.gmail.com with ESMTPSA id en6-20020a056000420600b0033ae5b637d4sm11109031wrb.35.2024.01.31.07.17.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:17:01 -0800 (PST) From: Caleb Connolly Subject: [PATCH 00/13] Qualcomm platform USB support Date: Wed, 31 Jan 2024 15:16:52 +0000 Message-Id: <20240131-b4-qcom-livetree-v1-0-4071c0787db0@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAGRkumUC/x3MTQ5AMBBA4avIrE3Sqb9wFbGgBpPQ0opIxN01l t/ivQcCe+EATfKA50uCOBtBaQJm6e3MKGM0aKVzRRnhkONh3IarXHx6ZqxIDbosTFkXE8Rs9zz J/S/b7n0/veYS+mIAAAA= To: Tom Rini , Caleb Connolly , Neil Armstrong , Sumit Garg , Lukasz Majewski , Sean Anderson Cc: u-boot@lists.denx.de, Bhupesh Sharma , Bhupesh Sharma X-Mailer: b4 0.13-dev-4bd13 X-Developer-Signature: v=1; a=openpgp-sha256; l=3424; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=loLM7Hxw2Krvk9GcDF4zeRAQlKMXQZl22gwPDknyT/k=; b=owGbwMvMwCFYaeA6f6eBkTjjabUkhtRdKdnGU9WdE76fMec59q3GcmvG6rjHZ9oNlJvDUwLMP cT6vcU6SlkYBDkYZMUUWcRPLLNsWnvZXmP7ggswc1iZQIYwcHEKwERklzD8Zvv50rX/pqH1Fr4H NyPkn3L/P1Ruee/kNL2Ch+tjts3pPcPwv/7N8qdvLnRtWrq/RubqB8P5f5n7uWxrnbas+fVqx7V 8uSwA X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean This series enables USB on Qualcomm SDM845 platforms and lays the foundation for future SoCs as well. It introduces two new high-speed PHY drivers, one for SDM845 and one for an upcoming platform. The SDM845 clock driver gains support for configuring the USB clocks, and the GPIO driver is updated to use .set_flags which fixes a strange bug where GPIOs would also be configured as input. Support for super-speed USB modes is not currently available, however configuring the device to be high-speed only requires modifications to DT. To improve compatibility with upstream DT, we switch Qualcomm platforms over to OF_LIVE and apply fixups to the tree to remove references to the super-speed phy, as well as configure the Qualcomm glue for high-speed only mode. The db845c requires a vbus-supply to be hooked up for its usb type-A port. A U-Boot dtsi file is added to configure this. With these patches, it is now also possible to run U-Boot on some SDM845 phones like the OnePlus 6 using a dtb from Linux, and access the U-Boot shell via the CDC ACM USB serial gadget. This series depends on the ("Qualcomm generic board support") series [1] switching to upstream DT, as well as the ("Qualcomm DWC3 USB support") series [2]. A feature branch based on qcom-next with the necessary dependencies for testing the Dragonboard845c can be found at [3]. I think most of these can go through the Qualcomm tree, but I'm not exactly sure. I'd appreciate any suggestions on if/how to split this series up further. [1]: https://lore.kernel.org/u-boot/20240130-b4-qcom-common-target-v3-0-e523cbf9e556@linaro.org/ [2]: https://lore.kernel.org/u-boot/20240131-b4-qcom-usb-v1-0-6438b2a2285e@linaro.org/ [3]: https://git.codelinaro.org/linaro/qcomlt/u-boot/-/tree/b4/dwc3-qcom --- Bhupesh Sharma (2): phy: qcom: add Qualcomm QUSB2 USB PHY driver phy: qcom: Add USB HS 7nm PHY driver Caleb Connolly (11): mailmap: update Bhupesh's email address clk/qcom: use offsets for RCG registers clk/qcom: add gdsc_enable helper clk/qcom: sdm845: add USB clocks gpio: msm_gpio: add .set_flags op serial: msm-geni: support livetree mach-snapdragon: fixup USB nodes dts: sdm845-db845c: add u-boot fixups qcom_defconfig: regenerate with savedefconfig qcom_defconfig: enable livetree qcom_defconfig: enable USB .mailmap | 1 + arch/arm/dts/sdm845-db845c-u-boot.dtsi | 8 + arch/arm/mach-snapdragon/board.c | 88 +++++++ configs/qcom_defconfig | 22 +- drivers/clk/qcom/clock-apq8016.c | 39 +-- drivers/clk/qcom/clock-apq8096.c | 28 +- drivers/clk/qcom/clock-qcom.c | 40 ++- drivers/clk/qcom/clock-qcom.h | 20 +- drivers/clk/qcom/clock-qcs404.c | 121 ++------- drivers/clk/qcom/clock-sdm845.c | 45 ++-- drivers/gpio/msm_gpio.c | 21 +- drivers/phy/qcom/Kconfig | 15 ++ drivers/phy/qcom/Makefile | 2 + drivers/phy/qcom/phy-qcom-qusb2.c | 468 +++++++++++++++++++++++++++++++++ drivers/phy/qcom/phy-qcom-usb-hs-7nm.c | 295 +++++++++++++++++++++ drivers/serial/serial_msm_geni.c | 13 + 16 files changed, 1017 insertions(+), 209 deletions(-) --- base-commit: b5195aca8b5b30071fda8e60bb56013032e06d18 // Caleb (they/them)