From patchwork Tue Jan 16 01:08: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: 13520290 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 2FF0DC47422 for ; Tue, 16 Jan 2024 01:08:46 +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=UYvt+zyhm0b9pYZyqDfmA4opLdtFeEC1kYE5V4hHy+A=; b=RF3BIQpYIaqO5B ajQe4/PMNb8HZbqSV2SyELZJvXXPuYyffg2PSTUhKqy3nivIKn6P4XS+W+lAi4KMWGP1ixvpBVgxW g9W6CoE2AUxNWsrLvPTdRvUl1f5G24TZD8iU4TayXAM3XeZ5mln8HlRwoxiaf2ymae6kgoZwcr1fs EPyhfbPDaPZAnWiaPX9P7Xuk45apMkMUTxLQDp+6AYKMVeKoTsnvEH1Vx3TEyI7dnwvZPHNnKMtGO yFX31bmHyJKZjQyzsJQMKe+ujyHf4xeC/gNAOakPJehwuZ2w4vMbJGF4AzzhhzIfarrCT4o25kBrC TQBChgCPDya2kwX7xVTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rPXwb-00Adax-2S; Tue, 16 Jan 2024 01:08:45 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rPXwY-00AdX3-2B for linux-phy@lists.infradead.org; Tue, 16 Jan 2024 01:08:43 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-50e7b51b0ceso9363886e87.1 for ; Mon, 15 Jan 2024 17:08:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705367319; x=1705972119; 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=2GejD4zZZsGDMHwYRtgsSZy6lum8oExkOS46Y7L43Kw=; b=CymaHXqB20GEFWDa87YfkM2DywjKf7viPErbSSK6IOdr77/7Bkc0I0iHsqBSRJXctA o+QyguSLg1vubO5Kp5xJhq+trtqeEJrG4ryTEyd5lZk7/zf4vlc8uqZHawyD3aB/jnr4 r+QdI1En/gn9FRvUVg+e0tKcciGMrvVaG2RWMrWdX9YJi2ujA+DiFPKxTq1P+0gShpCo i5c60NbDMLzQXYubsKE0Mr7lOD811ZNKW92lURSc5FUv/7Kv8gCdafgeWGgiBLRjw5fI vZ/Xu5+2Sz2ctcFBGtszUnhTo+gGpbJ/aKRgOzQJ4ZmI4Ja6CCCFb/dCDxdbGVMMHexY /Jpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705367319; x=1705972119; 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=2GejD4zZZsGDMHwYRtgsSZy6lum8oExkOS46Y7L43Kw=; b=P4/WNZrcAd67JRqhfl1BDYe7ruY2OV4AXmsRj1JvDgAktgNQRcPn15z5qaNsUyZ/RJ 97+rLt7aC015UYt/OLssXGy7ybZNtoO6DYbH0bgT6P8GWrKdhAT3CQXfIfVVApvvAgT9 4Q/Zkx7UvKvI9gyB5ichtMsTmY5qmumOddsGEHbBmnqKmAvgtEWrDcKgOLuh6OYLz01k 5m4nG3mqpNQ3Gd98hE7WcnkUCYCV+xC/p2KuZRDJifJX26elXtPcTMnERdEQNf//S5gn l1Cw/5K/owVxGDhF8xn/JpXo3f6y2IKIzVFB6XhEr40n1u15IMpDsG18x5rKW7F1I1xa wkiQ== X-Gm-Message-State: AOJu0YysX5Gs1fH9ebsnzTZgEYycS+828Q1AjujLYMLd+CRAT2UY8qpi RnYyvlRbUsQD1lDoT0ODF+Xe8H/2wl0O2A== X-Google-Smtp-Source: AGHT+IF4uY2IXXqcFlQk0kE43Q3PU+KiNoFsBavpJ8CtG05uDWkQ8ylL0yG7cG2uDfhV/l7L8wGeRw== X-Received: by 2002:a05:6512:39d3:b0:50e:70b9:8600 with SMTP id k19-20020a05651239d300b0050e70b98600mr4138890lfu.0.1705367318393; Mon, 15 Jan 2024 17:08:38 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id t3-20020a056512208300b0050eb2325472sm1615507lfr.37.2024.01.15.17.08.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 17:08:38 -0800 (PST) From: Dmitry Baryshkov Date: Tue, 16 Jan 2024 03:08:27 +0200 Subject: [PATCH 1/6] dt-bindings: mfd: qcom,tcsr: Add compatibles for QCM2290 and SM6115 MIME-Version: 1.0 Message-Id: <20240116-usbc-phy-vls-clamp-v1-1-73b2da7691c5@linaro.org> References: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@linaro.org> In-Reply-To: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@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, Dmitry Baryshkov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1054; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=Y+5fCr59sQqkRvEhrPMHqTIkuV7VTqZkyNtAF9yAvO0=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlpdcTmV3QAehqNHLkPutAKWHGSN2ww4nuk/KvH 8y0ySv2OpqJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaXXEwAKCRCLPIo+Aiko 1e94B/9wqdYVWm8HYtf/Ue6b5mdGcQIQWHHHZMY1fnsWqMaPORGTKLpgJGwJ/EtES8+Q+49LwfV Me31jibYz9GVkaujuwN4H4y3EnYd3CWlIj6U44rJ1oiGBSGrsfYaece9x3H2l6PP5pMxpsRbq3W zAQ/Zq6h1d/R7BqeTT2B2uhfueY5EHjYmKmayDNi/M295/3b3O/caKdO953L6tGjfcFGfng2cdY KT11GycxK9SeZURuTyJzZgZiAxLQPcNFH/+qchs8dIEbDsNtqJmZEjL52sRcxKnY8uoyE7EXxkr CkeEpR5hLY1OSqfPZwSzv2dTNq+X6/EfwWy7pnQOS/3pWOup 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-20240115_170842_713660_42215BC2 X-CRM114-Status: UNSURE ( 7.77 ) 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. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski --- 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 Tue Jan 16 01:08:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13520291 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 950F6C3DA79 for ; Tue, 16 Jan 2024 01:08:48 +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=oDjt2AXlRZsMuAfnNJP1p77TkjTara7qd4K9/V2izpY=; b=ddev9p/UR23FZC w0X5JXhmDdy70Jes4YrTrdvJiGGP+F0HszlC+AWOFN0UqcEhzA5aYeFLGYvnuMbcPIS0KkR5b3X6k lDNnUWHqWycXqzMbY3kp/jLTWIJ9+OQHlodsm8tIoXzpJaQdsFLIOHCtlirg7PttIl+yl0bQdYGRN 4pXzWslMMHsFU/JMIHeNLHjWLoshZvP/c4VOyMDLAAHPpjkKtcaNnS6WZdfyzMw7z/zGUH+9xxqA8 c9P+jMOFXf/Ere/YjtUyI06x0r1gyMOu0EHrRpFcBPVcjnLK7/hHGwdAEDiv8L81+E3HWogiOW2ve cTC6GgvE2gacUmB/a/EA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rPXwe-00Adci-0y; Tue, 16 Jan 2024 01:08:48 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rPXwY-00AdX5-2n for linux-phy@lists.infradead.org; Tue, 16 Jan 2024 01:08:45 +0000 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2cca8eb0509so114644591fa.3 for ; Mon, 15 Jan 2024 17:08:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705367319; x=1705972119; 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=KjAbofYbgQMqfe5mB6yt5wPFLv87tIF7emGg5eJbAI8=; b=rPb/4j2ETFr+TCMPccVSQG7ByxxDKwDlzOetwb4/r523SZPhvG19uYXoo6aElwxgut iY88jFwDaUA/BuVBmM6xJexv70hgSikgHEjLJqSr2mvwV06VINH/RZzFAAE6XWt0pXMH V+UzKDQo/ZQ+fiYVqCBW1qJFcqURiSJfZ1uR7Co7k8dGZPEJM7ykrM/ZPZ1073O+Hzbt H3gsw7HrinVRNtA/nuyRbHMefIZfATW9a2jn5WTpm6KVFGv2YNSqkyHdj59E9SuCA9os zxhYf1AN99fAJkFjf8fS8eJ+5dd5L6JrSzBChZC7Vnedd44WHJ8aNH2qTtZgFKeWN4JZ FfeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705367319; x=1705972119; 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=KjAbofYbgQMqfe5mB6yt5wPFLv87tIF7emGg5eJbAI8=; b=IIuV30wUctt3zZ9Rw8a6LamP3OeDIJm2EonoqZ8CgiN/6zvlns+RdLUuzVaxSyJceJ A1zFDIBvmgcHrkPCHTBo+mxw1Dj2snQn2titfeEz73xuYwGCnZW3oovVVrcTONkOwZrf G8lR5kzs+qge1kFHMtPRT6Oq1fjv/g7hEI0Nb0sVtQJd6aGv5HjWJoir9k1yARemQsRa FAZlTLiB9ER8CW967YMyVuFfcbtFpsw9Tat7eBctyekrEB/gmoTlHINuOxWkmaqdWZwH 1VhCKxNK0ZipN/wj5bR6K/QO9DPrjx0QgJ697Ow8ndHDItR6P6snsMms7D2d44yv7gWs TBuA== X-Gm-Message-State: AOJu0YysLXVmFbBg/4hxQ3jcXR4A4T9+5lVkD3GexFPtyhYzQTcexUuz UIvBGRIoyG+UrJJ26S564iY089CCpP7aqg== X-Google-Smtp-Source: AGHT+IFueQXJ8ShoFoz9nVCNU/s/96Gc66MS/UQ/2dpc5943PKJcBsJx9cP1+tPjLfKxXUs1ZrgMAg== X-Received: by 2002:a05:6512:403:b0:50e:9dbe:e565 with SMTP id u3-20020a056512040300b0050e9dbee565mr2488449lfk.8.1705367319015; Mon, 15 Jan 2024 17:08:39 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id t3-20020a056512208300b0050eb2325472sm1615507lfr.37.2024.01.15.17.08.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 17:08:38 -0800 (PST) From: Dmitry Baryshkov Date: Tue, 16 Jan 2024 03:08:28 +0200 Subject: [PATCH 2/6] dt-bindings: phy: qcom,msm8998-qmp-usb3-phy: add TCSR registers MIME-Version: 1.0 Message-Id: <20240116-usbc-phy-vls-clamp-v1-2-73b2da7691c5@linaro.org> References: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@linaro.org> In-Reply-To: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@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, Dmitry Baryshkov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1603; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=aBcQF7l7ykn1twMJr9c0QhEVt66OcJk/Ki8m8VZZ5gA=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlpdcUwW7a37xFdBCpgcJhqWckj1rXkxGi7snJH SLCros33d+JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaXXFAAKCRCLPIo+Aiko 1a1LB/0R8F87C2htTQS4hraLPGVNqIStbZfamJwSeJQO2gOpDAdXtp9pZdR7iwfDEqosWps99jA LpaUXEyagmbPmyqgJUkUBoDBaZ/GD6C/fuC7UhRPINF6DsCDt68VIQBeA77Gkv/U9/mhhb/MNll JA0i+lZwYuFXf6CIN6HgRmrhbunt3ZJyLxcC19CUg81yvQzJ7SYOrEATxliPYbeMq8ETLFQu6ZB vvWXJ+Vmn3WpcjbzsHplCeB2sIsOYvVlaA+hilh9O3ssflu7UPqySGu29Wmyasj3rzAf7wqujQd 0ofGcqFLJiQ+g+fpugm4ANRZKMW9iwuWmWg/QZPfMyEwRMiF 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-20240115_170842_909122_D997F04D X-CRM114-Status: UNSURE ( 8.24 ) 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. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski --- .../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 Tue Jan 16 01:08:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13520293 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 7955AC47DA2 for ; Tue, 16 Jan 2024 01:08:49 +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=2mZGkBzxgR0Vjg B9+YMAjNiZ9gFTs4KKwzGrpx3w0Tw+MSTBpRjUApyMS/86bUjJXUzRz7O487x9YquBN3DPvbVmqDq 2+eW6IZIVYVZno7yxWNn6K7pA0L61Wf5c4X3EH2cmEEQI/MP/3QlvCSN6HEH8GlQDn/dDxtzy+bUX HhR9IMerfJKTwot62qa9zUZRNpelqbinxr0qeoyO9Lc/LfDCulXrg9LNb8NuWTqkuIkqnA2BmBY45 u6byj0FmXGS7FNbs5vR+Eq3937v80T8diZLrgULSlVWRWH5B2A1x125JS1hivYSOFCF/nDfkRIJIN 6nkcGKgCu2eimbqJHcwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rPXwf-00AddX-0U; Tue, 16 Jan 2024 01:08:49 +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 1rPXwZ-00AdXW-1p for linux-phy@lists.infradead.org; Tue, 16 Jan 2024 01:08:45 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-50eabd1c701so11346308e87.3 for ; Mon, 15 Jan 2024 17:08:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705367319; x=1705972119; 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=n+nXpF5MrfQfRekS/9cS77IzHS6ZBlYteRIN9mn0Rtdx9hD7b9FshAegC51dWhTwgy GYhTpkCJx46p+QG2vvKA6x+SkP9zaqIYgPs1N+t/nDfuaM8Q7n+wbBUUnEiwVJyx6gBy UwB6DT7tZOlMSppAxkCm3dkZ3PsLFqkEikqBN7LYU9JH4k9iouYU6FpEgrUNaAEvALkY TV4L8d60CMEAB00hdx8tAUrfSfRS1GrzIKubLd60kfPhL7skJZeCLOHawwkr78BQbKn2 R9Cbk8lpGoy0XzT+LMzdgffjljAhX3CRhLQgje9BllMuEIFhFdxVBgN3z3lzAHw0QRyy RDKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705367319; x=1705972119; 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=WFU3D4gkNA23u1to9d/JTFPKnTVhdXjHP0H9mk7AYiHhvrZxrhHe9nogxviFJlWLfg pNmaYZicPnX8jinzymKWkDx8oTEletbjpwRrtvY2c+WjqpGRvYaMNaG/NEzQ9czUrqED 3Uo8RY3VGkPad4YA52xqHSE1CrHASJny04xUW7/78//JL1tltx2lAeK7g/V0KgJjYy5c 5oGin6Q3U8ghqJ54GFA+VXfZ0ApZQrGjfU3ojkdsbpOyHMU8S8IGxcNoUy36irLu90WE KRefkSwtS+b9BADDTEHLq1WKgpOAc9GfmUiC73yhmCeBYSx2JnSIvoXDmVx+PQsKVarw 4+FQ== X-Gm-Message-State: AOJu0YwF9/cKj9IrHjoK034mlk1P1uz2/7Nu0pLeWxFWn4qqd7GEuZZz 2CMLiaLTYSeZD222yS1/2+N69EeNr/SQ4A== X-Google-Smtp-Source: AGHT+IEHdQjC67yxbs6st+8RK0H1j+plr/G5cN8fl+jFYO03z1ncTKNkq6S882wQrVV+SIuwuG943g== X-Received: by 2002:a05:6512:31c3:b0:50e:cae4:1c52 with SMTP id j3-20020a05651231c300b0050ecae41c52mr3533875lfe.106.1705367319726; Mon, 15 Jan 2024 17:08:39 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id t3-20020a056512208300b0050eb2325472sm1615507lfr.37.2024.01.15.17.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 17:08:39 -0800 (PST) From: Dmitry Baryshkov Date: Tue, 16 Jan 2024 03:08:29 +0200 Subject: [PATCH 3/6] phy: qcom: qmp-usbc: handle CLAMP register in a correct way MIME-Version: 1.0 Message-Id: <20240116-usbc-phy-vls-clamp-v1-3-73b2da7691c5@linaro.org> References: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@linaro.org> In-Reply-To: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@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, Dmitry Baryshkov 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=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlpdcUGwNBPnlX0CcdJ9wAyEjTedGPvRMPpezqV KveL8p7W3eJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaXXFAAKCRCLPIo+Aiko 1f6eB/4tLjA4jNoELTTVUVfj7LoUH4GVYHmuiq1uVXGznyXax4TS9ZuxNQK6rcHQnRfV8jdq7fm 3NFs26on14zIR0gWIFuqKiuBZ81mI0B+VNzXyKmOpKxYfo0ctY2Qy3dheLrSYB8xX9WJynLMzpO Eesq73QMO9pePPTr8mUFV7raPRuVudW/jmZfEVVag25lf5w4BmnfBkj0PtwzMtDN2ilh4b1Qvd2 3kPT4ds+U3c987kDhz2yYeUOSQdUbwN8wOK5A17C6onM4bhMNkf0j/17ODI6NOlXrC5ZVmx0VHF zXd/d4F/NmBAZegDevoCnXbDtERoqDZbEefBjiNrjSCQdZVU 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-20240115_170843_604646_38120D53 X-CRM114-Status: GOOD ( 19.56 ) 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 --- 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 Tue Jan 16 01:08:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13520294 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 B3A00C47DA6 for ; Tue, 16 Jan 2024 01:08:49 +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=jf4shB9XDJo4rqdPwuDMrrUaIGiVD30kzZUCE9M3NXo=; b=MZVd0f1WvWpJDY xyRFa4cXRcELebz/XV+lOAD1pZFqkEE/Sp/kHtfxpumw17aL0vTK3vczT33Pns2+25UckE66NUCa5 1+wLdzbvBojvahfuQ4MjTQdLRgJipyGx61EHlSNolKIRnFGpJLCz5N5/MgAF399hGgr9eYPv4pyQt Y4Ex5JIUDF2q3s1ZeoqRgkIsCnH2JqZffD85Md7cTdhOyD6Didv2OK8zTVwSmkc1k+taLDhQyVg6h mENuza0ZeoEFEvvAoRCCFb0h6bE9H0aHyfoyEudZH/xsampnYg9ZqonI1fo6PpigEZmZwGPj7uYfm CEwhRe6s2Gm9qpQ+/5FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rPXwf-00Addn-1Q; Tue, 16 Jan 2024 01:08:49 +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 1rPXwa-00AdXo-1X for linux-phy@lists.infradead.org; Tue, 16 Jan 2024 01:08:46 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50e7dd8bce8so11189713e87.1 for ; Mon, 15 Jan 2024 17:08:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705367320; x=1705972120; 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=ZFFBqB7ryOdSAAwgYvTiC16JfI4HoB6cNRG90Y323Tg=; b=BxXkeZQLYqEHNMnq9l0YOpqhH+kPk8k9Vx36Yq9zSUH5rIaLB4QN8w99nuN9b3ClbK e1FyNhm9DT91Vsk+wwEAml5ubGQIRAvPuQ0O1TxA3osBT3SiK/TMI9WH2S+GdL5glLgk 27PaG/MdC1u0Z4Z1NhlRu6WAu5KOka+hCIL5zk9+Z4N3sqAZenL/SVV08znFgyvqyWww 9RInBMf3D9WPHtoV9ZY6aHN5xbOSuQDBGC/YFheZZCmMRMIVUUKymw/IjyBxoc5wGM3W wzJ9lf6eL+Fz0CrcAImzNk9CZrictt+s/GxloTEqAXXDecsb6EjPqNZzFDdEe6It72YN +A3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705367320; x=1705972120; 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=ZFFBqB7ryOdSAAwgYvTiC16JfI4HoB6cNRG90Y323Tg=; b=RS2r7LQQbmByDrDBjtCK3qh/YKc157lc/9uF9tSMFARLq6w+IMj6PVv9aTNYVQ8JCJ EbToWHys/bHxRAFzklJGUl7Ksldvh7juZNvJ49psy3HXhDgldt3cqbISFG6NyqLXKDmH k9WrMflb0LyD00IW3OYN9InFkCuH7Z2+jKXAaMYINaHaelOjgs0izQtuUiJrWflnP+Kj tbnFypdMFA+otX+HEXTW30yzZEGBj/mgH/N9Mejf95pjv81tq6bglnpZAKdYZwvxfVll bvNKsT7Sq0M5P7aNars+Ar4ly2rxr680G+8Dx+y8vsOsZPVS6+Ba+CIkxUtRU/B1No81 vUeA== X-Gm-Message-State: AOJu0YzArzQm9dk8n5yXVNnfU5kuHSJj4c7ckxXLVQ/+O6lJwuYhoqHv F7mQ3HpiRSJH1Y0wNoFuAcSwveFk+9caGw== X-Google-Smtp-Source: AGHT+IEJA7Nua383Rqc094PEQsC+ZFremv8cL9WtN7RLcf80l3UBaeRcKPp5Aj7YSdSOgUZHsxT9CA== X-Received: by 2002:a19:c504:0:b0:50e:d5eb:bfff with SMTP id w4-20020a19c504000000b0050ed5ebbfffmr2445918lfe.85.1705367320369; Mon, 15 Jan 2024 17:08:40 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id t3-20020a056512208300b0050eb2325472sm1615507lfr.37.2024.01.15.17.08.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 17:08:40 -0800 (PST) From: Dmitry Baryshkov Date: Tue, 16 Jan 2024 03:08:30 +0200 Subject: [PATCH 4/6] arm64: dts: qcom: msm8998: declare VLS CLAMP register for USB3 PHY MIME-Version: 1.0 Message-Id: <20240116-usbc-phy-vls-clamp-v1-4-73b2da7691c5@linaro.org> References: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@linaro.org> In-Reply-To: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@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, Dmitry Baryshkov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=891; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=f12NIWxuaNF6335LMHvzmeal7J/0jE48+iZdMsjs8pU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlpdcUA8BUvO4Wnz7aji2y1YM/6hAjte1eVG47Z JNASjDNHYmJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaXXFAAKCRCLPIo+Aiko 1UvWCACP1E1eQ+zq2gm6nte6GNYwnjgkNsu3bQqf3JTyTM+qr7Bxxx/fWTfWf1oYITy+IpqIJeM rGF6hjNDw32Q9hACywkkN428oWtcmFPt696i1pj8VUELOeIUi5SxZvsowN7+ArPhUDjtBNJRoMC s2dGoqYra9M8xRvQ7Z4FMum/LXjBPzU5Bxnig5PU82hY2xy6Fs3BUDQwXqQRo6Y8sBRZDJzMvor rcsKgTZqW4WfyNNoQ0qmxC1sA7IYp5QfxDVWmaZOOpHVDdrGr7bAnRONU9gA8ANy+uhWMdJBiKg daVJ4Rul3PnAGpufyUxD3pbO3lV/G+mZ0sjdag3YOCy5GEV6 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-20240115_170844_546987_3C76E307 X-CRM114-Status: UNSURE ( 8.21 ) 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 --- arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8998.dtsi b/arch/arm64/boot/dts/qcom/msm8998.dtsi index 2793cc22d381..e21e5693ba1e 100644 --- a/arch/arm64/boot/dts/qcom/msm8998.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi @@ -2174,6 +2174,8 @@ usb3phy: phy@c010000 { reset-names = "phy", "phy_phy"; + qcom,tcsr-reg = <&tcsr_regs_1 0x6b244>; + status = "disabled"; }; From patchwork Tue Jan 16 01:08:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13520295 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 371F8C47422 for ; Tue, 16 Jan 2024 01:08:49 +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=IboyaeMaaEyBU5bqXDR1NnN08q2da2OJt9SydmYEkTk=; b=HsDZLJHnUOJRVJ tWYt29lqf6MD1904ryE9l+68MBamB7XDSUCWAE76ja6TNbbI5e+TLpOUvwM/zcT7QPfQr8fB+irB/ HO8wvT1CdYxVHF8KMeAaDQ9CxChvH660+oRHc6LNzUKE/f+Mg1kJpwKFpaeslSD2+OAOqyetEvf0O RZWwngNWLZxFOw1Nayd3SqfkiXQDIFP1KB4rsPXXmdZxquaRbS5cOn5AZlgiXkDl6nSwo4hikrqne ewugz7051ulr/TMwpOOS1bySllQ1Zo5b2O4hGaw+LQLpRqJwuLetPflSVl/5udMxGRmf6D7uKIJOY W/mUkYXqWXZ457aiAMPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rPXwe-00AddF-2p; Tue, 16 Jan 2024 01:08:48 +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 1rPXwa-00AdY0-1Y for linux-phy@lists.infradead.org; Tue, 16 Jan 2024 01:08:45 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-50ea8fbf261so10924661e87.2 for ; Mon, 15 Jan 2024 17:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705367321; x=1705972121; 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=MEpBpePk2Fe+evg+9+5KRmYVDZRaE7AM1j+je/ds5Vw=; b=LrHdmmdQlDFj2V+U8cRtyQF3Bv0XL6qzRqCDTJNLz1jsBooxjWbqiUimbVwKFdlL1F 4eWbQr7QeEhEJ4PGVnhn9isCHe3UJf4aL/SAy+fg7giijTlP2Z4FA8nnlpMfxTfJZiTz QO03I1qoiyYA49GPlLR7dy9k/T0zWYupXZRD/AfUZh9MvCOZQJlBJIGGGcBGWefjsUQ5 MD4GFcFa7VHMniQ/6gUnxkgs97gBWIsJfSOr/JxuAFAPtdUMx+9I7Nwl8sio8yFtmwRX vE42LXArkazpYWgXJL1nDNzIRTEcQLugwXUKm0xbdfo8RM+JqoD4AW9yoUGjQQbwwgs6 ta4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705367321; x=1705972121; 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=MEpBpePk2Fe+evg+9+5KRmYVDZRaE7AM1j+je/ds5Vw=; b=HCVF2oE8Ss9diAPUO+azn7nXuly4IF5pta42LpI9apMSBi+aakwDYxrOoPCrJgR8W1 YwUj4GFVRnFyrWQk+EPCZhRSer8I9+//Dnj2xPNx+3FXZKw04o+e3/wg0qIqDwIRU28H CDQtr+P5y/ohp4uuGd8Fwc1HqIPSTx03jS6tXeYIfl5xtP51ypXElOG5gojodNLADE2P P9qoIV39HuxfD/gfQ/tvxmHVgv6chxdRKbwX3JgSKyb6dajXofchO3laIUpA1dP4Ywrq rWv6M61yGuZN4vA32PuCKfnHTK3YIPCIhBsz9liHt+uRjpIPEKsFXZ9oyVvxBhVZNMjj rNpg== X-Gm-Message-State: AOJu0Yz2mgHnIhFfr9Oogj4ii8kpeYndEJ7g/5Gw/H7RystSFB2TM2J7 W/4etq+s8hdHLJusRnRt6ZCGbZfM+AK3lQ== X-Google-Smtp-Source: AGHT+IF8x9G3m2kXw9P+9jtMN2XrPxmmiI8kKsSeCWAJ6wKGAJ04aH5sve/NkhfTih4N6yLfs6VctQ== X-Received: by 2002:a05:6512:401b:b0:50e:d202:601d with SMTP id br27-20020a056512401b00b0050ed202601dmr3235141lfb.73.1705367320990; Mon, 15 Jan 2024 17:08:40 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id t3-20020a056512208300b0050eb2325472sm1615507lfr.37.2024.01.15.17.08.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 17:08:40 -0800 (PST) From: Dmitry Baryshkov Date: Tue, 16 Jan 2024 03:08:31 +0200 Subject: [PATCH 5/6] arm64: dts: qcom: qcm2290: declare VLS CLAMP register for USB3 PHY MIME-Version: 1.0 Message-Id: <20240116-usbc-phy-vls-clamp-v1-5-73b2da7691c5@linaro.org> References: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@linaro.org> In-Reply-To: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@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, Dmitry Baryshkov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1149; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=5s+C8l9HjeR5C9PMCkzn2M15yrFw6QVI1uh1HoQRbAw=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlpdcUB5Y++cfi+p9OvDh9xSmKvHvrn1QVKX8p7 Oh2qsjYNoSJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaXXFAAKCRCLPIo+Aiko 1cPCB/4nTVJB8iCrE0+m/U4GPT2jleb1BIy0WpsHcERz38NcTplPem5Xekmt8JzdIbRytU2hLq4 NY0qaS4PBhsBUo2hMLH4LCfc4o1QIKMSB01pLj3B7wl0H4wnlx46MX8NZ3MY46kxhIBLNa1NOjL g6QAhwM2aToZWXcOgvIB4OJgfMrxc6BUhMv1gYMmwj/UkattbENA/hjTDSNQb1rwrpUVgkbOlpM 5nMruXaSA0z592WhsqGrlMWsBmnRN7sj2I9ArQT48kWeUGq+a0Ywt/wXrwRUtZCaV+H4nG6Va2M eNtEWrnBU+bGM/OkCp3aaW0iV33PLptzgBAhhmQzjmQ9OGLs 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-20240115_170844_544633_B40D9DA7 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 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 --- 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..68b52e8faba5 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_1: syscon@360000 { + compatible = "qcom,qcm2290-tcsr", "syscon"; + reg = <0x0 0x00360000 0x0 0x20000>; + }; + 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_1 0x6b244>; + status = "disabled"; }; From patchwork Tue Jan 16 01:08:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13520292 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 D5B93C4707B for ; Tue, 16 Jan 2024 01:08:48 +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=WS6jEE0VTi1dt0yMfG9uiHcj5JmORBjmHPS86UYvx/s=; b=ASpHd7dxs8ksJa kSWQT2Nqw0OT7QM0zArSn+gEsYjjODmOQt5dL8IvMtZNo+nOngnF8k09dxZhGSYgNEEooIbp0jsCn eLyGeKOMMRT9C2QbwmCVxMjLB+6bwBalizMHu+mDSLnEGcc+RH7A7dkTu1DVy1gm1iyHOVVCd2Vg8 b48BMpYNN6XK+aZ+0a/ohUWT9lZFnNYOyOlh0BEmtr9ey02C8ZCSnzC36oeXGqbZx9KvoWv6MN9PI rl3ji/zxdAYifQVGsYKXg39rCqBdPvaJuCAIFmdppByyVDic6+iX/ps0z6esO5u1EIFumMaP+u0Sw gi8XRL4bqRQIh8D74T2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rPXwe-00Adct-1t; Tue, 16 Jan 2024 01:08:48 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rPXwY-00AdY9-2f for linux-phy@lists.infradead.org; Tue, 16 Jan 2024 01:08:45 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-50ea8fbf261so10924670e87.2 for ; Mon, 15 Jan 2024 17:08:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705367321; x=1705972121; 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=gTqssOQMoHivsRaKvhgiYcDI6NU9y9UNmBG4hDTXAVU=; b=f51GqIHA5fRZ/4uyWCNNr4c2SblWsN5UayCVyOfkT98VpxX+YNJPS/S4TKYNsEA1oC 2VlvFHRnrZy/HTxSOpjcTVy67bXTrwh5ziyJJ0MdnljNwHt56/igo7oyAbVgso1XTLv4 xlLEtEKO956YfMagYx/z1lpxOBsiFW1/bC7IY5dKxtwb198R/L7yC5TBIa/Bl47y4wkt 77JxYQNuL8ns+TszoARgSU8aZVRTQJElhZfUeSyQAG7tlUOl5eS4gFrcj0UyqZDOX75i +LLYbDIVEIJxpBTg6ZhRT/NHYLG/iB+HRldzczjX3OrPi8i6/XelLbzMFwb7PDAI5hYL YdNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705367321; x=1705972121; 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=gTqssOQMoHivsRaKvhgiYcDI6NU9y9UNmBG4hDTXAVU=; b=DSkQ97uokPuRI9msNsvUiW+Wi747Rsl/5HvbwWrltA6uMdHhS0jFJoN35W8JOIGWco 4mGwgnYr0XGlGArR7vITLFUKiiawD8hrKzHLuPhdy7tN8j6n8LQEuz+1tpI4+ACXnVjA 8kiAAtsdjETXnROUOOV3JXzecGVQ4Nwv17ivEt+4FUu6WaH6q7hfq19veOxPKpgdKJhx GyoPoQxtzdxoL1WWnwbLLi0CiiTUBTXr8gps/3oryITLA0qc5WsK2lEBv0+gZVCXfezi huXLDbRmWCL5Vwqxpr01y/POwxiIY9ImDWZsjgVCwNNTRAeHHp+EBJujR4uVxf90DiBn WmlQ== X-Gm-Message-State: AOJu0Ywg10JoITiHU+9dZvsTe5852EfPu1riQO19k5p86Y5hfg1yf4dR uwUmcApu6FXii/rrqarZHAybB3v4DhjrrA== X-Google-Smtp-Source: AGHT+IGiIIUNsxe/40WvVDtiw0MLeD8d7ivL955vOr/+WjrQ65YZiXNtcJA+zr0rlxUZ7tRkHVBx3g== X-Received: by 2002:ac2:5608:0:b0:50e:76df:e41 with SMTP id v8-20020ac25608000000b0050e76df0e41mr2644981lfd.133.1705367321562; Mon, 15 Jan 2024 17:08:41 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id t3-20020a056512208300b0050eb2325472sm1615507lfr.37.2024.01.15.17.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 17:08:41 -0800 (PST) From: Dmitry Baryshkov Date: Tue, 16 Jan 2024 03:08:32 +0200 Subject: [PATCH 6/6] arm64: dts: qcom: sm6115: declare VLS CLAMP register for USB3 PHY MIME-Version: 1.0 Message-Id: <20240116-usbc-phy-vls-clamp-v1-6-73b2da7691c5@linaro.org> References: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@linaro.org> In-Reply-To: <20240116-usbc-phy-vls-clamp-v1-0-73b2da7691c5@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, Dmitry Baryshkov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1151; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=AdXDhIsnd+iXSWZKTFcLsyqUk+oKkuaRSto6EvCY8cg=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBlpdcUlM9KRQMg6qbyevu03KD/zZr72wNib4qD1 uB4dUptrKeJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZaXXFAAKCRCLPIo+Aiko 1R/XB/9FpNoeUmcKdOQ6BmmvI4G2XZzEF+ILr7Y0cQdQPcopIXTcMcJUqYEM6eAhwIQLOhsxE0o ZmyurDD5Mvv6hMZqdudsoMoVgOz3YhVTiUyMg5wEAMdSYgtwigWEsA9C4JasUen3m4zfclT+WeL 2Ed2c5799TBbn56oGjrXcolU0RUOd9fIl9EibLT7ZK1Lj8U58reZ4urgkjxzpkT5wzIWWU4s7+K A0FDXtbK+To573tmlnFj/5aLxphxn1Di8D0rT453WxunZF/eTp5lpQQs5shEZOX9IY+HnFjnGAz 6Zf9pwsf9cU1C7rzCh/rmEnCRNQ/8s3DKWindT753QqFnAJr 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-20240115_170842_871681_E0A40BA5 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 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 --- 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..8cee943fb24e 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_1: syscon@360000 { + compatible = "qcom,sm6115-tcsr", "syscon"; + reg = <0x0 0x00360000 0x0 0x20000>; + }; + 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_1 0x6b244>; + status = "disabled"; };