[U-Boot,2/6] arm: socfpga: fix device trees to work with DM serial

Message ID 20180809190420.28093-3-simon.k.r.goldschmidt@gmail.com
State Superseded
Delegated to: Marek Vasut
Headers show
Series
  • Get socfpga gen5 SPL working again.
Related show

Commit Message

Simon Goldschmidt Aug. 9, 2018, 7:04 p.m.
Device trees need to have the serial console device available
before relocation and require a stdout-path in chosen at least
for SPL to have a console.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
---
v2: no changes

 arch/arm/dts/socfpga.dtsi                      | 1 +
 arch/arm/dts/socfpga_arria5_socdk.dts          | 1 +
 arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts     | 1 +
 arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts | 1 +
 arch/arm/dts/socfpga_cyclone5_de10_nano.dts    | 1 +
 arch/arm/dts/socfpga_cyclone5_de1_soc.dts      | 1 +
 arch/arm/dts/socfpga_cyclone5_is1.dts          | 1 +
 arch/arm/dts/socfpga_cyclone5_socdk.dts        | 1 +
 arch/arm/dts/socfpga_cyclone5_sockit.dts       | 1 +
 arch/arm/dts/socfpga_cyclone5_socrates.dts     | 6 ++++++
 arch/arm/dts/socfpga_cyclone5_sr1500.dts       | 1 +
 arch/arm/dts/socfpga_cyclone5_vining_fpga.dts  | 1 +
 12 files changed, 17 insertions(+)

Comments

Marek Vasut Aug. 9, 2018, 9:43 p.m. | #1
On 08/09/2018 09:04 PM, Simon Goldschmidt wrote:
> Device trees need to have the serial console device available
> before relocation and require a stdout-path in chosen at least
> for SPL to have a console.
> 
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> ---
> v2: no changes
> 
>  arch/arm/dts/socfpga.dtsi                      | 1 +
>  arch/arm/dts/socfpga_arria5_socdk.dts          | 1 +
>  arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts     | 1 +
>  arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts | 1 +
>  arch/arm/dts/socfpga_cyclone5_de10_nano.dts    | 1 +
>  arch/arm/dts/socfpga_cyclone5_de1_soc.dts      | 1 +
>  arch/arm/dts/socfpga_cyclone5_is1.dts          | 1 +
>  arch/arm/dts/socfpga_cyclone5_socdk.dts        | 1 +
>  arch/arm/dts/socfpga_cyclone5_sockit.dts       | 1 +
>  arch/arm/dts/socfpga_cyclone5_socrates.dts     | 6 ++++++
>  arch/arm/dts/socfpga_cyclone5_sr1500.dts       | 1 +
>  arch/arm/dts/socfpga_cyclone5_vining_fpga.dts  | 1 +
>  12 files changed, 17 insertions(+)
> 
> diff --git a/arch/arm/dts/socfpga.dtsi b/arch/arm/dts/socfpga.dtsi
> index 314449478d..0e5445cd1b 100644
> --- a/arch/arm/dts/socfpga.dtsi
> +++ b/arch/arm/dts/socfpga.dtsi
> @@ -738,6 +738,7 @@
>  			reg-io-width = <4>;
>  			clocks = <&l4_sp_clk>;
>  			clock-frequency = <100000000>;
> +			u-boot,dm-pre-reloc;

This is board-specific, not all boards use uart0 .

