Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: 2.16.0-dev
# 7934b337 26-Oct-2023 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: power-ctrl: revise host power action

1. Newer versions of the managed system require extra delay between
`ac-on` and `on` action. Add 3 seconds delay after `ac-on` action to
avoid po

meta-bletchley: power-ctrl: revise host power action

1. Newer versions of the managed system require extra delay between
`ac-on` and `on` action. Add 3 seconds delay after `ac-on` action to
avoid power on failed.
2. When the host status is turned on and the `on` operation is called,
shows `already on` then return.
3. When the host status is turned off and the `off` operation is
called, shows `already off` then return.

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I7de0575e7869e0debd2aad17b793c223660020ba

show more ...


# 8f2d3f27 06-Jun-2023 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: power-ctrl: increase power off button delay to 10 seconds

In latest host OS version, it requires holding power button al least 10
seconds to perform force power off.

Increase the de

meta-bletchley: power-ctrl: increase power off button delay to 10 seconds

In latest host OS version, it requires holding power button al least 10
seconds to perform force power off.

Increase the delay time to meet requirements.

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I99a5e4117dcc1ce78c886f7170b8c2a1f984b8e4

show more ...


Revision tags: 2.14.0, 2.14.0-rc1, 2.15.0-dev
# d2e7f202 23-Feb-2023 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: use gpiomon instead of polling gpio value

Remove gpio polling of switch detect pin in power-ctrl and motor-init.
Use gpiomon and timeout commands instead to improve performance and
t

meta-bletchley: use gpiomon instead of polling gpio value

Remove gpio polling of switch detect pin in power-ctrl and motor-init.
Use gpiomon and timeout commands instead to improve performance and
timing issue.

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I9e1eb26b070a57f424b341890733dc63c170bf79

show more ...


Revision tags: 2.13.0
# 6a0b3d3b 14-Nov-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: use BootMode property to select host boot mode.

Use BootMode to decide whether host should boot to Normal, Recovery
or DFU mode.

- xyz.openbmc_project.Control.Boot.Mode.Modes.Regula

meta-bletchley: use BootMode property to select host boot mode.

Use BootMode to decide whether host should boot to Normal, Recovery
or DFU mode.

- xyz.openbmc_project.Control.Boot.Mode.Modes.Regular: Normal mode
- xyz.openbmc_project.Control.Boot.Mode.Modes.Safe: Recovery mode
- xyz.openbmc_project.Control.Boot.Mode.Modes.Setup: DFU mode

Tested results:
- Host normal on (xyz.openbmc_project.Control.Boot.Mode.Modes.Regular)
root@bletchley:~# busctl set-property xyz.openbmc_project.Settings \
> /xyz/openbmc_project/control/host6/boot \
> xyz.openbmc_project.Control.Boot.Mode BootMode s \
> xyz.openbmc_project.Control.Boot.Mode.Modes.Regular
root@bletchley:~# obmcutil -i=6 poweron
root@bletchley:~# power-ctrl sled6 status
On

- Host boot recovery (xyz.openbmc_project.Control.Boot.Mode.Modes.Safe)
root@bletchley:~# busctl set-property xyz.openbmc_project.Settings \
> /xyz/openbmc_project/control/host6/boot \
> xyz.openbmc_project.Control.Boot.Mode BootMode s \
> xyz.openbmc_project.Control.Boot.Mode.Modes.Safe
root@bletchley:~# obmcutil -i=6 poweron
root@bletchley:~# power-ctrl sled6 status
Recovery

- Host boot DFU (xyz.openbmc_project.Control.Boot.Mode.Modes.Setup)
root@bletchley:~# busctl set-property xyz.openbmc_project.Settings \
> /xyz/openbmc_project/control/host6/boot \
> xyz.openbmc_project.Control.Boot.Mode BootMode s \
> xyz.openbmc_project.Control.Boot.Mode.Modes.Setup
root@bletchley:~# obmcutil -i=6 poweron
root@bletchley:~# power-ctrl sled6 status
DFU

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I1eac8fb74f3702d9ce0ab9180b9d7e2e26df81f7

show more ...


Revision tags: 2.14.0-dev, 2.12.0
# b8f52ae4 19-Sep-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: use mdio-tools instead mdio-util

Introduce mdio-tools package to replace mdio-util script.

This commit relies on the linux kernel patch below.
LINK: https://lore.kernel.org/all/2022

meta-bletchley: use mdio-tools instead mdio-util

Introduce mdio-tools package to replace mdio-util script.

This commit relies on the linux kernel patch below.
LINK: https://lore.kernel.org/all/20221025055046.1704920-1-potin.lai.pt@gmail.com/

Tested Result:
Check host status by power-ctrl which will call mdio internally.
root@bletchley:~# power-ctrl sled6 status
On

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I482dde297acb7797896d9b7ae07580104fb21540

show more ...


# aafe1878 19-Aug-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: power-ctrl: add delay in do_action_on()

In Bletchley, we check host link status from switch to identify the
host power state. During the power on process, the host (MAC mini)
need so

