From patchwork Mon May 1 19:24:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 13227983 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 24689C7EE21 for ; Mon, 1 May 2023 19:25:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232975AbjEATZA (ORCPT ); Mon, 1 May 2023 15:25:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233055AbjEATYy (ORCPT ); Mon, 1 May 2023 15:24:54 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F2C82733 for ; Mon, 1 May 2023 12:24:49 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-63b4e5fdb1eso3353331b3a.1 for ; Mon, 01 May 2023 12:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682969088; x=1685561088; 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=jPsBIL7uoiC5DZZtXnqdAvBon8Zv1+SeehoREZW26xk=; b=pgyknais4aRab1t8pmNSA0qMa1ozYTzChr8M7CXa8qRg2oxhzSom0qyDRFUJ+f1erU jZWydaadlr4eL0JdWMc8tqJ5wKlbdpQeg4PLXCoktQuIWrHCKRD20XTque+y+JSKGuVd 0rqW9+F0aB6RLb5TAj0tzkRIOBI7zgD/3TUzZjJ4iowAh305WiTQ5mv6TTpa6G1iBNPe 96pbLMZXYNNdZs7H695/hzZ9uQXKbSu4sVMieyscIO3VDG5CMGZ3xifchs+Llm2pDq1q icrjKjTUQVFkujL+u5xRdBNky0sIIdn/Nl+c/7i09p2rbIzBzWTtMN+pBB0kXl1BMKCj 3SEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682969088; x=1685561088; 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=jPsBIL7uoiC5DZZtXnqdAvBon8Zv1+SeehoREZW26xk=; b=Ob3ONQB+1JNT9u/F9gYW14QCPnCTy7L+t/aSNxkP49UCjSjl1PTEk0uu+gj35PoO8J m4CjflAXTGhfKNkVT1lTv2kBT5LCZc1hOx0JuRR2SEQyRll0iDHCsiAkIgoG84kBR3nX DbFwUrLZST34IMRiWiUFKFBmalabEBdwg5rClT0eGW2dpjD8+8nmOSCWwNREt0zVSL8j FMXjW9p2qZdENCqii05ZEqjaL+DVl+aYVC/4+P7eTqVApv0y2uU8ONXvB5Z+2+VUgAqq Nt5dGLt90u20essfATx+GmbuQRsxmAfm7LWF8MjUWrcyb1U43GTK+57ctquzvRs0EpD/ dbyg== X-Gm-Message-State: AC+VfDwwG2M8TnXsUcY7Hn5tMyj3RLoreVGIUpEL6VHtTMGxJq9/trv3 QJc7DLA94JKGq3HKzUcW0YI097+3elCjzyA2wK4= X-Google-Smtp-Source: ACHHUZ7sREX3Zv6nkVkFFrf4WGA8ndPhcbEV/7rDkQXbuGPz9UEh/nfjA/Bfqf679yxKsnvjpgwqKA== X-Received: by 2002:a05:6a20:3949:b0:f0:302a:ccdf with SMTP id r9-20020a056a20394900b000f0302accdfmr3932495pzg.52.1682969088010; Mon, 01 May 2023 12:24:48 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1f3b:58fa:39f6:37e1:bb9a:a094]) by smtp.gmail.com with ESMTPSA id 189-20020a6304c6000000b00513cc8c9597sm17459144pge.10.2023.05.01.12.24.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 12:24:47 -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 Subject: [PATCH v9 1/4] dt-bindings: phy: qcom,qmp-usb: Drop legacy bindings and move to newer one (SM6115 & QCM2290) Date: Tue, 2 May 2023 00:54:29 +0530 Message-Id: <20230501192432.1220727-2-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230501192432.1220727-1-bhupesh.sharma@linaro.org> References: <20230501192432.1220727-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 | 44 ++++++++++++++++--- 2 files changed, 39 insertions(+), 32 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 16fce1038285..05335e6bbb58 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 @@ -16,7 +16,9 @@ description: properties: compatible: enum: + - qcom,qcm2290-qmp-usb3-phy - qcom,sc8280xp-qmp-usb3-uni-phy + - qcom,sm6115-qmp-usb3-phy reg: maxItems: 1 @@ -25,11 +27,7 @@ properties: maxItems: 4 clock-names: - items: - - const: aux - - const: ref - - const: com_aux - - const: pipe + maxItems: 4 power-domains: maxItems: 1 @@ -71,6 +69,42 @@ required: 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 Mon May 1 19:24:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 13227985 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 E9733C7EE2A for ; Mon, 1 May 2023 19:25:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232814AbjEATZD (ORCPT ); Mon, 1 May 2023 15:25:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232256AbjEATY7 (ORCPT ); Mon, 1 May 2023 15:24:59 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 310B526BA for ; Mon, 1 May 2023 12:24:54 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-63b4e5fdb1eso3353410b3a.1 for ; Mon, 01 May 2023 12:24:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682969093; x=1685561093; 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=TlCXSDngFh1SUws/NWCdUPB1ODSh3zOJ15r+LU+w194=; b=kJy/w/9szQMPPeJb7Nxpt4Sr/d8sLB88BocgsO82DII0hFd6BlyhxUgMvHWCanx7gN dmI6A2VoBSZHu8vCp4xdyj7Pe5tk9uVC+AUjhrqNNdatMP6YhkC77BLZ1bDGXkkcbR1T emSIe1huExaLDtbthYlR7cKTmAXbi4ctLLo+vv4487YcIedVXF7hOM/o+7//3GorqG7w hxpgN5OTnv9PbNlZlFaxqbKw4aa2rfV0jr55gnhU5GzLEXkOxdPVXc93grf9F6b0Afru 628hAtd+j/k0dWoPJS8oGebSBoSnPqQmWHr88SXhiHsuDYxWP3E01ErAT9EWATNRQ0AZ LOEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682969093; x=1685561093; 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=TlCXSDngFh1SUws/NWCdUPB1ODSh3zOJ15r+LU+w194=; b=AbeAUEbyO7tR4DXFT2UK8HZ1mjRt56IG6bCL2Px6gMKofhZYNbvN3inaW+k75+p1AL LkIk0hZ/d4MKpfcT4LTX3XzSrHMJDXn3Sqi9MmG9Ebw8VVLFrM/COOzHobQNX7CAA+SI CO+JACy1eLdxgNWZ/tuDDu/aapUnLusjt9XUFFbpPHJlT3my/j4xw5PndqYUUgx6rvGw AonIt4FUtu0b9pbM4ELHjdvmrTUw6qEmKUwivfwLo4HBl9ex+Ykbk9ig7hFb9QDVcmcB 7PqCG2q9bfokh6LqmFsLgNyPkvGKseh3+j7DNIWevevwLPx6zRLAyWaG9Eio8vn9vxqX Mwhg== X-Gm-Message-State: AC+VfDzmB7b1ch9Euhxd+5IYTkJJjBNdJFX+nKK/0ogFmm6ctgo1T0lm VMOyusstkFcGY2fEMZ2asHCkO2ubmPKrBa0xjTg= X-Google-Smtp-Source: ACHHUZ66d44NdKMo0zcHRLfXIFVK1q5DUtWUQLjhdZrE+NP+hjzT/GDKeAK71DgMKEFMrqmAiqDNRw== X-Received: by 2002:a05:6a00:c8c:b0:641:1f51:bae2 with SMTP id a12-20020a056a000c8c00b006411f51bae2mr19765157pfv.6.1682969092986; Mon, 01 May 2023 12:24:52 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1f3b:58fa:39f6:37e1:bb9a:a094]) by smtp.gmail.com with ESMTPSA id 189-20020a6304c6000000b00513cc8c9597sm17459144pge.10.2023.05.01.12.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 12:24:52 -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 Subject: [PATCH v9 2/4] phy: qcom-qmp-usb: add support for updated qcm2290 / sm6115 binding Date: Tue, 2 May 2023 00:54:30 +0530 Message-Id: <20230501192432.1220727-3-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230501192432.1220727-1-bhupesh.sharma@linaro.org> References: <20230501192432.1220727-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. Also note that the binding now does not describe every register subregion and instead the driver holds the corresponding offsets. This also includes the PCS_MISC region. 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 a49711c5a63d..aa143c081805 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1414,6 +1414,10 @@ struct qmp_usb_offsets { u16 pcs_usb; u16 tx; u16 rx; + /* for PHYs with >= 2 lanes */ + u16 tx2; + u16 rx2; + u16 pcs_misc; }; /* struct qmp_phy_cfg - per-PHY initialization config */ @@ -1558,6 +1562,16 @@ static const char * const qmp_phy_vreg_l[] = { "vdda-phy", "vdda-pll", }; +static const struct qmp_usb_offsets qmp_usb_offsets_v3 = { + .serdes = 0, + .pcs = 0xc00, + .tx = 0x200, + .rx = 0x400, + .tx2 = 0x600, + .rx2 = 0x800, + .pcs_misc = 0xa00, +}; + static const struct qmp_usb_offsets qmp_usb_offsets_v5 = { .serdes = 0, .pcs = 0x0200, @@ -1922,6 +1936,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, @@ -2497,6 +2513,12 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp) 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->pcs_misc = base + offs->pcs_misc; + } + 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 Mon May 1 19:24:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 13227986 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 37AE2C77B73 for ; Mon, 1 May 2023 19:25:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233167AbjEATZR (ORCPT ); Mon, 1 May 2023 15:25:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233103AbjEATZI (ORCPT ); Mon, 1 May 2023 15:25:08 -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 EC23A2D4C for ; Mon, 1 May 2023 12:24:58 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-64115e652eeso29012730b3a.0 for ; Mon, 01 May 2023 12:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682969098; x=1685561098; 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=o4KAh8wuSkuj+2XFnMn5E/sCgNnm5at5pl9Xs+VcK78=; b=OSkZqpdCuB5QWuNR04PgAmPEUjH9lrIt/8fHZtFsxK6vBVPRXLd4xCaiYatmE0t1lY sHJgTma5blWeCx9jiv6iZ/vhSVZEsJ1cnrrk+vVCAejaTAtI0yOoHjwSD1BslP0VbdTs hXxmXFB4z5xpaTEOzQDhnk/n+JNzBgqBl7u/VNha4MzUxTT62hSLc1wUylvtuy0En5FI jFWlLjbCJWgIq1JQNz8/HIbA6vetMbeWwdwl01MpUXYaMqLSvz36HTY5UbPTAU6SFWOd RrN+V3ohUtwO+3LheR6pnf+lLPzZ0SOIeyeTDXnxsFRREFFXch6oVdrbVrENEy4JP6bi xHoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682969098; x=1685561098; 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=o4KAh8wuSkuj+2XFnMn5E/sCgNnm5at5pl9Xs+VcK78=; b=FMf93KOi1XWF6G3ujnTaKOdkGQMUsY1oz9r51BoeuFCYz0PAGgnNI+L/UbO1LyKEF3 JG1JPMEdBBJjB6WGGgcxfLl+3ZIk7z3gF3xq1muwS3e9JNZxqOUTOfVKuUE8y1ch3x9z P+lq76FcM3mA3K6Je86qVcWBdTWtBL6mCmTbDg9D9xZAcNTyc1x3QJAD2HSC5v3eSXO5 QmNAASvfC2wx6zCRqWcKFCVcuB7UrPgaIIyUFFQ1rFUKhrWLW0xUYiQOqUERsBsyb1HQ Ym8WJGfaVD9JiiRbsgOK6fCwTQPhBrP0r9/Ggg46W5GAXO89lNKktT6CblQy7XK8MAh5 iD0A== X-Gm-Message-State: AC+VfDwRl3WZ1j8BU39z1msJ8I+XK+L6DnL0ZhEYrqGbRA+GaSED+eaC 3Y2PA5KvvqB2M8SfhJnr/ImNprdNDWPYG1SAO4U= X-Google-Smtp-Source: ACHHUZ6hgRXCvo7LQ2F8otRYZ2S2Y+KzvKEUcN3KvrlvdvTsfKjjzXRbjioBkjMw8muC7f1jBJ2BvQ== X-Received: by 2002:a05:6a20:4420:b0:f2:b0:68e8 with SMTP id ce32-20020a056a20442000b000f200b068e8mr21999070pzb.3.1682969097966; Mon, 01 May 2023 12:24:57 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1f3b:58fa:39f6:37e1:bb9a:a094]) by smtp.gmail.com with ESMTPSA id 189-20020a6304c6000000b00513cc8c9597sm17459144pge.10.2023.05.01.12.24.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 12:24:57 -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 Subject: [PATCH v9 3/4] arm64: dts: qcom: sm6115: Add USB SS qmp phy node Date: Tue, 2 May 2023 00:54:31 +0530 Message-Id: <20230501192432.1220727-4-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230501192432.1220727-1-bhupesh.sharma@linaro.org> References: <20230501192432.1220727-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. Signed-off-by: Bhupesh Sharma Reviewed-by: Dmitry Baryshkov --- .../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..21d00b0295a1 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 0x200>; + + 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 Mon May 1 19:24:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhupesh Sharma X-Patchwork-Id: 13227987 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 D3452C77B73 for ; Mon, 1 May 2023 19:25:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233224AbjEATZ3 (ORCPT ); Mon, 1 May 2023 15:25:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233152AbjEATZQ (ORCPT ); Mon, 1 May 2023 15:25:16 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5A4130DB for ; Mon, 1 May 2023 12:25:03 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-63b4a64c72bso2016661b3a.0 for ; Mon, 01 May 2023 12:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682969103; x=1685561103; 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=G+pBeS9Hy93exDLsefkYuUxrFqOWBmhI2jVtFARaSEE=; b=AtgDoBpxQSSDh44UdQty/vRuFhtjwIi1zEb7gyHEee8aUWm/K8YfYJM9CHrDpODjT0 TbBMQEPZ7HzEHk3F6D/+K3gIJOXGljPAQ+G+a8TDomSKajd+E8OaPNrV7JrKrsKrC5PI ExR3HZmpzOvSlLK5R9XcpI1WcHIHZ1/UDP/Jl1xaloym8h9kOmm0HaM7t0rnkfrYhnA+ 6XfpXA7JIsocxXAp/kZAjzeZYwa+5tBnPLP9kjJq1I6C40dRtKuEROkqpJQYJgjennxq J94v8LRftoRudirrGwZPcGMcCT2KcFIwsoqa1Ivbdg3t7jlqGgPq/S8uFPmG9Pa/YZrJ lF4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682969103; x=1685561103; 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=G+pBeS9Hy93exDLsefkYuUxrFqOWBmhI2jVtFARaSEE=; b=Pchat3Htejf4aNBdB56B0xhJW/yYpow/CN8ug25c6FGqEcjDgzwtY46+UG9U3iUBFE SaE9hohD6xoRK5PgsAWFbx8D90hAHGptBf7rSJn4BtTUqghPnYn9+oE00bq5Y7888X6P ytaDVHjxtfzph2j420V4s21PKsvQHsGCVAi1vfQMQDw6PlwLr8YcbB2Rz0JXDdCc/0A4 vUABpSTnsLL/Q0wROQLasEJVvc04JBp/3fK2N4rnCzVL59UuAbqAP7A/J6uNfJaHaApd h9s8dkvUd5HBFO8uH2+cZpO+sHDSrOodTr/d+M9C64/uX9kqUeW9lomYqhSJJa9HxQOw 3oQQ== X-Gm-Message-State: AC+VfDxfVyA4QAFNHkZvAmrT4GQAUsncdMdkKBLD9i7Fq6DeROvpx/br exgWUDQIM28kJ0DKx1zLNlmKHlTtKKER2SoOxlE= X-Google-Smtp-Source: ACHHUZ6xyg2O1/EMe1Wr477hSgi90x8ELhqHkP3l2KJE5og8af3/3zXZQdVNa2e/Pud+s5N9uRkw4w== X-Received: by 2002:a05:6a21:1584:b0:f0:b6e3:90f2 with SMTP id nr4-20020a056a21158400b000f0b6e390f2mr17699356pzb.13.1682969102858; Mon, 01 May 2023 12:25:02 -0700 (PDT) Received: from localhost.localdomain ([2401:4900:1f3b:58fa:39f6:37e1:bb9a:a094]) by smtp.gmail.com with ESMTPSA id 189-20020a6304c6000000b00513cc8c9597sm17459144pge.10.2023.05.01.12.24.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 May 2023 12:25:02 -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 Subject: [PATCH v9 4/4] arm64: dts: qcom: qrb4210-rb2: Enable USB node Date: Tue, 2 May 2023 00:54:32 +0530 Message-Id: <20230501192432.1220727-5-bhupesh.sharma@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230501192432.1220727-1-bhupesh.sharma@linaro.org> References: <20230501192432.1220727-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. Signed-off-by: Bhupesh Sharma Reviewed-by: Dmitry Baryshkov --- 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>; };