mb/system76/adl/dt: Use comma separated list for arrays

In order to improve the readability of the settings, use a comma
separated list to assign values to their indexes instead of repeating
the option name for each index.

Don't convert the settings for PCIe root ports as they should stay in
the device scope of them.

While on it, remove superfluous comments related to modified lines.

Change-Id: I2f641ce1fc44a9d7c9f9c403d255997214021f47
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78668
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Felix Singer 2023-10-26 16:32:19 +02:00 committed by Felix Singer
parent 983b169a36
commit 1b102cae36
7 changed files with 100 additions and 86 deletions

View File

@ -39,18 +39,20 @@ chip soc/intel/alderlake
end
end
device ref xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # Type-A Motherboard
register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # Type-A Multi Board
register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC1 (USB 3.2 Gen 2)
register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[5]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC2 (Thunderbolt)
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A Motherboard
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_TYPEC1 CH1
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_TYPEC1 CH2
register "usb2_ports" = "{
[0] = USB2_PORT_MID(OC_SKIP), /* Type-A Motherboard */
[1] = USB2_PORT_MID(OC_SKIP), /* Type-A Multi Board */
[2] = USB2_PORT_TYPE_C(OC_SKIP), /* J_TYPEC1 (USB 3.2 Gen 2) */
[4] = USB2_PORT_MID(OC_SKIP), /* Fingerprint */
[5] = USB2_PORT_TYPE_C(OC_SKIP), /* J_TYPEC2 (Thunderbolt) */
[6] = USB2_PORT_MID(OC_SKIP), /* Camera */
[9] = USB2_PORT_MID(OC_SKIP), /* Bluetooth */
}"
register "usb3_ports" = "{
[0] = USB3_PORT_DEFAULT(OC_SKIP), /* Type-A Motherboard */
[1] = USB3_PORT_DEFAULT(OC_SKIP), /* J_TYPEC1 CH1 */
[2] = USB3_PORT_DEFAULT(OC_SKIP), /* J_TYPEC1 CH2 */
}"
# ACPI
chip drivers/usb/acpi
device ref xhci_root_hub on

View File

@ -46,18 +46,20 @@ chip soc/intel/alderlake
end
end
device ref xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # J_USB3_2
register "usb2_ports[1]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC1
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # J_USB3_1
register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[5]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC2
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-C
register "usb2_ports" = "{
[0] = USB2_PORT_MID(OC_SKIP), /* J_USB3_2 */
[1] = USB2_PORT_TYPE_C(OC_SKIP), /* J_TYPEC1 */
[2] = USB2_PORT_MID(OC_SKIP), /* J_USB3_1 */
[4] = USB2_PORT_MID(OC_SKIP), /* Fingerprint */
[5] = USB2_PORT_TYPE_C(OC_SKIP), /* J_TYPEC2 */
[6] = USB2_PORT_MID(OC_SKIP), /* Camera */
[9] = USB2_PORT_MID(OC_SKIP), /* Bluetooth */
}"
register "usb3_ports" = "{
[0] = USB3_PORT_DEFAULT(OC_SKIP), /* Type-A */
[2] = USB3_PORT_DEFAULT(OC_SKIP), /* Type-A */
[3] = USB3_PORT_DEFAULT(OC_SKIP), /* Type-C */
}"
# ACPI
chip drivers/usb/acpi
device ref xhci_root_hub on

View File

