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: 683641 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 6942DC77B75 for ; Tue, 16 May 2023 15:05:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233544AbjEPPFb (ORCPT ); Tue, 16 May 2023 11:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233570AbjEPPF2 (ORCPT ); Tue, 16 May 2023 11:05:28 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97D6676AE for ; Tue, 16 May 2023 08:05:26 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-5304913530fso7775745a12.0 for ; Tue, 16 May 2023 08:05:26 -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=knI+7MawmwZ4ln81POjr37+lhLuprS5D1CfG1FvcxaIoQFnWPUiu/M4AWOaZ/tAgUy C0Z1166y6BkKS9kRQK3OjBhUVTiiDw/S9DmwN/3qG9yb64QNI4SyC/JejqL+/5fKJMXw fg4Fq1oHOuX0om1inuRR8oe+0ezi/0RmsW8c/2ighA8Xkg9JU5X2EUCDxlxHPUpi6PGL Rql8tAWFuFHDDx2yzsDAyQhT3SXTS0vAzWr8wz/KVV9GjqCfDs1EPZDJedvfcbkF1GUJ i94hClpKPfe5zjIjmUXe3PjZCRSrDZKdpOuqnUxEJTftD4zJ2IjpEbZ4CYqS0YqaQmnH 3bDQ== X-Gm-Message-State: AC+VfDxfW+S/axbRqZOkLJovIfIzk5zLM5Wqk5jNIIiYY/iDoXzZ2Wbt DocumprqHvRlq5pWD9/NkbNx2g== 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: devicetree@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: 682691 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 C3E02C77B75 for ; Tue, 16 May 2023 15:05:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233481AbjEPPFe (ORCPT ); Tue, 16 May 2023 11:05:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233731AbjEPPFd (ORCPT ); Tue, 16 May 2023 11:05:33 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43A977A9B for ; Tue, 16 May 2023 08:05:31 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-643a1656b79so10274208b3a.3 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=fwDNjTNRyciKgLFkVDmhP5ZLGxBvZxLNIXsG17g+qdfrhf/jb1944LEtQq73VP7CX4 8zUEBBkQMybN0o9BVOw/y9qwNTus454Ak8OCdIGnRIU5jFWT3Ftsl/Amzl3GFnq3+2Nf BlU+IJqvYpDz3+RjsCJfh4rBZYFrw92yAV2Hw55pDVXIGq1uvqWqMFwIvgU6EeyLOsWE O+rclZw9xiUD57k3Vk7QHjrMjV4d5qBq6Ih7PMh0Rr+u4IG2x/PnCFLQ0bGucvLG/vfa jx9MMOgeaJ+ko8He0a0s0q8jWDskBKS8pKHx6e6VV1Mfzt/hF/ZwFvhQEN1nr/hz7ChG S2mA== X-Gm-Message-State: AC+VfDzmzA7xAaeJzmuP+BOeSeM5aKe4EGGfvL2hnlR5+lQQJ0NGFU7v CnWHbDBtMhp6iuufCzh7gsgtGg== 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: devicetree@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: 683640 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 1768DC77B75 for ; Tue, 16 May 2023 15:05:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233951AbjEPPFp (ORCPT ); Tue, 16 May 2023 11:05:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233751AbjEPPFm (ORCPT ); Tue, 16 May 2023 11:05:42 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D4FB8A57 for ; Tue, 16 May 2023 08:05:36 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-64ab2a37812so6219007b3a.1 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=Pjss4iKumAl1A8eeiFXcJggnmWwQ51YxPJXhPMPbusA+qx4QRIIn1NXSYa1CjuoFGO De9eFPh9zZ/WjdZolQU7DNFSYepFLgOgPyirRVV8bdYQDC6xNPavJjCqZiEms6Ehl04y Pw5dO8gsvfk9JOF1vdz00Jd5mNitb8loN5q++YuIYG5g5iYFk1t+4nHBj8RbZ22fW+Y5 TQXgYGeYEZcGUfVRhk+Rpu+/G1BDIxZ8J6+hCo1oXchAy+H9TMsJkNho16r+GjSKkroi owkWCHdPHLLSuHc3t1P/deNQJUQK/5S1fgqflX6DLkQpMS5VcwUwXvoxdx0ldZQ+Wanr DcDA== X-Gm-Message-State: AC+VfDxFx+qSWKPEIEDvV79Im63JjNTWvRZlMnQd6ZSMHAWLsDcLET4B O/wiH0o8AYEsjIinkOxRa7zxZw== 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: devicetree@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: 682690 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 A63A1C77B75 for ; Tue, 16 May 2023 15:06:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234084AbjEPPGB (ORCPT ); Tue, 16 May 2023 11:06:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233349AbjEPPF7 (ORCPT ); Tue, 16 May 2023 11:05:59 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B56A83D9 for ; Tue, 16 May 2023 08:05:41 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-24eab83867dso12116320a91.3 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=GEu+74JBja+69kvLjjJZjctSVTC5uqdoeQp3XoLHlgllx3fqOG/qXxFcKhJKm/TVli sslVb6w0fUJ4Wa3S4VYjU43RyNXBgpRuNxINyLZYjVGUoOoSUr+8+qKh7hagVg90+FGI WOYjRy7cL9s4s3ora+Rs0tY7sFITJ+lbDVzy0QCvJzNl6f7mk6HPba41Egwf7FDy92gI gI/hfGGW+/QjKHBAj3CXOqK17OWgdwu4Div8R7YroToRlSxpaR3nyx9J6B+1xK8tex0k qNUo+OfUVWXRixQcxF+xLHmHUrNeh8wBLwvXt4roxQ8SyDoFtSYfz94tCVFHYYZ2F9yc b8nw== X-Gm-Message-State: AC+VfDwuhnRpBopcDnNyyZzq6endjV0GPZV60XvQBaJ7l/LUTL9cKRx6 Gxfquj85Nq3DMtOC0/fC1zUVsNcaN2BfnYNr90o= 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: devicetree@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>; };