From patchwork Tue May 16 15:05:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 682509 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 5644CC77B7A for ; Tue, 16 May 2023 15:05:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233884AbjEPPFb (ORCPT ); Tue, 16 May 2023 11:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233644AbjEPPF2 (ORCPT ); Tue, 16 May 2023 11:05:28 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B97C7DBB for ; Tue, 16 May 2023 08:05:27 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-643846c006fso15017704b3a.0 for ; Tue, 16 May 2023 08:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684249526; x=1686841526; 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=sjHMnsxahLP9yaokDtSj6QqIcp96rWhNrr3eynjkYjU=; b=oDg0quMXbstLndxzIr4R73KeDkmPK+Nut3+U6e1GMQVhBfPyElZNO27X1QeJ/5U8Ri +o226ukrdcDjkYHr60zi36lReTPAsdGOyGDHoA5NanPSl8+zwLHs0rmORJnXYXYvI3W8 fd7AFNH/7JjmGt+UrY9HNwgjGNoUIGEy/8GgGMjhPEey4Sza9d5GcZEbJVLDusjKDTUk nJExlKgb2lXx19b98O3yNFTC4N5LOuTPeJYuKejQUZcfNVEmjTnm6/vq3i2Hun/3IROT 48zEk4an5B7A/yU2N1qPP+NxOkgoeacgOmFP56pZRthRBlOSQalOHuPFjVqqY553sWT1 Wi0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684249526; x=1686841526; 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=sjHMnsxahLP9yaokDtSj6QqIcp96rWhNrr3eynjkYjU=; b=fT6cOGTd4N38VpgizxHbl7nh5xh6HtjVJfjoEL5fZTT49IAVlZxzPsmjKa+G/B+VoW u13l45su3QVam4TWqQVjsK5bf9tpx848tPGskVl3F7B8HbKcgXKDDaW5f+DIzggGpHh4 Ei6gRaTJeMLHeJNZ3SbKIupFMR4NDA/AhNCOhKc7csAyc1N0ebmXPbOJ1BmOPdthh4WU CSByGYnAUG1IgqeA1oIjNRZF/XoLRPTqcN5EeIAzAermFlZN2jOKbwsW1IBBXcx1uUuJ t5yao/9WswkxnHUiomZqk25ybcErBfVZMMGFpfmmU38ieiiogJ076rVcugUjMHKwEtgu sygQ== X-Gm-Message-State: AC+VfDw/0TP7JivbAxB9AgmPzIzSC8I0iJskDezp+D+NVIrEKRzCASNy HrDUQsdqjHmZunWK+AFRwmhMcOH2Jiu2jYkH0eI= X-Google-Smtp-Source: ACHHUZ4qi+mjNa1yfbbfSHhmCjq8vhed5TGOVF912TIsamI/byJiRWtrvXqrvWMy4uuIbwOZvSXH+Q== X-Received: by 2002:a05:6a20:440d:b0:107:1f22:10d2 with SMTP id ce13-20020a056a20440d00b001071f2210d2mr1644516pzb.20.1684249525828; Tue, 16 May 2023 08:05:25 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1c60:6bed:72cf:f5c9:ba94:6b85]) by smtp.gmail.com with ESMTPSA id h1-20020a654801000000b005302682a668sm12817164pgs.17.2023.05.16.08.05.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 08:05:25 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org Cc: agross@kernel.org, linux-kernel@vger.kernel.org, andersson@kernel.org, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, krzysztof.kozlowski@linaro.org, robh+dt@kernel.org, konrad.dybcio@linaro.org, kishon@kernel.org, vkoul@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmitry.baryshkov@linaro.org Subject: [PATCH v11 1/4] dt-bindings: phy: qcom, qmp-usb: Drop legacy bindings and move to newer one (SM6115 & QCM2290) Date: Tue, 16 May 2023 20:35:08 +0530 Message-Id: <20230516150511.2346357-2-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230516150511.2346357-1-bhupesh.sharma@linaro.org> References: <20230516150511.2346357-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 'qcom,msm8996-qmp-usb3-phy.yaml' defines bindings for several PHYs which predate USB -> USB+DP migration. Since SM6115 and QCM2290 nodes for USB QMP phy are being added to dtsi files by followup patches, move these bindings instead to the newer style 'qcom,sc8280xp-qmp-usb3-uni-phy.yaml' file. Since no device trees use these bindings presently, so we have no ABI breakages with this patch. Signed-off-by: Bhupesh Sharma --- .../phy/qcom,msm8996-qmp-usb3-phy.yaml | 27 ------------- .../phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 38 +++++++++++++++++++ 2 files changed, 38 insertions(+), 27 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml index e81a38281f8c..4c96dab5b9e3 100644 --- a/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,msm8996-qmp-usb3-phy.yaml @@ -23,14 +23,12 @@ properties: - qcom,ipq8074-qmp-usb3-phy - qcom,msm8996-qmp-usb3-phy - qcom,msm8998-qmp-usb3-phy - - qcom,qcm2290-qmp-usb3-phy - qcom,sc7180-qmp-usb3-phy - qcom,sc8180x-qmp-usb3-phy - qcom,sdm845-qmp-usb3-phy - qcom,sdm845-qmp-usb3-uni-phy - qcom,sdx55-qmp-usb3-uni-phy - qcom,sdx65-qmp-usb3-uni-phy - - qcom,sm6115-qmp-usb3-phy - qcom,sm8150-qmp-usb3-phy - qcom,sm8150-qmp-usb3-uni-phy - qcom,sm8250-qmp-usb3-phy @@ -248,29 +246,6 @@ allOf: - const: phy - const: common - - if: - properties: - compatible: - contains: - enum: - - qcom,qcm2290-qmp-usb3-phy - - qcom,sm6115-qmp-usb3-phy - then: - properties: - clocks: - maxItems: 3 - clock-names: - items: - - const: cfg_ahb - - const: ref - - const: com_aux - resets: - maxItems: 2 - reset-names: - items: - - const: phy_phy - - const: phy - - if: properties: compatible: @@ -318,12 +293,10 @@ allOf: enum: - qcom,ipq6018-qmp-usb3-phy - qcom,ipq8074-qmp-usb3-phy - - qcom,qcm2290-qmp-usb3-phy - qcom,sc7180-qmp-usb3-phy - qcom,sc8180x-qmp-usb3-phy - qcom,sdx55-qmp-usb3-uni-phy - qcom,sdx65-qmp-usb3-uni-phy - - qcom,sm6115-qmp-usb3-phy - qcom,sm8150-qmp-usb3-uni-phy - qcom,sm8250-qmp-usb3-phy then: diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml index a272c4033652..2c3e2ede6671 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml @@ -17,8 +17,10 @@ properties: compatible: enum: - qcom,ipq9574-qmp-usb3-phy + - qcom,qcm2290-qmp-usb3-phy - qcom,sa8775p-qmp-usb3-uni-phy - qcom,sc8280xp-qmp-usb3-uni-phy + - qcom,sm6115-qmp-usb3-phy reg: maxItems: 1 @@ -104,6 +106,42 @@ allOf: additionalProperties: false +allOf: + - if: + properties: + compatible: + contains: + enum: + - qcom,qcm2290-qmp-usb3-phy + - qcom,sm6115-qmp-usb3-phy + then: + properties: + clocks: + maxItems: 4 + clock-names: + items: + - const: cfg_ahb + - const: ref + - const: com_aux + - const: pipe + + - if: + properties: + compatible: + contains: + enum: + - qcom,sc8280xp-qmp-usb3-uni-phy + then: + properties: + clocks: + maxItems: 4 + clock-names: + items: + - const: aux + - const: ref + - const: com_aux + - const: pipe + examples: - | #include From patchwork Tue May 16 15:05:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 683068 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 4BD58C77B7A for ; Tue, 16 May 2023 15:05:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233778AbjEPPFf (ORCPT ); Tue, 16 May 2023 11:05:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233692AbjEPPFd (ORCPT ); Tue, 16 May 2023 11:05:33 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6E5F61AE for ; Tue, 16 May 2023 08:05:31 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-643912bca6fso11196449b3a.0 for ; Tue, 16 May 2023 08:05:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684249531; x=1686841531; 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=4Tk69piEZehakfGwQkU6K1Gxhofm6gj5FoUxxJ+kPXY=; b=bP3GrpcPfjNBk7Qsk/LbSdl3l/3ZxuLchlMgUJGN0o4YXwndKpmIZojFY/CTUtDIGR xb73/AHdtg1ajXvnzRe5ZNRb6FNWreWIGWep2+lkHSuaGhGYTHwNrFUof9yauxP5aicx Bdvrut7O1relZSspFc3SDu7H/7Mn8gP9F76jPwsnCQihwiZzECCCtfz9IFp9dcfZJLw6 LPFWL5jIRIjyHejoCJNNoMuVcGCqlTQz4zAPVM69CwEp790iPNA/LYfmaOTCOKNzW3Mx QvHJyuY18IYtAP4er4A+CjpHwwlo5kDQRWqUEPIyklhH4n1khUM8F6d0BxZssRZiYF2Q xISg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684249531; x=1686841531; 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=4Tk69piEZehakfGwQkU6K1Gxhofm6gj5FoUxxJ+kPXY=; b=coMbZj4p0vMR5Rh8pEgJB7bfOMN/7uccyqxdwrygRmXV3ZGGbpoXRjSvpOa1/pZxSC EEzGkzlDS02XA/kMvF0HixfHvRWdwvOdXUv7u8EdaGvx5blnaP/YAwdHDKENzADET3+s 8G+LFdpRCSTZpFCjXVDbsKCSjeLYfhe4PM0PRXmIrqIfJg6GQtI4Rvh9sfLW1zOZI9ho oOy+HHf2VXjQF35KXFdeozhxFT1UizfX11p+4aZ030DAp2ZcYBqzpFK/OTgEcADX8Vi2 6vcu1SFMvdtfVoUx2YkdN1f8Rpc6KTBE/QCYz+sZFJDH2f2YVD6fA8vGdAWL0HPpqENO 9nuw== X-Gm-Message-State: AC+VfDwgRrG57N9xSWzbRCdujPZcftnqRVxru3g6YiZU6OVmn8V0CXH1 Sr7XT84OkrBJITccVL3wQqwkDNoTdEjp++aM2+A= X-Google-Smtp-Source: ACHHUZ5Uo07ip94m8A4F6ZiYgZqe5DrESlk+jSBowuJvRUz6YM5eMTJ06NNsVaIeITxG0EDxXWeimA== X-Received: by 2002:a05:6a00:2e1b:b0:63d:6744:8caf with SMTP id fc27-20020a056a002e1b00b0063d67448cafmr44506593pfb.26.1684249530715; Tue, 16 May 2023 08:05:30 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1c60:6bed:72cf:f5c9:ba94:6b85]) by smtp.gmail.com with ESMTPSA id h1-20020a654801000000b005302682a668sm12817164pgs.17.2023.05.16.08.05.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 08:05:30 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org Cc: agross@kernel.org, linux-kernel@vger.kernel.org, andersson@kernel.org, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, krzysztof.kozlowski@linaro.org, robh+dt@kernel.org, konrad.dybcio@linaro.org, kishon@kernel.org, vkoul@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmitry.baryshkov@linaro.org Subject: [PATCH v11 2/4] phy: qcom-qmp-usb: add support for updated qcm2290 / sm6115 binding Date: Tue, 16 May 2023 20:35:09 +0530 Message-Id: <20230516150511.2346357-3-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230516150511.2346357-1-bhupesh.sharma@linaro.org> References: <20230516150511.2346357-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add support for the new qcm2290 / sm6115 binding. The USB QMP phy on these devices supports 2 lanes. Note that the binding now does not describe every register subregion and instead the driver holds the corresponding offsets. While at it also include support for PCS_MISC region which was left out earlier. Signed-off-by: Bhupesh Sharma --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 6f2798bbe513..466f0a56c82e 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1513,9 +1513,13 @@ static const struct qmp_phy_init_tbl sa8775p_usb3_uniphy_pcs_tbl[] = { struct qmp_usb_offsets { u16 serdes; u16 pcs; + u16 pcs_misc; u16 pcs_usb; u16 tx; u16 rx; + /* for PHYs with >= 2 lanes */ + u16 tx2; + u16 rx2; }; /* struct qmp_phy_cfg - per-PHY initialization config */ @@ -1668,6 +1672,16 @@ static const struct qmp_usb_offsets qmp_usb_offsets_ipq9574 = { .rx = 0x400, }; +static const struct qmp_usb_offsets qmp_usb_offsets_v3 = { + .serdes = 0, + .pcs = 0xc00, + .pcs_misc = 0xa00, + .tx = 0x200, + .rx = 0x400, + .tx2 = 0x600, + .rx2 = 0x800, +}; + static const struct qmp_usb_offsets qmp_usb_offsets_v5 = { .serdes = 0, .pcs = 0x0200, @@ -2076,6 +2090,8 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = { static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = { .lanes = 2, + .offsets = &qmp_usb_offsets_v3, + .serdes_tbl = qcm2290_usb3_serdes_tbl, .serdes_tbl_num = ARRAY_SIZE(qcm2290_usb3_serdes_tbl), .tx_tbl = qcm2290_usb3_tx_tbl, @@ -2647,10 +2663,16 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp) qmp->serdes = base + offs->serdes; qmp->pcs = base + offs->pcs; + qmp->pcs_misc = base + offs->pcs_misc; qmp->pcs_usb = base + offs->pcs_usb; qmp->tx = base + offs->tx; qmp->rx = base + offs->rx; + if (cfg->lanes >= 2) { + qmp->tx2 = base + offs->tx2; + qmp->rx2 = base + offs->rx2; + } + qmp->pipe_clk = devm_clk_get(dev, "pipe"); if (IS_ERR(qmp->pipe_clk)) { return dev_err_probe(dev, PTR_ERR(qmp->pipe_clk), From patchwork Tue May 16 15:05:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 682508 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 47691C7EE25 for ; Tue, 16 May 2023 15:05:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234019AbjEPPFq (ORCPT ); Tue, 16 May 2023 11:05:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233900AbjEPPFm (ORCPT ); Tue, 16 May 2023 11:05:42 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA1577EF9 for ; Tue, 16 May 2023 08:05:36 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-64a9335a8e7so6328149b3a.0 for ; Tue, 16 May 2023 08:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684249535; x=1686841535; 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=edN7qaIOGdbnADlJ0Za45tNBUjQcf3QWA/Qw0dQ45yM=; b=ql3mc7iWO7HzYCFrBJTqMA0qrLzxTjB+1EL5xeFyf0b/R2S4q4du08BTr2yB112wXo 3AWxoyI2hSqzsOhwh0k99ZCBqHq321WPwN8PvRmclrHaUkiEnyQeRlc89X02YlaUE2fF NmOAwlQEh+W5+vSth2TwBiBY7lpX12rGGmoQrCi3cLN2KwyeRFWbzzhu9Hp5nJEeKL0G qRtMQg/jkqevVxvTDpVpInpWRjnlA9gHaPe/zD93Zd6TqrFvAdsBTjEP6mhkTi+Q7nWP PCIN6WZWaUBB2SsRbZGrx404aAUR+t9ASXA/epk6321278a2TMSSNaorOK9u1DB9PTDD tyMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684249535; x=1686841535; 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=edN7qaIOGdbnADlJ0Za45tNBUjQcf3QWA/Qw0dQ45yM=; b=FBcOVeFP2qNVT1A2EqS9WZvXGE/soJHQLO3j9PRER2xtp6ARY/7KM/OumdoIOkl6hC 94s7D2AS9f4Ayn5IRkxUg+wfG4mz1NSC+xMLWxYlL2jqWUSV39+jA2asmazdOdHd5NzX zOlj9+6JePsPxL8RB1tvwoZtHaK+93wY+pIgF3jyEEvog5Ax+zMf4q+FMobbI3Xgk4Qy E/f06s18pPCSRO7yb/bkaMuqxBmSaCpoe8McVeMKfEWfiQeOeTbkX5PB7gt7qUDV+MTg yhzZwsUrA5Auzfhn75LE1y4pUj9UjNdtWRdRNIXlsorNxzChSRFyn5fD2zAinoPcREey metQ== X-Gm-Message-State: AC+VfDxtQpYI8sH4Id64g1I+HzBJRVosexVKIPqnZe149C0naYxUI2yG vcefs3iQSdWIqDr85QlTbR4qGrESeMA8idjFEPk= X-Google-Smtp-Source: ACHHUZ6ZKoPafL80L0bWiLtvPaKnmUG8APSA7qi0BQL2BwGpbFrEcLoGLzFOYLZpzzk1K9noOEXi4g== X-Received: by 2002:a05:6a20:6a29:b0:ff:df0d:a6fb with SMTP id p41-20020a056a206a2900b000ffdf0da6fbmr32721597pzk.28.1684249535552; Tue, 16 May 2023 08:05:35 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1c60:6bed:72cf:f5c9:ba94:6b85]) by smtp.gmail.com with ESMTPSA id h1-20020a654801000000b005302682a668sm12817164pgs.17.2023.05.16.08.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 08:05:35 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org Cc: agross@kernel.org, linux-kernel@vger.kernel.org, andersson@kernel.org, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, krzysztof.kozlowski@linaro.org, robh+dt@kernel.org, konrad.dybcio@linaro.org, kishon@kernel.org, vkoul@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmitry.baryshkov@linaro.org Subject: [PATCH v11 3/4] arm64: dts: qcom: sm6115: Add USB SS qmp phy node Date: Tue, 16 May 2023 20:35:10 +0530 Message-Id: <20230516150511.2346357-4-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230516150511.2346357-1-bhupesh.sharma@linaro.org> References: <20230516150511.2346357-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add USB superspeed qmp phy node to dtsi. Make sure that the various board dts files (which include sm4250.dtsi file) continue to work as intended. Reviewed-by: Dmitry Baryshkov Signed-off-by: Bhupesh Sharma --- .../boot/dts/qcom/sm4250-oneplus-billie2.dts | 3 ++ arch/arm64/boot/dts/qcom/sm6115.dtsi | 29 +++++++++++++++++-- .../boot/dts/qcom/sm6115p-lenovo-j606f.dts | 3 ++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts b/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts index a1f0622db5a0..75951fd439df 100644 --- a/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts +++ b/arch/arm64/boot/dts/qcom/sm4250-oneplus-billie2.dts @@ -242,6 +242,9 @@ &usb { &usb_dwc3 { maximum-speed = "high-speed"; dr_mode = "peripheral"; + + phys = <&usb_hsphy>; + phy-names = "usb2-phy"; }; &usb_hsphy { diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index 631ca327e064..f67863561f3f 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -661,6 +661,31 @@ usb_hsphy: phy@1613000 { status = "disabled"; }; + usb_qmpphy: phy@1615000 { + compatible = "qcom,sm6115-qmp-usb3-phy"; + reg = <0x0 0x01615000 0x0 0x1000>; + + clocks = <&gcc GCC_AHB2PHY_USB_CLK>, + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, + <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; + clock-names = "cfg_ahb", + "ref", + "com_aux", + "pipe"; + + resets = <&gcc GCC_USB3_PHY_PRIM_SP0_BCR>, + <&gcc GCC_USB3PHY_PHY_PRIM_SP0_BCR>; + reset-names = "phy", "phy_phy"; + + #clock-cells = <0>; + clock-output-names = "usb3_phy_pipe_clk_src"; + + #phy-cells = <0>; + + status = "disabled"; + }; + qfprom@1b40000 { compatible = "qcom,sm6115-qfprom", "qcom,qfprom"; reg = <0x0 0x01b40000 0x0 0x7000>; @@ -1111,8 +1136,8 @@ usb_dwc3: usb@4e00000 { compatible = "snps,dwc3"; reg = <0x0 0x04e00000 0x0 0xcd00>; interrupts = ; - phys = <&usb_hsphy>; - phy-names = "usb2-phy"; + phys = <&usb_hsphy>, <&usb_qmpphy>; + phy-names = "usb2-phy", "usb3-phy"; iommus = <&apps_smmu 0x120 0x0>; snps,dis_u2_susphy_quirk; snps,dis_enblslpm_quirk; diff --git a/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts b/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts index ea3340d31110..81fdcaf48926 100644 --- a/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts +++ b/arch/arm64/boot/dts/qcom/sm6115p-lenovo-j606f.dts @@ -306,6 +306,9 @@ &usb { &usb_dwc3 { maximum-speed = "high-speed"; dr_mode = "peripheral"; + + phys = <&usb_hsphy>; + phy-names = "usb2-phy"; }; &usb_hsphy { From patchwork Tue May 16 15:05:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 683067 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 C50CCC77B7A for ; Tue, 16 May 2023 15:06:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233921AbjEPPGD (ORCPT ); Tue, 16 May 2023 11:06:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233935AbjEPPF7 (ORCPT ); Tue, 16 May 2023 11:05:59 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9873A83D1 for ; Tue, 16 May 2023 08:05:41 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-24e3a0aa408so12120617a91.1 for ; Tue, 16 May 2023 08:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684249540; x=1686841540; 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=P5pQrJTTCZJZZKPmjIiq+X+xkUImdFCCiZ3e7a6lOiY=; b=oxlwFFM7VIT+474vSuBUObLQisjQgPiVCBd3d1Lc8P7hsUaQufiN6YBpCF59zh1OPC eXm21kGgGlB6gDcfen1BgHo4X6ZRXPdRicMufbqPvp+/aR4uNB95YWVLj8jDGN3NmHE4 FVQgQF7bt2BjVTHy+SFlTR58SXkA5iSb+eGXPfw5ADeQoDTHL9wms1BpebNMRi5tyRAK cvLdaf5rYYEjOKEOoC5snAdDCmLpF1/1H+iEJdV/QoxBD2F3vpoJzS+1BGK4b36zzfxO yEHquA3Ii5AtonZKrBpP9Wvi2qEsGKO8Tg1nWMFlLT0hy34Xv77+3s5md4vnbejWic7d P6ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684249540; x=1686841540; 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=P5pQrJTTCZJZZKPmjIiq+X+xkUImdFCCiZ3e7a6lOiY=; b=jkbIAE+nG0X5gDo5XxND21YPv/srTKt0XtFMbF5vvwSMiZY3Rl+UP0G764qVCzctG7 vJvrP07hUTo8aW11MOt1YVhCir8xeWaVukhLHmqI7KDE3GFITF3V9O4I9Cm36qj4jYU9 ecj46nd0DVKqJtfH5GBAt9+RYd3FNcWFZJ1LoEU2tVnkEe7SNkqKlB8fbwL9DL8dnwCA IV/Ydyr5aV7lKLjPlYURCUF68fT5B7yaLQto87aqZLxmKJj4wa1Ff4iukgFYaHJx2Nnp pl3jYVJFH5ACvxAXN5XYtETGxRma3S+hk4kULx3hWJKtg91KTbnBQt/ZVWpJBlz8n08k 3yyg== X-Gm-Message-State: AC+VfDyHVikyIaXC3GUBUNoO108rkTUEdTmfet5FTkSyJVgTQFmjWnij /2uR56PhLMv67wIL+0kAB2OmWs2M1KibutVTDxE= X-Google-Smtp-Source: ACHHUZ5sKmRFAHk2jFlMiCRrqV1LTt9359wEdaXN6/H3PTTMT3eTGunY7ExJe3vYW5BPMebYidx0fw== X-Received: by 2002:a17:90a:9307:b0:24d:ef6a:dd0a with SMTP id p7-20020a17090a930700b0024def6add0amr35974432pjo.5.1684249540547; Tue, 16 May 2023 08:05:40 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1c60:6bed:72cf:f5c9:ba94:6b85]) by smtp.gmail.com with ESMTPSA id h1-20020a654801000000b005302682a668sm12817164pgs.17.2023.05.16.08.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 May 2023 08:05:40 -0700 (PDT) From: Bhupesh Sharma To: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org Cc: agross@kernel.org, linux-kernel@vger.kernel.org, andersson@kernel.org, bhupesh.sharma@linaro.org, bhupesh.linux@gmail.com, krzysztof.kozlowski@linaro.org, robh+dt@kernel.org, konrad.dybcio@linaro.org, kishon@kernel.org, vkoul@kernel.org, krzysztof.kozlowski+dt@linaro.org, dmitry.baryshkov@linaro.org Subject: [PATCH v11 4/4] arm64: dts: qcom: qrb4210-rb2: Enable USB node Date: Tue, 16 May 2023 20:35:11 +0530 Message-Id: <20230516150511.2346357-5-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230516150511.2346357-1-bhupesh.sharma@linaro.org> References: <20230516150511.2346357-1-bhupesh.sharma@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Enable the USB controller and HS/SS PHYs on qrb4210-rb2 board. Reviewed-by: Dmitry Baryshkov Signed-off-by: Bhupesh Sharma --- arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts index dc80f0bca767..eae3024ce003 100644 --- a/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +++ b/arch/arm64/boot/dts/qcom/qrb4210-rb2.dts @@ -222,6 +222,30 @@ &uart4 { status = "okay"; }; +&usb { + status = "okay"; +}; + +&usb_dwc3 { + maximum-speed = "super-speed"; + dr_mode = "peripheral"; +}; + +&usb_hsphy { + vdd-supply = <&vreg_l4a_0p9>; + vdda-pll-supply = <&vreg_l12a_1p8>; + vdda-phy-dpdm-supply = <&vreg_l15a_3p128>; + + status = "okay"; +}; + +&usb_qmpphy { + vdda-phy-supply = <&vreg_l4a_0p9>; + vdda-pll-supply = <&vreg_l12a_1p8>; + + status = "okay"; +}; + &xo_board { clock-frequency = <19200000>; };