summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2024-02-02 15:47:06 +0000
committerSean Rhodes <sean@starlabs.systems>2024-10-10 15:51:29 +0000
commit2a4a56efcc82bc196784c57f86eb58fa5664d87f (patch)
treefae242f0f2d7d76414ed9654559a0ab197389938 /src
parent3f9f8f1e703d118642ebe2667e9f7fc4b08f6810 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/starlabs/starbook/cmos.default2
-rw-r--r--src/mainboard/starlabs/starbook/cmos.layout2
-rw-r--r--src/mainboard/starlabs/starbook/variants/adl/devtree.c8
-rw-r--r--src/mainboard/starlabs/starbook/variants/cml/devtree.c4
-rw-r--r--src/mainboard/starlabs/starbook/variants/kbl/devtree.c4
-rw-r--r--src/mainboard/starlabs/starbook/variants/rpl/devtree.c8
-rw-r--r--src/mainboard/starlabs/starbook/variants/tgl/devtree.c4
7 files changed, 32 insertions, 0 deletions
diff --git a/src/mainboard/starlabs/starbook/cmos.default b/src/mainboard/starlabs/starbook/cmos.default
index 6f44bdbcd1..b4ae84cc7d 100644
--- a/src/mainboard/starlabs/starbook/cmos.default
+++ b/src/mainboard/starlabs/starbook/cmos.default
@@ -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
diff --git a/src/mainboard/starlabs/starbook/cmos.layout b/src/mainboard/starlabs/starbook/cmos.layout
index 505f49f5ca..e4032110a3 100644
--- a/src/mainboard/starlabs/starbook/cmos.layout
+++ b/src/mainboard/starlabs/starbook/cmos.layout
@@ -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
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;