linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/8] Add UFS support for SC7180/SM7125
@ 2024-01-21 16:57 David Wronek
  2024-01-21 16:57 ` [PATCH v4 1/8] dt-bindings: crypto: ice: Document SC7180 inline crypto engine David Wronek
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: David Wronek @ 2024-01-21 16:57 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, David Wronek,
	Rob Herring, Krzysztof Kozlowski, Dmitry Baryshkov, Joe Mason

This patchset introduces UFS support for SC7180 and SM7125, as well as
support for the Xiaomi Redmi Note 9S.

To: Bjorn Andersson <andersson@kernel.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
To: David S. Miller <davem@davemloft.net>
To: Rob Herring <robh+dt@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Alim Akhtar <alim.akhtar@samsung.com>
To: Avri Altman <avri.altman@wdc.com>
To: Bart Van Assche <bvanassche@acm.org>
To: Andy Gross <agross@kernel.org>
To: Vinod Koul <vkoul@kernel.org>
To: Kishon Vijay Abraham I <kishon@kernel.org>
To:  <cros-qcom-dts-watchers@chromium.org>
Cc:  <linux-arm-msm@vger.kernel.org>
Cc:  <linux-crypto@vger.kernel.org>
Cc:  <devicetree@vger.kernel.org>
Cc:  <linux-kernel@vger.kernel.org>
Cc:  <linux-scsi@vger.kernel.org>
Cc:  <linux-phy@lists.infradead.org>
CC:  <~postmarketos/upstreaming@lists.sr.ht>

Signed-off-by: David Wronek <davidwronek@gmail.com>
---
Changes in v4:
 - Add Reviewed-by tag from Dmitry Baryshkov to fifth patch

Changes in v3:
 - Use SM7150 UFS PHY compatible as a fallback
 - Fix dts style issues
 - Add regulator-allow-set-load and allowed-modes to UFS regulators

Changes in v2:
 - Fix device tree binding for QMP PHY
 - Separate ICE into its own node
 - Fix style problems in sc7180.dtsi

---
David Wronek (7):
      dt-bindings: crypto: ice: Document SC7180 inline crypto engine
      dt-bindings: ufs: qcom: Add SC7180 compatible string
      dt-bindings: phy: Add QMP UFS PHY compatible for SC7180
      dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S
      phy: qcom: qmp-ufs: Add SC7180 support
      arm64: dts: qcom: sc7180: Add UFS nodes
      arm64: dts: qcom: sm7125-xiaomi-common: Add UFS nodes

Joe Mason (1):
      arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S

 Documentation/devicetree/bindings/arm/qcom.yaml    |  1 +
 .../bindings/crypto/qcom,inline-crypto-engine.yaml |  1 +
 .../bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml    |  2 +
 .../devicetree/bindings/ufs/qcom,ufs.yaml          |  2 +
 arch/arm64/boot/dts/qcom/Makefile                  |  1 +
 arch/arm64/boot/dts/qcom/sc7180.dtsi               | 70 ++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi | 28 +++++++++
 arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts | 16 +++++
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c            |  3 +
 9 files changed, 124 insertions(+)
---
base-commit: ad5c60d66016e544c51ed98635a74073f761f45d
change-id: 20240121-sm7125-upstream-68072e5794bb

Best regards,
-- 
David Wronek <davidwronek@gmail.com>


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v4 1/8] dt-bindings: crypto: ice: Document SC7180 inline crypto engine
  2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
@ 2024-01-21 16:57 ` David Wronek
  2024-01-26  9:09   ` Herbert Xu
  2024-01-21 16:57 ` [PATCH v4 2/8] dt-bindings: ufs: qcom: Add SC7180 compatible string David Wronek
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 18+ messages in thread
From: David Wronek @ 2024-01-21 16:57 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, David Wronek,
	Rob Herring

Document the compatible used for the inline crypto engine found on
SC7180.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml b/Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml
index 09e43157cc71..e91bc7dc6ad3 100644
--- a/Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml
+++ b/Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml
@@ -14,6 +14,7 @@ properties:
     items:
       - enum:
           - qcom,sa8775p-inline-crypto-engine
+          - qcom,sc7180-inline-crypto-engine
           - qcom,sm8450-inline-crypto-engine
           - qcom,sm8550-inline-crypto-engine
           - qcom,sm8650-inline-crypto-engine

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v4 2/8] dt-bindings: ufs: qcom: Add SC7180 compatible string
  2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
  2024-01-21 16:57 ` [PATCH v4 1/8] dt-bindings: crypto: ice: Document SC7180 inline crypto engine David Wronek
@ 2024-01-21 16:57 ` David Wronek
  2024-02-12 22:22   ` Rob Herring
  2024-01-21 16:57 ` [PATCH v4 3/8] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180 David Wronek
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 18+ messages in thread
From: David Wronek @ 2024-01-21 16:57 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, David Wronek,
	Krzysztof Kozlowski

