linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arch: arm64: dts: apple: Disable unused PCIe ports
@ 2023-02-14 14:07 Janne Grunau
  2023-02-14 14:07 ` [PATCH 1/2] arm64: dts: apple: t8103: " Janne Grunau
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Janne Grunau @ 2023-02-14 14:07 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Alyssa Rosenzweig, Rob Herring,
	Krzysztof Kozlowski, Mark Kettenis
  Cc: asahi, linux-arm-kernel, devicetree, linux-kernel

The t8103 and t600x device trees deleted unused PCIe ports. This was
probably done to replicate Apple's device tree which doesn't has nodes
for most unused hardware.
A more accurate description of the hardware is to disable unused
hardware.

This was discovered during the review of the t8112 device trees in
https://lore.kernel.org/asahi/1ea2107a-bb86-8c22-0bbc-82c453ab08ce@linaro.org/

Signed-off-by: Janne Grunau <j@jannau.net>
---
Janne Grunau (2):
      arm64: dts: apple: t8103: Disable unused PCIe ports
      arm64: dts: apple: t600x: Disable unused PCIe ports

 arch/arm64/boot/dts/apple/t600x-die0.dtsi      |  4 ++++
 arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 11 -----------
 arch/arm64/boot/dts/apple/t600x-j375.dtsi      | 11 +++++++++++
 arch/arm64/boot/dts/apple/t8103-j274.dts       | 10 ++++++++++
 arch/arm64/boot/dts/apple/t8103-j293.dts       | 15 ---------------
 arch/arm64/boot/dts/apple/t8103-j313.dts       | 15 ---------------
 arch/arm64/boot/dts/apple/t8103-j456.dts       | 10 ++++++++++
 arch/arm64/boot/dts/apple/t8103-j457.dts       | 11 +++--------
 arch/arm64/boot/dts/apple/t8103.dtsi           |  4 ++++
 9 files changed, 42 insertions(+), 49 deletions(-)
---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230214-apple_dts_pcie_disable_unused-03c08218b8af

Best regards,
-- 
Janne Grunau <j@jannau.net>


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

* [PATCH 1/2] arm64: dts: apple: t8103: Disable unused PCIe ports
  2023-02-14 14:07 [PATCH 0/2] arch: arm64: dts: apple: Disable unused PCIe ports Janne Grunau
@ 2023-02-14 14:07 ` Janne Grunau
  2023-02-14 14:07 ` [PATCH 2/2] arm64: dts: apple: t600x: " Janne Grunau
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Janne Grunau @ 2023-02-14 14:07 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Alyssa Rosenzweig, Rob Herring,
	Krzysztof Kozlowski, Mark Kettenis
  Cc: asahi, linux-arm-kernel, devicetree, linux-kernel

The PCIe ports are unused (without devices) so disable them instead of
removing them.

Fixes: 7c77ab91b33d ("arm64: dts: apple: Add missing M1 (t8103) devices")
Signed-off-by: Janne Grunau <j@jannau.net>
---
 arch/arm64/boot/dts/apple/t8103-j274.dts | 10 ++++++++++
 arch/arm64/boot/dts/apple/t8103-j293.dts | 15 ---------------
 arch/arm64/boot/dts/apple/t8103-j313.dts | 15 ---------------
 arch/arm64/boot/dts/apple/t8103-j456.dts | 10 ++++++++++
 arch/arm64/boot/dts/apple/t8103-j457.dts | 11 +++--------
 arch/arm64/boot/dts/apple/t8103.dtsi     |  4 ++++
 6 files changed, 27 insertions(+), 38 deletions(-)

diff --git a/arch/arm64/boot/dts/apple/t8103-j274.dts b/arch/arm64/boot/dts/apple/t8103-j274.dts
index b52ddc409893..1c3e37f86d46 100644
--- a/arch/arm64/boot/dts/apple/t8103-j274.dts
+++ b/arch/arm64/boot/dts/apple/t8103-j274.dts
@@ -37,10 +37,12 @@ &wifi0 {
 
 &port01 {
 	bus-range = <2 2>;
+	status = "okay";
 };
 
 &port02 {
 	bus-range = <3 3>;
+	status = "okay";
 	ethernet0: ethernet@0,0 {
 		reg = <0x30000 0x0 0x0 0x0 0x0>;
 		/* To be filled by the loader */
@@ -48,6 +50,14 @@ ethernet0: ethernet@0,0 {
 	};
 };
 
+&pcie0_dart_1 {
+	status = "okay";
+};
+
+&pcie0_dart_2 {
+	status = "okay";
+};
+
 &i2c2 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/apple/t8103-j293.dts b/arch/arm64/boot/dts/apple/t8103-j293.dts
index 151074109a11..c363dfef8070 100644
--- a/arch/arm64/boot/dts/apple/t8103-j293.dts
+++ b/arch/arm64/boot/dts/apple/t8103-j293.dts
@@ -25,21 +25,6 @@ &wifi0 {
 	brcm,board-type = "apple,honshu";
 };
 
-/*
- * Remove unused PCIe ports and disable the associated DARTs.
- */
-
-&pcie0_dart_1 {
-	status = "disabled";
-};
-
-&pcie0_dart_2 {
-	status = "disabled";
-};
-
-/delete-node/ &port01;
-/delete-node/ &port02;
-
 &i2c2 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/apple/t8103-j313.dts b/arch/arm64/boot/dts/apple/t8103-j313.dts
index bc1f865aa790..08409be1cf35 100644
--- a/arch/arm64/boot/dts/apple/t8103-j313.dts
+++ b/arch/arm64/boot/dts/apple/t8103-j313.dts
@@ -24,18 +24,3 @@ &bluetooth0 {
 &wifi0 {
 	brcm,board-type = "apple,shikoku";
 };
-
-/*
- * Remove unused PCIe ports and disable the associated DARTs.
- */
-
-&pcie0_dart_1 {
-	status = "disabled";
-};
-
-&pcie0_dart_2 {
-	status = "disabled";
-};
-
-/delete-node/ &port01;
-/delete-node/ &port02;
diff --git a/arch/arm64/boot/dts/apple/t8103-j456.dts b/arch/arm64/boot/dts/apple/t8103-j456.dts
index 2db425ceb30f..58c8e43789b4 100644
--- a/arch/arm64/boot/dts/apple/t8103-j456.dts
+++ b/arch/arm64/boot/dts/apple/t8103-j456.dts
@@ -55,13 +55,23 @@ hpm3: usb-pd@3c {
 
 &port01 {
 	bus-range = <2 2>;
+	status = "okay";
 };
 
 &port02 {
 	bus-range = <3 3>;
+	status = "okay";
 	ethernet0: ethernet@0,0 {
 		reg = <0x30000 0x0 0x0 0x0 0x0>;
 		/* To be filled by the loader */
 		local-mac-address = [00 10 18 00 00 00];
 	};
 };
+
+&pcie0_dart_1 {
+	status = "okay";
+};
+
+&pcie0_dart_2 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/apple/t8103-j457.dts b/arch/arm64/boot/dts/apple/t8103-j457.dts
index 3821ff146c56..152f95fd49a2 100644
--- a/arch/arm64/boot/dts/apple/t8103-j457.dts
+++ b/arch/arm64/boot/dts/apple/t8103-j457.dts
@@ -37,6 +37,7 @@ &wifi0 {
 
 &port02 {
 	bus-range = <3 3>;
+	status = "okay";
 	ethernet0: ethernet@0,0 {
 		reg = <0x30000 0x0 0x0 0x0 0x0>;
 		/* To be filled by the loader */
@@ -44,12 +45,6 @@ ethernet0: ethernet@0,0 {
 	};
 };
 
-/*
- * Remove unused PCIe port and disable the associated DART.
- */
-
-&pcie0_dart_1 {
-	status = "disabled";
+&pcie0_dart_2 {
+	status = "okay";
 };
-
-/delete-node/ &port01;
diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi
index 9859219699f4..87a9c1ba6d0f 100644
--- a/arch/arm64/boot/dts/apple/t8103.dtsi
+++ b/arch/arm64/boot/dts/apple/t8103.dtsi
@@ -724,6 +724,7 @@ pcie0_dart_1: iommu@682008000 {
 			interrupt-parent = <&aic>;
 			interrupts = <AIC_IRQ 699 IRQ_TYPE_LEVEL_HIGH>;
 			power-domains = <&ps_apcie_gp>;
+			status = "disabled";
 		};
 
 		pcie0_dart_2: iommu@683008000 {
@@ -733,6 +734,7 @@ pcie0_dart_2: iommu@683008000 {
 			interrupt-parent = <&aic>;
 			interrupts = <AIC_IRQ 702 IRQ_TYPE_LEVEL_HIGH>;
 			power-domains = <&ps_apcie_gp>;
+			status = "disabled";
 		};
 
 		pcie0: pcie@690000000 {
@@ -807,6 +809,7 @@ port01: pci@1,0 {
 						<0 0 0 2 &port01 0 0 0 1>,
 						<0 0 0 3 &port01 0 0 0 2>,
 						<0 0 0 4 &port01 0 0 0 3>;
+				status = "disabled";
 			};
 
 			port02: pci@2,0 {
@@ -826,6 +829,7 @@ port02: pci@2,0 {
 						<0 0 0 2 &port02 0 0 0 1>,
 						<0 0 0 3 &port02 0 0 0 2>,
 						<0 0 0 4 &port02 0 0 0 3>;
+				status = "disabled";
 			};
 		};
 	};

-- 
2.39.1


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

* [PATCH 2/2] arm64: dts: apple: t600x: Disable unused PCIe ports
  2023-02-14 14:07 [PATCH 0/2] arch: arm64: dts: apple: Disable unused PCIe ports Janne Grunau
  2023-02-14 14:07 ` [PATCH 1/2] arm64: dts: apple: t8103: " Janne Grunau
