From patchwork Thu Dec 29 18:34:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 637807 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 508E7C4332F for ; Thu, 29 Dec 2022 18:35:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234036AbiL2Sel (ORCPT ); Thu, 29 Dec 2022 13:34:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233797AbiL2SeP (ORCPT ); Thu, 29 Dec 2022 13:34:15 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1FBBBD104 for ; Thu, 29 Dec 2022 10:34:14 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id t17so46809878eju.1 for ; Thu, 29 Dec 2022 10:34:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=no1oGPAMfu3UahXnB9UWch8Dq0drmE2MoF9HYiX8qdk=; b=UOKiv/x5GxHnqKLebOv1jT3ZNQxPq6pUKmOVI7sLyGpIfUuysrgzPwgQmg0Bn+aebi nsISs40nbm/jyVM/05Ja2AjJsZ61e5cYzAHTcWA2GnHdpVv5JM/gBoA+LEV3mIt6vLLZ oSu5/g1R68M/tKev9P921yTq40WDmaezcHLfM7qTGC85CjJ3OOwIQxRFoF+qvZNRSAl3 oZ/qdjT+gT+W2+M2BhnUEtlSwGlnL4N8wmqLuCgymEZyO+Vs/BBFQqW7++Dp/PeCHYxR ZlX90yqUztobRNLeUbNuG4jcD9BciS5+YxLIjs2LUa7eSY4CxAqEqvWDNAvcwCA8FrOP dhyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=no1oGPAMfu3UahXnB9UWch8Dq0drmE2MoF9HYiX8qdk=; b=pFbwVGVf4C0txC+a4dQyzh+/iljlAco5ojnTwpIXrqxfOO2gAHwZt8eZV2E5ETuHA5 U2ceUa6AiOk4fOfzwjlhoxQNHnp4ofxiI4uinLOn3eEhO+WqsYPbCHUB5XM6jfLQETmv GXr28V/E4zUQ58lGCrwk35sYt7Kt4l1DramH1yDnZ6rxzSG19hsFjy9HEyKTsb6jFw42 ru+kEmxHyMFzzb8dFy6Oe1+0IOW2sUfP7hRflUN7QSj6vztabPylFhiRgQCY8iUB9EUe IwTjQ0rQsVsKrvHuYhZ7CRCRwiXiW17j3cfNYKqwWwR1h5CogDa37mq+HQt8RBSBVw9a c2Ow== X-Gm-Message-State: AFqh2kqIErkh7XOINZQymFlSAiUg8oDlA+Q1ZW/juK7Pr8M8ADfDHrKC FUervuSCbBc7WBTHZ3ted99i4A== X-Google-Smtp-Source: AMrXdXuYnpHFOzlOs0ES03vrrItmdl43Pa8Zm5EPbxnp1GEMInsgQcyjSZj5ETUig0M6DAHHggbxaw== X-Received: by 2002:a17:906:a14c:b0:7c0:b4bb:919 with SMTP id bu12-20020a170906a14c00b007c0b4bb0919mr29432888ejb.10.1672338852751; Thu, 29 Dec 2022 10:34:12 -0800 (PST) Received: from planet9.chello.ie (2001-1c06-2302-5600-12a8-8cf4-e3f6-f90f.cable.dynamic.v6.ziggo.nl. [2001:1c06:2302:5600:12a8:8cf4:e3f6:f90f]) by smtp.gmail.com with ESMTPSA id g22-20020a1709064e5600b007c0688a68cbsm9013936ejw.176.2022.12.29.10.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 10:34:12 -0800 (PST) From: Bryan O'Donoghue To: agross@kernel.org, andersson@kernel.org, vkoul@kernel.org, kishon@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, bryan.odonoghue@linaro.org Subject: [PATCH v2 0/2] qcom: Add a method to manually toggle the DP pullup on HS USB PHY Date: Thu, 29 Dec 2022 18:34:08 +0000 Message-Id: <20221229183410.683584-1-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org V2: I'm clearing out old patches in my tree and opted to rework the naming of the relevant flag to align with the downstream name. Also the original set was sent against a .txt description which has now moved onto .yaml. I haven't retained Rob's Acked-by since its +18 months and the Documentation patch applies to .yaml now not .txt https://lore.kernel.org/all/20200528223458.GA804610@bogus/T/#mb20456db4a3d1cf608bb6335a1b6fa9dda8cb0cb https://android.googlesource.com/kernel/msm/+/android-7.1.0_r0.2/drivers/usb/phy/phy-msm-usb.c#2736 V1: On an MSM8939 we have a system behind both a type-c controller and a USB Hub. VBUS is not connected to the PHY and no GPIO is available to signal VBUS state to the USB controller and PHY. In this case we've used USB role-switching to transition between host and device mode. The current code in qcom-usb-hs only touches the VBUS pullup control bits if we have an extcon but, setting those bits is still required on the example I gave of the MSM8939. This series takes the downstream concept of a DT driven flag for the VBUS pullup bits and applies it to upstream in the poweron/poweroff path of the PHY. I've opted to unset the bits on PHY poweroff though in downstream the bits are only ever switched on if the flag is present, downstream never switches the bits off again. I think though, setting the bits off on PHY power-off is the right thing to do, so I've done it. Bryan O'Donoghue (2): dt-bindings: phy: Add qcom,dp-manual-pullup description phy: qcom-usb-hs: Add qcom,dp-manual-pullup logic .../bindings/phy/qcom,usb-hs-phy.yaml | 7 ++++ drivers/phy/qualcomm/phy-qcom-usb-hs.c | 36 +++++++++++++++++++ 2 files changed, 43 insertions(+)