Document the compatible for the UFS found on SC7180.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index 10c146424baa..9a4f2b43e155 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -27,6 +27,7 @@ properties:
           - qcom,msm8996-ufshc
           - qcom,msm8998-ufshc
           - qcom,sa8775p-ufshc
+          - qcom,sc7180-ufshc
           - qcom,sc7280-ufshc
           - qcom,sc8280xp-ufshc
           - qcom,sdm845-ufshc
@@ -214,6 +215,7 @@ allOf:
         compatible:
           contains:
             enum:
+              - qcom,sc7180-ufshc
               - qcom,sm6115-ufshc
     then:
       properties:

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v4 3/8] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180
  2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
  2024-01-21 16:57 ` [PATCH v4 1/8] dt-bindings: crypto: ice: Document SC7180 inline crypto engine David Wronek
  2024-01-21 16:57 ` [PATCH v4 2/8] dt-bindings: ufs: qcom: Add SC7180 compatible string David Wronek
@ 2024-01-21 16:57 ` David Wronek
  2024-02-12 22:21   ` Rob Herring
  2024-01-21 16:57 ` [PATCH v4 4/8] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S David Wronek
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 18+ messages in thread
From: David Wronek @ 2024-01-21 16:57 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, David Wronek,
	Rob Herring

Document the QMP UFS PHY compatible for SC7180

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
index 8474eef8d0ff..5faa1cb3a12e 100644
--- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
@@ -19,6 +19,7 @@ properties:
       - qcom,msm8996-qmp-ufs-phy
       - qcom,msm8998-qmp-ufs-phy
       - qcom,sa8775p-qmp-ufs-phy
+      - qcom,sc7180-qmp-ufs-phy
       - qcom,sc7280-qmp-ufs-phy
       - qcom,sc8180x-qmp-ufs-phy
       - qcom,sc8280xp-qmp-ufs-phy
@@ -102,6 +103,7 @@ allOf:
           contains:
             enum:
               - qcom,msm8998-qmp-ufs-phy
+              - qcom,sc7180-qmp-ufs-phy
               - qcom,sc8180x-qmp-ufs-phy
               - qcom,sc8280xp-qmp-ufs-phy
               - qcom,sdm845-qmp-ufs-phy

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v4 4/8] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S
  2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
                   ` (2 preceding siblings ...)
  2024-01-21 16:57 ` [PATCH v4 3/8] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180 David Wronek
@ 2024-01-21 16:57 ` David Wronek
  2024-01-21 16:57 ` [PATCH v4 5/8] phy: qcom: qmp-ufs: Add SC7180 support David Wronek
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: David Wronek @ 2024-01-21 16:57 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, David Wronek,
	Krzysztof Kozlowski

Document the Xiaomi Redmi Note 9S (curtana) smartphone, which is based
on the Qualcomm SM7125 SoC.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 1a5fb889a444..59430524dac6 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -988,6 +988,7 @@ properties:
 
       - items:
           - enum:
+              - xiaomi,curtana
               - xiaomi,joyeuse
           - const: qcom,sm7125
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v4 5/8] phy: qcom: qmp-ufs: Add SC7180 support
  2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
                   ` (3 preceding siblings ...)
  2024-01-21 16:57 ` [PATCH v4 4/8] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S David Wronek
@ 2024-01-21 16:57 ` David Wronek
  2024-01-21 16:57 ` [PATCH v4 6/8] arm64: dts: qcom: sc7180: Add UFS nodes David Wronek
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: David Wronek @ 2024-01-21 16:57 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, David Wronek,
	Dmitry Baryshkov

The SC7180 UFS PHY is identical to the one found on SM7150. Add a
compatible for it.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index 3c2e6255e26f..0276de802d78 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -1880,6 +1880,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = {
 	}, {
 		.compatible = "qcom,sa8775p-qmp-ufs-phy",
 		.data = &sa8775p_ufsphy_cfg,
+	}, {
+		.compatible = "qcom,sc7180-qmp-ufs-phy",
+		.data = &sm7150_ufsphy_cfg,
 	}, {
 		.compatible = "qcom,sc7280-qmp-ufs-phy",
 		.data = &sc7280_ufsphy_cfg,

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v4 6/8] arm64: dts: qcom: sc7180: Add UFS nodes
  2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
                   ` (4 preceding siblings ...)
  2024-01-21 16:57 ` [PATCH v4 5/8] phy: qcom: qmp-ufs: Add SC7180 support David Wronek
@ 2024-01-21 16:57 ` David Wronek
  2024-01-21 16:57 ` [PATCH v4 7/8] arm64: dts: qcom: sm7125-xiaomi-common: " David Wronek
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: David Wronek @ 2024-01-21 16:57 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, David Wronek

Add the UFS, QMP PHY and ICE nodes for the Qualcomm SC7180 SoC.

Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 70 ++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 4dcaa15caef2..93c867cac755 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -1532,6 +1532,76 @@ mmss_noc: interconnect@1740000 {
 			qcom,bcm-voters = <&apps_bcm_voter>;
 		};
 
+		ufs_mem_hc: ufshc@1d84000 {
+			compatible = "qcom,sc7180-ufshc", "qcom,ufshc",
+				     "jedec,ufs-2.0";
+			reg = <0 0x01d84000 0 0x3000>;
+			interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
+			phys = <&ufs_mem_phy>;
+			phy-names = "ufsphy";
+			lanes-per-direction = <1>;
+			#reset-cells = <1>;
+			resets = <&gcc GCC_UFS_PHY_BCR>;
+			reset-names = "rst";
+
+			power-domains = <&gcc UFS_PHY_GDSC>;
+
+			iommus = <&apps_smmu 0xa0 0x0>;
+
+			clock-names = "core_clk",
+				      "bus_aggr_clk",
+				      "iface_clk",
+				      "core_clk_unipro",
+				      "ref_clk",
+				      "tx_lane0_sync_clk",
+				      "rx_lane0_sync_clk";
+			clocks = <&gcc GCC_UFS_PHY_AXI_CLK>,
+				 <&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>,
+				 <&gcc GCC_UFS_PHY_AHB_CLK>,
+				 <&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>,
+				 <&rpmhcc RPMH_CXO_CLK>,
+				 <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>,
+				 <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>;
+			freq-table-hz = <50000000 200000000>,
+					<0 0>,
+					<0 0>,
+					<37500000 150000000>,
+					<0 0>,
+					<0 0>,
+					<0 0>;
+
+			interconnects = <&aggre1_noc MASTER_UFS_MEM QCOM_ICC_TAG_ALWAYS
+					 &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+					<&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS
+					 &config_noc SLAVE_UFS_MEM_CFG QCOM_ICC_TAG_ALWAYS>;
+			interconnect-names = "ufs-ddr", "cpu-ufs";
+
+			qcom,ice = <&ice>;
+
+			status = "disabled";
+		};
+
+		ufs_mem_phy: phy@1d87000 {
+			compatible = "qcom,sc7180-qmp-ufs-phy",
+				     "qcom,sm7150-qmp-ufs-phy";
+			reg = <0 0x01d87000 0 0x1000>;
+			clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>,
+				 <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
+			clock-names = "ref", "ref_aux";
+			power-domains = <&gcc UFS_PHY_GDSC>;
+			resets = <&ufs_mem_hc 0>;
+			reset-names = "ufsphy";
+			#phy-cells = <0>;
+			status = "disabled";
+		};
+
+		ice: crypto@1d90000 {
+			compatible = "qcom,sc7180-inline-crypto-engine",
+				     "qcom,inline-crypto-engine";
+			reg = <0 0x01d90000 0 0x8000>;
+			clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>;
+		};
+
 		ipa: ipa@1e40000 {
 			compatible = "qcom,sc7180-ipa";
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v4 7/8] arm64: dts: qcom: sm7125-xiaomi-common: Add UFS nodes
  2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
                   ` (5 preceding siblings ...)
  2024-01-21 16:57 ` [PATCH v4 6/8] arm64: dts: qcom: sc7180: Add UFS nodes David Wronek
@ 2024-01-21 16:57 ` David Wronek
  2024-01-21 16:57 ` [PATCH v4 8/8] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S David Wronek
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: David Wronek @ 2024-01-21 16:57 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, David Wronek

Enable the UFS found on the SM7125 Xiaomi smartphones.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi
index e55cd83c19b8..0dfd1e3730e9 100644
--- a/arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi
@@ -152,6 +152,9 @@ vreg_l4a_0p88: ldo4 {
 			regulator-min-microvolt = <824000>;
 			regulator-max-microvolt = <928000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
 		};
 
 		vreg_l5a_2p7: ldo5 {
@@ -188,6 +191,9 @@ vreg_l12a_1p8: ldo12 {
 			regulator-min-microvolt = <1696000>;
 			regulator-max-microvolt = <1952000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
 		};
 
 		vreg_l13a_1p8: ldo13 {
@@ -230,6 +236,9 @@ vreg_l19a_3p0: ldo19 {
 			regulator-min-microvolt = <2696000>;
 			regulator-max-microvolt = <3304000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
 		};
 	};
 
@@ -258,6 +267,9 @@ vreg_l3c_1p23: ldo3 {
 			regulator-min-microvolt = <1144000>;
 			regulator-max-microvolt = <1304000>;
 			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
 		};
 
 		vreg_l4c_1p8: ldo4 {
@@ -398,6 +410,22 @@ sd-cd-pins {
 	};
 };
 
+&ufs_mem_hc {
+	vcc-supply = <&vreg_l19a_3p0>;
+	vcc-max-microamp = <600000>;
+	vccq2-supply = <&vreg_l12a_1p8>;
+	vccq2-max-microamp = <600000>;
+	status = "okay";
+};
+
+&ufs_mem_phy {
+	vdda-phy-supply = <&vreg_l4a_0p88>;
+	vdda-pll-supply = <&vreg_l3c_1p23>;
+	vdda-phy-max-microamp = <62900>;
+	vdda-pll-max-microamp = <18300>;
+	status = "okay";
+};
+
 &usb_1 {
 	qcom,select-utmi-as-pipe-clk;
 	status = "okay";

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v4 8/8] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S
  2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
                   ` (6 preceding siblings ...)
  2024-01-21 16:57 ` [PATCH v4 7/8] arm64: dts: qcom: sm7125-xiaomi-common: " David Wronek
@ 2024-01-21 16:57 ` David Wronek
  2024-01-23 14:20 ` (subset) [PATCH v4 0/8] Add UFS support for SC7180/SM7125 Vinod Koul
  2024-02-01 21:53 ` Bjorn Andersson
  9 siblings, 0 replies; 18+ messages in thread
