XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # help information |
| 3 | |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 4 | # Provide source directive to shellcheck. |
| 5 | # shellcheck source=meta-fii/meta-kudo/recipes-kudo/kudo-fw-utility/kudo-fw/kudo-lib.sh |
Charles Boyer | 2adad36 | 2021-11-24 15:58:03 -0600 | [diff] [blame] | 6 | source /usr/libexec/kudo-fw/kudo-lib.sh |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 7 | |
| 8 | function usage_rst() { |
| 9 | echo " kudo rst [parameter]" |
| 10 | echo " hotswap --> reset the whole kudo node" |
| 11 | echo " system --> reset the host" |
| 12 | echo " btn --> trigger a power button event" |
| 13 | echo " shutdown --> send out shutdown signal to CPU" |
| 14 | echo " display --> " |
| 15 | } |
| 16 | |
| 17 | function usage_led() { |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 18 | echo " kudo led 'att'/'boot' [parameter]" |
| 19 | echo " on --> change to CPU console" |
| 20 | echo " off --> change to CPU 0 SCP console" |
| 21 | echo " status --> change to CPU 1 SCP console" |
| 22 | } |
| 23 | |
| 24 | function usage_uart() { |
| 25 | echo " kudo uart [parameter]" |
Lancelot Kao | 19bfafb | 2021-05-25 15:04:57 -0500 | [diff] [blame] | 26 | echo " host --> show CPU console" |
| 27 | echo " scp --> show SCP0 console" |
| 28 | echo " swhost --> change to CPU console to ttyS1" |
| 29 | echo " swscp1 --> change to CPU 0 SCP console to ttyS3" |
| 30 | echo " swscp2 --> change to CPU 1 SCP console" |
| 31 | echo " swhosthr --> change CPU console to header" |
| 32 | echo " swscphr --> change SCP console to header" |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 33 | echo " display --> " |
| 34 | } |
| 35 | |
| 36 | function usage() { |
| 37 | echo " kudo BMC console system utilities" |
| 38 | echo " kudo [optional] [parameter]" |
| 39 | echo " rst --> reset traget device" |
| 40 | echo " fw --> get version" |
| 41 | echo " uart --> control the uart mux" |
| 42 | echo " led --> control the leds" |
| 43 | } |
| 44 | |
| 45 | function reset() { |
| 46 | case $1 in |
| 47 | hotswap) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 48 | # Virtual reset |
| 49 | set_gpio_ctrl HOTSWAP 1 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 50 | ;; |
| 51 | system) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 52 | # S0 system reset |
| 53 | set_gpio_ctrl S0_SYSRESET 0 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 54 | sleep 1 |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 55 | set_gpio_ctrl S0_SYSRESET 1 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 56 | ;; |
| 57 | btn) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 58 | # virtual power button |
| 59 | set_gpio_ctrl POWER_OUT 1 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 60 | sleep 1 |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 61 | set_gpio_ctrl POWER_OUT 0 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 62 | ;; |
| 63 | shutdown) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 64 | # BMC_CPU_SHD_REQ |
| 65 | set_gpio_ctrl S0_SHD_REQ 0 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 66 | sleep 3 |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 67 | set_gpio_ctrl S0_SHD_REQ 1 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 68 | ;; |
| 69 | forceOff) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 70 | # virtual power button |
| 71 | set_gpio_ctrl POWER_OUT 1 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 72 | sleep 6 |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 73 | set_gpio_ctrl POWER_OUT 0 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 74 | ;; |
| 75 | display) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 76 | echo "Virtual reset #$(get_gpio_num HOTSWAP)" "$(get_gpio_ctrl HOTSWAP)" |
| 77 | echo "S0 System reset #$(get_gpio_num S0_SYSRESET)" "$(get_gpio_ctrl S0_SYSRESET)" |
| 78 | echo "Power Button #$(get_gpio_num POWER_OUT)" "$(get_gpio_ctrl POWER_OUT)" |
| 79 | echo "BMC_CPU SHD Req #$(get_gpio_num S0_SHD_REQ)" "$(get_gpio_ctrl S0_SHD_REQ)" |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 80 | ;; |
| 81 | *) |
| 82 | usage_rst |
| 83 | ;; |
| 84 | esac |
| 85 | } |
| 86 | |
| 87 | function fw_rev() { |
| 88 | BMC_CPLD_VER_FILE="/run/cpld0.version" |
| 89 | MB_CPLD_VER_FILE="/run/cpld1.version" |
| 90 | |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 91 | cmd=$(cat ${BMC_CPLD_VER_FILE}) |
| 92 | echo " BMC_CPLD: " "${cmd}" |
| 93 | cmd=$(cat ${MB_CPLD_VER_FILE}) |
| 94 | echo " MB_CPLD: " "${cmd}" |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 95 | |
XP Chen | 9d2a1e0 | 2021-08-25 16:40:01 -0500 | [diff] [blame] | 96 | # BMC Version |
| 97 | |
| 98 | # Save VERSION_ID line in string "VERSION_ID=vXX.XX-XX-kudo" |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 99 | StringVersion=$(awk '/VERSION_ID/' /etc/os-release) |
XP Chen | 9d2a1e0 | 2021-08-25 16:40:01 -0500 | [diff] [blame] | 100 | |
| 101 | #Save Major Version value between v and . "vXX." then convert Hex to Decimal |
| 102 | MajorVersion=${StringVersion#*v} |
| 103 | MajorVersion=$(( 16#${MajorVersion%.*})) |
| 104 | |
| 105 | #Save SubMajor Version valeu between . and - ".XX-" then convert Hex to Decimal |
Ashwin Murali | ba38d48 | 2022-03-21 17:00:41 -0500 | [diff] [blame] | 106 | SubMajorVersion=${StringVersion##*.} |
| 107 | SubMajorVersion=$(( 16#${SubMajorVersion%%-*})) |
XP Chen | 9d2a1e0 | 2021-08-25 16:40:01 -0500 | [diff] [blame] | 108 | |
| 109 | #Save Minor Version value between - and - "-XX-" then convert Hex to Decimal |
| 110 | MinorVersion=${StringVersion#*-} |
| 111 | MinorVersion=$(( 16#${MinorVersion%-*})) |
| 112 | |
| 113 | echo " BMC: " ${MajorVersion}.${SubMajorVersion}.${MinorVersion} |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 114 | |
| 115 | #BMC PWR Sequencer |
Charles Boyer | af72171 | 2022-02-09 09:17:35 -0600 | [diff] [blame] | 116 | i2cset -y -f -a "${I2C_BMC_PWRSEQ[0]}" 0x"${I2C_BMC_PWRSEQ[1]}" 0xfe 0x0000 w |
| 117 | cmd=$(i2cget -y -f -a "${I2C_BMC_PWRSEQ[0]}" 0x"${I2C_BMC_PWRSEQ[1]}" 0xfe i 2 | awk '{print substr($0,3)}') |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 118 | echo " BMC PowerSequencer : ${cmd}" |
| 119 | #only display with smbios exists |
| 120 | if [[ -e /var/lib/smbios/smbios2 ]]; then |
| 121 | cmd=$(busctl introspect xyz.openbmc_project.Smbios.MDR_V2 \ |
| 122 | /xyz/openbmc_project/inventory/system/chassis/motherboard/bios | grep Version | awk '{print $4}') |
| 123 | echo " Bios: $cmd" |
| 124 | fi |
| 125 | |
Charles Boyer | af72171 | 2022-02-09 09:17:35 -0600 | [diff] [blame] | 126 | cmd=$(i2cget -f -y "${I2C_S0_SMPRO[0]}" 0x"${I2C_S0_SMPRO[1]}" 0x1 w); |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 127 | echo " SCP Firmware: ${cmd}" |
Karthikeyan Sundaram | 0759c75 | 2021-11-24 14:33:55 -0600 | [diff] [blame^] | 128 | get_scp_eeprom |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 129 | |
| 130 | adm1266_ver | grep REVISION |
| 131 | |
| 132 | } |
| 133 | |
| 134 | function uartmux() { |
| 135 | case $1 in |
| 136 | host) |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 137 | if [ "$(tty)" == "/dev/ttyS0" ]; then |
Lancelot Kao | 19bfafb | 2021-05-25 15:04:57 -0500 | [diff] [blame] | 138 | echo "Couldn't redirect to the host console within BMC local console" |
| 139 | else |
| 140 | echo "Entering Console use 'shift ~~..' to quit" |
| 141 | obmc-console-client -c /etc/obmc-console/server.ttyS1.conf |
| 142 | fi |
| 143 | ;; |
| 144 | scp) |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 145 | if [ "$(tty)" == "/dev/ttyS0" ]; then |
Lancelot Kao | 19bfafb | 2021-05-25 15:04:57 -0500 | [diff] [blame] | 146 | echo "Couldn't redirect to the scp console within BMC local console" |
| 147 | else |
| 148 | echo "Entering Console use 'shift ~~..' to quit" |
| 149 | obmc-console-client -c /etc/obmc-console/server.ttyS3.conf |
| 150 | fi |
| 151 | ;; |
| 152 | swhost) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 153 | set_gpio_ctrl S0_UART0_BMC_SEL 1 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 154 | ;; |
Lancelot Kao | 19bfafb | 2021-05-25 15:04:57 -0500 | [diff] [blame] | 155 | swscp1) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 156 | set_gpio_ctrl S0_UART1_BMC_SEL 1 |
| 157 | set_gpio_ctrl S1_UART0_BMC_SEL 1 |
| 158 | set_gpio_ctrl S1_UART1_BMC_SEL 0 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 159 | ;; |
Lancelot Kao | 19bfafb | 2021-05-25 15:04:57 -0500 | [diff] [blame] | 160 | swscp2) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 161 | set_gpio_ctrl S0_UART1_BMC_SEL 1 |
| 162 | set_gpio_ctrl S1_UART0_BMC_SEL 1 |
| 163 | set_gpio_ctrl S1_UART1_BMC_SEL 1 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 164 | ;; |
Lancelot Kao | 19bfafb | 2021-05-25 15:04:57 -0500 | [diff] [blame] | 165 | swhosthr) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 166 | set_gpio_ctrl S0_UART0_BMC_SEL 0 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 167 | ;; |
Lancelot Kao | 19bfafb | 2021-05-25 15:04:57 -0500 | [diff] [blame] | 168 | swscphr) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 169 | set_gpio_ctrl S0_UART1_BMC_SEL 0 |
| 170 | set_gpio_ctrl S1_UART0_BMC_SEL 0 |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 171 | ;; |
| 172 | display) |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 173 | if [ "$(get_gpio_ctrl S0_UART0_BMC_SEL)" -eq 1 ]; then |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 174 | echo " CPU host to BMC console" |
| 175 | else |
| 176 | echo " CPU host to header" |
| 177 | fi |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 178 | if [ "$(get_gpio_ctrl S0_UART1_BMC_SEL)" -eq 1 ] && [ "$(get_gpio_ctrl S1_UART0_BMC_SEL)" -eq 1 ]; then |
| 179 | if [ "$(get_gpio_ctrl S1_UART1_BMC_SEL)" -eq 1 ]; then |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 180 | echo " SCP2 host to BMC console" |
| 181 | else |
| 182 | echo " SCP1 host to BMC console" |
| 183 | fi |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 184 | elif [ "$(get_gpio_ctrl S0_UART1_BMC_SEL)" -eq 0 ] && [ "$(get_gpio_ctrl S1_UART0_BMC_SEL)" -eq 0 ]; then |
| 185 | if [ "$(get_gpio_ctrl S1_UART1_BMC_SEL)" -eq 1 ]; then |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 186 | echo " SCP2 host to Header" |
| 187 | else |
| 188 | echo " SCP1 host to Header" |
| 189 | fi |
| 190 | else |
| 191 | echo "It's unknown status" |
Charles Boyer | d7d3423 | 2022-02-09 08:32:22 -0600 | [diff] [blame] | 192 | echo "S0_UART0_BMC_SEL $(get_gpio_ctrl S0_UART0_BMC_SEL)" |
| 193 | echo "S0_UART1_BMC_SEL $(get_gpio_ctrl S0_UART1_BMC_SEL)" |
| 194 | echo "S1_UART0_BMC_SEL $(get_gpio_ctrl S1_UART0_BMC_SEL)" |
| 195 | echo "S1_UART1_BMC_SEL $(get_gpio_ctrl S1_UART1_BMC_SEL)" |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 196 | fi |
| 197 | ;; |
| 198 | *) |
| 199 | usage_uart |
| 200 | ;; |
| 201 | esac |
| 202 | } |
| 203 | |
| 204 | function ledtoggle() { |
| 205 | |
Charles Boyer | af72171 | 2022-02-09 09:17:35 -0600 | [diff] [blame] | 206 | CurrentLED=$( i2cget -y -f -a "${I2C_MB_CPLD[0]}" 0x"${I2C_MB_CPLD[1]}" 0x05 i 1 | cut -d ' ' -f 2) |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 207 | case $1 in |
| 208 | boot) |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 209 | cmd=$(((CurrentLED & 0x40) != 0)) |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 210 | case $2 in |
| 211 | on) |
| 212 | #turn on LED |
| 213 | if [[ $cmd -eq 0 ]]; then |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 214 | setValue=$(( 0x40 + CurrentLED )) |
Charles Boyer | af72171 | 2022-02-09 09:17:35 -0600 | [diff] [blame] | 215 | i2cset -y -f -a "${I2C_MB_CPLD[0]}" 0x"${I2C_MB_CPLD[1]}" 0x10 $setValue |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 216 | fi |
| 217 | ;; |
| 218 | off) |
| 219 | #turn off led |
| 220 | if [[ $cmd -eq 1 ]]; then |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 221 | setValue=$(( 0x80 & CurrentLED )) |
Charles Boyer | af72171 | 2022-02-09 09:17:35 -0600 | [diff] [blame] | 222 | i2cset -y -f -a "${I2C_MB_CPLD[0]}" 0x"${I2C_MB_CPLD[1]}" 0x10 $setValue |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 223 | fi |
| 224 | ;; |
| 225 | toggle) |
| 226 | #turn on LED |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 227 | setValue=$(( 0x40 ^ CurrentLED )) |
Charles Boyer | af72171 | 2022-02-09 09:17:35 -0600 | [diff] [blame] | 228 | i2cset -y -f -a "${I2C_MB_CPLD[0]}" 0x"${I2C_MB_CPLD[1]}" 0x10 $setValue |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 229 | ;; |
| 230 | status) |
| 231 | #displayLED status |
| 232 | if [[ $cmd -eq 1 ]]; then |
| 233 | echo "on" |
| 234 | else |
| 235 | echo "off" |
| 236 | fi |
| 237 | ;; |
| 238 | *) |
| 239 | usage_led |
| 240 | ;; |
| 241 | esac |
| 242 | ;; |
| 243 | att) |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 244 | cmd=$(((CurrentLED & 0x80) != 0)) |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 245 | case $2 in |
| 246 | on) |
| 247 | #turn on LED |
| 248 | if [[ $cmd -eq 0 ]]; then |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 249 | setValue=$(( 0x80 + CurrentLED )) |
Charles Boyer | af72171 | 2022-02-09 09:17:35 -0600 | [diff] [blame] | 250 | i2cset -y -f -a "${I2C_MB_CPLD[0]}" 0x"${I2C_MB_CPLD[1]}" 0x10 $setValue |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 251 | fi |
| 252 | ;; |
| 253 | off) |
| 254 | #turn off led |
| 255 | if [[ $cmd -eq 1 ]]; then |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 256 | setValue=$(( 0x40 & CurrentLED )) |
Charles Boyer | af72171 | 2022-02-09 09:17:35 -0600 | [diff] [blame] | 257 | i2cset -y -f -a "${I2C_MB_CPLD[0]}" 0x"${I2C_MB_CPLD[1]}" 0x10 $setValue |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 258 | fi |
| 259 | ;; |
| 260 | toggle) |
| 261 | #turn on LED |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 262 | setValue=$(( 0x80 ^ CurrentLED )) |
Charles Boyer | af72171 | 2022-02-09 09:17:35 -0600 | [diff] [blame] | 263 | i2cset -y -f -a "${I2C_MB_CPLD[0]}" 0x"${I2C_MB_CPLD[1]}" 0x10 $setValue |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 264 | ;; |
| 265 | status) |
| 266 | #displayLED status |
| 267 | if [[ $cmd -eq 1 ]]; then |
| 268 | echo "on" |
| 269 | else |
| 270 | echo "off" |
| 271 | fi |
| 272 | ;; |
| 273 | *) |
| 274 | usage_led |
| 275 | ;; |
| 276 | esac |
| 277 | ;; |
| 278 | *) |
| 279 | usage_led |
| 280 | ;; |
| 281 | esac |
| 282 | } |
| 283 | |
| 284 | function usblist() { |
| 285 | for i in {0..8} |
| 286 | do |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 287 | cmd=$(devmem 0xf083"${i}"154) |
| 288 | printf "udc%d : 0xF803%d154-" "${i}" "${i}" |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 289 | $cmd |
| 290 | done |
| 291 | } |
| 292 | |
| 293 | case $1 in |
| 294 | rst) |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 295 | reset "$2" |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 296 | ;; |
| 297 | fw) |
| 298 | fw_rev |
| 299 | ;; |
| 300 | uart) |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 301 | uartmux "$2" |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 302 | ;; |
| 303 | usb) |
| 304 | usblist |
| 305 | ;; |
| 306 | led) |
Charles Boyer | 0dd8006 | 2022-03-17 14:57:50 -0500 | [diff] [blame] | 307 | ledtoggle "$2" "$3" |
XP Chen | 0e48335 | 2021-05-12 09:44:26 -0500 | [diff] [blame] | 308 | ;; |
| 309 | *) |
| 310 | usage |
| 311 | ;; |
| 312 | esac |