@ -76,19 +76,21 @@ chip soc/intel/alderlake
end
end
device ref xhci on
# USB2
register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC1
register "usb2_ports[4]" = "USB2_PORT_MID(OC_SKIP)" # USB 3.2 Type-A audio board
register "usb2_ports[5]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC2
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[7]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[8]" = "USB2_PORT_MID(OC_SKIP)" # USB 2.0 Type-A audio board
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.2 Type-A audio board
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_TYPEC2
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_TYPEC1
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_TYPEC1
register "usb2_ports" = "{
[2] = USB2_PORT_TYPE_C(OC_SKIP), /* J_TYPEC1 */
[4] = USB2_PORT_MID(OC_SKIP), /* USB 3.2 Type-A audio board */
[5] = USB2_PORT_TYPE_C(OC_SKIP), /* J_TYPEC2 */
[6] = USB2_PORT_MID(OC_SKIP), /* Fingerprint */
[7] = USB2_PORT_MID(OC_SKIP), /* Camera */
[8] = USB2_PORT_MID(OC_SKIP), /* USB 2.0 Type-A audio board */
[9] = USB2_PORT_MID(OC_SKIP), /* Bluetooth */
}"
register "usb3_ports" = "{
[0] = USB3_PORT_DEFAULT(OC_SKIP), /* USB 3.2 Type-A audio board */
[1] = USB3_PORT_DEFAULT(OC_SKIP), /* J_TYPEC2 */
[2] = USB3_PORT_DEFAULT(OC_SKIP), /* J_TYPEC1 */
[3] = USB3_PORT_DEFAULT(OC_SKIP), /* J_TYPEC1 */
}"
end
device ref pcie_rp5 on
# PCIe RP#5 x4, Clock 1 (SSD)

View File

@ -83,18 +83,20 @@ chip soc/intel/alderlake
end
device ref tcss_dma0 on end
device ref xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # USB 3.2 Type-A audio board
register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC_SKIP)" # USB 3.2 Type-C
register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # USB 2.0 Type-A audio board
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[7]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC_SKIP)" # Thunderbolt Type-C
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.2 Type-A audio board
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.2 Type-C side A
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB 3.2 Type-C side B
register "usb2_ports" = "{
[0] = USB2_PORT_MID(OC_SKIP), /* USB 3.2 Type-A audio board */
[2] = USB2_PORT_TYPE_C(OC_SKIP), /* USB 3.2 Type-C */
[5] = USB2_PORT_MID(OC_SKIP), /* USB 2.0 Type-A audio board */
[6] = USB2_PORT_MID(OC_SKIP), /* Fingerprint */
[7] = USB2_PORT_MID(OC_SKIP), /* Camera */
[8] = USB2_PORT_TYPE_C(OC_SKIP), /* Thunderbolt Type-C */
[9] = USB2_PORT_MID(OC_SKIP), /* Bluetooth */
}"
register "usb3_ports" = "{
[0] = USB3_PORT_DEFAULT(OC_SKIP), /* USB 3.2 Type-A audio board */
[2] = USB3_PORT_DEFAULT(OC_SKIP), /* USB 3.2 Type-C side A */
[3] = USB3_PORT_DEFAULT(OC_SKIP), /* USB 3.2 Type-C side B */
}"
end
device ref pcie_rp5 on
# PCIe root port #5 x1, Clock 2 (WLAN)

View File

@ -39,17 +39,19 @@ chip soc/intel/alderlake
end
end
device ref xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_MID(OC_SKIP)" # Type-A Left
register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # Type-A Right
register "usb2_ports[2]" = "USB2_PORT_TYPE_C(OC_SKIP)" # J_TYPEC1
register "usb2_ports[3]" = "USB2_PORT_MID(OC_SKIP)" # 3G/LTE
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A Left
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # Type-A Right
register "usb3_ports[3]" = "USB3_PORT_DEFAULT(OC_SKIP)" # 3G/LTE
register "usb2_ports" = "{
[0] = USB2_PORT_MID(OC_SKIP), /* Type-A Left */
[1] = USB2_PORT_MID(OC_SKIP), /* Type-A Right */
[2] = USB2_PORT_TYPE_C(OC_SKIP), /* J_TYPEC1 */
[3] = USB2_PORT_MID(OC_SKIP), /* 3G/LTE */
[6] = USB2_PORT_MID(OC_SKIP), /* Camera */
[9] = USB2_PORT_MID(OC_SKIP), /* Bluetooth */
}"
register "usb3_ports" = "{
[0] = USB3_PORT_DEFAULT(OC_SKIP), /* Type-A Left */
[1] = USB3_PORT_DEFAULT(OC_SKIP), /* Type-A Right */
[3] = USB3_PORT_DEFAULT(OC_SKIP), /* 3G/LTE */
}"
# ACPI
chip drivers/usb/acpi
device ref xhci_root_hub on

