Skip to contentSkip to conversation

Tacoma device tree fixes

PATCH In review Joel Stanley 3 participants 14 messages Oct 2, 2019 – Oct 3, 2019

Subsystems (2)
lore
Share & tools
lore

Joel Stanley

author maintainer
#0 lore raw

cover Tacoma device tree fixes

Here are some changes to the Tacoma device tree that enable the right bits and pieces to boot the host firmware.

They have been tested on a Tacoma system and Qemu, and checked against the Tacoma schematics that I have.

Please review closely.

Joel Stanley (4):
ARM: dts: aspeed-g6: Add VUART descriptions
ARM: dts: aspeed: tacoma: Enable VUART1
ARM: dts: tacoma: Remove incorrect i2c buses
ARM: dts: tacoma: Enable LPC Firmware region

 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 27 ++++++++++++---------
 arch/arm/boot/dts/aspeed-g6.dtsi            | 22 +++++++++++++++++
 2 files changed, 38 insertions(+), 11 deletions(-)
Signature · 1 line
2.23.0
author maintainer
#1 lore raw

PATCH 1/4 ARM: dts: aspeed-g6: Add VUART descriptions

The AST2600 has two VUART devices.

---
 arch/arm/boot/dts/aspeed-g6.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/boot/dts/aspeed-g6.dtsi +22 -0
index 5bea04b67b5c..2ad90a906266 100644
@@ -29,6 +29,8 @@
 		i2c14 = &i2c14;
 		i2c15 = &i2c15;
 		serial4 = &uart5;
+		serial5 = &vuart1;
+		serial6 = &vuart2;
 	};
 
 
@@ -475,6 +477,26 @@
 				};
 			};
 
+			vuart1: serial@1e787000 {
+				compatible = "aspeed,ast2500-vuart";
+				reg = <0x1e787000 0x40>;
+				reg-shift = <2>;
+				interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&syscon ASPEED_CLK_APB1>;
+				no-loopback-test;
+				status = "disabled";
+			};
+
+			vuart2: serial@1e788000 {
+				compatible = "aspeed,ast2500-vuart";
+				reg = <0x1e788000 0x40>;
+				reg-shift = <2>;
+				interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&syscon ASPEED_CLK_APB1>;
+				no-loopback-test;
+				status = "disabled";
+			};
+
 			i2c: bus@1e78a000 {
 				compatible = "simple-bus";
 				#address-cells = <1>;
Signature · 1 line
2.23.0
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH linux dev-5.3 1/4] ARM: dts: aspeed-g6: Add VUART descriptions

Quoted 1 line · Joel Stanley

The AST2600 has two VUART devices.

Quoted 46 lines
---
  arch/arm/boot/dts/aspeed-g6.dtsi | 22 ++++++++++++++++++++++
  1 file changed, 22 insertions(+)
arch/arm/boot/dts/aspeed-g6.dtsi +22 -0
index 5bea04b67b5c..2ad90a906266 100644
@@ -29,6 +29,8 @@
  		i2c14 = &i2c14;
  		i2c15 = &i2c15;
  		serial4 = &uart5;
+		serial5 = &vuart1;
+		serial6 = &vuart2;
  	};
 
 
@@ -475,6 +477,26 @@
  				};
  			};
 
+			vuart1: serial@1e787000 {
+				compatible = "aspeed,ast2500-vuart";
+				reg = <0x1e787000 0x40>;
+				reg-shift = <2>;
+				interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&syscon ASPEED_CLK_APB1>;
+				no-loopback-test;
+				status = "disabled";
+			};
+
+			vuart2: serial@1e788000 {
+				compatible = "aspeed,ast2500-vuart";
+				reg = <0x1e788000 0x40>;
+				reg-shift = <2>;
+				interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&syscon ASPEED_CLK_APB1>;
+				no-loopback-test;
+				status = "disabled";
+			};
+
  			i2c: bus@1e78a000 {
  				compatible = "simple-bus";
  				#address-cells = <1>;
Reviewed-by on v1 1/4
#3 lore raw

Re: [PATCH linux dev-5.3 1/4] ARM: dts: aspeed-g6: Add VUART descriptions

In reply to Joel Stanley
Quoted 21 lines · Joel Stanley

The AST2600 has two VUART devices.

---
 arch/arm/boot/dts/aspeed-g6.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
arch/arm/boot/dts/aspeed-g6.dtsi +2 -0
index 5bea04b67b5c..2ad90a906266 100644
@@ -29,6 +29,8 @@
 		i2c14 = &i2c14;
 		i2c15 = &i2c15;
 		serial4 = &uart5;
+		serial5 = &vuart1;
+		serial6 = &vuart2;
 	};
 
 

