Power supply with overcurrent protection based on system bios setting
An apparatus, system, and method are disclosed for automatically controlling a power setting of a power supply unit (PSU). The apparatus includes a processor and non-volatile memory having a switch configured to instruct the PSU to operate in a first overcurrent protection (OCP) mode.
1 . An apparatus, comprising:
a processor; and
a non-volatile memory configured to store code that, when executed by the processor, causes the processor to:
receive a power setting of a plurality of different power settings for the apparatus prior to startup of the apparatus, wherein each different power setting in the plurality of different power settings corresponds to a type of power plug of a plurality of different types of power plugs that receive power from a power source for powering the apparatus,
set, in a basic input/output system (BIOS) setup utility prior to startup of the apparatus, an overcurrent protection (OCP) mode of a plurality of different OCP modes corresponding to the received power setting, wherein:
the OCP mode set in the BIOS setup utility protects the apparatus from overcurrent in the power supplied by the power source and received via the type of power plug, and
each OCP mode in the plurality of different OCP modes corresponds to a power setting in the plurality of different power settings, and
instruct, at startup of the apparatus, a power supply unit (PSU) for the apparatus to operate in the OCP mode set in the BIOS setup utility,
wherein:
the apparatus is configurable for being powered by each different type of power plug,
each different type of power plug is based on a maximum amount of power supplied by the corresponding type of power plug to the apparatus,
the OCP mode sets an OCP threshold amount of power supplied by the PSU to the apparatus, and
the OCP threshold amount of power set by the OCP mode and supplied by the PSU corresponds to the maximum amount of power supplied by the power plug corresponding to the power setting.
2 . The apparatus of claim 1 , further comprising:
a BIOS module; and
a switch included in the BIOS module.
3 . The apparatus of claim 2 , wherein:
the switch further causes the processor to assert and deassert a general-purpose input/output (GPIO) associated with the PSU, and
asserting and deasserting the GPIO enables the PSU to select an output OCP value for the OCP mode.
4 . The apparatus of claim 2 , further comprising a motherboard embedded controller (EC) coupled to the processor,
wherein:
the switch is configured to instruct the EC to operate in one of the plurality of different OCP modes.
5 . The apparatus of claim 4 , wherein the EC is configured to one of:
use a first OCP threshold amount of power associated with a 15 A input responsive to a first OCP mode of the plurality of different OCP modes being a 15 A mode and the type of the power plug being a national electrical manufacturers association (NEMA) 5P-15 plug; or
use a second OCP threshold amount of power associated with a 20 A input responsive to a second OCP mode of the plurality of different OCP modes being a 20 A mode and the type of the power plug being a NEMA 5P-20 plug.
6 . A method, comprising:
receiving, by a processor, a power setting of a plurality of different power settings for a computer system prior to startup of the computer system, wherein each different power setting in the plurality of different power settings corresponds to a type of power plug of a plurality of different types of power plugs that receive power from a power source for powering the computer system;
setting, by the processor in a basic input/output system (BIOS) setup utility prior to startup of the computer system, an overcurrent protection (OCP) mode of a plurality of different OCP modes corresponding to the received power setting, wherein:
the OCP mode set in the BIOS setup utility protects the apparatus from overcurrent in the power supplied by the power source and received via the type of power plug, and
each OCP mode in the plurality of different OCP modes corresponds to a power setting in the plurality of different power settings, and
instructing, by the processor at startup of the computer system, a power supply unit (PSU) of the computer system to operate in the OCP mode set in the BIOS setup utility; and
activating, by the processor, the PSU upon start-up of the computer system,
wherein:
the computer system is configurable for being powered by each different type of power plug,
each different type of power plug is based on a maximum amount of power supplied by the corresponding type of power plug to the computer system,
the OCP mode sets an OCP threshold amount of power supplied by the PSU to the computer system, and
the OCP threshold amount of power set by the OCP mode and supplied by the PSU corresponds to the maximum amount of power supplied by the power plug corresponding to the power setting.
7 . The method of claim 6 , wherein the computer system comprises a BIOS module and a switch in the BIOS module.
8 . The method of claim 7 , further comprising:
asserting, by the switch, a general-purpose input/output (GPIO) associated with the PSU.
9 . The method of claim 8 , further comprising:
deasserting, by the switch, the GPIO associated with the PSU,
wherein asserting and deasserting the GPIO enables the PSU to select an output OCP value for the OCP mode.
10 . The method of claim 6 , further comprising one of:
at the PSU, using a first OCP threshold amount of power associated with a 15 A input responsive to the OCP mode being a 15 A mode; or
at the PSU, using a second OCP threshold amount of power associated with a 20 A input responsive to the OCP mode being a 20 A mode.
11 . The method of claim 6 , further comprising:
instructing a motherboard embedded controller (EC) to operate in one of the plurality of different OCP modes.
12 . The method of claim 11 , further comprising one of:
using, by the EC, a first OCP threshold amount of power associated with a 15 A input responsive to a first OCP mode of the plurality of different OCP modes being a 15 A mode and the type of the power plug being a national electrical manufacturers association (NEMA) 5P-15 plug; or
using, by the EC, a second OCP threshold amount of power associated with a 20 A input responsive to a second OCP mode of the plurality of different OCP modes being a 20 A mode and the type of the power plug being a NEMA 5P-20 plug.
13 . A computer system, comprising:
a basic input/output system (BIOS) module, the BIOS module comprising a BIOS power-setting switch configured to switch between a first overcurrent protection (OCP) mode corresponding to a first amount of power received from a power source for powering the computing system and a second OCP mode corresponding to a second amount of power received from the power source for powering the computing system,
wherein:
the first OCP mode or the second OCP mode is set in a BIOS setup utility,
the set first OCP mode protects the computer system from overcurrent in the first amount of power received from the power source, and
the set second OCP mode protects the computer system from overcurrent in the second amount of power received from the power source.
14 . The computer system of claim 13 , wherein:
the first OCP mode comprises a fifteen-amp (15 A) mode; and
the second OCP mode comprises a twenty-amp (20 A) mode.
15 . The computer system of claim 14 , further comprising:
a power plug of a plurality of different types of power plugs;
a processor;
a power supply unit (PSU) coupled to the power plug and the processor; and
non-volatile memory storing code that, when executed by the processor, causes the processor to:
receive a power setting of a plurality of power settings for the system that corresponds to the power plug, wherein each different power setting in the plurality of different power settings corresponds to a type of power plug of a plurality of different types of power plugs for the system,
set, in the BIOS setup utility prior to startup of the computing device, one of the first OCP mode or the second OCP mode, wherein the one of the first OCP mode or the second OCP mode corresponds to the received power setting, and
instruct, at startup of the system, the PSU operate in the one of the first OCP mode or the second OCP mode,
wherein:
the computer system is configurable for being powered by each different type of power plug,
each different type of power plug is based on a maximum amount of power supplied by the corresponding type of power plug to the computer system,
the OCP mode sets an OCP threshold amount of power supplied by the PSU to the computer system, and
the OCP threshold amount of power set by the OCP mode and supplied by the PSU corresponds to the maximum amount of power supplied by the power plug corresponding to the power setting.
16 . The computer system of claim 15 , wherein the BIOS power-setting switch is further configured to cause the processor to assert a general-purpose input/output (GPIO) associated with the PSU.
17 . The computer system of claim 16 , wherein:
the BIOS power-setting switch is further configured to cause the processor to deassert the GPIO associated with the PSU; and
asserting and deasserting the GPIO enables the PSU to select an output OCP value corresponding to the one of the first OCP mode or the second OCP mode.
18 . The computer system of claim 15 , wherein the PSU is configured to:
use a first OCP threshold amount of power associated with a 15 A input responsive to the first OCP mode; and
use a second OCP threshold amount of power associated with a 20 A input responsive to the second OCP mode.
19 . The computer system of claim 13 , further comprising a motherboard embedded controller (EC) coupled to the processor, wherein:
the BIOS power-setting switch is further configured to instruct the EC to operate in one of the first OCP mode or the second OCP mode.
20 . The computer system of claim 19 , wherein the EC is configured to one of:
use the first OCP threshold amount of power associated with the 15 A input responsive to the first OCP mode being set and the type of the power plug being a national electrical manufacturers association (NEMA) 5P-15 plug; or
use the second OCP threshold amount of power associated with the 20 A input responsive to the second OCP mode being set and the type of the power plug being a NEMA 5P-20 plug.