Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/84348?usp=email )
Change subject: mb/google/volteer: Fix USB port definitions ......................................................................
mb/google/volteer: Fix USB port definitions
Commit bc8f5405b542 ("tgl mainboards: Move usb{2,3}_ports settings into XHCI device scope") not only moved the USB port definitions under the XHCI device reference, but also combined multiple register definitions. In doing so, it broke the inheritance from the baseboard, since the variant overridetree registers now replaced the entire usb2_ports/ usb3_ports structs, rather than replacing individual array elements therein. This resulted in any USB ports inherited from the baseboard and not overridden by the variant being non-function as they were not included in the resulting combined devicetree.
To fix this, return to overriding individual array elements in the usb2/3_ports structs.
TEST=build/boot google/drobit. Verify all USB ports present and functional. Verify mainboard/static.c in built shows all ports.
Change-Id: I54921fa4ecf594a1ecbcfa7c45e5d745d4a95652 Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/mainboard/google/volteer/variants/chronicler/overridetree.cb M src/mainboard/google/volteer/variants/collis/overridetree.cb M src/mainboard/google/volteer/variants/copano/overridetree.cb M src/mainboard/google/volteer/variants/delbin/overridetree.cb M src/mainboard/google/volteer/variants/drobit/overridetree.cb M src/mainboard/google/volteer/variants/eldrid/overridetree.cb M src/mainboard/google/volteer/variants/elemi/overridetree.cb M src/mainboard/google/volteer/variants/halvor/overridetree.cb M src/mainboard/google/volteer/variants/lindar/overridetree.cb M src/mainboard/google/volteer/variants/malefor/overridetree.cb M src/mainboard/google/volteer/variants/terrador/overridetree.cb M src/mainboard/google/volteer/variants/todor/overridetree.cb M src/mainboard/google/volteer/variants/voema/overridetree.cb M src/mainboard/google/volteer/variants/volet/overridetree.cb M src/mainboard/google/volteer/variants/voxel/overridetree.cb 15 files changed, 90 insertions(+), 126 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/84348/1
diff --git a/src/mainboard/google/volteer/variants/chronicler/overridetree.cb b/src/mainboard/google/volteer/variants/chronicler/overridetree.cb index 09fc980..bb91ebc 100644 --- a/src/mainboard/google/volteer/variants/chronicler/overridetree.cb +++ b/src/mainboard/google/volteer/variants/chronicler/overridetree.cb @@ -131,11 +131,9 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [2] = USB2_PORT_EMPTY, // Disable M.2 WWAN - [3] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C C1 - [8] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C C0 - }" + register "usb2_ports[2]" = "USB2_PORT_EMPTY" // Disable M.2 WWAN + register "usb2_ports[3]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C C1 + register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C C0
chip drivers/usb/acpi device ref xhci_root_hub on diff --git a/src/mainboard/google/volteer/variants/collis/overridetree.cb b/src/mainboard/google/volteer/variants/collis/overridetree.cb index ab4137e..df4b7f2 100644 --- a/src/mainboard/google/volteer/variants/collis/overridetree.cb +++ b/src/mainboard/google/volteer/variants/collis/overridetree.cb @@ -239,19 +239,15 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [0] = USB2_PORT_TYPE_C(OC1), // Type-A Port A0 - [1] = USB2_PORT_TYPE_C(OC2), // Type-A Port A1 - [2] = USB2_PORT_TYPE_C(OC0), // Type-C Port C1 - [3] = USB2_PORT_MID(OC_SKIP), // Front Camera - [4] = USB2_PORT_TYPE_C(OC3), // Type-C Port C0 - [5] = USB2_PORT_MID(OC_SKIP), // WFC Camera - }" + register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC1)" // Type-A Port A0 + register "usb2_ports[1]" = "USB2_PORT_TYPE_C(OC2)" // Type-A Port A1 + register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC0)" // Type-C Port C1 + register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" // Front Camera + register "usb2_ports[4]" = "USB2_PORT_TYPE_C(OC3)" // Type-C Port C0 + register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" // WFC Camera
- register "usb3_ports" = "{ - [0] = USB3_PORT_DEFAULT(OC1), // USB3/2 Type-A Port A0 - [1] = USB3_PORT_DEFAULT(OC2), // USB3/2 Type-A Port A1 - }" + register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC1)" // USB3/2 Type-A Port A0 + register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC2)" // USB3/2 Type-A Port A1
chip drivers/usb/acpi device ref xhci_root_hub on diff --git a/src/mainboard/google/volteer/variants/copano/overridetree.cb b/src/mainboard/google/volteer/variants/copano/overridetree.cb index 619b203..bf421df 100644 --- a/src/mainboard/google/volteer/variants/copano/overridetree.cb +++ b/src/mainboard/google/volteer/variants/copano/overridetree.cb @@ -266,14 +266,12 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [0] = USB2_PORT_TYPE_C(OC0), // Type-A / Type-C Port 0 - [2] = USB2_PORT_TYPE_C(OC1), // Type-A / Type-C Port 1 - [3] = USB2_PORT_MID(OC_SKIP), // Front Camera - [4] = USB2_PORT_TYPE_C(OC0), // Type-A / Type-C Port 0 - }" + register "usb2_ports[0]" = USB2_PORT_TYPE_C(OC0)" // Type-A / Type-C Port 0 + register "usb2_ports[2]" = USB2_PORT_TYPE_C(OC1)" // Type-A / Type-C Port 1 + register "usb2_ports[3]" = USB2_PORT_MID(OC_SKIP)" // Front Camera + register "usb2_ports[4]" = USB2_PORT_TYPE_C(OC0)" // Type-A / Type-C Port 0
- register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC0)" # Type-A / Type-C Port 0 + register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC0)" // Type-A / Type-C Port 0
chip drivers/usb/acpi device ref xhci_root_hub on diff --git a/src/mainboard/google/volteer/variants/delbin/overridetree.cb b/src/mainboard/google/volteer/variants/delbin/overridetree.cb index 92bd9e5..2b7a1f9 100644 --- a/src/mainboard/google/volteer/variants/delbin/overridetree.cb +++ b/src/mainboard/google/volteer/variants/delbin/overridetree.cb @@ -245,18 +245,16 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - // These settings improve the USB2 Port4 eye diagram - [3] = { - .enable = 1, - .tx_bias = USB2_BIAS_28P15MV, - .tx_emp_enable = USB2_PRE_EMP_ON, - .pre_emp_bias = USB2_BIAS_56P3MV, - .pre_emp_bit = USB2_HALF_BIT_PRE_EMP, - .type_c = 1, - }, - [8] = USB2_PORT_TYPE_C(OC_SKIP), + // These settings improve the USB2 Port4 eye diagram + register "usb2_ports[3]" = "{ + .enable = 1, + .tx_bias = USB2_BIAS_28P15MV, + .tx_emp_enable = USB2_PRE_EMP_ON, + .pre_emp_bias = USB2_BIAS_56P3MV, + .pre_emp_bit = USB2_HALF_BIT_PRE_EMP, + .type_c = 1, }" + register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC_SKIP)"
chip drivers/usb/acpi diff --git a/src/mainboard/google/volteer/variants/drobit/overridetree.cb b/src/mainboard/google/volteer/variants/drobit/overridetree.cb index 1269f17..d5a2969 100644 --- a/src/mainboard/google/volteer/variants/drobit/overridetree.cb +++ b/src/mainboard/google/volteer/variants/drobit/overridetree.cb @@ -257,10 +257,8 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [3] = USB2_PORT_TYPE_C(OC0), // Type-C port 1 - [8] = USB2_PORT_TYPE_C(OC3), // Type-C port 0 - }" + register "usb2_ports[3]" = "USB2_PORT_TYPE_C(OC0)" // Type-C port 1 + register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC3)" // Type-C port 0
chip drivers/usb/acpi device ref xhci_root_hub on diff --git a/src/mainboard/google/volteer/variants/eldrid/overridetree.cb b/src/mainboard/google/volteer/variants/eldrid/overridetree.cb index 2b2f32c..951c3d3 100644 --- a/src/mainboard/google/volteer/variants/eldrid/overridetree.cb +++ b/src/mainboard/google/volteer/variants/eldrid/overridetree.cb @@ -222,35 +222,35 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [1] = USB2_PORT_EMPTY, // Disable Type-A Port A1 - [2] = USB2_PORT_EMPTY, // Disable M.2 WWAN + // Disable Type-A Port A1 + register "usb2_ports[1]" = "USB2_PORT_EMPTY"
- // improve the USB2 Port1 eye diagram - [3] = { - .enable = 1, - .ocpin = OC_SKIP, - .tx_bias = USB2_BIAS_39P35MV, - .tx_emp_enable = USB2_DE_EMP_ON_PRE_EMP_ON, - .pre_emp_bias = USB2_BIAS_39P35MV, - .pre_emp_bit = USB2_FULL_BIT_PRE_EMP, - .type_c = 1, - }, + // Disable M.2 WWAN + register "usb2_ports[2]" = "USB2_PORT_EMPTY"
- // lower camera driving - [4] = { - .enable = 1, - .ocpin = OC_SKIP, - .tx_bias = USB2_BIAS_0MV, - .tx_emp_enable = USB2_EMP_OFF, - .pre_emp_bias = USB2_BIAS_0MV, - .pre_emp_bit = USB2_FULL_BIT_PRE_EMP, - }, - - // Type-A / Type-C C0 - [8] = USB2_PORT_TYPE_C(OC_SKIP), + // Improve the USB2 Port4 eye diagram + register "usb2_ports[3]" = "{ + .enable = 1, + .ocpin = OC_SKIP, + .tx_bias = USB2_BIAS_39P35MV, + .tx_emp_enable = USB2_DE_EMP_ON_PRE_EMP_ON, + .pre_emp_bias = USB2_BIAS_39P35MV, + .pre_emp_bit = USB2_FULL_BIT_PRE_EMP, + .type_c = 1, }"
+ // Lower camera driving + register "usb2_ports[4]" = "{ + .enable = 1, + .ocpin = OC_SKIP, + .tx_bias = USB2_BIAS_0MV, + .tx_emp_enable = USB2_EMP_OFF, + .pre_emp_bias = USB2_BIAS_0MV, + .pre_emp_bit = USB2_FULL_BIT_PRE_EMP, + }" + + // Type-A / Type-C C0 + register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC_SKIP)" chip drivers/usb/acpi device ref xhci_root_hub on chip drivers/usb/acpi diff --git a/src/mainboard/google/volteer/variants/elemi/overridetree.cb b/src/mainboard/google/volteer/variants/elemi/overridetree.cb index 7fa38bf..33cef19 100644 --- a/src/mainboard/google/volteer/variants/elemi/overridetree.cb +++ b/src/mainboard/google/volteer/variants/elemi/overridetree.cb @@ -131,11 +131,9 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [2] = USB2_PORT_EMPTY, // Disable M.2 WWAN - [3] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C C1 - [8] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C C0 - }" + register "usb2_ports[2]" = "USB2_PORT_EMPTY" // Disable M.2 WWAN + register "usb2_ports[3]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C C1 + register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C C0
chip drivers/usb/acpi device ref xhci_root_hub on diff --git a/src/mainboard/google/volteer/variants/halvor/overridetree.cb b/src/mainboard/google/volteer/variants/halvor/overridetree.cb index 589dfaf..140f011 100644 --- a/src/mainboard/google/volteer/variants/halvor/overridetree.cb +++ b/src/mainboard/google/volteer/variants/halvor/overridetree.cb @@ -122,14 +122,11 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [1] = USB2_PORT_MID(OC_SKIP), // Type-A / Type-C Port 0 - [3] = USB2_PORT_MID(OC_SKIP), // Type-A / Type-C Port 1 - [4] = USB2_PORT_MID(OC_SKIP), // Front Camera - [5] = USB2_PORT_MID(OC_SKIP), // Type-A / Type-C Port 2 - [9] = USB2_PORT_MID(OC_SKIP), // Reserve for CNVi BT - }" - + register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" // Type-A / Type-C Port 0 + register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" // Type-A / Type-C Port 1 + register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" // Front Camera + register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" // Type-A / Type-C Port 2 + register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" // Reserve for CNVi BT chip drivers/usb/acpi device ref xhci_root_hub on chip drivers/usb/acpi diff --git a/src/mainboard/google/volteer/variants/lindar/overridetree.cb b/src/mainboard/google/volteer/variants/lindar/overridetree.cb index 2229af7..e7f04cd 100644 --- a/src/mainboard/google/volteer/variants/lindar/overridetree.cb +++ b/src/mainboard/google/volteer/variants/lindar/overridetree.cb @@ -318,13 +318,11 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [0] = USB2_PORT_MID(OC_SKIP), // Type-A Port A0 - [3] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C C1 - [4] = USB2_PORT_MID(OC_SKIP), // M.2 Camera - [8] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C C0 - [9] = USB2_PORT_MID(OC_SKIP), // M.2 Bluetooth - }" + register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" // Type-A Port A0 + register "usb2_ports[3]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C C1 + register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" // M.2 Camera + register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C C0 + register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" // M.2 Bluetooth
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC1)" # USB3/2 Type A port A0
diff --git a/src/mainboard/google/volteer/variants/malefor/overridetree.cb b/src/mainboard/google/volteer/variants/malefor/overridetree.cb index 1942657..b4098f3 100644 --- a/src/mainboard/google/volteer/variants/malefor/overridetree.cb +++ b/src/mainboard/google/volteer/variants/malefor/overridetree.cb @@ -104,16 +104,13 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [0] = USB2_PORT_MID(OC_SKIP), // Type-A Port A0 - [3] = USB2_PORT_MID(OC_SKIP), // Type-A / Type-C C1 - [4] = USB2_PORT_MID(OC_SKIP), // M.2 Camera - [8] = USB2_PORT_MID(OC_SKIP), // Type-A / Type-C C0 - [9] = USB2_PORT_MID(OC_SKIP), // M.2 Bluetooth - }" + register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" // Type-A Port A0 + register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" // Type-A / Type-C C1 + register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" // M.2 Camera + register "usb2_ports[8]" = "USB2_PORT_MID(OC_SKIP)" // Type-A / Type-C C0 + register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" // M.2 Bluetooth
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC1)" # USB3/2 Type A port A0 - chip drivers/usb/acpi device ref xhci_root_hub on chip drivers/usb/acpi diff --git a/src/mainboard/google/volteer/variants/terrador/overridetree.cb b/src/mainboard/google/volteer/variants/terrador/overridetree.cb index 4b814eb..b945d61 100644 --- a/src/mainboard/google/volteer/variants/terrador/overridetree.cb +++ b/src/mainboard/google/volteer/variants/terrador/overridetree.cb @@ -186,18 +186,14 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [0] = USB2_PORT_TYPE_C(OC0), // Type-A / Type-C Port 0 - [1] = USB2_PORT_TYPE_C(OC1), // Type-A / Type-C Port 1 - [2] = USB2_PORT_TYPE_C(OC1), // Type-A / Type-C Port 1 - [3] = USB2_PORT_MID(OC_SKIP), // Front Camera - [4] = USB2_PORT_TYPE_C(OC0), // Type-A / Type-C Port 0 - }" + register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC0)" // Type-A / Type-C Port 0 + register "usb2_ports[1]" = "USB2_PORT_TYPE_C(OC1)" // Type-A / Type-C Port 1 + register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC1)" // Type-A / Type-C Port 1 + register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" // Front Camera + register "usb2_ports[4]" = "USB2_PORT_TYPE_C(OC0)" // Type-A / Type-C Port 0
- register "usb3_ports" = "{ - [0] = USB3_PORT_DEFAULT(OC0), // Type-A / Type-C Port 0 - [1] = USB3_PORT_DEFAULT(OC1), // Type-A / Type-C Port 1 - }" + register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC0)" // Type-A / Type-C Port 0 + register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC1)" // Type-A / Type-C Port 1
chip drivers/usb/acpi device ref xhci_root_hub on diff --git a/src/mainboard/google/volteer/variants/todor/overridetree.cb b/src/mainboard/google/volteer/variants/todor/overridetree.cb index c511fed..515b64a 100644 --- a/src/mainboard/google/volteer/variants/todor/overridetree.cb +++ b/src/mainboard/google/volteer/variants/todor/overridetree.cb @@ -12,18 +12,14 @@
device domain 0 on device ref south_xhci on - register "usb2_ports" = "{ - [0] = USB2_PORT_TYPE_C(OC0), // Type-A / Type-C Port 0 - [1] = USB2_PORT_TYPE_C(OC1), // Type-A / Type-C Port 1 - [2] = USB2_PORT_TYPE_C(OC1), // Type-A / Type-C Port 1 - [3] = USB2_PORT_MID(OC_SKIP), // Front Camera - [4] = USB2_PORT_TYPE_C(OC0), // Type-A / Type-C Port 0 - }" + register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC0)" // Type-A / Type-C Port 0 + register "usb2_ports[1]" = "USB2_PORT_TYPE_C(OC1)" // Type-A / Type-C Port 1 + register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC1)" // Type-A / Type-C Port 1 + register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" // Front Camera + register "usb2_ports[4]" = "USB2_PORT_TYPE_C(OC0)" // Type-A / Type-C Port 0
- register "usb3_ports" = "{ - [0] = USB3_PORT_DEFAULT(OC0), // Type-A / Type-C Port 0 - [1] = USB3_PORT_DEFAULT(OC1), // Type-A / Type-C Port 1 - }" + register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC0)" // Type-A / Type-C Port 0 + register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC1)" // Type-A / Type-C Port 1 end device ref dptf on chip drivers/intel/dptf diff --git a/src/mainboard/google/volteer/variants/voema/overridetree.cb b/src/mainboard/google/volteer/variants/voema/overridetree.cb index d895b1a..662700f 100644 --- a/src/mainboard/google/volteer/variants/voema/overridetree.cb +++ b/src/mainboard/google/volteer/variants/voema/overridetree.cb @@ -156,10 +156,8 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [2] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C Port 1 - [4] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C Port 0 - }" + register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C Port 1 + register "usb2_ports[4]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C Port 0
chip drivers/usb/acpi device ref xhci_root_hub on diff --git a/src/mainboard/google/volteer/variants/volet/overridetree.cb b/src/mainboard/google/volteer/variants/volet/overridetree.cb index 7125f40..4fba7b4 100644 --- a/src/mainboard/google/volteer/variants/volet/overridetree.cb +++ b/src/mainboard/google/volteer/variants/volet/overridetree.cb @@ -182,10 +182,8 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [3] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C Cl - [8] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C C0 - }" + register "usb2_ports[3]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C Cl + register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C C0
chip drivers/usb/acpi device ref xhci_root_hub on diff --git a/src/mainboard/google/volteer/variants/voxel/overridetree.cb b/src/mainboard/google/volteer/variants/voxel/overridetree.cb index 8367533..f319a23 100644 --- a/src/mainboard/google/volteer/variants/voxel/overridetree.cb +++ b/src/mainboard/google/volteer/variants/voxel/overridetree.cb @@ -277,10 +277,8 @@ end end device ref south_xhci on - register "usb2_ports" = "{ - [3] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C Cl - [8] = USB2_PORT_TYPE_C(OC_SKIP), // Type-A / Type-C C0 - }" + register "usb2_ports[3]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C Cl + register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC_SKIP)" // Type-A / Type-C C0
chip drivers/usb/acpi device ref xhci_root_hub on