From patchwork Fri Mar 17 15:04:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13179185 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 6B975C7618E for ; Fri, 17 Mar 2023 15:05:29 +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:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=TllNLnyEK8Tsdef9wgZFa6GdA2l7iqF9bEx0q8OV+Zw=; b=toMJ8wBHsfvMPK NOLM8zmySZ5YjHyHnc54ZLGRguGrifjY5aePPSUHVhNIIAufhRyiB2E20QWof54eqTMwxUQM8OLUN vCIzDNusNiVNEthN8P1L8VnfVP07KhqQfD0/o2OCHXSUEIf4VcjuVWrzMAq6JbDgmXtVmLzNDO/88 wgUiM/bbKCB56641qw1bwgHDxuT4fuwsUUxwoKdCswbgTqSzhF//SG4kbT80qBekX82UTERM2oHaF 6JPCmsB1IFFu0DhkU13lYP1sXLVqBdXKNYDs6/rxDUP6SrE/M555FsyvjxY6SxB51gkWMW1L2zkfA qzWV8aWhFAa6drkpVV3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pdBdG-002WuV-2I; Fri, 17 Mar 2023 15:04:38 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pdBd8-002WpB-0P for linux-arm-kernel@lists.infradead.org; Fri, 17 Mar 2023 15:04:31 +0000 Received: by mail-wr1-x433.google.com with SMTP id v25so1257627wra.12 for ; Fri, 17 Mar 2023 08:04:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679065465; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=OrNP2U1Bweu+K3EQ1iwfmC2BkNeHceAtfpVaftw7AuE=; b=hvQ9L9xFlFTyzCzkELWRsbNWD+V8o/O/lxqs+ucNSpUnQCUbD4d8r54Yq/mXFbtfVW CVptaCLb5Z6AfEPH/1A9wosw0+a/8kAj/xJtSv2aW310M1fPWI2sRCnzmRKL8nrGmwtL YfBaZ5ssF1eohRIslE/uV7l7pXKDUNpE7QAMPCjCCl+6pvSnSJtQ8+YvND6kXfKv8WFC QxRou1r8QnlE0BezkH1j7GB8Va3IPzCnZl+67tvKgFzyLuPXu5G5osHiuvYSyUTS+DIt CBsX1LalRYayX/7RnNL9fWovxBE0w/k2hyVFEH3YDmAUm2gGRLH0AfRXJrO60YIepm04 UoKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679065465; 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=OrNP2U1Bweu+K3EQ1iwfmC2BkNeHceAtfpVaftw7AuE=; b=Effmm0/YAUvNMPteYf7qew81GBI7f7X0YDU49I4KAnYzaKaNgRnApykIX8YlxEaiUA gs0Hf1JYjkfFoUFlcvBWahStNHjllHjUjGGk2FVXzClrGg0OIBgatoD7ZMEatTN6BZBP 0U60MyqEp8R7xX/KM7pa5fpXUtpEazeAaIxbF7UYM1ACUgy9DIGHt5dWMEfL//sfNsPS gp5O/4b8AZ3HMq/8iOdehysUQGKBluQ9Jmg9eq9n3Li7numf7qfqMKaVBdgXowyU22Gx WVX5tOjuSHy0hlq4OHceOQ40wrd0vnwUlWwf/Vj4k5jaYUws10rNs3V9kRfdRsB/tGma ZIdw== X-Gm-Message-State: AO0yUKUvuNuU3OrX+eorX6prCecoaBrh4Tag7yZcgHW+lOOqvwCZaSsC 4aTahblOy0KP2axrvdk/4jFV7w== X-Google-Smtp-Source: AK7set/6E/+aRE8WDx7crNSpQvDpdkFOTSvxHwHopJFuVaKrIh1NXS6C77sCNGCYq4JQ/tb1btEUEA== X-Received: by 2002:adf:f1d1:0:b0:2cf:e8b2:4f76 with SMTP id z17-20020adff1d1000000b002cfe8b24f76mr7305646wro.66.1679065464789; Fri, 17 Mar 2023 08:04:24 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id q14-20020a05600000ce00b002be505ab59asm2133773wrx.97.2023.03.17.08.04.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Mar 2023 08:04:24 -0700 (PDT) From: Neil Armstrong Subject: [PATCH v4 00/12] soc: qcom: add UCSI function to PMIC GLINK Date: Fri, 17 Mar 2023 16:04:16 +0100 Message-Id: <20230130-topic-sm8450-upstream-pmic-glink-v4-0-38bf0f5d07bd@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAHCBFGQC/5XOS27DMAwE0KsEWocBLckfZNV7FF3oQ9tCbcmQH KNB4LuHyS7oyssZgG/4EIVyoCKup4fItIUSUuSgzyfhRhMHguA5C4lSYaUQ1rQEB2XudI1wW8q aycywzFwOU4i/oKwyaFvrvFKCGWsKgc0mupGheJsmLpdMffh7737/cB5DWVO+v9/Yqld7YHGrA AEtGtcbzzf0xbXJ6ZLyIF76Jo+KksW26snIutGt7v+J6qioWNSua9DLpvay+xD3fX8C4Wn/nIo BAAA= To: Heikki Krogerus , Greg Kroah-Hartman , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Catalin Marinas , Will Deacon Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong , Rob Herring X-Mailer: b4 0.12.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230317_080430_165668_806658D2 X-CRM114-Status: GOOD ( 12.03 ) 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 The PMIC GLINK interface offers an UCSI endpoint for newer SoCs, the UCSI exchange is necessary to configure the USB-C port USB role and altmode on the SM8450 HDK and SM8550 MTP boards. Since the DT description is the same, support for SM8350 HDK is also added. This patchset focuses on USB and disables altmode support on those 2 SoCs until DP altmode over the combo phy is supported. Depends on PMIC Glink patchset at [1]. [1] https://lore.kernel.org/all/20230130042003.577063-1-quic_bjorande@quicinc.com/ Signed-off-by: Neil Armstrong --- Changes in v4: - Handle remove for UCSI driver - Fixup client mask match data handling - Added USB ports bindings review tag - Link to v3: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v3-0-4c860d265d28@linaro.org Changes in v3: - Fixed patch 1 by moving mask to pmic_glink_of_match - Fixed patch 8 by adding back hsphy - Add bindings change to dwc3 to support separate HS & SS OF graph links - Link to v2: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v2-0-71fea256474f@linaro.org Changes in v2: - Moved the dwc3 port subnodes to dtsi - Added SM8350 HDK support - Added help about ucsi module name - Added bindings acks - Fixed sm8550 pmic glink compatible - Added more description in config update patch - Link to v1: https://lore.kernel.org/r/20230130-topic-sm8450-upstream-pmic-glink-v1-0-0b0acfad301e@linaro.org --- Neil Armstrong (12): usb: typec: ucsi: add PMIC Glink UCSI driver dt-bindings: soc: qcom: qcom,pmic-glink: document SM8450 compatible dt-bindings: soc: qcom: qcom,pmic-glink: document SM8550 compatible soc: qcom: pmic_glink: register ucsi aux device dt-bindings: usb: snps,dwc3: document HS & SS OF graph ports arm64: dts: qcom: sm8350: add port subnodes in dwc3 node arm64: dts: qcom: sm8450: add port subnodes in dwc3 node arm64: dts: qcom: sm8550: add port subnodes in dwc3 node arm64: dts: qcom: sm8350-hdk: add pmic glink node arm64: dts: qcom: sm8450-hdk: add pmic glink node arm64: dts: qcom: sm8550-mtp: add pmic glink node arm64: defconfig: add PMIC GLINK modules .../bindings/soc/qcom/qcom,pmic-glink.yaml | 2 + .../devicetree/bindings/usb/snps,dwc3.yaml | 16 + arch/arm64/boot/dts/qcom/sm8350-hdk.dts | 67 +++- arch/arm64/boot/dts/qcom/sm8350.dtsi | 19 ++ arch/arm64/boot/dts/qcom/sm8450-hdk.dts | 45 ++- arch/arm64/boot/dts/qcom/sm8450.dtsi | 19 ++ arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 45 ++- arch/arm64/boot/dts/qcom/sm8550.dtsi | 19 ++ arch/arm64/configs/defconfig | 4 + drivers/soc/qcom/pmic_glink.c | 65 +++- drivers/usb/typec/ucsi/Kconfig | 10 + drivers/usb/typec/ucsi/Makefile | 1 + drivers/usb/typec/ucsi/ucsi_glink.c | 345 +++++++++++++++++++++ 13 files changed, 642 insertions(+), 15 deletions(-) --- base-commit: 6f72958a49f68553f2b6ff713e8c8e51a34c1e1e change-id: 20230130-topic-sm8450-upstream-pmic-glink-3b3a0b7bcd33 Best regards,