From patchwork Wed Jan 17 14:04:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13521749 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F277C47DA2 for ; Wed, 17 Jan 2024 14:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0AfG+Jkn4hb3utQusNwZ0QG4vKCnLGcKV1h3QwIKJ3I=; b=fQaxeS151MRIw3 BdqNEgR44Pg1j3bWusWolyohlE/Ys/AQrmB6k2BUyBHWXywWp2up4605j3ktsWrWBRQpEv8eg8sh6 kwrb1IEhxfl5+XZ17VFTCMO6zXSSTW5O+wMSmLZPyXRX+aTqU+FcQLeMmJN7Hi9GwA/LHBd983gKr nW5SxVsHOeq36V3Mp4nXjYn5Tq/TuxuZ6vWspRgDDmaEd7mChpJwiUjyx3iHSbjWGZusWprIbxzCa zEnxV4407o1DnvH1vxqd0do8KT33/y2SE48nYPI5gDQ1Z92OvQ1q0KN+9k6B0Q1RJvf+6ooiZtYUn MGMcEKjmEXV5+LEd4nBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Ww-00Gr8W-07; Wed, 17 Jan 2024 14:04:34 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Wq-00Gqzk-0G for linux-phy@lists.infradead.org; Wed, 17 Jan 2024 14:04:31 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-50e5a9bcec9so13547388e87.3 for ; Wed, 17 Jan 2024 06:04:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705500265; x=1706105065; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=KbLebAsEZ6c2w85zme28SKXGx9zXJ3HsoqbiMbqoTy8=; b=zkK+jF03Fhu8Pblk8A5fsvfNRSW46dyrK1e7vxtQVUZNABPb63rBwcK+P5NE2Tglsp 701KnNPFoPojYBOHsrGjJ4JsX1u40c/IHgJTiaA2hnSmi3y7l+FsUBLwj/zHQhk54uQe HovjHFLUVHn01LE4jDiDgKmXW+c+NjaNPbIGKKK6hROlUq32LyU609PMHLmKi0qUux85 83BMg9EXgjMHKQWUbdcogyTcmLLvYUuWTZkyo56KzNLQfpRJRtvNjf6rrS7afRD/mztL 2saDr/9Y2bc4+MiCbrlPlVJwfveSbCSrvf9cQtWt37dpd/6xqlzWfhk0nOhF4hpb+the xC/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500265; x=1706105065; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KbLebAsEZ6c2w85zme28SKXGx9zXJ3HsoqbiMbqoTy8=; b=whh5xLey5AMKUM5myxb0b9RgTUYTGwf36gI67e1PVTky2ZKZDajjDOqkGLYoZrdLpm oic6+ZZ3BqCRVSkSoX7pDqSsQpMRUOUbWjyf+sdBeiSkOYs8abt6fHA1q2v/N2dIOIdJ comMwczWvLkzlfMO7ggaLzdXc1jZDzhdRO/1zh4EpjjMvHX6POIQVCumJGhkF9b7+zf+ 52yXPSE6D+m2cNsOE2Q3NVlVjmDHGQ1t5brIH+cG61xLK54uiqGVJAm00vw/WdiTsoSw xyuINSUrHIjYTR8qfY+QvkS52WR6beRTe1ZU2XJ0WEG0YUg9Ninft2wPth2XHh7q/Zqh 54gQ== X-Gm-Message-State: AOJu0YzqFt8hPPDrfPDuJT4jBOLzOVgeOfc8OCfeZSEyPuAZY9xnUvsy 0vplXjrXA4TwM5MrPYNBKmFCfSxlOSt6/g== X-Google-Smtp-Source: AGHT+IEci5w4VaCrjhPVRmsfWaQ2FL4MPwZ1X2aiAPUFUfEDYDWcAf7EinIhfVzeZWQw4HBq9Bwbdw== X-Received: by 2002:ac2:4896:0:b0:50e:aedd:ed76 with SMTP id x22-20020ac24896000000b0050eaedded76mr3980995lfc.131.1705500265272; Wed, 17 Jan 2024 06:04:25 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y29-20020a19915d000000b0050ec7a26420sm269711lfj.204.2024.01.17.06.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:04:24 -0800 (PST) From: Dmitry Baryshkov Date: Wed, 17 Jan 2024 16:04:22 +0200 Subject: [PATCH v2 1/6] dt-bindings: mfd: qcom,tcsr: Add compatibles for QCM2290 and SM6115 MIME-Version: 1.0 Message-Id: <20240117-usbc-phy-vls-clamp-v2-1-a950c223f10f@linaro.org> References: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> In-Reply-To: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Jeffrey Hugo Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1121; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=BNkRiqUWArTJ0KVqmkfyrxNRNLwMagIurNBQJ1C0EgM=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlp95nRkdSUFFPVRgTFObupXEVUkGLJJlBCCc+Y tA4+bRCycKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZafeZwAKCRCLPIo+Aiko 1XnzB/4sv93LwvfIhcO0GMpB1xK3Bj4hbNRik3mVZ2P2W9HQgPrO+EldFpGPvSnlD9GnXqk861r ciGeIO5h8aCdnKY6u2F7d+oBfPVeg4s2C/B+f1Ya2i0JLVz+pd81dyW/wRRdyAEcwNpDxxS514t nqz50x44sMVjk5ycRKMgUoq8mLmXAU8lIycGHSoKQr8tzL74bn2YX/fedihkVHBYIKIqduM09wN SLnf7Mp5HnQTIhah2Z9RyC+b+8AhleF7p3SVuNxybWM79FOaLsXXSi1vEMPaDMtYfgLI8UM2GXC EBIUOnCMeN4aBfmWOT9z5mb9DMLXVTgjUJc27Z196CCCq8fx X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_060428_133265_ECE7B84A X-CRM114-Status: UNSURE ( 7.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Add qcom,qcm2290-tcsr and qcom,sm6115-tcsr, compatibles for TCSR blocks on the corresponding platforms. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml index 798705ab6a46..b97d77015335 100644 --- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml +++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml @@ -19,6 +19,7 @@ properties: - enum: - qcom,msm8976-tcsr - qcom,msm8998-tcsr + - qcom,qcm2290-tcsr - qcom,qcs404-tcsr - qcom,sc7180-tcsr - qcom,sc7280-tcsr @@ -28,6 +29,7 @@ properties: - qcom,sdx55-tcsr - qcom,sdx65-tcsr - qcom,sm4450-tcsr + - qcom,sm6115-tcsr - qcom,sm8150-tcsr - qcom,sm8250-tcsr - qcom,sm8350-tcsr From patchwork Wed Jan 17 14:04:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13521748 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB0F1C47DA9 for ; Wed, 17 Jan 2024 14:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hkoCBk1fLFzLv466f41CRqzmzvxQ/iB4fWS47fqFmPU=; b=r43siofRdPMLIT 3P6mU8WEaD2XUypP/RkzYfuJQCIR+JjEdaC/JzMe41BxXVdYqdXKaZhvVZG+V/wfNW8mwSB1GOTW5 eD9Q3IRWPbIwOANCB66usoxtc1B3eXy4q8rD3Pbdt+zrCK4D6qPWg+96PXd/lxeMXIAPEkt//hFKH bcBQ2wK6zku8iHHWgGZDFVh9bBq5t363lFWYYxTgu2GGJRAmLAxs03pzld53y8nRFOa0TpbTUsjM/ MkTcC9YrhiZxZLKHM1J9byr+xauzO2Lijbqdz6BQujJRgXoxu21EU78RGu0KPKMFfIULEPBCjlbVg zkpb6YF09IwtU6F/qFSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Wt-00Gr5a-0k; Wed, 17 Jan 2024 14:04:31 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Wp-00Gr05-2q for linux-phy@lists.infradead.org; Wed, 17 Jan 2024 14:04:29 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50e835800adso12468574e87.0 for ; Wed, 17 Jan 2024 06:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705500266; x=1706105066; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=772vTg8hfgBaDB+Qe7kc5uSF/E3F4uLPYVgiAcwBFyw=; b=emYdWDUbTZnFXnYpQR+wtq7mM3SVbQZiMVoYja22C+2exfPQPnBmU6kNrZTWPRWnz+ B5Xza+B2zUyBvkiZI3ae/2YEM9xl/CtHJTvU2nc140LQIBqgxGojNbiIb6670QIr27+l yOFn61DMtQdLVtHM4kNdUFHZfsUsBdFYSCEsjhc3CABm/onmivbrkWnxx83TgGuOAzo6 CyZO1vT+vdYRUfR/dWxDYA+PSqNC8Zc2a6qShLAe4rzQpzRQVkWqu7ejlb03/aIowevV jgWMLrfA54izxSrHv/I0dHDkkq6/Ss4Q0sApw4tisPpYZFcb680c7fRsQ3SYVxTanHU2 8v9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500266; x=1706105066; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=772vTg8hfgBaDB+Qe7kc5uSF/E3F4uLPYVgiAcwBFyw=; b=Kbsxp9mj9WTxLm/QliPB/LuStM3g8WLkXACsJ6Y9ChsPd3cbX5EUvga96+icf47u3h d9Un8wQ3FCkpRok8r6dfLiUIRiGsSoXzs7Gf4VNNovWcaSv1XCw6Kp7FkDVvbs2bSvL4 ZiPanmeye9qmQC8YuHRKInLe16emDIiex7oUgIInr0+vVHnGzHSjkwg7NXlCHGuylb2j ipXvA694mVk4lA6DkqnRfjwoPdvJXKndOTdLQzDjkS/Qy7qbaZMfEF4h2OoqxtU+ZEtx EAfFwr3Gzb3wxDNjhIoj+hKQ/hd2oLXmRE684yfcT+DaQ9kfTl1ZyZ0jS88Pkqfittn2 h7WA== X-Gm-Message-State: AOJu0Yyp60kAJu4zry24ZuB1Z/Z28L9geUl8vCgHIkxDOY6ESeUazmE9 znGzdDEiA2ceQSJDw4p3t+QMYqtQr6jlKw== X-Google-Smtp-Source: AGHT+IFkPW0tH2jtfBfz4Aip9qhxOYVsIvceiz48wRBf771jjy/Lori/rlGUHmxrapPVDLJh3wJXcA== X-Received: by 2002:a19:2d0c:0:b0:50e:82e7:912b with SMTP id k12-20020a192d0c000000b0050e82e7912bmr2731161lfj.138.1705500265979; Wed, 17 Jan 2024 06:04:25 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y29-20020a19915d000000b0050ec7a26420sm269711lfj.204.2024.01.17.06.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:04:25 -0800 (PST) From: Dmitry Baryshkov Date: Wed, 17 Jan 2024 16:04:23 +0200 Subject: [PATCH v2 2/6] dt-bindings: phy: qcom,msm8998-qmp-usb3-phy: add TCSR registers MIME-Version: 1.0 Message-Id: <20240117-usbc-phy-vls-clamp-v2-2-a950c223f10f@linaro.org> References: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> In-Reply-To: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Jeffrey Hugo Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org, Krzysztof Kozlowski X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1670; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=IIYXjLUeMbWnutvTtYPCUZAo+vNBHeW5XfLCEiQbpb4=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlp95nRXFznK8SZhS163IK0W66kvR4acev8hG7T X5LLlH1ILiJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZafeZwAKCRCLPIo+Aiko 1U+7B/9zuQGfbIQc1PlKK3gMFlCrFkYzIUTVKQvONlpjQVXipXYInTZdFNHQpweJi+j+0Fqm9ge zQbW7MriaaywehjRX5Uo0zmLwPKxcD16v0l73DHPFhz2Uf4a/sVyhnjg47DmGYWa3TETWak422v wCtNL8bv0RogEl92ek/U9Y3oWWMcH1V7L625tkIuhp5UX9vgkqeW7Nd1xVSaCX1R/zvTcO8Jvab PWS94mlciV207HIhhADnY2n26YF3tZOfKgTNTlm7sfHYQzYaKhSq33CEDWfej4qCxdCBMV6IZVe rwaBV0PZ8gIHo8nOYfEl4oApNo1vBQ6Ixwingqwk7L/PI0tg X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_060427_962403_65A7E8F9 X-CRM114-Status: UNSURE ( 8.42 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The QMP USB PHYs on msm8998, qcm2290 and some other platforms don't have the PCS_MISC_CLAMP_ENABLE register. Instead they need to toggle the register in the TCSR space. Declare the registers accessible through the TCSR space. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- .../devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml index da5d4cbca24c..140843347d1e 100644 --- a/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,msm8998-qmp-usb3-phy.yaml @@ -55,6 +55,14 @@ properties: Flag the PHY as possible handler of USB Type-C orientation switching type: boolean + qcom,tcsr-reg: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to TCSR hardware block + - description: offset of the VLS CLAMP register + description: Clamp register present in the TCSR + ports: $ref: /schemas/graph.yaml#/properties/ports properties: @@ -78,6 +86,7 @@ required: - "#clock-cells" - clock-output-names - "#phy-cells" + - qcom,tcsr-reg allOf: - if: @@ -148,6 +157,8 @@ examples: orientation-switch; + qcom,tcsr-reg = <&tcsr_regs_1 0x6b244>; + ports { #address-cells = <1>; #size-cells = <0>; From patchwork Wed Jan 17 14:04:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13521751 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8707C47DA9 for ; Wed, 17 Jan 2024 14:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eGagjaCbjRgMqvdvr/bJC4UnoN2xwCcwnAZUfTVIAeE=; b=Ig7IkGGwJUL893 YBVue0jOb2gLCgmSFMvKa7P2YhqJwGPCWSTshqZG1PqjhHjCBzMqwkmUg5sNiStUDqfUghsGMVZz3 syQqTdkPZhz2PnLBCkEGPQ2DrPFBS/2QvCskhK0TjaOQHMY3mq+hPeP9wrPVUB6AJSnvMc0w43dGC iAE9AV7V2lcmnoO7PybZC0JsTiMaNcHDnNLyZ3xlnxVDXhtnVXMgghHA03rR/As6Rg0hQwlA0Vm40 2E8vs6tirFp5wXfwCNcyrw2Y1ZY45S5KYBntBY0SwPbvkGUrC4Yua2dgMc8lVrx65tOYaipt/X3i4 N/wuQ8B8P3/QUMQ4Dktg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Ww-00Gr93-1V; Wed, 17 Jan 2024 14:04:34 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Wq-00Gr0g-39 for linux-phy@lists.infradead.org; Wed, 17 Jan 2024 14:04:31 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2cd04078ebeso112647451fa.1 for ; Wed, 17 Jan 2024 06:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705500266; x=1706105066; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=72k1xLJVwiMJbLRb7ZUUcy6cJZtX/coZxcCHHlFdCmQ=; b=Y334PTKqzIuUbWhRBn7IZSO99cQ0BYtSxC0yZsc5AlUL8tlUjOZjTi6Hp5Aamd+BHm h5oSPRT+RBXK68q6RggzkSQRrR2B1MajyuX83kkrOqCzK0D36q5+a32BUVbocAq0U60Y bquTwhtGA2YLRUg/EASpcSkwe5lQSk519CFsxA3ubQaZzE4PPdnqJ08gqbSbzUpCdmz6 WVHj1yfL3pXlyJZiceJZqnYczUV2LVEZKKkCFdQ6447PXGjHTXXqoEM09fou5zMyE09k YcvPs37+XoVV3cgGzobMzDtVfNt2eYYkchXs7aTAEUgOPajjTWfPkPl95QYQb25Bi62t fc+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500266; x=1706105066; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=72k1xLJVwiMJbLRb7ZUUcy6cJZtX/coZxcCHHlFdCmQ=; b=iJWMlbN//eqdvqb78GTUyZGT/2yyRrypgoQspUh6E9tsDFPe1mHByWfnyVL3swCRrA H0AWtCx5Ihum8M7Er+f0oaJXG+IBbWB0vG828Dk+gbEAlWbpmDpI+JLNMhyMhF47icZR f6yFfJaARtHQtD0c9hcO9XwWxtPOA9NNdvfpAMGnUNp1yibfTJ+HOyVYjgfrYxxRNMly zAKRL40Az5HQdCJrYLLN9hE/XSzgxwx3VroS66IKIv0JPWDWXLnmmafdEcs9YGClxwZg n/h6xurrfon5gqQ7j3NSB5a8IqZzxUEd9v4KXR2R10nWxrTvbDO+snZJHNIpk/2BRpXi /ZYA== X-Gm-Message-State: AOJu0YzGl8xzkD5YW2IdS6xrEVyq2+frVYEn/2iNn/NO0hKns9cDDkQ9 fJC8j3HSR34IkXtub9z3DSBniuJmuxUwHHUt7gPXFVU55rpGT6ntSHTjnx7ds4ewaX+JSmSdWLf jzOE= X-Google-Smtp-Source: AGHT+IF4LwyCoukcpgt8rgqEw0LpkrX/Ucil34MzXMX67x66tM4HWKETBO/i4geX6cAeJ32JTkl5UQ== X-Received: by 2002:a19:2d4d:0:b0:50e:7e45:4e43 with SMTP id t13-20020a192d4d000000b0050e7e454e43mr586156lft.15.1705500266641; Wed, 17 Jan 2024 06:04:26 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y29-20020a19915d000000b0050ec7a26420sm269711lfj.204.2024.01.17.06.04.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:04:26 -0800 (PST) From: Dmitry Baryshkov Date: Wed, 17 Jan 2024 16:04:24 +0200 Subject: [PATCH v2 3/6] phy: qcom: qmp-usbc: handle CLAMP register in a correct way MIME-Version: 1.0 Message-Id: <20240117-usbc-phy-vls-clamp-v2-3-a950c223f10f@linaro.org> References: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> In-Reply-To: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Jeffrey Hugo Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=5055; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=XQ5Pv7+enL8CAcnblULFpJMoVjMYx0Ov7jzzVvGDtFw=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ+rye+kxLw8d6ZKJDiu35KtJPjCHr2pR9MUNjQn3P1za+ mJanl1kJ6MxCwMjF4OsmCKLT0HL1JhNyWEfdkythxnEygQyhYGLUwAmsr2Mg6E5VXfJ8sz3dfNU nvRGTpaVy3L+4mfk81ekrLCEcyLj71+/1zz0qPm/Q0ZGpI3t8534bROcrLvtUk4lpXPc3Tb3rPT +Q+Jsp8oDPqxq/vJirkd/ty87ryKT2ZqavlllzzhWrZa01xd5vexq6kMLjRTPkgS/sOqufFuLXi lhzYsZlgd/m4TP9Fmo+qNrUmR/63O149oyC+5Lsjdvf6iVNS0kd+ZGaefjS2Q+rL2ZdTh5svDF6 vUT1sqdfMgr/2+PTK2zTXNsivli5qnzX7TpW0z7pG2nZz+7mXeGxoF0HS3FrvY1U1oPM9lJ8jvo u57jfnur5MynOdGHOwWzFDwOGSTfqQytuDhH8EKabGs9AA== X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_060429_040230_8A0A1D94 X-CRM114-Status: GOOD ( 20.17 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The QMP USB PHYs on msm8998, qcm2290 and some other platforms don't have the PCS_MISC_CLAMP_ENABLE register. Instead they need to toggle the register in the TCSR space. Make the new phy-qcom-qmp-usbc driver correctly handle the clamp register. Fixes: a51969fafc82 ("phy: qcom-qmp: Add QMP V3 USB3 PHY support for msm8998") Fixes: 8abe5e778b2c ("phy: qcom-qmp: Add QCM2290 USB3 PHY support") Cc: Jeffrey Hugo Signed-off-by: Dmitry Baryshkov Acked-by: Konrad Dybcio Reviewed-by: Jeffrey Hugo --- drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 48 ++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c index 214cf4203de4..3a4b4849db0f 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c @@ -10,11 +10,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -56,9 +58,6 @@ /* QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR register bits */ #define IRQ_CLEAR BIT(0) -/* QPHY_V3_PCS_MISC_CLAMP_ENABLE register bits */ -#define CLAMP_EN BIT(0) /* enables i/o clamp_n */ - #define PHY_INIT_COMPLETE_TIMEOUT 10000 struct qmp_phy_init_tbl { @@ -94,7 +93,6 @@ enum qphy_reg_layout { QPHY_PCS_AUTONOMOUS_MODE_CTRL, QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR, QPHY_PCS_POWER_DOWN_CONTROL, - QPHY_PCS_MISC_CLAMP_ENABLE, /* Keep last to ensure regs_layout arrays are properly initialized */ QPHY_LAYOUT_SIZE }; @@ -106,7 +104,6 @@ static const unsigned int qmp_v3_usb3phy_regs_layout[QPHY_LAYOUT_SIZE] = { [QPHY_PCS_AUTONOMOUS_MODE_CTRL] = QPHY_V3_PCS_AUTONOMOUS_MODE_CTRL, [QPHY_PCS_LFPS_RXTERM_IRQ_CLEAR] = QPHY_V3_PCS_LFPS_RXTERM_IRQ_CLEAR, [QPHY_PCS_POWER_DOWN_CONTROL] = QPHY_V3_PCS_POWER_DOWN_CONTROL, - [QPHY_PCS_MISC_CLAMP_ENABLE] = QPHY_V3_PCS_MISC_CLAMP_ENABLE, }; static const unsigned int qmp_v3_usb3phy_regs_layout_qcm2290[QPHY_LAYOUT_SIZE] = { @@ -369,6 +366,9 @@ struct qmp_usbc { void __iomem *tx2; void __iomem *rx2; + struct regmap *tcsr_map; + u32 vls_clamp_reg; + struct clk *pipe_clk; struct clk_bulk_data *clks; int num_clks; @@ -691,7 +691,6 @@ static void qmp_usbc_enable_autonomous_mode(struct qmp_usbc *qmp) { const struct qmp_phy_cfg *cfg = qmp->cfg; void __iomem *pcs = qmp->pcs; - void __iomem *pcs_misc = qmp->pcs_misc; u32 intr_mask; if (qmp->mode == PHY_MODE_USB_HOST_SS || @@ -712,19 +711,18 @@ static void qmp_usbc_enable_autonomous_mode(struct qmp_usbc *qmp) qphy_setbits(pcs, cfg->regs[QPHY_PCS_AUTONOMOUS_MODE_CTRL], intr_mask); /* Enable i/o clamp_n for autonomous mode */ - if (pcs_misc && cfg->regs[QPHY_PCS_MISC_CLAMP_ENABLE]) - qphy_clrbits(pcs_misc, cfg->regs[QPHY_PCS_MISC_CLAMP_ENABLE], CLAMP_EN); + if (qmp->tcsr_map && qmp->vls_clamp_reg) + regmap_write(qmp->tcsr_map, qmp->vls_clamp_reg, 1); } static void qmp_usbc_disable_autonomous_mode(struct qmp_usbc *qmp) { const struct qmp_phy_cfg *cfg = qmp->cfg; void __iomem *pcs = qmp->pcs; - void __iomem *pcs_misc = qmp->pcs_misc; /* Disable i/o clamp_n on resume for normal mode */ - if (pcs_misc && cfg->regs[QPHY_PCS_MISC_CLAMP_ENABLE]) - qphy_setbits(pcs_misc, cfg->regs[QPHY_PCS_MISC_CLAMP_ENABLE], CLAMP_EN); + if (qmp->tcsr_map && qmp->vls_clamp_reg) + regmap_write(qmp->tcsr_map, qmp->vls_clamp_reg, 0); qphy_clrbits(pcs, cfg->regs[QPHY_PCS_AUTONOMOUS_MODE_CTRL], ARCVR_DTCT_EN | ARCVR_DTCT_EVENT_SEL | ALFPS_DTCT_EN); @@ -1063,6 +1061,30 @@ static int qmp_usbc_parse_dt(struct qmp_usbc *qmp) return 0; } +static int qmp_usbc_parse_vls_clamp(struct qmp_usbc *qmp) +{ + struct of_phandle_args tcsr_args; + struct device *dev = qmp->dev; + int ret; + + /* for backwards compatibility ignore if there is no property */ + ret = of_parse_phandle_with_fixed_args(dev->of_node, "qcom,tcsr-reg", 1, 0, + &tcsr_args); + if (ret == -ENOENT) + return 0; + else if (ret < 0) + return dev_err_probe(dev, ret, "Failed to parse qcom,tcsr-reg\n"); + + qmp->tcsr_map = syscon_node_to_regmap(tcsr_args.np); + of_node_put(tcsr_args.np); + if (IS_ERR(qmp->tcsr_map)) + return PTR_ERR(qmp->tcsr_map); + + qmp->vls_clamp_reg = tcsr_args.args[0]; + + return 0; +} + static int qmp_usbc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -1093,6 +1115,10 @@ static int qmp_usbc_probe(struct platform_device *pdev) if (ret) return ret; + ret = qmp_usbc_parse_vls_clamp(qmp); + if (ret) + return ret; + /* Check for legacy binding with child node. */ np = of_get_child_by_name(dev->of_node, "phy"); if (np) { From patchwork Wed Jan 17 14:04:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13521753 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F505C47DA2 for ; Wed, 17 Jan 2024 14:04:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZYuoxgnbqTTtAY9h4XPFkaX6vXO2jtFjolP/lgPb88g=; b=kMYnY1qLayE6xB Yc0yM3iXUantJajSvZzkrRCFyZwzIoawQ7FhX8ar0gf2F/uBwR7fxtAuz6gcbuKrMyBluce150QiA oAUfQcMGwQIgzuCJYAWB2ubLNEBaKRyvR9fThSk+uqMZKFIg3BRiOX95kGhBO67VwhM/MTVSQGzlQ DA4o5naYVwSnc15cp3ep9lSE9Gp6NIiC5DkkdvZ98pchJY/bPZpI2IWXYp4t2FGgUrXcV8M244Ypa 3MqtPKsTclS1DMzNfJV9ZtaJ8NhlGihJ18LiMw6Dm5sISt9SKXEaxmOOQcDWOhkwIYlfuJa08l7H6 tqIzpNjLjsSb7mP2e25w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Wz-00GrBm-0G; Wed, 17 Jan 2024 14:04:37 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Wr-00Gr1L-10 for linux-phy@lists.infradead.org; Wed, 17 Jan 2024 14:04:33 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-50e7e55c0f6so13339684e87.0 for ; Wed, 17 Jan 2024 06:04:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705500267; x=1706105067; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=UVMtrjYxxS8jU9P9HQIcKp62CJkYBOMDQz6j5+KpHA4=; b=AqMTMDA7AoClXPi+sAR+VISXhTvvJKO1aj+6ly3PKEr16gPzdQnPbZx2qHIModscJw k8KpBv/MrbkTlfWa/phsPpIDgSBZdTgyUPYa3K4mv3ArZ5K80FGjqoFcnny13aOxwG8R dBHl12mfifJfQoSt2hzQdEDgdtKkOaiNsOMg+n5yLfv+c04fWrWS4KOVzeySQJcZ+mKq Yg7DUF1xyKksiLS/1Evg9K/Owd7Dq0gf5o+sHaBDseYCuzSRfCxQa9y2AekuOmwyE5KB 1ZbQmWg5TZb+i9D25F4CnGf3s8eeqV1lJSx1vW0k4YFCHTBoYG1TByZkM1ubH/Awqfoh WGwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500267; x=1706105067; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UVMtrjYxxS8jU9P9HQIcKp62CJkYBOMDQz6j5+KpHA4=; b=Xk2+3m76s/r01hDb+J3Kwk7llxNLtQAcah0+0V7hh/i3HWhK2x8nry3LJR2lSMxoJC wpwEu4mtwX23VxBQgTs4EuL0lg0sFvNyHCWSEJW5NO5Se4HRvwiVCm2FCmrCYKsolbsD ru5JCQrzOIXkEu6U4ORAupdfeqwNe/JvjVYi28/CbB9v7z5/6cRAC/dDsu5pkQ6KvuLG WMJME/zg6pkicG0DP3ZDD9r2UR21f7uUdF2Wg9FN2qXK2u26SqtziALN3AxmDXxn2zJA bBri3RerIjNMwluAOiyfuqV4T/vvbwlAPlo6iEmwHYKCS8RHbJVgpILfWYTJxMl0PFuL BkdQ== X-Gm-Message-State: AOJu0Ywh40payHDv6jtd2XJ/GrdYVdoiNEPopxCNyLOW9R++NxekgSKp HucTT4lKWmqrO6iQjgqus5BXM+IoO649TA== X-Google-Smtp-Source: AGHT+IGnKfW/zKJEKLJ57VfOhgD4hwJXRAAE7C1938RtE1q8aYT02DJ+oHYYF8UDbye1cQopCmc5qg== X-Received: by 2002:a19:6455:0:b0:50e:ac2a:6b5b with SMTP id b21-20020a196455000000b0050eac2a6b5bmr2074559lfj.95.1705500267343; Wed, 17 Jan 2024 06:04:27 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y29-20020a19915d000000b0050ec7a26420sm269711lfj.204.2024.01.17.06.04.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:04:26 -0800 (PST) From: Dmitry Baryshkov Date: Wed, 17 Jan 2024 16:04:25 +0200 Subject: [PATCH v2 4/6] arm64: dts: qcom: msm8998: declare VLS CLAMP register for USB3 PHY MIME-Version: 1.0 Message-Id: <20240117-usbc-phy-vls-clamp-v2-4-a950c223f10f@linaro.org> References: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> In-Reply-To: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Jeffrey Hugo Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1222; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=PIb4wJZB4VPlU9DjKkOwyEjMvVPp21zzloRzfQ9S7E8=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlp95nHnrAdiE2GmvCls+EigE0xuWR5GY7+JU01 Af/HfcBhoeJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZafeZwAKCRCLPIo+Aiko 1WJ9B/9cRMVbhIbRZHH2bVMJlbRMpNAkNqBgxawM6doivzRBHH5vgI66vUToizJLw901etSNeuO zrwWdqqvLNU4auJhXTCl2lwLdqFfKpv2e4nJEzp55cJ6Djcjf5U5/JxD9gVf60FrdDso92OI2Fl WdA+lwvrYrC12gZwYGsHAmYyZs8Ce5YABZ8fAz4P+NnAvApYc/Lpp3cWBKrfAMapHFQlyoeaU1H viVvv73LppXB+nKK+glygLd/uUiZCKQ5ooaTkXUXdGEBxP15Y53qH5aoy2GCw9WLGpOX6R7n2ox 2xpyf2IZBF5pA2dN9jUqmFK8VlJTAGRR63eUuUl2mfiH+I1A X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_060429_473349_151AE90C X-CRM114-Status: UNSURE ( 8.13 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The USB3 PHY on the MSM8998 platform doesn't have built-in PCS_MISC_CLAMP_ENABLE register. Instead clamping is handled separately via the register in the TCSR space. Declare corresponding register. Fixes: 026dad8f5873 ("arm64: dts: qcom: msm8998: Add USB-related nodes") Cc: Jeffrey Hugo Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Jeffrey Hugo --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index 2793cc22d381..317a91d669f8 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -1072,6 +1072,11 @@ tcsr_regs_1: syscon@1f60000 { reg = <0x01f60000 0x20000>; }; + tcsr_regs_2: syscon@1fc0000 { + compatible = "qcom,msm8998-tcsr", "syscon"; + reg = <0x01fc0000 0x26000>; + }; + tlmm: pinctrl@3400000 { compatible = "qcom,msm8998-pinctrl"; reg = <0x03400000 0xc00000>; @@ -2174,6 +2179,8 @@ usb3phy: phy@c010000 { reset-names = "phy", "phy_phy"; + qcom,tcsr-reg = <&tcsr_regs_2 0xb244>; + status = "disabled"; }; From patchwork Wed Jan 17 14:04:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13521750 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E454C47DAF for ; Wed, 17 Jan 2024 14:04:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PzQuXl3VSK4NB/s8oivGy5J9lT8YQhxjd/mOIoeNlXI=; b=0nrp/wZ9R7gGTD 0LRsOXLyaLho8M7fMAG9XuQJQXYKe2cbjGWjCb6oxttmhPwSjqgkynw+nkDGteYR/DU4zPTvd6Ngl A9bDwKIJFPuow7i1x/5BLyb/AJ0oORX757y/3Qt+HKNXggQAzBgbUJqvPjYLC0zcFcx0Q+gU6jHl5 9WdZEtbt5vJaBAt5hd42hI3ggXOzALAcWm/28GzFiI+Nls3mtRidkgmQnrf47pgZeG4jzjNEEUjHS 7LORypXbUrS+koedRCjvURVjHfdCEhARfdh8l3++AQTiIwUoZ5ZIVyPy3N1o2DsvDJkOl93LuMFP3 FzHxXNhoLe2DAB/m8+Jg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Wx-00Gr9j-00; Wed, 17 Jan 2024 14:04:35 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Wr-00Gr2G-1E for linux-phy@lists.infradead.org; Wed, 17 Jan 2024 14:04:32 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-50eabd1c701so13656419e87.3 for ; Wed, 17 Jan 2024 06:04:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705500268; x=1706105068; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=MDBhbGYpjTtYfLENzNTw+65o/Tc1yQuvKthYRLJB+4M=; b=imrGyyEDxHSye2i2p/xnXtiN2MtktdpLp3Yi4zFDuuwzKVu/5kG5aDPQ2wMT3rczor Z3SxfJ65hehBHuI+gqt4TySGt3SHPeiYBq7xLlI+i5glrjhirISNsvtpZgQ67VWC3sAb wPB1ZDzzvNFpS+bzIiE6gkL46JVK6spW5/EIpMrebf4rqYIVSgvwo09rfH4ccvPR/7qE 3PVYiJ5EjFYBIhXWiU66vjwPYIoDnC2Cz/i3/R3xfOgcZ2AA2Uh6PccuI8USSbo9DhMG PEoqPCvmRHbtAC03I5qI3vSH+lzxoZDfhwGNkivrbPsFm8AIiN+AoH01rpnH0lCMFnw5 UAXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500268; x=1706105068; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MDBhbGYpjTtYfLENzNTw+65o/Tc1yQuvKthYRLJB+4M=; b=Dbdz1F3WMd78gBtiJ4T2R8bWoC7929gBu9+VzQGC3AxZiNcHNvRIhe73lvOgdRp5o/ pbp5by8KRQD/M+dK5lcQuVXAqpXpjOj6bNE7ZXrM+riaclQ5GVSIyP9MIWdSB0hEN/S7 Kr3XEtuRJtLdOiX6pvRU1kf2x4Cvn8CKpJJrPeB9dl7yzAVupPNssGAJA0d6eM5DvNLJ ErGQBun6bU0kl3PnBQ85DSRdzOSjj38wk3OOi3y+ScIKxJiMu9RvE5yqsF+vDF2MFQtd BjTKQikFyF8L2DA2yw3qMbu85aYlg8UtQy916ea8yE2/be6AQlmszp9O8Zh04/Bu7oEB aXCg== X-Gm-Message-State: AOJu0Ywm2LQM/tnogsiNVpoHr8gG0Dqnq8dlCXUWGrd7FbRjQMTKohxi 5GkysvLTltfEEZzy0oXRsHUq2CcgqKJzpA== X-Google-Smtp-Source: AGHT+IH1vHCYDSOtvo5keq6KG+y5uUXHlp8a1UnMO5nKy5PkIM9jbKTRki6B6acZ5XtiWN6qDyqAXA== X-Received: by 2002:a05:6512:b19:b0:50e:246d:7566 with SMTP id w25-20020a0565120b1900b0050e246d7566mr6081947lfu.7.1705500267900; Wed, 17 Jan 2024 06:04:27 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y29-20020a19915d000000b0050ec7a26420sm269711lfj.204.2024.01.17.06.04.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:04:27 -0800 (PST) From: Dmitry Baryshkov Date: Wed, 17 Jan 2024 16:04:26 +0200 Subject: [PATCH v2 5/6] arm64: dts: qcom: qcm2290: declare VLS CLAMP register for USB3 PHY MIME-Version: 1.0 Message-Id: <20240117-usbc-phy-vls-clamp-v2-5-a950c223f10f@linaro.org> References: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> In-Reply-To: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Jeffrey Hugo Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1144; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=MdoBSrycZYklvpg3wMrnQWxk/afUuXbu3ZRk4SLziVo=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlp95nKvHWn6Ym3qkYZUxeHE2QKkiDl6lZquXZL Q4IpSopRwmJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZafeZwAKCRCLPIo+Aiko 1UgeB/9dhgwttDM/QiCLtTkfn7SYobAr+0HKa13nNimPrtMxJzAPF83QdCgwXEAoANDZ4S8zQFC vBh3/p9yWK+2M2HqLSI+fSBAqH/8hv15KnaazNugWT8xgUwQ7rBJBl2ELZvTqXsjsDD+zdVxdlT TB9nvCbCpm+vmT8zO7gF1iOnQWNvToc9sDVCSIBZCh6roYhsAfkqEC7Z9CM6E1zW2mYqclT6vjl QJZr7uM5ET/dAkIRy5Ohz+P1zOOywiEeu5o8K2aA1VqnV46zkj2pp7td3zCmmuNcqAfMrxAlObQ o2ohpwcqiNCnalg5oG+OBPUGl7u5oubMJloF+9tMLskENNyb X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_060429_459187_506BFB6B X-CRM114-Status: UNSURE ( 7.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The USB3 PHY on the QCM2290 platform doesn't have built-in PCS_MISC_CLAMP_ENABLE register. Instead clamping is handled separately via the register in the TCSR space. Declare corresponding register. Fixes: 0c55f6229bc3 ("arm64: dts: qcom: qcm2290: Add USB3 PHY") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi index 0911fb08ed63..89beac833d43 100644 --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi @@ -442,6 +442,11 @@ tcsr_mutex: hwlock@340000 { #hwlock-cells = <1>; }; + tcsr_regs: syscon@3c0000 { + compatible = "qcom,qcm2290-tcsr", "syscon"; + reg = <0x0 0x003c0000 0x0 0x40000>; + }; + tlmm: pinctrl@500000 { compatible = "qcom,qcm2290-tlmm"; reg = <0x0 0x00500000 0x0 0x300000>; @@ -690,6 +695,8 @@ usb_qmpphy: phy@1615000 { #phy-cells = <0>; + qcom,tcsr-reg = <&tcsr_regs 0xb244>; + status = "disabled"; }; From patchwork Wed Jan 17 14:04:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13521752 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4282FC47DB1 for ; Wed, 17 Jan 2024 14:04:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+0taBwFpj8+9iGneVuKgrLbkdYb6nFGOSVaDmZfAsL0=; b=M6ChTF5ZuqaZqy DoHtJuajIX+stC5p7KczQsfKdveQYTKXphvGhCHZfjDCiKGA2G56xK/CNNxKvPnBSD1SNZHgSKlmu Xi/YGzpEMjSTCFE0WbiLlXVvrwsI2t05XH+mDwNjdzo1L4ND0Evh/oW1LNfLQQ/hMrN50WS2hWF7G 01kT70bt11R2LBtwETYwQxa2EjUJWXJ8lsIzQCOczptcrhqWWTqdvBJFeuPeIbI8fowV7BlsraCAV sudW0hMkP21HHRgpNnWvZH8DAly1BHVlXQrcNojKJhpmjD8ZPmOiqwaWA3KCagu3Ivzlwt7949YUj +j2dwTld37ZP/1GRD7Mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Wy-00GrBP-2K; Wed, 17 Jan 2024 14:04:36 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ6Ws-00Gr37-1s for linux-phy@lists.infradead.org; Wed, 17 Jan 2024 14:04:33 +0000 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2cddb11b2e2so25877411fa.1 for ; Wed, 17 Jan 2024 06:04:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705500268; x=1706105068; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7dcqXSk1rgw9DCHRa1hWGcJ3G/KhQaZBYpq+KKrzSJo=; b=iDDPvOpZhTaa2bvgf23cvETyU5r5+a48KqsByt5nnBs9bVSDmNqb8H6/HydtqDdvlE hlw4LTRieLgaUiejwmLCqMzCxz3xuYsFpfekptqJUxIPy7+3GFAW4FC9I3VXb5xjwpdJ RXkUfG2nl4if+/QnudPGqojf1Qs3EQ4oRU8cSCVCrz8rWLQSg1H4NWnuO7XkbAf70GnW Ikx589OTCrG3C6pTXGAMrnWeB97ipsDrGFpVsCv/RR9aJtb7v/xDEmXFF3HsTk60/Svc avWbTwhex/tq7gbBmABUh5lWfG4c+rocNcI+FX8+Vg6eVnBUCfR3Ws6w9weFmID8v4G0 oYrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705500268; x=1706105068; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7dcqXSk1rgw9DCHRa1hWGcJ3G/KhQaZBYpq+KKrzSJo=; b=Byf2FTy9f/hdziiFh68NkpU9+NlNLgz3qFK5rj9EHSHqseR+LqBwWirIYaECf8vMEP uhFO8GtSu9ZNzzqtmkkpCeUxCG37ScRv/yzFGlIJnLsWNDPq6IrzbXOTWevUbmyLKInH TncroqljC6vSP3ah/XR84tslzNyzShy2h98anh9+J1C5S+wWmFVTjj10YonFKNuAPmnZ WquS13w7mnFlB6sFBJ0t/VxhMLZx57rAjC0Vs8BXRG3qZkABlX9gucq7Hwp24H58fbht RrVnY3mpoB00JnQDebwcylrvNHMgqvwC88FMnOt45hsMit407mjZS/EHSu6wZwujmTIt 94IA== X-Gm-Message-State: AOJu0Yz2VIEqIV/jHfff1PfzGZJzYrtU+NFPnxfT5bgCWnxoURmXjYRi urHtFDPGEw5lZpBokQyFF+s/Mii60yp7HQ== X-Google-Smtp-Source: AGHT+IEuBH7Be/ByM7oNW69Rh3Ic7MZMVCjGkmr1PVTFS8RbyK0x36/q7neSLjxPiiYI2J++HAsmkg== X-Received: by 2002:a05:6512:3c3:b0:50e:50ee:f378 with SMTP id w3-20020a05651203c300b0050e50eef378mr4154155lfp.65.1705500268534; Wed, 17 Jan 2024 06:04:28 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id y29-20020a19915d000000b0050ec7a26420sm269711lfj.204.2024.01.17.06.04.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 06:04:28 -0800 (PST) From: Dmitry Baryshkov Date: Wed, 17 Jan 2024 16:04:27 +0200 Subject: [PATCH v2 6/6] arm64: dts: qcom: sm6115: declare VLS CLAMP register for USB3 PHY MIME-Version: 1.0 Message-Id: <20240117-usbc-phy-vls-clamp-v2-6-a950c223f10f@linaro.org> References: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> In-Reply-To: <20240117-usbc-phy-vls-clamp-v2-0-a950c223f10f@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Kishon Vijay Abraham I , Jeffrey Hugo Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1146; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=NBmVgz6T2xRikadcDCIPLqU0vzAxugCzfckrrP5Hw/U=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlp95nYEfTL0rbQyBlpAOWkMsd4n59kYFKHJuLn GfzbGxz+ZeJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZafeZwAKCRCLPIo+Aiko 1cWwB/4gFZwZL1igYrmLmmj209CRZXEYzmyz+UjKzbyhB+uXefm6F/zqzK8OPoNMAFMiKo8LOud A8LhAnp9c2a2I3DQrUBylUeOy4Mjj6XJtiSdhl2MAjPjd2V44T56wWcz+OiF8Q0S8ElaMG/5PZx 0AsRBdkplWPyAlljw0hTFJEpVftrjqOjcEVBczNx4nOJV4Ar9GAU+zCFamJ95w6RE9igY4S3RHm D/4CgMw9og9Im4zDnQ4os0zkIO19v43pZxrXRvc760GvUwl41qE/TaXaXurqgAE0kesoK/0iZh5 xIEhQNm3Q/ADRsUDWYHgoA35SAxp3tyPdlt7C2n/SrjHRgfz X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240117_060430_616401_34EFACBA X-CRM114-Status: UNSURE ( 7.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The USB3 PHY on the SM6115 platform doesn't have built-in PCS_MISC_CLAMP_ENABLE register. Instead clamping is handled separately via the register in the TCSR space. Declare corresponding register. Fixes: 9dd5f6dba729 ("arm64: dts: qcom: sm6115: Add USB SS qmp phy node") Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm6115.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm6115.dtsi b/arch/arm64/boot/dts/qcom/sm6115.dtsi index 160e098f1075..0c48ea444759 100644 --- a/arch/arm64/boot/dts/qcom/sm6115.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi @@ -614,6 +614,11 @@ tcsr_mutex: hwlock@340000 { #hwlock-cells = <1>; }; + tcsr_regs: syscon@3c0000 { + compatible = "qcom,sm6115-tcsr", "syscon"; + reg = <0x0 0x003c0000 0x0 0x40000>; + }; + tlmm: pinctrl@500000 { compatible = "qcom,sm6115-tlmm"; reg = <0x0 0x00500000 0x0 0x400000>, @@ -879,6 +884,8 @@ usb_qmpphy: phy@1615000 { #phy-cells = <0>; + qcom,tcsr-reg = <&tcsr_regs 0xb244>; + status = "disabled"; };