mb/starlabs/starbook: Add options to disable USB devices
Add options to disable the card reader and fingerprint reader. Change-Id: Iee985aa2db3da5c2d393b8dc2dc722e990c43272 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84631 Reviewed-by: Maxim <max.senia.poliak@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
3f9f8f1e70
commit
2a4a56efcc
7 changed files with 32 additions and 0 deletions
|
|
@ -15,6 +15,8 @@ webcam=Enable
|
|||
microphone=Enable
|
||||
legacy_8254_timer=Disable
|
||||
pci_hot_plug=Disable
|
||||
fingerprint_reader=Enable
|
||||
card_reader=Enable
|
||||
# EC
|
||||
kbl_timeout=30 seconds
|
||||
fn_ctrl_swap=Disable
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ entries
|
|||
520 1 e 1 microphone
|
||||
528 1 e 1 legacy_8254_timer
|
||||
536 1 e 1 pci_hot_plug
|
||||
542 1 e 1 fingerprint_reader
|
||||
550 1 e 1 card_reader
|
||||
|
||||
# coreboot config options: EC
|
||||
600 3 e 4 kbl_timeout
|
||||
|
|
|
|||
|
|
@ -54,4 +54,12 @@ void devtree_update(void)
|
|||
/* Enable/Disable Webcam based on CMOS settings */
|
||||
if (get_uint_option("webcam", 1) == 0)
|
||||
cfg->usb2_ports[CONFIG_CCD_PORT].enable = 0;
|
||||
|
||||
/* Enable/Disable Fingerprint Reader based on CMOS Settings */
|
||||
if (get_uint_option("fingerprint_reader", 1) == 0)
|
||||
cfg->usb2_ports[5].enable = 0;
|
||||
|
||||
/* Enable/Disable Card Reader based on CMOS Settings */
|
||||
if (get_uint_option("card_reader", 1) == 0)
|
||||
cfg->usb2_ports[3].enable = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,4 +42,8 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable Webcam based on CMOS settings */
|
||||
cfg->usb2_ports[CONFIG_CCD_PORT].enable = get_uint_option("webcam", 1);
|
||||
|
||||
/* Enable/Disable Card Reader based on CMOS Settings */
|
||||
if (get_uint_option("card_reader", 1) == 0)
|
||||
cfg->usb2_ports[3].enable = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,4 +42,8 @@ void devtree_update(void)
|
|||
|
||||
/* Enable/Disable Webcam based on CMOS settings */
|
||||
cfg->usb2_ports[CONFIG_CCD_PORT].enable = get_uint_option("webcam", 1);
|
||||
|
||||
/* Enable/Disable Card Reader based on CMOS Settings */
|
||||
if (get_uint_option("card_reader", 1) == 0)
|
||||
cfg->usb2_ports[6].enable = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,6 +58,14 @@ void devtree_update(void)
|
|||
if (get_uint_option("webcam", 1) == 0)
|
||||
cfg->usb2_ports[CONFIG_CCD_PORT].enable = 0;
|
||||
|
||||
/* Enable/Disable Fingerprint Reader based on CMOS Settings */
|
||||
if (get_uint_option("fingerprint_reader", 1) == 0)
|
||||
cfg->usb2_ports[5].enable = 0;
|
||||
|
||||
/* Enable/Disable Card Reader based on CMOS Settings */
|
||||
if (get_uint_option("card_reader", 1) == 0)
|
||||
cfg->usb2_ports[3].enable = 0;
|
||||
|
||||
/* Enable/Disable Thunderbolt based on CMOS settings */
|
||||
if (get_uint_option("thunderbolt", 1) == 0) {
|
||||
tbt_pci_dev->enabled = 0;
|
||||
|
|
|
|||
|
|
@ -56,6 +56,10 @@ void devtree_update(void)
|
|||
/* Enable/Disable Webcam based on CMOS settings */
|
||||
cfg->usb2_ports[CONFIG_CCD_PORT].enable = get_uint_option("webcam", 1);
|
||||
|
||||
/* Enable/Disable Card Reader based on CMOS Settings */
|
||||
if (get_uint_option("card_reader", 1) == 0)
|
||||
cfg->usb2_ports[5].enable = 0;
|
||||
|
||||
/* Enable/Disable Thunderbolt based on CMOS settings */
|
||||
if (get_uint_option("thunderbolt", 1) == 0) {
|
||||
cfg->UsbTcPortEn = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue