Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I7b26c6ed3bebe259eeb2787420b682273a168082
|
|
Add silent option to elimiate event log messages from gpiomon command.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I15726bdeb510b7b7771a040656a41d84aae64d7f
|
|
phosphor-state-manager
Move chassis and host power control services as part of PSM package to
align with other platforms in meta-facebook.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I6e6afc0ad62d3b872b330202a4696b704d245911
|
|
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
|
|
There is not much value in the mapper-wait invocations since the
providing service is well-known. Wait directly on the service.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9be5922229778faedf3cd6b85fba928866583672
|
|
phosphor-virtual-sensors now supports loading the config json from a
`/var/lib` as high precedence over `/usr/share` and since `/var` is a
writable file system, we should prefer this location for adding the
config symlink.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Idfddd091e126b812ac68bbd06acc626ee137e437
|
|
We need to apply power restore policy when host ac from off to on.
Add post command in host-ac-on@.service to restart
phosphor-discover-system-state@.service.
Tested results:
```
root@bletchley:~# busctl set-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host6/power_restore_policy xyz.openbmc_project.Control.Power.RestorePolicy PowerRestorePolicy s xyz.openbmc_project.Control.Power.RestorePolicy.Policy.AlwaysOn
root@bletchley:~# busctl get-property xyz.openbmc_project.Settings /xyz/openbmc_project/control/host6/power_restore_policy xyz.openbmc_project.Control.Power.RestorePolicy PowerRestorePolicy
s "xyz.openbmc_project.Control.Power.RestorePolicy.Policy.AlwaysOn"
root@bletchley:~# obmcutil -i=6 chassisoff
root@bletchley:~# obmcutil -i=6 state
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off
BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive
root@bletchley:~# obmcutil -i=6 chassison
root@bletchley:~# obmcutil -i=6 state
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.On
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running
BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive
```
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I57dd159725dd75da651beec2c72410c187f9fc17
|
|
There is a issue caused by switching USBMUX GPIO pin slowly.
For example, when user set USBMUX GPIO pin to sled1, the USBMUX will
first switch to sled3 and then switch to sled1 if there is a long
interval between each gpioset command.
1. USBMUX is set to off initially
USB2_SEL0_A = 1
USB2_SEL1_A = 1
USB2_SEL0_B = 1
USB2_SEL1_B = 1
2. Set USBMUX to sled1
USB2_SEL0_A = 0
USB2_SEL1_A = 0
USB2_SEL0_B = 1
USB2_SEL1_B = 1
```
root@bletchley:~# gpioset $(gpiofind USB2_SEL0_A)=0 --> USBMUX set to sled3 first.
root@bletchley:~# gpioset $(gpiofind USB2_SEL1_A)=0 --> then USBMUX set to sled1.
```
Add bletchley-usbmux-util to set USBMUX GPIO pins to selected sled, and
avoid USB issues with slow mux switching.
Change-Id: Id2a40b5908c1286929648cc433cb426a9c493e3a
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
|
|
Add updating correct frontpanel board model, so EM can probe with
correct configuration.
Tested:
- Main source: "Bletchley_FPB_HDC1080"
```
root@bletchley:~# busctl get-property xyz.openbmc_project.Settings \
> /xyz/openbmc_project/inventory/system/chassis/frontpanel \
> xyz.openbmc_project.Inventory.Decorator.Asset Model
s "Bletchley_FPB_HDC1080"
```
- 2nd source: "Bletchley_FPB_SI7021"
```
root@bletchley:~# busctl get-property xyz.openbmc_project.Settings \
> /xyz/openbmc_project/inventory/system/chassis/frontpanel \
> xyz.openbmc_project.Inventory.Decorator.Asset Model
s "Bletchley_FPB_SI7021"
```
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I22b2641d72f5a6dc0674704b5959019e990c5eae
|
|
LED behaviors are implemented in bletchley-host-state-monitor, remove
LED dependency from host-poweron and host-poweroff service.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Ifdf4c0c588b5a3e1403e928b772a5c3fa3d5fc29
|
|
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
|
|
We notice the motor-init-calibration service spend more than 20 seconds
for one run, which doesn't match the stop conditions with current
service setting(more than 5 runs in 90 sec).
Becaused motor-init-calibration services keep restart, it caused BMC
CPU remain high utilization and trigger reboot action by
phosphor-health-monitor.
Reduce StartLimitBurst to 2 to ensure the service stops after attempt 2
failed.
Tested results:
root@bletchley:~# journalctl -u motor-init-calibration@6.service | grep systemd
Nov 16 22:18:00 bletchley systemd[1]: Starting Motor Initialize for sled6...
Nov 16 22:18:25 bletchley systemd[1]: motor-init-calibration@6.service: Main process exited, code=exited, status=1/FAILURE
Nov 16 22:18:26 bletchley systemd[1]: motor-init-calibration@6.service: Failed with result 'exit-code'.
Nov 16 22:18:26 bletchley systemd[1]: Failed to start Motor Initialize for sled6.
Nov 16 22:18:27 bletchley systemd[1]: motor-init-calibration@6.service: Scheduled restart job, restart counter is at 1.
Nov 16 22:18:27 bletchley systemd[1]: Stopped Motor Initialize for sled6.
Nov 16 22:18:27 bletchley systemd[1]: Starting Motor Initialize for sled6...
Nov 16 22:18:46 bletchley systemd[1]: motor-init-calibration@6.service: Main process exited, code=exited, status=1/FAILURE
Nov 16 22:18:46 bletchley systemd[1]: motor-init-calibration@6.service: Failed with result 'exit-code'.
Nov 16 22:18:46 bletchley systemd[1]: Failed to start Motor Initialize for sled6.
Nov 16 22:18:47 bletchley systemd[1]: motor-init-calibration@6.service: Scheduled restart job, restart counter is at 2.
Nov 16 22:18:47 bletchley systemd[1]: Stopped Motor Initialize for sled6.
Nov 16 22:18:47 bletchley systemd[1]: motor-init-calibration@6.service: Start request repeated too quickly.
Nov 16 22:18:47 bletchley systemd[1]: motor-init-calibration@6.service: Failed with result 'exit-code'.
Nov 16 22:18:47 bletchley systemd[1]: Failed to start Motor Initialize for sled6.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I45c423deceb3cedd9157a479e0f33f9dbf270b8f
|
|
The targets are within the phosphor-state-manager repository so the
relationship between them should be defined within the corresponding
recipe.
Adding these to phosphor-state-manager also allows us to remove the
duplicate logic in the bletchley layer.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I8bc789ed25a937ed38840e398dd728782f8f368b
|
|
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
|
|
Add a service for monitoring host power state by query port status via
mdio bus.
Test Results:
- Poweron SLED6
root@bletchley:~# obmcutil -i=6 poweron
root@bletchley:~# obmcutil -i=6 state
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.On
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running
BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive
root@bletchley:~# journalctl -u bletchley-host-state-monitor
...
Oct 24 07:55:17 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 5
Oct 24 07:55:18 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 4
Oct 24 07:55:22 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 5
Oct 24 07:55:23 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 4
Oct 24 07:55:27 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 5
Oct 24 07:55:29 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 4
Oct 24 07:55:30 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 3
Oct 24 07:55:31 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 2
Oct 24 07:55:33 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 1
Oct 24 07:55:34 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed, update host state to ON
- Poweroff SLED6
root@bletchley:~# obmcutil -i=6 poweroff
root@bletchley:~# obmcutil -i=6 state
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off
BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive
root@bletchley:~# journalctl -u bletchley-host-state-monitor
Oct 21 09:38:21 bletchley systemd[1]: Started Bletchley host state monitoring.
...
Oct 24 07:55:17 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 5
Oct 24 07:55:18 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 4
Oct 24 07:55:22 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 5
Oct 24 07:55:23 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 4
Oct 24 07:55:27 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 5
Oct 24 07:55:29 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 4
Oct 24 07:55:30 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 3
Oct 24 07:55:31 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 2
Oct 24 07:55:33 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:OFF, current:ON), check count: 1
Oct 24 07:55:34 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed, update host state to ON
Oct 24 08:03:38 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:ON, current:OFF), check count: 5
Oct 24 08:03:39 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:ON, current:OFF), check count: 4
Oct 24 08:03:40 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:ON, current:OFF), check count: 3
Oct 24 08:03:42 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:ON, current:OFF), check count: 2
Oct 24 08:03:43 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed (previous:ON, current:OFF), check count: 1
Oct 24 08:03:44 bletchley bletchley-host-state-monitor[905]: SLED6: detected state changed, update host state to OFF
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I5916cd411c0d7d625b54f74c888aa380e00a1853
|
|
Add a switch diagnostics script to dump port register via mdio bus.
Tested:
root@bletchley:~# /usr/libexec/bletchley-switch-diag
========================================
Port 10 (BMC)
****************************************
[00]: 0E07 (Port Status)
[01]: 0003 (Physical Control)
[02]: 0000 (Flow Control)
[03]: 1920 (Switch Identifier)
[04]: 007F (Port Control 0)
[05]: 0000 (Port Control 1)
[06]: 07FE (Port Based VLAN Map)
[07]: 0001 (Default VLAN ID & Priority)
[08]: 2080 (Port Control 2)
[09]: 0001 (Egress Rate Control)
[0A]: 8000 (Egress Rate Control 2)
[0B]: 0001 (Port Association Vector)
[0C]: 0000 (Port ATU Control)
[0D]: 0000 (Override)
[0E]: 0000 (Policy & MGMT Control)
[10]: 0000 (Extended Port Control Operation)
[11]: 0000 (Extended Port Control Data)
[16]: 0000 (LED Control)
[17]: 0000 (IP Priority Mapping Table)
[18]: 0000 (IEEE Priority Mapping Table)
[19]: 0000 (Port Control 3)
[1B]: 8000 (Queue Counters)
[1C]: 0000 (Queue Control)
[1D]: 0000 (Queue Control 2)
[1E]: 0000 (Enable & Cut Through)
[1F]: 001B (Debug Counters)
========================================
========================================
Port 3 (SLED1)
****************************************
[00]: 100F (Port Status)
[01]: 0003 (Physical Control)
[02]: 0000 (Flow Control)
[03]: 1920 (Switch Identifier)
[04]: 007F (Port Control 0)
[05]: 0000 (Port Control 1)
[06]: 07FD (Port Based VLAN Map)
[07]: 0001 (Default VLAN ID & Priority)
[08]: 2080 (Port Control 2)
[09]: 0001 (Egress Rate Control)
[0A]: 8000 (Egress Rate Control 2)
[0B]: 0002 (Port Association Vector)
[0C]: 0000 (Port ATU Control)
[0D]: 0000 (Override)
[0E]: 0000 (Policy & MGMT Control)
[10]: 0000 (Extended Port Control Operation)
[11]: 0000 (Extended Port Control Data)
[16]: 0033 (LED Control)
[17]: 0000 (IP Priority Mapping Table)
[18]: 0000 (IEEE Priority Mapping Table)
[19]: 0000 (Port Control 3)
[1B]: 8000 (Queue Counters)
[1C]: 0000 (Queue Control)
[1D]: 0000 (Queue Control 2)
[1E]: 0000 (Enable & Cut Through)
[1F]: 0000 (Debug Counters)
========================================
========================================
Port 2 (SLED2)
****************************************
[00]: 100F (Port Status)
[01]: 0003 (Physical Control)
[02]: 0000 (Flow Control)
[03]: 1920 (Switch Identifier)
[04]: 007F (Port Control 0)
[05]: 0000 (Port Control 1)
[06]: 07FB (Port Based VLAN Map)
[07]: 0001 (Default VLAN ID & Priority)
[08]: 2080 (Port Control 2)
[09]: 0001 (Egress Rate Control)
[0A]: 8000 (Egress Rate Control 2)
[0B]: 0004 (Port Association Vector)
[0C]: 0000 (Port ATU Control)
[0D]: 0000 (Override)
[0E]: 0000 (Policy & MGMT Control)
[10]: 0000 (Extended Port Control Operation)
[11]: 0000 (Extended Port Control Data)
[16]: 0033 (LED Control)
[17]: 0000 (IP Priority Mapping Table)
[18]: 0000 (IEEE Priority Mapping Table)
[19]: 0000 (Port Control 3)
[1B]: 8000 (Queue Counters)
[1C]: 0000 (Queue Control)
[1D]: 0000 (Queue Control 2)
[1E]: 0000 (Enable & Cut Through)
[1F]: 0000 (Debug Counters)
========================================
========================================
Port 1 (SLED3)
****************************************
[00]: 100F (Port Status)
[01]: 0003 (Physical Control)
[02]: 0000 (Flow Control)
[03]: 1920 (Switch Identifier)
[04]: 007F (Port Control 0)
[05]: 0000 (Port Control 1)
[06]: 07F7 (Port Based VLAN Map)
[07]: 0001 (Default VLAN ID & Priority)
[08]: 2080 (Port Control 2)
[09]: 0001 (Egress Rate Control)
[0A]: 8000 (Egress Rate Control 2)
[0B]: 0008 (Port Association Vector)
[0C]: 0000 (Port ATU Control)
[0D]: 0000 (Override)
[0E]: 0000 (Policy & MGMT Control)
[10]: 0000 (Extended Port Control Operation)
[11]: 0000 (Extended Port Control Data)
[16]: 0033 (LED Control)
[17]: 0000 (IP Priority Mapping Table)
[18]: 0000 (IEEE Priority Mapping Table)
[19]: 0000 (Port Control 3)
[1B]: 8000 (Queue Counters)
[1C]: 0000 (Queue Control)
[1D]: 0000 (Queue Control 2)
[1E]: 0000 (Enable & Cut Through)
[1F]: 0000 (Debug Counters)
========================================
========================================
Port 7 (SLED4)
****************************************
[00]: 100F (Port Status)
[01]: 0003 (Physical Control)
[02]: 0000 (Flow Control)
[03]: 1920 (Switch Identifier)
[04]: 007F (Port Control 0)
[05]: 0000 (Port Control 1)
[06]: 07EF (Port Based VLAN Map)
[07]: 0001 (Default VLAN ID & Priority)
[08]: 2080 (Port Control 2)
[09]: 0001 (Egress Rate Control)
[0A]: 8000 (Egress Rate Control 2)
[0B]: 0010 (Port Association Vector)
[0C]: 0000 (Port ATU Control)
[0D]: 0000 (Override)
[0E]: 0000 (Policy & MGMT Control)
[10]: 0000 (Extended Port Control Operation)
[11]: 0000 (Extended Port Control Data)
[16]: 0033 (LED Control)
[17]: 0000 (IP Priority Mapping Table)
[18]: 0000 (IEEE Priority Mapping Table)
[19]: 0000 (Port Control 3)
[1B]: 8000 (Queue Counters)
[1C]: 0000 (Queue Control)
[1D]: 0000 (Queue Control 2)
[1E]: 0000 (Enable & Cut Through)
[1F]: 0000 (Debug Counters)
========================================
========================================
Port 6 (SLED5)
****************************************
[00]: 1D4F (Port Status)
[01]: 0003 (Physical Control)
[02]: 0000 (Flow Control)
[03]: 1920 (Switch Identifier)
[04]: 007F (Port Control 0)
[05]: 0000 (Port Control 1)
[06]: 07DF (Port Based VLAN Map)
[07]: 0001 (Default VLAN ID & Priority)
[08]: 2080 (Port Control 2)
[09]: 0001 (Egress Rate Control)
[0A]: 8000 (Egress Rate Control 2)
[0B]: 0020 (Port Association Vector)
[0C]: 0000 (Port ATU Control)
[0D]: 0000 (Override)
[0E]: 0000 (Policy & MGMT Control)
[10]: 0000 (Extended Port Control Operation)
[11]: 0000 (Extended Port Control Data)
[16]: 0033 (LED Control)
[17]: 0000 (IP Priority Mapping Table)
[18]: 0000 (IEEE Priority Mapping Table)
[19]: 0000 (Port Control 3)
[1B]: 8000 (Queue Counters)
[1C]: 0000 (Queue Control)
[1D]: 0000 (Queue Control 2)
[1E]: 0000 (Enable & Cut Through)
[1F]: 0075 (Debug Counters)
========================================
========================================
Port 5 (SLED6)
****************************************
[00]: 1D4F (Port Status)
[01]: 0003 (Physical Control)
[02]: 0000 (Flow Control)
[03]: 1920 (Switch Identifier)
[04]: 007F (Port Control 0)
[05]: 0000 (Port Control 1)
[06]: 07BF (Port Based VLAN Map)
[07]: 0001 (Default VLAN ID & Priority)
[08]: 2080 (Port Control 2)
[09]: 0001 (Egress Rate Control)
[0A]: 8000 (Egress Rate Control 2)
[0B]: 0040 (Port Association Vector)
[0C]: 0000 (Port ATU Control)
[0D]: 0000 (Override)
[0E]: 0000 (Policy & MGMT Control)
[10]: 0000 (Extended Port Control Operation)
[11]: 0000 (Extended Port Control Data)
[16]: 0033 (LED Control)
[17]: 0000 (IP Priority Mapping Table)
[18]: 0000 (IEEE Priority Mapping Table)
[19]: 0000 (Port Control 3)
[1B]: 8000 (Queue Counters)
[1C]: 0000 (Queue Control)
[1D]: 0000 (Queue Control 2)
[1E]: 0000 (Enable & Cut Through)
[1F]: 0058 (Debug Counters)
========================================
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I3915e0747beeb8f8a3d06d3409ac55ed0cd50b41
|
|
Because Bletchley does not have IPMI between Bmc & Host, the Host init
state will set to Off after Bmc booted. We require an extra service to
check and set Host state & Chassis power state to correct state before
doing any power action or power policy restore.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I680bc62559ea6f7df6dbe171b54d2cda0c7ae0d4
|
|
Add board-type-checker-fpb service for checking the board type
(main or 2nd source) of front panel board.
Base on the board type result, this service help probing i2c device
with compatable driver and creating a softlink to link virtual sensor
configuration to corresponding json file.
This commit require a kernel patch to remove hdc1080 node from
devicetree.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I2b9aabb41c9749f525fe5444fb519871f0a7796d
|
|
Mapping AC relay on/off to chassis power on/off:
- host-ac-on@.service --> obmc-chassis-poweron@.target
- host-ac-off@.service --> obmc-chassis-poweroff@.target
Mapping host power button on/off to host starting/stopping
- host-poweron@.service --> obmc-host-starting@.target
- host-poweroff@.service --> obmc-host-stopping@.target
Test Results:
root@bletchley:~# obmcutil -i=6 poweron
root@bletchley:~# obmcutil -i=6 state
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.On
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running
BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive
root@bletchley:~# obmcutil -i=6 poweroff
root@bletchley:~# obmcutil -i=6 state
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off
BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I1fa2ec6d9233be61117149ac7f7d46f0417a6930
|
|
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
|
|
add below functions for flash binding on spi2
1. spi2_mux_select(): set spi2 mux by giving a sled index
2. bind_spi2_pnor(): set spi2 mux and bind pnor flash
3. unbind_spi2_pnor(): unbind pnor flash and unset spi2 mux
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I8cd626d2ee47e8812569a61b745d8181dee2f708
|
|
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
|
|
Add target file for sled insertion and removal, add Requires for both
motor-init-calibration & host-ac-on service in seld insertion target,
and Conflicts in sled removal.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I020694f868a352b0bcd2754a54cadd4a7d5487e5
|
|
A service to monitor the presence status of sleds and perform
corresponding actions when sleds are inserted or removed.
This patch require phosphor-gpio-monitor-presence enabled and gpio-keys
defined in kernel dts file, the LORE link as 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: Id43c7c5c40ccad904db3e6d55870b154a68626ca
|
|
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
|
|
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
|
|
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>
|
|
pnor flash interface switched from spi-gpio to spi-mem, update the bind
and unbind command in script.
This patch dependes on patch below:
LINK: https://lore.kernel.org/all/20220509151118.4899-3-potin.lai.pt@gmail.com/
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Ib622f7f22dede5f40cf6a5b4cf3df93d5b191ad8
|
|
update gpio line names in bletchley-early-sys-init
this patch depends on the pathcd below:
LINK: https://lore.kernel.org/all/20220509151118.4899-5-potin.lai.pt@gmail.com/
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I0ff7332378f63a812de1e500c196d6eb8ca1cd19
|
|
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
|
|
fix syntax error in c22 write command
Tested:
- Get switch PHY id by read/write SMI register
root@bletchley:~# mdio-util c22 w 0 0x1c 0x19 0x0000
root@bletchley:~# mdio-util c22 w 0 0x1c 0x18 0x9434
root@bletchley:~# mdio-util c22 w 0 0x1c 0x18 0x9822
root@bletchley:~# mdio-util c22 r 0 0x1c 0x19
0x002b
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Ie65a84c4485beb7f7600b36009027637c5fc7ed1
|
|
Add command to trigger host recovery mode
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I1067c347b975ef531a58e6022e3ef4d9f3eee67a
|
|
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
|
|
Add usb-controller-update script for firmware updating.
Tested results:
root@bletchley:~# systemctl start flash-usb-controller@3.service
root@bletchley:~# systemctl status flash-usb-controller@3.service
○ flash-usb-controller@3.service - Flash usb controller image on SLED 3
Loaded: loaded (/lib/systemd/system/flash-usb-controller@.service; static)
Active: inactive (dead)
Apr 22 02:52:52 bletchley systemd[1]: Starting Flash usb controller image on SLED 3...
Apr 22 02:52:54 bletchley usb-controller-update[3915]: Bind mtd node success, path: /dev/mtd7
Apr 22 02:53:01 bletchley usb-controller-update[3937]: [293B blob data]
Apr 22 02:53:01 bletchley usb-controller-update[3915]: Erase flash block done
Apr 22 02:53:08 bletchley usb-controller-update[3940]: [438B blob data]
Apr 22 02:53:10 bletchley usb-controller-update[3940]: [293B blob data]
Apr 22 02:53:11 bletchley usb-controller-update[3940]: [293B blob data]
Apr 22 02:53:11 bletchley usb-controller-update[3915]: Write firmware image done
Apr 22 02:53:12 bletchley systemd[1]: flash-usb-controller@3.service: Deactivated successfully.
Apr 22 02:53:12 bletchley systemd[1]: Finished Flash usb controller image on SLED 3.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Icd26fb3c7585461152c3b929a46dc16675d6c937
|
|
Assign host-poweron service to obmc-host-startmin target, and
host-poweroff service to obmc-host-shutdown target.
Tested results (obmcutil fixed at host6/chassis6):
- Power On
root@bletchley:~# obmcutil poweron
root@bletchley:~# obmcutil hoststate
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Running
root@bletchley:~# obmcutil chassisstate
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.On
- Power Off
root@bletchley:~# obmcutil poweroff
root@bletchley:~# obmcutil hoststate
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off
root@bletchley:~# obmcutil chassisstate
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Ia1de25a49b87347a2e77ec45709a0bb3ed272be9
|
|
Start fanX_good LED group during sysyem early init.
Add sledX_good LED group start/stop service into obmc-host-startmin@X
and obmc-host-shutdown@X targets.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Ibfab75d6f08550806d320b8a95e67d5fd5bedf82
|
|
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
|
|
Introduce a MDIO Utility for AST2600
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Ia94078be73f2af443f745c7797111d9d94e8047b
|
|
1. While motor-init-calibration@.service fail,retry to start service with maximum count 5 times.
2. In case of service unexpected stopped while motor is running, add stop motor
command after service stopped to avoid motor runs forever.
3. Add sled present check in motor-ctrl tool
Change-Id: Ie636f3a7dbf656f8ea577bfffed150171f7f07be
Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>
|
|
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>
|
|
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
|
|
We want to do motor-init and turn on ac when system boot-up,
make service instances link under /lib/systemd/system/multi-user.target.wants/
Change-Id: I53bc97270d111b90e0d70052f81a7e428805ead1
Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>
|
|
motor-ctrl recipe was reported to periodically fail with:
ERROR: When reparsing motor-ctrl_0.1.bb:do_fetch, the basehash value
changed from AAA to BBB. The metadata is not deterministic and this
needs to be fixed.
There was inconsistencies in the way the SYSTEMD services were defined
and some of them appeared to not instantiate templates correctly.
Clean them all up to match.
Also perform trivial alphabetic sorting of some other variables.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I9c66fa1106a4003041f39c68c1a43ef8b6a2c00e
|
|
1. add host-ac-on and host-ac-off service.
2. init host-ac-on during BMC boot.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Ie3954297e20f35c9d1f723d9d5e74cee91ec32ac
|
|
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>
|
|
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>
|
|
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>
|
|
To setup GPIOs and set fan speed to 70%
Signed-off-by: Howard Chiu <howard.chiu@quantatw.com>
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I7a64e19b6e34bcab7013b382d19d7be6156bf87a
|