From patchwork Tue Mar 19 10:44:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13596541 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.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 0784557892 for ; Tue, 19 Mar 2024 10:44:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845084; cv=none; b=jjfMDSFYaHqIQGdv/Aoulk7/CoDC5piGWfh6T+KvSnM7cVrkzo2v9nRSNy88WulPFg6ACGo5mTdcCOnVh3C2CypZEBY5Xxm5E7wEKbSJVBxLzHdgrorTPuR87bVhOuisXVUAB/oMWVzjYG+pFXzwEpErm6nA1i3nDoLB7B58+Rg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845084; c=relaxed/simple; bh=m3pSUc46LB6V21p4bYJawYlmpmQ1kewBH2mwVCgKFp0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nrmYV2J0ZLQ5usGhxcgNOLXDG+35Z7kGPuwsgL8N9GqtVB5GdC1Ag57mM/HKJH26xm6a0/1AfTTGTQ9kHuYOW9LYAV3VquZle0TINb8WOG26uy1qIxTGddcbZyu+2MbYKlqXVFaaoV1pGYTET4jPf7WYtcwiC963J33e/epzXzw= 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=Go+m2bUD; arc=none smtp.client-ip=209.85.128.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="Go+m2bUD" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-413f4cb646dso35085325e9.1 for ; Tue, 19 Mar 2024 03:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710845081; x=1711449881; 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=w+CyiJitb+sZvqjM+l2rTfce0izU6NohaEsgLPWj2lU=; b=Go+m2bUDUYh0Nm+QbkdRpElBEtcaElp85oiFuN1lNOwTCaqeYCxzq78bDTtC5F0+87 YaJOmEFp0WabZSNGnPlQ9YcoisBAnft+/n2uf8ktvIcOTXzveW7mH5VW2lLXBk+hNl9B x5he2QSRgsankCCr3ETKJb/gAhX/YbnnLzpYbASyK85l/D092s6Z4mGATPowY06eehf0 opdnpbSeHw6ImVGzjVzU5bUGHWEOW0REGV7bkoOghxO3IrvTf1vI39GonmqqIqNuONIJ M+BbxgaUqXnDBN5WPaqjnBZsy2HQjZ2JJhmY9q2aVP3iW20NWEReBMi8KYhzTBqxrQdq YKVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710845081; x=1711449881; 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=w+CyiJitb+sZvqjM+l2rTfce0izU6NohaEsgLPWj2lU=; b=hJYzwfuLec3HEg8clv/v2GU4Iu8W0vxSV4sqhLCfC5DeFOCuGAktB5QAGVSvDrJNwm LjF8T2BgfRW1IsG+OLB1+LrCB/ZnClkxIALO7jjHmqkY0RnvC7ep8L4eosFTizER2s3o kTZVp7PA9lGiQINIWujbJwalVbzC6P7GKXNhFnKtnEIwUAEW0vXRXZU96FrpKwcOA6Il 5DVAgxAPa2Yx+5TDYdk327xJzPQm+Do3zLonH7LeuKbwzjHAHIBb0LmtNTd30fU+PkwL NnsZvFOoT5Tsp6xcXud3XpOEZR7RaTK7e1aXw7Fgi3SLAmRGJkKz4HXOMTy3bwTV4oDv UQ2w== X-Gm-Message-State: AOJu0Yw9z36s8pzaoK2KXZJh7gicTTnVOBD3XNYtzBijjXbVjhfnvEEi b3e+FWY2ZL2PAx/HP4FzLeX7XCRWYxEnBB+R8hR7vtRQ3kyUSxaBQu3LCshmyhU= X-Google-Smtp-Source: AGHT+IFod7aH8if5MK1ECasnS6ahDAVSxt86oZPskyfEsyagEJMqbHS5KlO7A4yywx58PageRYB7OQ== X-Received: by 2002:a05:600c:19cd:b0:413:ea5a:7787 with SMTP id u13-20020a05600c19cd00b00413ea5a7787mr9881899wmq.22.1710845081371; Tue, 19 Mar 2024 03:44:41 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id a5-20020a5d4d45000000b0033e03a6b1ecsm12029459wru.18.2024.03.19.03.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 03:44:41 -0700 (PDT) From: Neil Armstrong Date: Tue, 19 Mar 2024 11:44:27 +0100 Subject: [PATCH 1/7] dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: document PHY AUX clock on SM8[456]50 SoCs Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-1-926d7a4ccd80@linaro.org> References: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> In-Reply-To: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2495; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=m3pSUc46LB6V21p4bYJawYlmpmQ1kewBH2mwVCgKFp0=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBl+WyU7GicaV/Sa+DAWz8H7pfML0XZg2u0PZSmIsdY L6oe5wKJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZflslAAKCRB33NvayMhJ0XMKD/ 9uRTCJZKFuVtev94M7vFk4bDB7e0lWMazZKjKs+HT61PBJqNBPU7c3ZTJ+d5072U0MG7cm3+9b6Yo3 fnfqL3qbBfQ3iQZtdsH58AsG8O/nqde9bfiJwdklVmmTaF651OFPIfjc+MWDzhCGLC/b0sQGeOjZzL kaK5lEjx/NT71KTCp/CAP5zVWdhnqA4iSGUu8z5m1bhhpoqWdEQL4sHbbs7nZ4k7l/qbR7BV8W+OUq nCOpQQDBUvBlMhSzX6CjUiv4vGWyRg2WvlfhboFOHRwhbK63PPf2bJmgrMwPle9ZBFuczuIzxAN2uW NDA1fNgB0Q5do86B3M+r0YAg17p5RqyN7vXmIJMweqj7GLcRQo/K6vqDRguiAykZxJq4Xres+IkTd9 dSbfT/l+637W8FWTpg2hd0Ds3NN9L2xwLjA6IV7nGGzp4DjLcMNa14eEbb4B9WpfbI4hii7M1WPjJo OgE7/Zqh3RZd7iWESTM6CagexAESeOcymNZid+hbT4O50ONrggsCHiijnkCW8WSOwM2zqbsDKnnF82 rObVGqBK3AJ19Vc/DCa7jg6NuK4ch4zkLdczuIYOGE8G9PSHvIL5qPr+TExVApN9RlBoatyKU0QeK4 bgPrtjxYM203L5Z0b55YoNH+GjvM8V9y55HdN2UP1Dccgko70dxlMgEbWezw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE The PCIe Gen4x2 PHY found in the SM8[456]50 SoCs have a second clock named "PHY_AUX_CLK" which is an input of the Global Clock Controller (GCC) which is muxed & gated then returned to the PHY as an input. Document the clock IDs to select the PIPE clock or the AUX clock, also enforce a second clock-output-names and a #clock-cells value of 1 for the PCIe Gen4x2 PHY found in the SM8[456]50 SoCs. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski --- .../bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml | 27 +++++++++++++++++++--- include/dt-bindings/phy/phy-qcom-qmp.h | 4 ++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml index ba966a78a128..14ac341b1577 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml @@ -88,11 +88,11 @@ properties: - description: offset of PCIe 4-lane configuration register - description: offset of configuration bit for this PHY - "#clock-cells": - const: 0 + "#clock-cells": true clock-output-names: - maxItems: 1 + minItems: 1 + maxItems: 2 "#phy-cells": const: 0 @@ -213,6 +213,27 @@ allOf: reset-names: maxItems: 1 + - if: + properties: + compatible: + contains: + enum: + - qcom,sm8450-qmp-gen4x2-pcie-phy + - qcom,sm8550-qmp-gen4x2-pcie-phy + - qcom,sm8650-qmp-gen4x2-pcie-phy + then: + properties: + clock-output-names: + minItems: 2 + "#clock-cells": + const: 1 + else: + properties: + clock-output-names: + maxItems: 1 + "#clock-cells": + const: 0 + examples: - | #include diff --git a/include/dt-bindings/phy/phy-qcom-qmp.h b/include/dt-bindings/phy/phy-qcom-qmp.h index 4edec4c5b224..6b43ea9e0051 100644 --- a/include/dt-bindings/phy/phy-qcom-qmp.h +++ b/include/dt-bindings/phy/phy-qcom-qmp.h @@ -17,4 +17,8 @@ #define QMP_USB43DP_USB3_PHY 0 #define QMP_USB43DP_DP_PHY 1 +/* QMP PCIE PHYs */ +#define QMP_PCIE_PIPE_CLK 0 +#define QMP_PCIE_PHY_AUX_CLK 1 + #endif /* _DT_BINDINGS_PHY_QMP */ From patchwork Tue Mar 19 10:44:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13596542 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 DF18C57889 for ; Tue, 19 Mar 2024 10:44:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845085; cv=none; b=Jq2IzPRwvHoDKMtCdoDjv8HqFpx+zFd0J6fWgzSnuACqKOOGq3RkjHrJOna0YVADwgYkUDbp2v/CHMYgqnHRBMcz4H6O225FJOPIvCK3bioAocNaBlzlT6e3r12yrqYlR0EwgmYwAne+OLHbnhIIjMLSqZGciqE6ciOyGHnsZvY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845085; c=relaxed/simple; bh=L9f7mVzB9wMW7O3NrZIDvpmvouDLp7SdgWUnDSjbq1A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rsNR+Ty1VIMB69yAd6VfHKT8yqQcjfryjjqa7RzIoUeoxTJ44YcHH1JIVJkpp5NI2TvG03o7uVh1PZW1Ca41NcVSOKGBkEeOSTs9XlzRDfG5lJT2lH/Ve4HGrdsxnkOreBHEKkgeyFXW4LZkyQ3lbeaxd9MeNijJfL6kgBwrKL8= 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=XhAy031Y; arc=none smtp.client-ip=209.85.221.44 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="XhAy031Y" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-33e162b1b71so4720464f8f.1 for ; Tue, 19 Mar 2024 03:44:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710845082; x=1711449882; 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=HDlVBiiHg4pmaOoXuH8MpX01GVb560GIyVnt1+W2Ilw=; b=XhAy031YJ33a/Jy5X8HCCTYTLqYI4KN/4ZMCVHD9WPeUIMFPSt3T/WSMJcIPqIcFfu KDdTeuBTQR4+n7HA6qEaZorvEBPg8SqPv/h6dss8mtYjbt17+JPTZqy1siEsf8csJFsN WZjm/h512xh0R4AKLHUKs4lciN5g5YlkSwtHXdcA1Vwq3prXyCFF64eUiz4FgZvhLHoz gqdYcU/j6tm45d/5cGix8ukLFHediTkzXjlgF7rL+ZvFqMqRf1k1GYVSjXyRkJMMk0dY YzZyYrzGG7R4ObxlaGPRK9K8sb8V5tPg6o7XA+4+FJ+Ealy5JId5KMuw/+YwF7HAz5VB sIsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710845082; x=1711449882; 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=HDlVBiiHg4pmaOoXuH8MpX01GVb560GIyVnt1+W2Ilw=; b=BO/FHI1yCrqtJK+RNRt5YkmZSLj2R5x81Rid4IS+Q/udAre9n1z5BnjeIrSPrL/ora 3M9PKVd2N9MbH7xx0YDgLu86PWNdvjX7pqsYPhSe8J4HwrD4UX6+5j85PFU9aEln9mfH PsBjdA4xIzrkQxDltTimZHfT9Uf2hg7i07AdBQ3/PaFMCNqeIceCsRAP2AEpuF/EZA7r xbZW4j6b3ti5nfe7yMwil6oEaM5Q3JoQhC6UAuiP9gSRYbKQTk1A0oop4WW9BvojNn7v j9LY3G3ltg1enzaFoVSQvPeW8RXeOqg0uN8iglnvy9JBeS6WBoVP6vuCvbSgIPjwRkO0 cmEg== X-Gm-Message-State: AOJu0Ywa3F4TxrNVHyOzDAbRHYOPrLmzge4R2s1REJg7cqJyJ7Fz6EH6 P1gIkuSqxxwWDV2nc9jVTUfwgVFKIfr4C43N11NYHUMwptFEwII9hbcvZ5ZqWy0= X-Google-Smtp-Source: AGHT+IGZs6bS4wuGXvJcnPNcRn+hN4DIRrSoCaWLbaixhzIt8JvTEga0/2Q3eL0YWuG9FLqGwZMk3w== X-Received: by 2002:adf:fbd1:0:b0:33e:7054:5b2b with SMTP id d17-20020adffbd1000000b0033e70545b2bmr1463846wrs.4.1710845082283; Tue, 19 Mar 2024 03:44:42 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id a5-20020a5d4d45000000b0033e03a6b1ecsm12029459wru.18.2024.03.19.03.44.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 03:44:41 -0700 (PDT) From: Neil Armstrong Date: Tue, 19 Mar 2024 11:44:28 +0100 Subject: [PATCH 2/7] phy: qcom: qmp-pcie: refactor clock register code Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-2-926d7a4ccd80@linaro.org> References: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> In-Reply-To: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2539; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=L9f7mVzB9wMW7O3NrZIDvpmvouDLp7SdgWUnDSjbq1A=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBl+WyVqMHIPwowIY+jis50jKt8HWeaChSOf1n5Qo/s VvyV6LyJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZflslQAKCRB33NvayMhJ0cTwD/ 4oCFX/soYZyw0allUAHdZ2JeGA2i8z2dwZVs45CGAYYDPZ5upLTxBHX1I4/AWQRFCIxqpE1bjcDX99 7Z3Xz2KwKIjl8l3fAoGDoaCKj64IQ77VSio/mFt5PHdZDpYykBX/DIE0HM2IRt58mTmQxpSiWPgCZA T6FobLiQtF9uYKESOWkypSag5wV8BMNTsRF5PqeUpDirDyJk4Egdz9ovFUqVVWU57dHWDJmfzsZ6M9 2oRAsipFxKpF2jmBJX0StNlWu5xwILHpTQ3a/XpeG/hDbZj2tahcHwEVl0mgl0mhaHLIvEtdqQJBdd lDs//mTTZnggxYSsxBoMrXEW3VE1FgHfuNUtD7AHFcYaQ4f3UTr3XUrZzJCEZOsLb3zvIr1MPMlbz1 EYdHfIEGH1oEOB5sT5SIpc/ENEHHbvgPGCBHuKTp96Dw3tZOMzJ394vzmIhgNrCFUfhXKjffMH9Wyx Hxv3Wmmza4WfAfutfpUzBsd7gdocun1KTLduSxW2uLOb8QnlE1QFo8x2CUrEMKJsRU/R3Qqo+WZT0f K1Av2n3lmk3aoj5M8z5rys/HsZ9rGrSU+2XjJYtxQdwslYw9D+uaQKh/dXN9HqFysm1EVzyuTWRyHC Hy2CdIca4gZDAdlUpfoWdtQrNNxulOAH4x4Bj49WTLfeKSqecYX0XN1p9AzA== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE The PCIe Gen4x2 PHY found in the SM8[456]50 SoCs have a second clock, in order to expose it, split the current clock registering in two parts: - CCF clock registering - DT clock registering Also switch to devm_of_clk_add_hw_provider(). Signed-off-by: Neil Armstrong --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 8836bb1ff0cc..079b3e306489 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -3635,11 +3635,6 @@ static int qmp_pcie_clk_init(struct qmp_pcie *qmp) return devm_clk_bulk_get_optional(dev, num, qmp->clks); } -static void phy_clk_release_provider(void *res) -{ - of_clk_del_provider(res); -} - /* * Register a fixed rate pipe clock. * @@ -3664,7 +3659,7 @@ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np) struct clk_init_data init = { }; int ret; - ret = of_property_read_string(np, "clock-output-names", &init.name); + ret = of_property_read_string_index(np, "clock-output-names", 0, &init.name); if (ret) { dev_err(qmp->dev, "%pOFn: No clock-output-names\n", np); return ret; @@ -3683,19 +3678,19 @@ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np) fixed->hw.init = &init; - ret = devm_clk_hw_register(qmp->dev, &fixed->hw); - if (ret) - return ret; + return devm_clk_hw_register(qmp->dev, &fixed->hw); +} - ret = of_clk_add_hw_provider(np, of_clk_hw_simple_get, &fixed->hw); +static int qmp_pcie_register_clocks(struct qmp_pcie *qmp, struct device_node *np) +{ + int ret; + + ret = phy_pipe_clk_register(qmp, np); if (ret) return ret; - /* - * Roll a devm action because the clock provider is the child node, but - * the child node is not actually a device. - */ - return devm_add_action_or_reset(qmp->dev, phy_clk_release_provider, np); + return devm_of_clk_add_hw_provider(qmp->dev, of_clk_hw_simple_get, + &qmp->pipe_clk_fixed.hw); } static int qmp_pcie_parse_dt_legacy(struct qmp_pcie *qmp, struct device_node *np) @@ -3899,7 +3894,7 @@ static int qmp_pcie_probe(struct platform_device *pdev) if (ret) goto err_node_put; - ret = phy_pipe_clk_register(qmp, np); + ret = qmp_pcie_register_clocks(qmp, np); if (ret) goto err_node_put; From patchwork Tue Mar 19 10:44:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13596543 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 DA1C37D410 for ; Tue, 19 Mar 2024 10:44:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845086; cv=none; b=C0Y2QxZwy3MYBVLdZiYw5Tj9AnQ2gYyMgpkTUlo4EU7DqRTkQqjYixTlHgyO2xIhxaxu1LOxUTJ2rweTgiLbZusjJ7a9TWpE/aAArwhc+Ot8R/WGY+vJ45bjQ23I8quSjySI5+ZA9UBKPEbnCWAfc0suvajZB6MZhhP+r0OmJ+M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845086; c=relaxed/simple; bh=WsGgAE39xLO1WpNxrXfF0aN/WkAyS4SNo1d7Voxy384=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GTIT6pEF0qOjoGsJWwuVsp/c3ds5OQeZ0qomRSqbbOCfgv1TssfcF04Hg1UJ7YR4Ri89G3XnvZTJSHPfhgiHOe8pFPH3njBm1/cvnruDh8eH3SkgW7snwZP3M/k+W3uq6AEwk2aaB0fMlvND0BRk0Gx4KFmaDOSuhmHB3yDu0y8= 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=efau+ci0; arc=none smtp.client-ip=209.85.221.47 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="efau+ci0" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-3417a3151c4so1357202f8f.3 for ; Tue, 19 Mar 2024 03:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710845083; x=1711449883; 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=vaUDxu1aSxyRZXnYFOND1HceBfA/6o9Fk2GBTMCjqhg=; b=efau+ci0WufP7mMygXekY6fy7NIRO4WNproaFaPgGndVeWOSMij8hPDEA+WhjMAP+F sXqCQ5V4E0seGy7JkOO/D/TH9XOaoLgTu32PfGgIoDTN/2Ut1wSbFJOFXCZX1ikPzcVk RrQV9AWA2Ih64zTfvNZrIN56GYQll/vrlfd4pKK+Asu2XJ7CiYlIkxwS9277zqNfnw5m horJ31L+AJbRfSHFtNAyizEgfG4i5ngO3cyxLvO3eLQ64Cc01whjJ+tK8oeYhzJ3eyBN UyEG1G0VqOXKIY9FLB1UUWzZSAUJW9CISUKclKJxK1NRgQdJblGpkR5syjbSrA1U+8Vl HX0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710845083; x=1711449883; 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=vaUDxu1aSxyRZXnYFOND1HceBfA/6o9Fk2GBTMCjqhg=; b=uY95b8HfgMhTEncvZ33mDlXPjkFDb2aZEh62KW3NntSwvH+xZcX/eusXxYNWomPxro K2WMd7syU3hHaYd7UPlt7rCX8IrJxqwX3+OhfxAnUpmXLu4Dk1mpYrys8icfSr4BPu7H zwt6+/CY0Q3l4JKTLe4guKStTu46XQkKJdjNzCwv1wxpIVJyYaGXC738PO+k1Sf+hcA4 7aGFVZYy3GHpVfsC+7NbH46YFhjlBZ8HYVVFvRDmfwz67tkNGnKML/ZU3/5hgTpzDgeL jZpYd6DmjnRxSHkIlmIu2RxX8+3u264VyQS/s2E1TEPU/LTu4fFfhp8SBYt3dSpdG1xN BrNw== X-Gm-Message-State: AOJu0YxP/pE5Ln9qnyDzlm15KR5NN0BXrFNHgjSjyHtiYQB95/1QcyPC deWlnCVooh7nen9Tz6X59j0K6gbul7fuykmrXz9xXCtPe9wim14NxXtVsbxpnxs= X-Google-Smtp-Source: AGHT+IEI8FAubESL+OiWqRmez4YrJyHkp0zhMaROfLEYoQuQYkJSDscEjausMNnTYtuORRoHxflksw== X-Received: by 2002:a5d:420e:0:b0:33f:6ec1:56dd with SMTP id n14-20020a5d420e000000b0033f6ec156ddmr7618246wrq.45.1710845083167; Tue, 19 Mar 2024 03:44:43 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id a5-20020a5d4d45000000b0033e03a6b1ecsm12029459wru.18.2024.03.19.03.44.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 03:44:42 -0700 (PDT) From: Neil Armstrong Date: Tue, 19 Mar 2024 11:44:29 +0100 Subject: [PATCH 3/7] phy: qcom: qmp-pcie: register second optional PHY AUX clock Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-3-926d7a4ccd80@linaro.org> References: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> In-Reply-To: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3998; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=WsGgAE39xLO1WpNxrXfF0aN/WkAyS4SNo1d7Voxy384=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBl+WyVxmma2DSKw3/90m56VEW2t4wrDj06AsVmW6xr jurjn3aJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZflslQAKCRB33NvayMhJ0eJ7EA Ci49/QyBonFj6tTlibAF/GecKy1f4werx+qj80VTNMHp4lnZqaFjmcd5Mf36y+mo8ejHbBNVJk448Q TXtX8ILRoQzCPl4EhvAJIKLQdqoS9jynPhkVnN/BfMvt4Z3KGwIQGjNCcBjJZJdo2LVBs6qlWGsivm Lwru5OgO1kRvo0JYWs9INIqH2Pkua4sen+yy4repsxhxS1+pnY3Cbt+ijHz7Meq/BmJKjQ51iPoR1o uoB0Mk9xEPgAHTZZKA214XRQL2UsvUsf3V//3wuHX5Qu5GrEZ2XVNxwDw3hD1gyYFXNNac12iGWVYu Xi5pT5vu0HkqR9bGSepW2fKD+rAvqUpWqRJ2MDzSjrtX2i0K/7mQP79ZtZiJ1UQhraZyJkiWmwH44m 8TAaLzuQhsPoAQtcfCmYnkXI4uU+INxioz23jM1kFZ2tsqevV5Top4womKXrL0xt0FfSDFnerrGWNr eqUD1iQ7PYDRYg0qh7O6WpkJHEEOiioIFSmTMBPgAF8/N475ppBZJ8n3HZcTiAOpUdtmFeC9WxHJli v1lo+blY9rjF7fmF3Bdf3VOLa7kZ6/esa1aZNHKOlls8R38Bdv6m2Xhr87ZvQZ6tbLSeJTmLkNLMid x8sC12HuRi8gFf9hB8eUEj6p813xjDgMr0BoYTnxpBxOP8CvB+bGmMtvTM4A== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE The PCIe Gen4x2 PHY found in the SM8[456]50 SoCs have a second clock, add the code to register it for PHYs configs that sets a aux_clock_rate. In order to get the right clock, add qmp_pcie_clk_hw_get() which uses the newly introduced QMP_PCIE_PIPE_CLK & QMP_PCIE_PHY_AUX_CLK clock IDs and also supports the legacy bindings by returning the PIPE clock. Signed-off-by: Neil Armstrong --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 70 ++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 079b3e306489..2d05226ae200 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -22,6 +22,8 @@ #include #include +#include + #include "phy-qcom-qmp-common.h" #include "phy-qcom-qmp.h" @@ -2389,6 +2391,9 @@ struct qmp_phy_cfg { /* QMP PHY pipe clock interface rate */ unsigned long pipe_clock_rate; + + /* QMP PHY AUX clock interface rate */ + unsigned long aux_clock_rate; }; struct qmp_pcie { @@ -2420,6 +2425,7 @@ struct qmp_pcie { int mode; struct clk_fixed_rate pipe_clk_fixed; + struct clk_fixed_rate aux_clk_fixed; }; static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) @@ -3681,6 +3687,62 @@ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np) return devm_clk_hw_register(qmp->dev, &fixed->hw); } +/* + * Register a fixed rate PHY aux clock. + * + * The _phy_aux_clksrc generated by PHY goes to the GCC that gate + * controls it. The _phy_aux_clk coming out of the GCC is requested + * by the PHY driver for its operations. + * We register the _phy_aux_clksrc here. The gcc driver takes care + * of assigning this _phy_aux_clksrc as parent to _phy_aux_clk. + * Below picture shows this relationship. + * + * +---------------+ + * | PHY block |<<---------------------------------------------+ + * | | | + * | +-------+ | +-----+ | + * I/P---^-->| PLL |---^--->phy_aux_clksrc--->| GCC |--->phy_aux_clk---+ + * clk | +-------+ | +-----+ + * +---------------+ + */ +static int phy_aux_clk_register(struct qmp_pcie *qmp, struct device_node *np) +{ + struct clk_fixed_rate *fixed = &qmp->aux_clk_fixed; + struct clk_init_data init = { }; + int ret; + + ret = of_property_read_string_index(np, "clock-output-names", 1, &init.name); + if (ret) { + dev_err(qmp->dev, "%pOFn: No clock-output-names index 1\n", np); + return ret; + } + + init.ops = &clk_fixed_rate_ops; + + fixed->fixed_rate = qmp->cfg->aux_clock_rate; + fixed->hw.init = &init; + + return devm_clk_hw_register(qmp->dev, &fixed->hw); +} + +static struct clk_hw *qmp_pcie_clk_hw_get(struct of_phandle_args *clkspec, void *data) +{ + struct qmp_pcie *qmp = data; + + /* Support legacy bindings */ + if (!clkspec->args_count) + return &qmp->pipe_clk_fixed.hw; + + switch (clkspec->args[0]) { + case QMP_PCIE_PIPE_CLK: + return &qmp->pipe_clk_fixed.hw; + case QMP_PCIE_PHY_AUX_CLK: + return &qmp->aux_clk_fixed.hw; + } + + return ERR_PTR(-EINVAL); +} + static int qmp_pcie_register_clocks(struct qmp_pcie *qmp, struct device_node *np) { int ret; @@ -3689,6 +3751,14 @@ static int qmp_pcie_register_clocks(struct qmp_pcie *qmp, struct device_node *np if (ret) return ret; + if (qmp->cfg->aux_clock_rate) { + ret = phy_aux_clk_register(qmp, np); + if (ret) + return ret; + + return devm_of_clk_add_hw_provider(qmp->dev, qmp_pcie_clk_hw_get, qmp); + } + return devm_of_clk_add_hw_provider(qmp->dev, of_clk_hw_simple_get, &qmp->pipe_clk_fixed.hw); } From patchwork Tue Mar 19 10:44:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13596544 Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (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 D34B47EEF5 for ; Tue, 19 Mar 2024 10:44:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845087; cv=none; b=RdCNXSw0xCNnpyqNxiOpq9X9wL4NsBwrMzO9YtnEpUAoQtHczKrd9FqQOK97pjLJpXg0rjqXl0mr8mnlGbUx45EvNld0QY+2MoN/3rL0E4c7mVETvD63Gep8czCv/9y0xp8zHCshEhWfr9G/toDFmdO35fzeA0IzsWcjFcv7OVc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845087; c=relaxed/simple; bh=7QLKA3QCwIHTu1uCl4Uft63n6NWS0zSd7AfWUoODRBU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Z/op0Za9Etsat8+fUwQS2Owu5j9rM4eIKoddTJx7WP0tGzZow59N+3w2fazYOY1UxPqLeg7fhfDCYVrl9a7htApwg0ye3rSS3ZrSDs6BhNh7awd/C+uDZLZEtiJnDpSawuiul5kdaQsv8y9JHkct0YG/1sBuwscsUnA6V1s+Sso= 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=nr/njxoY; arc=none smtp.client-ip=209.85.167.46 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="nr/njxoY" Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-513da1c1f26so6153982e87.3 for ; Tue, 19 Mar 2024 03:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710845084; x=1711449884; 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=8m1FyG5u8GQQEct7h4s3Nz1dXp2hiHWagDMj+Ic2EoY=; b=nr/njxoY+tmi9U4/ucBZbi/9dcZQ7fL31pCi69ir5M53rUNKnM4Hu/qyhmyrZbHvg9 YNdory/A8sITNjRiDfn3RJj8QC/+mqOrvCkmGLJ9BxVk8fMvnuh6LS+48+w4XrUZ+0+m Cx+a7Pc6WhL4miz8DFmefyXHlCKmV43SEU+2WvaGuZQKBNnPkYF9sRttRnxJtPIZfyIZ gVqZES87lk7oy6aeSzUmixGq4VEUmOHr2ilb/Wa55nFXgzGpkn/orHZ8bVpkW/yzDbHv 3rBnfqL5/ohCV36qZ0R37aFB7rz1L3818MaDCdAVeip8hhBPbmIovjXXHof6DfTwUkmo DKcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710845084; x=1711449884; 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=8m1FyG5u8GQQEct7h4s3Nz1dXp2hiHWagDMj+Ic2EoY=; b=Me3ORYy2141/GR5pdghokK/4veBV+2vsEVpA860BrLWeUc2Fu0Efjz/ezUWC+dgO/o a7HcX3nu/fLkZkL88TZRP4zk6ogaEnZlinuCuoDBwMja2AuvwGn5SRnE8voTz0Jn+/9H cNjmgGoYOGCnpiGMjVNe7S0TNE3dCc4uExHs8v8mvOZ50z5jwcEZF8Um+fZusH8UV92f rLkigyxE8dqiUO5O4BTdcpQ66m10Fho15VXz/yhERcWq2DUvVn9YGZCq9oeTmoDFMYPv Z76nfZyKlwHxcagXJrNfzN9oQbg99worMFYgMW+y2kvsrhVctENvMdck1BGmk5PHQ8oq shrg== X-Gm-Message-State: AOJu0Yy9dvSSZxctHbNFZwV9YJe4/3KFx3nyOLLRiJncuRHT3oJjUurp LdVZD+hUbjr56lt/ULNOtlNsuXQ/fJNf93zhniEWazLcZwBeHzFdg8uVeQsCO3o= X-Google-Smtp-Source: AGHT+IH4qgI06dPYApwodVQ3FTy74M/71xFzY2Rk7TQE3K2QipKLf85i9PNvOV0/4Gk2z5jeC02FQQ== X-Received: by 2002:a19:4353:0:b0:513:cc91:9ed7 with SMTP id m19-20020a194353000000b00513cc919ed7mr9114318lfj.11.1710845084028; Tue, 19 Mar 2024 03:44:44 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id a5-20020a5d4d45000000b0033e03a6b1ecsm12029459wru.18.2024.03.19.03.44.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 03:44:43 -0700 (PDT) From: Neil Armstrong Date: Tue, 19 Mar 2024 11:44:30 +0100 Subject: [PATCH 4/7] phy: qcom: qmp-pcie: register PHY AUX clock for SM8[456]50 4x2 PCIe PHY Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-4-926d7a4ccd80@linaro.org> References: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> In-Reply-To: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1591; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=7QLKA3QCwIHTu1uCl4Uft63n6NWS0zSd7AfWUoODRBU=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBl+WyVAZDzXPG4KQTDQzLaM56V66kA63IMsZinIMaF RF3mAvCJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZflslQAKCRB33NvayMhJ0YCoD/ 480ztKunFuE+cthxpgF2RoGG+eQevCPiCjSpq6O0B/HkpJWOiFzXAhAg8LU3hUWvPzZA2WPwRQt/tE uDH+Jpbi1gFTDqLxDksVgl1r6Lgq5MrXfqOFfXoVhbK4D9Dl32xOzFnfsu1SgUKgyFv+9oUo8jiLJh tl8d43+NSrz3WlI5wipy0S7BKgugJ2edl8bM4B7aMZXKwZOuegivHk+UU1LzClaPQfXmz+73szI6Q/ S9BKQQ2cPupiBymf4mdw7NisbsAPSC19vZ51MYONjXkaVoFVMCMucIFOo5vBd1gGoAX/3+IVrvCnih e51bEMEZfcGZi1yZQFsBWs9YY/oktcJTJyXY6GZz+jbmwUWZuhFY8+gsbT46YQKRXaGJBF0EQl/Ttb n8Om/JYuYbkT/l7HOszxStDFIGxx2ib0bq4Gz7IDMsXJsJ6ismk1r2xQU5GiLifz9cO7o9/tqJJozz iTRALtmM80MY1tyj5hd0rbXgbkt7VV/AK51BjEWkLVcAhwdD5YJVpVpQlmedCMaZ0Qdp/Mf4Aq/N6w 2RJnfVTjm8dhe8rqKUCBMIHicZPx3XIb8kAAApj69vQz/u/ElHuLi79FS/cF5x9g0a0rabZg70Gbwi /e7j8bcwhg7dBHbDwSjSC9kvpefl/9E4vbKmKeNE6xDqUobH8FZ2H1gcZelg== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE The PCIe Gen4x2 PHY found in the SM8[456]50 SoCs have a second clock, enable this second clock by setting the proper 20MHz hardware rate in the Gen4x2 SM8[456]50 aux_clock_rate config fields. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 2d05226ae200..cea5655ddc21 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -3141,6 +3141,9 @@ static const struct qmp_phy_cfg sm8450_qmp_gen4x2_pciephy_cfg = { .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, .phy_status = PHYSTATUS_4_20, + + /* 20MHz PHY AUX Clock */ + .aux_clock_rate = 20000000, }; static const struct qmp_phy_cfg sm8550_qmp_gen3x2_pciephy_cfg = { @@ -3198,6 +3201,9 @@ static const struct qmp_phy_cfg sm8550_qmp_gen4x2_pciephy_cfg = { .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, .phy_status = PHYSTATUS_4_20, .has_nocsr_reset = true, + + /* 20MHz PHY AUX Clock */ + .aux_clock_rate = 20000000, }; static const struct qmp_phy_cfg sm8650_qmp_gen4x2_pciephy_cfg = { @@ -3228,6 +3234,9 @@ static const struct qmp_phy_cfg sm8650_qmp_gen4x2_pciephy_cfg = { .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL, .phy_status = PHYSTATUS_4_20, .has_nocsr_reset = true, + + /* 20MHz PHY AUX Clock */ + .aux_clock_rate = 20000000, }; static const struct qmp_phy_cfg sa8775p_qmp_gen4x2_pciephy_cfg = { From patchwork Tue Mar 19 10:44:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13596545 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 96CBE7EF14 for ; Tue, 19 Mar 2024 10:44:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845089; cv=none; b=oPZ5ac//KSyRPx453eRND+nHMVteZhEdpi9sfSRV8Ulq/iSN6sMQcCkHy3dcAzgoZQEWAd/X2hGZZE2UoboA9Ue8of+DrctK5/VM8LFu3Wg4EkfwbgudBw+3meZ15sFiJM5s/Iqyy7VtPX5tm7leGXCX0ZwqRxG9Bq3z6un8XMk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845089; c=relaxed/simple; bh=28QU0YMkxsZqPqQJ114lR4c0tKsd6LuTZoqIQzDtKfA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Da8gNBSYIdeN6T/x+ZMC7BhUI1+5X6j3YFDe2nA4EQE4XYt0kAOfewFId1zXpSNkKPZOUSaLYnc5pmW6VY6xcsJePE+vtpS+NV6vKGTqtuGgX7uAN2bIicFE5C2+okOhmwMvNPoixVxccONgOUW4lBdJaCL9ekqJTt8zNpsiGPA= 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=B7lmMTyz; arc=none smtp.client-ip=209.85.128.44 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="B7lmMTyz" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4146562a839so3121195e9.1 for ; Tue, 19 Mar 2024 03:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710845085; x=1711449885; 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=TKxzKi63wMAR+w/KLt9riuAXy6iLFW71XAlwS8JaxNQ=; b=B7lmMTyzz1FqRAFVZEvs9sh67DlSN5oVqXPbEfuudtzfD38Kdholtir/j2YKlp1Fpp ofQIxAXNBcx32Lit6LAG2Wxscc5v8BKec/pU6w1VpNt5BE2DWLlNbJpdFkLbRaE2Ck6w yquFO0G9KrnfDZtHG2IFwumgwSw9lb31+aaVIVAoJ97OqJsizAmjoCjHb+XbnGreO1BN lknF5lfiOWHjEGXAXxZmAoJvzE/6WC/zSlCA6NHP3PFASkGwRJPUtIlOVboLKFFos2P3 Xl6TlBGNt5S10m4H0IBq5KPtd/JM6DCNjfzGSi6rJA9rPWKmoYQVLmYqQO1FhfVL3pi4 HNLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710845085; x=1711449885; 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=TKxzKi63wMAR+w/KLt9riuAXy6iLFW71XAlwS8JaxNQ=; b=jzY5OkUBsof9u9DF4hRa2pmkIJoLyx/xWtFXg81GntZuVCmHH7ifuWvf3WI6WvQsxy HKyX9eQeuXlb9P3bBXOkuHLtoiUbIhojX57iVYv1Lz9RkLx9eFZ/JJqQ9JM1ukzC1Igt SRVwjB0Ur3m9AfVq6sQIN3GUxEmrt+JZSg3QlHLR+jeuwuZOiOxQBqRwavQvp4Rnuc5c cVqqGT59QhstIHelXopazpzQop/nRarthyVe77ooTXkkjINyaGrDhgSq11VMGm1eckkI qYbj4jbkPEiIH2ofjUMktz9T0cQLfsXa6fj5q/XrR9uw7qo3VE21apLeR46a2i4ZSw+B h6sQ== X-Gm-Message-State: AOJu0YwbonbHHp6letE05CBMUrgXQw33KZckrMJkkGJ51yJ6SzQUuhcY j5q9ry/HmUGGc6NEXraPYSqH2tZoGATp3s4LbqM3Q4125XptJH4y71RwaQXqY8o= X-Google-Smtp-Source: AGHT+IEDFC1DurTYuBJ7R06UovGCEH/D9ddBQhJH+4Ic+m3CHU6PMj8rujDEUk3Hdr2MZJazyqb7MA== X-Received: by 2002:a05:600c:35ca:b0:414:1a5:2085 with SMTP id r10-20020a05600c35ca00b0041401a52085mr1629807wmq.31.1710845084932; Tue, 19 Mar 2024 03:44:44 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id a5-20020a5d4d45000000b0033e03a6b1ecsm12029459wru.18.2024.03.19.03.44.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 03:44:44 -0700 (PDT) From: Neil Armstrong Date: Tue, 19 Mar 2024 11:44:31 +0100 Subject: [PATCH 5/7] arm64: dts: qcom: sm8450: remove pcie-1-phy-aux-clk and add pcie1_phy pcie1_phy_aux_clk Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-5-926d7a4ccd80@linaro.org> References: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> In-Reply-To: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1114; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=28QU0YMkxsZqPqQJ114lR4c0tKsd6LuTZoqIQzDtKfA=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBl+WyWRDFCl1NGQlpfuEOp55FUPam2rC6jwM7FxeDO MtEgG3SJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZflslgAKCRB33NvayMhJ0X9SD/ wImYyLETMlaFFSv1nqApfKP20/9bFzojePtu6Epe8SlATlT20A1aPwVSrKm19mn11fsm54l8T7V80h 0Lb+K0O86nMZaJihw6+pdkFgu6CxRzt8ZNcCmaqcuOoDl3EDtiDlNaQ4pqMMSpylyNgS15r9gl+T6h azbpG/8GqpuQsw5cq8xq+oiZ02IOlkHif5PqwQdO3IgcmgKkm8wg9XhJXxk7PhZfSJn1SVpnIDxaNv +nmCqm5GM8Yes+cRgbKRQCJfsJBo1KD+sFbKRarmrq9t2IBzeGUEITOzEIRlP0ZtrLA9C9JngyFgdX La378Qqw1rhQS5rlom+0fs4ahwDuUDR8Af7rVP7Qi2XbK212sRQcwTvGTrUoNbliL6a6AK/KvHWC6G DiYaUl0p3BURGVPyBeOaZJTfP/tm3AQNBeit6Ek2cFHdv7uYlj7ySw0KjUndbuTS9U2fVR2D1ZfksX inE/BJ+VYwAoXF0CJSco6wnlneofjHmM7LNwvNLcyxMUYHmYJEIgXTfdqBsVL67jeoHqEf6vKfD1yL y4vpofGRjqk2UcEYN1NxFgceC7EI2Q6Kiv17YueQfWFyYugTlEYZTBPr+JTDMgmGbUX3HmF6dGeZ8X 2QoLRbxoex+eaI11httmhxNLYW3IdpaGY2KC4+dAxRAC2M3sSUZuVgsi2HVQ== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Remove the dummy pcie-1-phy-aux-clk clock and replace with the pcie1_phy provided QMP_PCIE_PHY_AUX_CLK. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8450.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index b86be34a912b..32361af98936 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -754,8 +754,8 @@ gcc: clock-controller@100000 { clocks = <&rpmhcc RPMH_CXO_CLK>, <&sleep_clk>, <&pcie0_phy>, - <&pcie1_phy>, - <0>, + <&pcie1_phy QMP_PCIE_PIPE_CLK>, + <&pcie1_phy QMP_PCIE_PHY_AUX_CLK>, <&ufs_mem_phy 0>, <&ufs_mem_phy 1>, <&ufs_mem_phy 2>, @@ -1988,8 +1988,8 @@ pcie1_phy: phy@1c0e000 { "rchng", "pipe"; - clock-output-names = "pcie_1_pipe_clk"; - #clock-cells = <0>; + clock-output-names = "pcie_1_pipe_clk", "pcie_1_phy_aux_clk"; + #clock-cells = <1>; #phy-cells = <0>; From patchwork Tue Mar 19 10:44:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13596546 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 A511F7F477 for ; Tue, 19 Mar 2024 10:44:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845089; cv=none; b=VIGvUKupEaZ+Zpo3lZkLDTz/vAKeau00X72NjbqmCCpDEW0Z64X1W+TiL6ljrUZ0qIMBsE1WYL0hySwBTgEM6yNbCnByAQlVLtOE2oTVr3kVBi43eL7XmRuXgfc5m9CWJ+ZIFNLP+ubacoeJihTigo9J+gpIuV75+KZNU8NZ0Xo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845089; c=relaxed/simple; bh=tPydKqk2YSla66EnZFuqclyzKir7dE9KK2iKURNVrUY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O4yNSAw/hzhOKGo9Pvl8gXXAGQ1hLeLMTqmHnfr/8KZBWRUJCO1utnWNjFVAmghoTqT4MjSjhoqW1VQA3DOmzQB1eafldjWmA6BKBrRSdJvzcyZYutGQscruPrrwFdaA50lN6kiYIjw2Fpm5H2zn3Swkt1uMRw0M0YP0tek0648= 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=QKBiRhDY; arc=none smtp.client-ip=209.85.128.46 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="QKBiRhDY" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-41413c99748so12041095e9.0 for ; Tue, 19 Mar 2024 03:44:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710845086; x=1711449886; 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=KcCFlDSNEFtoMH4ZYLS7c8L9gm9nhZvpG39nlVIAzsM=; b=QKBiRhDYRrjSww2nsoBNfdSY8/koJfsEK8XZCWo02G+LrzadgaqPDEWzQb7JX6Oe20 zNhpntU24Y6QQkFU7MFNfmSv/KJcEM6a6W5FzOYthvF3d3E71SJgEYXGIOY3jOpIO5u8 4UbHlKHpBIyHQmyH0czcPz7RzaMsP11Tfg9i/mvhFQaMSpe7eY5Jyeygl7adAYmmYMdr jnfiCiYJDWqYDlMtixDtinNHwPTgIVHJRI/PDVGWDxDmBSQl2F5QL2kcX3sbfrohRS5/ xb1IagS7xRwDCWyEl+/t/hXmtUh76Z8Yu2mOucCijveCn3CcOGVG9nB98tK1Ri4v08mx s7Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710845086; x=1711449886; 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=KcCFlDSNEFtoMH4ZYLS7c8L9gm9nhZvpG39nlVIAzsM=; b=dicOGv2oAgigUZi9hgN4j0KSEv+6vreT4oY3L2vGGlvQQxBdERu96B9cC05JemzWjf DZtUSl7NDlSxVeJUQIAn1xn8xP6CQU0CubkH84skMrQkLALGEqcu4dvNwE8QieAPWsSU a2nIuft3ZVOK3YEOcwEyaXXFSg+6eurfHkXUnRICgefNgYX78btoDvmxJReWaM8RfXNO twEzcLI1EXz43Hpi3A5p5el6tDG/wMQ+FQf+iQloIZZYNnzv9mBAjwHKy/tX6gZpNhnn 4Fb2ZtAQXu0+bNvBLWYO2chNsH9vC9q/3wPefbj4G0/ilCKsNDxwecXtoYyM+ff2gbOR Kuag== X-Gm-Message-State: AOJu0Yx7K7GTp2ggEUpkop9WVcMy74aeC5SAqRRjIqXgNODCSmeeyENA NhFfHIY8M+fdjcNUdz8W82ExQd6MTw2K6w1aBberE1WsTCyCRDzbDD3TRmji/J8= X-Google-Smtp-Source: AGHT+IGgC3joZ9SNi4vPETCkXKlOcafq5dmogQJtOOsU88NpKN/dbbbiashGUrT444nIasUFcRj9aw== X-Received: by 2002:a05:600c:4e93:b0:414:22b5:c32c with SMTP id f19-20020a05600c4e9300b0041422b5c32cmr1509952wmq.37.1710845086023; Tue, 19 Mar 2024 03:44:46 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id a5-20020a5d4d45000000b0033e03a6b1ecsm12029459wru.18.2024.03.19.03.44.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 03:44:45 -0700 (PDT) From: Neil Armstrong Date: Tue, 19 Mar 2024 11:44:32 +0100 Subject: [PATCH 6/7] arm64: dts: qcom: sm8550: remove pcie-1-phy-aux-clk and add pcie1_phy pcie1_phy_aux_clk Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-6-926d7a4ccd80@linaro.org> References: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> In-Reply-To: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3132; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=tPydKqk2YSla66EnZFuqclyzKir7dE9KK2iKURNVrUY=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBl+WyWIIf6eAULGJi+KYMNFWeRDbZQecFnv0jc1Bih YiqNcQiJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZflslgAKCRB33NvayMhJ0UKIEA CREHuVTxqFBzS8w1qctN3Q/TWUi+O2WvULNAIc8TrdkVKqYE1zi/eslMXMTM+vyA3GmXSwKoj+JAbf 1PivkwHl6csnRWJg32j+EhYkNTxnvJvett9F88fOBTOadAKJSz9jc00GAVTSpeacugGoqNiSZuAG4j gG9+DZuBquLDamG4+EV1t5RI9snBRluKJMXOg9VWtUVmiNB8zfecdlNVctAkKpO/nm1rqo44C7A+vM cz9AAiIooCYmJDe8DJYGj+SYNnrdw+EFmlQk6tViRJdfChs11bQQEPsv7ePfCOz9uABN+DIkaIL4ks vOP8lPHakyl+3RxOGFKs6znQKGB03qnqvpvHZwXAz/3J01GEKyK6mX/ajlqYqRl7i31Fsm0sfW5XLw ulQ09aTXg7lP3IA7PGY18/9aW5p9y2FRPKuVP/QNIQkoa1+NYmWcn7C0gZRp1iVrurbnfXfLmBubxN s/vN51Y5QYVDu40QgS6wmLHanpQSvVqq+A7i3u/Rj1ClpNKM9WVgC1PcKT2MB1Bs0TYrjT1aM95WCv w2VTCUGpaA7zjwi0XdCBaTwZb9CyK3Y6UX9H9t97qZgUSqlN5ww1cOcIdVVnz7qYxraXsCvglFSZEH 3Jqc8o2shaZ7eZ2wlDqHWqWvSWIXEVSRFUl8+UX04hJ893SqiLyAJApiPIng== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Remove the dummy pcie-1-phy-aux-clk clock and replace with the pcie1_phy provided QMP_PCIE_PHY_AUX_CLK. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8550-hdk.dts | 4 ---- arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 4 ---- arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 8 -------- arch/arm64/boot/dts/qcom/sm8550.dtsi | 13 ++++--------- 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts index 12d60a0ee095..ccff744dcd14 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-hdk.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-hdk.dts @@ -979,10 +979,6 @@ &pcie1_phy { status = "okay"; }; -&pcie_1_phy_aux_clk { - clock-frequency = <1000>; -}; - &pm8550_gpios { sdc2_card_det_n: sdc2-card-det-state { pins = "gpio12"; diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts index 3d4ad5aac70f..1fa7c4492057 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts @@ -739,10 +739,6 @@ &mdss_dp0_out { remote-endpoint = <&usb_dp_qmpphy_dp_in>; }; -&pcie_1_phy_aux_clk { - clock-frequency = <1000>; -}; - &pcie0 { wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts index 92f015017418..da3cfa697969 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts @@ -810,10 +810,6 @@ &mdss_dp0_out { remote-endpoint = <&usb_dp_qmpphy_dp_in>; }; -&pcie_1_phy_aux_clk { - status = "disabled"; -}; - &pcie0 { wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; @@ -907,10 +903,6 @@ &pon_resin { status = "okay"; }; -&pcie_1_phy_aux_clk { - clock-frequency = <1000>; -}; - &qupv3_id_0 { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi index 3904348075f6..c74455dfd354 100644 --- a/arch/arm64/boot/dts/qcom/sm8550.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi @@ -58,11 +58,6 @@ bi_tcxo_ao_div2: bi-tcxo-ao-div2-clk { clock-mult = <1>; clock-div = <2>; }; - - pcie_1_phy_aux_clk: pcie-1-phy-aux-clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - }; }; cpus { @@ -776,8 +771,8 @@ gcc: clock-controller@100000 { #power-domain-cells = <1>; clocks = <&bi_tcxo_div2>, <&sleep_clk>, <&pcie0_phy>, - <&pcie1_phy>, - <&pcie_1_phy_aux_clk>, + <&pcie1_phy QMP_PCIE_PIPE_CLK>, + <&pcie1_phy QMP_PCIE_PHY_AUX_CLK>, <&ufs_mem_phy 0>, <&ufs_mem_phy 1>, <&ufs_mem_phy 2>, @@ -1906,8 +1901,8 @@ pcie1_phy: phy@1c0e000 { power-domains = <&gcc PCIE_1_PHY_GDSC>; - #clock-cells = <0>; - clock-output-names = "pcie1_pipe_clk"; + #clock-cells = <1>; + clock-output-names = "pcie1_pipe_clk", "pcie1_phy_aux_clk"; #phy-cells = <0>; From patchwork Tue Mar 19 10:44:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13596547 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (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 BC0D97F7C9 for ; Tue, 19 Mar 2024 10:44:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845090; cv=none; b=II5f17gnjZlu32Ugs+rRlnUKSzTyvbjz5OZJqQL6KK7waYZkmjLcLMQaD0mKGwqwWjRKRfT9YmJRoZy3nDRwNCJQD+YupXxU4b9eLNVx+GEchpQwTp6NsCAXj0BEDOosW3p3eBl9J237HSj4xRLI+tudH2M+UVJLOU/mSqau6WM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710845090; c=relaxed/simple; bh=xL8h4eyyWci29QidVxDLfR9l9WmgeWgRBwZjFy3/qKU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=l9Yu7IVFGl2fUH1Dh1jJEMYUA8nqgk2OaLY8OVv486IndTc6hGW94ocMDCesRZDspUZ86br5VfQUvYHrvufful1mW1Z941GfkFRlgdEsz6xmOX+OTD3Php2BF4T0mRiRr0XmbssBPnHMNtxEXx4GuoY19tMlvj21nrex7sOiBEE= 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=REDceqpZ; arc=none smtp.client-ip=209.85.128.41 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="REDceqpZ" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-41468993f93so483795e9.3 for ; Tue, 19 Mar 2024 03:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710845087; x=1711449887; 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=ty3VrFMi2Un83tZJpEiaZ9eSHCnRrlGoPwQ7PufQuP0=; b=REDceqpZIRF2An/v6ZtIxjDZ8yw7eJV7QBNSetNUGnREGK+wR3Bc298nvwHeA/VuWz LuammWX4ilRBnoWNFnKTZNPQiAsCK+A3TWdJ2iePbQd2pcZnsLtLiuMNt+2e8ifm99uA Ps6qs9o1gUbApIXf39zZn/urGDZomrERFaqAQZpkAs33oBzbp2AND0YspmZQr86AhMOB 46YO3YmgYpjTbJ1zVv22aUQatkSVuKPxXw/FSzchPEj4SfIfj9Yg7MT99iWmynnO4PZW Gfd2WA9ZbhurYRS1KliPCdDak5Ey/t0R7OmZmFrWHJuR3rhmMy2C1fVvHFIb87h/m5mO rbPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710845087; x=1711449887; 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=ty3VrFMi2Un83tZJpEiaZ9eSHCnRrlGoPwQ7PufQuP0=; b=CuYvgTFHxvmZmS0big2tKBHZsAfUItXGUcR5trnFLWpluY55laaFGxYk6KSAQMPVZ1 uvvph8Wu/MkOvRGcW/RHXNioHca1WfVwYtUA8AolRTPNZ2cVgQNqWUJIqgkBkXHb8sa+ VAfCNr7Eyhbx944cdwAgqx4dGAxNS9jBDPzUwztU0mCf/1uIJ2yY2/I5mfp21/xq/vhT 7D1DaZjO5HA9+2JsjBAOGlEU9grKCIMx3LlY45p1o7dPuSkH8W3izYtbfiuDFwme04nN +Ids9p5ZKScRo8Qzf4tMehUmOVfPq3V1zTahcQ8yL8wOi7ZooZdj8i10v5b11Fpeo7zl aR4A== X-Gm-Message-State: AOJu0YyzSXjWW4AUOtd/5rxvtfbF4imZ7fxQpO/fN9qyVXFYdOvAxAaT 7u0n7rqjp82RzBr2SJaAwBpC/COK4hgh/WQJEjVYzO8+WDEOmoMo1HXfzfxvOXTHxVMAoeZrycE 5hD0= X-Google-Smtp-Source: AGHT+IHDUjCnXWox7pyr/ZefGE91CNvjYVpHS8QiFFtd707Y/0mFvdcstW0ixdbZPpAvgibXV9v+Lg== X-Received: by 2002:a05:6000:1805:b0:33e:5310:820f with SMTP id m5-20020a056000180500b0033e5310820fmr1468072wrh.67.1710845087159; Tue, 19 Mar 2024 03:44:47 -0700 (PDT) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id a5-20020a5d4d45000000b0033e03a6b1ecsm12029459wru.18.2024.03.19.03.44.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 03:44:46 -0700 (PDT) From: Neil Armstrong Date: Tue, 19 Mar 2024 11:44:33 +0100 Subject: [PATCH 7/7] arm64: dts: qcom: sm8650: remove pcie-1-phy-aux-clk and add pcie1_phy pcie1_phy_aux_clk Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-7-926d7a4ccd80@linaro.org> References: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> In-Reply-To: <20240319-topic-sm8x50-upstream-pcie-1-phy-aux-clk-v1-0-926d7a4ccd80@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2393; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=xL8h4eyyWci29QidVxDLfR9l9WmgeWgRBwZjFy3/qKU=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBl+WyXSPEU8h87XAYp3k8Wphua7O1IBTEZXA2fRZKA csAIZCyJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZflslwAKCRB33NvayMhJ0a5REA DFLrlJVrlPgp1qAFKTSAlhaK8VNJVQ+cWx3mJfZbntkamF9yQRQ1MAzJyMi+LP3WPCddk2lbXwl4Bf WdZ7wOFJ2gDBBZX3j5NlfWeHlWHh2eybHELJzsFou6loQO9tuPnzIfSOw1iQ/9Wp006ieX88hwyP4b euTBxe1EgZB3bsSVt1fmfWRu0cXxarjjKg8kWYKofFL+bZVLXEAdf1O/PR8J2WE4oXLc4WA5/7llWQ Ao4pfNsBZFuSzPoDzoBSebX5kyvLMSJykJcsPxTzzz4QQI1110E+a9LMlh5D+kWkO6f2+d0n9z700v Nh528LWb0zUPeGbibCmZEgQGv6oLtkxPSfqf1bMU5tW+aKWzLrw+MmBAb+JA1lZOcQzoeDHRjXmaDP OIYWiM9skcAYfFCPmz5yhkgdCQB3Av/7mMbLHTh0zMXLFbxllRBEtdQYBWNrznYjqhre7QiRTlRkjc m9aw/7icsNc8x1Z0oTTdK/NmpZQhDSrc8W+irx9A/WKIcAELwMOwcqio/F4tkj3J86ZihL7XuFEi22 UE0EKl7NrLf/KfaYqNOTQHIA8y30RbM0UOc/HefZFiDWiLPG87+ubw8VFnZn2US7A7q0STym7O7V/c p+l3viI2yKkkbijvh8ma182IGqDdIzWd797/LNn5qj0ZSTkeqWWq2hQPKSpw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE Remove the dummy pcie-1-phy-aux-clk clock and replace with the pcie1_phy provided QMP_PCIE_PHY_AUX_CLK. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sm8650-mtp.dts | 4 ---- arch/arm64/boot/dts/qcom/sm8650-qrd.dts | 4 ---- arch/arm64/boot/dts/qcom/sm8650.dtsi | 13 ++++--------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts index 4450273f9667..95d0c2baef2b 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-mtp.dts @@ -645,10 +645,6 @@ &mdss_mdp { status = "okay"; }; -&pcie_1_phy_aux_clk { - clock-frequency = <1000>; -}; - &pcie0 { wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; diff --git a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts index b07cac2e5bc8..c6e907e40af1 100644 --- a/arch/arm64/boot/dts/qcom/sm8650-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8650-qrd.dts @@ -831,10 +831,6 @@ &mdss_mdp { status = "okay"; }; -&pcie_1_phy_aux_clk { - clock-frequency = <1000>; -}; - &pcie0 { wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>; diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi index ba72d8f38420..6e4362bbcc3a 100644 --- a/arch/arm64/boot/dts/qcom/sm8650.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi @@ -60,11 +60,6 @@ bi_tcxo_ao_div2: bi-tcxo-ao-div2-clk { clock-mult = <1>; clock-div = <2>; }; - - pcie_1_phy_aux_clk: pcie-1-phy-aux-clk { - compatible = "fixed-clock"; - #clock-cells = <0>; - }; }; cpus { @@ -758,8 +753,8 @@ gcc: clock-controller@100000 { <&bi_tcxo_ao_div2>, <&sleep_clk>, <&pcie0_phy>, - <&pcie1_phy>, - <&pcie_1_phy_aux_clk>, + <&pcie1_phy QMP_PCIE_PIPE_CLK>, + <&pcie1_phy QMP_PCIE_PHY_AUX_CLK>, <&ufs_mem_phy 0>, <&ufs_mem_phy 1>, <&ufs_mem_phy 2>, @@ -2449,8 +2444,8 @@ pcie1_phy: phy@1c0e000 { power-domains = <&gcc PCIE_1_PHY_GDSC>; - #clock-cells = <0>; - clock-output-names = "pcie1_pipe_clk"; + #clock-cells = <1>; + clock-output-names = "pcie1_pipe_clk", "pcie1_phy_aux_clk"; #phy-cells = <0>;