From: David Wronek @ 2024-01-21 16:57 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, David Wronek,
	Joe Mason

From: Joe Mason <buddyjojo06@outlook.com>

Add a device tree for the Xiaomi Redmi Note 9S (curtana) phone, based on
sm7125-xiaomi-common.dtsi.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Joe Mason <buddyjojo06@outlook.com>
Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 arch/arm64/boot/dts/qcom/Makefile                  |  1 +
 arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 39889d5f8e12..2e6984bbbb83 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -210,6 +210,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-sony-xperia-seine-pdx201.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-xiaomi-laurel-sprout.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6350-sony-xperia-lena-pdx213.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6375-sony-xperia-murray-pdx225.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm7125-xiaomi-curtana.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm7125-xiaomi-joyeuse.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm7225-fairphone-fp4.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
diff --git a/arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts b/arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts
new file mode 100644
index 000000000000..12f517a8492c
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2023, Joe Mason <buddyjojo06@outlook.com>
+ */
+
+/dts-v1/;
+
+#include "sm7125-xiaomi-common.dtsi"
+
+/ {
+	model = "Xiaomi Redmi Note 9S";
+	compatible = "xiaomi,curtana", "qcom,sm7125";
+
+	/* required for bootloader to select correct board */
+	qcom,board-id = <0x20022 1>;
+};

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: (subset) [PATCH v4 0/8] Add UFS support for SC7180/SM7125
  2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
                   ` (7 preceding siblings ...)
  2024-01-21 16:57 ` [PATCH v4 8/8] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S David Wronek