@ 2023-02-14 14:07 ` Janne Grunau
  2023-02-19 12:41 ` [PATCH 0/2] arch: arm64: dts: apple: " Sven Peter
  2023-03-28 11:07 ` Hector Martin
  3 siblings, 0 replies; 5+ messages in thread
From: Janne Grunau @ 2023-02-14 14:07 UTC (permalink / raw)
  To: Hector Martin, Sven Peter, Alyssa Rosenzweig, Rob Herring,
	Krzysztof Kozlowski, Mark Kettenis
  Cc: asahi, linux-arm-kernel, devicetree, linux-kernel

The PCIe ports are unused (without devices) so disable them instead of
removing them.

Signed-off-by: Janne Grunau <j@jannau.net>
---
 arch/arm64/boot/dts/apple/t600x-die0.dtsi      |  4 ++++
 arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 11 -----------
 arch/arm64/boot/dts/apple/t600x-j375.dtsi      | 11 +++++++++++
 3 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/arch/arm64/boot/dts/apple/t600x-die0.dtsi b/arch/arm64/boot/dts/apple/t600x-die0.dtsi
index 1c41954e3899..273d7060d031 100644
--- a/arch/arm64/boot/dts/apple/t600x-die0.dtsi
+++ b/arch/arm64/boot/dts/apple/t600x-die0.dtsi
@@ -233,6 +233,7 @@ pcie0_dart_2: iommu@583008000 {
 		interrupt-parent = <&aic>;
 		interrupts = <AIC_IRQ 0 1277 IRQ_TYPE_LEVEL_HIGH>;
 		power-domains = <&ps_apcie_gp_sys>;
+		status = "disabled";
 	};
 
 	pcie0_dart_3: iommu@584008000 {
@@ -242,6 +243,7 @@ pcie0_dart_3: iommu@584008000 {
 		interrupt-parent = <&aic>;
 		interrupts = <AIC_IRQ 0 1280 IRQ_TYPE_LEVEL_HIGH>;
 		power-domains = <&ps_apcie_gp_sys>;
+		status = "disabled";
 	};
 
 	pcie0: pcie@590000000 {
@@ -338,6 +340,7 @@ port02: pci@2,0 {
 					<0 0 0 2 &port02 0 0 0 1>,
 					<0 0 0 3 &port02 0 0 0 2>,
 					<0 0 0 4 &port02 0 0 0 3>;
+			status = "disabled";
 		};
 
 		port03: pci@3,0 {
@@ -357,5 +360,6 @@ port03: pci@3,0 {
 					<0 0 0 2 &port03 0 0 0 1>,
 					<0 0 0 3 &port03 0 0 0 2>,
 					<0 0 0 4 &port03 0 0 0 3>;
+			status = "disabled";
 		};
 	};
diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi
index 34906d522f0a..356a73d1ce4c 100644
--- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi
+++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi
@@ -101,14 +101,3 @@ sdhci0: mmc@0,0 {
 		wp-inverted;
 	};
 };
-
-&pcie0_dart_2 {
-	status = "disabled";
-};
-
-&pcie0_dart_3 {
-	status = "disabled";
-};
-
-/delete-node/ &port02;
-/delete-node/ &port03;
diff --git a/arch/arm64/boot/dts/apple/t600x-j375.dtsi b/arch/arm64/boot/dts/apple/t600x-j375.dtsi
index 00d3a9447c89..1e5a19e49b08 100644
--- a/arch/arm64/boot/dts/apple/t600x-j375.dtsi
+++ b/arch/arm64/boot/dts/apple/t600x-j375.dtsi
@@ -104,6 +104,7 @@ sdhci0: mmc@0,0 {
 &port02 {
 	/* 10 Gbit Ethernet */
 	bus-range = <3 3>;
+	status = "okay";
 	ethernet0: ethernet@0,0 {
 		reg = <0x30000 0x0 0x0 0x0 0x0>;
 		/* To be filled by the loader */
@@ -114,4 +115,14 @@ ethernet0: ethernet@0,0 {
 &port03 {
 	/* USB xHCI */
 	bus-range = <4 4>;
+	status = "okay";
+};
+
+
+&pcie0_dart_2 {
+	status = "okay";
+};
+
+&pcie0_dart_3 {
+	status = "okay";
 };

-- 
2.39.1


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

* Re: [PATCH 0/2] arch: arm64: dts: apple: Disable unused PCIe ports
  2023-02-14 14:07 [PATCH 0/2] arch: arm64: dts: apple: Disable unused PCIe ports Janne Grunau
  2023-02-14 14:07 ` [PATCH 1/2] arm64: dts: apple: t8103: " Janne Grunau
  2023-02-14 14:07 ` [PATCH 2/2] arm64: dts: apple: t600x: " Janne Grunau
@ 2023-02-19 12:41 ` Sven Peter
  2023-03-28 11:07 ` Hector Martin
  3 siblings, 0 replies; 5+ messages in thread
From: Sven Peter @ 2023-02-19 12:41 UTC (permalink / raw)
  To: Janne Grunau
  Cc: asahi, linux-arm-kernel, devicetree, linux-kernel, Hector Martin,
	Alyssa Rosenzweig, Rob Herring, Krzysztof Kozlowski,
	Mark Kettenis

On Tue, Feb 14, 2023, at 15:07, Janne Grunau wrote:
> The t8103 and t600x device trees deleted unused PCIe ports. This was
> probably done to replicate Apple's device tree which doesn't has nodes
> for most unused hardware.
> A more accurate description of the hardware is to disable unused
> hardware.
>
> This was discovered during the review of the t8112 device trees in
> https://lore.kernel.org/asahi/1ea2107a-bb86-8c22-0bbc-82c453ab08ce@linaro.org/
>
> Signed-off-by: Janne Grunau <j@jannau.net>
> ---
> Janne Grunau (2):
>       arm64: dts: apple: t8103: Disable unused PCIe ports
>       arm64: dts: apple: t600x: Disable unused PCIe ports

For the entire series:

Reviewed-by: Sven Peter <sven@svenpeter.dev>


Thanks,


Sven

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

* Re: [PATCH 0/2] arch: arm64: dts: apple: Disable unused PCIe ports
  2023-02-14 14:07 [PATCH 0/2] arch: arm64: dts: apple: Disable unused PCIe ports Janne Grunau
                   ` (2 preceding siblings ...)
  2023-02-19 12:41 ` [PATCH 0/2] arch: arm64: dts: apple: " Sven Peter
@ 2023-03-28 11:07 ` Hector Martin
  3 siblings, 0 replies; 5+ messages in thread
