Skip to contentSkip to conversation

ARM: dts: qcom: msm8960: Add BAM

PATCH Superseded Rudraksha Gupta 3 participants 8 messages Feb 9, 2025 – Feb 14, 2025

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: dts: qcom: msm8960: Add BAM

Copy bam nodes from qcom-ipq8064.dtsi and change the reg values to match msm8960.

---
Changes in v2:
- Reorganize sdcc{3,1}bam to be after sdcc{3,1} respectively
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
arch/arm/boot/dts/qcom/qcom-msm8960.dtsi +26 -2
index 865fe7cc39511d7cb9ec5c4b12100404f77e2989..a5ef9269b78b25b404e1ab11e6eff2639f16b446 100644
@@ -279,7 +279,7 @@ sdcc3: mmc@12180000 {
 			compatible = "arm,pl18x", "arm,primecell";
 			arm,primecell-periphid = <0x00051180>;
 			status = "disabled";
-			reg = <0x12180000 0x8000>;
+			reg = <0x12180000 0x2000>;
 			interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&gcc SDC3_CLK>, <&gcc SDC3_H_CLK>;
 			clock-names = "mclk", "apb_pclk";
@@ -289,13 +289,25 @@ sdcc3: mmc@12180000 {
 			max-frequency = <192000000>;
 			no-1-8-v;
 			vmmc-supply = <&vsdcc_fixed>;
+			dmas = <&sdcc3bam 2>, <&sdcc3bam 1>;
+			dma-names = "tx", "rx";
+		};
+
+		sdcc3bam: dma-controller@12182000 {
+			compatible = "qcom,bam-v1.3.0";
+			reg = <0x12182000 0x2000>;
+			interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc SDC3_H_CLK>;
+			clock-names = "bam_clk";
+			#dma-cells = <1>;
+			qcom,ee = <0>;
 		};
 
 		sdcc1: mmc@12400000 {
 			status = "disabled";
 			compatible = "arm,pl18x", "arm,primecell";
 			arm,primecell-periphid = <0x00051180>;
-			reg = <0x12400000 0x8000>;
+			reg = <0x12400000 0x2000>;
 			interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&gcc SDC1_CLK>, <&gcc SDC1_H_CLK>;
 			clock-names = "mclk", "apb_pclk";
@@ -305,6 +317,18 @@ sdcc1: mmc@12400000 {
 			cap-sd-highspeed;
 			cap-mmc-highspeed;
 			vmmc-supply = <&vsdcc_fixed>;
+			dmas = <&sdcc1bam 2>, <&sdcc1bam 1>;
+			dma-names = "tx", "rx";
+		};
+
+		sdcc1bam: dma-controller@12402000 {
+			compatible = "qcom,bam-v1.3.0";
+			reg = <0x12402000 0x2000>;
+			interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&gcc SDC1_H_CLK>;
+			clock-names = "bam_clk";
+			#dma-cells = <1>;
+			qcom,ee = <0>;
 		};
 
 		tcsr: syscon@1a400000 {

---
base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04
change-id: 20250208-expressatt-bam-d0ed9863a626

Best regards,

Signature · 1 line
Rudraksha Gupta <[email protected]>
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Rudraksha Gupta

Copy bam nodes from qcom-ipq8064.dtsi and change the reg values to match msm8960.

Quoted 8 lines

---
Changes in v2:
- Reorganize sdcc{3,1}bam to be after sdcc{3,1} respectively
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#2 lore raw
In reply to Rudraksha Gupta
Quoted 28 lines · Rudraksha Gupta

Copy bam nodes from qcom-ipq8064.dtsi and change the reg values to match msm8960.

---
Changes in v2:
- Reorganize sdcc{3,1}bam to be after sdcc{3,1} respectively
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 arch/arm/boot/dts/qcom/qcom-msm8960.dtsi | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
arch/arm/boot/dts/qcom/qcom-msm8960.dtsi +1 -1
index 865fe7cc39511d7cb9ec5c4b12100404f77e2989..a5ef9269b78b25b404e1ab11e6eff2639f16b446 100644
@@ -279,7 +279,7 @@ sdcc3: mmc@12180000 {
 			compatible = "arm,pl18x", "arm,primecell";
 			arm,primecell-periphid = <0x00051180>;
 			status = "disabled";
-			reg = <0x12180000 0x8000>;
+			reg = <0x12180000 0x2000>;
 			interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&gcc SDC3_CLK>, <&gcc SDC3_H_CLK>;
 			clock-names = "mclk", "apb_pclk";

arch/arm/boot/dts/qcom/qcom-msm8960.dtsi sdcc3: mmc@12180000 { · line 298

Quoted 10 lines
arch/arm/boot/dts/qcom/qcom-msm8960.dtsi +7 -0
@@ -289,13 +289,25 @@ sdcc3: mmc@12180000 {
 			max-frequency = <192000000>;
 			no-1-8-v;
 			vmmc-supply = <&vsdcc_fixed>;
+			dmas = <&sdcc3bam 2>, <&sdcc3bam 1>;
+			dma-names = "tx", "rx";
+		};
+
+		sdcc3bam: dma-controller@12182000 {
+			compatible = "qcom,bam-v1.3.0";
+			reg = <0x12182000 0x2000>;

The BAM controller is 0x4000-long

Otherwise, looks good

Konrad

#3 lore raw
Quoted 5 lines

arch/arm/boot/dts/qcom/qcom-msm8960.dtsi sdcc3: mmc@12180000 { · line 298

Quoted 3 lines
arch/arm/boot/dts/qcom/qcom-msm8960.dtsi +3 -0
+             sdcc3bam: dma-controller@12182000 {
+                     compatible = "qcom,bam-v1.3.0";
+                     reg = <0x12182000 0x2000>;

The BAM controller is 0x4000-long

Seems like my device splats with this requested change:

Diff: https://pastebin.com/AwzHPCLG
Log: https://pastebin.com/WQswkndX

Quoted 4 lines

Otherwise, looks good

Konrad

#4 lore raw
Quoted 11 lines · Rudraksha Gupta
Quoted 5 lines

arch/arm/boot/dts/qcom/qcom-msm8960.dtsi sdcc3: mmc@12180000 { · line 298

Quoted 3 lines
arch/arm/boot/dts/qcom/qcom-msm8960.dtsi +3 -0
+             sdcc3bam: dma-controller@12182000 {
+                     compatible = "qcom,bam-v1.3.0";
+                     reg = <0x12182000 0x2000>;

The BAM controller is 0x4000-long

Seems like my device splats with this requested change:

Diff: https://pastebin.com/AwzHPCLG
Log: https://pastebin.com/WQswkndX

Did you keep your changes that shortened the sd controllers address space?

Konrad

#5 lore raw
Quoted 1 line

Did you keep your changes that shortened the sd controllers address space?

No, I changed sdcc3, sdcc3bam, sdcc1, sdcc1bam from 0x2000 to 0x4000 (2nd param of reg) as you requested, however, I got a splat.

Please let me know if I did anything wrong. Thanks.

Quoted 2 lines

Konrad

#6 lore raw
Quoted 6 lines · Rudraksha Gupta
Quoted 1 line

Did you keep your changes that shortened the sd controllers address space?

No, I changed sdcc3, sdcc3bam, sdcc1, sdcc1bam from 0x2000 to 0x4000 (2nd param of reg) as you requested, however, I got a splat.

Please let me know if I did anything wrong. Thanks.

Konrad asked you to increase the size of the BAM devices. You've increased it for both BAM and SDCC controllers. Please revert the size of the arm,pl18x devices (sdcc1, sdcc3) to 0x2000.

Quoted 3 lines
Quoted 3 lines

Konrad

Signature · 2 lines
With best wishes
Dmitry
#7 lore raw
Quoted 3 lines

Konrad asked you to increase the size of the BAM devices. You've increased it for both BAM and SDCC controllers. Please revert the size of the arm,pl18x devices (sdcc1, sdcc3) to 0x2000.

Oh, I see now, thanks! Seems like I took Konrad's words literally. Sent in v3 :)

Quoted 8 lines
Quoted 4 lines
Quoted 4 lines

Konrad

--
With best wishes
Dmitry