Skip to contentSkip to conversation

arm64: dts: apple: Re-parent ANS2 power domains

PATCH Applied Sven Peter 2 participants 3 messages Jun 2, 2022 – Jun 21, 2022

Subsystems (2)
lore
Share & tools
lore

Sven Peter

author
#0 lore raw

PATCH 1/2 arm64: dts: apple: Re-parent ANS2 power domains

From: Hector Martin <[email protected]>

Turns out that the APCIE_ST*_SYS domains do hard-depend on ANS2, so without this they refuse to power up.

---
 arch/arm64/boot/dts/apple/t8103-pmgr.dtsi | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm64/boot/dts/apple/t8103-pmgr.dtsi +1 -6
index fc51bc872468..a6dbb1f485d8 100644
@@ -725,11 +725,6 @@ ps_ans2: power-controller@3f0 {
 		#power-domain-cells = <0>;
 		#reset-cells = <0>;
 		label = "ans2";
-		/*
-		 * The ADT makes ps_apcie_st depend on ps_ans2 instead, but this
-		 * doesn't make much sense since ANS2 uses APCIE_ST.
-		 */
-		power-domains = <&ps_apcie_st>;
 	};
 
 	ps_gfx: power-controller@3f8 {
@@ -836,7 +831,7 @@ ps_apcie_st: power-controller@418 {
 		#power-domain-cells = <0>;
 		#reset-cells = <0>;
 		label = "apcie_st";
-		power-domains = <&ps_apcie>;
+		power-domains = <&ps_apcie>, <&ps_ans2>;
 	};
 
 	ps_ane_sys: power-controller@470 {
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 2/2 arm64: dts: apple: t8103: Add ANS2 NVMe nodes

This allows to use the internal disks attatched via NVMe.

---
 arch/arm64/boot/dts/apple/t8103.dtsi | 34 ++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
arch/arm64/boot/dts/apple/t8103.dtsi +34 -0
index 9f8f4145db88..51a63b29d404 100644
@@ -378,6 +378,40 @@ pinctrl_aop: pinctrl@24a820000 {
 				     <AIC_IRQ 274 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
+		ans_mbox: mbox@277408000 {
+			compatible = "apple,t8103-asc-mailbox", "apple,asc-mailbox-v4";
+			reg = <0x2 0x77408000 0x0 0x4000>;
+			interrupt-parent = <&aic>;
+			interrupts = <AIC_IRQ 583 IRQ_TYPE_LEVEL_HIGH>,
+				<AIC_IRQ 584 IRQ_TYPE_LEVEL_HIGH>,
+				<AIC_IRQ 585 IRQ_TYPE_LEVEL_HIGH>,
+				<AIC_IRQ 586 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "send-empty", "send-not-empty",
+				"recv-empty", "recv-not-empty";
+			#mbox-cells = <0>;
+			power-domains = <&ps_ans2>;
+		};
+
+		sart: iommu@27bc50000 {
+			compatible = "apple,t8103-sart";
+			reg = <0x2 0x7bc50000 0x0 0x10000>;
+			power-domains = <&ps_ans2>;
+		};
+
+		nvme@27bcc0000 {
+			compatible = "apple,t8103-nvme-ans2", "apple,nvme-ans2";
+			reg = <0x2 0x7bcc0000 0x0 0x40000>,
+				<0x2 0x77400000 0x0 0x4000>;
+			reg-names = "nvme", "ans";
+			interrupt-parent = <&aic>;
+			interrupts = <AIC_IRQ 590 IRQ_TYPE_LEVEL_HIGH>;
+			mboxes = <&ans_mbox>;
+			apple,sart = <&sart>;
+			power-domains = <&ps_ans2>, <&ps_apcie_st>;
+			power-domain-names = "ans", "apcie0";
+			resets = <&ps_ans2>;
+		};
+
 		pcie0_dart_0: dart@681008000 {
 			compatible = "apple,t8103-dart";
 			reg = <0x6 0x81008000 0x0 0x4000>;
Signature · 1 line
2.25.1
#2 lore raw
In reply to Sven Peter
Quoted 29 lines · Sven Peter

From: Hector Martin <[email protected]>

Turns out that the APCIE_ST*_SYS domains do hard-depend on ANS2, so without this they refuse to power up.

---
 arch/arm64/boot/dts/apple/t8103-pmgr.dtsi | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
arch/arm64/boot/dts/apple/t8103-pmgr.dtsi +0 -5
index fc51bc872468..a6dbb1f485d8 100644
@@ -725,11 +725,6 @@ ps_ans2: power-controller@3f0 {
 		#power-domain-cells = <0>;
 		#reset-cells = <0>;
 		label = "ans2";
-		/*
-		 * The ADT makes ps_apcie_st depend on ps_ans2 instead, but this
-		 * doesn't make much sense since ANS2 uses APCIE_ST.
-		 */
-		power-domains = <&ps_apcie_st>;
 	};
 
 	ps_gfx: power-controller@3f8 {

arch/arm64/boot/dts/apple/t8103-pmgr.dtsi ps_apcie_st: power-controller@418 { · line 837

Quoted 8 lines
arch/arm64/boot/dts/apple/t8103-pmgr.dtsi +1 -1
@@ -836,7 +831,7 @@ ps_apcie_st: power-controller@418 {
 		#power-domain-cells = <0>;
 		#reset-cells = <0>;
 		label = "apcie_st";
-		power-domains = <&ps_apcie>;
+		power-domains = <&ps_apcie>, <&ps_ans2>;
 	};
 
 	ps_ane_sys: power-controller@470 {

Applied both patches to asahi-soc/dt. Thanks!

Signature · 2 lines
Hector Martin ([email protected])
Public Key: https://mrcn.st/pub