From: Hector Martin @ 2023-03-28 11:07 UTC (permalink / raw)
  To: Janne Grunau, Sven Peter, Alyssa Rosenzweig, Rob Herring,
	Krzysztof Kozlowski, Mark Kettenis
  Cc: asahi, linux-arm-kernel, devicetree, linux-kernel

On 14/02/2023 23.07, Janne Grunau wrote:
> The t8103 and t600x device trees deleted unused PCIe ports. This was
> probably done to replicate Apple's device tree which doesn't has nodes
> for most unused hardware.
> A more accurate description of the hardware is to disable unused
> hardware.
> 
> This was discovered during the review of the t8112 device trees in
> https://lore.kernel.org/asahi/1ea2107a-bb86-8c22-0bbc-82c453ab08ce@linaro.org/
> 
> Signed-off-by: Janne Grunau <j@jannau.net>
> ---
> Janne Grunau (2):
>       arm64: dts: apple: t8103: Disable unused PCIe ports
>       arm64: dts: apple: t600x: Disable unused PCIe ports
> 
>  arch/arm64/boot/dts/apple/t600x-die0.dtsi      |  4 ++++
>  arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi | 11 -----------
>  arch/arm64/boot/dts/apple/t600x-j375.dtsi      | 11 +++++++++++
>  arch/arm64/boot/dts/apple/t8103-j274.dts       | 10 ++++++++++
>  arch/arm64/boot/dts/apple/t8103-j293.dts       | 15 ---------------
>  arch/arm64/boot/dts/apple/t8103-j313.dts       | 15 ---------------
>  arch/arm64/boot/dts/apple/t8103-j456.dts       | 10 ++++++++++
>  arch/arm64/boot/dts/apple/t8103-j457.dts       | 11 +++--------
>  arch/arm64/boot/dts/apple/t8103.dtsi           |  4 ++++
>  9 files changed, 42 insertions(+), 49 deletions(-)
> ---
> base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
> change-id: 20230214-apple_dts_pcie_disable_unused-03c08218b8af
> 
> Best regards,

Thanks, applied to asahi-soc/dt!

- Hector


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

end of thread, other threads:[~2023-03-28 11:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-14 14:07 [PATCH 0/2] arch: arm64: dts: apple: Disable unused PCIe ports Janne Grunau
2023-02-14 14:07 ` [PATCH 1/2] arm64: dts: apple: t8103: " Janne Grunau
2023-02-14 14:07 ` [PATCH 2/2] arm64: dts: apple: t600x: " Janne Grunau
2023-02-19 12:41 ` [PATCH 0/2] arch: arm64: dts: apple: " Sven Peter
2023-03-28 11:07 ` Hector Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).