meta-bletchley: power-ctrl: add delay in do_action_on()

In Bletchley, we check host link status from switch to identify the
host power state. During the power on process, the host (MAC mini)
need some extra times to stable link status.

Add extra 10 seconeds delay into do_action_on() to avoid get wrong
host power state during stress testing of host power on/off.

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Ica628df42e29912029b44675aacdf555263cb6fa

show more ...


Revision tags: 2.12.0-rc1
# 2320b0e0 27-Jun-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: power-ctrl: add host cycle and reset actions

Add host power cycle and power reset actions

Cycle Action includes following steps:
- 1. AC Off
- 2. AC On
- 3. Power On

Reset Actio

meta-bletchley: power-ctrl: add host cycle and reset actions

Add host power cycle and power reset actions

Cycle Action includes following steps:
- 1. AC Off
- 2. AC On
- 3. Power On

Reset Action includes following steps:
- 1. Power Off
- 2. Power On

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I17341ec30776413d428f35498d70534901d250b1

show more ...


# a8d258f6 14-Jun-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: motor-ctrl: fix host-ac-on failed during bmc boot

1. add service dependency to avoid host-ac-on service failed due to
inventory (presence_sledX) property not avaliable.

host-ac-on@X

meta-bletchley: motor-ctrl: fix host-ac-on failed during bmc boot

1. add service dependency to avoid host-ac-on service failed due to
inventory (presence_sledX) property not avaliable.

host-ac-on@X.service
|- motor-init-calibration@X.service (Requires, After)
|- phosphor-gpio-presence@presence-sledX.service (Requires, After)

2. simplify check method for ac-on & ac-off actions, just check host
ac status before set ac on/off.

3. fix host-ac-on service shows failed when ac is aready turned on
(ex: BMC reset), return 0 for both ac-on & ac-off actions no
matter GPIO (power-hostX) set required or not.

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I2c878dea05ea2511e6564c0980ba34dc28a46e2c

show more ...


# 501f4c78 13-Jun-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: introduce Bletchley common functions

Add a common functions script for reusing the functions which are
called frequently.

This patch depends on the patchs below:
* https://lore.kern

meta-bletchley: introduce Bletchley common functions

Add a common functions script for reusing the functions which are
called frequently.

This patch depends on the patchs below:
* https://lore.kernel.org/all/20220613095150.21917-4-potin.lai.pt@gmail.com/

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I6e1602b00f1b0a19e77506be6eabe18c796e52fe

show more ...


# 27083c31 02-Jun-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: power-ctrl: action handler for each host state

1. add action handler for each host state, avoid action execute in the
wrong host state.
2. add checking for Host in sleep mode
3. add

meta-bletchley: power-ctrl: action handler for each host state

1. add action handler for each host state, avoid action execute in the
wrong host state.
2. add checking for Host in sleep mode
3. add last action record at /tmp/sledX-last-action for identify DFU
and Recovery mode.

```
if (last_action == dfu) && (host_st == Off)
host_st = DFU

if (last_action == recovery) && (host_st == On)
host_st = Recovery
```

Change-Id: I4c9c218fbe3f887c8bfe5cdcb64600261d67e30d
Signed-off-by: Potin Lai <potin.lai@quantatw.com>

show more ...


# 799780e7 13-May-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: power-ctrl: fix host status checking in recovery mode

recovery mode only can be triggered when host status is Off
fix the wrong host power status checking when recovery mode triggere

meta-bletchley: power-ctrl: fix host status checking in recovery mode

recovery mode only can be triggered when host status is Off
fix the wrong host power status checking when recovery mode triggered

Tested:

[Host status is On]
root@bletchley:~# power-ctrl sled6 status
On
root@bletchley:~# power-ctrl sled6 recovery
Please turn off host before trigger recovery mode

[Host status is Off]
root@bletchley:~# power-ctrl sled6 status
Off
root@bletchley:~# power-ctrl sled6 recovery
Set host6 Recovery mode
SLED6: pressing power button
Motor go forward to press Power button
Power button switch triggered
SLED6: releasing host power button
Motor reverse to initial position successful

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I40f57bd52d896d8e27d1ccec2e1c388986d28810

show more ...


Revision tags: 2.13.0-dev
# 035ff465 28-Apr-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: power-ctrl: add host recovery mode

Add command to trigger host recovery mode

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I1067c347b975ef531a58e6022e3ef4d9f3eee67a


# bb91c1b9 28-Apr-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: power-ctrl: add board revision check

1. Add function for checking board revision
2. Because mdio not available at EVT, If it is EVT board, just check
host status by dbus command.

Si

meta-bletchley: power-ctrl: add board revision check

1. Add function for checking board revision
2. Because mdio not available at EVT, If it is EVT board, just check
host status by dbus command.

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I87d2b7b01ae9912ed9b4da7a4f0b3bb485c6029b

show more ...


# dc251664 31-Mar-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: motor-ctrl: add host status checking

Use mdio-util command to communicate with switch phy, and get port link
status represent for host status.

This feature is not support with EVT s

meta-bletchley: motor-ctrl: add host status checking