arch/arm/boot/dts/aspeed-g6.dtsi line 484

Quoted 8 lines
arch/arm/boot/dts/aspeed-g6.dtsi +5 -0
@@ -475,6 +477,26 @@
 				};
 			};
 
+			vuart1: serial@1e787000 {
+				compatible = "aspeed,ast2500-vuart";
+				reg = <0x1e787000 0x40>;
+				reg-shift = <2>;
+				interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;

For anyone playing along the IRQ isn't documented in current releases of the datasheet, but you can find it in the SDK devicetree:

https://github.com/AspeedTech-BMC/linux/blob/3f525e22080917f5569fb853f348f5ecb089a0d9/arch/arm/boot/dts/aspeed-g6.dtsi#L516

author maintainer
#4 lore raw

PATCH 2/4 ARM: dts: aspeed: tacoma: Enable VUART1

In reply to Joel Stanley

Like most OpenPower machines the VUART is expected to be at /dev/ttyS5 for communication with the host over LPC.

---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +4 -0
index 02e55c7102bd..183a8349e181 100644
@@ -459,3 +459,7 @@
 &ibt {
 	status = "okay";
 };
+
+&vuart1 {
+	status = "okay";
+};
Signature · 1 line
2.23.0
Reviewed-by on v1 2/4
#5 lore raw

Re: [PATCH linux dev-5.3 2/4] ARM: dts: aspeed: tacoma: Enable VUART1

Quoted 2 lines · Joel Stanley

Like most OpenPower machines the VUART is expected to be at /dev/ttyS5 for communication with the host over LPC.

Quoted 18 lines
---
  arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 4 ++++
  1 file changed, 4 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +4 -0
index 02e55c7102bd..183a8349e181 100644
@@ -459,3 +459,7 @@
  &ibt {
  	status = "okay";
  };
+
+&vuart1 {
+	status = "okay";
+};
author maintainer
#7 lore raw

PATCH 3/4 ARM: dts: tacoma: Remove incorrect i2c buses

In reply to Joel Stanley

When adding the Tacoma system a number of I2C buses were enabled that according to the schematics are either tied to ground (i2c8, i2c6) or used as GPIOs (i2c14, i2c15).

Fixes 4fde000c9b28 ("ARM: dts: aspeed: tacoma: Enable I2C busses")
---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 16 ----------------
 1 file changed, 16 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +0 -16
index 183a8349e181..02eeea6a9bd2 100644
@@ -298,18 +298,10 @@
 	};
 };
 
-&i2c6 {
-	status = "okay";
-};
-
 &i2c7 {
 	status = "okay";
 };
 
-&i2c8 {
-	status = "okay";
-};
-
 &i2c9 {
 	status = "okay";
 
@@ -448,14 +440,6 @@
 	status = "okay";
 };
 
-&i2c14 {
-	status = "okay";
-};
-
-&i2c15 {
-	status = "okay";
-};
-
 &ibt {
 	status = "okay";
 };
Signature · 1 line
2.23.0
Reviewed-by on v1 3/4
#8 lore raw

Re: [PATCH linux dev-5.3 3/4] ARM: dts: tacoma: Remove incorrect i2c buses

Quoted 3 lines · Joel Stanley

When adding the Tacoma system a number of I2C buses were enabled that according to the schematics are either tied to ground (i2c8, i2c6) or used as GPIOs (i2c14, i2c15).

Whoops, thanks!

Quoted 45 lines
Fixes 4fde000c9b28 ("ARM: dts: aspeed: tacoma: Enable I2C busses")
---
  arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 16 ----------------
  1 file changed, 16 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +0 -16
index 183a8349e181..02eeea6a9bd2 100644
@@ -298,18 +298,10 @@
  	};
  };
 