View File

@ -64,19 +64,21 @@ chip soc/intel/alderlake
end
end
device ref xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC_SKIP)" # TYPEC1 (USB 3.2 Gen2)
register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # J_USB2
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # J_USB1
register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # Per-KB
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[7]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC_SKIP)" # TYPEC2 (Thunderbolt)
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # TYPEC1 (USB 3.2 Gen2)
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_USB2
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_USB1
register "usb2_ports" = "{
[0] = USB2_PORT_TYPE_C(OC_SKIP), /* TYPEC1 (USB 3.2 Gen2) */
[1] = USB2_PORT_MID(OC_SKIP), /* J_USB2 */
[2] = USB2_PORT_MID(OC_SKIP), /* J_USB1 */
[5] = USB2_PORT_MID(OC_SKIP), /* Per-KB */
[6] = USB2_PORT_MID(OC_SKIP), /* Fingerprint */
[7] = USB2_PORT_MID(OC_SKIP), /* Camera */
[8] = USB2_PORT_TYPE_C(OC_SKIP), /* TYPEC2 (Thunderbolt) */
[9] = USB2_PORT_MID(OC_SKIP), /* Bluetooth */
}"
register "usb3_ports" = "{
[0] = USB3_PORT_DEFAULT(OC_SKIP), /* TYPEC1 (USB 3.2 Gen2) */
[1] = USB3_PORT_DEFAULT(OC_SKIP), /* J_USB2 */
[2] = USB3_PORT_DEFAULT(OC_SKIP), /* J_USB1 */
}"
# ACPI
chip drivers/usb/acpi
device ref xhci_root_hub on

View File

@ -64,19 +64,21 @@ chip soc/intel/alderlake
end
end
device ref xhci on
# USB2
register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC_SKIP)" # TYPEC1 (USB 3.2 Gen2)
register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # J_USB2
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # J_USB1
register "usb2_ports[5]" = "USB2_PORT_MID(OC_SKIP)" # Per-KB
register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Fingerprint
register "usb2_ports[7]" = "USB2_PORT_MID(OC_SKIP)" # Camera
register "usb2_ports[8]" = "USB2_PORT_TYPE_C(OC_SKIP)" # TYPEC2 (Thunderbolt)
register "usb2_ports[9]" = "USB2_PORT_MID(OC_SKIP)" # Bluetooth
# USB3
register "usb3_ports[0]" = "USB3_PORT_DEFAULT(OC_SKIP)" # TYPEC1 (USB 3.2 Gen2)
register "usb3_ports[1]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_USB2
register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # J_USB1
register "usb2_ports" = "{
[0] = USB2_PORT_TYPE_C(OC_SKIP), /* TYPEC1 (USB 3.2 Gen2) */
[1] = USB2_PORT_MID(OC_SKIP), /* J_USB2 */
[2] = USB2_PORT_MID(OC_SKIP), /* J_USB1 */
[5] = USB2_PORT_MID(OC_SKIP), /* Per-KB */
[6] = USB2_PORT_MID(OC_SKIP), /* Fingerprint */
[7] = USB2_PORT_MID(OC_SKIP), /* Camera */
[8] = USB2_PORT_TYPE_C(OC_SKIP), /* TYPEC2 (Thunderbolt) */
[9] = USB2_PORT_MID(OC_SKIP), /* Bluetooth */
}"
register "usb3_ports" = "{
[0] = USB3_PORT_DEFAULT(OC_SKIP), /* TYPEC1 (USB 3.2 Gen2) */
[1] = USB3_PORT_DEFAULT(OC_SKIP), /* J_USB2 */
[2] = USB3_PORT_DEFAULT(OC_SKIP), /* J_USB1 */
}"
# ACPI
chip drivers/usb/acpi
device ref xhci_root_hub on