>  		};
>  
>  		uart1: serial1@ffc03000 {
[...]

Patch

diff --git a/arch/arm/dts/socfpga.dtsi b/arch/arm/dts/socfpga.dtsi
index 314449478d..0e5445cd1b 100644
--- a/arch/arm/dts/socfpga.dtsi
+++ b/arch/arm/dts/socfpga.dtsi
@@ -738,6 +738,7 @@ 
 			reg-io-width = <4>;
 			clocks = <&l4_sp_clk>;
 			clock-frequency = <100000000>;
+			u-boot,dm-pre-reloc;
 		};
 
 		uart1: serial1@ffc03000 {
diff --git a/arch/arm/dts/socfpga_arria5_socdk.dts b/arch/arm/dts/socfpga_arria5_socdk.dts
index 449ba9cbb9..128f0c9762 100644
--- a/arch/arm/dts/socfpga_arria5_socdk.dts
+++ b/arch/arm/dts/socfpga_arria5_socdk.dts
@@ -11,6 +11,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	memory {
diff --git a/arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts b/arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts
index aeb327dd5b..8e01a27320 100644
--- a/arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts
+++ b/arch/arm/dts/socfpga_cyclone5_dbm_soc1.dts
@@ -11,6 +11,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	aliases {
diff --git a/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts b/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts
index f4a98e4bb0..16b86ce631 100644
--- a/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts
+++ b/arch/arm/dts/socfpga_cyclone5_de0_nano_soc.dts
@@ -11,6 +11,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	aliases {
diff --git a/arch/arm/dts/socfpga_cyclone5_de10_nano.dts b/arch/arm/dts/socfpga_cyclone5_de10_nano.dts
index 7da2d8b043..9d40ce912e 100644
--- a/arch/arm/dts/socfpga_cyclone5_de10_nano.dts
+++ b/arch/arm/dts/socfpga_cyclone5_de10_nano.dts
@@ -13,6 +13,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	aliases {
diff --git a/arch/arm/dts/socfpga_cyclone5_de1_soc.dts b/arch/arm/dts/socfpga_cyclone5_de1_soc.dts
index e6fadb4fc9..d7dd809162 100644
--- a/arch/arm/dts/socfpga_cyclone5_de1_soc.dts
+++ b/arch/arm/dts/socfpga_cyclone5_de1_soc.dts
@@ -11,6 +11,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	aliases {
diff --git a/arch/arm/dts/socfpga_cyclone5_is1.dts b/arch/arm/dts/socfpga_cyclone5_is1.dts
index aa1ce2c3e2..e6306fb285 100644
--- a/arch/arm/dts/socfpga_cyclone5_is1.dts
+++ b/arch/arm/dts/socfpga_cyclone5_is1.dts
@@ -11,6 +11,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	memory {
diff --git a/arch/arm/dts/socfpga_cyclone5_socdk.dts b/arch/arm/dts/socfpga_cyclone5_socdk.dts
index 55c70abb02..b24c39e1a3 100644
--- a/arch/arm/dts/socfpga_cyclone5_socdk.dts
+++ b/arch/arm/dts/socfpga_cyclone5_socdk.dts
@@ -11,6 +11,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	memory {
diff --git a/arch/arm/dts/socfpga_cyclone5_sockit.dts b/arch/arm/dts/socfpga_cyclone5_sockit.dts
index 08d8356d80..734e682ed2 100644
--- a/arch/arm/dts/socfpga_cyclone5_sockit.dts
+++ b/arch/arm/dts/socfpga_cyclone5_sockit.dts
@@ -11,6 +11,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	aliases {
diff --git a/arch/arm/dts/socfpga_cyclone5_socrates.dts b/arch/arm/dts/socfpga_cyclone5_socrates.dts
index 0d452ae300..7f9b48a839 100644
--- a/arch/arm/dts/socfpga_cyclone5_socrates.dts
+++ b/arch/arm/dts/socfpga_cyclone5_socrates.dts
@@ -11,6 +11,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	aliases {
@@ -84,3 +85,8 @@ 
 	disable-over-current;
 	status = "okay";
 };
+
+&uart0 {
+	u-boot,dm-pre-reloc;
+	status = "okay";
+};
diff --git a/arch/arm/dts/socfpga_cyclone5_sr1500.dts b/arch/arm/dts/socfpga_cyclone5_sr1500.dts
index 341df7a3e7..1993ea2e81 100644
--- a/arch/arm/dts/socfpga_cyclone5_sr1500.dts
+++ b/arch/arm/dts/socfpga_cyclone5_sr1500.dts
@@ -11,6 +11,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	aliases {
diff --git a/arch/arm/dts/socfpga_cyclone5_vining_fpga.dts b/arch/arm/dts/socfpga_cyclone5_vining_fpga.dts
index 7a032af3a4..27dd5e82d6 100644
--- a/arch/arm/dts/socfpga_cyclone5_vining_fpga.dts
+++ b/arch/arm/dts/socfpga_cyclone5_vining_fpga.dts
@@ -11,6 +11,7 @@ 
 
 	chosen {
 		bootargs = "console=ttyS0,115200";
+		stdout-path = "serial0:115200n8";
 	};
 
 	aliases {