@ 2024-01-23 14:20 ` Vinod Koul
  2024-02-01 21:53 ` Bjorn Andersson
  9 siblings, 0 replies; 18+ messages in thread
From: Vinod Koul @ 2024-01-23 14:20 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Kishon Vijay Abraham I, cros-qcom-dts-watchers,
	David Wronek
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, Rob Herring,
	Krzysztof Kozlowski, Dmitry Baryshkov, Joe Mason


On Sun, 21 Jan 2024 17:57:40 +0100, David Wronek wrote:
> This patchset introduces UFS support for SC7180 and SM7125, as well as
> support for the Xiaomi Redmi Note 9S.
> 
> To: Bjorn Andersson <andersson@kernel.org>
> To: Konrad Dybcio <konrad.dybcio@linaro.org>
> To: Herbert Xu <herbert@gondor.apana.org.au>
> To: David S. Miller <davem@davemloft.net>
> To: Rob Herring <robh+dt@kernel.org>
> To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> To: Conor Dooley <conor+dt@kernel.org>
> To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> To: Alim Akhtar <alim.akhtar@samsung.com>
> To: Avri Altman <avri.altman@wdc.com>
> To: Bart Van Assche <bvanassche@acm.org>
> To: Andy Gross <agross@kernel.org>
> To: Vinod Koul <vkoul@kernel.org>
> To: Kishon Vijay Abraham I <kishon@kernel.org>
> To:  <cros-qcom-dts-watchers@chromium.org>
> Cc:  <linux-arm-msm@vger.kernel.org>
> Cc:  <linux-crypto@vger.kernel.org>
> Cc:  <devicetree@vger.kernel.org>
> Cc:  <linux-kernel@vger.kernel.org>
> Cc:  <linux-scsi@vger.kernel.org>
> Cc:  <linux-phy@lists.infradead.org>
> CC:  <~postmarketos/upstreaming@lists.sr.ht>
> 
> [...]

Applied, thanks!

[3/8] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180
      commit: 1cf2bf8ffadf2f0ab9ad10a1e0f65b3a0a10d402
