diff mbox series

[4/9] mips: dts: realtek: Fold rtl83xx into rtl838x

Message ID 20250119183424.259353-5-sander@svanheule.net (mailing list archive)
State New
Headers show
Series mips: dts: Split Realtek devicetrees | expand

Commit Message

Sander Vanheule Jan. 19, 2025, 6:34 p.m. UTC
rtl83xx.dtsi was once (presumably) created as a base for both RTL838x
and RTL839x SoCs. Both SoCs have a different CPU and the peripherals
require different compatibles. Fold rtl83xx.dtsi into rtl838x.dtsi,
currently only supporting RTL838x SoCs, and create the RTL839x base
include later when required.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
 arch/mips/boot/dts/realtek/cisco_sg220-26.dts |  1 -
 arch/mips/boot/dts/realtek/rtl838x.dtsi       | 56 ++++++++++++++++++
 arch/mips/boot/dts/realtek/rtl83xx.dtsi       | 59 -------------------
 3 files changed, 56 insertions(+), 60 deletions(-)
 delete mode 100644 arch/mips/boot/dts/realtek/rtl83xx.dtsi

Comments

Chris Packham Jan. 20, 2025, 1:23 a.m. UTC | #1
On 20/01/2025 07:34, Sander Vanheule wrote:
> rtl83xx.dtsi was once (presumably) created as a base for both RTL838x
> and RTL839x SoCs. Both SoCs have a different CPU and the peripherals
> require different compatibles. Fold rtl83xx.dtsi into rtl838x.dtsi,
> currently only supporting RTL838x SoCs, and create the RTL839x base
> include later when required.
>
> Signed-off-by: Sander Vanheule <sander@svanheule.net>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
>   arch/mips/boot/dts/realtek/cisco_sg220-26.dts |  1 -
>   arch/mips/boot/dts/realtek/rtl838x.dtsi       | 56 ++++++++++++++++++
>   arch/mips/boot/dts/realtek/rtl83xx.dtsi       | 59 -------------------
>   3 files changed, 56 insertions(+), 60 deletions(-)
>   delete mode 100644 arch/mips/boot/dts/realtek/rtl83xx.dtsi
>
> diff --git a/arch/mips/boot/dts/realtek/cisco_sg220-26.dts b/arch/mips/boot/dts/realtek/cisco_sg220-26.dts
> index 1cdbb09297ef..cb85d172a1d3 100644
> --- a/arch/mips/boot/dts/realtek/cisco_sg220-26.dts
> +++ b/arch/mips/boot/dts/realtek/cisco_sg220-26.dts
> @@ -2,7 +2,6 @@
>   
>   /dts-v1/;
>   
> -#include "rtl83xx.dtsi"
>   #include "rtl838x.dtsi"
>   
>   / {
> diff --git a/arch/mips/boot/dts/realtek/rtl838x.dtsi b/arch/mips/boot/dts/realtek/rtl838x.dtsi
> index d2c6baabb38c..907449094536 100644
> --- a/arch/mips/boot/dts/realtek/rtl838x.dtsi
> +++ b/arch/mips/boot/dts/realtek/rtl838x.dtsi
> @@ -1,6 +1,14 @@
>   // SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
>   
>   / {
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +
> +	aliases {
> +		serial0 = &uart0;
> +		serial1 = &uart1;
> +	};
> +
>   	cpus {
>   		#address-cells = <1>;
>   		#size-cells = <0>;
> @@ -18,4 +26,52 @@ baseclk: baseclk {
>   		#clock-cells = <0>;
>   		clock-frequency = <500000000>;
>   	};
> +
> +	cpuintc: cpuintc {
> +		compatible = "mti,cpu-interrupt-controller";
> +		#address-cells = <0>;
> +		#interrupt-cells = <1>;
> +		interrupt-controller;
> +	};
> +
> +	soc@18000000 {
> +		compatible = "simple-bus";
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges = <0x0 0x18000000 0x10000>;
> +
> +		uart0: serial@2000 {
> +			compatible = "ns16550a";
> +			reg = <0x2000 0x100>;
> +
> +			clock-frequency = <200000000>;
> +
> +			interrupt-parent = <&cpuintc>;
> +			interrupts = <31>;
> +
> +			reg-io-width = <1>;
> +			reg-shift = <2>;
> +			fifo-size = <1>;
> +			no-loopback-test;
> +
> +			status = "disabled";
> +		};
> +
> +		uart1: serial@2100 {
> +			compatible = "ns16550a";
> +			reg = <0x2100 0x100>;
> +
> +			clock-frequency = <200000000>;
> +
> +			interrupt-parent = <&cpuintc>;
> +			interrupts = <30>;
> +
> +			reg-io-width = <1>;
> +			reg-shift = <2>;
> +			fifo-size = <1>;
> +			no-loopback-test;
> +
> +			status = "disabled";
> +		};
> +	};
>   };
> diff --git a/arch/mips/boot/dts/realtek/rtl83xx.dtsi b/arch/mips/boot/dts/realtek/rtl83xx.dtsi
> deleted file mode 100644
> index 1039cb50c7da..000000000000
> --- a/arch/mips/boot/dts/realtek/rtl83xx.dtsi
> +++ /dev/null
> @@ -1,59 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
> -
> -/ {
> -	#address-cells = <1>;
> -	#size-cells = <1>;
> -
> -	aliases {
> -		serial0 = &uart0;
> -		serial1 = &uart1;
> -	};
> -
> -	cpuintc: cpuintc {
> -		compatible = "mti,cpu-interrupt-controller";
> -		#address-cells = <0>;
> -		#interrupt-cells = <1>;
> -		interrupt-controller;
> -	};
> -
> -	soc@18000000 {
> -		compatible = "simple-bus";
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -		ranges = <0x0 0x18000000 0x10000>;
> -
> -		uart0: serial@2000 {
> -			compatible = "ns16550a";
> -			reg = <0x2000 0x100>;
> -
> -			clock-frequency = <200000000>;
> -
> -			interrupt-parent = <&cpuintc>;
> -			interrupts = <31>;
> -
> -			reg-io-width = <1>;
> -			reg-shift = <2>;
> -			fifo-size = <1>;
> -			no-loopback-test;
> -
> -			status = "disabled";
> -		};
> -
> -		uart1: serial@2100 {
> -			compatible = "ns16550a";
> -			reg = <0x2100 0x100>;
> -
> -			clock-frequency = <200000000>;
> -
> -			interrupt-parent = <&cpuintc>;
> -			interrupts = <30>;
> -
> -			reg-io-width = <1>;
> -			reg-shift = <2>;
> -			fifo-size = <1>;
> -			no-loopback-test;
> -
> -			status = "disabled";
> -		};
> -	};
> -};
diff mbox series

Patch

diff --git a/arch/mips/boot/dts/realtek/cisco_sg220-26.dts b/arch/mips/boot/dts/realtek/cisco_sg220-26.dts
index 1cdbb09297ef..cb85d172a1d3 100644
--- a/arch/mips/boot/dts/realtek/cisco_sg220-26.dts
+++ b/arch/mips/boot/dts/realtek/cisco_sg220-26.dts
@@ -2,7 +2,6 @@ 
 
 /dts-v1/;
 
-#include "rtl83xx.dtsi"
 #include "rtl838x.dtsi"
 
 / {
diff --git a/arch/mips/boot/dts/realtek/rtl838x.dtsi b/arch/mips/boot/dts/realtek/rtl838x.dtsi
index d2c6baabb38c..907449094536 100644
--- a/arch/mips/boot/dts/realtek/rtl838x.dtsi
+++ b/arch/mips/boot/dts/realtek/rtl838x.dtsi
@@ -1,6 +1,14 @@ 
 // SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
 
 / {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+	};
+
 	cpus {
 		#address-cells = <1>;
 		#size-cells = <0>;
@@ -18,4 +26,52 @@  baseclk: baseclk {
 		#clock-cells = <0>;
 		clock-frequency = <500000000>;
 	};
+
+	cpuintc: cpuintc {
+		compatible = "mti,cpu-interrupt-controller";
+		#address-cells = <0>;
+		#interrupt-cells = <1>;
+		interrupt-controller;
+	};
+
+	soc@18000000 {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0x0 0x18000000 0x10000>;
+
+		uart0: serial@2000 {
+			compatible = "ns16550a";
+			reg = <0x2000 0x100>;
+
+			clock-frequency = <200000000>;
+
+			interrupt-parent = <&cpuintc>;
+			interrupts = <31>;
+
+			reg-io-width = <1>;
+			reg-shift = <2>;
+			fifo-size = <1>;
+			no-loopback-test;
+
+			status = "disabled";
+		};
+
+		uart1: serial@2100 {
+			compatible = "ns16550a";
+			reg = <0x2100 0x100>;
+
+			clock-frequency = <200000000>;
+
+			interrupt-parent = <&cpuintc>;
+			interrupts = <30>;
+
+			reg-io-width = <1>;
+			reg-shift = <2>;
+			fifo-size = <1>;
+			no-loopback-test;
+
+			status = "disabled";
+		};
+	};
 };
diff --git a/arch/mips/boot/dts/realtek/rtl83xx.dtsi b/arch/mips/boot/dts/realtek/rtl83xx.dtsi
deleted file mode 100644
index 1039cb50c7da..000000000000
--- a/arch/mips/boot/dts/realtek/rtl83xx.dtsi
+++ /dev/null
@@ -1,59 +0,0 @@ 
-// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
-
-/ {
-	#address-cells = <1>;
-	#size-cells = <1>;
-
-	aliases {
-		serial0 = &uart0;
-		serial1 = &uart1;
-	};
-
-	cpuintc: cpuintc {
-		compatible = "mti,cpu-interrupt-controller";
-		#address-cells = <0>;
-		#interrupt-cells = <1>;
-		interrupt-controller;
-	};
-
-	soc@18000000 {
-		compatible = "simple-bus";
-		#address-cells = <1>;
-		#size-cells = <1>;
-		ranges = <0x0 0x18000000 0x10000>;
-
-		uart0: serial@2000 {
-			compatible = "ns16550a";
-			reg = <0x2000 0x100>;
-
-			clock-frequency = <200000000>;
-
-			interrupt-parent = <&cpuintc>;
-			interrupts = <31>;
-
-			reg-io-width = <1>;
-			reg-shift = <2>;
-			fifo-size = <1>;
-			no-loopback-test;
-
-			status = "disabled";
-		};
-
-		uart1: serial@2100 {
-			compatible = "ns16550a";
-			reg = <0x2100 0x100>;
-
-			clock-frequency = <200000000>;
-
-			interrupt-parent = <&cpuintc>;
-			interrupts = <30>;
-
-			reg-io-width = <1>;
-			reg-shift = <2>;
-			fifo-size = <1>;
-			no-loopback-test;
-
-			status = "disabled";
-		};
-	};
-};