mb/google/fatcat/var/fatcat: Refactor GPIO programming for UFS support
[coreboot.git] / src / mainboard / google / brya / variants / anahera / overridetree.cb
blob95787eec85d7b5b8efeafd02fe5f129ad741999e
1 fw_config
2 field DB_SD 0 1
3 option SD_ABSENT 0
4 option SD_GL9750 1
5 end
6 field KB_BL 2 2
7 option KB_BL_ABSENT 0
8 option KB_BL_PRESENT 1
9 end
10 field AUDIO 3 5
11 option AUDIO_UNKNOWN 0
12 option MAX98360_ALC5682I_I2S 1
13 option MAX98360_ALC5682IVS_I2S 2
14 end
15 field DB_LTE 6 7
16 option LTE_ABSENT 0
17 option LTE_USB 1
18 end
19 field EPS 10 10
20 option PRIVACY_SCREEN_ABSENT 0
21 option PRIVACY_SCREEN 1
22 end
23 end
24 chip soc/intel/alderlake
25 register "sagv" = "SaGv_Enabled"
27 # As per Intel Advisory doc#723158, the change is required to prevent possible
28 # display flickering issue.
29 register "usb2_phy_sus_pg_disable" = "1"
31 # Acoustic settings
32 register "acoustic_noise_mitigation" = "true"
33 register "slow_slew_rate[VR_DOMAIN_IA]" = "SLEW_FAST_8"
34 register "slow_slew_rate[VR_DOMAIN_GT]" = "SLEW_FAST_8"
35 register "fast_pkg_c_ramp_disable[VR_DOMAIN_IA]" = "1"
36 register "fast_pkg_c_ramp_disable[VR_DOMAIN_GT]" = "1"
38 # Intel Common SoC Config
39 #+-------------------+---------------------------+
40 #| Field | Value |
41 #+-------------------+---------------------------+
42 #| GSPI1 | Fingerprint MCU |
43 #| I2C0 | Audio |
44 #| I2C1 | cr50 TPM. Early init is |
45 #| | required to set up a BAR |
46 #| | for TPM communication |
47 #| I2C3 | Touchscreen |
48 #| I2C5 | Trackpad |
49 #+-------------------+---------------------------+
50 register "common_soc_config" = "{
51 .i2c[0] = {
52 .speed = I2C_SPEED_FAST,
53 .rise_time_ns = 650,
54 .fall_time_ns = 400,
55 .data_hold_time_ns = 50,
57 .i2c[1] = {
58 .early_init = 1,
59 .speed = I2C_SPEED_FAST,
60 .rise_time_ns = 600,
61 .fall_time_ns = 400,
62 .data_hold_time_ns = 50,
64 .i2c[3] = {
65 .speed = I2C_SPEED_FAST,
66 .rise_time_ns = 650,
67 .fall_time_ns = 400,
68 .data_hold_time_ns = 50,
70 .i2c[5] = {
71 .speed = I2C_SPEED_FAST,
72 .rise_time_ns = 650,
73 .fall_time_ns = 400,
74 .speed_config[0] = {
75 .speed = I2C_SPEED_FAST,
76 .scl_lcnt = 170,
77 .scl_hcnt = 70,
78 .sda_hold = 40,
82 register "tcc_offset" = "3" # TCC of 97C
83 register "usb2_ports[1]" = "USB2_PORT_MID(OC_SKIP)" # Type-A MLB Port
84 register "usb2_ports[6]" = "USB2_PORT_MID(OC_SKIP)" # Smart Card
85 register "usb3_ports[2]" = "USB3_PORT_DEFAULT(OC_SKIP)" # USB3/2 Type A MLB port
86 register "tcss_ports[1]" = "TCSS_PORT_EMPTY"
87 device domain 0 on
88 device ref igpu on
89 chip drivers/gfx/generic
90 register "device_count" = "6"
91 # DDIA for eDP
92 register "device[0].name" = ""LCD0""
93 # Use ChromeOS privacy screen _HID
94 register "device[0].hid" = ""GOOG0010""
95 # Internal panel on the first port of the graphics chip
96 register "device[0].type" = "panel"
97 register "device[0].privacy.enabled" = "1"
98 register "device[0].privacy.gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H21)"
99 # DDIB for HDMI
100 register "device[1].name" = ""DD01""
101 # TCP0 (DP-1) for port C0
102 register "device[2].name" = ""DD02""
103 register "device[2].use_pld" = "true"
104 register "device[2].pld" = "ACPI_PLD_TYPE_C(LEFT, RIGHT, ACPI_PLD_GROUP(1, 1))"
105 # TCP1 (DP-2) is unused for any ports but still enumerated in the kernel, so GFX device is added for TCP1
106 register "device[3].name" = ""DD03""
107 # TCP2 (DP-3) for port C2
108 register "device[4].name" = ""DD04""
109 register "device[4].use_pld" = "true"
110 register "device[4].pld" = "ACPI_PLD_TYPE_C(RIGHT, LEFT, ACPI_PLD_GROUP(2, 1))"
111 # TCP3 (DP-4) is unused for any ports but still enumerated in the kernel, so GFX device is added for TCP3
112 register "device[5].name" = ""DD05""
113 device generic 0 on
114 probe EPS PRIVACY_SCREEN
117 chip drivers/gfx/generic
118 register "device_count" = "6"
119 # DDIA for eDP
120 register "device[0].name" = ""LCD0""
121 # Internal panel on the first port of the graphics chip
122 register "device[0].type" = "panel"
123 # DDIB for HDMI
124 register "device[1].name" = ""DD01""
125 # TCP0 (DP-1) for port C0
126 register "device[2].name" = ""DD02""
127 register "device[2].use_pld" = "true"
128 register "device[2].pld" = "ACPI_PLD_TYPE_C(LEFT, RIGHT, ACPI_PLD_GROUP(1, 1))"
129 # TCP1 (DP-2) is unused for any ports but still enumerated in the kernel, so GFX device is added for TCP1
130 register "device[3].name" = ""DD03""
131 # TCP2 (DP-3) for port C2
132 register "device[4].name" = ""DD04""
133 register "device[4].use_pld" = "true"
134 register "device[4].pld" = "ACPI_PLD_TYPE_C(RIGHT, LEFT, ACPI_PLD_GROUP(2, 1))"
135 # TCP3 (DP-4) is unused for any ports but still enumerated in the kernel, so GFX device is added for TCP3
136 register "device[5].name" = ""DD05""
137 device generic 0 on
138 probe EPS PRIVACY_SCREEN_ABSENT
141 end # Integrated Graphics Device
142 device ref dtt on
143 chip drivers/intel/dptf
144 ## sensor information
145 register "options.tsr[0].desc" = ""DRAM""
146 register "options.tsr[1].desc" = ""Soc""
147 register "options.tsr[2].desc" = ""Charger""
148 register "options.tsr[3].desc" = ""Regulator""
149 # TODO: below values are initial reference values only
150 ## Passive Policy
151 register "policies.passive" = "{
152 [0] = DPTF_PASSIVE(CPU, CPU, 95, 5000),
153 [1] = DPTF_PASSIVE(CPU, TEMP_SENSOR_0, 75, 5000),
154 [2] = DPTF_PASSIVE(CPU, TEMP_SENSOR_1, 75, 5000),
155 [3] = DPTF_PASSIVE(CHARGER, TEMP_SENSOR_2, 75, 5000),
156 [4] = DPTF_PASSIVE(CPU, TEMP_SENSOR_3, 75, 5000),
158 ## Critical Policy
159 register "policies.critical" = "{
160 [0] = DPTF_CRITICAL(CPU, 105, SHUTDOWN),
161 [1] = DPTF_CRITICAL(TEMP_SENSOR_0, 85, SHUTDOWN),
162 [2] = DPTF_CRITICAL(TEMP_SENSOR_1, 85, SHUTDOWN),
163 [3] = DPTF_CRITICAL(TEMP_SENSOR_2, 85, SHUTDOWN),
164 [4] = DPTF_CRITICAL(TEMP_SENSOR_3, 85, SHUTDOWN),
166 register "controls.power_limits" = "{
167 .pl1 = {
168 .min_power = 3000,
169 .max_power = 15000,
170 .time_window_min = 28 * MSECS_PER_SEC,
171 .time_window_max = 32 * MSECS_PER_SEC,
172 .granularity = 200,
174 .pl2 = {
175 .min_power = 55000,
176 .max_power = 55000,
177 .time_window_min = 28 * MSECS_PER_SEC,
178 .time_window_max = 32 * MSECS_PER_SEC,
179 .granularity = 1000,
182 ## Charger Performance Control (Control, mA)
183 register "controls.charger_perf" = "{
184 [0] = { 255, 1700 },
185 [1] = { 24, 1500 },
186 [2] = { 16, 1000 },
187 [3] = { 8, 500 }
189 device generic 0 on end
192 device ref tbt_pcie_rp1 off end
193 device ref cnvi_wifi on
194 chip drivers/wifi/generic
195 register "wake" = "GPE0_PME_B0"
196 device generic 0 on end
199 device ref pcie_rp6 off end
200 device ref pcie_rp7 on
201 # Enable PCIE eMMC bridge 7 using clk 6
202 register "pch_pcie_rp[PCH_RP(7)]" = "{
203 .clk_src = 6,
204 .clk_req = 6,
205 .flags = PCIE_RP_HOTPLUG | PCIE_RP_AER,
207 end #PCIE7 EMMC
208 device ref tcss_dma0 on
209 chip drivers/intel/usb4/retimer
210 register "dfp[0].power_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E4)"
211 use tcss_usb3_port1 as dfp[0].typec_port
212 device generic 0 on end
215 device ref tcss_dma1 on
216 chip drivers/intel/usb4/retimer
217 register "dfp[0].power_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E4)"
218 use tcss_usb3_port3 as dfp[0].typec_port
219 device generic 0 on end
222 device ref pcie_rp8 on
223 chip soc/intel/common/block/pcie/rtd3
224 register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_H13)"
225 register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D18)"
226 register "srcclk_pin" = "3"
227 device generic 0 on end
229 end #PCIE8 SD card
230 device ref i2c0 on
231 chip drivers/i2c/generic
232 register "hid" = ""10EC5682""
233 register "name" = ""RT58""
234 register "desc" = ""Headset Codec""
235 register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_A23)"
236 # Set the jd_src to RT5668_JD1 for jack detection
237 register "property_count" = "1"
238 register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER"
239 register "property_list[0].name" = ""realtek,jd-src""
240 register "property_list[0].integer" = "1"
241 device i2c 1a on
242 probe AUDIO MAX98360_ALC5682I_I2S
245 chip drivers/i2c/generic
246 register "hid" = ""RTL5682""
247 register "name" = ""RT58""
248 register "desc" = ""Headset Codec""
249 register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_BOTH(GPP_A23)"
250 # Set the jd_src to RT5668_JD1 for jack detection
251 register "property_count" = "1"
252 register "property_list[0].type" = "ACPI_DP_TYPE_INTEGER"
253 register "property_list[0].name" = ""realtek,jd-src""
254 register "property_list[0].integer" = "1"
255 device i2c 1a on
256 probe AUDIO MAX98360_ALC5682IVS_I2S
259 end #I2C0
260 device ref i2c1 on
261 chip drivers/i2c/tpm
262 register "hid" = ""GOOG0005""
263 register "irq" = "ACPI_IRQ_EDGE_LOW(GPP_A13_IRQ)"
264 device i2c 50 on end
267 device ref i2c3 on
268 chip drivers/i2c/generic
269 register "hid" = ""ELAN0001""
270 register "desc" = ""ELAN Touchscreen""
271 register "irq" = "ACPI_IRQ_LEVEL_LOW(GPP_C7_IRQ)"
272 register "detect" = "1"
273 register "reset_gpio" =
274 "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C1)"
275 register "reset_delay_ms" = "100"
276 register "reset_off_delay_ms" = "5"
277 register "enable_gpio" =
278 "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C0)"
279 register "enable_delay_ms" = "10"
280 register "enable_off_delay_ms" = "1"
281 register "stop_gpio" =
282 "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C6)"
283 register "has_power_resource" = "true"
284 device i2c 10 on end
286 chip drivers/i2c/hid
287 register "generic.hid" = ""GTCH7503""
288 register "generic.desc" = ""G2TOUCH Touchscreen""
289 register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPP_C7_IRQ)"
290 register "generic.detect" = "1"
291 register "generic.reset_gpio" =
292 "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C1)"
293 register "generic.reset_delay_ms" = "50"
294 register "generic.enable_gpio" =
295 "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_C0)"
296 register "generic.enable_delay_ms" = "1"
297 register "generic.has_power_resource" = "1"
298 register "hid_desc_reg_offset" = "0x01"
299 device i2c 40 on end
302 device ref i2c5 on
303 chip drivers/i2c/generic
304 register "hid" = ""ELAN0000""
305 register "desc" = ""ELAN Touchpad""
306 register "irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_F14_IRQ)"
307 register "wake" = "GPE0_DW2_14"
308 register "detect" = "1"
309 device i2c 15 on end
312 device ref hda on
313 chip drivers/generic/max98357a
314 register "hid" = ""MX98360A""
315 register "sdmode_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_A11)"
316 register "sdmode_delay" = "5"
317 device generic 0 on end
320 device ref gspi1 on
321 chip drivers/spi/acpi
322 register "name" = ""CRFP""
323 register "hid" = "ACPI_DT_NAMESPACE_HID"
324 register "uid" = "1"
325 register "compat_string" = ""google,cros-ec-spi""
326 register "irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_F15_IRQ)"
327 register "wake" = "GPE0_DW2_15"
328 register "has_power_resource" = "true"
329 register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D1)"
330 register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_D2)"
331 register "enable_delay_ms" = "3"
332 device spi 0 hidden end
333 end # FPMCU
335 device ref pch_espi on
336 chip ec/google/chromeec
337 use conn0 as mux_conn[0]
338 use conn1 as mux_conn[1]
339 device pnp 0c09.0 on end
342 device ref pmc hidden
343 chip drivers/intel/pmc_mux
344 device generic 0 on
345 chip drivers/intel/pmc_mux/conn
346 use usb2_port1 as usb2_port
347 use tcss_usb3_port1 as usb3_port
348 device generic 0 alias conn0 on end
350 chip drivers/intel/pmc_mux/conn
351 use usb2_port3 as usb2_port
352 use tcss_usb3_port3 as usb3_port
353 device generic 1 alias conn1 on end
358 device ref tcss_xhci on
359 chip drivers/usb/acpi
360 device ref tcss_root_hub on
361 chip drivers/usb/acpi
362 register "desc" = ""USB3 Type-C Port C0 (MLB)""
363 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
364 register "use_custom_pld" = "true"
365 register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, RIGHT, ACPI_PLD_GROUP(1, 1))"
366 device ref tcss_usb3_port1 on end
368 chip drivers/usb/acpi
369 register "desc" = ""USB3 Type-C Port C2 (DB)""
370 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
371 register "use_custom_pld" = "true"
372 register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, LEFT, ACPI_PLD_GROUP(2, 1))"
373 device ref tcss_usb3_port3 on end
378 device ref xhci on
379 chip drivers/usb/acpi
380 device ref xhci_root_hub on
381 chip drivers/usb/acpi
382 register "desc" = ""USB2 Type-C Port C0 (MLB)""
383 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
384 register "use_custom_pld" = "true"
385 register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, RIGHT, ACPI_PLD_GROUP(1, 1))"
386 device ref usb2_port1 on end
388 chip drivers/usb/acpi
389 register "desc" = ""USB2 Type-A Port (MLB)""
390 register "type" = "UPC_TYPE_A"
391 register "use_custom_pld" = "true"
392 register "custom_pld" = "ACPI_PLD_TYPE_A(LEFT, LEFT, ACPI_PLD_GROUP(3, 2))"
393 device ref usb2_port2 on end
395 chip drivers/usb/acpi
396 register "desc" = ""USB2 Type-C Port C2 (DB)""
397 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
398 register "use_custom_pld" = "true"
399 register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, LEFT, ACPI_PLD_GROUP(2, 1))"
400 device ref usb2_port3 on end
402 chip drivers/usb/acpi
403 register "desc" = ""USB2 WWAN""
404 register "type" = "UPC_TYPE_INTERNAL"
405 device ref usb2_port4 on end
407 chip drivers/usb/acpi
408 register "desc" = ""USB2 Camera""
409 register "type" = "UPC_TYPE_INTERNAL"
410 device ref usb2_port6 on end
412 chip drivers/usb/acpi
413 register "desc" = ""USB2 Type-A Port (DB)""
414 register "type" = "UPC_TYPE_A"
415 register "use_custom_pld" = "true"
416 register "custom_pld" = "ACPI_PLD_TYPE_A(RIGHT, RIGHT, ACPI_PLD_GROUP(3, 1))"
417 device ref usb2_port9 on end
419 chip drivers/usb/acpi
420 register "desc" = ""USB2 Bluetooth""
421 register "type" = "UPC_TYPE_INTERNAL"
422 register "reset_gpio" =
423 "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_D4)"
424 device ref usb2_port10 on end
426 chip drivers/usb/acpi
427 register "desc" = ""USB3 Type-A Port (DB)""
428 register "type" = "UPC_TYPE_USB3_A"
429 register "use_custom_pld" = "true"
430 register "custom_pld" = "ACPI_PLD_TYPE_A(RIGHT, RIGHT, ACPI_PLD_GROUP(3, 1))"
431 device ref usb3_port1 on end
433 chip drivers/usb/acpi
434 register "desc" = ""USB3 Type-A Port (MLB)""
435 register "type" = "UPC_TYPE_USB3_A"
436 register "use_custom_pld" = "true"
437 register "custom_pld" = "ACPI_PLD_TYPE_A(LEFT, LEFT, ACPI_PLD_GROUP(3, 2))"
438 device ref usb3_port3 on end
440 chip drivers/usb/acpi
441 register "desc" = ""USB3 WWAN""
442 register "type" = "UPC_TYPE_INTERNAL"
443 device ref usb3_port4 on end