[5/8] phy: qcom: qmp-ufs: Add SC7180 support
      commit: 7551d945cb9ad8e8cfa4888c6b7be19855754baf

Best regards,
-- 
~Vinod



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v4 1/8] dt-bindings: crypto: ice: Document SC7180 inline crypto engine
  2024-01-21 16:57 ` [PATCH v4 1/8] dt-bindings: crypto: ice: Document SC7180 inline crypto engine David Wronek
@ 2024-01-26  9:09   ` Herbert Xu
  0 siblings, 0 replies; 18+ messages in thread
From: Herbert Xu @ 2024-01-26  9:09 UTC (permalink / raw)
  To: David Wronek
  Cc: Bjorn Andersson, Konrad Dybcio, David S. Miller, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	Alim Akhtar, Avri Altman, Bart Van Assche, Andy Gross,
	Vinod Koul, Kishon Vijay Abraham I, cros-qcom-dts-watchers,
	linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, Rob Herring

On Sun, Jan 21, 2024 at 05:57:41PM +0100, David Wronek wrote:
> Document the compatible used for the inline crypto engine found on
> SC7180.
> 
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: David Wronek <davidwronek@gmail.com>
> ---
>  Documentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml | 1 +
>  1 file changed, 1 insertion(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: (subset) [PATCH v4 0/8] Add UFS support for SC7180/SM7125
  2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
                   ` (8 preceding siblings ...)
  2024-01-23 14:20 ` (subset) [PATCH v4 0/8] Add UFS support for SC7180/SM7125 Vinod Koul
@ 2024-02-01 21:53 ` Bjorn Andersson
  9 siblings, 0 replies; 18+ messages in thread
From: Bjorn Andersson @ 2024-02-01 21:53 UTC (permalink / raw)
  To: Konrad Dybcio, Herbert Xu, David S. Miller, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	Alim Akhtar, Avri Altman, Bart Van Assche, Andy Gross,
	Vinod Koul, Kishon Vijay Abraham I, cros-qcom-dts-watchers,
	David Wronek
  Cc: linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming, Rob Herring,
	Krzysztof Kozlowski, Dmitry Baryshkov, Joe Mason


On Sun, 21 Jan 2024 17:57:40 +0100, David Wronek wrote:
> This patchset introduces UFS support for SC7180 and SM7125, as well as
> support for the Xiaomi Redmi Note 9S.
> 
> To: Bjorn Andersson <andersson@kernel.org>
> To: Konrad Dybcio <konrad.dybcio@linaro.org>
> To: Herbert Xu <herbert@gondor.apana.org.au>
> To: David S. Miller <davem@davemloft.net>
> To: Rob Herring <robh+dt@kernel.org>
> To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> To: Conor Dooley <conor+dt@kernel.org>
> To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> To: Alim Akhtar <alim.akhtar@samsung.com>
> To: Avri Altman <avri.altman@wdc.com>
> To: Bart Van Assche <bvanassche@acm.org>
> To: Andy Gross <agross@kernel.org>
> To: Vinod Koul <vkoul@kernel.org>
> To: Kishon Vijay Abraham I <kishon@kernel.org>
> To:  <cros-qcom-dts-watchers@chromium.org>
> Cc:  <linux-arm-msm@vger.kernel.org>
> Cc:  <linux-crypto@vger.kernel.org>
> Cc:  <devicetree@vger.kernel.org>
> Cc:  <linux-kernel@vger.kernel.org>
> Cc:  <linux-scsi@vger.kernel.org>
> Cc:  <linux-phy@lists.infradead.org>
> CC:  <~postmarketos/upstreaming@lists.sr.ht>
> 
> [...]

Applied, thanks!

[4/8] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S
      commit: 526b333d7c275a851ce982357218496569b3958e
[6/8] arm64: dts: qcom: sc7180: Add UFS nodes
      commit: 858536d9dc946b039e107350642ac6d78c235a6b
[7/8] arm64: dts: qcom: sm7125-xiaomi-common: Add UFS nodes
      commit: 00aaa58e8936558f7526f2376d3740885b5c7312
[8/8] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S
      commit: 6016fb7c91f72f4afbb4017e13cd91954d0f1a9b

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v4 3/8] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180
  2024-01-21 16:57 ` [PATCH v4 3/8] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180 David Wronek
@ 2024-02-12 22:21   ` Rob Herring
  0 siblings, 0 replies; 18+ messages in thread
From: Rob Herring @ 2024-02-12 22:21 UTC (permalink / raw)
  To: David Wronek
  Cc: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	Alim Akhtar, Avri Altman, Bart Van Assche, Andy Gross,
	Vinod Koul, Kishon Vijay Abraham I, cros-qcom-dts-watchers,
	linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming

On Sun, Jan 21, 2024 at 05:57:43PM +0100, David Wronek wrote:
> Document the QMP UFS PHY compatible for SC7180
> 
> Acked-by: Rob Herring <robh@kernel.org>
> Signed-off-by: David Wronek <davidwronek@gmail.com>
> ---
>  Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
> index 8474eef8d0ff..5faa1cb3a12e 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
> @@ -19,6 +19,7 @@ properties:
>        - qcom,msm8996-qmp-ufs-phy
>        - qcom,msm8998-qmp-ufs-phy
>        - qcom,sa8775p-qmp-ufs-phy
> +      - qcom,sc7180-qmp-ufs-phy

This doesn't match what you put in the dts which is adding to the 
warnings:

     51  phy@1d87000: compatible: ['qcom,sc7180-qmp-ufs-phy', 'qcom,sm7150-qmp-ufs-phy'] is too long
     51  phy@1d87000: clock-names: ['ref', 'ref_aux'] is too short
     48  phy@1d87000: clocks: [[39, 97], [39, 103]] is too short
     30  phy@1d87000: 'power-domains' is a required property


>        - qcom,sc7280-qmp-ufs-phy
>        - qcom,sc8180x-qmp-ufs-phy
>        - qcom,sc8280xp-qmp-ufs-phy
> @@ -102,6 +103,7 @@ allOf:
>            contains:
>              enum:
>                - qcom,msm8998-qmp-ufs-phy
> +              - qcom,sc7180-qmp-ufs-phy
>                - qcom,sc8180x-qmp-ufs-phy
>                - qcom,sc8280xp-qmp-ufs-phy
>                - qcom,sdm845-qmp-ufs-phy
> 
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v4 2/8] dt-bindings: ufs: qcom: Add SC7180 compatible string
  2024-01-21 16:57 ` [PATCH v4 2/8] dt-bindings: ufs: qcom: Add SC7180 compatible string David Wronek
@ 2024-02-12 22:22   ` Rob Herring
  2024-02-13 10:29     ` Dmitry Baryshkov
  0 siblings, 1 reply; 18+ messages in thread
From: Rob Herring @ 2024-02-12 22:22 UTC (permalink / raw)
  To: David Wronek
  Cc: Bjorn Andersson, Konrad Dybcio, Herbert Xu, David S. Miller,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	Alim Akhtar, Avri Altman, Bart Van Assche, Andy Gross,
	Vinod Koul, Kishon Vijay Abraham I, cros-qcom-dts-watchers,
	linux-arm-msm, linux-crypto, devicetree, linux-kernel,
	linux-scsi, linux-phy, ~postmarketos/upstreaming,
	Krzysztof Kozlowski

On Sun, Jan 21, 2024 at 05:57:42PM +0100, David Wronek wrote:
> Document the compatible for the UFS found on SC7180.
> 
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: David Wronek <davidwronek@gmail.com>
> ---
>  Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++
>  1 file changed, 2 insertions(+)

Should have been picked up by SCSI/UFS maintainers, but it 
hasn't, so I applied it.

Rob

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v4 2/8] dt-bindings: ufs: qcom: Add SC7180 compatible string
  2024-02-12 22:22   ` Rob Herring
@ 2024-02-13 10:29     ` Dmitry Baryshkov
  2024-02-13 18:11       ` Rob Herring
  0 siblings, 1 reply; 18+ messages in thread
From: Dmitry Baryshkov @ 2024-02-13 10:29 UTC (permalink / raw)
  To: Rob Herring
  Cc: David Wronek, Bjorn Andersson, Konrad Dybcio, Herbert Xu,
	David S. Miller, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers, linux-arm-msm, linux-crypto, devicetree,
	linux-kernel, linux-scsi, linux-phy, ~postmarketos/upstreaming,
	Krzysztof Kozlowski

On Tue, 13 Feb 2024 at 00:22, Rob Herring <robh@kernel.org> wrote:
>
> On Sun, Jan 21, 2024 at 05:57:42PM +0100, David Wronek wrote:
> > Document the compatible for the UFS found on SC7180.
> >
> > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > Signed-off-by: David Wronek <davidwronek@gmail.com>
> > ---
> >  Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++
> >  1 file changed, 2 insertions(+)
>
> Should have been picked up by SCSI/UFS maintainers, but it
> hasn't, so I applied it.

And it now triggers schema warnings, because sc7180-ufshc has 7 clocks
and 1 reg entries.

>
> Rob
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v4 2/8] dt-bindings: ufs: qcom: Add SC7180 compatible string
  2024-02-13 10:29     ` Dmitry Baryshkov
