Skip to contentSkip to conversation

Fix 'reset' for TI K3 AM64x and J721E/J7200 boards

PATCH In review Suman Anna 2 participants 5 messages May 14, 2021 – May 27, 2021

Subsystems (2)
lore
Share & tools
lore

Suman Anna

author
#0 lore raw

cover Fix 'reset' for TI K3 AM64x and J721E/J7200 boards

Hi Lokesh,

The following patches fix the 'reset' command functionality for various TI K3 SoCs. Patches are based on the latest master that includes the AM64x board support, commit ea184cbff99e ("Merge tag 'ti-v2021.07-rc3' of https://source.denx.de/u-boot/custodians/u-boot-ti").

The first patch is needed for J721E/J7200 SoCs with newer System
Firmwares (anything newer that 2020.04 SYSFW) and is backward
compatible. Without this, the 'reset' command throws the following warnings,
=> reset
resetting ...
ti-sci-sysreset sysreset-controller: ti_sci_sysreset_request: reboot_device failed (-19) ti-sci-sysreset sysreset-controller: ti_sci_sysreset_request: reboot_device failed (-19) ti-sci-sysreset sysreset-controller: ti_sci_sysreset_request: reboot_device failed (-19) System reset not supported on this platform
### ERROR ### Please RESET the board ###

The second and third patches add the required ti-sci sysreset nodes for the AM64x EVM and SK boards respectively. The required SYSRESET and SYSRESET_TI_SCI configs are already enabled in the am64x_evm_a53_defconfig.

regards
Suman

Dave Gerlach (1):
firmware: ti_sci: Update ti_sci_msg_req_reboot to include domain

Suman Anna (2):
arm: dts: k3-am642-evm: Add sysreset controller node
arm: dts: k3-am642-sk: Add sysreset controller node

 arch/arm/dts/k3-am642-evm-u-boot.dtsi | 4 ++++
 arch/arm/dts/k3-am642-sk-u-boot.dtsi  | 4 ++++
 drivers/firmware/ti_sci.c             | 1 +
 drivers/firmware/ti_sci.h             | 2 ++
 4 files changed, 11 insertions(+)
Signature · 1 line
2.30.1
author
#1 lore raw

PATCH 1/3 firmware: ti_sci: Update ti_sci_msg_req_reboot to include domain

From: Dave Gerlach <[email protected]>

The ti_sci_msg_req_reboot message payload has been extended to include a domain field, but for the purposes of u-boot this should be zero to reset the entire SoC as it did before. Include domain for completeness and set to zero to ensure proper operation.

---
 drivers/firmware/ti_sci.c | 1 +
 drivers/firmware/ti_sci.h | 2 ++
 2 files changed, 3 insertions(+)
drivers/firmware/ti_sci.c +1 -0
index 2aec2e34d303..4671a5e3a8a6 100644
@@ -1588,6 +1588,7 @@ static int ti_sci_cmd_core_reboot(const struct ti_sci_handle *handle)
 		dev_err(info->dev, "Message alloc failed(%d)\n", ret);
 		return ret;
 	}
+	req.domain = 0;
 
 	ret = ti_sci_do_xfer(info, xfer);
 	if (ret) {
drivers/firmware/ti_sci.h +2 -0
index eec488f06509..e4a087c2baf4 100644
@@ -137,12 +137,14 @@ struct ti_sci_msg_resp_version {
 /**
  * struct ti_sci_msg_req_reboot - Reboot the SoC
  * @hdr:	Generic Header
+ * @domain:	Domain to be reset, 0 for full SoC reboot.
  *
  * Request type is TI_SCI_MSG_SYS_RESET, responded with a generic
  * ACK/NACK message.
  */
 struct ti_sci_msg_req_reboot {
 	struct ti_sci_msg_hdr hdr;
+	u8 domain;
 } __packed;
 
 /**
Signature · 1 line
2.30.1
author
#2 lore raw

PATCH 2/3 arm: dts: k3-am642-evm: Add sysreset controller node

In reply to Suman Anna

The AM64x SoC uses a central Device Management and Security Controller (DMSC) processor that manages all the low-level device controls including the system-wide SoC reset. The system-wide reset is managed through the system reset driver.

Add a sysreset controller node as a child of the dmsc node to enable the "reset" command from U-Boot prompt for the K3 AM642 EVM.

---
 arch/arm/dts/k3-am642-evm-u-boot.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/k3-am642-evm-u-boot.dtsi +4 -0
index 9b0ba6b721b3..10dea7a1cc46 100644
@@ -60,6 +60,10 @@
 
 &dmsc {
 	u-boot,dm-spl;
+	k3_sysreset: sysreset-controller {
+		compatible = "ti,sci-sysreset";
+		u-boot,dm-spl;
+	};
 };
 
 &k3_pds {
Signature · 1 line
2.30.1
author
#3 lore raw

PATCH 3/3 arm: dts: k3-am642-sk: Add sysreset controller node

In reply to Suman Anna

The AM64x SoC uses a central Device Management and Security Controller (DMSC) processor that manages all the low-level device controls including the system-wide SoC reset. The system-wide reset is managed through the system reset driver.

Add a sysreset controller node as a child of the dmsc node to enable the "reset" command from U-Boot prompt for the K3 AM642 SK.

---
 arch/arm/dts/k3-am642-sk-u-boot.dtsi | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/k3-am642-sk-u-boot.dtsi +4 -0
index 4ac7f5db9135..35b49df85106 100644
@@ -60,6 +60,10 @@
 
 &dmsc {
 	u-boot,dm-spl;
+	k3_sysreset: sysreset-controller {
+		compatible = "ti,sci-sysreset";
+		u-boot,dm-spl;
+	};
 };
 
 &k3_pds {
Signature · 1 line
2.30.1
#4 lore raw
In reply to Suman Anna
Quoted 17 lines · Suman Anna

The following patches fix the 'reset' command functionality for various TI K3 SoCs. Patches are based on the latest master that includes the AM64x board support, commit ea184cbff99e ("Merge tag 'ti-v2021.07-rc3' of https://source.denx.de/u-boot/custodians/u-boot-ti").

The first patch is needed for J721E/J7200 SoCs with newer System
Firmwares (anything newer that 2020.04 SYSFW) and is backward
compatible. Without this, the 'reset' command throws the following warnings,
=> reset
resetting ...
ti-sci-sysreset sysreset-controller: ti_sci_sysreset_request: reboot_device failed (-19) ti-sci-sysreset sysreset-controller: ti_sci_sysreset_request: reboot_device failed (-19) ti-sci-sysreset sysreset-controller: ti_sci_sysreset_request: reboot_device failed (-19) System reset not supported on this platform
### ERROR ### Please RESET the board ###

Quoted 1 line

[...]

Applied to https://source.denx.de/u-boot/custodians/u-boot-ti.git for-rc, thanks! [1/3] firmware: ti_sci: Update ti_sci_msg_req_reboot to include domain

      https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/beed30583c
[2/3] arm: dts: k3-am642-evm: Add sysreset controller node
      https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/a97ee92e4a
[3/3] arm: dts: k3-am642-sk: Add sysreset controller node
      https://source.denx.de/u-boot/custodians/u-boot-ti/-/commit/7194a95d13

--
Thanks and Regards,
Lokesh