From 2a4a56efcc82bc196784c57f86eb58fa5664d87f Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Fri, 2 Feb 2024 15:47:06 +0000 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/84631 Reviewed-by: Maxim Tested-by: build bot (Jenkins) --- src/mainboard/starlabs/starbook/variants/adl/devtree.c | 8 ++++++++ src/mainboard/starlabs/starbook/variants/cml/devtree.c | 4 ++++ src/mainboard/starlabs/starbook/variants/kbl/devtree.c | 4 ++++ src/mainboard/starlabs/starbook/variants/rpl/devtree.c | 8 ++++++++ src/mainboard/starlabs/starbook/variants/tgl/devtree.c | 4 ++++ 5 files changed, 28 insertions(+) (limited to 'src/mainboard/starlabs/starbook/variants') diff --git a/src/mainboard/starlabs/starbook/variants/adl/devtree.c b/src/mainboard/starlabs/starbook/variants/adl/devtree.c index e36effbc9f..1c9a8ffc11 100644 --- a/src/mainboard/starlabs/starbook/variants/adl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/adl/devtree.c @@ -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; } diff --git a/src/mainboard/starlabs/starbook/variants/cml/devtree.c b/src/mainboard/starlabs/starbook/variants/cml/devtree.c index c107a1028b..b73d6c7589 100644 --- a/src/mainboard/starlabs/starbook/variants/cml/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/cml/devtree.c @@ -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; } diff --git a/src/mainboard/starlabs/starbook/variants/kbl/devtree.c b/src/mainboard/starlabs/starbook/variants/kbl/devtree.c index f8820d3b18..6a98283e8e 100644 --- a/src/mainboard/starlabs/starbook/variants/kbl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/kbl/devtree.c @@ -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; } diff --git a/src/mainboard/starlabs/starbook/variants/rpl/devtree.c b/src/mainboard/starlabs/starbook/variants/rpl/devtree.c index 4c1f3cada9..f645f7cc35 100644 --- a/src/mainboard/starlabs/starbook/variants/rpl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/rpl/devtree.c @@ -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; diff --git a/src/mainboard/starlabs/starbook/variants/tgl/devtree.c b/src/mainboard/starlabs/starbook/variants/tgl/devtree.c index 59959e2008..4195e09ff5 100644 --- a/src/mainboard/starlabs/starbook/variants/tgl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/tgl/devtree.c @@ -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; -- cgit v1.2.3