@ 2024-02-13 18:11       ` Rob Herring
  2024-02-14  8:56         ` Krzysztof Kozlowski
  2024-03-05 18:53         ` Rob Herring
  0 siblings, 2 replies; 18+ messages in thread
From: Rob Herring @ 2024-02-13 18:11 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: David Wronek, Bjorn Andersson, Konrad Dybcio, Herbert Xu,
	David S. Miller, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers, linux-arm-msm, linux-crypto, devicetree,
	linux-kernel, linux-scsi, linux-phy, ~postmarketos/upstreaming,
	Krzysztof Kozlowski

On Tue, Feb 13, 2024 at 4:30 AM Dmitry Baryshkov
<dmitry.baryshkov@linaro.org> wrote:
>
> On Tue, 13 Feb 2024 at 00:22, Rob Herring <robh@kernel.org> wrote:
> >
> > On Sun, Jan 21, 2024 at 05:57:42PM +0100, David Wronek wrote:
> > > Document the compatible for the UFS found on SC7180.
> > >
> > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > Signed-off-by: David Wronek <davidwronek@gmail.com>
> > > ---
> > >  Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++
> > >  1 file changed, 2 insertions(+)
> >
> > Should have been picked up by SCSI/UFS maintainers, but it
> > hasn't, so I applied it.
>
> And it now triggers schema warnings, because sc7180-ufshc has 7 clocks
> and 1 reg entries.

And now dropped... Perhaps the dts changes should be too.

Maybe QCom maintainers should require a report of dtbs_check on new
boards. My comparisons of Linus vs. next warnings often show an
increase in QCom warnings. Like right now:

linus: arch/arm64/boot/dts/qcom:1990:265
next: arch/arm64/boot/dts/qcom:1610:298

First number is total warnings. Second number is unique warnings
(stripping dtb name). Some of this is just mismatch between schemas
and dts changes showing up in next, but it doesn't tend to go to 0 as
the merge window approaches. I've seen this several cycles. All the
data is available from my CI jobs, and I regularly look at the diff
with this:

$ less ~/bin/gl-diff-dtb-warnings
#!/bin/sh

[ -z "$1" ] && { echo "Missing arch!"; exit 1; }

arch="$1"

job="job-dtbs-check"
logfile="platform-warnings.log"

# url <branch> <arch>
url() {
        local branch="$1"
        local arch="$2"
        echo "https://gitlab.com/robherring/linux-dt/-/jobs/artifacts/${branch}/raw/${logfile}?job=${job}%3A+%5B${arch}%5D"

}

curl -Ls -o orig.log $(url linus ${arch})
curl -Ls -o next.log $(url next ${arch})
meld orig.log next.log

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v4 2/8] dt-bindings: ufs: qcom: Add SC7180 compatible string
  2024-02-13 18:11       ` Rob Herring
