summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/starlabs/labtop/Kconfig5
-rw-r--r--src/mainboard/starlabs/labtop/variants/cml/devicetree.cb4
-rw-r--r--src/mainboard/starlabs/labtop/variants/cml/devtree.c3
-rw-r--r--src/mainboard/starlabs/labtop/variants/kbl/devicetree.cb6
-rw-r--r--src/mainboard/starlabs/labtop/variants/kbl/devtree.c3
-rw-r--r--src/mainboard/starlabs/labtop/variants/tgl/devicetree.cb6
-rw-r--r--src/mainboard/starlabs/labtop/variants/tgl/devtree.c3
7 files changed, 16 insertions, 14 deletions
diff --git a/src/mainboard/starlabs/labtop/Kconfig b/src/mainboard/starlabs/labtop/Kconfig
index 828e452849..e2454bc744 100644
--- a/src/mainboard/starlabs/labtop/Kconfig
+++ b/src/mainboard/starlabs/labtop/Kconfig
@@ -53,6 +53,11 @@ config BOARD_STARLABS_STARBOOK_TGL
if BOARD_STARLABS_LABTOP_SERIES
+config CCD_PORT
+ int
+ default 6 if BOARD_STARLABS_LABTOP_CML
+ default 3
+
config DEVICETREE
default "variants/\$(CONFIG_VARIANT_DIR)/devicetree.cb"
diff --git a/src/mainboard/starlabs/labtop/variants/cml/devicetree.cb b/src/mainboard/starlabs/labtop/variants/cml/devicetree.cb
index 74125488f8..1d98612e33 100644
--- a/src/mainboard/starlabs/labtop/variants/cml/devicetree.cb
+++ b/src/mainboard/starlabs/labtop/variants/cml/devicetree.cb
@@ -79,8 +79,8 @@ chip soc/intel/cannonlake
register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)"
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)"
- # Internal Webcam
- register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)"
+ # Webcam
+ register "usb2_ports[CONFIG_CCD_PORT]" = "USB2_PORT_MID(OC_SKIP)"
# Internal Bluetooth
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)"
diff --git a/src/mainboard/starlabs/labtop/variants/cml/devtree.c b/src/mainboard/starlabs/labtop/variants/cml/devtree.c
index 93d55c58ae..95a5d44ea3 100644
--- a/src/mainboard/starlabs/labtop/variants/cml/devtree.c
+++ b/src/mainboard/starlabs/labtop/variants/cml/devtree.c
@@ -41,6 +41,5 @@ void devtree_update(void)
nic_dev->enabled = 0;
/* Enable/Disable Webcam based on CMOS settings */
- if (get_uint_option("webcam", 1) == 0)
- cfg->usb2_ports[3].enable = 0;
+ cfg->usb2_ports[CONFIG_CCD_PORT].enable = get_uint_option("webcam", 1);
}
diff --git a/src/mainboard/starlabs/labtop/variants/kbl/devicetree.cb b/src/mainboard/starlabs/labtop/variants/kbl/devicetree.cb
index 3e7771d666..04dabb9d27 100644
--- a/src/mainboard/starlabs/labtop/variants/kbl/devicetree.cb
+++ b/src/mainboard/starlabs/labtop/variants/kbl/devicetree.cb
@@ -70,12 +70,12 @@ chip soc/intel/skylake
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)"
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)"
- # Internal Webcam
- register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)"
-
# Daughterboard SD Card
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)"
+ # Webcam
+ register "usb2_ports[CONFIG_CCD_PORT]" = "USB2_PORT_MID(OC_SKIP)"
+
# Internal Bluetooth
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)"
end
diff --git a/src/mainboard/starlabs/labtop/variants/kbl/devtree.c b/src/mainboard/starlabs/labtop/variants/kbl/devtree.c
index 566b0328e7..898519e876 100644
--- a/src/mainboard/starlabs/labtop/variants/kbl/devtree.c
+++ b/src/mainboard/starlabs/labtop/variants/kbl/devtree.c
@@ -38,6 +38,5 @@ void devtree_update(void)
nic_dev->enabled = 0;
/* Enable/Disable Webcam based on CMOS settings */
- if (get_uint_option("webcam", 1) == 0)
- cfg->usb2_ports[3].enable = 0;
+ cfg->usb2_ports[CONFIG_CCD_PORT].enable = get_uint_option("webcam", 1);
}
diff --git a/src/mainboard/starlabs/labtop/variants/tgl/devicetree.cb b/src/mainboard/starlabs/labtop/variants/tgl/devicetree.cb
index cf886cb166..cab707dea4 100644
--- a/src/mainboard/starlabs/labtop/variants/tgl/devicetree.cb
+++ b/src/mainboard/starlabs/labtop/variants/tgl/devicetree.cb
@@ -113,12 +113,12 @@ chip soc/intel/tigerlake
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)"
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)"
- # Internal Webcam
- register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)"
-
# Daughterboard SD Card
register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)"
+ # Webcam
+ register "usb2_ports[CONFIG_CCD_PORT]" = "USB2_PORT_MID(OC_SKIP)"
+
# Internal Bluetooth
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)"
end
diff --git a/src/mainboard/starlabs/labtop/variants/tgl/devtree.c b/src/mainboard/starlabs/labtop/variants/tgl/devtree.c
index 51243da7a6..1c280c4a34 100644
--- a/src/mainboard/starlabs/labtop/variants/tgl/devtree.c
+++ b/src/mainboard/starlabs/labtop/variants/tgl/devtree.c
@@ -54,8 +54,7 @@ void devtree_update(void)
nic_dev->enabled = 0;
/* Enable/Disable Webcam based on CMOS settings */
- if (get_uint_option("webcam", 1) == 0)
- cfg->usb2_ports[3].enable = 0;
+ cfg->usb2_ports[CONFIG_CCD_PORT].enable = get_uint_option("webcam", 1);
/* Enable/Disable Thunderbolt based on CMOS settings */
if (get_uint_option("thunderbolt", 1) == 0) {