Use mdio-util command to communicate with switch phy, and get port link
status represent for host status.

This feature is not support with EVT system due to MDIO0 is not connected.

Tested on reworked EVT HW:

root@bletchley:~# power-ctrl sled6 off
Power off sled6
Motor go forward to press Power key
Power key switch triggered
Press power key for Sled6 5 seconds...
Motor reverse to initial position successful
root@bletchley:~# power-ctrl sled6 status
Off

root@bletchley:~# power-ctrl sled6 on
Power on sled6
Motor go forward to press Power key
Power key switch triggered
Press power key for Sled6 0.5 seconds...
Motor reverse to initial position successful
root@bletchley:~# power-ctrl sled6 status
On

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I523013447da9ed210499f5dca960f708292a4b33

show more ...


# 787c9c6b 02-Mar-2022 Allen.Wang <Allen_Wang@quantatw.com>

meta-bletchley: motor-ctrl:check ac status before on/off and refine dfu cmd

a)
Block power on/off cmd if ac-relay is off.

b)
From official User Guide, to enter DFU mode must disconnect
the Host fro

meta-bletchley: motor-ctrl:check ac status before on/off and refine dfu cmd

a)
Block power on/off cmd if ac-relay is off.

b)
From official User Guide, to enter DFU mode must disconnect
the Host from power for at least 10 seconds, but power from
ac relay board maybe not be disappear immediately while pull
ac-relay control gpio to low.

Base on experiment result, expand wait time to 25 sec for
workaround.

Example:
a) When sled2 is ac-off
root@bletchley:/# power-ctrl sled2 on
sled2 is ac-off, please turn on ac before power on
root@bletchley:/# power-ctrl sled2 off
sled2 is already ac-off

b)
Tested 10 times into dfu mode successfully
root@bletchley:/# power-ctrl sled2 dfu
Set host2 DFU mode
SLED2: turn ac-off
set_gpio: set power-host2 = 0 success
SLED2: pressing power button
Motor go forward to press Power button
Power button switch triggered
SLED2: turn ac-on
set_gpio: set power-host2 = 1 success
SLED2: releasing host power button
Motor reverse to initial position successful

Change-Id: Idb006ed1c58fd1736fc9410ca86d86a6ec87a6b9
Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>

show more ...


Revision tags: 2.11.0
# db5648e6 15-Feb-2022 Potin Lai <potin.lai@quantatw.com>

meta-bletchley: motor-ctrl: add support to trigger host DFU mode

Add command to perform the steps below to trigger DFU mode on host

1. turn off host ac
2. press power button and wait at least 10 se

meta-bletchley: motor-ctrl: add support to trigger host DFU mode

Add command to perform the steps below to trigger DFU mode on host

1. turn off host ac
2. press power button and wait at least 10 seconds
3. turn on host ac, and keep hold power button for 3 seconds
4. release host power button

Example:

root@bletchley:~# power-ctrl sled3 dfu
Set host3 DFU mode
SLED3: turn ac-off
set_gpio: set power-host3 = 0 success
SLED3: pressing power button
Motor go forward to press Power button
Power button switch triggered
SLED3: turn ac-on
set_gpio: set power-host3 = 1 success
SLED3: releasing host power button
Motor reverse to initial position successful

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I055b862ad5a1302050d5df1505a3470858c6ec58

show more ...


# 5ff992ef 04-Jan-2022 Allen.Wang <Allen_Wang@quantatw.com>

meta-bletchley: motor-ctrl: Change sled numbering to 1-based

switch sled to 1-based numbering to align with multi host systems
tools only accept input sled1 to sled6

Change-Id: Ic372e011716d8de7edf

meta-bletchley: motor-ctrl: Change sled numbering to 1-based

switch sled to 1-based numbering to align with multi host systems
tools only accept input sled1 to sled6

Change-Id: Ic372e011716d8de7edf2eebdf8667e44b2179e64
Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>

show more ...


# 6af0dff7 28-Dec-2021 Allen.Wang <Allen_Wang@quantatw.com>

meta-bletchley: motor-ctrl: enable motor by pwm and gpio driver

1.enable bmc pwm output by sysfs
2.control motor vref by libgpiod-tools
3.Correct typo and formating

Change-Id: Ie0a57a12e328913f007c

meta-bletchley: motor-ctrl: enable motor by pwm and gpio driver

1.enable bmc pwm output by sysfs
2.control motor vref by libgpiod-tools
3.Correct typo and formating

Change-Id: Ie0a57a12e328913f007cb2014d4205ded99c91b3
Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>

show more ...


# 4a0948d0 14-Dec-2021 Allen.Wang <Allen_Wang@quantatw.com>

meta-bletchley: Add services to control step motor

For Bletchley platform, we can only power on system by step motor to press power key.
Add tools and service to initialize step motor and control sy

meta-bletchley: Add services to control step motor

For Bletchley platform, we can only power on system by step motor to press power key.
Add tools and service to initialize step motor and control system power
by motor.

Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>
Change-Id: Ic75352a037566d701b2e362743c527c370b0c2e5
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...