Merge pull request #816 from 916BGAI/main

update nanocluster cm5 reset method
This commit is contained in:
Caize Wu
2025-06-04 14:47:01 +08:00
committed by GitHub
2 changed files with 36 additions and 8 deletions

View File

@@ -163,7 +163,7 @@ If you need to debug or control multiple slots simultaneously, we recommend usin
The reset pins for slots 1~7 are controlled by slot 1 through **I2C extended IO**, enabling remote power on/off functionality.
**LM3H Control Method Example:**
**Example: Reset Control Using LM3H:**
```bash
# Reset the switch chip (GPIO 0)
@@ -176,10 +176,24 @@ sudo gpioset gpiochip2 2=0 && sleep 8 && sudo gpioset gpiochip2 2=1
# Quick trigger to power on
sudo gpioset gpiochip2 2=0 && sleep 1 && sudo gpioset gpiochip2 2=1
# Reset slot2 (CM4/CM5)
sudo gpioset gpiochip2 2=0 && sudo gpioset gpiochip2 2=1
# Reset slot2 (CM4)
sudo gpioset gpiochip2 2=0 && sleep 1 && sudo gpioset gpiochip2 2=1
# Reset slot2 (CM5)
# Simulate power button press for CM5 using GPIO level changes to power on/off:
# - If the system is Raspberry Pi OS Lite (headless): one short press will shut down.
# - If the system is Raspberry Pi Desktop (with GUI): two short presses are required to shut down.
# Simulate two short presses (shutdown for Desktop systems)
sudo gpioset gpiochip2 2=0 && sleep 1 && sudo gpioset gpiochip2 2=1
sudo gpioset gpiochip2 2=0 && sleep 1 && sudo gpioset gpiochip2 2=1
# Simulate a single short press (power on)
sudo gpioset gpiochip2 2=0 && sleep 1 && sudo gpioset gpiochip2 2=1
```
>! **Known issue:** If you force a hard shutdown of the CM5 by long-pressing the button, the system cannot be started again with a short press. You must power cycle the device to restore normal operation.
> `gpiochip2` refers to the GPIO controller index. `x=0` sets the IO with index `x` to low level, while `x=1` sets it to high level.
| GPIO Index | Function |
@@ -187,7 +201,7 @@ sudo gpioset gpiochip2 2=0 && sudo gpioset gpiochip2 2=1
| 0 | Switch chip reset |
| 1~7 | slot1~slot7 reset |
**CM4/CM5 Control Method Example:**
**Example: Reset Control Using CM4/CM5:**
To enable I2C and load the PCA9557 driver on CM4 or CM5, you can control it in the same way:

View File

@@ -161,7 +161,7 @@ ssh sipeed@lpi3h-xxxx.local
slot1~7 的复位脚由 slot1 通过 **I2C 扩展的 IO** 进行控制,可实现远程开关机。
**LM3H 控制方法示例:**
**使用 LM3H 控制复位方法示例:**
```bash
# 复位交换机芯片GPIO 0
@@ -174,10 +174,24 @@ sudo gpioset gpiochip2 2=0 && sleep 8 && sudo gpioset gpiochip2 2=1
# 快速触发实现开机
sudo gpioset gpiochip2 2=0 && sleep 1 && sudo gpioset gpiochip2 2=1
# 复位 slot2CM4/CM5
sudo gpioset gpiochip2 2=0 && sudo gpioset gpiochip2 2=1
# 复位 slot2CM4
sudo gpioset gpiochip2 2=0 && sleep 1 && sudo gpioset gpiochip2 2=1
# 复位 slot2CM5
# 使用 GPIO 电平变化模拟按下 CM5 的电源按键,可实现开关机:
# - 若系统为 Raspberry Pi OS Lite无桌面短按一次即可关机。
# - 若系统为 Raspberry Pi Desktop有桌面需短按两次以触发关机。
# 模拟短按两次Desktop 系统关机)
sudo gpioset gpiochip2 2=0 && sleep 1 && sudo gpioset gpiochip2 2=1
sudo gpioset gpiochip2 2=0 && sleep 1 && sudo gpioset gpiochip2 2=1
# 模拟短按一次(开机)
sudo gpioset gpiochip2 2=0 && sleep 1 && sudo gpioset gpiochip2 2=1
```
>! 已知问题:若通过长按按键实现强制硬关机 CM5系统将无法通过短按方式启动需重新上电才能恢复。
> `gpiochip2` 表示 GPIO 控制器编号,后面的 `x=0` 表示将编号为 x 的 IO 设置为低电平,`x=1` 设置为高电平。
| GPIO 编号 | 对应功能 |
@@ -185,7 +199,7 @@ sudo gpioset gpiochip2 2=0 && sudo gpioset gpiochip2 2=1
| 0 | 交换机芯片复位 |
| 1~7 | slot1~slot7 复位 |
**CM4/CM5 控制方法示例:**
**使用 CM4/CM5 控制复位方法示例:**
在 CM4 或 CM5 上启用 I2C 并加载 PCA9557 驱动,即可使用相同方式控制: