Skip to contentSkip to conversation

arm64: dts: qcom: smmu/USB nodes and HDK855/HDK865 dts

PATCH Superseded Jonathan Marek 5 participants 46 messages May 24, 2020 – Jun 11, 2020

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover arm64: dts: qcom: smmu/USB nodes and HDK855/HDK865 dts

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

 arch/arm64/boot/dts/qcom/Makefile       |   2 +
 arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
 arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
 5 files changed, 1384 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts
Signature · 1 line
2.26.1
#1 lore raw

PATCH 1/6 arm64: dts: qcom: sm8150: add apps_smmu node

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 ++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +91 -0
index a36512d1f6a1..acb839427b12 100644
@@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 {
 			resets = <&gcc GCC_UFS_PHY_BCR>;
 			reset-names = "rst";
 
+			iommus = <&apps_smmu 0x300 0>;
+
 			clock-names =
 				"core_clk",
 				"bus_aggr_clk",
@@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 {
 				compatible = "snps,dwc3";
 				reg = <0 0x0a600000 0 0xcd00>;
 				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x140 0>;
 				snps,dis_u2_susphy_quirk;
 				snps,dis_enblslpm_quirk;
 				phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
@@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 {
 			cell-index = <0>;
 		};
 
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";
+			reg = <0 0x15000000 0 0x100000>;
+			#iommu-cells = <2>;
+			#global-interrupts = <1>;
+			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
 		remoteproc_adsp: remoteproc@17300000 {
 			compatible = "qcom,sm8150-adsp-pas";
 			reg = <0x0 0x17300000 0x0 0x4040>;
Signature · 1 line
2.26.1
#2 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Hi Jonathan,

Quoted 32 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 ++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +3 -0
index a36512d1f6a1..acb839427b12 100644
@@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 {
 			resets = <&gcc GCC_UFS_PHY_BCR>;
 			reset-names = "rst";
 
+			iommus = <&apps_smmu 0x300 0>;
+
 			clock-names =
 				"core_clk",
 				"bus_aggr_clk",
@@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 {
 				compatible = "snps,dwc3";
 				reg = <0 0x0a600000 0 0xcd00>;
 				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x140 0>;
 				snps,dis_u2_susphy_quirk;
 				snps,dis_enblslpm_quirk;
 				phys = <&usb_1_hsphy>, <&usb_1_ssphy>;

arch/arm64/boot/dts/qcom/sm8150.dtsi spmi_bus: spmi@c440000 { · line 749

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +2 -0
@@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 {
 			cell-index = <0>;
 		};
 
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";

This should be qcom,sm8150-smmu-500 and also you need to update the arm-smmu binding with this compatible in a separate patch.

-Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
Reviewed-by Tested-by
#3 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 39 lines · Sai Prakash Ranjan

Hi Jonathan,

Quoted 36 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 
++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +3 -0
index a36512d1f6a1..acb839427b12 100644
@@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 {
 			resets = <&gcc GCC_UFS_PHY_BCR>;
 			reset-names = "rst";
 
+			iommus = <&apps_smmu 0x300 0>;
+
 			clock-names =
 				"core_clk",
 				"bus_aggr_clk",
@@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 {
 				compatible = "snps,dwc3";
 				reg = <0 0x0a600000 0 0xcd00>;
 				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x140 0>;
 				snps,dis_u2_susphy_quirk;
 				snps,dis_enblslpm_quirk;
 				phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
@@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 {
 			cell-index = <0>;
 		};
 
Quoted 6 lines

arch/arm64/boot/dts/qcom/sm8150.dtsi spmi_bus: spmi@c440000 { · line 749

Quoted 2 lines
arch/arm64/boot/dts/qcom/sm8150.dtsi +2 -0
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";

This should be qcom,sm8150-smmu-500 and also you need to update the arm-smmu binding with this compatible in a separate patch.

I tested out this series with my coresight patches for enabling SMMU translation for ETR on SM8150, it works fine. With this above comment addressed and with Bjorn's comments on commit description addressed,

Thanks,
Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#4 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

In reply to Jonathan Marek
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Thanks,
Bjorn

Quoted 124 lines
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 ++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +91 -0
index a36512d1f6a1..acb839427b12 100644
@@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 {
 			resets = <&gcc GCC_UFS_PHY_BCR>;
 			reset-names = "rst";
 
+			iommus = <&apps_smmu 0x300 0>;
+
 			clock-names =
 				"core_clk",
 				"bus_aggr_clk",
@@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 {
 				compatible = "snps,dwc3";
 				reg = <0 0x0a600000 0 0xcd00>;
 				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x140 0>;
 				snps,dis_u2_susphy_quirk;
 				snps,dis_enblslpm_quirk;
 				phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
@@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 {
 			cell-index = <0>;
 		};
 
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";
+			reg = <0 0x15000000 0 0x100000>;
+			#iommu-cells = <2>;
+			#global-interrupts = <1>;
+			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
 		remoteproc_adsp: remoteproc@17300000 {
 			compatible = "qcom,sm8150-adsp-pas";
 			reg = <0x0 0x17300000 0x0 0x4040>;
Signature · 1 line
2.26.1
#5 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 7 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Quoted 7 lines

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Thanks,
Bjorn

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none" combined with setting the physical switch to HDMI mode (which switches off the 1440x2560 panel) gets it to not setup the display at all (just the fastboot command isn't enough).

With HDK865 though that doesn't work and I have a hack to work around it (writing 0 to INTF_TIMING_ENGINE_EN early on in boot will stop video mode scanout and it won't crash).

Quoted 124 lines
Quoted 124 lines
---
  arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 ++++++++++++++++++++++++++++
  1 file changed, 91 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +91 -0
index a36512d1f6a1..acb839427b12 100644
@@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 {
  			resets = <&gcc GCC_UFS_PHY_BCR>;
  			reset-names = "rst";
 
+			iommus = <&apps_smmu 0x300 0>;
+
  			clock-names =
  				"core_clk",
  				"bus_aggr_clk",
@@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 {
  				compatible = "snps,dwc3";
  				reg = <0 0x0a600000 0 0xcd00>;
  				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x140 0>;
  				snps,dis_u2_susphy_quirk;
  				snps,dis_enblslpm_quirk;
  				phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
@@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 {
  			cell-index = <0>;
  		};
 
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";
+			reg = <0 0x15000000 0 0x100000>;
+			#iommu-cells = <2>;
+			#global-interrupts = <1>;
+			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
  		remoteproc_adsp: remoteproc@17300000 {
  			compatible = "qcom,sm8150-adsp-pas";
  			reg = <0x0 0x17300000 0x0 0x4040>;
Signature · 1 line
2.26.1
#6 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 14 lines · Jonathan Marek
Quoted 11 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Quoted 9 lines
Quoted 3 lines

Thanks,
Bjorn

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none" combined with setting the physical switch to HDMI mode (which switches off the 1440x2560 panel) gets it to not setup the display at all (just the fastboot command isn't enough).

Okay, I don't think we have anything equivalent on the MTP, but good to know.

Quoted 4 lines

With HDK865 though that doesn't work and I have a hack to work around it (writing 0 to INTF_TIMING_ENGINE_EN early on in boot will stop video mode scanout and it won't crash).

Then we need to sort this out in the arm-smmu driver before we can enable the apps_smmu node on 8250. I did receive some guidance from Will on the subject and have started looking into this.

Thanks,
Bjorn

Quoted 122 lines
Quoted 122 lines
Quoted 122 lines
---
  arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 ++++++++++++++++++++++++++++
  1 file changed, 91 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +91 -0
index a36512d1f6a1..acb839427b12 100644
@@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 {
  			resets = <&gcc GCC_UFS_PHY_BCR>;
  			reset-names = "rst";
+			iommus = <&apps_smmu 0x300 0>;
+
  			clock-names =
  				"core_clk",
  				"bus_aggr_clk",
@@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 {
  				compatible = "snps,dwc3";
  				reg = <0 0x0a600000 0 0xcd00>;
  				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x140 0>;
  				snps,dis_u2_susphy_quirk;
  				snps,dis_enblslpm_quirk;
  				phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
@@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 {
  			cell-index = <0>;
  		};
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";
+			reg = <0 0x15000000 0 0x100000>;
+			#iommu-cells = <2>;
+			#global-interrupts = <1>;
+			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
  		remoteproc_adsp: remoteproc@17300000 {
  			compatible = "qcom,sm8150-adsp-pas";
  			reg = <0x0 0x17300000 0x0 0x4040>;
Signature · 1 line
2.26.1
#7 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 29 lines · Bjorn Andersson
Quoted 14 lines · Jonathan Marek
Quoted 11 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Quoted 9 lines
Quoted 3 lines

Thanks,
Bjorn

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none" combined with setting the physical switch to HDMI mode (which switches off the 1440x2560 panel) gets it to not setup the display at all (just the fastboot command isn't enough).

Okay, I don't think we have anything equivalent on the MTP, but good to know.

Quoted 9 lines
Quoted 4 lines

With HDK865 though that doesn't work and I have a hack to work around it (writing 0 to INTF_TIMING_ENGINE_EN early on in boot will stop video mode scanout and it won't crash).

Then we need to sort this out in the arm-smmu driver before we can enable the apps_smmu node on 8250. I did receive some guidance from Will on the subject and have started looking into this.

That's annoying because a lot depends on apps_mmu. GPU is an exception with its own MMU but pretty much everything else uses apps_smmu (does it make sense to add USB nodes if it won't work without apps_smmu?) Is this something that will get resolved soon?

FWIW, I have another sm8250 board which does not need the workaround (its bootloader does not set up the display). AFAIK modifying the bootloader to not set up any display is a trivial modification (assuming that's an option).

Quoted 125 lines

Thanks,
Bjorn

Quoted 122 lines
Quoted 122 lines
Quoted 122 lines
---
   arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 ++++++++++++++++++++++++++++
   1 file changed, 91 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +91 -0
index a36512d1f6a1..acb839427b12 100644
@@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 {
   			resets = <&gcc GCC_UFS_PHY_BCR>;
   			reset-names = "rst";
+			iommus = <&apps_smmu 0x300 0>;
+
   			clock-names =
   				"core_clk",
   				"bus_aggr_clk",
@@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 {
   				compatible = "snps,dwc3";
   				reg = <0 0x0a600000 0 0xcd00>;
   				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x140 0>;
   				snps,dis_u2_susphy_quirk;
   				snps,dis_enblslpm_quirk;
   				phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
@@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 {
   			cell-index = <0>;
   		};
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";
+			reg = <0 0x15000000 0 0x100000>;
+			#iommu-cells = <2>;
+			#global-interrupts = <1>;
+			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
   		remoteproc_adsp: remoteproc@17300000 {
   			compatible = "qcom,sm8150-adsp-pas";
   			reg = <0x0 0x17300000 0x0 0x4040>;
Signature · 1 line
2.26.1
#8 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 40 lines · Jonathan Marek
Quoted 29 lines · Bjorn Andersson
Quoted 14 lines · Jonathan Marek
Quoted 11 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Quoted 9 lines
Quoted 3 lines

Thanks,
Bjorn

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none" combined with setting the physical switch to HDMI mode (which switches off the 1440x2560 panel) gets it to not setup the display at all (just the fastboot command isn't enough).

Okay, I don't think we have anything equivalent on the MTP, but good to know.

Quoted 9 lines
Quoted 4 lines

With HDK865 though that doesn't work and I have a hack to work around it (writing 0 to INTF_TIMING_ENGINE_EN early on in boot will stop video mode scanout and it won't crash).

Then we need to sort this out in the arm-smmu driver before we can enable the apps_smmu node on 8250. I did receive some guidance from Will on the subject and have started looking into this.

Quoted 5 lines

That's annoying because a lot depends on apps_mmu. GPU is an exception with its own MMU but pretty much everything else uses apps_smmu (does it make sense to add USB nodes if it won't work without apps_smmu?) Is this something that will get resolved soon?

We have a number of boards where this is becoming a critical issue, so we better find an acceptable solution to this very soon.

Regards,
Bjorn

Quoted 130 lines

FWIW, I have another sm8250 board which does not need the workaround (its bootloader does not set up the display). AFAIK modifying the bootloader to not set up any display is a trivial modification (assuming that's an option).

Quoted 125 lines

Thanks,
Bjorn

Quoted 122 lines
Quoted 122 lines
Quoted 122 lines
---
   arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 ++++++++++++++++++++++++++++
   1 file changed, 91 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +91 -0
index a36512d1f6a1..acb839427b12 100644
@@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 {
   			resets = <&gcc GCC_UFS_PHY_BCR>;
   			reset-names = "rst";
+			iommus = <&apps_smmu 0x300 0>;
+
   			clock-names =
   				"core_clk",
   				"bus_aggr_clk",
@@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 {
   				compatible = "snps,dwc3";
   				reg = <0 0x0a600000 0 0xcd00>;
   				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x140 0>;
   				snps,dis_u2_susphy_quirk;
   				snps,dis_enblslpm_quirk;
   				phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
@@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 {
   			cell-index = <0>;
   		};
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";
+			reg = <0 0x15000000 0 0x100000>;
+			#iommu-cells = <2>;
+			#global-interrupts = <1>;
+			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
   		remoteproc_adsp: remoteproc@17300000 {
   			compatible = "qcom,sm8150-adsp-pas";
   			reg = <0x0 0x17300000 0x0 0x4040>;
Signature · 1 line
2.26.1
#9 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 42 lines · Bjorn Andersson
Quoted 40 lines · Jonathan Marek
Quoted 38 lines · Bjorn Andersson
Quoted 14 lines · Jonathan Marek
Quoted 11 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Quoted 9 lines
Quoted 3 lines

Thanks,
Bjorn

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none" combined with setting the physical switch to HDMI mode (which switches off the 1440x2560 panel) gets it to not setup the display at all (just the fastboot command isn't enough).

Okay, I don't think we have anything equivalent on the MTP, but good to know.

Quoted 4 lines

With HDK865 though that doesn't work and I have a hack to work around it (writing 0 to INTF_TIMING_ENGINE_EN early on in boot will stop video mode scanout and it won't crash).

Then we need to sort this out in the arm-smmu driver before we can enable the apps_smmu node on 8250. I did receive some guidance from Will on the subject and have started looking into this.

Quoted 9 lines
Quoted 5 lines

That's annoying because a lot depends on apps_mmu. GPU is an exception with its own MMU but pretty much everything else uses apps_smmu (does it make sense to add USB nodes if it won't work without apps_smmu?) Is this something that will get resolved soon?

We have a number of boards where this is becoming a critical issue, so we better find an acceptable solution to this very soon.

I kept the sm8250 apps_smmu patch in V2:

I am now using a modified xbl with my HDK865, with a hack to make it use "none" for the display override string, and that allows me to use these patches without any kernel hack.

The "fastboot oem select-display-panel none" not working to disable bootloader enabled display definitely seems like a bug (I have not tried to debug it, but everything I've seen indicates that it should be disabling it). I don't think we should be holding this back based on a bootloader bug.

Quoted 133 lines

Regards,
Bjorn

Quoted 130 lines

FWIW, I have another sm8250 board which does not need the workaround (its bootloader does not set up the display). AFAIK modifying the bootloader to not set up any display is a trivial modification (assuming that's an option).

Quoted 125 lines

Thanks,
Bjorn

Quoted 122 lines
Quoted 122 lines
Quoted 122 lines
---
    arch/arm64/boot/dts/qcom/sm8150.dtsi | 91 ++++++++++++++++++++++++++++
    1 file changed, 91 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +91 -0
index a36512d1f6a1..acb839427b12 100644
@@ -442,6 +442,8 @@ ufs_mem_hc: ufshc@1d84000 {
    			resets = <&gcc GCC_UFS_PHY_BCR>;
    			reset-names = "rst";
+			iommus = <&apps_smmu 0x300 0>;
+
    			clock-names =
    				"core_clk",
    				"bus_aggr_clk",
@@ -706,6 +708,7 @@ usb_1_dwc3: dwc3@a600000 {
    				compatible = "snps,dwc3";
    				reg = <0 0x0a600000 0 0xcd00>;
    				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x140 0>;
    				snps,dis_u2_susphy_quirk;
    				snps,dis_enblslpm_quirk;
    				phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
@@ -742,6 +745,94 @@ spmi_bus: spmi@c440000 {
    			cell-index = <0>;
    		};
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";
+			reg = <0 0x15000000 0 0x100000>;
+			#iommu-cells = <2>;
+			#global-interrupts = <1>;
+			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
    		remoteproc_adsp: remoteproc@17300000 {
    			compatible = "qcom,sm8150-adsp-pas";
    			reg = <0x0 0x17300000 0x0 0x4040>;
Signature · 1 line
2.26.1
#10 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

In reply to Bjorn Andersson
Quoted 20 lines · Bjorn Andersson
Quoted 18 lines · Jonathan Marek
Quoted 14 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Thanks,
Bjorn

Quoted 9 lines
Quoted 5 lines

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none" combined with setting the physical switch to HDMI mode (which switches off the 1440x2560 panel) gets it to not setup the display at all (just the fastboot command isn't enough).

Okay, I don't think we have anything equivalent on the MTP, but good to know.

Actually I tried out this in SM8150 MTP and it works fine for me,

"fastboot set_active a; fastboot set_active b; fastboot set_active a; fastboot oem select-display-panel none; fastboot reboot bootloader; fastboot boot boot-sm8150.img"

Also I need to switch slots everytime like above, otherwise I always see some error while loading the boot image.

Thanks,
Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#11 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 34 lines · Sai Prakash Ranjan
Quoted 23 lines · Bjorn Andersson
Quoted 21 lines · Jonathan Marek
Quoted 3 lines · Bjorn Andersson
Quoted 1 line · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus

field for

Quoted 1 line
Quoted 1 line

UFS is required because initializing the iommu removes the bypass

mapping

Quoted 5 lines
Quoted 2 lines

that created by the bootloader.

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work

for

Quoted 5 lines

me on the MTP - and hence this would prevent my device from booting.

Thanks,
Bjorn

Quoted 9 lines
Quoted 5 lines

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none" combined with setting the physical switch to HDMI mode (which switches off the 1440x2560 panel) gets it to not setup the display at all (just the fastboot command isn't enough).

Okay, I don't think we have anything equivalent on the MTP, but good to know.

Quoted 7 lines

Actually I tried out this in SM8150 MTP and it works fine for me,

"fastboot set_active a; fastboot set_active b; fastboot set_active a; fastboot oem select-display-panel none; fastboot reboot bootloader; fastboot boot boot-sm8150.img"

Also I need to switch slots everytime like above, otherwise I always see some error while loading the boot image.

What is the error? If it is "FAILED (remote: Failed to load/authenticate boot image: Load Error)" then flashing/erasing boot_a will make it go away ("fastboot erase boot_a") for the next 6 or so "failed" boots.

Quoted 3 lines

Thanks,
Sai

#12 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 36 lines · Jonathan Marek
Quoted 35 lines · Sai Prakash Ranjan
Quoted 20 lines · Bjorn Andersson
Quoted 18 lines · Jonathan Marek
Quoted 14 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Thanks,
Bjorn

Quoted 9 lines
Quoted 5 lines

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none" combined with setting the physical switch to HDMI mode (which switches off the 1440x2560 panel) gets it to not setup the display at all (just the fastboot command isn't enough).

Okay, I don't think we have anything equivalent on the MTP, but good to know.

Actually I tried out this in SM8150 MTP and it works fine for me,

"fastboot set_active a; fastboot set_active b; fastboot set_active a; fastboot oem select-display-panel none; fastboot reboot bootloader; fastboot boot boot-sm8150.img"

Quoted 9 lines
Quoted 3 lines

Also I need to switch slots everytime like above, otherwise I always see some error while loading the boot image.

What is the error? If it is "FAILED (remote: Failed to load/authenticate boot image: Load Error)" then flashing/erasing boot_a will make it go away ("fastboot erase boot_a") for the next 6 or so "failed" boots.

Yes this exact error.

-Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#13 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 49 lines · Sai Prakash Ranjan
Quoted 47 lines · Jonathan Marek
Quoted 45 lines · Sai Prakash Ranjan
Quoted 29 lines · Bjorn Andersson
Quoted 18 lines · Jonathan Marek
Quoted 7 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Quoted 7 lines

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Thanks,
Bjorn

Quoted 8 lines

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none"
combined with setting the physical switch to HDMI mode (which switches off
the 1440x2560 panel) gets it to not setup the display at all (just the
fastboot command isn't enough).

Quoted 4 lines

Okay, I don't think we have anything equivalent on the MTP, but good to
know.

Actually I tried out this in SM8150 MTP and it works fine for me,

"fastboot set_active a; fastboot set_active b; fastboot set_active a; fastboot oem select-display-panel none; fastboot reboot bootloader; fastboot boot boot-sm8150.img"

Also I need to switch slots everytime like above, otherwise I always see some error
while loading the boot image.

Quoted 7 lines
Quoted 5 lines

What is the error? If it is "FAILED (remote: Failed to load/authenticate boot image: Load Error)" then flashing/erasing boot_a will make it go away ("fastboot erase boot_a") for the next 6 or so "failed" boots.

Yes this exact error.

The bootloader maintains a 'boot status' in one of the partition attributes. After a certain amount of 'failed' boot , it will switch to the other boot partition. It's the same thing on RB3/DB845c. In our release for DB845c, we are patching the bootloader so that this behavior is bypassed. On typical 'product' there is a user space application that will come and set the partition attribute to indicate the boot was successful.

For the record, this is the patch we use on 845c:
https://git.linaro.org/landing-teams/working/qualcomm/abl.git/commit/?h=release/LE.UM.2.3.7-09200-sda845.0&id=e3dc60213234ed626161a568ba587ddac63c5158

rebuilding EDK2/ABL requires access to signing tools.. so it might not be possible for everyone. but in case you can, it should be straightforward to reuse this patch.

Quoted 8 lines

-Sai

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

#14 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Hi Nico,

Quoted 67 lines · Nicolas Dechesne
Quoted 49 lines · Sai Prakash Ranjan
Quoted 47 lines · Jonathan Marek
Quoted 45 lines · Sai Prakash Ranjan
Quoted 29 lines · Bjorn Andersson
Quoted 18 lines · Jonathan Marek
Quoted 7 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Quoted 7 lines

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Thanks,
Bjorn

Quoted 8 lines

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none"
combined with setting the physical switch to HDMI mode (which switches off
the 1440x2560 panel) gets it to not setup the display at all (just the
fastboot command isn't enough).

Quoted 4 lines

Okay, I don't think we have anything equivalent on the MTP, but good to
know.

Actually I tried out this in SM8150 MTP and it works fine for me,

"fastboot set_active a; fastboot set_active b; fastboot set_active a; fastboot oem select-display-panel none; fastboot reboot bootloader; fastboot boot boot-sm8150.img"

Also I need to switch slots everytime like above, otherwise I always see some error
while loading the boot image.

Quoted 7 lines
Quoted 5 lines

What is the error? If it is "FAILED (remote: Failed to load/authenticate boot image: Load Error)" then flashing/erasing boot_a will make it go away ("fastboot erase boot_a") for the next 6 or so "failed" boots.

Yes this exact error.

The bootloader maintains a 'boot status' in one of the partition attributes. After a certain amount of 'failed' boot , it will switch to the other boot partition. It's the same thing on RB3/DB845c. In our release for DB845c, we are patching the bootloader so that this behavior is bypassed. On typical 'product' there is a user space application that will come and set the partition attribute to indicate the boot was successful.

Quoted 7 lines

For the record, this is the patch we use on 845c:
https://git.linaro.org/landing-teams/working/qualcomm/abl.git/commit/?h=release/LE.UM.2.3.7-09200-sda845.0&id=e3dc60213234ed626161a568ba587ddac63c5158

rebuilding EDK2/ABL requires access to signing tools.. so it might not be possible for everyone. but in case you can, it should be straightforward to reuse this patch.

Thank you for these details and the patch, it's very useful. I do have access to ABL code and the signing tools and can build one.

Thanks,
Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#15 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 74 lines · Sai Prakash Ranjan

Hi Nico,

Quoted 70 lines · Nicolas Dechesne
Quoted 49 lines · Sai Prakash Ranjan
Quoted 47 lines · Jonathan Marek
Quoted 45 lines · Sai Prakash Ranjan
Quoted 29 lines · Bjorn Andersson
Quoted 18 lines · Jonathan Marek
Quoted 7 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Quoted 7 lines

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Thanks,
Bjorn

Quoted 8 lines

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none"
combined with setting the physical switch to HDMI mode (which switches off
the 1440x2560 panel) gets it to not setup the display at all (just the
fastboot command isn't enough).

Quoted 4 lines

Okay, I don't think we have anything equivalent on the MTP, but good to
know.

Actually I tried out this in SM8150 MTP and it works fine for me,

"fastboot set_active a; fastboot set_active b; fastboot set_active a; fastboot oem select-display-panel none; fastboot reboot bootloader; fastboot boot boot-sm8150.img"

Also I need to switch slots everytime like above, otherwise I always see some error
while loading the boot image.

Quoted 7 lines
Quoted 5 lines

What is the error? If it is "FAILED (remote: Failed to load/authenticate boot image: Load Error)" then flashing/erasing boot_a will make it go away ("fastboot erase boot_a") for the next 6 or so "failed" boots.

Yes this exact error.

The bootloader maintains a 'boot status' in one of the partition attributes. After a certain amount of 'failed' boot , it will switch to the other boot partition. It's the same thing on RB3/DB845c. In our release for DB845c, we are patching the bootloader so that this behavior is bypassed. On typical 'product' there is a user space application that will come and set the partition attribute to indicate the boot was successful.

For the record, this is the patch we use on 845c:
https://git.linaro.org/landing-teams/working/qualcomm/abl.git/commit/?h=release/LE.UM.2.3.7-09200-sda845.0&id=e3dc60213234ed626161a568ba587ddac63c5158

Quoted 7 lines
Quoted 4 lines

rebuilding EDK2/ABL requires access to signing tools.. so it might not be possible for everyone. but in case you can, it should be straightforward to reuse this patch.

Thank you for these details and the patch, it's very useful. I do have access to ABL code and the signing tools and can build one.

Good. Then the next problem you will likely face is that building QCOM ABL is far from being straightforward. Why would it be? ;) That's the script we use to build it ourselves:
https://git.linaro.org/ci/job/configs.git/tree/lt-qcom-bootloader/dragonboard845c/builders.sh#n61

It has a reference to sectools which we have (internally) access to, but you have it too, and you should be able to leverage most of the script.

Quoted 8 lines

Thanks,
Sai

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

#16 lore raw

Re: [PATCH 1/6] arm64: dts: qcom: sm8150: add apps_smmu node

Quoted 84 lines · Nicolas Dechesne
Quoted 74 lines · Sai Prakash Ranjan

Hi Nico,

Quoted 70 lines · Nicolas Dechesne
Quoted 49 lines · Sai Prakash Ranjan
Quoted 47 lines · Jonathan Marek
Quoted 45 lines · Sai Prakash Ranjan
Quoted 29 lines · Bjorn Andersson
Quoted 18 lines · Jonathan Marek
Quoted 7 lines · Bjorn Andersson
Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8150. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

Quoted 7 lines

Unrelated to the patch itself; how do you disable the splash screen on 8150? "fastboot oem select-display-panel none" doesn't seem to work for me on the MTP - and hence this would prevent my device from booting.

Thanks,
Bjorn

Quoted 8 lines

I don't have a MTP, but on HDK855, "fastboot oem select-display-panel none"
combined with setting the physical switch to HDMI mode (which switches off
the 1440x2560 panel) gets it to not setup the display at all (just the
fastboot command isn't enough).

Quoted 4 lines

Okay, I don't think we have anything equivalent on the MTP, but good to
know.

Actually I tried out this in SM8150 MTP and it works fine for me,

"fastboot set_active a; fastboot set_active b; fastboot set_active a; fastboot oem select-display-panel none; fastboot reboot bootloader; fastboot boot boot-sm8150.img"

Also I need to switch slots everytime like above, otherwise I always see some error
while loading the boot image.

Quoted 7 lines
Quoted 5 lines

What is the error? If it is "FAILED (remote: Failed to load/authenticate boot image: Load Error)" then flashing/erasing boot_a will make it go away ("fastboot erase boot_a") for the next 6 or so "failed" boots.

Yes this exact error.

The bootloader maintains a 'boot status' in one of the partition attributes. After a certain amount of 'failed' boot , it will switch to the other boot partition. It's the same thing on RB3/DB845c. In our release for DB845c, we are patching the bootloader so that this behavior is bypassed. On typical 'product' there is a user space application that will come and set the partition attribute to indicate the boot was successful.

For the record, this is the patch we use on 845c:
https://git.linaro.org/landing-teams/working/qualcomm/abl.git/commit/?h=release/LE.UM.2.3.7-09200-sda845.0&id=e3dc60213234ed626161a568ba587ddac63c5158

Quoted 7 lines
Quoted 4 lines

rebuilding EDK2/ABL requires access to signing tools.. so it might not be possible for everyone. but in case you can, it should be straightforward to reuse this patch.

Thank you for these details and the patch, it's very useful. I do have access to ABL code and the signing tools and can build one.

Quoted 8 lines

Good. Then the next problem you will likely face is that building QCOM ABL is far from being straightforward. Why would it be? ;) That's the script we use to build it ourselves:
https://git.linaro.org/ci/job/configs.git/tree/lt-qcom-bootloader/dragonboard845c/builders.sh#n61

It has a reference to sectools which we have (internally) access to, but you have it too, and you should be able to leverage most of the script.

Looks like a cool tool, will definitely try it out :) Also internally we have another tool to build ABL(if you are aware of kdev then you will know what this is called, guess ;)) which takes care of cloning and building and signing all the things required (although very weirdly it clones sectools everytime which should be fixed, I just comment that part out when I build) and all it takes is one command "make" :)

Thanks,
Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#17 lore raw

PATCH 2/6 arm64: dts: qcom: sm8250: add apps_smmu node

In reply to Jonathan Marek

Add the apps_smmu node for sm8250. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 107 +++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)
arch/arm64/boot/dts/qcom/sm8250.dtsi +107 -0
index 2f99c350c287..43c5e48c15e2 100644
@@ -323,6 +323,8 @@ ufs_mem_hc: ufshc@1d84000 {
 
 			power-domains = <&gcc UFS_PHY_GDSC>;
 
+			iommus = <&apps_smmu 0x0e0 0>, <&apps_smmu 0x4e0 0>;
+
 			clock-names =
 				"core_clk",
 				"bus_aggr_clk",
@@ -428,6 +430,111 @@ tlmm: pinctrl@f100000 {
 			wakeup-parent = <&pdc>;
 		};
 
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";
+			reg = <0 0x15000000 0 0x100000>;
+			#iommu-cells = <2>;
+			#global-interrupts = <2>;
+			interrupts =    <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 186 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 316 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 317 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 320 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 321 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 322 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 323 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 325 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 326 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 327 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 328 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 329 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 331 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 332 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 333 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 338 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 339 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 340 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 342 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 343 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 412 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 418 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 419 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 421 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 423 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 425 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 690 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 691 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 692 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 693 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 694 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 695 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 696 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 697 IRQ_TYPE_LEVEL_HIGH>,
+					<GIC_SPI 707 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
 		intc: interrupt-controller@17a00000 {
 			compatible = "arm,gic-v3";
 			#interrupt-cells = <3>;
Signature · 1 line
2.26.1
#18 lore raw

Re: [PATCH 2/6] arm64: dts: qcom: sm8250: add apps_smmu node

Hi Jonathan,

Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8250. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

This statement doesn't seem right, you can just say since the bypass is disabled by default now, we need to add this property to enable translation and avoid global faults.

Quoted 20 lines
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 107 +++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)
arch/arm64/boot/dts/qcom/sm8250.dtsi +2 -0
index 2f99c350c287..43c5e48c15e2 100644
@@ -323,6 +323,8 @@ ufs_mem_hc: ufshc@1d84000 {
 
 			power-domains = <&gcc UFS_PHY_GDSC>;
 
+			iommus = <&apps_smmu 0x0e0 0>, <&apps_smmu 0x4e0 0>;
+
 			clock-names =
 				"core_clk",
 				"bus_aggr_clk",

arch/arm64/boot/dts/qcom/sm8250.dtsi tlmm: pinctrl@f100000 { · line 434

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi +2 -0
@@ -428,6 +430,111 @@ tlmm: pinctrl@f100000 {
 			wakeup-parent = <&pdc>;
 		};
 
+		apps_smmu: iommu@15000000 {
+			compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";

This should be qcom,sm8250-smmu-500 and also you need to update the arm-smmu binding with this compatible in a separate patch.

-Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#19 lore raw

Re: [PATCH 2/6] arm64: dts: qcom: sm8250: add apps_smmu node

Hi,

Quoted 11 lines · Sai Prakash Ranjan

Hi Jonathan,

Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8250. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

This statement doesn't seem right, you can just say since the bypass is disabled by default now, we need to add this property to enable translation and avoid global faults.

If I use this patch [1] then the UFS iommu property isn't needed. In downstream, the identity (bypass?) stream mapping is inherited from the bootloader, and UFS is used without any iommu property. Setting ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n doesn't make it work on its own (without the UFS iommu property), so there's more to it than just "bypass is disabled by default now".

https://patchwork.kernel.org/patch/11310757/

Quoted 31 lines
Quoted 20 lines

---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 107 +++++++++++++++++++++++++++

 1 file changed, 107 insertions(+)
arch/arm64/boot/dts/qcom/sm8250.dtsi +2 -0
index 2f99c350c287..43c5e48c15e2 100644
@@ -323,6 +323,8 @@ ufs_mem_hc: ufshc@1d84000 {
 
              power-domains = <&gcc UFS_PHY_GDSC>;
 
+            iommus = <&apps_smmu 0x0e0 0>, <&apps_smmu 0x4e0 0>;
+

             clock-names =
                 "core_clk",
                 "bus_aggr_clk",

arch/arm64/boot/dts/qcom/sm8250.dtsi tlmm: pinctrl@f100000 { · line 434

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8250.dtsi +2 -0
@@ -428,6 +430,111 @@ tlmm: pinctrl@f100000 {
              wakeup-parent = <&pdc>;
          };
 
+        apps_smmu: iommu@15000000 {
+            compatible = "qcom,sdm845-smmu-500", "arm,mmu-500";

This should be qcom,sm8250-smmu-500 and also you need to update the arm-smmu binding with this compatible in a separate patch.

-Sai

#20 lore raw

Re: [PATCH 2/6] arm64: dts: qcom: sm8250: add apps_smmu node

Quoted 15 lines · Jonathan Marek

Hi,

Quoted 11 lines · Sai Prakash Ranjan

Hi Jonathan,

Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8250. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

This statement doesn't seem right, you can just say since the bypass is disabled by default now, we need to add this property to enable translation and avoid global faults.

Quoted 9 lines

If I use this patch [1] then the UFS iommu property isn't needed. In downstream, the identity (bypass?) stream mapping is inherited from the bootloader, and UFS is used without any iommu property. Setting ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n doesn't make it work on its own (without the UFS iommu property), so there's more to it than just "bypass is disabled by default now".

https://patchwork.kernel.org/patch/11310757/

"iommus" property is not about inheriting stream mapping from bootloader, it is used to enable SMMU address translation for the corresponding master when specified. So when you have disabled bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y or via cmdline "arm-smmu.disable_bypass=1" and iommus property with SID and mask is not specified, then it will result in SMMU global faults.

Downstream has bypass enabled(ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n),so you won't see any global faults if you do not have iommus property.

Patch in your link is for display because of the usecase for splash screen on android and some other devices where the bootloader will configure SMMU, it has not yet merged and not likely to get merged in the current state.

So yes "there is *not* much more to it than bypass is disabled by default now" and you have to specify "iommus" for the master devices or you should enable bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or arm-smmu.disable_bypass=n

Try without the patch in the link and without iommus for UFS and ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y and you will see.

-Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#21 lore raw

Re: [PATCH 2/6] arm64: dts: qcom: sm8250: add apps_smmu node

Quoted 40 lines · Sai Prakash Ranjan
Quoted 15 lines · Jonathan Marek

Hi,

Quoted 11 lines · Sai Prakash Ranjan

Hi Jonathan,

Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8250. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

This statement doesn't seem right, you can just say since the bypass is disabled by default now, we need to add this property to enable translation and avoid global faults.

Quoted 9 lines

If I use this patch [1] then the UFS iommu property isn't needed. In downstream, the identity (bypass?) stream mapping is inherited from the bootloader, and UFS is used without any iommu property. Setting ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n doesn't make it work on its own (without the UFS iommu property), so there's more to it than just "bypass is disabled by default now".

https://patchwork.kernel.org/patch/11310757/

"iommus" property is not about inheriting stream mapping from bootloader, it is used to enable SMMU address translation for the corresponding master when specified. So when you have disabled bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y or via cmdline "arm-smmu.disable_bypass=1" and iommus property with SID and mask is not specified, then it will result in SMMU global faults.

Downstream has bypass enabled(ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n),so you won't see any global faults if you do not have iommus property.

Patch in your link is for display because of the usecase for splash screen on android and some other devices where the bootloader will configure SMMU, it has not yet merged and not likely to get merged in the current state.

Quoted 8 lines

So yes "there is *not* much more to it than bypass is disabled by default now" and you have to specify "iommus" for the master devices or you should enable bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or arm-smmu.disable_bypass=n

Try without the patch in the link and without iommus for UFS and ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y and you will see.

-Sai

I know that the "iommus" property is not about inheriting stream mapping. Probing the iommu removes the stream mapping created by the bootloader, the iommus property is added so that new mappings are created to replace what was removed.

You seem to be under the impression that the SM8150/SM8250 bootloader does not configure SMMU. It does, for both UFS and SDHC, just like it does for display/splash screen on some devices.

With either value of ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT, it will not work without the iommus property.

#22 lore raw

Re: [PATCH 2/6] arm64: dts: qcom: sm8250: add apps_smmu node

Hi,

Quoted 50 lines · Jonathan Marek
Quoted 40 lines · Sai Prakash Ranjan
Quoted 15 lines · Jonathan Marek

Hi,

Quoted 11 lines · Sai Prakash Ranjan

Hi Jonathan,

Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8250. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

This statement doesn't seem right, you can just say since the bypass is disabled by default now, we need to add this property to enable translation and avoid global faults.

Quoted 9 lines

If I use this patch [1] then the UFS iommu property isn't needed. In downstream, the identity (bypass?) stream mapping is inherited from the bootloader, and UFS is used without any iommu property. Setting ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n doesn't make it work on its own (without the UFS iommu property), so there's more to it than just "bypass is disabled by default now".

https://patchwork.kernel.org/patch/11310757/

"iommus" property is not about inheriting stream mapping from bootloader, it is used to enable SMMU address translation for the corresponding master when specified. So when you have disabled bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y or via cmdline "arm-smmu.disable_bypass=1" and iommus property with SID and mask is not specified, then it will result in SMMU global faults.

Downstream has bypass enabled(ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n),so you won't see any global faults if you do not have iommus property.

Patch in your link is for display because of the usecase for splash screen on android and some other devices where the bootloader will configure SMMU, it has not yet merged and not likely to get merged in the current state.

Quoted 8 lines

So yes "there is *not* much more to it than bypass is disabled by default now" and you have to specify "iommus" for the master devices or you should enable bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or arm-smmu.disable_bypass=n

Try without the patch in the link and without iommus for UFS and ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y and you will see.

-Sai

Quoted 9 lines

I know that the "iommus" property is not about inheriting stream mapping. Probing the iommu removes the stream mapping created by the bootloader, the iommus property is added so that new mappings are created to replace what was removed.

You seem to be under the impression that the SM8150/SM8250 bootloader does not configure SMMU. It does, for both UFS and SDHC, just like it does for display/splash screen on some devices.

It could be that bootloader does configure SMMU for UFS and SDHC, but the upstream SMMU driver doesnt allow to inherit stream mapping from the bootloader yet, so adding iommus property based on the assumption that it is inherited seems wrong.

Quoted 2 lines

With either value of ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT, it will not work without the iommus property.

I'm pretty sure that if you have ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n and without iommus, it should work.

-Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#23 lore raw

Re: [PATCH 2/6] arm64: dts: qcom: sm8250: add apps_smmu node

Quoted 63 lines · Sai Prakash Ranjan

Hi,

Quoted 50 lines · Jonathan Marek
Quoted 40 lines · Sai Prakash Ranjan
Quoted 15 lines · Jonathan Marek

Hi,

Quoted 11 lines · Sai Prakash Ranjan

Hi Jonathan,

Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8250. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

This statement doesn't seem right, you can just say since the bypass is disabled by default now, we need to add this property to enable translation and avoid global faults.

Quoted 9 lines

If I use this patch [1] then the UFS iommu property isn't needed. In downstream, the identity (bypass?) stream mapping is inherited from the bootloader, and UFS is used without any iommu property. Setting ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n doesn't make it work on its own (without the UFS iommu property), so there's more to it than just "bypass is disabled by default now".

https://patchwork.kernel.org/patch/11310757/

"iommus" property is not about inheriting stream mapping from bootloader, it is used to enable SMMU address translation for the corresponding master when specified. So when you have disabled bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y or via cmdline "arm-smmu.disable_bypass=1" and iommus property with SID and mask is not specified, then it will result in SMMU global faults.

Downstream has bypass enabled(ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n),so you won't see any global faults if you do not have iommus property.

Patch in your link is for display because of the usecase for splash screen on android and some other devices where the bootloader will configure SMMU, it has not yet merged and not likely to get merged in the current state.

Quoted 8 lines

So yes "there is *not* much more to it than bypass is disabled by default now" and you have to specify "iommus" for the master devices or you should enable bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or arm-smmu.disable_bypass=n

Try without the patch in the link and without iommus for UFS and ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y and you will see.

-Sai

Quoted 9 lines

I know that the "iommus" property is not about inheriting stream mapping. Probing the iommu removes the stream mapping created by the bootloader, the iommus property is added so that new mappings are created to replace what was removed.

You seem to be under the impression that the SM8150/SM8250 bootloader does not configure SMMU. It does, for both UFS and SDHC, just like it does for display/splash screen on some devices.

Quoted 5 lines

It could be that bootloader does configure SMMU for UFS and SDHC, but the upstream SMMU driver doesnt allow to inherit stream mapping from the bootloader yet, so adding iommus property based on the assumption that it is inherited seems wrong.

I never said adding the iommus property is for inheriting stream mapping. I mentioned inheriting to say UFS works without the iommus property on downstream (it inherits a identity/bypass mapping).

Quoted 6 lines
Quoted 2 lines

With either value of ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT, it will not work without the iommus property.

I'm pretty sure that if you have ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n and without iommus, it should work.

It doesn't work, with either ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y.

Quoted 2 lines

-Sai

#24 lore raw

Re: [PATCH 2/6] arm64: dts: qcom: sm8250: add apps_smmu node

Quoted 70 lines · Jonathan Marek
Quoted 63 lines · Sai Prakash Ranjan

Hi,

Quoted 50 lines · Jonathan Marek
Quoted 40 lines · Sai Prakash Ranjan
Quoted 15 lines · Jonathan Marek

Hi,

Quoted 11 lines · Sai Prakash Ranjan

Hi Jonathan,

Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8250. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

This statement doesn't seem right, you can just say since the bypass is disabled by default now, we need to add this property to enable translation and avoid global faults.

Quoted 9 lines

If I use this patch [1] then the UFS iommu property isn't needed. In downstream, the identity (bypass?) stream mapping is inherited from the bootloader, and UFS is used without any iommu property. Setting ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n doesn't make it work on its own (without the UFS iommu property), so there's more to it than just "bypass is disabled by default now".

https://patchwork.kernel.org/patch/11310757/

"iommus" property is not about inheriting stream mapping from bootloader, it is used to enable SMMU address translation for the corresponding master when specified. So when you have disabled bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y or via cmdline "arm-smmu.disable_bypass=1" and iommus property with SID and mask is not specified, then it will result in SMMU global faults.

Downstream has bypass enabled(ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n),so you won't see any global faults if you do not have iommus property.

Patch in your link is for display because of the usecase for splash screen on android and some other devices where the bootloader will configure SMMU, it has not yet merged and not likely to get merged in the current state.

Quoted 8 lines

So yes "there is *not* much more to it than bypass is disabled by default now" and you have to specify "iommus" for the master devices or you should enable bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or arm-smmu.disable_bypass=n

Try without the patch in the link and without iommus for UFS and ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y and you will see.

-Sai

Quoted 9 lines

I know that the "iommus" property is not about inheriting stream mapping. Probing the iommu removes the stream mapping created by the bootloader, the iommus property is added so that new mappings are created to replace what was removed.

You seem to be under the impression that the SM8150/SM8250 bootloader does not configure SMMU. It does, for both UFS and SDHC, just like it does for display/splash screen on some devices.

Quoted 5 lines

It could be that bootloader does configure SMMU for UFS and SDHC, but the upstream SMMU driver doesnt allow to inherit stream mapping from the bootloader yet, so adding iommus property based on the assumption that it is inherited seems wrong.

Quoted 4 lines

I never said adding the iommus property is for inheriting stream mapping. I mentioned inheriting to say UFS works without the iommus property on downstream (it inherits a identity/bypass mapping).

Your commit description says "adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader". So here it would mean like iommus property for UFS is not for enabling address translation by SMMU for UFS but to avoid removing mappings created by the bootloader which is not exactly what iommus property is for.

Quoted 10 lines
Quoted 6 lines
Quoted 2 lines

With either value of ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT, it will not work without the iommus property.

I'm pretty sure that if you have ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n and without iommus, it should work.

It doesn't work, with either ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y.

Ok since you are very sure about this, I will try with your patches on SM8150 MTP tomorrow since I do not have access to one now. Also just to make sure, please remove all the extra SMMU patches you have in your tree which are not yet merged or from downstream kernel.

-Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#25 lore raw

Re: [PATCH 2/6] arm64: dts: qcom: sm8250: add apps_smmu node

Quoted 76 lines · Sai Prakash Ranjan
Quoted 70 lines · Jonathan Marek
Quoted 63 lines · Sai Prakash Ranjan

Hi,

Quoted 50 lines · Jonathan Marek
Quoted 40 lines · Sai Prakash Ranjan
Quoted 15 lines · Jonathan Marek

Hi,

Quoted 11 lines · Sai Prakash Ranjan

Hi Jonathan,

Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8250. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

This statement doesn't seem right, you can just say since the bypass is disabled by default now, we need to add this property to enable translation and avoid global faults.

Quoted 9 lines

If I use this patch [1] then the UFS iommu property isn't needed. In downstream, the identity (bypass?) stream mapping is inherited from the bootloader, and UFS is used without any iommu property. Setting ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n doesn't make it work on its own (without the UFS iommu property), so there's more to it than just "bypass is disabled by default now".

https://patchwork.kernel.org/patch/11310757/

"iommus" property is not about inheriting stream mapping from bootloader, it is used to enable SMMU address translation for the corresponding master when specified. So when you have disabled bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y or via cmdline "arm-smmu.disable_bypass=1" and iommus property with SID and mask is not specified, then it will result in SMMU global faults.

Downstream has bypass enabled(ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n),so you won't see any global faults if you do not have iommus property.

Patch in your link is for display because of the usecase for splash screen on android and some other devices where the bootloader will configure SMMU, it has not yet merged and not likely to get merged in the current state.

Quoted 8 lines

So yes "there is *not* much more to it than bypass is disabled by default now" and you have to specify "iommus" for the master devices or you should enable bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or arm-smmu.disable_bypass=n

Try without the patch in the link and without iommus for UFS and ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y and you will see.

-Sai

Quoted 9 lines

I know that the "iommus" property is not about inheriting stream mapping. Probing the iommu removes the stream mapping created by the bootloader, the iommus property is added so that new mappings are created to replace what was removed.

You seem to be under the impression that the SM8150/SM8250 bootloader does not configure SMMU. It does, for both UFS and SDHC, just like it does for display/splash screen on some devices.

Quoted 5 lines

It could be that bootloader does configure SMMU for UFS and SDHC, but the upstream SMMU driver doesnt allow to inherit stream mapping from the bootloader yet, so adding iommus property based on the assumption that it is inherited seems wrong.

Quoted 4 lines

I never said adding the iommus property is for inheriting stream mapping. I mentioned inheriting to say UFS works without the iommus property on downstream (it inherits a identity/bypass mapping).

Quoted 6 lines

Your commit description says "adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader". So here it would mean like iommus property for UFS is not for enabling address translation by SMMU for UFS but to avoid removing mappings created by the bootloader which is not exactly what iommus property is for.

I guess the commit message is ambiguous, that's not what I meant. Is "Now that the kernel initializes the iommu, the bypass mappings set by the bootloader are cleared. Adding the iommus property is required so that new mappings are created for UFS." better?

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines

With either value of ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT, it will not work without the iommus property.

I'm pretty sure that if you have ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n and without iommus, it should work.

Quoted 9 lines
Quoted 3 lines

It doesn't work, with either ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y.

Ok since you are very sure about this, I will try with your patches on SM8150 MTP tomorrow since I do not have access to one now. Also just to make sure, please remove all the extra SMMU patches you have in your tree which are not yet merged or from downstream kernel.

FYI, I have a branch [1] integrating patches for upstream. All the patches up to 34fff8a519cc075933 ("arm64: dts: qcom: add sm8250 GPU nodes") have been submitted (and the patches after that are unnecessary for testing on sm8150).

[1] https://github.com/flto/linux/commits/sm8x50-upstream

Quoted 2 lines

-Sai

#26 lore raw

Re: [PATCH 2/6] arm64: dts: qcom: sm8250: add apps_smmu node

Quoted 84 lines · Jonathan Marek
Quoted 76 lines · Sai Prakash Ranjan
Quoted 70 lines · Jonathan Marek
Quoted 63 lines · Sai Prakash Ranjan

Hi,

Quoted 50 lines · Jonathan Marek
Quoted 40 lines · Sai Prakash Ranjan
Quoted 15 lines · Jonathan Marek

Hi,

Quoted 11 lines · Sai Prakash Ranjan

Hi Jonathan,

Quoted 4 lines · Jonathan Marek

Add the apps_smmu node for sm8250. Note that adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader.

This statement doesn't seem right, you can just say since the bypass is disabled by default now, we need to add this property to enable translation and avoid global faults.

Quoted 9 lines

If I use this patch [1] then the UFS iommu property isn't needed. In downstream, the identity (bypass?) stream mapping is inherited from the bootloader, and UFS is used without any iommu property. Setting ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n doesn't make it work on its own (without the UFS iommu property), so there's more to it than just "bypass is disabled by default now".

https://patchwork.kernel.org/patch/11310757/

"iommus" property is not about inheriting stream mapping from bootloader, it is used to enable SMMU address translation for the corresponding master when specified. So when you have disabled bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y or via cmdline "arm-smmu.disable_bypass=1" and iommus property with SID and mask is not specified, then it will result in SMMU global faults.

Downstream has bypass enabled(ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n),so you won't see any global faults if you do not have iommus property.

Patch in your link is for display because of the usecase for splash screen on android and some other devices where the bootloader will configure SMMU, it has not yet merged and not likely to get merged in the current state.

Quoted 8 lines

So yes "there is *not* much more to it than bypass is disabled by default now" and you have to specify "iommus" for the master devices or you should enable bypass, i.e., ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or arm-smmu.disable_bypass=n

Try without the patch in the link and without iommus for UFS and ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y and you will see.

-Sai

Quoted 9 lines

I know that the "iommus" property is not about inheriting stream mapping. Probing the iommu removes the stream mapping created by the bootloader, the iommus property is added so that new mappings are created to replace what was removed.

You seem to be under the impression that the SM8150/SM8250 bootloader does not configure SMMU. It does, for both UFS and SDHC, just like it does for display/splash screen on some devices.

Quoted 5 lines

It could be that bootloader does configure SMMU for UFS and SDHC, but the upstream SMMU driver doesnt allow to inherit stream mapping from the bootloader yet, so adding iommus property based on the assumption that it is inherited seems wrong.

Quoted 4 lines

I never said adding the iommus property is for inheriting stream mapping. I mentioned inheriting to say UFS works without the iommus property on downstream (it inherits a identity/bypass mapping).

Quoted 6 lines

Your commit description says "adding the iommus field for UFS is required because initializing the iommu removes the bypass mapping that created by the bootloader". So here it would mean like iommus property for UFS is not for enabling address translation by SMMU for UFS but to avoid removing mappings created by the bootloader which is not exactly what iommus property is for.

Quoted 5 lines

I guess the commit message is ambiguous, that's not what I meant. Is "Now that the kernel initializes the iommu, the bypass mappings set by the bootloader are cleared. Adding the iommus property is required so that new mappings are created for UFS." better?

Yes looks good.

Quoted 17 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines

With either value of ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT, it will not work without the iommus property.

I'm pretty sure that if you have ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n and without iommus, it should work.

Quoted 9 lines
Quoted 3 lines

It doesn't work, with either ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=n or ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y.

Ok since you are very sure about this, I will try with your patches on SM8150 MTP tomorrow since I do not have access to one now. Also just to make sure, please remove all the extra SMMU patches you have in your tree which are not yet merged or from downstream kernel.

Quoted 7 lines

FYI, I have a branch [1] integrating patches for upstream. All the patches up to 34fff8a519cc075933 ("arm64: dts: qcom: add sm8250 GPU nodes") have been submitted (and the patches after that are unnecessary for testing on sm8150).

[1] https://github.com/flto/linux/commits/sm8x50-upstream

Thanks, I will test this out.

-Sai

Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
#27 lore raw

Re: [PATCH 2/6] arm64: dts: qcom: sm8250: add apps_smmu node

In reply to Jonathan Marek

On Mon 25 May 04:53 PDT 2020, Jonathan Marek wrote:
[..]

Quoted 5 lines

I guess the commit message is ambiguous, that's not what I meant. Is "Now that the kernel initializes the iommu, the bypass mappings set by the bootloader are cleared. Adding the iommus property is required so that new mappings are created for UFS." better?

This looks better, but it's actually not a bypass mapping that we inherit from the bootloader, it's the stream mapping pointing to a disabled (~ARM_SMMU_SCTLR_M) context bank. So when we wipe the stream mappings we will fault on the unmatched stream - which secure world "handles" for us...

As such, I think you should replace "bypass" with "stream".

Regards,
Bjorn

#28 lore raw

PATCH 3/6 arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes

In reply to Jonathan Marek

Add dts nodes for the secondary USB controller and related PHY nodes.

---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 89 ++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)
arch/arm64/boot/dts/qcom/sm8150.dtsi +89 -0
index acb839427b12..903514fc299f 100644
@@ -636,6 +636,19 @@ usb_1_hsphy: phy@88e2000 {
 			resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
 		};
 
+		usb_2_hsphy: phy@88e3000 {
+			compatible = "qcom,sm8150-usb-hs-phy",
+				     "qcom,usb-snps-hs-7nm-phy";
+			reg = <0 0x088e3000 0 0x400>;
+			status = "disabled";
+			#phy-cells = <0>;
+
+			clocks = <&rpmhcc RPMH_CXO_CLK>;
+			clock-names = "ref";
+
+			resets = <&gcc GCC_QUSB2PHY_SEC_BCR>;
+		};
+
 		usb_1_qmpphy: phy@88e9000 {
 			compatible = "qcom,sm8150-qmp-usb3-phy";
 			reg = <0 0x088e9000 0 0x18c>,
@@ -671,6 +684,37 @@ usb_1_ssphy: lanes@88e9200 {
 			};
 		};
 
+		usb_2_qmpphy: phy@88eb000 {
+			compatible = "qcom,sm8150-qmp-usb3-uni-phy";
+			reg = <0 0x088eb000 0 0x200>;
+			status = "disabled";
+			#clock-cells = <1>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges;
+
+			clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>,
+				 <&rpmhcc RPMH_CXO_CLK>,
+				 <&gcc GCC_USB3_SEC_CLKREF_CLK>,
+				 <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
+			clock-names = "aux", "ref_clk_src", "ref", "com_aux";
+
+			resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
+				 <&gcc GCC_USB3_PHY_SEC_BCR>;
+			reset-names = "phy", "common";
+
+			usb_2_ssphy: lane@88eb200 {
+				reg = <0 0x088eb200 0 0x200>,
+				      <0 0x088eb400 0 0x200>,
+				      <0 0x088eb800 0 0x800>,
+				      <0 0x088eb600 0 0x200>;
+				#phy-cells = <0>;
+				clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
+				clock-names = "pipe0";
+				clock-output-names = "usb3_uni_phy_pipe_clk_src";
+			};
+		};
+
 		usb_1: usb@a6f8800 {
 			compatible = "qcom,sm8150-dwc3", "qcom,dwc3";
 			reg = <0 0x0a6f8800 0 0x400>;
@@ -716,6 +760,51 @@ usb_1_dwc3: dwc3@a600000 {
 			};
 		};
 
+		usb_2: usb@a8f8800 {
+			compatible = "qcom,sm8150-dwc3", "qcom,dwc3";
+			reg = <0 0x0a8f8800 0 0x400>;
+			status = "disabled";
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges;
+			dma-ranges;
+
+			clocks = <&gcc GCC_CFG_NOC_USB3_SEC_AXI_CLK>,
+				 <&gcc GCC_USB30_SEC_MASTER_CLK>,
+				 <&gcc GCC_AGGRE_USB3_SEC_AXI_CLK>,
+				 <&gcc GCC_USB30_SEC_MOCK_UTMI_CLK>,
+				 <&gcc GCC_USB30_SEC_SLEEP_CLK>,
+				 <&gcc GCC_USB3_SEC_CLKREF_CLK>;
+			clock-names = "cfg_noc", "core", "iface", "mock_utmi",
+				      "sleep", "xo";
+
+			assigned-clocks = <&gcc GCC_USB30_SEC_MOCK_UTMI_CLK>,
+					  <&gcc GCC_USB30_SEC_MASTER_CLK>;
+			assigned-clock-rates = <19200000>, <200000000>;
+
+			interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 487 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 490 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 491 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "hs_phy_irq", "ss_phy_irq",
+					  "dm_hs_phy_irq", "dp_hs_phy_irq";
+
+			power-domains = <&gcc USB30_SEC_GDSC>;
+
+			resets = <&gcc GCC_USB30_SEC_BCR>;
+
+			usb_2_dwc3: dwc3@a800000 {
+				compatible = "snps,dwc3";
+				reg = <0 0x0a800000 0 0xcd00>;
+				interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x160 0>;
+				snps,dis_u2_susphy_quirk;
+				snps,dis_enblslpm_quirk;
+				phys = <&usb_2_hsphy>, <&usb_2_ssphy>;
+				phy-names = "usb2-phy", "usb3-phy";
+			};
+		};
+
 		aoss_qmp: power-controller@c300000 {
 			compatible = "qcom,sm8150-aoss-qmp";
 			reg = <0x0 0x0c300000 0x0 0x100000>;
Signature · 1 line
2.26.1
#29 lore raw

PATCH 4/6 arm64: dts: qcom: sm8250: Add USB and PHY device nodes

In reply to Jonathan Marek

Add device nodes for the USB3 controller, QMP SS PHY and SNPS HS PHY.

---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 180 +++++++++++++++++++++++++++
 1 file changed, 180 insertions(+)
arch/arm64/boot/dts/qcom/sm8250.dtsi +180 -0
index 43c5e48c15e2..3bdce658c08a 100644
@@ -387,6 +387,186 @@ tcsr_mutex: hwlock@1f40000 {
 			#hwlock-cells = <1>;
 		};
 
+		usb_1_hsphy: phy@88e3000 {
+			compatible = "qcom,sm8250-usb-hs-phy",
+				     "qcom,usb-snps-hs-7nm-phy";
+			reg = <0 0x088e3000 0 0x400>;
+			status = "disabled";
+			#phy-cells = <0>;
+
+			clocks = <&rpmhcc RPMH_CXO_CLK>;
+			clock-names = "ref";
+
+			resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
+		};
+
+		usb_2_hsphy: phy@88e4000 {
+			compatible = "qcom,sm8250-usb-hs-phy",
+				     "qcom,usb-snps-hs-7nm-phy";
+			reg = <0 0x088e4000 0 0x400>;
+			status = "disabled";
+			#phy-cells = <0>;
+
+			clocks = <&rpmhcc RPMH_CXO_CLK>;
+			clock-names = "ref";
+
+			resets = <&gcc GCC_QUSB2PHY_SEC_BCR>;
+		};
+
+		usb_1_qmpphy: phy@88e9000 {
+			compatible = "qcom,sm8250-qmp-usb3-phy";
+			reg = <0 0x088e9000 0 0x200>,
+			      <0 0x088e8000 0 0x20>;
+			reg-names = "reg-base", "dp_com";
+			status = "disabled";
+			#clock-cells = <1>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges;
+
+			clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>,
+				 <&rpmhcc RPMH_CXO_CLK>,
+				 <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>;
+			clock-names = "aux", "ref_clk_src", "com_aux";
+
+			resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>,
+				 <&gcc GCC_USB3_PHY_PRIM_BCR>;
+			reset-names = "phy", "common";
+
+			usb_1_ssphy: lanes@88e9200 {
+				reg = <0 0x088e9200 0 0x200>,
+				      <0 0x088e9400 0 0x200>,
+				      <0 0x088e9c00 0 0x400>,
+				      <0 0x088e9600 0 0x200>,
+				      <0 0x088e9800 0 0x200>,
+				      <0 0x088e9a00 0 0x100>;
+				#phy-cells = <0>;
+				clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>;
+				clock-names = "pipe0";
+				clock-output-names = "usb3_phy_pipe_clk_src";
+			};
+		};
+
+		usb_2_qmpphy: phy@88eb000 {
+			compatible = "qcom,sm8250-qmp-usb3-uni-phy";
+			reg = <0 0x088eb000 0 0x200>;
+			status = "disabled";
+			#clock-cells = <1>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges;
+
+			clocks = <&gcc GCC_USB3_SEC_PHY_AUX_CLK>,
+				 <&rpmhcc RPMH_CXO_CLK>,
+				 <&gcc GCC_USB3_SEC_CLKREF_EN>,
+				 <&gcc GCC_USB3_SEC_PHY_COM_AUX_CLK>;
+			clock-names = "aux", "ref_clk_src", "ref", "com_aux";
+
+			resets = <&gcc GCC_USB3PHY_PHY_SEC_BCR>,
+				 <&gcc GCC_USB3_PHY_SEC_BCR>;
+			reset-names = "phy", "common";
+
+			usb_2_ssphy: lane@88eb200 {
+				reg = <0 0x088eb200 0 0x200>,
+				      <0 0x088eb400 0 0x200>,
+				      <0 0x088eb800 0 0x800>;
+				#phy-cells = <0>;
+				clocks = <&gcc GCC_USB3_SEC_PHY_PIPE_CLK>;
+				clock-names = "pipe0";
+				clock-output-names = "usb3_uni_phy_pipe_clk_src";
+			};
+		};
+
+		usb_1: usb@a6f8800 {
+			compatible = "qcom,sm8250-dwc3", "qcom,dwc3";
+			reg = <0 0x0a6f8800 0 0x400>;
+			status = "disabled";
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges;
+			dma-ranges;
+
+			clocks = <&gcc GCC_CFG_NOC_USB3_PRIM_AXI_CLK>,
+				 <&gcc GCC_USB30_PRIM_MASTER_CLK>,
+				 <&gcc GCC_AGGRE_USB3_PRIM_AXI_CLK>,
+				 <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
+				 <&gcc GCC_USB30_PRIM_SLEEP_CLK>,
+				 <&gcc GCC_USB3_SEC_CLKREF_EN>;
+			clock-names = "cfg_noc", "core", "iface", "mock_utmi",
+				      "sleep", "xo";
+
+			assigned-clocks = <&gcc GCC_USB30_PRIM_MOCK_UTMI_CLK>,
+					  <&gcc GCC_USB30_PRIM_MASTER_CLK>;
+			assigned-clock-rates = <19200000>, <200000000>;
+
+			interrupts-extended = <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 14 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc 15 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc 17 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "hs_phy_irq", "dp_hs_phy_irq",
+					  "dm_hs_phy_irq", "ss_phy_irq";
+
+			power-domains = <&gcc USB30_PRIM_GDSC>;
+
+			resets = <&gcc GCC_USB30_PRIM_BCR>;
+
+			usb_1_dwc3: dwc3@a600000 {
+				compatible = "snps,dwc3";
+				reg = <0 0x0a600000 0 0xcd00>;
+				interrupts = <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x0 0x0>;
+				snps,dis_u2_susphy_quirk;
+				snps,dis_enblslpm_quirk;
+				phys = <&usb_1_hsphy>, <&usb_1_ssphy>;
+				phy-names = "usb2-phy", "usb3-phy";
+			};
+		};
+
+		usb_2: usb@a8f8800 {
+			compatible = "qcom,sm8250-dwc3", "qcom,dwc3";
+			reg = <0 0x0a8f8800 0 0x400>;
+			status = "disabled";
+			#address-cells = <2>;
+			#size-cells = <2>;
+			ranges;
+			dma-ranges;
+
+			clocks = <&gcc GCC_CFG_NOC_USB3_SEC_AXI_CLK>,
+				 <&gcc GCC_USB30_SEC_MASTER_CLK>,
+				 <&gcc GCC_AGGRE_USB3_SEC_AXI_CLK>,
+				 <&gcc GCC_USB30_SEC_MOCK_UTMI_CLK>,
+				 <&gcc GCC_USB30_SEC_SLEEP_CLK>,
+				 <&gcc GCC_USB3_SEC_CLKREF_EN>;
+			clock-names = "cfg_noc", "core", "iface", "mock_utmi",
+				      "sleep", "xo";
+
+			assigned-clocks = <&gcc GCC_USB30_SEC_MOCK_UTMI_CLK>,
+					  <&gcc GCC_USB30_SEC_MASTER_CLK>;
+			assigned-clock-rates = <19200000>, <200000000>;
+
+			interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>,
+					      <&pdc 12 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc 13 IRQ_TYPE_EDGE_BOTH>,
+					      <&pdc 16 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "hs_phy_irq", "dp_hs_phy_irq",
+					  "dm_hs_phy_irq", "ss_phy_irq";
+
+			power-domains = <&gcc USB30_SEC_GDSC>;
+
+			resets = <&gcc GCC_USB30_SEC_BCR>;
+
+			usb_2_dwc3: dwc3@a800000 {
+				compatible = "snps,dwc3";
+				reg = <0 0x0a800000 0 0xcd00>;
+				interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
+				iommus = <&apps_smmu 0x20 0>;
+				snps,dis_u2_susphy_quirk;
+				snps,dis_enblslpm_quirk;
+				phys = <&usb_2_hsphy>, <&usb_2_ssphy>;
+				phy-names = "usb2-phy", "usb3-phy";
+			};
+		};
+
 		pdc: interrupt-controller@b220000 {
 			compatible = "qcom,sm8250-pdc", "qcom,pdc";
 			reg = <0 0x0b220000 0 0x30000>, <0 0x17c000f0 0 0x60>;
Signature · 1 line
2.26.1
#30 lore raw

PATCH 5/6 arm64: dts: qcom: add sm8150 hdk dts

In reply to Jonathan Marek

Add initial HDK855 dts, based on sm8150-mtp, with a few changes.

---
 arch/arm64/boot/dts/qcom/Makefile       |   1 +
 arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
 2 files changed, 462 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index cc103f7020fd..e5dbd8b63951 100644
@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
arch/arm64/boot/dts/qcom/sm8150-hdk.dts new file +461 -0

461 lines not on this page · raw message

Signature · 1 line
2.26.1
#31 lore raw

Re: [PATCH 5/6] arm64: dts: qcom: add sm8150 hdk dts

Quoted 2 lines · Jonathan Marek

Add initial HDK855 dts, based on sm8150-mtp, with a few changes.

Happy to see this on the list Jonathan, just some minor things on the remoteproc nodes below.

Quoted 20 lines
---
 arch/arm64/boot/dts/qcom/Makefile       |   1 +
 arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
 2 files changed, 462 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index cc103f7020fd..e5dbd8b63951 100644
@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +0 -0

[..]

Quoted 13 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +13 -0
+/ {
+	model = "Qualcomm Technologies, Inc. SM8150 HDK";
+	compatible = "qcom,sm8150-hdk";
+
+	aliases {
+		serial0 = &uart2;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	vph_pwr: vph-pwr-regulator {

arch/arm64/boot/dts/qcom/sm8150-hdk.dts line 37

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +10 -0
+		compatible = "regulator-fixed";
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+	};
+
+	/*
+	 * Apparently RPMh does not provide support for PM8150 S4 because it
+	 * is always-on; model it as a fixed regulator.
+	 */

One day we should stop being surprised by this and drop the "Apparently" from this comment ;)

Quoted 12 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +12 -0
+	vreg_s4a_1p8: pm8150-s4 {
+		compatible = "regulator-fixed";
+		regulator-name = "vreg_s4a_1p8";
+
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+
+		vin-supply = <&vph_pwr>;
+	};

[..]

arch/arm64/boot/dts/qcom/sm8150-hdk.dts

Quoted 2 lines

+&remoteproc_adsp {

arch/arm64/boot/dts/qcom/sm8150-hdk.dts +1 -0
+	status = "okay";

It would be nice to see a

	firmware-name = "qcom/sm8150/adsp.mbn";

here. Because if we ever end up pushing firmware to linux-firmware this DTB would continue to work.

Use https://github.com/andersson/pil-squasher to get mbn files out of the mdt+bXX files for your testing (or just rename/symlink the mdt to mbn for now).

arch/arm64/boot/dts/qcom/sm8150-hdk.dts line 384

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +4 -0
+};
+
+&remoteproc_cdsp {
+	status = "okay";
	firmware-name = "qcom/sm8150/cdsp.mbn";

arch/arm64/boot/dts/qcom/sm8150-hdk.dts line 388

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +4 -0
+};
+
+&remoteproc_slpi {
+	status = "okay";
	firmware-name = "qcom/sm8150/slpi.mbn";

Regards,
Bjorn

Quoted 76 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +73 -0
+};
+
+&tlmm {
+	gpio-reserved-ranges = <0 4>, <126 4>;
+};
+
+&uart2 {
+	status = "okay";
+};
+
+&ufs_mem_hc {
+	status = "okay";
+
+	reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
+
+	vcc-supply = <&vreg_l10a_2p5>;
+	vcc-max-microamp = <750000>;
+	vccq-supply = <&vreg_l9a_1p2>;
+	vccq-max-microamp = <700000>;
+	vccq2-supply = <&vreg_s4a_1p8>;
+	vccq2-max-microamp = <750000>;
+};
+
+&ufs_mem_phy {
+	status = "okay";
+
+	vdda-phy-supply = <&vdda_ufs_2ln_core_1>;
+	vdda-max-microamp = <90200>;
+	vdda-pll-supply = <&vreg_l3c_1p2>;
+	vdda-pll-max-microamp = <19000>;
+};
+
+&usb_1_hsphy {
+	status = "okay";
+	vdda-pll-supply = <&vdd_usb_hs_core>;
+	vdda33-supply = <&vdda_usb_hs_3p1>;
+	vdda18-supply = <&vdda_usb_hs_1p8>;
+};
+
+&usb_2_hsphy {
+	status = "okay";
+	vdda-pll-supply = <&vdd_usb_hs_core>;
+	vdda33-supply = <&vdda_usb_hs_3p1>;
+	vdda18-supply = <&vdda_usb_hs_1p8>;
+};
+
+&usb_1_qmpphy {
+	status = "okay";
+	vdda-phy-supply = <&vreg_l3c_1p2>;
+	vdda-pll-supply = <&vdda_usb_ss_dp_core_1>;
+};
+
+&usb_2_qmpphy {
+	status = "okay";
+	vdda-phy-supply = <&vreg_l3c_1p2>;
+	vdda-pll-supply = <&vdda_usb_ss_dp_core_1>;
+};
+
+&usb_1 {
+	status = "okay";
+};
+
+&usb_2 {
+	status = "okay";
+};
+
+&usb_1_dwc3 {
+	dr_mode = "peripheral";
+};
+
+&usb_2_dwc3 {
+	dr_mode = "host";
+};
Signature · 1 line
2.26.1
#32 lore raw

Re: [PATCH 5/6] arm64: dts: qcom: add sm8150 hdk dts

Quoted 47 lines · Bjorn Andersson
Quoted 2 lines · Jonathan Marek

Add initial HDK855 dts, based on sm8150-mtp, with a few changes.

Happy to see this on the list Jonathan, just some minor things on the remoteproc nodes below.

Quoted 20 lines
---
  arch/arm64/boot/dts/qcom/Makefile       |   1 +
  arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
  2 files changed, 462 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts

arch/arm64/boot/dts/qcom/Makefile +1 -0
index cc103f7020fd..e5dbd8b63951 100644
@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r3.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-mtp.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +0 -0

[..]

Quoted 18 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +18 -0
+/ {
+	model = "Qualcomm Technologies, Inc. SM8150 HDK";
+	compatible = "qcom,sm8150-hdk";
+
+	aliases {
+		serial0 = &uart2;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	vph_pwr: vph-pwr-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "vph_pwr";
+		regulator-min-microvolt = <3700000>;
+		regulator-max-microvolt = <3700000>;
+	};
Quoted 9 lines

arch/arm64/boot/dts/qcom/sm8150-hdk.dts line 37

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +5 -0
+
+	/*
+	 * Apparently RPMh does not provide support for PM8150 S4 because it
+	 * is always-on; model it as a fixed regulator.
+	 */

One day we should stop being surprised by this and drop the "Apparently" from this comment ;)

Had this copied from sm8150-mtp, dropped the comment entirely (to match sm8250-mtp dts).

Quoted 17 lines
Quoted 12 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +12 -0
+	vreg_s4a_1p8: pm8150-s4 {
+		compatible = "regulator-fixed";
+		regulator-name = "vreg_s4a_1p8";
+
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+
+		regulator-always-on;
+		regulator-boot-on;
+
+		vin-supply = <&vph_pwr>;
+	};

[..]

arch/arm64/boot/dts/qcom/sm8150-hdk.dts

Quoted 2 lines

+&remoteproc_adsp {

arch/arm64/boot/dts/qcom/sm8150-hdk.dts +1 -0
+	status = "okay";

It would be nice to see a

Quoted 9 lines
	firmware-name = "qcom/sm8150/adsp.mbn";

here. Because if we ever end up pushing firmware to linux-firmware this DTB would continue to work.

Use https://github.com/andersson/pil-squasher to get mbn files out of the mdt+bXX files for your testing (or just rename/symlink the mdt to mbn for now).

Added the firmware-name fields as you suggested. One thing to note (it shouldn't matter for HDK), these firmwares can be modified by the device maker, so not all sm8150 will have the same adsp/cdsp/slpi firmware.

Quoted 93 lines

arch/arm64/boot/dts/qcom/sm8150-hdk.dts line 384

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +4 -0
+};
+
+&remoteproc_cdsp {
+	status = "okay";
	firmware-name = "qcom/sm8150/cdsp.mbn";

arch/arm64/boot/dts/qcom/sm8150-hdk.dts line 388

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +4 -0
+};
+
+&remoteproc_slpi {
+	status = "okay";
	firmware-name = "qcom/sm8150/slpi.mbn";

Regards,
Bjorn

Quoted 76 lines
arch/arm64/boot/dts/qcom/sm8150-hdk.dts +73 -0
+};
+
+&tlmm {
+	gpio-reserved-ranges = <0 4>, <126 4>;
+};
+
+&uart2 {
+	status = "okay";
+};
+
+&ufs_mem_hc {
+	status = "okay";
+
+	reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
+
+	vcc-supply = <&vreg_l10a_2p5>;
+	vcc-max-microamp = <750000>;
+	vccq-supply = <&vreg_l9a_1p2>;
+	vccq-max-microamp = <700000>;
+	vccq2-supply = <&vreg_s4a_1p8>;
+	vccq2-max-microamp = <750000>;
+};
+
+&ufs_mem_phy {
+	status = "okay";
+
+	vdda-phy-supply = <&vdda_ufs_2ln_core_1>;
+	vdda-max-microamp = <90200>;
+	vdda-pll-supply = <&vreg_l3c_1p2>;
+	vdda-pll-max-microamp = <19000>;
+};
+
+&usb_1_hsphy {
+	status = "okay";
+	vdda-pll-supply = <&vdd_usb_hs_core>;
+	vdda33-supply = <&vdda_usb_hs_3p1>;
+	vdda18-supply = <&vdda_usb_hs_1p8>;
+};
+
+&usb_2_hsphy {
+	status = "okay";
+	vdda-pll-supply = <&vdd_usb_hs_core>;
+	vdda33-supply = <&vdda_usb_hs_3p1>;
+	vdda18-supply = <&vdda_usb_hs_1p8>;
+};
+
+&usb_1_qmpphy {
+	status = "okay";
+	vdda-phy-supply = <&vreg_l3c_1p2>;
+	vdda-pll-supply = <&vdda_usb_ss_dp_core_1>;
+};
+
+&usb_2_qmpphy {
+	status = "okay";
+	vdda-phy-supply = <&vreg_l3c_1p2>;
+	vdda-pll-supply = <&vdda_usb_ss_dp_core_1>;
+};
+
+&usb_1 {
+	status = "okay";
+};
+
+&usb_2 {
+	status = "okay";
+};
+
+&usb_1_dwc3 {
+	dr_mode = "peripheral";
+};
+
+&usb_2_dwc3 {
+	dr_mode = "host";
+};
Signature · 1 line
2.26.1
#33 lore raw

PATCH 6/6 arm64: dts: qcom: add sm8250 hdk dts

In reply to Jonathan Marek

Add initial HDK865 dts, based on sm8250-mtp, with a few changes. Notably, regulator configs are changed a bit.

---
 arch/arm64/boot/dts/qcom/Makefile       |   1 +
 arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 ++++++++++++++++++++++++
 2 files changed, 455 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index e5dbd8b63951..4649e8bc5034 100644
@@ -24,6 +24,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
arch/arm64/boot/dts/qcom/sm8250-hdk.dts new file +454 -0

454 lines not on this page · raw message

Signature · 1 line
2.26.1
#34 lore raw

Re: [PATCH 6/6] arm64: dts: qcom: add sm8250 hdk dts

Quoted 35 lines · Jonathan Marek

Add initial HDK865 dts, based on sm8250-mtp, with a few changes. Notably, regulator configs are changed a bit.

---
 arch/arm64/boot/dts/qcom/Makefile       |   1 +
 arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 ++++++++++++++++++++++++
 2 files changed, 455 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index e5dbd8b63951..4649e8bc5034 100644
@@ -24,6 +24,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
arch/arm64/boot/dts/qcom/sm8250-hdk.dts new file +7 -0
new file mode 100644
index 000000000000..d35014bf4f81
@@ -0,0 +1,454 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2020, The Linux Foundation. All rights reserved.
+ */
+
+/dts-v1/;
+

arch/arm64/boot/dts/qcom/sm8250-hdk.dts line 17

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-hdk.dts new file +10 -0
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/gpio/gpio.h>
+#include "sm8250.dtsi"
+#include "pm8150.dtsi"
+#include "pm8150b.dtsi"
+#include "pm8150l.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. SM8250 HDK";
+	compatible = "qcom,sm8250-hdk";
	compatible = "qcom,sm8250-hdk", "qcom,sm8250";

Apart from that this looks good!

Thanks,
Bjorn

#35 lore raw

Re: [PATCH 6/6] arm64: dts: qcom: add sm8250 hdk dts

Quoted 50 lines · Bjorn Andersson
Quoted 35 lines · Jonathan Marek

Add initial HDK865 dts, based on sm8250-mtp, with a few changes. Notably, regulator configs are changed a bit.

---
  arch/arm64/boot/dts/qcom/Makefile       |   1 +
  arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 ++++++++++++++++++++++++
  2 files changed, 455 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts

arch/arm64/boot/dts/qcom/Makefile +1 -0
index e5dbd8b63951..4649e8bc5034 100644
@@ -24,6 +24,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= sdm850-lenovo-yoga-c630.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-hdk.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= sm8250-mtp.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-1000.dtb
  dtb-$(CONFIG_ARCH_QCOM)	+= qcs404-evb-4000.dtb
arch/arm64/boot/dts/qcom/sm8250-hdk.dts new file +7 -0
new file mode 100644
index 000000000000..d35014bf4f81
@@ -0,0 +1,454 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2020, The Linux Foundation. All rights reserved.
+ */
+
+/dts-v1/;
+

arch/arm64/boot/dts/qcom/sm8250-hdk.dts line 17

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8250-hdk.dts new file +10 -0
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/gpio/gpio.h>
+#include "sm8250.dtsi"
+#include "pm8150.dtsi"
+#include "pm8150b.dtsi"
+#include "pm8150l.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. SM8250 HDK";
+	compatible = "qcom,sm8250-hdk";
	compatible = "qcom,sm8250-hdk", "qcom,sm8250";
Quoted 2 lines

Apart from that this looks good!

Made this change for both HDK dts, but FYI the mtp dts do not have this.

Quoted 3 lines

Thanks,
Bjorn

#36 lore raw
In reply to Jonathan Marek
Quoted 5 lines · Jonathan Marek

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Can you please elaborate on this discrepancy? I do remember seeing something odd when looking at this, but it seems like I didn't document it anywhere...

Thanks,
Bjorn

Quoted 21 lines

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

 arch/arm64/boot/dts/qcom/Makefile       |   2 +
 arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
 arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
 5 files changed, 1384 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts
Signature · 1 line
2.26.1
#37 lore raw
Quoted 8 lines · Bjorn Andersson
Quoted 5 lines · Jonathan Marek

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Quoted 7 lines

Can you please elaborate on this discrepancy? I do remember seeing something odd when looking at this, but it seems like I didn't document it anywhere...

Thanks,
Bjorn

Mainly there's a few regulators with different min/max voltage values. For example with l16a, downstream has min/max 3024000/3304000 but upstream sm8250-mtp has 2704000/2960000. I also added l18a.

Quoted 21 lines
Quoted 21 lines

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

  arch/arm64/boot/dts/qcom/Makefile       |   2 +
  arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
  arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
  5 files changed, 1384 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts

Signature · 1 line
2.26.1
#38 lore raw
Quoted 13 lines · Jonathan Marek
Quoted 12 lines · Bjorn Andersson
Quoted 5 lines · Jonathan Marek

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Can you please elaborate on this discrepancy? I do remember seeing something odd when looking at this, but it seems like I didn't document it anywhere...

Quoted 8 lines
Quoted 3 lines

Thanks,
Bjorn

Mainly there's a few regulators with different min/max voltage values. For example with l16a, downstream has min/max 3024000/3304000 but upstream sm8250-mtp has 2704000/2960000. I also added l18a.

Thanks, we'll double check these.

Regards,
Bjorn

Quoted 21 lines
Quoted 21 lines
Quoted 21 lines

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

  arch/arm64/boot/dts/qcom/Makefile       |   2 +
  arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
  arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
  5 files changed, 1384 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts

Signature · 1 line
2.26.1
#39 lore raw
In reply to Jonathan Marek

Hi,

Quoted 2 lines · Jonathan Marek

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

I've tested this series on an SM8250 based board and able to get Type C (USB0) working. There are also couple of Type A ports (USB1) on that board behind a USB hub. It is probing fine but I don't see any activity while connecting a USB device. Will continue to debug and once I get them working, I'll add my Tested-by tag.

Thanks,
Mani

Quoted 24 lines

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

 arch/arm64/boot/dts/qcom/Makefile       |   2 +
 arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
 arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
 5 files changed, 1384 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts
Signature · 1 line
2.26.1
#40 lore raw
Quoted 12 lines · Manivannan Sadhasivam

Hi,

Quoted 2 lines · Jonathan Marek

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

I've tested this series on an SM8250 based board and able to get Type C (USB0) working. There are also couple of Type A ports (USB1) on that board behind a USB hub. It is probing fine but I don't see any activity while connecting a USB device. Will continue to debug and once I get them working, I'll add my Tested-by tag.

HDK865 also has a couple Type A ports, I am using them with devices already plugged in during boot and I haven't hit a problem like that, but I think I've seen the same issue when hotplugging. IIRC the behavior was a bit weird, like plugging a device in the Type A port (USB1) nothing would happen, but unplugging/replugging the type C port (USB0) would cause the Type A port device to start working..

Have you tried with the devices already plugged in before booting?

Quoted 27 lines

Thanks,
Mani

Quoted 24 lines

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

  arch/arm64/boot/dts/qcom/Makefile       |   2 +
  arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
  arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
  5 files changed, 1384 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts

Signature · 1 line
2.26.1
#41 lore raw
Quoted 14 lines · Jonathan Marek
Quoted 12 lines · Manivannan Sadhasivam

Hi,

Quoted 2 lines · Jonathan Marek

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

I've tested this series on an SM8250 based board and able to get Type C (USB0) working. There are also couple of Type A ports (USB1) on that board behind a USB hub. It is probing fine but I don't see any activity while connecting a USB device. Will continue to debug and once I get them working, I'll add my Tested-by tag.

Quoted 9 lines

HDK865 also has a couple Type A ports, I am using them with devices already plugged in during boot and I haven't hit a problem like that, but I think I've seen the same issue when hotplugging. IIRC the behavior was a bit weird, like plugging a device in the Type A port (USB1) nothing would happen, but unplugging/replugging the type C port (USB0) would cause the Type A port device to start working..

Have you tried with the devices already plugged in before booting?

Tried it but no luck :/ Also plugging and removing Type C doesn't make any difference.

Thanks,
Mani

Quoted 27 lines
Quoted 27 lines

Thanks,
Mani

Quoted 24 lines

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

  arch/arm64/boot/dts/qcom/Makefile       |   2 +
  arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
  arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
  5 files changed, 1384 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts

Signature · 1 line
2.26.1
#42 lore raw
Quoted 22 lines · Manivannan Sadhasivam
Quoted 21 lines · Jonathan Marek
Quoted 12 lines · Manivannan Sadhasivam

Hi,

Quoted 2 lines · Jonathan Marek

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

I've tested this series on an SM8250 based board and able to get Type C (USB0) working. There are also couple of Type A ports (USB1) on that board behind a USB hub. It is probing fine but I don't see any activity while connecting a USB device. Will continue to debug and once I get them working, I'll add my Tested-by tag.

HDK865 also has a couple Type A ports, I am using them with devices already plugged in during boot and I haven't hit a problem like that, but I think I've seen the same issue when hotplugging. IIRC the behavior was a bit weird, like plugging a device in the Type A port (USB1) nothing would happen, but unplugging/replugging the type C port (USB0) would cause the Type A port device to start working..

Quoted 6 lines
Quoted 2 lines

Have you tried with the devices already plugged in before booting?

Tried it but no luck :/ Also plugging and removing Type C doesn't make any difference.

This one might be obvious, but do you have 5V power coming out of the type A ports?

Quoted 30 lines

Thanks,
Mani

Quoted 27 lines
Quoted 27 lines

Thanks,
Mani

Quoted 24 lines

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

   arch/arm64/boot/dts/qcom/Makefile       |   2 +
   arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
   arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
   arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
   arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
   5 files changed, 1384 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts

Signature · 1 line
2.26.1
#43 lore raw
In reply to Manivannan Sadhasivam
Quoted 12 lines · Manivannan Sadhasivam

Hi,

Quoted 2 lines · Jonathan Marek

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

I've tested this series on an SM8250 based board and able to get Type C (USB0) working. There are also couple of Type A ports (USB1) on that board behind a USB hub. It is probing fine but I don't see any activity while connecting a USB device. Will continue to debug and once I get them working, I'll add my Tested-by tag.

So it turned out that I forgot to enable one regulator which kept the USB hub powered down. After enabling that, both Type A ports are working. Hence,

Thanks,
Mani

Quoted 27 lines

Thanks,
Mani

Quoted 24 lines

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

 arch/arm64/boot/dts/qcom/Makefile       |   2 +
 arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
 arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
 5 files changed, 1384 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts
Signature · 1 line
2.26.1
#44 lore raw
Quoted 14 lines · Manivannan Sadhasivam
Quoted 12 lines · Manivannan Sadhasivam

Hi,

Quoted 2 lines · Jonathan Marek

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

I've tested this series on an SM8250 based board and able to get Type C (USB0) working. There are also couple of Type A ports (USB1) on that board behind a USB hub. It is probing fine but I don't see any activity while connecting a USB device. Will continue to debug and once I get them working, I'll add my Tested-by tag.

Quoted 8 lines

So it turned out that I forgot to enable one regulator which kept the USB hub powered down. After enabling that, both Type A ports are working. Hence,

Thanks,
Mani

Thanks for testing it. Your Tested-by only applies to the relevant patches (patches 2 and 4 in this version) right? And can I also add your Tested-by tag to my other series (https://patchwork.kernel.org/cover/11567095/) which this depends on?

Quoted 27 lines
Quoted 27 lines

Thanks,
Mani

Quoted 24 lines

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

  arch/arm64/boot/dts/qcom/Makefile       |   2 +
  arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
  arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
  5 files changed, 1384 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts

Signature · 1 line
2.26.1
#45 lore raw
Quoted 20 lines · Jonathan Marek
Quoted 19 lines · Manivannan Sadhasivam
Quoted 12 lines · Manivannan Sadhasivam

Hi,

Quoted 2 lines · Jonathan Marek

Add dts nodes for apps_smmu and USB for both sm8150 and sm8250.

I've tested this series on an SM8250 based board and able to get Type C (USB0) working. There are also couple of Type A ports (USB1) on that board behind a USB hub. It is probing fine but I don't see any activity while connecting a USB device. Will continue to debug and once I get them working, I'll add my Tested-by tag.

So it turned out that I forgot to enable one regulator which kept the USB hub powered down. After enabling that, both Type A ports are working. Hence,

Quoted 9 lines
Quoted 3 lines

Thanks,
Mani

Thanks for testing it. Your Tested-by only applies to the relevant patches (patches 2 and 4 in this version) right? And can I also add your Tested-by tag to my other series (https://patchwork.kernel.org/cover/11567095/) which this depends on?

Sure. You can add it for all SM8250 USB patches.

Thanks,
Mani

Quoted 27 lines
Quoted 27 lines
Quoted 27 lines

Thanks,
Mani

Quoted 24 lines

Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a few changes. Notably, the HDK865 dts has regulator config changed a bit based on downstream (I think sm8250-mtp.dts is wrong and copied too much from sm8150).

Jonathan Marek (6):
arm64: dts: qcom: sm8150: add apps_smmu node
arm64: dts: qcom: sm8250: add apps_smmu node
arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes
arm64: dts: qcom: sm8250: Add USB and PHY device nodes
arm64: dts: qcom: add sm8150 hdk dts
arm64: dts: qcom: add sm8250 hdk dts

  arch/arm64/boot/dts/qcom/Makefile       |   2 +
  arch/arm64/boot/dts/qcom/sm8150-hdk.dts | 461 ++++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8150.dtsi    | 180 +++++++++
  arch/arm64/boot/dts/qcom/sm8250-hdk.dts | 454 +++++++++++++++++++++++
  arch/arm64/boot/dts/qcom/sm8250.dtsi    | 287 +++++++++++++++
  5 files changed, 1384 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm8150-hdk.dts create mode 100644 arch/arm64/boot/dts/qcom/sm8250-hdk.dts

Signature · 1 line
2.26.1