@ 2024-02-14  8:56         ` Krzysztof Kozlowski
  2024-03-05 18:53         ` Rob Herring
  1 sibling, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-14  8:56 UTC (permalink / raw)
  To: Rob Herring, Dmitry Baryshkov
  Cc: David Wronek, Bjorn Andersson, Konrad Dybcio, Herbert Xu,
	David S. Miller, Krzysztof Kozlowski, Conor Dooley,
	Manivannan Sadhasivam, Alim Akhtar, Avri Altman, Bart Van Assche,
	Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers, linux-arm-msm, linux-crypto, devicetree,
	linux-kernel, linux-scsi, linux-phy, ~postmarketos/upstreaming

On 13/02/2024 19:11, Rob Herring wrote:
> On Tue, Feb 13, 2024 at 4:30 AM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
>>
>> On Tue, 13 Feb 2024 at 00:22, Rob Herring <robh@kernel.org> wrote:
>>>
>>> On Sun, Jan 21, 2024 at 05:57:42PM +0100, David Wronek wrote:
>>>> Document the compatible for the UFS found on SC7180.
>>>>
>>>> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>> Signed-off-by: David Wronek <davidwronek@gmail.com>
>>>> ---
>>>>  Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++
>>>>  1 file changed, 2 insertions(+)
>>>
>>> Should have been picked up by SCSI/UFS maintainers, but it
>>> hasn't, so I applied it.
>>
>> And it now triggers schema warnings, because sc7180-ufshc has 7 clocks
>> and 1 reg entries.
> 
> And now dropped... Perhaps the dts changes should be too.
> 
> Maybe QCom maintainers should require a report of dtbs_check on new
> boards. My comparisons of Linus vs. next warnings often show an
> increase in QCom warnings. Like right now:
> 
> linus: arch/arm64/boot/dts/qcom:1990:265
> next: arch/arm64/boot/dts/qcom:1610:298

I was tracking new dtbs_check warnings on Qualcomm for selected
subsystems and for selected boards, but that grew faster than I was able
to fix it so I gave up...

After all these months and all these review feedbacks many people still
do not test their DTS with dtbs_check, so maybe the solution is to start
dropping people's patches? Detect new warnings and drop the patch from
Qualcomm tree?

