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: 682342 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: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: 682341 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: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: 682340 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: 682339 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 --- 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: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: 682338 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: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: 682337 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 {