-&i2c6 {
-	status = "okay";
-};
-
  &i2c7 {
  	status = "okay";
  };
 
-&i2c8 {
-	status = "okay";
-};
-
  &i2c9 {
  	status = "okay";
 
@@ -448,14 +440,6 @@
  	status = "okay";
  };
 
-&i2c14 {
-	status = "okay";
-};
-
-&i2c15 {
-	status = "okay";
-};
-
  &ibt {
  	status = "okay";
  };
Reviewed-by on v1 3/4
#9 lore raw

Re: [PATCH linux dev-5.3 3/4] ARM: dts: tacoma: Remove incorrect i2c buses

In reply to Joel Stanley
Quoted 6 lines · Joel Stanley

When adding the Tacoma system a number of I2C buses were enabled that according to the schematics are either tied to ground (i2c8, i2c6) or used as GPIOs (i2c14, i2c15).

Fixes 4fde000c9b28 ("ARM: dts: aspeed: tacoma: Enable I2C busses")
author maintainer
#10 lore raw

PATCH 4/4 ARM: dts: tacoma: Enable LPC Firmware region

In reply to Joel Stanley

Required to provide the host firmware to on Tacoma.

---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +17 -0
index 02eeea6a9bd2..55d5227caf69 100644
@@ -22,6 +22,17 @@
 		device_type = "memory";
 		reg = <0x80000000 0x40000000>;
 	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		flash_memory: region@98000000 {
+			no-map;
+			reg = <0x98000000 0x2000000>; /* 32M */
+		};
+	};
 };
 
 &fmc {
@@ -447,3 +458,9 @@
 &vuart1 {
 	status = "okay";
 };
+
+&lpc_ctrl {
+	status = "okay";
+	memory-region = <&flash_memory>;
+	flash = <&spi1>;
+};
Signature · 1 line
2.23.0
Reviewed-by on v1 4/4
#11 lore raw

Re: [PATCH linux dev-5.3 4/4] ARM: dts: tacoma: Enable LPC Firmware region

Quoted 1 line · Joel Stanley

Required to provide the host firmware to on Tacoma.

Quoted 38 lines
---
  arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 17 +++++++++++++++++
  1 file changed, 17 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +17 -0
index 02eeea6a9bd2..55d5227caf69 100644
@@ -22,6 +22,17 @@
  		device_type = "memory";
  		reg = <0x80000000 0x40000000>;
  	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		flash_memory: region@98000000 {
+			no-map;
+			reg = <0x98000000 0x2000000>; /* 32M */
+		};
+	};
  };
 
  &fmc {
@@ -447,3 +458,9 @@
  &vuart1 {
  	status = "okay";
  };
+
+&lpc_ctrl {
+	status = "okay";
+	memory-region = <&flash_memory>;
+	flash = <&spi1>;
+};
#12 lore raw

Re: [PATCH linux dev-5.3 4/4] ARM: dts: tacoma: Enable LPC Firmware region

In reply to Joel Stanley
Quoted 15 lines · Joel Stanley

Required to provide the host firmware to on Tacoma.

---
 arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +0 -0
index 02eeea6a9bd2..55d5227caf69 100644
@@ -22,6 +22,17 @@
 		device_type = "memory";
 		reg = <0x80000000 0x40000000>;

arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts line 33

Quoted 10 lines
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +9 -0
 	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		flash_memory: region@98000000 {
+			no-map;
+			reg = <0x98000000 0x2000000>; /* 32M */

Should put this at 0xba000000 if we're going to use 32M, or if you want to use 64M like Rainier then 0xb8000000.

0x98000000 isn't wrong but it fragments the address space more than necessary.

Andrew

author maintainer
#13 lore raw

Re: [PATCH linux dev-5.3 4/4] ARM: dts: tacoma: Enable LPC Firmware region

Quoted 9 lines · Andrew Jeffery

arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts line 33

Quoted 3 lines
arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +3 -0
+             flash_memory: region@98000000 {
+                     no-map;
+                     reg = <0x98000000 0x2000000>; /* 32M */

Should put this at 0xba000000 if we're going to use 32M, or if you want to use 64M like Rainier then 0xb8000000.

0x98000000 isn't wrong but it fragments the address space more than necessary.

Good point. I'll move it to 0xba000000.

Thanks for the review.