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: 763384 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BACA2030E for ; Wed, 17 Jan 2024 14:04:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500268; cv=none; b=rtPg3gAw/ZplMU6UDX9QB2tVtS1WZEHUVSm1M7x1QPNx7vt5A5nTU46uk5NEZ6bLaHqnSdrOQSgAIzFkho81F3QxLGJcga2n5ua22NNQ12mWF54q48AdQhTMC6shmdtDz2BuyqkV19iX0qBK5XEmhyqOq5LuVSDfURUkG4qbCd0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500268; c=relaxed/simple; bh=BNkRiqUWArTJ0KVqmkfyrxNRNLwMagIurNBQJ1C0EgM=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key; b=iUpnI2rvVdTQMcjyxPj8RBOh821VivtA8Q1Zn5VgEH4yNkDKRMckJACDmGPlFqVZWZxfFKQQoZGQN4Q5Y8lCsVJTL1dR9OIN79vbmxz7FHQeKRrsCrD/XVPjPXwqStnWDZctd4PvJDwTbXd6jgVVcNLbjYTJMx+Rdiw9FyOKpbY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=j0DVEn6K; arc=none smtp.client-ip=209.85.167.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="j0DVEn6K" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-50e7f58c5fbso15025594e87.1 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=vger.kernel.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=j0DVEn6KgPuD66QTIQEJqjmHdHnXrTdb1IYNnLSR18By5HjEEFqXaL65p/o+GKb38I azpWlTWyR0xC93v295SF/7Hi4CheJVzg9KIiO0uDUfo95bxrEQv3FxJxzhE/iOnOtzDO 0Vj1S3/Ff5tfMmEXqZtd6Qdvpo1+Qvij7VgHNDvCWfqndxFINhqbEJTtkLpNfuz/Bu09 1pzxrZuJAt1pGuAReGfjdXadLZdVJNqX09miRfMbc/vpF2QoDi9wlLnAYNHQs7wS3CyY 1iXKxfMY77hxE/FkH6zWnxhSo1vJ7+0wELDQw4pO0LCuXgiKdgXLa2woWKG6MNZBv0fi tHzQ== 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=nvVVaUowqTmv8lD1fsblT49kNfAxQxIm8k+9g70yfpFx8z+K0+Ishrkzt8u2MhnGZC ohSE3X8vz3hJJnSNHQ6cPlHLVwNQodoWlr92P3IwKMNVTCj6/UeSAtb6z5f4yjKwMRzl +bQHt/R4v4/S8XH+oRaqVOMudGmWXBEWMGk7a8uHeaAoKryvtcxscgpIdJxqMRmV/jEG pW9732NOY4zc8uGhyrnH7R0CTPLw38nFwtcYEJHdysaGzQ6GglRIbc/3RfRQgKcsJfIc HYx0sFM+AEQh+Ko1ANHuWLzP5KNf6Mm3L3gRPrbKldtIPkHo1csXj1SM+6mgcaoxgsf+ IMrQ== X-Gm-Message-State: AOJu0Yx8LnVuvd974AJ4+KLryb0X23S7J3IdxkkTjYi8DCN0JwODz9DT sUR+FCnZ7GyNZxm+uKo4EtCCPb/OiohZzQ== 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 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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: 763383 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0B2520312 for ; Wed, 17 Jan 2024 14:04:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500269; cv=none; b=KwOqVMMHxb5ucbUSLnjrSP15Gdn//8OKody90LmU3zcDDPLTP9v7VfZKxNaXzZ43UcgYp1d59vFm01QvGIhK/H0yq5aU8ypqescacVJt1emYv9sMwZcCrKEEAU9UQZ2xmYJQbU4ELxW2OvjlVouOfJgtm4SheuXjtjAlKnSntAQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500269; c=relaxed/simple; bh=IIYXjLUeMbWnutvTtYPCUZAo+vNBHeW5XfLCEiQbpb4=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key; b=D4TcudOJvyXU9ICSmTN7iOBRIW6rtFo/LHF1dzfsq2x2ocEkm6pFvYlFo2yrPRdfN8UVUoPuBDo9SdM+tg17v2tVzf0PuZbD3lv4tnxqV920PRZuSL5Vod0u6aksiPKguRfGuVJYot4qUGy72miiBMvzblFtzSbmh7M8qJREp8o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=AWDUBRXj; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="AWDUBRXj" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-50e72e3d435so10671901e87.2 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=vger.kernel.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=AWDUBRXjemCKjHXYqCXMjvtkAfocQtPK8Ovj5eH9ri452qlYvQ4+q2UoKR1Q8unfdL ctWEJHKYfQkSpCztaMJSRfyeHbt2llnbYwIg33yuveV6p3dGbh8j4TmsvTUdi+GxIhFl wqTxJKf7tcL4Dk3pSeQDKSXDHXO0DqjtjC62wYn+jKQgkieANVd6qai4tmilFIbv09dz 1njF/iuFP3EIBtwIot79GcdS06At2qyWciufVE8qdbpHDJjaE0mFY/Ecii47Xlfcut5c r1h4EqzB2Pw/qy6AE6xDkyv1LFtZZKZfdoABF42a+UtUDxhDwPBo3dY8F/SUL4VsxYPO kucQ== 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=U3Ua9p7vTALX7UDMBSRWdgxtuuL71r4ovvdfl3lMmG5NrZ9yFOL9WlHjKRaMm/tOWs IMLD0vvKWtoZz6LoSN/DYEtTccq/Sc2AmLZnRwDqhiYqxBd7TO1euzkBYWXZ4vUZJ1UH VBcHGIl0iJxcgP0RduVt5cY0QMfKdLoc+eYmCfQBAHOyGw9BK7bFPFG7kwuyX8lZZtq5 STsyjYtr2qQ+2QxDT5IIaHd7J5VyWEi3LhoWX4vjnYFV9FLs/3tn4VcLTpNv2ABfrNk1 y9ZZWBr8v+/z7z0g43Se4aQLCNE8gaiCpK+rRpRIjoBuaUguKLp7sjuAxlgcdPQ/eNqq T+6Q== X-Gm-Message-State: AOJu0YzjWvFvYy2PZhtJHas/ETvVnK9uL1LqtWizIIZ3xyLY5Lr6xA8A sFqpsfMZiUqwJjbzxeVQnkB/PJ00tfgnag== 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 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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: 763382 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7950820305 for ; Wed, 17 Jan 2024 14:04:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500271; cv=none; b=LlgJ+XHKZMQ16jiZ4R+uLIqzIlhIWGOkS9eO0/DsLgCHXzGfs4b48tvN/pFT3to8zTNTeKngwQKon94Ae5nVFwIftIiPT/Z8ibToXxmtiI5oHuuxeYTdagbEQ0CtS0LWAbLkG6pWyDsl8IEo1zBta2Zn1cexD48pD5nPXNrUVn8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500271; c=relaxed/simple; bh=XQ5Pv7+enL8CAcnblULFpJMoVjMYx0Ov7jzzVvGDtFw=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key; b=qltcROXpICw8RBj1gLGdlI/Jj/cNK5kiMatnMgvMq37m2pf6eRu2egMv56X2vy2SzyvC814Ns3sTTD17Kqfqj4F/nGb6mSXeIUep78sfIX+y4ijM4HwjKS1c9M21M09oYiRoxZ3jMpCMMNudKKiqNjkUzffUsi0XMOUUhmN/Vdc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=TuRMmDSQ; arc=none smtp.client-ip=209.85.208.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TuRMmDSQ" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2cdeb4b9aa4so7838581fa.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=1705500266; x=1706105066; darn=vger.kernel.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=TuRMmDSQvhd4Z3baN0Qh1X8y0hoZgwO6Uwz33r/wZuloIqGPZO/zCQ5b0DEOwI3zvO sFGbXD+BoXwfaCBIDQaf0yIFt53a998029YSyMUO2PeFzgArml92eDeoPvio9SGukC7C 7sbY0sSWCU7WLnl5Z9ixeZgoL9k5lhvCI4OX4blq5yD8UzWv6LR/OHA0DbxJkYOsKIb+ 19ic5FBQMzz6/Db0lnBD3OVx3GmkUJwzmlMqZznR6QQWlcrrxxcz+ErjJ7zJo9lUu2uP gcQvS88aVa6EqIvJzDymiL3l8MqERrQ2vuuttNAlUhmxzO1VuUegSVXFNstHFO+mDDc2 T2DA== 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=O/DdeNboPUlU9lFTeZGwoLcICf664m3TCsrmav9GhDL7qoqR76VNKpDc/d7h6eB4ho 7j9Wu3XimLozuTyuO2XL2iRvzHvbgunXnPqKEx6wIWtWRa56V9Bcc3uMRl9/ru6MRpXu /LWDG7xA3W4i3k/4deV0ke56KA3Uh7laWAhO6i9bHjXy98ZAlhl+FGcyxfHWOwwz1Ow5 WP4+Rj0fv3WARp6jDWcH7k+rx8dd0Izdo3F3D5sVtxyzQ6M7bwg68+XPzj1DHZZP4YvX iOtWhsJ9elWjizWyx4bgZn7vU1+D9nckzlBDck9b4pKycE2pv9aYYkbP6EMsGot4PoHQ K+wA== X-Gm-Message-State: AOJu0YwemhuDVFvpenzfANFhN9Ku5jcHA9Ud2dwbhQfOX+siMhY5Eib/ yshLYXrjBFW6SaHBVMZKSkQMQDwZDG24+gUrTKFPU4BwT78sUcxcEuAzYPdPWwI= 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 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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 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: 763788 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CAC120320 for ; Wed, 17 Jan 2024 14:04:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500270; cv=none; b=fKWVMLy7yrTMQUtbL0MXkjafBnn7zJEURSjaO51S8Cq7eD65z4nNqtXS21iPpzk070v8PMztgwarWSh1JWdecFC/8nzjStNUwwR2WXc65vkSNSzF7dvtAzIa1jYxqAldsPxoNREaLvA8WNq71Ub6DG13MOtLxcIUD8Z8qLzKLEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500270; c=relaxed/simple; bh=PIb4wJZB4VPlU9DjKkOwyEjMvVPp21zzloRzfQ9S7E8=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key; b=W+eAC1StSc7T4AVLGHe3x7f0aCKMwWdBnTTYml25HtmrCO1Ojk3YmIW1BFBj7EGjZ1VJksyWtVI69oZSFf4dORaKpvHq9NtJJp7KrcWvnmz5e92P0IwDUDR2iDGltK//TwBpejJExp92UIwzC0ez/rq2/XgugztnPqGhNd5KUAg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=HHUbgYuR; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HHUbgYuR" Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-50eaa8b447bso12558882e87.1 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=vger.kernel.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=HHUbgYuR/l4dQ704nWAHTkuMWuGO+nvjTD2qO65x/M0SgVhP2So2Jbw2oLELNIt290 CVFc0nrAVcOTxfR4J0u7wLLynT2vSiKG26kk7jwNjF3xkNq5I6MBr1NnvXGIIa+3zn/c 1ugYdoLJqjkkU3GCKjJwm30j5atHV8iYJKRMDmx7qbLjuIv4PZdyYr7C60aVizgNN79I fe2Jqpt4r14TubKYYdEr5PbiVh9pCNimJKpfhd5cdy6sp7zWxhlYORrSn9PueD/xiO2C aljJZ2mAMezNYhq+QZRLg+Y0wHW9gZMl5a8AWGnJQTQMGAKXq1j3vDPzV8p4QFkEUM2A 3t/A== 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=XHvB3Vy0nVm1BqRR5dExvvfad/YV+6uCg+dbvn+p7jSLKL7aNl0m6nDAk0wA7wCrFk SuG+b3mADC23A0VWUKK/1fJhZDI0dF2gQB9aP2kuF31c6Gzgbw0KM358aI6qYKlhDAHN +2TTAhCKoUtzcbG2+o++Wuzk3ClSN+DaoMTByWku1oT7481T/Qxht1BJfChSJVn9lSJ+ HqfAW87Y7qSGb43kCpM+PnVdLPsEJ/O53R8vJSyB5UCn7KtNJAsHwNAINibCLqz1puFx q1924MFdzIjVBNt4Ap2DeUA6Y2bbsIkWZVQpvd0VbqAI8nGJypeVqlbkNmCJL+LvaSuo aYow== X-Gm-Message-State: AOJu0YyeUdA+8NZWXA3aQzLn3lBiT/G3f413InIxnCvTClF0XP5WDW8C 3YKLTRz3XDJu4I6jQPWL41oWBSne6YeDHQ== 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 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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 | 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: 763787 Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACB9A208B0 for ; Wed, 17 Jan 2024 14:04:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500271; cv=none; b=TWtezxM1dvHQxDFIs/WuY70Ww5A45fAEJA2zAauQMMzUkNDubBIzobZ4RtRT1inXBPSabQIV6da0MxYowO0213TZalAYH7UShU8OZ54KmQoesXt34ZouO6bKmdtBeVbdJWM6saDeURR/SLe09Jt84i2NfDkfa3zi3S62tOTa47k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500271; c=relaxed/simple; bh=MdoBSrycZYklvpg3wMrnQWxk/afUuXbu3ZRk4SLziVo=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key; b=ZFtU1OtJiT8u+lhMUAjSY4hbsPx1QVBapjtZmS5kuOHidsKfrdUoAW2vAptjK4cju+3Z4MBbX0FwqlkWYi+SyH87wsnj2XAe1TOo60rxm7WgObxQm9smV6SS59TW1iV5ekxftHS28dQzbODQR09mM1MQHYhqSDWvQqlZK7mIXFM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=psG+AHYm; arc=none smtp.client-ip=209.85.208.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="psG+AHYm" Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2cddb2c2b54so20738131fa.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=vger.kernel.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=psG+AHYmKixLWGtIHVFit1PaJwjDqVAEKqSK6pXqDbttEj5iEn/Ne8qJCAp6vJvZKP 86+WseCJTQrvekjToOihUT5cTFrdh2NCrGVtrcq4arbOQ2hxiUaw5zcsfL1j3Rwxn0FQ DteDbOx/3yUGVgis45x2OLOGsmRTdzMc8nwUFd1t/ynXs+2LOZQA7mplwfKp+Z7WNblZ OyXD0xxJawnNjbuLcZCS+3fpv3GzWdgaVhtZcdptRrSRjyf9YUooFss49k2sAyQCCQlM K4ssmsWxktAysT7OqOiwn5OmzW6Ny9MVW6XwvmcRPDl+BkSgBj1KOv11D5VZbxZna80Z OUUA== 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=dtKWXpjpbJj8gbLtd4wkabOFV1M25HwUt5rNDKyc2MEtEtHrGE+7D4M/QxsVM9qCxZ SptiKiHykDa+ZNqY+ltJKpxBgrbJuqY2+WrPP5nvk6gWzFSCnNP09cHYlqRVpy+NtCa7 MdIpx+y8Ns6Q0XaAeJBGHHdqmzOnyl5CPnnUNX/hIDXbO9emxEIkOIF3pHaPD20HzHsQ 1aguCptjG2lUk2GunA6uGrg+sKqbuRyCBJOzjo9eUbchaXBlaLPWLhWLS5VSTLmbDlif GgLcOIY7+QdMnbK6bujRodzFdSzvOjGmUvvGEv1zBzCiGYRv6mYHvTvd+EQ+4pIB7deu zE+A== X-Gm-Message-State: AOJu0YzoekIdURzyFzh1LgsATuIfWSl16qzu8TsOhaLhjZXhueIqmUzH okPBsxCG5EvUwxEF5cfkT4+EyOseSP9NBQ== 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 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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..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: 763381 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A54020325 for ; Wed, 17 Jan 2024 14:04:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500272; cv=none; b=fd+4ViYuQvgI+04vSHF2AG3eHkE024zw+3+9JrKd+P7e4HkoE6fKG32B/2BAh0IX6loUHL90uKjd/xlb8f0fiMBSIwKgLMeMxvxokaQ9hpVcLTP5DT6BTh0QAv1FlmUIpgdIoWv54G1SNDJtT6CuA+7oerwmanEB0wUpVCXB5mg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705500272; c=relaxed/simple; bh=NBmVgz6T2xRikadcDCIPLqU0vzAxugCzfckrrP5Hw/U=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: Date:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key; b=gRVZHJpdO2jLcibkoVigfS5B60z+1nvl5iwDS4Fzik2kQ4hnlzl6YN7PN7pJqsAtQA3L/2j3BmHD6I1YXTFmdXWNBKtHceETG+bPvp9CNS7ZjmD+NsOth1jonKrN3AcScMYadkUkGtMklxgyH2uzIP6t/Em5aMnYkrDO2DQI0c8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=gP+WOm4A; arc=none smtp.client-ip=209.85.167.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gP+WOm4A" Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-50eac018059so14218813e87.0 for ; Wed, 17 Jan 2024 06:04:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705500268; x=1706105068; darn=vger.kernel.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=gP+WOm4ADZ0DGvPNIRB4qjahsLrnTtUrGqILiwZu6cHjRwYJX/IdG9jYc/bznids3C IQxzruluMIWMB0Jfyz9YiHQdeVswf7mFsU3Ii0WHoe2Saw5KXtCcUASN/PINlAOu15x6 xiOmyX7Iim8Ag7/FGzLdJmm9GXi8bLzjrZF9k9NfFDynf3IfkhUUs0M9T83SGkr7M5qx ZjhLOEwFHr+z+xQ339oIaxkKjmfIJ5zufovX2wQy574qcbo6ywo3Pr29KfSYR/Tvpc1z ds41SLt4WmfIHfydii8qvIElIyB6lXyRl19VlB11XN04HBhA69HYFT7P9BB6PmDlycbv OLEg== 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=HJVrM4b+FCkETMhM/a/geXFV4iTH/+mHHiokG5dCQEp9+ZKdTUxaefvk9iGBMT1co2 gnT5VA9osLq97Gn5nR8GyeQHs0JM1Nn9CP4/kAfeVy8jMtrZMgJj5HV+wzSQxXcMCVXZ hkLSgRbpuaGVIotP0WLkB0Ax8c3PyURVaNTsossuCGB8LufGRJ2WeLgFqPyB5ZsRGW0e X/zDDA8FebK/Edwh/1c17i8qVcfVS11PuGGluAW0hkN2YsiGc/s6jc8Xzp2t/4EvTZYy 12DqvmkNZ6yLlOMX+cccHPjRIrF0uI7qqdNt1YLpxnHJQh++ONHR4wUZ9Bokag8RKdEf Jl4Q== X-Gm-Message-State: AOJu0Yw2ir3MtoPtyRxcAgkXZaGErypTVg5+z1CrQQr/l/ibTHWYYqIM UrrBBsjYhsi7dvI0eJxyJkYc8IyCgkbnAA== 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 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 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"; };