Debian Codegraph @

src/mainboard/amd/birman/devicetree_phoenix_opensil.cb

raw
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 chip soc/amd/phoenix
4 register "common_config.espi_config" = "{
5 .std_io_decode_bitmap = ESPI_DECODE_IO_0x80_EN | ESPI_DECODE_IO_0X2E_0X2F_EN | ESPI_DECODE_IO_0X60_0X64_EN,
6 .generic_io_range[0] = {
7 .base = 0x3f8,
8 .size = 8,
9 },
10 .generic_io_range[1] = {
11 .base = 0x600,
12 .size = 256,
13 },
14 .io_mode = ESPI_IO_MODE_QUAD,
15 .op_freq_mhz = ESPI_OP_FREQ_16_MHZ,
16 .crc_check_enable = 1,
17 .alert_pin = ESPI_ALERT_PIN_PUSH_PULL,
18 .periph_ch_en = 1,
19 .vw_ch_en = 1,
20 .oob_ch_en = 1,
21 .flash_ch_en = 0,
22 }"
23
24 register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL |
25 GPIO_I2C2_SCL | GPIO_I2C3_SCL"
26
27 register "i2c[0].early_init" = "1"
28 register "i2c[1].early_init" = "1"
29 register "i2c[2].early_init" = "1"
30 register "i2c[3].early_init" = "1"
31
32 # I2C Pad Control RX Select Configuration
33 register "i2c_pad[0].rx_level" = "I2C_PAD_RX_1_8V"
34 register "i2c_pad[1].rx_level" = "I2C_PAD_RX_1_8V"
35 register "i2c_pad[2].rx_level" = "I2C_PAD_RX_1_8V"
36 register "i2c_pad[3].rx_level" = "I2C_PAD_RX_1_8V"
37
38 register "s0ix_enable" = "true"
39
40 register "pspp_policy" = "DXIO_PSPP_DISABLED" # TODO: reenable when PSPP works
41
42 register "usb_phy_custom" = "true"
43 register "usb_phy" = "{
44 .Usb2PhyPort[0] = {
45 .compdistune = 0x1,
46 .pllbtune = 0x1,
47 .pllitune = 0x0,
48 .pllptune = 0xc,
49 .sqrxtune = 0x2,
50 .txfslstune = 0x1,
51 .txpreempamptune = 0x3,
52 .txpreemppulsetune = 0x0,
53 .txrisetune = 0x1,
54 .txvreftune = 0x3,
55 .txhsxvtune = 0x3,
56 .txrestune = 0x2,
57 },
58 .Usb2PhyPort[1] = {
59 .compdistune = 0x1,
60 .pllbtune = 0x1,
61 .pllitune = 0x0,
62 .pllptune = 0xc,
63 .sqrxtune = 0x2,
64 .txfslstune = 0x1,
65 .txpreempamptune = 0x3,
66 .txpreemppulsetune = 0x0,
67 .txrisetune = 0x1,
68 .txvreftune = 0x3,
69 .txhsxvtune = 0x3,
70 .txrestune = 0x2,
71 },
72 .Usb2PhyPort[2] = {
73 .compdistune = 0x1,
74 .pllbtune = 0x1,
75 .pllitune = 0x0,
76 .pllptune = 0xc,
77 .sqrxtune = 0x2,
78 .txfslstune = 0x1,
79 .txpreempamptune = 0x3,
80 .txpreemppulsetune = 0x0,
81 .txrisetune = 0x1,
82 .txvreftune = 0x3,
83 .txhsxvtune = 0x3,
84 .txrestune = 0x2,
85 },
86 .Usb2PhyPort[3] = {
87 .compdistune = 0x1,
88 .pllbtune = 0x1,
89 .pllitune = 0x0,
90 .pllptune = 0xc,
91 .sqrxtune = 0x2,
92 .txfslstune = 0x1,
93 .txpreempamptune = 0x3,
94 .txpreemppulsetune = 0x0,
95 .txrisetune = 0x1,
96 .txvreftune = 0x3,
97 .txhsxvtune = 0x3,
98 .txrestune = 0x2,
99 },
100 .Usb2PhyPort[4] = {
101 .compdistune = 0x1,
102 .pllbtune = 0x1,
103 .pllitune = 0x0,
104 .pllptune = 0xc,
105 .sqrxtune = 0x2,
106 .txfslstune = 0x1,
107 .txpreempamptune = 0x3,
108 .txpreemppulsetune = 0x0,
109 .txrisetune = 0x1,
110 .txvreftune = 0x3,
111 .txhsxvtune = 0x3,
112 .txrestune = 0x2,
113 },
114 .Usb2PhyPort[5] = {
115 .compdistune = 0x1,
116 .pllbtune = 0x1,
117 .pllitune = 0x0,
118 .pllptune = 0xc,
119 .sqrxtune = 0x2,
120 .txfslstune = 0x1,
121 .txpreempamptune = 0x3,
122 .txpreemppulsetune = 0x0,
123 .txrisetune = 0x1,
124 .txvreftune = 0x3,
125 .txhsxvtune = 0x3,
126 .txrestune = 0x2,
127 },
128 .Usb2PhyPort[6] = {
129 .compdistune = 0x3,
130 .pllbtune = 0x1,
131 .pllitune = 0x0,
132 .pllptune = 0xc,
133 .sqrxtune = 0x2,
134 .txfslstune = 0x1,
135 .txpreempamptune = 0x3,
136 .txpreemppulsetune = 0x0,
137 .txrisetune = 0x1,
138 .txvreftune = 0x6,
139 .txhsxvtune = 0x3,
140 .txrestune = 0x2,
141 },
142 .Usb2PhyPort[7] = {
143 .compdistune = 0x3,
144 .pllbtune = 0x1,
145 .pllitune = 0x0,
146 .pllptune = 0xc,
147 .sqrxtune = 0x2,
148 .txfslstune = 0x1,
149 .txpreempamptune = 0x3,
150 .txpreemppulsetune = 0x0,
151 .txrisetune = 0x1,
152 .txvreftune = 0x6,
153 .txhsxvtune = 0x3,
154 .txrestune = 0x2,
155 },
156 .Usb3PhyPort[0] = {
157 .tx_term_ctrl = 0x2,
158 .rx_term_ctrl = 0x2,
159 .tx_vboost_lvl_en = 0x0,
160 .tx_vboost_lvl = 0x5,
161 },
162 .Usb3PhyPort[1] = {
163 .tx_term_ctrl = 0x2,
164 .rx_term_ctrl = 0x2,
165 .tx_vboost_lvl_en = 0x0,
166 .tx_vboost_lvl = 0x5,
167 },
168 .Usb3PhyPort[2] = {
169 .tx_term_ctrl = 0x2,
170 .rx_term_ctrl = 0x2,
171 .tx_vboost_lvl_en = 0x0,
172 .tx_vboost_lvl = 0x5,
173 },
174 .ComboPhyStaticConfig[0] = USB_COMBO_PHY_MODE_USB_C,
175 .ComboPhyStaticConfig[1] = USB_COMBO_PHY_MODE_USB_C,
176 .ComboPhyStaticConfig[2] = USB_COMBO_PHY_MODE_USB_C,
177 .BatteryChargerEnable = 0,
178 .PhyP3CpmP4Support = 0,
179 }"
180
181 register "ddi[0]" = "{
182 .connector_type = DDI_EDP,
183 .aux_index = 0,
184 .hdp_index = 0,
185 }"
186 register "ddi[1]" = "{
187 .connector_type = DDI_HDMI,
188 .aux_index = 1,
189 .hdp_index = 1,
190 }"
191 register "ddi[2]" = "{
192 .connector_type = DDI_DP_W_TYPEC,
193 .aux_index = 2,
194 .hdp_index = 2,
195 }"
196 register "ddi[3]" = "{
197 .connector_type = DDI_DP_W_TYPEC,
198 .aux_index = 3,
199 .hdp_index = 3,
200 }"
201 register "ddi[4]" = "{
202 .connector_type = DDI_DP_W_TYPEC,
203 .aux_index = 4,
204 .hdp_index = 4,
205 }"
206
207 device domain 0 on
208 device ref iommu on end
209 chip drivers/amd/opensil/mpio
210 register "type" = "IFTYPE_PCIE"
211 register "start_lane" = "0"
212 register "end_lane" = "7"
213 register "aspm" = "ASPM_L1"
214 register "clk_req" = "CLK_REQ0"
215 # register "gpio_group" is currently not used
216 device ref gpp_bridge_1_1 on end # MXM
217 end
218 chip drivers/amd/opensil/mpio
219 register "type" = "IFTYPE_PCIE"
220 register "start_lane" = "8"
221 register "end_lane" = "11"
222 register "aspm" = "ASPM_L1"
223 register "clk_req" = "CLK_REQ1"
224 device ref gpp_bridge_1_2 on # NVMe SSD1
225 # Required so the NVMe gets placed into D3 when entering S0i3.
226 chip drivers/pcie/rtd3/device
227 register "name" = ""NVME""
228 device pci 00.0 on end
229 end
230 end
231 end
232 chip drivers/amd/opensil/mpio
233 register "type" = "IFTYPE_PCIE"
234 register "start_lane" = "12"
235 register "end_lane" = "12"
236 register "aspm" = "ASPM_DISABLED"
237 register "clk_req" = "CLK_REQ6"
238 device ref gpp_bridge_1_3 on end # GBE
239 end
240 chip drivers/amd/opensil/mpio
241 register "type" = "IFTYPE_PCIE"
242 register "start_lane" = "13"
243 register "end_lane" = "13"
244 register "aspm" = "ASPM_DISABLED"
245 register "clk_req" = "CLK_REQ5"
246 device ref gpp_bridge_2_1 on end # SD
247 end
248 chip drivers/amd/opensil/mpio
249 register "type" = "IFTYPE_PCIE"
250 register "start_lane" = "14"
251 register "end_lane" = "14"
252 register "aspm" = "ASPM_DISABLED"
253 register "clk_req" = "CLK_REQ4"
254 device ref gpp_bridge_2_2 on end # WWAN
255 end
256 chip drivers/amd/opensil/mpio
257 register "type" = "IFTYPE_PCIE"
258 register "start_lane" = "15"
259 register "end_lane" = "15"
260 register "aspm" = "ASPM_DISABLED"
261 register "clk_req" = "CLK_REQ3"
262 device ref gpp_bridge_2_3 on end # WIFI
263 end
264 chip drivers/amd/opensil/mpio
265 register "type" = "IFTYPE_PCIE"
266 register "start_lane" = "16"
267 register "end_lane" = "19"
268 register "aspm" = "ASPM_DISABLED"
269 register "clk_req" = "CLK_REQ2"
270 device ref gpp_bridge_2_4 on # NVMe SSD0
271 # Required so the NVMe gets placed into D3 when entering S0i3.
272 chip drivers/pcie/rtd3/device
273 register "name" = ""NVME""
274 device pci 00.0 on end
275 end
276 end
277 end
278 device ref gpp_bridge_a on # Internal GPP Bridge 0 to Bus A
279 device ref gfx on end # Internal GPU (GFX)
280 device ref gfx_hda on end # Display HD Audio Controller (GFXAZ)
281 device ref crypto on end # Crypto Coprocessor
282 device ref xhci_0 on # USB 3.1 (USB0)
283 chip drivers/usb/acpi
284 device ref xhci_0_root_hub on
285 chip drivers/usb/acpi
286 device ref usb3_port2 on end
287 end
288 chip drivers/usb/acpi
289 device ref usb3_port3 on end
290 end
291 chip drivers/usb/acpi
292 device ref usb2_port2 on end
293 end
294 chip drivers/usb/acpi
295 device ref usb2_port3 on end
296 end
297 chip drivers/usb/acpi
298 device ref usb2_port4 on end
299 end
300 chip drivers/usb/acpi
301 device ref usb2_port5 on end
302 end
303 chip drivers/usb/acpi
304 device ref usb2_port6 on end
305 end
306 end
307 end
308 end
309 device ref xhci_1 on # USB 3.1 (USB1)
310 chip drivers/usb/acpi
311 device ref xhci_1_root_hub on
312 chip drivers/usb/acpi
313 device ref usb3_port7 on end
314 end
315 chip drivers/usb/acpi
316 device ref usb2_port7 on end
317 end
318 end
319 end
320 end
321 device ref acp on end # Audio Processor (ACP)
322 end
323 device ref gpp_bridge_c on # Internal GPP Bridge 2 to Bus C
324 device ref usb4_xhci_0 on
325 chip drivers/usb/acpi
326 device ref usb4_xhci_0_root_hub on
327 chip drivers/usb/acpi
328 device ref usb3_port0 on end
329 end
330 chip drivers/usb/acpi
331 device ref usb2_port0 on end
332 end
333 end
334 end
335 end
336 device ref usb4_xhci_1 on
337 chip drivers/usb/acpi
338 device ref usb4_xhci_1_root_hub on
339 chip drivers/usb/acpi
340 device ref usb3_port1 on end
341 end
342 chip drivers/usb/acpi
343 device ref usb2_port1 on end
344 end
345 end
346 end
347 end
348 end
349 end
350
351 device ref i2c_0 on end
352 device ref i2c_1 on end
353 device ref i2c_2 on end
354 device ref i2c_3 on end
355 device ref uart_0 on end # UART0
356
357 end