From patchwork Tue Jul 6 23:07:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 470490 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp5434073jao; Tue, 6 Jul 2021 16:05:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEcV5c4yepn+mRCGgI/9+kAep9D7t+COMvsUZNdL7bwSVhEBV61BHtAUCtYPXVzbW3zswW X-Received: by 2002:aa7:dc01:: with SMTP id b1mr25703639edu.239.1625612718051; Tue, 06 Jul 2021 16:05:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625612718; cv=none; d=google.com; s=arc-20160816; b=QbBpkxC/aUOxWRDpIKybRp/a2CiZIlXnyYw3GEUnwZ3I/0VOritQ8j5Qk38ugrge2L T+RpCQRlehS4MHlNN8kKqvbQaqFC1uM28OpU6LnG99ewEJHUBafbMLdemgZsQTpzXjpL bGevnfVZ8N0a/3mJjr69ehuJ5oYFOp563nm6L2mCtIbyxMqbW7HI131dD9HGe3umYtTo vCXD/DHCGKe2GviO9UMml+a7RLBAEmtcZYE0+duerx49KaGcXq2R0zkr3s/SLmQxHfSI fS7TNNHKCgMWWmEj1K0gW/MuarxjRybFb2foZbAdc/4PRkUirtlZFDp+HBGdxVWvA3Pt ipBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=aZ0FQWFZAWKS6n30bsCIteW1nd9Jxli6BdvQV5WN+qE=; b=WRY9hGey9SGgzppNyO+O1fEFSukKWJ1u+s1Q8GlLEz8FXnOgOaNeNoT+guJJE6rOo0 zg59lUh6VohY2QYfjuk161/DBn5qQ6DfTzpAhkSa2GqZyln7wkyZJ9Xb/OrcOuKkUHx2 mYYcAkDQADwng4CesH1HccUQtDadXR5JOwt4fPuc1B0QywyzaXv2rrJyp/7GDUgodqMu A9L73cYyBKUB7RQ/xebiNhQl6eyxCO50iafHYdjA2a9QFfssx+Ijy4NF+N+cV5X9jLWr wjBG8li3auUxsXdMjZcjDAIJVwm7GqjPfqWtMjZuG1+Og1zgRQ2V33a4jfzjBglebXmp Kuhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RPZPFya8; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b21si4000308eds.363.2021.07.06.16.05.17; Tue, 06 Jul 2021 16:05:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RPZPFya8; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbhGFXH4 (ORCPT + 17 others); Tue, 6 Jul 2021 19:07:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbhGFXHz (ORCPT ); Tue, 6 Jul 2021 19:07:55 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77403C061574 for ; Tue, 6 Jul 2021 16:05:15 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id j39-20020a05600c1c27b029020028e48b8fso2907504wms.0 for ; Tue, 06 Jul 2021 16:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aZ0FQWFZAWKS6n30bsCIteW1nd9Jxli6BdvQV5WN+qE=; b=RPZPFya8gNWecWQegdxw+wHvN2leMUJhk35oy7xhhqLj6OV7IfgyiVjg34tVYIAi37 Z4WjMGNKjCrjm8mCAcipIOGeRI5DxYA8C7IyzLOhQaPTbMZLfNO7ApsnCgHdskIs/S4u T5eN1r9wE4gjRWhoNt4V/sGW2iUIbWFjZKOqsPNJL1hwr9zB0zrg6eo10TWNRcgka2Zv XfHhD+4ZH2DjplNDEN0JZIUPvDUz4ioEb3N0EDbjsNFIFVZUnyT65OotEo8PvNSeBY50 NDE/Z3KmwHh6y6ggwoBPPvy2lxkQoQE1tqpiZafGRBQvnSYu2kpYAdMuxhlBZRO0EYZf PlXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aZ0FQWFZAWKS6n30bsCIteW1nd9Jxli6BdvQV5WN+qE=; b=ejWCWX/ViytKvpqxes4KP7+Wkj9iqaQwQ7qPi+lPPk95WCP99TJ+yKbf/yLwkYt4GU ikZtbCPZY8vZDIILDbnSkFtJmEvifVKobLl+KqdmklPG67AmRqscDyUbeascK/FMZhEE 0TFyGkKmTGxxlXtu2gR1404Q+5j55UaBTXeM7hmcYwSat7THTERB/v8ikT/gBQKVRno2 CURhmWZUwxqWTfPiRWRrjBXYSPAkJ3oreYag6/M0omTU4oIi/11phqfmzVJUSl/tlt0T A/w8mUd1xO7M7sIA991lMNCCBuw8bAJ83O/L+FQyKzzHkfjs83hAEXfiLvQwIEu4a4bN oOww== X-Gm-Message-State: AOAM533lBCZOLvC2TadJtePuKmiP2RqbXV+rFTmvuoCX3X77FSDBKvJE qPkIrbATajx7LpPitDk20Xe5QeKohM1YUg== X-Received: by 2002:a7b:cd8d:: with SMTP id y13mr3235017wmj.131.1625612713036; Tue, 06 Jul 2021 16:05:13 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id g15sm14241866wmh.16.2021.07.06.16.05.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 16:05:12 -0700 (PDT) From: Bryan O'Donoghue To: vkoul@kernel.org, kishon@ti.com, agross@kernel.org, bjorn.andersson@linaro.org, linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org Cc: robh+dt@kernel.org, jonathan@marek.ca, bryan.odonoghue@linaro.org Subject: [PATCH 0/2] pm8150b qmp phy type-c orientation fixes Date: Wed, 7 Jul 2021 00:07:00 +0100 Message-Id: <20210706230702.299047-1-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This series is a component of a series which enables full Type-C port manager support on pm8150b hardware as found on sm8150 and sm8250. https://git.linaro.org/people/bryan.odonoghue/kernel.git/log/?h=usb-next-5.13.rcx-rb5-tcpm-v2 When we change the orientation of the Type-C cable, we must also change the lane allocation in the qmp phy to match the reported orientation. The first patch is a simple typo fix in the original upstream commit. The second patch implements a reasonably complex dance to reset the qmp phy for the orientation switch. This necessitates registering for the Type-C switch, resetting the PHY and then bringing the PHY back up with the correct orientation. The second patch is based on Wesley's original submission, reworked by Dmitry and with a few fixes applied by me. Dmitry Baryshkov (2): arm64: dts: qcom: sm8250: fix usb2 qmp phy node phy: qcom-qmp: Register as a typec switch for orientation detection arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- drivers/phy/qualcomm/Kconfig | 8 ++ drivers/phy/qualcomm/phy-qcom-qmp.c | 107 ++++++++++++++++++++++----- 3 files changed, 96 insertions(+), 21 deletions(-) -- 2.30.1