Skip to contentSkip to conversation

dt-bindings: nvmem: qfprom: add sdm670 compatible

PATCH In review Richard Acayan 4 participants 7 messages Dec 5, 2022 – Jan 3, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 dt-bindings: nvmem: qfprom: add sdm670 compatible

There is some configuration in SDM670's QFPROM. Add the compatible for it.

---
 Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +1 -0
index 2eab2f46cb65..01ec2143a3b5 100644
@@ -27,6 +27,7 @@ properties:
           - qcom,sc7180-qfprom
           - qcom,sc7280-qfprom
           - qcom,sdm630-qfprom
+          - qcom,sdm670-qfprom
           - qcom,sdm845-qfprom
           - qcom,sm6115-qfprom
       - const: qcom,qfprom
Signature · 1 line
2.38.1
#1 lore raw

PATCH 2/3 arm64: dts: qcom: sdm670: add qfprom node

Some hardware quirks and capabilities can be determined by reading the fuse-programmable read-only memory. Add the QFPROM node so consumers know if they need to do anything extra to support the hardware.

---
 arch/arm64/boot/dts/qcom/sdm670.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/qcom/sdm670.dtsi +7 -0
index f93705bc549f..933ad2fabf3a 100644
@@ -731,6 +731,13 @@ gcc: clock-controller@100000 {
 			#power-domain-cells = <1>;
 		};
 
+		qfprom: qfprom@780000 {
+			compatible = "qcom,sdm670-qfprom", "qcom,qfprom";
+			reg = <0 0x780000 0 0x1000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		sdhc_1: mmc@7c4000 {
 			compatible = "qcom,sdm670-sdhci", "qcom,sdhci-msm-v5";
 			reg = <0 0x007c4000 0 0x1000>,
Signature · 1 line
2.38.1
maintainer
#2 lore raw

Re: [PATCH 2/3] arm64: dts: qcom: sdm670: add qfprom node

Quoted 14 lines · Richard Acayan

Some hardware quirks and capabilities can be determined by reading the fuse-programmable read-only memory. Add the QFPROM node so consumers know if they need to do anything extra to support the hardware.

---
 arch/arm64/boot/dts/qcom/sdm670.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/qcom/sdm670.dtsi +0 -0
index f93705bc549f..933ad2fabf3a 100644

arch/arm64/boot/dts/qcom/sdm670.dtsi gcc: clock-controller@100000 { · line 736

Quoted 6 lines
arch/arm64/boot/dts/qcom/sdm670.dtsi +3 -0
@@ -731,6 +731,13 @@ gcc: clock-controller@100000 {
 			#power-domain-cells = <1>;
 		};
 
+		qfprom: qfprom@780000 {
+			compatible = "qcom,sdm670-qfprom", "qcom,qfprom";
+			reg = <0 0x780000 0 0x1000>;

I suspect the qfprom block is inherited from SDM845, if so 0x780000 contains raw, uncorrected data, while 0x784000 contains ECC-corrected versions of these. Please validate and use the same.

Also, please pad the address to 8 digits, to make it easier to check the sort order.

Thanks,
Bjorn

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm670.dtsi +4 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		sdhc_1: mmc@7c4000 {
 			compatible = "qcom,sdm670-sdhci", "qcom,sdhci-msm-v5";
 			reg = <0 0x007c4000 0 0x1000>,
Signature · 1 line
2.38.1
#3 lore raw

Re: [PATCH 2/3] arm64: dts: qcom: sdm670: add qfprom node

Quoted 18 lines · Bjorn Andersson
Quoted 17 lines · Richard Acayan

Some hardware quirks and capabilities can be determined by reading the fuse-programmable read-only memory. Add the QFPROM node so consumers know if they need to do anything extra to support the hardware.

---
 arch/arm64/boot/dts/qcom/sdm670.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/qcom/sdm670.dtsi +0 -0
index f93705bc549f..933ad2fabf3a 100644
@@ -731,6 +731,13 @@ gcc: clock-controller@100000 {
 			#power-domain-cells = <1>;
 		};
 
Quoted 7 lines

arch/arm64/boot/dts/qcom/sdm670.dtsi gcc: clock-controller@100000 { · line 736

Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm670.dtsi +3 -0
+		qfprom: qfprom@780000 {
+			compatible = "qcom,sdm670-qfprom", "qcom,qfprom";
+			reg = <0 0x780000 0 0x1000>;

I suspect the qfprom block is inherited from SDM845, if so 0x780000 contains raw, uncorrected data, while 0x784000 contains ECC-corrected versions of these. Please validate and use the same.

I just compared the qusb2p_hstx_trim values at 0x7801eb and 0x7841eb and this seems to be true. Will change in the next version.

Quoted 3 lines

Also, please pad the address to 8 digits, to make it easier to check the sort order.

Ack.

Quoted 14 lines

Thanks,
Bjorn

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm670.dtsi +4 -0
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
+
 		sdhc_1: mmc@7c4000 {
 			compatible = "qcom,sdm670-sdhci", "qcom,sdhci-msm-v5";
 			reg = <0 0x007c4000 0 0x1000>,
Signature · 1 line
2.38.1
#4 lore raw

PATCH 3/3 arm64: dts: qcom: sdm670: add missing usb hstx nvmem cell

In reply to Richard Acayan

This nvmem cell is present on SDM670 as well as SDM845. Add it in SDM670 so there is proper tuning.

---
 arch/arm64/boot/dts/qcom/sdm670.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/qcom/sdm670.dtsi +7 -0
index 933ad2fabf3a..2a44cccc47ee 100644
@@ -736,6 +736,11 @@ qfprom: qfprom@780000 {
 			reg = <0 0x780000 0 0x1000>;
 			#address-cells = <1>;
 			#size-cells = <1>;
+
+			qusb2p_hstx_trim: hstx-trim-primary@1eb {
+				reg = <0x1eb 0x1>;
+				bits = <1 4>;
+			};
 		};
 
 		sdhc_1: mmc@7c4000 {
@@ -1418,6 +1423,8 @@ usb_1_hsphy: phy@88e2000 {
 
 			resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
 
+			nvmem-cells = <&qusb2p_hstx_trim>;
+
 			status = "disabled";
 		};
 
Signature · 1 line
2.38.1
#6 lore raw
In reply to Richard Acayan
Quoted 7 lines · Richard Acayan

There is some configuration in SDM670's QFPROM. Add the compatible for it.

---
  Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 +
  1 file changed, 1 insertion(+)

Applied thanks,

--srini

Quoted 13 lines
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +1 -0
index 2eab2f46cb65..01ec2143a3b5 100644
@@ -27,6 +27,7 @@ properties:
            - qcom,sc7180-qfprom
            - qcom,sc7280-qfprom
            - qcom,sdm630-qfprom
+          - qcom,sdm670-qfprom
            - qcom,sdm845-qfprom
            - qcom,sm6115-qfprom
        - const: qcom,qfprom