From patchwork Mon May 15 13:36:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241494 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 DDB79C7EE30 for ; Mon, 15 May 2023 13:36:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242281AbjEONgv (ORCPT ); Mon, 15 May 2023 09:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242212AbjEONgu (ORCPT ); Mon, 15 May 2023 09:36:50 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2B2210F1 for ; Mon, 15 May 2023 06:36:48 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3064099f9b6so8300034f8f.1 for ; Mon, 15 May 2023 06:36:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157807; x=1686749807; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gdPOb/kVKRm2CWLAaTiuZb0Yvx8fGBpCags1edg/orY=; b=P2nMy5kWesrwNUFuR6XxUgH50gZSP156WdrgkZUFoEujdrWB2qXaDAAZ27bqjQtaHM NsYrqY1X/OKqcdF99Vqe/slbwItiAlGR6xlHlfPaeZi/8V+fMAdS46rLy4SW2przUces IZ92U1LNxmzf8QwSuuXMZQpMkWNuvSDWo9jBeLYGlHbwMzSt8Fj+hARO626YfqpMcOgW 4o6MJcrbMZDwrM+w5OtZL5L39aRPumyk3vGGC7yx0s51Tjpilu6ycbZXbrTocmB4qux1 CAaEMLSWH2Xb5T48i0mkeBfUnlEUKTRHM3cy1KYcxxJOtYw5hynclp0SId0piJaCLyaS DhOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157807; x=1686749807; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gdPOb/kVKRm2CWLAaTiuZb0Yvx8fGBpCags1edg/orY=; b=Anc1YzcKdd+Q5F2zNB+Lubf0dJkuOSjOsiT/szK3+7fEHQcirEiGXvGoV21k9Jkqgg rJbQ4AfXTsxMjfDTGgc8DLnWU+/A2MU3oWOgTrPHN6iNQlqpZ+81+0AbXHkEa+mzj5JR GryM6iEtWkq7SIhBG000WILel7kSisywZIIEHpugYI5HF1U7qXV5OUJv9nFYdLii6+gK bXxPLuxOQ3BQPJ1Y4oNkUerUdZd348OHXppwdGsr3SxvSdvnCVFDLLZ26DuCNbpc15aG t8wHkunQtumySiyRpqHbxzoer7E5jDWRloCbogfcY6NdWovVk5pKdraB4SV6PoDZNdBG yNOg== X-Gm-Message-State: AC+VfDwhRMp0+CD4dFhNl1qXh3NhaTtVXTW7VvW+ckYVt03RnAsEs+Pz 1mfwV9rDPSIpYhV23Nt7Y+L2yw== X-Google-Smtp-Source: ACHHUZ5T2LTC43PDHW+CSbEU5nTt3qXm05lj7zS9ZugG2rSSW7jgimeIx8QUsaOl3dXKdcJAkxOL4g== X-Received: by 2002:adf:facc:0:b0:306:30e8:eb34 with SMTP id a12-20020adffacc000000b0030630e8eb34mr25685200wrs.48.1684157807179; Mon, 15 May 2023 06:36:47 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:46 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com, Krzysztof Kozlowski Subject: [PATCH v8 01/11] dt-bindings: regulator: qcom,usb-vbus-regulator: Mark reg as required Date: Mon, 15 May 2023 14:36:33 +0100 Message-Id: <20230515133643.3621656-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The regulator code needs to know the location of the register to write to to switch on/off. Right now we have a driver that does this, a yaml that partially describes it and no dts that uses it. Switching on the VBUS for sm8250 shows that we haven't documented reg as a required property, do so now. Acked-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue --- .../devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml index b1cff3adb21b5..7a3b59f836092 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml @@ -25,6 +25,7 @@ properties: required: - compatible + - reg additionalProperties: false From patchwork Mon May 15 13:36:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241495 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 146F9C7EE23 for ; Mon, 15 May 2023 13:36:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241197AbjEONgw (ORCPT ); Mon, 15 May 2023 09:36:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242166AbjEONgv (ORCPT ); Mon, 15 May 2023 09:36:51 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30AB510F5 for ; Mon, 15 May 2023 06:36:50 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-3078aa0b152so6742066f8f.3 for ; Mon, 15 May 2023 06:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157808; x=1686749808; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Mot1s4oJJqHfzgUo3NAC8eaCnGWNaTZ4CyGiPVoRb5c=; b=mbOsaDjwvLU1gQhnguNDd6Y+NMujueBfPyS4GfaQqZu2BAqEbmpQ3PlMCQb1smjIfD eKrTqbfpvkcH4g8ZSBdireNIAzN8V3YMt+RkFt3Oktp7yIwJMXTX1CR7aIXKkZNniwFU ATNDaP6a9QK5eqJlnQuUau5kpF1XD6CIJhV4CCdbw5CSpvZvlTBvBWAUVcx9MLJsSqKw d7xhCVh8PfFb+Mzt2a7lnJrLISCcL7Q0uKC+jrsYUf2IBoHp6C0x47LkgusdgswPzu0C lWvW81LLhkEeJqFQiB37aefiMIfsOsxMN5jC784XaAL7p17iEPw3We4s3ZBWUXzPWPLj PgNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157808; x=1686749808; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mot1s4oJJqHfzgUo3NAC8eaCnGWNaTZ4CyGiPVoRb5c=; b=WclUS34L6FZf1aW4fmREZ9idFsoGbf+y10tkrrimbSV7Bw2AI1+obh/ZxHd75k9CsS KcnFOP1yZQV/9NnQSUAsl2TYn+4vJHaOywC4NcqU8WPHIRxcVm0z33RHDFwhxNszTmob qCtwWoaWBGPy45XdiWyQmtdy2mGeTygySocLTGFL0syi67hxmFA4aLC9Wu5DgJRgIIT1 PBHCke+qs07Ass4Z3Nj7jAWk2ddjwZ+5bh6h2zCFaFOHMPrTsEGtDaOLwlkBtsIlSXuv UqCuaAZoSnykteXYdMyseyuNL9Cw2pzoGfABIG8Crs0IDUwvdArRXwIfGVh/ZCLGbXfh gSaQ== X-Gm-Message-State: AC+VfDynovwRf4y1tZ0FWThKGJenfObSM7LQ4chxUh02GCAe6HB23XG7 YNEt7VygqxTujgY7eGJ2PHINpA== X-Google-Smtp-Source: ACHHUZ6FxAxMf2hSCFP77wi/MI2KoxiAZd5LsErPujcgOK9VlnTgmut2Jab5lIVWOWJu8ZVjlDYk5A== X-Received: by 2002:a05:6000:120a:b0:306:4054:6e41 with SMTP id e10-20020a056000120a00b0030640546e41mr27429877wrx.53.1684157808633; Mon, 15 May 2023 06:36:48 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:48 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com, Krzysztof Kozlowski Subject: [PATCH v8 02/11] dt-bindings: regulator: qcom,usb-vbus-regulator: Mark regulator-*-microamp required Date: Mon, 15 May 2023 14:36:34 +0100 Message-Id: <20230515133643.3621656-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The VBUS driver needs to know the regulator-min-microamp and regulator-max-microamp so they should both be marked as required. regulator.yaml defines those two dependencies so include regulator.yaml. We need to change from additionalProperties: false to unevaluatedProperties: false. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue --- .../bindings/regulator/qcom,usb-vbus-regulator.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml index 7a3b59f836092..89c564dfa5db5 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml @@ -14,6 +14,9 @@ description: | regulator will be enabled in situations where the device is required to provide power to the connected peripheral. +allOf: + - $ref: regulator.yaml# + properties: compatible: enum: @@ -26,8 +29,10 @@ properties: required: - compatible - reg + - regulator-min-microamp + - regulator-max-microamp -additionalProperties: false +unevaluatedProperties: false examples: - | @@ -37,6 +42,8 @@ examples: pm8150b_vbus: usb-vbus-regulator@1100 { compatible = "qcom,pm8150b-vbus-reg"; reg = <0x1100>; + regulator-min-microamp = <500000>; + regulator-max-microamp = <3000000>; }; }; ... From patchwork Mon May 15 13:36:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241496 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 BA344C7EE26 for ; Mon, 15 May 2023 13:36:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242212AbjEONgy (ORCPT ); Mon, 15 May 2023 09:36:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242327AbjEONgx (ORCPT ); Mon, 15 May 2023 09:36:53 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF8F1FDB for ; Mon, 15 May 2023 06:36:51 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3f50020e0f8so52571695e9.0 for ; Mon, 15 May 2023 06:36:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157810; x=1686749810; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9lSyNZ2HtWZEUWBo+n5QAmOJQC6AAMQbbNN6fuawseI=; b=py55TopUyLtYTx+EEri7Dsphl80919jDRcDJTgQqEC0flMDpk2nUbqv/KnhceMHuVR bRgXhdTQFw+4GwaDcFWmbN4vpEaeaZdvh5FDoJ17sPGCzYsBAiDZ7aE7NBKQBJATqG2q KhUhpSdUbp336UIKe+LYifKt3AW1DuQd9mp0BydCsWi2DxromacuqFqDeO1eVkXpgTCc Vbh6KVFWv92pSsLzozWZJ471gPwMEr+VpE0LvGurDcnwRzgWb/pPmglZhT1fPrHjdYsZ vZb3csvy1JcyLpslbA/HkQZatywi6z8AWMLfa+Yl9OnFh2WC/x9qabcYGW0X9gSywzYx 2aUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157810; x=1686749810; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9lSyNZ2HtWZEUWBo+n5QAmOJQC6AAMQbbNN6fuawseI=; b=RL+lgD4trQLaLLoG45nolByWJro9JLotya6TxacESIkuijGJjUTa2PZ5M9NQN6hvqf StBx/LqL6kRPxGmUeBJD13X80iJm7zid7gjpMdmXEDyO5N7cv2NfrNOpWoWFl1hAa13+ lEfxjPJjB6ImWVDDOWerONMd7Coj6egBMoDarWjgOINvUC/OnE3YkpUr7xgVqb3mKFXb 3hIba6PWv8j5uaxxozbFfh8enMDxyr3zdVnbjDJpvmpxlIBE8UjI0t6DCjj/YnfHgma+ ZcNxolCfJHiO3GOzjFMwM5DAxNeuZOB1/Gi3x62aVUkiKB7TAGIeTuTLwoSiD/zA76Xz Lveg== X-Gm-Message-State: AC+VfDxBsz2hEC2C1LOYgsz0c+mzp5k3oge0pqXbNKbDEUzJ7WOe/s/c aILxe0Pff0a8MDwXjCwaPqXxHA== X-Google-Smtp-Source: ACHHUZ6vrPJoAUg5h7iqgaW53cl7iK/XaSCSzWR9L1m7n4dINzPzjkrNaQwvbdA7N4WxPDtUGN1ekQ== X-Received: by 2002:a5d:5387:0:b0:307:91a4:263b with SMTP id d7-20020a5d5387000000b0030791a4263bmr18151703wrv.13.1684157809805; Mon, 15 May 2023 06:36:49 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:49 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com, Krzysztof Kozlowski Subject: [PATCH v8 03/11] dt-bindings: phy: qcom,sc7180-qmp-usb3-dp-phy: Add orientation-switch as optional Date: Mon, 15 May 2023 14:36:35 +0100 Message-Id: <20230515133643.3621656-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org orientation-switch it the standard declaration to inform the Type-C mux layer that a remote-endpoint is capable of processing orientation change messages. Add as an optional since not all versions of the dp-phy currently support the orientation-switch. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue --- .../bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml index 0ef2c9b9d4669..d307343388888 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml @@ -61,6 +61,10 @@ properties: power-domains: maxItems: 1 + orientation-switch: + description: Flag the port as possible handler of orientation switching + type: boolean + resets: items: - description: reset of phy block. @@ -251,6 +255,8 @@ examples: vdda-phy-supply = <&vdda_usb2_ss_1p2>; vdda-pll-supply = <&vdda_usb2_ss_core>; + orientation-switch; + usb3-phy@200 { reg = <0x200 0x128>, <0x400 0x200>, From patchwork Mon May 15 13:36:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241497 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 E51DBC77B7D for ; Mon, 15 May 2023 13:36:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242299AbjEONg4 (ORCPT ); Mon, 15 May 2023 09:36:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242334AbjEONgx (ORCPT ); Mon, 15 May 2023 09:36:53 -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 764AA1FEC for ; Mon, 15 May 2023 06:36:52 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3f50020e0f8so52572545e9.0 for ; Mon, 15 May 2023 06:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157811; x=1686749811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6omFeCMKQQj09/ceCLTqpP2YWnzqMpAujAZuytfA25g=; b=msO51y08gA/spSvolZcVIaHkF8dg0KHRN6Qb27FRLYaCqOYS1XehFbYrTsgYiXsgus fRn43yrxu7TCZ0sDMDlLA+qCKHkZ4oZSHi2JKmbfWR9rgLPYRD8fzYw21Pg2yBAHMxsh b0i5YdSMasHgtA8x0xiFZqNhn64wl5+bkzRQHb01FYzif040Y+k6epKVFdSIphBnuQHi ztbB7vjLepsOg21BPgdIXPaXIUMwklTEBvGeegFvgjsSR2jGGbf+gPoulJD7sYQG4bdF qQuWLL89fKPFLAzYGxeiu2mnGcyaB9sVOaJ6N9UPjJ5zQOPmE0WEsgkxXHb/pJrmqd07 36kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157811; x=1686749811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6omFeCMKQQj09/ceCLTqpP2YWnzqMpAujAZuytfA25g=; b=lqGoUf19hxEdGTFLFman2jJygpPFbrAyHSC847J7A1oudtYwJ9wSSV1TUtAMm3WBJF /b4oRmaVDcdv13WIMu+SavKwieKXqf3lgQBimU1QZRpRCFQglflYpANr7MqLzIWOqh27 dShj6vNB5FO1DrOH5UWFVHNj7XCzR+nkvlWfRCIvSzLuitz9m+ZjJc1vKEcjOjGZsBuj b9kAD9StrjEC/lZ1ojmUorHMcCTIRqZwl6RW4cWwL7+ikVgBMk7rnmi2AFi+rDaSz8JI pw8g6IGH9R36xFUGL5u+iNXNhSWXerYyzwsPN4e3b4aJTx9grinibuTTlFxOXYxbjksb Lk9A== X-Gm-Message-State: AC+VfDwh2ZCcSixjymiRXue/zAjgq8QCxZL60dTdFpf0toBXqkf5mhAk 2Vj+FggLPKxrNmDrbUlk72DWVg== X-Google-Smtp-Source: ACHHUZ4TH/e8glnpbdncFVTRaYoUftgHLa97FFp8FlGRWLTYgzFxTyr12MGjPEjjbiFVbJQqp3ThEQ== X-Received: by 2002:a5d:4292:0:b0:2ef:d0de:e8a4 with SMTP id k18-20020a5d4292000000b002efd0dee8a4mr24586008wrq.25.1684157811007; Mon, 15 May 2023 06:36:51 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:50 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com, Krzysztof Kozlowski Subject: [PATCH v8 04/11] dt-bindings: phy: qcom,sc7180-qmp-usb3-dp-phy: Add input and output ports Date: Mon, 15 May 2023 14:36:36 +0100 Message-Id: <20230515133643.3621656-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add a ports declaration which is optional containing two port@ declarations. port@0 to receive an orientation-switch message from the Type-C port or redriver port@1 to subsequently transmit the orientation-switch on once the PHY has finished doing its orientation turn-around. If ports is declared the input port port@0 is mandatory but the output port@1 is optional. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue --- .../phy/qcom,sc7180-qmp-usb3-dp-phy.yaml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml index d307343388888..c370b9cd58c2e 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc7180-qmp-usb3-dp-phy.yaml @@ -65,6 +65,25 @@ properties: description: Flag the port as possible handler of orientation switching type: boolean + ports: + $ref: /schemas/graph.yaml#/properties/ports + description: OF graph bindings that model incoming orientation-switch and + outgoing orientation-switch messages. An example of an incoming + orientation-switch message might come form a Type-C connector or a USB + redriver. An example of an output would be a DisplayPort controller. + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Type-C mux orientation-switch input. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: PHY orientation-switch output. + + required: + - port@0 + resets: items: - description: reset of phy block. @@ -279,4 +298,23 @@ examples: #clock-cells = <1>; #phy-cells = <0>; }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + qmpphy_typec_mux_in: endpoint { + remote-endpoint = <&pmic_typec_mux_out>; + }; + }; + + port@1 { + reg = <1>; + qmpphy_typec_mux_out: endpoint { + remote-endpoint = <&dp_typec_mux_in>; + }; + }; + }; }; From patchwork Mon May 15 13:36:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241499 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 69482C7EE2C for ; Mon, 15 May 2023 13:37:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242385AbjEONg6 (ORCPT ); Mon, 15 May 2023 09:36:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242367AbjEONgz (ORCPT ); Mon, 15 May 2023 09:36:55 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 107C21FEF for ; Mon, 15 May 2023 06:36:54 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-30786c87cdaso9990072f8f.2 for ; Mon, 15 May 2023 06:36:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157812; x=1686749812; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ic2PzyBJMTnrdn9lavuhttp1+67QyuBjwBrtru82DN8=; b=QEhWRQGc+WkNJHBHvHMSb9i+VVotu3V4jiRikyoHK1+kaKfL+jV8WspEXbvicqtp6o knam6iVsoeb9ZTNyYo/WnH/7blKD3LfPeHjBWFrmbHG/1VM7yowaCxroTVhy1ub+qkkD 7gLh04BJU/kiHyw5RvsZTHEf/ZCl1nIJqqX8T6MUicVMDlTD4fmrrX6V/sDsO2afryIO tTk0Z2NyqtpuPvC0XQUfTBoUtirW013WzgZ3XhMhqSQen7oJQnQsZzXTTekZDZ8lHAJA ++q0HgtJOaNDgqCNvkKim9Sy59WZdlBSA4wCQ+KxjKeWoR2gIMkAZ4/tugklzOmAvWv9 2uUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157812; x=1686749812; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ic2PzyBJMTnrdn9lavuhttp1+67QyuBjwBrtru82DN8=; b=LC9bHNnNksivptBVSE5JVMk+b6OFIP2ERFUBsLe33GlytQgS8rnK/iANc1boDn+U8e HIPw4hbrWy+y1H7KwvVKVC0ADZgYXZMpogc/s0CvZ7ym9DoT9u820ETVM+rbPACwJpKk 1WagmPQ+c6xwOhng9VZGF2QMPNG2+YcCu8IaRvdiMbQ3P4Hn91Oz4hGKBf+DHBYzBXJ5 auzHD1CIp+h26KpY8tCE5IwhgbVhFZqrjv7muaam/q0elvO4ahRWxaWqulXAN2OFPsSP g7UkBkgU2v1DT8kqjXs8NQceQVqFMW/v8VxD0CvVxYBAuz8y2w1Z77M6XdHmCqkC3SNn je4Q== X-Gm-Message-State: AC+VfDxFVm/3faW0Gfwdwh1CQvrJV3ScsoGxB102jM5UiuxgON2Iz+fx +dDcc6Ug7OYdKPD6qKfaWhZ9Xw== X-Google-Smtp-Source: ACHHUZ7l12CeFT/SYpWPfuh3zcpA8OuxR+iSFnqnjkA/+xkV6/Sy9vCMcRKfYK3GeD4WOZI1qM636g== X-Received: by 2002:adf:e909:0:b0:307:c0c4:108f with SMTP id f9-20020adfe909000000b00307c0c4108fmr12993352wrm.33.1684157812259; Mon, 15 May 2023 06:36:52 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:51 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com, Krzysztof Kozlowski Subject: [PATCH v8 05/11] dt-bindings: mfd: qcom,spmi-pmic: Add typec to SPMI device types Date: Mon, 15 May 2023 14:36:37 +0100 Message-Id: <20230515133643.3621656-6-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add the PMIC Type-C port driver to the list of devices. Acked-by: Krzysztof Kozlowski Signed-off-by: Bryan O'Donoghue --- Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml index 36de335a33aa8..6e6f562a915be 100644 --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml @@ -158,6 +158,10 @@ patternProperties: type: object $ref: /schemas/thermal/qcom,spmi-temp-alarm.yaml# + "^typec@[0-9a-f]+$": + type: object + $ref: /schemas/usb/qcom,pmic-typec.yaml# + "^usb-detect@[0-9a-f]+$": type: object $ref: /schemas/extcon/qcom,pm8941-misc.yaml# From patchwork Mon May 15 13:36:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241498 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 09DACC7EE2E for ; Mon, 15 May 2023 13:37:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242374AbjEONhA (ORCPT ); Mon, 15 May 2023 09:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242375AbjEONg5 (ORCPT ); Mon, 15 May 2023 09:36:57 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B69A26B5 for ; Mon, 15 May 2023 06:36:55 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3078c092056so6674332f8f.1 for ; Mon, 15 May 2023 06:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157813; x=1686749813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=g0kxZRhUCmP6zefutXh1eka5fAOo/mUsuRlD9H8W1TY=; b=ChxVxpZPk33OO70HkcfDvB2O3WFd4dmjAHjLPogFwhCytQkbAIhNilBX+UJMbGkbBH TNiOcxg1UcpP9lWwXm7ZO2H7cw7yUaU+rhZ8gddRHv4VGxj44x3aa3Fij0h/P3kIieh9 Jk/fTB2pP4PkaIRtjx4rIGGA7GdJ+DWHV/gay5qiJT6R4LsgItMVup3HtgDja+C8D3oJ quLP/c8AQL6waxs00wBy9u6jsfrNZgenQDZaX1qZQj51q7uEkEDOV2gWin08cXy+uA+x 40e68ZU44ZhX0WlctUct/D/iWpjKYG45FKalIcT+1QedgO/bwYCvX6oAYMWwBwpyEuGX J8lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157813; x=1686749813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g0kxZRhUCmP6zefutXh1eka5fAOo/mUsuRlD9H8W1TY=; b=Vhf8ObTyfIz0k7UxzUfJaohaubd37gdp08x7MsdhGrdWz8N0u7rlfmFenWqt650Zq8 ejvKAFEDNiy7bDyUvwdOu1ifIaCG3nT3orTffQykWysf7qYbXsrTSJ56v+l9qJNRQjmH D31bOLLS5oUROm3AcEKuerwC4IGbnMNJebshd6uYs93RYqV/ySPGTJ2g3YHnp9oUiPRX lB59NjvIOZ0kyenBxWbqo9dbfWdHMxmCG+4Oqh9AzQ2c+WUhCKMq9Fd5iXfi875kU2/M snpt0xag5Ze28FUaWlA9IWS0jJpGxHfho8A95pGQHjAee0/7zXhRGGRWXN++4jBK44K2 SAeg== X-Gm-Message-State: AC+VfDxfU2v1o5bx1duouqgRQgcyRqWfv1T3cpckSOvArEdySxCXK5fN VxWb6Mop6LfNMFMqaXA09H5UEw== X-Google-Smtp-Source: ACHHUZ4OoEQADns9+LhNzsX3vcQ3y6AEWZIspfJkNrgfYt2mEwgb3sPFShd1Pojb/XLBWjuv+0+ziA== X-Received: by 2002:a5d:688a:0:b0:306:2b53:e7de with SMTP id h10-20020a5d688a000000b003062b53e7demr22544906wru.28.1684157813564; Mon, 15 May 2023 06:36:53 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:53 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com Subject: [PATCH v8 06/11] arm64: dts: qcom: sm8250: Define ports for qmpphy orientation-switching Date: Mon, 15 May 2023 14:36:38 +0100 Message-Id: <20230515133643.3621656-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org ports for orientation switching input and output. The individual board dts files will instantiate port@0 and port@1 depending on the supported feature-set. Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 7bea916900e29..0bc7486e59e54 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3581,6 +3581,19 @@ dp_phy: dp-phy@88ea200 { #phy-cells = <0>; #clock-cells = <1>; }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + }; + + port@1 { + reg = <1>; + }; + }; }; usb_2_qmpphy: phy@88eb000 { From patchwork Mon May 15 13:36:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241500 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 EE72AC7EE2F for ; Mon, 15 May 2023 13:37:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242367AbjEONhA (ORCPT ); Mon, 15 May 2023 09:37:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242382AbjEONg5 (ORCPT ); Mon, 15 May 2023 09:36:57 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4544D2702 for ; Mon, 15 May 2023 06:36:55 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3f509ec3196so30451895e9.1 for ; Mon, 15 May 2023 06:36:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157815; x=1686749815; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ggSMkeabkRyeGybJTXAm1fOlvZBRSl1KVDzGWTu+biw=; b=cisBOs+OO5O1BlEtvnWguj7l6fCUM1Jtt/5D8V5mMhUdXAKQ58DDfkMZI4HdJ8E9vs ZZ/AapSSgLyDD86KxAtdQy1bs73xU2TFqNOPHEponbvBDWwgId1FyYuHoCQNqM/q/YMO onEark7MXo/V78h3vaIFTvYD2VZxc1k5ciIoL5H3zv1fTf2lRleyLFBYDCp6doqV0mLT E0vBAGCR9j1KKOJr16Cfx4Fy7cOdkPFQbMZKpvJOQw8/AzhAgi76y2PMjTeZtfFYhCRw LiHJo8vG8wHlwt/9SZPkGSw7kkxg4B+aHqbdIdDaNIm82JmmXxhy0ieN50x6Hrc8FQaH 0hTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157815; x=1686749815; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ggSMkeabkRyeGybJTXAm1fOlvZBRSl1KVDzGWTu+biw=; b=NOCgkUr7mmiWAvwbzU5TmuIW6zo/Dnm/kTelrx9WFIDtEOzZUbY/6b1OppqB5Q4lKX vRjwMAXAbL1fGo1mIuMOqA/gQF/fqWhxENq+ooOVeAouhywOtYgBFmPabW2Z35SwARIl QeM0xErMOH3n7mazWfExXTVUuxnZZ1YbJb16fEfVu6uowt9LQrlZLk5aUz3UavPE0ezJ qk57+aDM34BOUWZ4hcPF616xCmvUFuHS5rRByhUgwzOObp2+k7zq7WnLUKog/wjJ1rfZ uadNuTeBXoc3HIj2BSAeOyDucnikXj2L/YLc/+VM2GpqQ/CxpuYrW2Lsdxjtgw5qqZ3T rswQ== X-Gm-Message-State: AC+VfDwryoTTheIZUGWI+xPJ45ZyShlIFlsTn3deSrzI5prcUCcxJ9V2 aunvkfVyAy+9h9WupQ1GVDF+ag== X-Google-Smtp-Source: ACHHUZ68t16OYRiGKeuRpFNC+3RQeFe28+T9T+TjaWQDJT1cOLzoD0CMojZyEMWtAZwgr2tUUxpHng== X-Received: by 2002:adf:f4cf:0:b0:307:5091:5b96 with SMTP id h15-20020adff4cf000000b0030750915b96mr26254165wrp.22.1684157814737; Mon, 15 May 2023 06:36:54 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:54 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com Subject: [PATCH v8 07/11] arm64: dts: qcom: pm8150b: Add a TCPM description Date: Mon, 15 May 2023 14:36:39 +0100 Message-Id: <20230515133643.3621656-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Type-C port management functionality lives inside of the PMIC block on pm8150b. The Type-C port management logic controls orientation detection, vbus/vconn sense and to send/receive Type-C Power Domain messages. Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/pm8150b.dtsi | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm8150b.dtsi b/arch/arm64/boot/dts/qcom/pm8150b.dtsi index 66752cc063d60..136e5f96a3d53 100644 --- a/arch/arm64/boot/dts/qcom/pm8150b.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8150b.dtsi @@ -59,6 +59,46 @@ pm8150b_vbus: usb-vbus-regulator@1100 { reg = <0x1100>; }; + pm8150b_typec: typec@1500 { + compatible = "qcom,pm8150b-typec"; + status = "disabled"; + reg = <0x1500>, + <0x1700>; + interrupts = <0x2 0x15 0x00 IRQ_TYPE_EDGE_RISING>, + <0x2 0x15 0x01 IRQ_TYPE_EDGE_BOTH>, + <0x2 0x15 0x02 IRQ_TYPE_EDGE_RISING>, + <0x2 0x15 0x03 IRQ_TYPE_EDGE_BOTH>, + <0x2 0x15 0x04 IRQ_TYPE_EDGE_RISING>, + <0x2 0x15 0x05 IRQ_TYPE_EDGE_RISING>, + <0x2 0x15 0x06 IRQ_TYPE_EDGE_BOTH>, + <0x2 0x15 0x07 IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 0x00 IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 0x01 IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 0x02 IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 0x03 IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 0x04 IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 0x05 IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 0x06 IRQ_TYPE_EDGE_RISING>, + <0x2 0x17 0x07 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "or-rid-detect-change", + "vpd-detect", + "cc-state-change", + "vconn-oc", + "vbus-change", + "attach-detach", + "legacy-cable-detect", + "try-snk-src-detect", + "sig-tx", + "sig-rx", + "msg-tx", + "msg-rx", + "msg-tx-failed", + "msg-tx-discarded", + "msg-rx-discarded", + "fr-swap"; + vdd-vbus-supply = <&pm8150b_vbus>; + }; + pm8150b_temp: temp-alarm@2400 { compatible = "qcom,spmi-temp-alarm"; reg = <0x2400>; From patchwork Mon May 15 13:36:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241501 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 536D8C77B75 for ; Mon, 15 May 2023 13:37:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241346AbjEONhB (ORCPT ); Mon, 15 May 2023 09:37:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242390AbjEONg7 (ORCPT ); Mon, 15 May 2023 09:36:59 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83E1E1FEF for ; Mon, 15 May 2023 06:36:56 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-30626f4d74aso8329495f8f.0 for ; Mon, 15 May 2023 06:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157816; x=1686749816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CuPqCRZb0IOEal0w8tbJWxx13wX54OyCGod52wMQWCk=; b=JcqSgDTM/ySOQ6/P9BjOLEW38jMM3ftKOp0CVNl8sMYHi00RIyYW3hOH5uF3wn8Pf1 9sAis0eIBR4dNi3OXIc3peSjeZk7gw6jCwRacBFT1/dWn5opHkeL2R0WREjy9e9s78r9 Pxo8ePtyXfqqHoFrn/mbrtCv9USwIFw5dbyxAMTwilrtR6H3+1gh9VtWyEH7cYkLky0u SwSlAHPWh6atOT6/TeuSbbe3oJYIQtv4nDrak/zVdD9QzxRHmsXBQuscAFfz9ADFpBTA f8tlJFa0tQtqkpdboXjk0/IiNiSNhdsDMfmgAnhWFb0OZaRz1JROfirW+Q/TyUcAVI6H t81A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157816; x=1686749816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CuPqCRZb0IOEal0w8tbJWxx13wX54OyCGod52wMQWCk=; b=LipVr6MNJI+oFhZvlcmF3ZrkCZYCNqxHVa4ny8BALD9oNu3RS3BLzj7Z34ujKxmbBw 4Bi1KY8zSN2MzoP6tsee+GqKucbadxV6V77GRN3e67ZxydP3WjN5fC4swKXGq0dS13P2 xJcCwdOUf1h4Iy2Xam1vjy6NPBLvVWunJGhayfbtWvvZSSAxKXN8jwyQuiGVu89Z3d4P ubQ92Mh7I57NfkuR7wLBbK6x0uXBAKXuQlD+CLLreVoInR4YdRrNuEuL/4jlrJpvVzFz WFElugbn/k2a7B1GsWCV/HLP7d7wahibj7+FfILk7O+GCoR5SWrinFjj4CCYMmm8eFB+ VstA== X-Gm-Message-State: AC+VfDyd3uFXASeGsuUYB2Jv3KAWFCSmQJdZZBgaikY8XniGlC8lNFQR jsaSMP9cxwqgaS701L47VgTBNQ== X-Google-Smtp-Source: ACHHUZ4lYvQ3HrSBEi/Fhlmj/Ybw2dRoWy7eedfFwF1cjPr6nJxYzAjJlWjW3kDlNyIvwRnIF67QAA== X-Received: by 2002:adf:d0c7:0:b0:306:372d:7891 with SMTP id z7-20020adfd0c7000000b00306372d7891mr23840447wrh.59.1684157815859; Mon, 15 May 2023 06:36:55 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:55 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com Subject: [PATCH v8 08/11] arm64: dts: qcom: qrb5165-rb5: Switch on Type-C VBUS boost Date: Mon, 15 May 2023 14:36:40 +0100 Message-Id: <20230515133643.3621656-9-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Switch on VBUS for the Type-C port. We need to support a higher amperage than the bootloader set 2 Amps. Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index dd924331b0eea..b326bdeeb7742 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -1338,3 +1338,9 @@ &qup_spi0_data_clk { drive-strength = <6>; bias-disable; }; + +&pm8150b_vbus { + regulator-min-microamp = <500000>; + regulator-max-microamp = <3000000>; + status = "okay"; +}; From patchwork Mon May 15 13:36:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241502 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 19D15C7EE23 for ; Mon, 15 May 2023 13:37:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242396AbjEONhF (ORCPT ); Mon, 15 May 2023 09:37:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242366AbjEONhD (ORCPT ); Mon, 15 May 2023 09:37:03 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1C972701 for ; Mon, 15 May 2023 06:36:58 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-306dbad5182so8388770f8f.1 for ; Mon, 15 May 2023 06:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157817; x=1686749817; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=USITxvLm1tGcaHImZMsGsNG5AjtA8MZCeVdVYmxvE4U=; b=WROTeU8Xa5lXQPjD+CBjizc0bCNC+EYTMOCRWH0fNhLz/pIc7Al3AI0C9R7ri/h+b0 Og/wtByaxJHBC3xBLjH3a/GbnH4E/WRNLSejWeuh1HEqe0/qQzr/n0O1oNwvPg4L6lEn 4YEG1m/mLq4Z7hvlf9pZfGRHC7Kc9eWL4eVBcv2DWh18eEcmoGbRrueWOzKNims+ptAV FM3lxZOYB5B/DtWdwb1BOTvsxcsHz0/vqXUspxD95jfSF8YtnfsurG+aDEzqA9mZ9Frg yKabh+tdJiLcxe5lvnmoV79VVRVHRpvt+j7UNy1QT3L4yrZPp8IxZ3Tsu8fYbzKTMHd4 yY4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157817; x=1686749817; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=USITxvLm1tGcaHImZMsGsNG5AjtA8MZCeVdVYmxvE4U=; b=XO3hdqXxtZldTfgRwlfdoC7W7oz+zKI75jnTRklcpDVJZE7kibsaGpKTGJzHSfQwNw Z53+1zUpBNUIeyYtMa2SIUnUeTFL98bFbXRSIIRYXw7Lb48iv2Tw5zBQA4nzf6Dnv6hA RpMvYS4LTvNfTfmdH4Q6hFLpZNwK6/XD7h/o9G4ZNWJIhb+wnRU6l0rY1GZsqiEeJXS1 Ze8iCiXoAFBzPxfQD46Ah4DqBEpKCvKE4efqDn9GmtYsd1xGeaEmQ55B+kT8E9g5oz+q TO7eid5yK9a7uMjLJLyR/bAw6Sd/AAAXdfUcGgIjqdIPNtkXzfTDsRyvyR314YwSrXPX 9baA== X-Gm-Message-State: AC+VfDzhgAEx2gU0ZEvu05Broth31MYG2U3vQqt70orYUhGe9NeO1OwO Ot8HScJys3/QO/fSlnEKi460mQ== X-Google-Smtp-Source: ACHHUZ7j66atIuz7y2XFA9yFf3j6UHlYN9jpXXs6+CGQINjTXsENRbzXk4RZKFVIqU3nYmbP8YIUTQ== X-Received: by 2002:adf:f245:0:b0:306:2d28:d556 with SMTP id b5-20020adff245000000b003062d28d556mr20831036wrp.34.1684157816952; Mon, 15 May 2023 06:36:56 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:56 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com Subject: [PATCH v8 09/11] arm64: dts: qcom: qrb5165-rb5: Switch on basic TCPM Date: Mon, 15 May 2023 14:36:41 +0100 Message-Id: <20230515133643.3621656-10-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Switch on TCPM for the RB5. Here we declare as a source only not a sink since qrb5165 doesn't support powering exclusively from the type-c port. Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index b326bdeeb7742..d80a22bff7969 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -9,6 +9,7 @@ #include #include #include +#include #include "sm8250.dtsi" #include "pm8150.dtsi" #include "pm8150b.dtsi" @@ -1344,3 +1345,22 @@ &pm8150b_vbus { regulator-max-microamp = <3000000>; status = "okay"; }; + +&pm8150b_typec { + status = "okay"; + + vdd-pdphy-supply = <&vreg_l2a_3p1>; + + connector { + compatible = "usb-c-connector"; + + power-role = "source"; + data-role = "dual"; + self-powered; + + source-pdos = ; + }; +}; From patchwork Mon May 15 13:36:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241503 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 14228C7EE2C for ; Mon, 15 May 2023 13:37:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242375AbjEONhG (ORCPT ); Mon, 15 May 2023 09:37:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241672AbjEONhD (ORCPT ); Mon, 15 May 2023 09:37:03 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEA5B1FE2 for ; Mon, 15 May 2023 06:36:59 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3f4c6c4b425so36862035e9.2 for ; Mon, 15 May 2023 06:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157818; x=1686749818; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QxfuaO1huHKQXCMzo1kIjQt/GPBP6/klFwtWCLW8SEc=; b=MTD7QY5BXtqdHafZQzpFSQ8HhNmH9JGr/TaH1E/691Dh1tgBbwTTL3ADatt+98jq5y l1uY8IkQEvyJ0vrRENEse3bm3LynqtvjoUY0749ktP2z2tA7fVqQzybCW1so5fcDbxfb gNg/5+nTjfb/XOPROTBVoSqN5uCuShj4n4VGwJ3pEGB/iBR4r2V4melxIdgzxSfLtiiW 3I7aU3htP7NQCVqKToSKO+rWm5kK9awBcTS3vLX5kmNiv06UuelFuHD7ZiCBEARxBeC5 wlCD/6rQhxUTf0zG257NbsRDUorjdcCfhCjvMbU83iplBfD80AAISpEGaOaLTHBpGR4z QLeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157818; x=1686749818; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QxfuaO1huHKQXCMzo1kIjQt/GPBP6/klFwtWCLW8SEc=; b=DfjGgpdJxx1htTFm72UXswWTOvz+BuG3d8w8hmpYs1kJDsxW58ik4r/ceZq4PEv9wB HYID8FQ0G5bl/7pddjypyDGj8bhjERREd6dAHigYozN9IJCBWzO9gxeLQiCxjnM9ZZi0 XjyJsUD0FV9ZTiwdOJODM7ZOZJDJnU4pwHbMsck5cL5PDUwZM+MEaMAob9TbGafvgev0 svRlXGmVovX7mznLs0Bx5saF4GlvSogOQwkrkXTZwIWJ1ZLakWZXc+l1pjVYsQ92AFaA Y5loGuyu9Al552eCjQrZk1Kh0jJeEGVHmjNtbFotoC3HIFPbSTbBpiLR6tDwuAEaUkmk sCdQ== X-Gm-Message-State: AC+VfDzrJMj66F+MI8zb4LzN7b/1pdfdK6YV3GbvAJJBqoqFLci6DoJJ qiv0Nt2i43S5y/PUugUI4MKsRg== X-Google-Smtp-Source: ACHHUZ6dQ62N4rb6QjZWzK9ObMS6DlOjeGndmXHT4R51yNPY8lJA2vD6CH3syFqHE0J0CjXw+8suiw== X-Received: by 2002:a05:6000:48:b0:307:7c2d:dc79 with SMTP id k8-20020a056000004800b003077c2ddc79mr23247671wrx.16.1684157818252; Mon, 15 May 2023 06:36:58 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:57 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com Subject: [PATCH v8 10/11] arm64: dts: qcom: qrb5165-rb5: Switch on TCPM usb-role-switching for usb_1 Date: Mon, 15 May 2023 14:36:42 +0100 Message-Id: <20230515133643.3621656-11-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Switch on usb-role-switching for usb_1 via TCPM. We need to declare usb-role-switch in &usb_1 and associate with the remote-endpoint in TCPM which provides the necessary signal. Signed-off-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 19 ++++++++++++++++++- arch/arm64/boot/dts/qcom/sm8250.dtsi | 4 ++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index d80a22bff7969..580ed63c6fb54 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -1273,7 +1273,12 @@ &usb_1 { }; &usb_1_dwc3 { - dr_mode = "peripheral"; + dr_mode = "otg"; + usb-role-switch; +}; + +&usb_1_dwc3_role_switch_in { + remote-endpoint = <&pm8150b_role_switch_out>; }; &usb_1_hsphy { @@ -1362,5 +1367,17 @@ connector { PDO_FIXED_DUAL_ROLE | PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + pm8150b_role_switch_out: endpoint { + remote-endpoint = <&usb_1_dwc3_role_switch_in>; + }; + }; + }; }; }; diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 0bc7486e59e54..b9f55a9ef89f8 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3740,6 +3740,10 @@ usb_1_dwc3: usb@a600000 { snps,dis_enblslpm_quirk; phys = <&usb_1_hsphy>, <&usb_1_ssphy>; phy-names = "usb2-phy", "usb3-phy"; + + port { + usb_1_dwc3_role_switch_in: endpoint {}; + }; }; }; From patchwork Mon May 15 13:36:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 13241504 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 A2E06C77B7D for ; Mon, 15 May 2023 13:37:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242399AbjEONhK (ORCPT ); Mon, 15 May 2023 09:37:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242079AbjEONhI (ORCPT ); Mon, 15 May 2023 09:37:08 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9F2A270A for ; Mon, 15 May 2023 06:37:01 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f4c6c4b51eso57179305e9.2 for ; Mon, 15 May 2023 06:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684157819; x=1686749819; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3aLrbkfYK1T8L/pww+3+UJGfuSXtltlajZdwftVgkQc=; b=BnikwaqXfHdIuZS2cIM3Om/ecj6nLAfiOLyEaauLoE4A6R/CXRLwvoJn+JXPkhx/lG O/CRhu3bjLTFRqvYSMq2/4yMO1PAzsa19HbWWvnKvl0MJ3agppjqtc16K8JaaCgC+5K2 Avq5L6zan2cr3EMNBkNMDrRcX/aBlsd/ZbJCqpk7rspDZFfdphu59pu70/lrevRLPmA0 bGb90myeoure8/AvcT+MXbh+rGt4Y1EQnRD3YYu/Qvz7j1k30TxggQq1UihaQ/d8zKRh 1g6jdD3yJTjM64QG0UfRKud4TYLIqi8c6y7Qh9tHEHndUqfLyCFt2iGSwlNoesKTEMPs PHag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684157819; x=1686749819; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3aLrbkfYK1T8L/pww+3+UJGfuSXtltlajZdwftVgkQc=; b=GW2Lfs60DKbFO8VAE5Zj0mwt85OLfOJmYV0Oe1Q+XpmQhto8b8UvOXy1jru50xwj2r HCb1quXFNMybjxpXXFR6+siQvXH3awowLS1Yvnfw8+VZM3I+8iw8NFg3nZ25yBFNPxxk U7oU7w38Qo3J7LVIpfV3fE+j/nf4/Wr+EGMU6JX1ygI7G5LkSHa3aDmG2RXmOS40CQ4F eY8y0XqL1ObLateD8vcJl7D5wDKIe51x4RsE2Yqz8hQr08yIbcKcpcnyyNVLzsAhvNV7 mIqjD2IV5WwnHSkIa0ak0Xyt6rohMxc5rW7ryFGmJgSXog3jSA8ie3b9wJd2YwQe9FOC GJKw== X-Gm-Message-State: AC+VfDxuCZHvAFIHrVPzs9XE2ivGbvpcbUeN0Y1/BLXzo6Q5Cwj4l4U1 tDp1XhoGF7Mu3F04qMykM55D3wlYS0DAySGGr4eTpw== X-Google-Smtp-Source: ACHHUZ7oRl/buvDQZ+RQ5GbsstJk9HNPMo1h33o5zQFneFBK+k3QHszvPczoryrclzRYZrEDhnxfWw== X-Received: by 2002:a1c:f703:0:b0:3f1:979f:a733 with SMTP id v3-20020a1cf703000000b003f1979fa733mr25294002wmh.31.1684157819440; Mon, 15 May 2023 06:36:59 -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 o17-20020a5d4091000000b003078a3f3a24sm28856634wrp.114.2023.05.15.06.36.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 06:36:59 -0700 (PDT) From: Bryan O'Donoghue To: linux@roeck-us.net, heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, andersson@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, luca.weiss@fairphone.com, lujianhua000@gmail.com, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Cc: konrad.dybcio@linaro.org, caleb.connolly@linaro.org, bryan.odonoghue@linaro.org, subbaram@quicinc.com, jackp@quicinc.com, robertom@qti.qualcomm.com Subject: [PATCH v8 11/11] arm64: dts: qcom: qrb5165-rb5: Switch on TCPM orientation-switch for usb_1_qmpphy Date: Mon, 15 May 2023 14:36:43 +0100 Message-Id: <20230515133643.3621656-12-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> References: <20230515133643.3621656-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Switch on USB orientation-switching for usb_1_qmp via TCPM. Detecting the orientation switch is required to get the PHY to reset and bring-up the PHY with the CC lines set to the appropriate lane. Signed-off-by: Bryan O'Donoghue --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 11 +++++++++++ arch/arm64/boot/dts/qcom/sm8250.dtsi | 1 + 2 files changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index 580ed63c6fb54..9b314c390e3f8 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -1294,6 +1294,11 @@ &usb_1_qmpphy { vdda-phy-supply = <&vreg_l9a_1p2>; vdda-pll-supply = <&vreg_l18a_0p92>; + orientation-switch; +}; + +&usb_1_qmpphy_typec_mux_in { + remote-endpoint = <&pm8150b_typec_mux_out>; }; &usb_2 { @@ -1378,6 +1383,12 @@ pm8150b_role_switch_out: endpoint { remote-endpoint = <&usb_1_dwc3_role_switch_in>; }; }; + port@1 { + reg = <1>; + pm8150b_typec_mux_out: endpoint { + remote-endpoint = <&usb_1_qmpphy_typec_mux_in>; + }; + }; }; }; }; diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index b9f55a9ef89f8..f538216f3704f 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -3588,6 +3588,7 @@ ports { port@0 { reg = <0>; + usb_1_qmpphy_typec_mux_in: endpoint {}; }; port@1 {