summaryrefslogtreecommitdiff
path: root/src/mainboard/system76/tgl-u/variants/lemp10/overridetree.cb
blob: a4e30523676d0513504b30a6b1d8e98473faf204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# SPDX-License-Identifier: GPL-2.0-only

chip soc/intel/tigerlake
	# Power limits
	register "power_limits_config[POWER_LIMITS_U_4_CORE]" = "{
		.tdp_pl1_override = 20,
		.tdp_pl2_override = 30,
	}"
	register "power_limits_config[POWER_LIMITS_U_2_CORE]" = "{
		.tdp_pl1_override = 20,
		.tdp_pl2_override = 30,
	}"

	# GPE configuration
	register "pmc_gpe0_dw0" = "PMC_GPP_R"
	register "pmc_gpe0_dw1" = "PMC_GPP_B"
	register "pmc_gpe0_dw2" = "PMC_GPP_D"

	device domain 0 on
		subsystemid 0x1558 0x14a1 inherit

		device ref peg on
			# PCIe PEG0 x4, Clock 3 (SSD1)
			# Despite the name, SSD2_CLKREQ# is used for SSD1
			register "PcieClkSrcUsage[3]" = "0x40"
			register "PcieClkSrcClkReq[3]" = "3"
			chip soc/intel/common/block/pcie/rtd3
				register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C13)" # SSD1_PWR_DN#
				register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C22)" # GPP_C12_RTD3 (labeled incorrectly)
				register "srcclk_pin" = "3" # SSD2_CLKREQ#
				device generic 0 on end
			end
		end
		device ref north_xhci on # J_TYPEC1
			register "UsbTcPortEn" = "1"
			register "TcssXhciEn" = "1"
			chip drivers/usb/acpi
				device ref tcss_root_hub on
					chip drivers/usb/acpi
						register "desc" = ""USB3 J_TYPEC1""
						register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
						register "group" = "ACPI_PLD_GROUP(1, 1)"
						device ref tcss_usb3_port1 on end
					end
				end
			end
		end
		device ref tbt_dma0 on # J_TYPEC1
			chip drivers/intel/usb4/retimer
				register "dfp[0].power_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A23)"
				use tcss_usb3_port1 as dfp[0].typec_port
				device generic 0 on end
			end
		end

		device ref south_xhci on
			register "usb2_ports" = "{
				[0] = USB2_PORT_MID(OC_SKIP),		/* J_USB3_1 */
				[1] = USB2_PORT_MID(OC_SKIP),		/* J_USB3_2 */
				[2] = USB2_PORT_TYPE_C(OC_SKIP),	/* J_TYPEC1 */
				[6] = USB2_PORT_MID(OC_SKIP),		/* Camera */
				[9] = USB2_PORT_MID(OC_SKIP),		/* Bluetooth */
			}"
			register "usb3_ports" = "{
				[0] = USB3_PORT_DEFAULT(OC_SKIP),	/* J_USB3_1 */
				[1] = USB3_PORT_DEFAULT(OC_SKIP),	/* J_USB3_2 */
			}"
			# ACPI
			chip drivers/usb/acpi
				device ref xhci_root_hub on
					chip drivers/usb/acpi
						register "desc" = ""USB2 J_USB3_1""
						register "type" = "UPC_TYPE_A"
						register "group" = "ACPI_PLD_GROUP(1, 2)"
						device ref usb2_port1 on end
					end
					chip drivers/usb/acpi
						register "desc" = ""USB2 J_USB3_2""
						register "type" = "UPC_TYPE_A"
						register "group" = "ACPI_PLD_GROUP(2, 1)"
						device ref usb2_port2 on end
					end
					chip drivers/usb/acpi
						register "desc" = ""USB2 J_TYPEC1""
						register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
						register "group" = "ACPI_PLD_GROUP(1, 1)"
						device ref usb2_port3 on end
					end
					chip drivers/usb/acpi
						register "desc" = ""USB2 Camera""
						register "type" = "UPC_TYPE_INTERNAL"
						device ref usb2_port7 on end
					end
					chip drivers/usb/acpi
						register "desc" = ""USB2 Bluetooth""
						register "type" = "UPC_TYPE_INTERNAL"
						device ref usb2_port10 on end
					end
					chip drivers/usb/acpi
						register "desc" = ""USB3 J_USB3_1""
						register "type" = "UPC_TYPE_A"
						register "group" = "ACPI_PLD_GROUP(1, 1)"
						device ref usb3_port1 on end
					end
					chip drivers/usb/acpi
						register "desc" = ""USB3 J_USB3_2""
						register "type" = "UPC_TYPE_A"
						register "group" = "ACPI_PLD_GROUP(2, 1)"
						device ref usb3_port2 on end
					end
				end
			end
		end
		device ref sata on
			# SATA1 (SSD2)
			register "SataPortsEnable[1]" = "1"
			register "SataPortsDevSlp[1]" = "1"
			register "SataPortsEnableDitoConfig[1]" = "1"
			register "SataSalpSupport" = "1"
		end
		device ref pcie_rp3 on
			# PCIe root port #3 x1, Clock 1 (WLAN)
			register "PcieRpLtrEnable[2]" = "1"
			register "PcieClkSrcUsage[1]" = "2"
			register "PcieClkSrcClkReq[1]" = "1"
			register "PcieRpSlotImplemented[2]" = "1"
		end
		device ref pcie_rp6 on
			# PCIe root port #6 x1, Clock 2 (CARD)
			register "PcieRpLtrEnable[5]" = "1"
			register "PcieClkSrcUsage[2]" = "5"
			register "PcieClkSrcClkReq[2]" = "2"
		end
		device ref pcie_rp9 on
			# PCIe root port #9 x4, Clock 0 (SSD2)
			# Despite the name, SSD1_CLKREQ# is used for SSD2
			register "PcieRpLtrEnable[8]" = "1"
			register "PcieClkSrcUsage[0]" = "8"
			register "PcieClkSrcClkReq[0]" = "0"
			register "PcieRpSlotImplemented[8]" = "1"
			chip soc/intel/common/block/pcie/rtd3
				register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D14)" # SSD2_PWR_DN#
				register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D9)" # GPP_D13_RTD3 (labeled incorrectly)
				register "srcclk_pin" = "0"
				device generic 0 on end
			end
		end
		device ref pmc hidden
			# The pmc_mux chip driver is a placeholder for the
			# PMC.MUX device in the ACPI hierarchy.
			chip drivers/intel/pmc_mux
				device generic 0 on
					chip drivers/intel/pmc_mux/conn
						# J_TYPEC1
						use usb2_port3 as usb2_port
						use tcss_usb3_port1 as usb3_port
						# SBU & HSL follow CC
						device generic 0 alias conn0 on end
					end
				end
			end
		end
	end
end