blob: 2b6fa8938d355f47a95ca6a30ea5ca12b38e0ee2 [file] [log] [blame]
Jon Murphya8590572023-02-23 13:42:52 -07001# SPDX-License-Identifier: GPL-2.0-or-later
2chip soc/amd/phoenix
Jon Murphy65b54c42023-03-29 18:39:15 -06003
4 # eSPI Configuration
5 # TODO(b/276913952) bump clock back up to 33MHz once things seem to be working well.
6 register "common_config.espi_config" = "{
7 .std_io_decode_bitmap = ESPI_DECODE_IO_0x80_EN | ESPI_DECODE_IO_0X60_0X64_EN,
8 .generic_io_range[0] = {
9 .base = 0x62,
10 .size = 1,
11 },
12 .generic_io_range[1] = {
13 .base = 0x66,
14 .size = 1,
15 },
16 .generic_io_range[2] = {
17 .base = 0x800, /* EC_HOST_CMD_REGION0 */
18 .size = 256, /* EC_HOST_CMD_REGION_SIZE * 2 */
19 },
20 .generic_io_range[3] = {
21 .base = 0x900, /* EC_LPC_ADDR_MEMMAP */
22 .size = 255, /* EC_MEMMAP_SIZE */
23 },
24 .generic_io_range[4] = {
25 .base = 0x200, /* EC_LPC_ADDR_HOST_DATA */
26 .size = 8, /* 0x200 - 0x207 */
27 },
28
29 .io_mode = ESPI_IO_MODE_QUAD,
30 .op_freq_mhz = ESPI_OP_FREQ_16_MHZ,
31 .crc_check_enable = 1,
32 .alert_pin = ESPI_ALERT_PIN_OPEN_DRAIN,
33 .periph_ch_en = 1,
34 .vw_ch_en = 1,
35 .oob_ch_en = 0,
36 .flash_ch_en = 0,
37
38 .vw_irq_polarity = ESPI_VW_IRQ_LEVEL_HIGH(1),
39 }"
40
Jon Murphy4d8a3522023-03-29 18:22:17 -060041 register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL |
42 GPIO_I2C2_SCL | GPIO_I2C3_SCL"
43
44 # I2C Pad Control RX Select Configuration
45 register "i2c_pad[0].rx_level" = "I2C_PAD_RX_1_8V" # Trackpad
46 register "i2c_pad[1].rx_level" = "I2C_PAD_RX_1_8V" # Touchscreen
47 register "i2c_pad[2].rx_level" = "I2C_PAD_RX_1_8V" # GSC
48 register "i2c_pad[3].rx_level" = "I2C_PAD_RX_1_8V" # Speaker, Codec, P-SAR, USB
49
50 # I2C Config
51 #+-------------------+----------------------------+
52 #| Field | Value |
53 #+-------------------+----------------------------+
54 #| I2C0 | Trackpad |
55 #| I2C1 | Touchscreen |
56 #| I2C2 | GSC TPM |
57 #| I2C3 | Speaker, Codec, P-SAR, USB |
58 #+-------------------+----------------------------+
59 register "i2c[0]" = "{
60 .speed = I2C_SPEED_FAST,
61 }"
62
63 register "i2c[1]" = "{
64 .speed = I2C_SPEED_FAST,
65 }"
66
67 register "i2c[2]" = "{
68 .speed = I2C_SPEED_FAST,
69 .early_init = true,
70 }"
71
72 register "i2c[3]" = "{
73 .speed = I2C_SPEED_FAST,
74 }"
75
Jon Murphy462ccba2023-03-29 18:56:28 -060076 # general purpose PCIe clock output configuration
77 register "gpp_clk_config[0]" = "GPP_CLK_REQ" # WLAN
78 register "gpp_clk_config[1]" = "GPP_CLK_REQ" # SD
79 register "gpp_clk_config[2]" = "GPP_CLK_REQ" # WWAN
80 register "gpp_clk_config[3]" = "GPP_CLK_REQ" # SSD
81 register "gpp_clk_config[4]" = "GPP_CLK_OFF" # SOC_FP_BOOT0 GPIO
82 register "gpp_clk_config[5]" = "GPP_CLK_OFF" # WLAN_AUX_RST_L GPIO
83 register "gpp_clk_config[6]" = "GPP_CLK_OFF" # WWAN_AUX_RST_L GPIO
84
85 register "pspp_policy" = "DXIO_PSPP_DISABLED" # TODO(b/277214353): reenable when PSPP works
Jon Murphy7c5c4fd2023-04-24 10:19:51 -060086 register "s0ix_enable" = "true"
Jon Murphy462ccba2023-03-29 18:56:28 -060087
Jon Murphy481018a2023-05-31 21:04:38 -060088 register "usb_phy_custom" = "1"
89 register "usb_phy" = "{
90 .Usb2PhyPort[0] = {
91 .compdistune = 0x3,
92 .pllbtune = 0x1,
93 .pllitune = 0x0,
94 .pllptune = 0xe,
95 .sqrxtune = 0x3,
96 .txfslstune = 0x3,
97 .txpreempamptune = 0x2,
98 .txpreemppulsetune = 0x0,
99 .txrisetune = 0x1,
100 .txvreftune = 0x3,
101 .txhsxvtune = 0x3,
102 .txrestune = 0x2,
103 },
104 .Usb2PhyPort[1] = {
105 .compdistune = 0x3,
106 .pllbtune = 0x1,
107 .pllitune = 0x0,
108 .pllptune = 0xe,
109 .sqrxtune = 0x3,
110 .txfslstune = 0x3,
111 .txpreempamptune = 0x2,
112 .txpreemppulsetune = 0x0,
113 .txrisetune = 0x1,
114 .txvreftune = 0x3,
115 .txhsxvtune = 0x3,
116 .txrestune = 0x2,
117 },
118 .Usb2PhyPort[2] = {
119 .compdistune = 0x3,
120 .pllbtune = 0x1,
121 .pllitune = 0x0,
122 .pllptune = 0xe,
123 .sqrxtune = 0x3,
124 .txfslstune = 0x3,
125 .txpreempamptune = 0x2,
126 .txpreemppulsetune = 0x0,
127 .txrisetune = 0x1,
128 .txvreftune = 0x3,
129 .txhsxvtune = 0x3,
130 .txrestune = 0x2,
131 },
132 .Usb2PhyPort[3] = {
133 .compdistune = 0x3,
134 .pllbtune = 0x1,
135 .pllitune = 0x0,
136 .pllptune = 0xe,
137 .sqrxtune = 0x3,
138 .txfslstune = 0x3,
139 .txpreempamptune = 0x2,
140 .txpreemppulsetune = 0x0,
141 .txrisetune = 0x1,
142 .txvreftune = 0x3,
143 .txhsxvtune = 0x3,
144 .txrestune = 0x2,
145 },
146 .Usb2PhyPort[4] = {
147 .compdistune = 0x3,
148 .pllbtune = 0x1,
149 .pllitune = 0x0,
150 .pllptune = 0xe,
151 .sqrxtune = 0x3,
152 .txfslstune = 0x3,
153 .txpreempamptune = 0x2,
154 .txpreemppulsetune = 0x0,
155 .txrisetune = 0x1,
156 .txvreftune = 0x3,
157 .txhsxvtune = 0x3,
158 .txrestune = 0x2,
159 },
160 .Usb2PhyPort[5] = {
161 .compdistune = 0x3,
162 .pllbtune = 0x1,
163 .pllitune = 0x0,
164 .pllptune = 0xe,
165 .sqrxtune = 0x3,
166 .txfslstune = 0x3,
167 .txpreempamptune = 0x2,
168 .txpreemppulsetune = 0x0,
169 .txrisetune = 0x1,
170 .txvreftune = 0x3,
171 .txhsxvtune = 0x3,
172 .txrestune = 0x2,
173 },
174 .Usb2PhyPort[6] = {
175 .compdistune = 0x3,
176 .pllbtune = 0x1,
177 .pllitune = 0x0,
178 .pllptune = 0xe,
179 .sqrxtune = 0x3,
180 .txfslstune = 0x3,
181 .txpreempamptune = 0x2,
182 .txpreemppulsetune = 0x0,
183 .txrisetune = 0x1,
184 .txvreftune = 0x3,
185 .txhsxvtune = 0x3,
186 .txrestune = 0x2,
187 },
188 .Usb2PhyPort[7] = {
189 .compdistune = 0x3,
190 .pllbtune = 0x1,
191 .pllitune = 0x0,
192 .pllptune = 0xe,
193 .sqrxtune = 0x3,
194 .txfslstune = 0x3,
195 .txpreempamptune = 0x2,
196 .txpreemppulsetune = 0x0,
197 .txrisetune = 0x1,
198 .txvreftune = 0x3,
199 .txhsxvtune = 0x3,
200 .txrestune = 0x2,
201 },
202 .Usb3PhyPort[0] = {
203 .tx_term_ctrl = 0x2,
204 .rx_term_ctrl = 0x2,
205 .tx_vboost_lvl_en = 0x0,
206 .tx_vboost_lvl = 0x5,
207 },
208 .Usb3PhyPort[1] = {
209 .tx_term_ctrl = 0x2,
210 .rx_term_ctrl = 0x2,
211 .tx_vboost_lvl_en = 0x0,
212 .tx_vboost_lvl = 0x5,
213 },
214 .Usb3PhyPort[2] = {
215 .tx_term_ctrl = 0x2,
216 .rx_term_ctrl = 0x2,
217 .tx_vboost_lvl_en = 0x0,
218 .tx_vboost_lvl = 0x5,
219 },
220 .ComboPhyStaticConfig[0] = USB_COMBO_PHY_MODE_USB_C,
221 .ComboPhyStaticConfig[1] = USB_COMBO_PHY_MODE_USB_C,
222 .ComboPhyStaticConfig[2] = USB_COMBO_PHY_MODE_USB_C,
223 .BatteryChargerEnable = 0,
224 .PhyP3CpmP4Support = 0,
225 }"
226
Jon Murphya4564582023-03-29 15:38:19 -0600227 device domain 0 on
Jon Murphy462ccba2023-03-29 18:56:28 -0600228 device ref gpp_bridge_2_1 on end # WWAN
Jon Murphy0f1826e2023-03-29 19:07:06 -0600229 device ref gpp_bridge_2_2 on # WLAN
230 chip drivers/wifi/generic
231 register "wake" = "GEVENT_8"
232 device pci 00.0 on end
233 end
234 end
Jon Murphy462ccba2023-03-29 18:56:28 -0600235 device ref gpp_bridge_2_3 on end # SD
236 device ref gpp_bridge_2_4 on end # NVMe
Jon Murphyba3522e2023-03-29 17:13:41 -0600237 device ref gpp_bridge_a on # Internal GPP Bridge 0 to Bus A
238 device ref gfx on end # Internal GPU (GFX)
Jon Murphyd40cecd2023-04-06 10:36:39 -0600239 device ref gfx_hda on end # Display HD Audio Controller (GFXAZ)
Jon Murphy8f3f0cb2023-04-06 10:06:07 -0600240 device ref crypto on end # Crypto Coprocessor
Jon Murphy1f41e8c2023-03-29 18:14:16 -0600241 device ref xhci_0 on # USB 3.1 (USB0)
242 chip drivers/usb/acpi
243 device ref xhci_0_root_hub on
244 chip drivers/usb/acpi
245 register "desc" = ""USB3 Type-A Port A0 (MLB)""
246 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
247 register "use_custom_pld" = "true"
248 register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, LEFT, ACPI_PLD_GROUP(1, 1))"
249 device ref usb3_port0 on end
250 end
251 chip drivers/usb/acpi
252 register "desc" = ""USB3 Type-A Port A1 (DB)""
253 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
254 register "use_custom_pld" = "true"
255 register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, RIGHT, ACPI_PLD_GROUP(1, 2))"
256 register "group" = "ACPI_PLD_GROUP(1, 2)"
257 device ref usb3_port1 on end
258 end
259 chip drivers/usb/acpi
260 register "desc" = ""USB2 Type-A Port A0 (MLB)""
261 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
262 register "use_custom_pld" = "true"
263 register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, LEFT, ACPI_PLD_GROUP(1, 1))"
264 device ref usb2_port0 on end
265 end
266 chip drivers/usb/acpi
267 register "desc" = ""USB2 Type-A Port A1 (DB)""
268 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
269 register "use_custom_pld" = "true"
270 register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, RIGHT, ACPI_PLD_GROUP(1, 2))"
271 device ref usb2_port1 on end
272 end
273 chip drivers/usb/acpi
274 register "desc" = ""User-Facing Camera""
275 register "type" = "UPC_TYPE_INTERNAL"
276 device ref usb2_port2 on end
277 end
278 chip drivers/usb/acpi
279 register "desc" = ""World-Facing Camera""
280 register "type" = "UPC_TYPE_INTERNAL"
281 device ref usb2_port3 on end
282 end
283 chip drivers/usb/acpi
284 register "desc" = ""Bluetooth""
285 register "type" = "UPC_TYPE_INTERNAL"
286 register "has_power_resource" = "true"
287 register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPIO_154)"
288 register "enable_delay_ms" = "500"
289 register "enable_off_delay_ms" = "200"
290 register "use_gpio_for_status" = "true"
291 device ref usb2_port4 on end
292 end
293 end
294 end
295 end
Jon Murphyf88d9d92023-04-06 10:11:55 -0600296 device ref acp on end # Audio Processor (ACP)
Jon Murphy4b94f1d2023-04-06 10:17:25 -0600297 device ref mp2 on end # Sensor Fusion Hub (MP2)
Jon Murphy51850b02023-03-29 17:14:46 -0600298 end
299 device ref gpp_bridge_c on # Internal GPP Bridge 2 to Bus C
Jon Murphy1f41e8c2023-03-29 18:14:16 -0600300 device ref usb4_xhci_0 on
301 chip drivers/usb/acpi
302 register "type" = "UPC_TYPE_HUB"
303 device ref usb4_xhci_0_root_hub on
304 chip drivers/usb/acpi
305 register "desc" = ""USB4 Type-C Port C0 (MLB)""
306 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
307 register "use_custom_pld" = "true"
308 register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, RIGHT, ACPI_PLD_GROUP(3, 1))"
309 device ref usb3_port6 on end
310 end
311 chip drivers/usb/acpi
312 register "desc" = ""USB4 Type-C Port C0 (MLB)""
313 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
314 register "use_custom_pld" = "true"
315 register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, RIGHT, ACPI_PLD_GROUP(3, 1))"
316 device ref usb2_port6 on end
317 end
318 end
319 end
320 end
321 device ref usb4_xhci_1 on
322 chip drivers/usb/acpi
323 register "type" = "UPC_TYPE_HUB"
324 device ref usb4_xhci_1_root_hub on
325 chip drivers/usb/acpi
326 register "desc" = ""USB4 Type-C Port C1 (MLB)""
327 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
328 register "use_custom_pld" = "true"
329 register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, RIGHT, ACPI_PLD_GROUP(4, 1))"
330 device ref usb3_port7 on end
331 end
332 chip drivers/usb/acpi
333 register "desc" = ""USB2 Type-C Port C1 (MLB)""
334 register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
335 register "use_custom_pld" = "true"
336 register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, RIGHT, ACPI_PLD_GROUP(4, 1))"
337 device ref usb2_port7 on end
338 end
339 end
340 end
341 end
Jon Murphyba3522e2023-03-29 17:13:41 -0600342 end
Jon Murphy81186472023-04-03 17:25:34 -0600343 device ref iommu on end
Jon Murphya4564582023-03-29 15:38:19 -0600344 device ref lpc_bridge on
345 chip ec/google/chromeec
346 device pnp 0c09.0 alias chrome_ec on end
347 end
348 end
349 end # domain
Jon Murphy8e026442023-03-29 17:08:24 -0600350 device ref uart_0 on end # UART0
Jon Murphy4d8a3522023-03-29 18:22:17 -0600351 device ref i2c_0 on end
352 device ref i2c_1 on end
Jon Murphy1236b332023-03-29 18:51:12 -0600353 device ref i2c_2 on
354 chip drivers/i2c/tpm
355 register "hid" = ""GOOG0005""
356 register "desc" = ""Ti50 TPM""
357 register "irq_gpio" = "ACPI_GPIO_IRQ_EDGE_LOW(GPIO_84)"
358 device i2c 50 alias ti50 on end
359 end
360 end
Jon Murphy4d8a3522023-03-29 18:22:17 -0600361 device ref i2c_3 on end
Jon Murphya8590572023-02-23 13:42:52 -0700362end # chip soc/amd/phoenix