* [PATCH 0/8] scsi: ufs: qcom: fix UFSDHCD support on MSM8996 platform
@ 2024-02-09 21:50 Dmitry Baryshkov
2024-02-09 21:50 ` [PATCH 1/8] dt-bindings: ufs: qcom,ufs: add second RX lane " Dmitry Baryshkov
` (7 more replies)
0 siblings, 8 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 21:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, Bjorn Andersson, Konrad Dybcio,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
First several patches target fixing the UFS support on the Qualcomm
MSM8996 / APQ8096 platforms, broken by the commit b4e13e1ae95e ("scsi:
ufs: qcom: Add multiple frequency support for MAX_CORE_CLK_1US_CYCLES").
Last two patches clean up the UFS DT device on that platform to follow
the bindings on other MSM8969 platforms. If such breaking change is
unacceptable, they can be simply ignored, merging fixes only.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Dmitry Baryshkov (8):
dt-bindings: ufs: qcom,ufs: add second RX lane on MSM8996 platform
scsi: ufs: qcom: provide default cycles_in_1us value
arm64: dts: qcom: msm8996: unbreak UFS HCD support
arm64: dts: qcom: msm8996: specify UFS core_clk frequencies
arm64: dts: qcom: msm8996: add second UFS RX lane on MSM8996 platform
arm64: dts: qcom: msm8996: set GCC_UFS_ICE_CORE_CLK freq directly
dt-bindings: ufs: qcom,ufs: drop source clock entries
arm64: dts: qcom: msm8996: drop source clock entries from the UFS node
Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 13 ++++++-------
arch/arm64/boot/dts/qcom/msm8996.dtsi | 13 +++++--------
drivers/ufs/host/ufs-qcom.c | 6 ++++--
3 files changed, 15 insertions(+), 17 deletions(-)
---
base-commit: 13e3d132c10bbb94e4efe7824f4aff317969cd17
change-id: 20240209-msm8996-fix-ufs-f80ae6d4d8cf
Best regards,
--
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH 1/8] dt-bindings: ufs: qcom,ufs: add second RX lane on MSM8996 platform
2024-02-09 21:50 [PATCH 0/8] scsi: ufs: qcom: fix UFSDHCD support on MSM8996 platform Dmitry Baryshkov
@ 2024-02-09 21:50 ` Dmitry Baryshkov
2024-02-11 14:02 ` Krzysztof Kozlowski
2024-02-09 21:50 ` [PATCH 2/8] scsi: ufs: qcom: provide default cycles_in_1us value Dmitry Baryshkov
` (6 subsequent siblings)
7 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 21:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, Bjorn Andersson, Konrad Dybcio,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
Describe the second RX lane used by the UFS controller on MSM8996
platform.
Fixes: 462c5c0aa798 ("dt-bindings: ufs: qcom,ufs: convert to dtschema")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index 10c146424baa..f1de3244b473 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -43,11 +43,11 @@ properties:
clocks:
minItems: 8
- maxItems: 11
+ maxItems: 12
clock-names:
minItems: 8
- maxItems: 11
+ maxItems: 12
dma-coherent: true
@@ -188,8 +188,8 @@ allOf:
then:
properties:
clocks:
- minItems: 11
- maxItems: 11
+ minItems: 12
+ maxItems: 12
clock-names:
items:
- const: core_clk_src
@@ -203,6 +203,7 @@ allOf:
- const: ref_clk
- const: tx_lane0_sync_clk
- const: rx_lane0_sync_clk
+ - const: rx_lane1_sync_clk
reg:
minItems: 1
maxItems: 1
@@ -257,7 +258,7 @@ allOf:
maxItems: 2
clocks:
minItems: 8
- maxItems: 11
+ maxItems: 12
unevaluatedProperties: false
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 2/8] scsi: ufs: qcom: provide default cycles_in_1us value
2024-02-09 21:50 [PATCH 0/8] scsi: ufs: qcom: fix UFSDHCD support on MSM8996 platform Dmitry Baryshkov
2024-02-09 21:50 ` [PATCH 1/8] dt-bindings: ufs: qcom,ufs: add second RX lane " Dmitry Baryshkov
@ 2024-02-09 21:50 ` Dmitry Baryshkov
2024-02-09 22:26 ` Konrad Dybcio
2024-02-09 21:50 ` [PATCH 3/8] arm64: dts: qcom: msm8996: unbreak UFS HCD support Dmitry Baryshkov
` (5 subsequent siblings)
7 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 21:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, Bjorn Andersson, Konrad Dybcio,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
The MSM8996 DT doesn't provide frequency limits for the core_clk_unipro
clock, which results in miscalculation of the cycles_in_1us value.
Provide the backwards-compatible default to support existing MSM8996
DT files.
Fixes: b4e13e1ae95e ("scsi: ufs: qcom: Add multiple frequency support for MAX_CORE_CLK_1US_CYCLES")
Cc: Nitin Rawat <quic_nitirawa@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/ufs/host/ufs-qcom.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 0aeaee1c564c..79f8cb377710 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1210,8 +1210,10 @@ static int ufs_qcom_set_core_clk_ctrl(struct ufs_hba *hba, bool is_scale_up)
list_for_each_entry(clki, head, list) {
if (!IS_ERR_OR_NULL(clki->clk) &&
- !strcmp(clki->name, "core_clk_unipro")) {
- if (is_scale_up)
+ !strcmp(clki->name, "core_clk_unipro")) {
+ if (!clki->max_freq)
+ cycles_in_1us = 150; /* default for backwards compatibility */
+ else if (is_scale_up)
cycles_in_1us = ceil(clki->max_freq, (1000 * 1000));
else
cycles_in_1us = ceil(clk_get_rate(clki->clk), (1000 * 1000));
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 3/8] arm64: dts: qcom: msm8996: unbreak UFS HCD support
2024-02-09 21:50 [PATCH 0/8] scsi: ufs: qcom: fix UFSDHCD support on MSM8996 platform Dmitry Baryshkov
2024-02-09 21:50 ` [PATCH 1/8] dt-bindings: ufs: qcom,ufs: add second RX lane " Dmitry Baryshkov
2024-02-09 21:50 ` [PATCH 2/8] scsi: ufs: qcom: provide default cycles_in_1us value Dmitry Baryshkov
@ 2024-02-09 21:50 ` Dmitry Baryshkov
2024-02-09 22:27 ` Konrad Dybcio
2024-02-09 21:50 ` [PATCH 4/8] arm64: dts: qcom: msm8996: specify UFS core_clk frequencies Dmitry Baryshkov
` (4 subsequent siblings)
7 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 21:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, Bjorn Andersson, Konrad Dybcio,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
Since the commit b4e13e1ae95e ("scsi: ufs: qcom: Add multiple frequency
support for MAX_CORE_CLK_1US_CYCLES") the Qualcomm UFS driver uses
core_clk_unipro values from frequency table to calculate cycles_in_1us.
The DT file for MSM8996 passed 0 HZ frequencies there, resulting in
broken UFS support on that platform. Fix the corresponding clock values
in the frequency table.
Suggested-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Fixes: 57fc67ef0d35 ("arm64: dts: qcom: msm8996: Add ufs related nodes")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index f6b6fdc12f44..80d83e01bb4d 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -2077,7 +2077,7 @@ ufshc: ufshc@624000 {
<0 0>,
<0 0>,
<150000000 300000000>,
- <0 0>,
+ <75000000 150000000>,
<0 0>,
<0 0>,
<0 0>,
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 4/8] arm64: dts: qcom: msm8996: specify UFS core_clk frequencies
2024-02-09 21:50 [PATCH 0/8] scsi: ufs: qcom: fix UFSDHCD support on MSM8996 platform Dmitry Baryshkov
` (2 preceding siblings ...)
2024-02-09 21:50 ` [PATCH 3/8] arm64: dts: qcom: msm8996: unbreak UFS HCD support Dmitry Baryshkov
@ 2024-02-09 21:50 ` Dmitry Baryshkov
2024-02-09 22:28 ` Konrad Dybcio
2024-02-09 21:50 ` [PATCH 5/8] arm64: dts: qcom: msm8996: add second UFS RX lane on MSM8996 platform Dmitry Baryshkov
` (3 subsequent siblings)
7 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 21:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, Bjorn Andersson, Konrad Dybcio,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
Follow the example of other platforms and specify core_clk frequencies
in the frequency table in addition to the core_clk_src frequencies. The
driver should be setting the leaf frequency instead of some interim
clock freq.
Suggested-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Fixes: 57fc67ef0d35 ("arm64: dts: qcom: msm8996: Add ufs related nodes")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/msm8996.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 80d83e01bb4d..401c6cce9fec 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -2072,7 +2072,7 @@ ufshc: ufshc@624000 {
<&gcc GCC_UFS_RX_SYMBOL_0_CLK>;
freq-table-hz =
<100000000 200000000>,
- <0 0>,
+ <100000000 200000000>,
<0 0>,
<0 0>,
<0 0>,
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 5/8] arm64: dts: qcom: msm8996: add second UFS RX lane on MSM8996 platform
2024-02-09 21:50 [PATCH 0/8] scsi: ufs: qcom: fix UFSDHCD support on MSM8996 platform Dmitry Baryshkov
` (3 preceding siblings ...)
2024-02-09 21:50 ` [PATCH 4/8] arm64: dts: qcom: msm8996: specify UFS core_clk frequencies Dmitry Baryshkov
@ 2024-02-09 21:50 ` Dmitry Baryshkov
2024-02-09 22:29 ` Konrad Dybcio
2024-02-09 21:50 ` [PATCH 6/8] arm64: dts: qcom: msm8996: set GCC_UFS_ICE_CORE_CLK freq directly Dmitry Baryshkov
` (2 subsequent siblings)
7 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 21:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, Bjorn Andersson, Konrad Dybcio,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
Describe the second RX lane used by the UFS controller on MSM8996
platform.
Fixes: 462c5c0aa798 ("dt-bindings: ufs: qcom,ufs: convert to dtschema")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/msm8996.dtsi | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 401c6cce9fec..4472bbc7f058 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -2057,7 +2057,8 @@ ufshc: ufshc@624000 {
"core_clk_ice",
"ref_clk",
"tx_lane0_sync_clk",
- "rx_lane0_sync_clk";
+ "rx_lane0_sync_clk",
+ "rx_lane1_sync_clk";
clocks =
<&gcc UFS_AXI_CLK_SRC>,
<&gcc GCC_UFS_AXI_CLK>,
@@ -2069,7 +2070,8 @@ ufshc: ufshc@624000 {
<&gcc GCC_UFS_ICE_CORE_CLK>,
<&rpmcc RPM_SMD_LN_BB_CLK>,
<&gcc GCC_UFS_TX_SYMBOL_0_CLK>,
- <&gcc GCC_UFS_RX_SYMBOL_0_CLK>;
+ <&gcc GCC_UFS_RX_SYMBOL_0_CLK>,
+ <&gcc GCC_UFS_RX_SYMBOL_1_CLK>;
freq-table-hz =
<100000000 200000000>,
<100000000 200000000>,
@@ -2081,6 +2083,7 @@ ufshc: ufshc@624000 {
<0 0>,
<0 0>,
<0 0>,
+ <0 0>,
<0 0>;
interconnects = <&a2noc MASTER_UFS &bimc SLAVE_EBI_CH0>,
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 6/8] arm64: dts: qcom: msm8996: set GCC_UFS_ICE_CORE_CLK freq directly
2024-02-09 21:50 [PATCH 0/8] scsi: ufs: qcom: fix UFSDHCD support on MSM8996 platform Dmitry Baryshkov
` (4 preceding siblings ...)
2024-02-09 21:50 ` [PATCH 5/8] arm64: dts: qcom: msm8996: add second UFS RX lane on MSM8996 platform Dmitry Baryshkov
@ 2024-02-09 21:50 ` Dmitry Baryshkov
2024-02-09 22:29 ` Konrad Dybcio
2024-02-09 21:50 ` [PATCH 7/8] dt-bindings: ufs: qcom,ufs: drop source clock entries Dmitry Baryshkov
2024-02-09 21:50 ` [PATCH 8/8] arm64: dts: qcom: msm8996: drop source clock entries from the UFS node Dmitry Baryshkov
7 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 21:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, Bjorn Andersson, Konrad Dybcio,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
Instead of setting the frequency of the interim UFS_ICE_CORE_CLK_SRC
clokc, set the freency of the leaf GCC_UFS_ICE_CORE_CLK clock directly.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/msm8996.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 4472bbc7f058..6c847fdff192 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -2078,9 +2078,9 @@ ufshc: ufshc@624000 {
<0 0>,
<0 0>,
<0 0>,
- <150000000 300000000>,
- <75000000 150000000>,
<0 0>,
+ <75000000 150000000>,
+ <150000000 300000000>,
<0 0>,
<0 0>,
<0 0>,
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 7/8] dt-bindings: ufs: qcom,ufs: drop source clock entries
2024-02-09 21:50 [PATCH 0/8] scsi: ufs: qcom: fix UFSDHCD support on MSM8996 platform Dmitry Baryshkov
` (5 preceding siblings ...)
2024-02-09 21:50 ` [PATCH 6/8] arm64: dts: qcom: msm8996: set GCC_UFS_ICE_CORE_CLK freq directly Dmitry Baryshkov
@ 2024-02-09 21:50 ` Dmitry Baryshkov
2024-02-11 14:03 ` Krzysztof Kozlowski
2024-02-09 21:50 ` [PATCH 8/8] arm64: dts: qcom: msm8996: drop source clock entries from the UFS node Dmitry Baryshkov
7 siblings, 1 reply; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 21:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, Bjorn Andersson, Konrad Dybcio,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
There is no need to mention and/or to touch in any way the intermediate
(source) clocks. Drop them from MSM8996 UFSHCD schema, making it follow
the example lead by all other platforms.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index f1de3244b473..e835f12c75ca 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -43,11 +43,11 @@ properties:
clocks:
minItems: 8
- maxItems: 12
+ maxItems: 10
clock-names:
minItems: 8
- maxItems: 12
+ maxItems: 10
dma-coherent: true
@@ -188,16 +188,14 @@ allOf:
then:
properties:
clocks:
- minItems: 12
- maxItems: 12
+ minItems: 10
+ maxItems: 10
clock-names:
items:
- - const: core_clk_src
- const: core_clk
- const: bus_clk
- const: bus_aggr_clk
- const: iface_clk
- - const: core_clk_unipro_src
- const: core_clk_unipro
- const: core_clk_ice
- const: ref_clk
@@ -258,7 +256,7 @@ allOf:
maxItems: 2
clocks:
minItems: 8
- maxItems: 12
+ maxItems: 10
unevaluatedProperties: false
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH 8/8] arm64: dts: qcom: msm8996: drop source clock entries from the UFS node
2024-02-09 21:50 [PATCH 0/8] scsi: ufs: qcom: fix UFSDHCD support on MSM8996 platform Dmitry Baryshkov
` (6 preceding siblings ...)
2024-02-09 21:50 ` [PATCH 7/8] dt-bindings: ufs: qcom,ufs: drop source clock entries Dmitry Baryshkov
@ 2024-02-09 21:50 ` Dmitry Baryshkov
7 siblings, 0 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 21:50 UTC (permalink / raw)
To: Manivannan Sadhasivam, Bjorn Andersson, Konrad Dybcio,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
There is no need to mention and/or to touch in any way the intermediate
(source) clocks. Drop them from MSM8996 UFSHCD schema, making it follow
the example lead by all other platforms.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm64/boot/dts/qcom/msm8996.dtsi | 6 ------
1 file changed, 6 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index 6c847fdff192..fc44979d7902 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -2047,12 +2047,10 @@ ufshc: ufshc@624000 {
power-domains = <&gcc UFS_GDSC>;
clock-names =
- "core_clk_src",
"core_clk",
"bus_clk",
"bus_aggr_clk",
"iface_clk",
- "core_clk_unipro_src",
"core_clk_unipro",
"core_clk_ice",
"ref_clk",
@@ -2060,12 +2058,10 @@ ufshc: ufshc@624000 {
"rx_lane0_sync_clk",
"rx_lane1_sync_clk";
clocks =
- <&gcc UFS_AXI_CLK_SRC>,
<&gcc GCC_UFS_AXI_CLK>,
<&gcc GCC_SYS_NOC_UFS_AXI_CLK>,
<&gcc GCC_AGGRE2_UFS_AXI_CLK>,
<&gcc GCC_UFS_AHB_CLK>,
- <&gcc UFS_ICE_CORE_CLK_SRC>,
<&gcc GCC_UFS_UNIPRO_CORE_CLK>,
<&gcc GCC_UFS_ICE_CORE_CLK>,
<&rpmcc RPM_SMD_LN_BB_CLK>,
@@ -2074,8 +2070,6 @@ ufshc: ufshc@624000 {
<&gcc GCC_UFS_RX_SYMBOL_1_CLK>;
freq-table-hz =
<100000000 200000000>,
- <100000000 200000000>,
- <0 0>,
<0 0>,
<0 0>,
<0 0>,
--
2.39.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH 2/8] scsi: ufs: qcom: provide default cycles_in_1us value
2024-02-09 21:50 ` [PATCH 2/8] scsi: ufs: qcom: provide default cycles_in_1us value Dmitry Baryshkov
@ 2024-02-09 22:26 ` Konrad Dybcio
0 siblings, 0 replies; 19+ messages in thread
From: Konrad Dybcio @ 2024-02-09 22:26 UTC (permalink / raw)
To: Dmitry Baryshkov, Manivannan Sadhasivam, Bjorn Andersson,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
On 9.02.2024 22:50, Dmitry Baryshkov wrote:
> The MSM8996 DT doesn't provide frequency limits for the core_clk_unipro
> clock, which results in miscalculation of the cycles_in_1us value.
> Provide the backwards-compatible default to support existing MSM8996
> DT files.
>
> Fixes: b4e13e1ae95e ("scsi: ufs: qcom: Add multiple frequency support for MAX_CORE_CLK_1US_CYCLES")
> Cc: Nitin Rawat <quic_nitirawa@quicinc.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 3/8] arm64: dts: qcom: msm8996: unbreak UFS HCD support
2024-02-09 21:50 ` [PATCH 3/8] arm64: dts: qcom: msm8996: unbreak UFS HCD support Dmitry Baryshkov
@ 2024-02-09 22:27 ` Konrad Dybcio
0 siblings, 0 replies; 19+ messages in thread
From: Konrad Dybcio @ 2024-02-09 22:27 UTC (permalink / raw)
To: Dmitry Baryshkov, Manivannan Sadhasivam, Bjorn Andersson,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
On 9.02.2024 22:50, Dmitry Baryshkov wrote:
> Since the commit b4e13e1ae95e ("scsi: ufs: qcom: Add multiple frequency
> support for MAX_CORE_CLK_1US_CYCLES") the Qualcomm UFS driver uses
> core_clk_unipro values from frequency table to calculate cycles_in_1us.
> The DT file for MSM8996 passed 0 HZ frequencies there, resulting in
> broken UFS support on that platform. Fix the corresponding clock values
> in the frequency table.
>
> Suggested-by: Nitin Rawat <quic_nitirawa@quicinc.com>
> Fixes: 57fc67ef0d35 ("arm64: dts: qcom: msm8996: Add ufs related nodes")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
I'd reword the commit title but okay
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 4/8] arm64: dts: qcom: msm8996: specify UFS core_clk frequencies
2024-02-09 21:50 ` [PATCH 4/8] arm64: dts: qcom: msm8996: specify UFS core_clk frequencies Dmitry Baryshkov
@ 2024-02-09 22:28 ` Konrad Dybcio
2024-02-09 22:30 ` Dmitry Baryshkov
0 siblings, 1 reply; 19+ messages in thread
From: Konrad Dybcio @ 2024-02-09 22:28 UTC (permalink / raw)
To: Dmitry Baryshkov, Manivannan Sadhasivam, Bjorn Andersson,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
On 9.02.2024 22:50, Dmitry Baryshkov wrote:
> Follow the example of other platforms and specify core_clk frequencies
> in the frequency table in addition to the core_clk_src frequencies. The
> driver should be setting the leaf frequency instead of some interim
> clock freq.
>
> Suggested-by: Nitin Rawat <quic_nitirawa@quicinc.com>
> Fixes: 57fc67ef0d35 ("arm64: dts: qcom: msm8996: Add ufs related nodes")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
3.18 says the clock can even go as high as 240000000
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 5/8] arm64: dts: qcom: msm8996: add second UFS RX lane on MSM8996 platform
2024-02-09 21:50 ` [PATCH 5/8] arm64: dts: qcom: msm8996: add second UFS RX lane on MSM8996 platform Dmitry Baryshkov
@ 2024-02-09 22:29 ` Konrad Dybcio
0 siblings, 0 replies; 19+ messages in thread
From: Konrad Dybcio @ 2024-02-09 22:29 UTC (permalink / raw)
To: Dmitry Baryshkov, Manivannan Sadhasivam, Bjorn Andersson,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
On 9.02.2024 22:50, Dmitry Baryshkov wrote:
> Describe the second RX lane used by the UFS controller on MSM8996
> platform.
>
> Fixes: 462c5c0aa798 ("dt-bindings: ufs: qcom,ufs: convert to dtschema")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 6/8] arm64: dts: qcom: msm8996: set GCC_UFS_ICE_CORE_CLK freq directly
2024-02-09 21:50 ` [PATCH 6/8] arm64: dts: qcom: msm8996: set GCC_UFS_ICE_CORE_CLK freq directly Dmitry Baryshkov
@ 2024-02-09 22:29 ` Konrad Dybcio
2024-02-09 22:30 ` Konrad Dybcio
0 siblings, 1 reply; 19+ messages in thread
From: Konrad Dybcio @ 2024-02-09 22:29 UTC (permalink / raw)
To: Dmitry Baryshkov, Manivannan Sadhasivam, Bjorn Andersson,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
On 9.02.2024 22:50, Dmitry Baryshkov wrote:
> Instead of setting the frequency of the interim UFS_ICE_CORE_CLK_SRC
> clokc, set the freency of the leaf GCC_UFS_ICE_CORE_CLK clock directly.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Why on earth is the _SRC clock described?
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 6/8] arm64: dts: qcom: msm8996: set GCC_UFS_ICE_CORE_CLK freq directly
2024-02-09 22:29 ` Konrad Dybcio
@ 2024-02-09 22:30 ` Konrad Dybcio
0 siblings, 0 replies; 19+ messages in thread
From: Konrad Dybcio @ 2024-02-09 22:30 UTC (permalink / raw)
To: Dmitry Baryshkov, Manivannan Sadhasivam, Bjorn Andersson,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
On 9.02.2024 23:29, Konrad Dybcio wrote:
> On 9.02.2024 22:50, Dmitry Baryshkov wrote:
>> Instead of setting the frequency of the interim UFS_ICE_CORE_CLK_SRC
>> clokc, set the freency of the leaf GCC_UFS_ICE_CORE_CLK clock directly.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>
> Why on earth is the _SRC clock described?
Ah, I see patch 8 ;)
Konrad
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 4/8] arm64: dts: qcom: msm8996: specify UFS core_clk frequencies
2024-02-09 22:28 ` Konrad Dybcio
@ 2024-02-09 22:30 ` Dmitry Baryshkov
0 siblings, 0 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-09 22:30 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Manivannan Sadhasivam, Bjorn Andersson, James E.J. Bottomley,
Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross, linux-arm-msm, linux-scsi,
devicetree
On Sat, 10 Feb 2024 at 00:29, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 9.02.2024 22:50, Dmitry Baryshkov wrote:
> > Follow the example of other platforms and specify core_clk frequencies
> > in the frequency table in addition to the core_clk_src frequencies. The
> > driver should be setting the leaf frequency instead of some interim
> > clock freq.
> >
> > Suggested-by: Nitin Rawat <quic_nitirawa@quicinc.com>
> > Fixes: 57fc67ef0d35 ("arm64: dts: qcom: msm8996: Add ufs related nodes")
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
>
> 3.18 says the clock can even go as high as 240000000
Yeah. I just copied the core_clk_src specs. We can bump the clocks
when this gets rewritten to use OPP tables.
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/8] dt-bindings: ufs: qcom,ufs: add second RX lane on MSM8996 platform
2024-02-09 21:50 ` [PATCH 1/8] dt-bindings: ufs: qcom,ufs: add second RX lane " Dmitry Baryshkov
@ 2024-02-11 14:02 ` Krzysztof Kozlowski
2024-02-13 10:14 ` Dmitry Baryshkov
0 siblings, 1 reply; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-11 14:02 UTC (permalink / raw)
To: Dmitry Baryshkov, Manivannan Sadhasivam, Bjorn Andersson,
Konrad Dybcio, James E.J. Bottomley, Martin K. Petersen,
Nitin Rawat, Can Guo, Naveen Kumar Goud Arepalli, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Andy Gross, Alim Akhtar,
Avri Altman, Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
On 09/02/2024 22:50, Dmitry Baryshkov wrote:
> Describe the second RX lane used by the UFS controller on MSM8996
> platform.
>
> Fixes: 462c5c0aa798 ("dt-bindings: ufs: qcom,ufs: convert to dtschema")
Your commit msg does not explain why this is a fix.
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> index 10c146424baa..f1de3244b473 100644
> --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> @@ -43,11 +43,11 @@ properties:
>
> clocks:
> minItems: 8
> - maxItems: 11
> + maxItems: 12
>
> clock-names:
> minItems: 8
> - maxItems: 11
> + maxItems: 12
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 7/8] dt-bindings: ufs: qcom,ufs: drop source clock entries
2024-02-09 21:50 ` [PATCH 7/8] dt-bindings: ufs: qcom,ufs: drop source clock entries Dmitry Baryshkov
@ 2024-02-11 14:03 ` Krzysztof Kozlowski
0 siblings, 0 replies; 19+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-11 14:03 UTC (permalink / raw)
To: Dmitry Baryshkov, Manivannan Sadhasivam, Bjorn Andersson,
Konrad Dybcio, James E.J. Bottomley, Martin K. Petersen,
Nitin Rawat, Can Guo, Naveen Kumar Goud Arepalli, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Andy Gross, Alim Akhtar,
Avri Altman, Bart Van Assche, Andy Gross
Cc: linux-arm-msm, linux-scsi, devicetree
On 09/02/2024 22:50, Dmitry Baryshkov wrote:
> There is no need to mention and/or to touch in any way the intermediate
> (source) clocks. Drop them from MSM8996 UFSHCD schema, making it follow
> the example lead by all other platforms.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 1/8] dt-bindings: ufs: qcom,ufs: add second RX lane on MSM8996 platform
2024-02-11 14:02 ` Krzysztof Kozlowski
@ 2024-02-13 10:14 ` Dmitry Baryshkov
0 siblings, 0 replies; 19+ messages in thread
From: Dmitry Baryshkov @ 2024-02-13 10:14 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Manivannan Sadhasivam, Bjorn Andersson, Konrad Dybcio,
James E.J. Bottomley, Martin K. Petersen, Nitin Rawat, Can Guo,
Naveen Kumar Goud Arepalli, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Andy Gross, Alim Akhtar, Avri Altman,
Bart Van Assche, Andy Gross, linux-arm-msm, linux-scsi,
devicetree
On Sun, 11 Feb 2024 at 16:02, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 09/02/2024 22:50, Dmitry Baryshkov wrote:
> > Describe the second RX lane used by the UFS controller on MSM8996
> > platform.
> >
> > Fixes: 462c5c0aa798 ("dt-bindings: ufs: qcom,ufs: convert to dtschema")
>
> Your commit msg does not explain why this is a fix.
.. and it is probably unnecessary, as msm8996 has 'lanes-per-direcion
= <1>;' I'll drop this for v2.
>
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> > ---
> > Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 11 ++++++-----
> > 1 file changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> > index 10c146424baa..f1de3244b473 100644
> > --- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> > +++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
> > @@ -43,11 +43,11 @@ properties:
> >
> > clocks:
> > minItems: 8
> > - maxItems: 11
> > + maxItems: 12
> >
> > clock-names:
> > minItems: 8
> > - maxItems: 11
> > + maxItems: 12
>
>
> Best regards,
> Krzysztof
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2024-02-13 10:14 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-09 21:50 [PATCH 0/8] scsi: ufs: qcom: fix UFSDHCD support on MSM8996 platform Dmitry Baryshkov
2024-02-09 21:50 ` [PATCH 1/8] dt-bindings: ufs: qcom,ufs: add second RX lane " Dmitry Baryshkov
2024-02-11 14:02 ` Krzysztof Kozlowski
2024-02-13 10:14 ` Dmitry Baryshkov
2024-02-09 21:50 ` [PATCH 2/8] scsi: ufs: qcom: provide default cycles_in_1us value Dmitry Baryshkov
2024-02-09 22:26 ` Konrad Dybcio
2024-02-09 21:50 ` [PATCH 3/8] arm64: dts: qcom: msm8996: unbreak UFS HCD support Dmitry Baryshkov
2024-02-09 22:27 ` Konrad Dybcio
2024-02-09 21:50 ` [PATCH 4/8] arm64: dts: qcom: msm8996: specify UFS core_clk frequencies Dmitry Baryshkov
2024-02-09 22:28 ` Konrad Dybcio
2024-02-09 22:30 ` Dmitry Baryshkov
2024-02-09 21:50 ` [PATCH 5/8] arm64: dts: qcom: msm8996: add second UFS RX lane on MSM8996 platform Dmitry Baryshkov
2024-02-09 22:29 ` Konrad Dybcio
2024-02-09 21:50 ` [PATCH 6/8] arm64: dts: qcom: msm8996: set GCC_UFS_ICE_CORE_CLK freq directly Dmitry Baryshkov
2024-02-09 22:29 ` Konrad Dybcio
2024-02-09 22:30 ` Konrad Dybcio
2024-02-09 21:50 ` [PATCH 7/8] dt-bindings: ufs: qcom,ufs: drop source clock entries Dmitry Baryshkov
2024-02-11 14:03 ` Krzysztof Kozlowski
2024-02-09 21:50 ` [PATCH 8/8] arm64: dts: qcom: msm8996: drop source clock entries from the UFS node Dmitry Baryshkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).