> 
> First number is total warnings. Second number is unique warnings
> (stripping dtb name). Some of this is just mismatch between schemas
> and dts changes showing up in next, but it doesn't tend to go to 0 as
> the merge window approaches. I've seen this several cycles. All the
> data is available from my CI jobs, and I regularly look at the diff
> with this:
> 
> $ less ~/bin/gl-diff-dtb-warnings
> #!/bin/sh
> 
> [ -z "$1" ] && { echo "Missing arch!"; exit 1; }
> 
> arch="$1"
> 
> job="job-dtbs-check"
> logfile="platform-warnings.log"
> 
> # url <branch> <arch>
> url() {
>         local branch="$1"
>         local arch="$2"
>         echo "https://gitlab.com/robherring/linux-dt/-/jobs/artifacts/${branch}/raw/${logfile}?job=${job}%3A+%5B${arch}%5D"
> 
> }
> 
> curl -Ls -o orig.log $(url linus ${arch})
> curl -Ls -o next.log $(url next ${arch})
> meld orig.log next.log

That's useful, thanks!

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v4 2/8] dt-bindings: ufs: qcom: Add SC7180 compatible string
  2024-02-13 18:11       ` Rob Herring
  2024-02-14  8:56         ` Krzysztof Kozlowski
@ 2024-03-05 18:53         ` Rob Herring
  1 sibling, 0 replies; 18+ messages in thread
From: Rob Herring @ 2024-03-05 18:53 UTC (permalink / raw)
  To: Dmitry Baryshkov, David Wronek, Bjorn Andersson
  Cc: Konrad Dybcio, Herbert Xu, David S. Miller, Krzysztof Kozlowski,
	Conor Dooley, Manivannan Sadhasivam, Alim Akhtar, Avri Altman,
	Bart Van Assche, Andy Gross, Vinod Koul, Kishon Vijay Abraham I,
	cros-qcom-dts-watchers, linux-arm-msm, linux-crypto, devicetree,
	linux-kernel, linux-scsi, linux-phy, ~postmarketos/upstreaming,
	Krzysztof Kozlowski

On Tue, Feb 13, 2024 at 12:11 PM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Feb 13, 2024 at 4:30 AM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
> >
> > On Tue, 13 Feb 2024 at 00:22, Rob Herring <robh@kernel.org> wrote:
> > >
> > > On Sun, Jan 21, 2024 at 05:57:42PM +0100, David Wronek wrote:
> > > > Document the compatible for the UFS found on SC7180.
> > > >
> > > > Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > > Signed-off-by: David Wronek <davidwronek@gmail.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > >
> > > Should have been picked up by SCSI/UFS maintainers, but it
> > > hasn't, so I applied it.
> >
> > And it now triggers schema warnings, because sc7180-ufshc has 7 clocks
> > and 1 reg entries.
>
> And now dropped... Perhaps the dts changes should be too.
>
> Maybe QCom maintainers should require a report of dtbs_check on new
> boards. My comparisons of Linus vs. next warnings often show an
> increase in QCom warnings. Like right now:
>
> linus: arch/arm64/boot/dts/qcom:1990:265
> next: arch/arm64/boot/dts/qcom:1610:298

Still a bunch of warnings in next. This binding should be resubmitted
with fixes or the dts changes dropped.

Rob

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-03-05 18:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-21 16:57 [PATCH v4 0/8] Add UFS support for SC7180/SM7125 David Wronek
2024-01-21 16:57 ` [PATCH v4 1/8] dt-bindings: crypto: ice: Document SC7180 inline crypto engine David Wronek
2024-01-26  9:09   ` Herbert Xu
2024-01-21 16:57 ` [PATCH v4 2/8] dt-bindings: ufs: qcom: Add SC7180 compatible string David Wronek
2024-02-12 22:22   ` Rob Herring
2024-02-13 10:29     ` Dmitry Baryshkov
2024-02-13 18:11       ` Rob Herring
2024-02-14  8:56         ` Krzysztof Kozlowski
2024-03-05 18:53         ` Rob Herring
2024-01-21 16:57 ` [PATCH v4 3/8] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180 David Wronek
2024-02-12 22:21   ` Rob Herring
2024-01-21 16:57 ` [PATCH v4 4/8] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S David Wronek
2024-01-21 16:57 ` [PATCH v4 5/8] phy: qcom: qmp-ufs: Add SC7180 support David Wronek
2024-01-21 16:57 ` [PATCH v4 6/8] arm64: dts: qcom: sc7180: Add UFS nodes David Wronek
2024-01-21 16:57 ` [PATCH v4 7/8] arm64: dts: qcom: sm7125-xiaomi-common: " David Wronek
2024-01-21 16:57 ` [PATCH v4 8/8] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S David Wronek
2024-01-23 14:20 ` (subset) [PATCH v4 0/8] Add UFS support for SC7180/SM7125 Vinod Koul
2024-02-01 21:53 ` Bjorn Andersson

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).