blob: f6fbddce922aa8a33fe5b4fcd2be2fb090b90659 [file] [log] [blame]
Bernhard Messerklingerd9461aa2020-05-18 12:33:34 +02001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright 2020 B&R Industrial Automation GmbH - http://www.br-automation.com
4 */
5
Bernhard Messerklingerd9461aa2020-05-18 12:33:34 +02006#include <dm.h>
7#include <log.h>
8#include <asm/arch/fsp_bindings.h>
9
10/**
11 * read_u8_prop() - Read an u8 property from devicetree (scalar or array)
12 * @node: Valid node reference to read property from
13 * @name: Name of the property to read from
14 * @count: If the property is expected to be an array, this is the
15 * number of expected elements
16 * Set to 0 if the property is expected to be a scalar
17 * @dst: Pointer to destination of where to save the value(s) read
18 * from devicetree
19 */
20static void read_u8_prop(ofnode node, char *name, size_t count, u8 *dst)
21{
22 u32 tmp;
23 const u8 *buf;
24 int ret;
25
26 if (count == 0) {
27 ret = ofnode_read_u32(node, name, &tmp);
28 if (ret == 0)
29 *dst = tmp;
30 } else {
31 buf = ofnode_read_u8_array_ptr(node, name, count);
32 if (buf)
33 memcpy(dst, buf, count);
34 }
35}
36
37/**
38 * read_u16_prop() - Read an u16 property from devicetree (scalar or array)
39 * @node: Valid node reference to read property from
40 * @name: Name of the property to read from
41 * @count: If the property is expected to be an array, this is the
42 * number of expected elements
43 * Set to 0 if the property is expected to be a scalar
44 * @dst: Pointer to destination of where to save the value(s) read
45 * from devicetree
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +010046 * Return: 0 on success, -ve on error
Bernhard Messerklingerd9461aa2020-05-18 12:33:34 +020047 */
48static int read_u16_prop(ofnode node, char *name, size_t count, u16 *dst)
49{
50 u32 tmp;
51 u32 buf[32];
52 int ret;
53
54 if (ARRAY_SIZE(buf) < count) {
55 debug("ERROR: %s buffer to small!\n", __func__);
56 return -ENOSPC;
57 }
58
59 if (count == 0) {
60 ret = ofnode_read_u32(node, name, &tmp);
61 if (ret == 0)
62 *dst = tmp;
63 } else {
64 ret = ofnode_read_u32_array(node, name, buf, count);
65 if (ret == 0)
66 for (int i = 0; i < count; i++)
67 dst[i] = buf[i];
68 }
69
70 return 0;
71}
72
73/**
74 * read_u32_prop() - Read an u32 property from devicetree (scalar or array)
75 * @node: Valid node reference to read property from
76 * @name: Name of the property to read from
77 * @count: If the property is expected to be an array, this is the
78 * number of expected elements
79 * set to 0 if the property is expected to be a scalar
80 * @dst: Pointer to destination of where to save the value(s) read
81 * from devicetree
82 */
83static void read_u32_prop(ofnode node, char *name, size_t count, u32 *dst)
84{
85 if (count == 0)
86 ofnode_read_u32(node, name, dst);
87 else
88 ofnode_read_u32_array(node, name, dst, count);
89}
90
91/**
Bernhard Messerklinger104855f2020-07-22 09:29:38 +020092 * read_u64_prop() - Read an u64 property from devicetree (scalar or array)
93 * @node: Valid node reference to read property from
94 * @name: Name of the property to read from
95 * @count: If the property is expected to be an array, this is the
96 * number of expected elements
97 * set to 0 if the property is expected to be a scalar
98 * @dst: Pointer to destination of where to save the value(s) read
99 * from devicetree
100 */
101static int read_u64_prop(ofnode node, char *name, size_t count, u64 *dst)
102{
103 if (count == 0) {
104 ofnode_read_u64(node, name, dst);
105 } else {
106 debug("ERROR: %s u64 arrays not supported!\n", __func__);
107 return -EINVAL;
108 }
109
110 return 0;
111}
112
113/**
Bernhard Messerklingerd9461aa2020-05-18 12:33:34 +0200114 * read_string_prop() - Read a string property from devicetree
115 * @node: Valid node reference to read property from
116 * @name: Name of the property to read from
117 * @count: Size of the destination buffer
118 * @dst: Pointer to destination of where to save the values read
119 * from devicetree
120 */
121static void read_string_prop(ofnode node, char *name, size_t count, char *dst)
122{
123 const char *string_buf;
124
125 if (count > 0) {
126 string_buf = ofnode_read_string(node, name);
127 if (string_buf)
128 strlcpy(dst, string_buf, count);
129 }
130}
131
132/**
133 * read_swizzle_prop() - Read a swizzle property from devicetree
134 * @node: Valid node reference to read property from
135 * @name: Name of the property to read from
136 * @count: Number of elements in the swizzle configuration
137 * @dst: pointer to destination of where to save the values read
138 * from devicetree
139 */
140static void read_swizzle_prop(ofnode node, char *name, size_t count, u8 *dst)
141{
142 const struct lpddr4_chan_swizzle_cfg *sch;
143 /* Number of bytes to copy per DQS */
144 const size_t sz = DQ_BITS_PER_DQS;
145 const struct lpddr4_swizzle_cfg *swizzle_cfg;
146
147 swizzle_cfg = (const struct lpddr4_swizzle_cfg *)
148 ofnode_read_u8_array_ptr(node, name, count);
149
150 if (!swizzle_cfg)
151 return;
152 /*
153 * CH0_DQB byte lanes in the bit swizzle configuration field are
154 * not 1:1. The mapping within the swizzling field is:
155 * indices [0:7] - byte lane 1 (DQS1) DQ[8:15]
156 * indices [8:15] - byte lane 0 (DQS0) DQ[0:7]
157 * indices [16:23] - byte lane 3 (DQS3) DQ[24:31]
158 * indices [24:31] - byte lane 2 (DQS2) DQ[16:23]
159 */
160 sch = &swizzle_cfg->phys[LP4_PHYS_CH0B];
161 memcpy(&dst[0 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS1], sz);
162 memcpy(&dst[1 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS0], sz);
163 memcpy(&dst[2 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS3], sz);
164 memcpy(&dst[3 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS2], sz);
165
166 /*
167 * CH0_DQA byte lanes in the bit swizzle configuration field are 1:1.
168 */
169 sch = &swizzle_cfg->phys[LP4_PHYS_CH0A];
170 memcpy(&dst[4 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS0], sz);
171 memcpy(&dst[5 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS1], sz);
172 memcpy(&dst[6 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS2], sz);
173 memcpy(&dst[7 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS3], sz);
174
175 sch = &swizzle_cfg->phys[LP4_PHYS_CH1B];
176 memcpy(&dst[8 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS1], sz);
177 memcpy(&dst[9 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS0], sz);
178 memcpy(&dst[10 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS3], sz);
179 memcpy(&dst[11 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS2], sz);
180
181 /*
182 * CH0_DQA byte lanes in the bit swizzle configuration field are 1:1.
183 */
184 sch = &swizzle_cfg->phys[LP4_PHYS_CH1A];
185 memcpy(&dst[12 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS0], sz);
186 memcpy(&dst[13 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS1], sz);
187 memcpy(&dst[14 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS2], sz);
188 memcpy(&dst[15 * DQ_BITS_PER_DQS], &sch->dqs[LP4_DQS3], sz);
189}
190
191/**
192 * fsp_update_config_from_dtb() - Read FSP config from devicetree node
193 * @node: Valid node reference to read property from
194 * @cfg: Pointer to FSP config structure
195 * @fsp_bindings: Binding describing which devicetree properties should
196 * be stored where in the FSP configuration structure
197 * The end of the list is declared by a NULL pointer in propname
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +0100198 * Return: 0 on success, -ve on error
Bernhard Messerklingerd9461aa2020-05-18 12:33:34 +0200199 *
200 * This function reads the configuration for FSP from the provided
201 * devicetree node and saves it in the FSP configuration structure.
202 * Configuration options that are not present in the devicetree are
203 * left at their current value.
204 */
205__maybe_unused
206static int fsp_update_config_from_dtb(ofnode node, u8 *cfg,
207 const struct fsp_binding *fsp_bindings)
208{
209 const struct fsp_binding *fspb;
210 int ret;
211
212 for (int i = 0; fsp_bindings[i].propname; i++) {
213 fspb = &fsp_bindings[i];
214
215 switch (fspb->type) {
216 case FSP_UINT8:
217 read_u8_prop(node, fspb->propname, fspb->count,
218 &cfg[fspb->offset]);
219 break;
220 case FSP_UINT16:
221 ret = read_u16_prop(node, fspb->propname, fspb->count,
222 (u16 *)&cfg[fspb->offset]);
223 if (ret)
224 return ret;
225 break;
226 case FSP_UINT32:
227 read_u32_prop(node, fspb->propname, fspb->count,
228 (u32 *)&cfg[fspb->offset]);
229 break;
Bernhard Messerklinger104855f2020-07-22 09:29:38 +0200230 case FSP_UINT64:
231 ret = read_u64_prop(node, fspb->propname, fspb->count,
232 (u64 *)&cfg[fspb->offset]);
233 if (ret)
234 return ret;
235 break;
Bernhard Messerklingerd9461aa2020-05-18 12:33:34 +0200236 case FSP_STRING:
237 read_string_prop(node, fspb->propname, fspb->count,
238 (char *)&cfg[fspb->offset]);
239 break;
240 case FSP_LPDDR4_SWIZZLE:
241 read_swizzle_prop(node, fspb->propname, fspb->count,
242 &cfg[fspb->offset]);
243 break;
244 }
245 }
246
247 return 0;
248}
249
250#if defined(CONFIG_SPL_BUILD)
251const struct fsp_binding fsp_m_bindings[] = {
252 {
253 .type = FSP_UINT32,
254 .offset = offsetof(struct fsp_m_config, serial_debug_port_address),
255 .propname = "fspm,serial-debug-port-address",
256 }, {
257 .type = FSP_UINT8,
258 .offset = offsetof(struct fsp_m_config, serial_debug_port_type),
259 .propname = "fspm,serial-debug-port-type",
260 }, {
261 .type = FSP_UINT8,
262 .offset = offsetof(struct fsp_m_config, serial_debug_port_device),
263 .propname = "fspm,serial-debug-port-device",
264 }, {
265 .type = FSP_UINT8,
266 .offset = offsetof(struct fsp_m_config, serial_debug_port_stride_size),
267 .propname = "fspm,serial-debug-port-stride-size",
268 }, {
269 .type = FSP_UINT8,
270 .offset = offsetof(struct fsp_m_config, mrc_fast_boot),
271 .propname = "fspm,mrc-fast-boot",
272 }, {
273 .type = FSP_UINT8,
274 .offset = offsetof(struct fsp_m_config, igd),
275 .propname = "fspm,igd",
276 }, {
277 .type = FSP_UINT8,
278 .offset = offsetof(struct fsp_m_config, igd_dvmt50_pre_alloc),
279 .propname = "fspm,igd-dvmt50-pre-alloc",
280 }, {
281 .type = FSP_UINT8,
282 .offset = offsetof(struct fsp_m_config, igd_aperture_size),
283 .propname = "fspm,igd-aperture-size",
284 }, {
285 .type = FSP_UINT8,
286 .offset = offsetof(struct fsp_m_config, gtt_size),
287 .propname = "fspm,gtt-size",
288 }, {
289 .type = FSP_UINT8,
290 .offset = offsetof(struct fsp_m_config, primary_video_adaptor),
291 .propname = "fspm,primary-video-adaptor",
292 }, {
293 .type = FSP_UINT8,
294 .offset = offsetof(struct fsp_m_config, package),
295 .propname = "fspm,package",
296 }, {
297 .type = FSP_UINT8,
298 .offset = offsetof(struct fsp_m_config, profile),
299 .propname = "fspm,profile",
300 }, {
301 .type = FSP_UINT8,
302 .offset = offsetof(struct fsp_m_config, memory_down),
303 .propname = "fspm,memory-down",
304 }, {
305 .type = FSP_UINT8,
306 .offset = offsetof(struct fsp_m_config, ddr3_l_page_size),
307 .propname = "fspm,ddr3-l-page-size",
308 }, {
309 .type = FSP_UINT8,
310 .offset = offsetof(struct fsp_m_config, ddr3_lasr),
311 .propname = "fspm,ddr3-lasr",
312 }, {
313 .type = FSP_UINT8,
314 .offset = offsetof(struct fsp_m_config, scrambler_support),
315 .propname = "fspm,scrambler-support",
316 }, {
317 .type = FSP_UINT8,
318 .offset = offsetof(struct fsp_m_config, interleaved_mode),
319 .propname = "fspm,interleaved-mode",
320 }, {
321 .type = FSP_UINT16,
322 .offset = offsetof(struct fsp_m_config, channel_hash_mask),
323 .propname = "fspm,channel-hash-mask",
324 }, {
325 .type = FSP_UINT16,
326 .offset = offsetof(struct fsp_m_config, slice_hash_mask),
327 .propname = "fspm,slice-hash-mask",
328 }, {
329 .type = FSP_UINT8,
330 .offset = offsetof(struct fsp_m_config, channels_slices_enable),
331 .propname = "fspm,channels-slices-enable",
332 }, {
333 .type = FSP_UINT8,
334 .offset = offsetof(struct fsp_m_config, min_ref_rate2x_enable),
335 .propname = "fspm,min-ref-rate2x-enable",
336 }, {
337 .type = FSP_UINT8,
338 .offset = offsetof(struct fsp_m_config, dual_rank_support_enable),
339 .propname = "fspm,dual-rank-support-enable",
340 }, {
341 .type = FSP_UINT8,
342 .offset = offsetof(struct fsp_m_config, rmt_mode),
343 .propname = "fspm,rmt-mode",
344 }, {
345 .type = FSP_UINT16,
346 .offset = offsetof(struct fsp_m_config, memory_size_limit),
347 .propname = "fspm,memory-size-limit",
348 }, {
349 .type = FSP_UINT16,
350 .offset = offsetof(struct fsp_m_config, low_memory_max_value),
351 .propname = "fspm,low-memory-max-value",
352 }, {
353 .type = FSP_UINT16,
354 .offset = offsetof(struct fsp_m_config, high_memory_max_value),
355 .propname = "fspm,high-memory-max-value",
356 }, {
357 .type = FSP_UINT8,
358 .offset = offsetof(struct fsp_m_config, disable_fast_boot),
359 .propname = "fspm,disable-fast-boot",
360 }, {
361 .type = FSP_UINT8,
362 .offset = offsetof(struct fsp_m_config, dimm0_spd_address),
363 .propname = "fspm,dimm0-spd-address",
364 }, {
365 .type = FSP_UINT8,
366 .offset = offsetof(struct fsp_m_config, dimm1_spd_address),
367 .propname = "fspm,dimm1-spd-address",
368 }, {
369 .type = FSP_UINT8,
370 .offset = offsetof(struct fsp_m_config, chan[0].rank_enable),
371 .propname = "fspm,ch0-rank-enable",
372 }, {
373 .type = FSP_UINT8,
374 .offset = offsetof(struct fsp_m_config, chan[0].device_width),
375 .propname = "fspm,ch0-device-width",
376 }, {
377 .type = FSP_UINT8,
378 .offset = offsetof(struct fsp_m_config, chan[0].dram_density),
379 .propname = "fspm,ch0-dram-density",
380 }, {
381 .type = FSP_UINT8,
382 .offset = offsetof(struct fsp_m_config, chan[0].option),
383 .propname = "fspm,ch0-option",
384 }, {
385 .type = FSP_UINT8,
386 .offset = offsetof(struct fsp_m_config, chan[0].odt_config),
387 .propname = "fspm,ch0-odt-config",
388 }, {
389 .type = FSP_UINT8,
390 .offset = offsetof(struct fsp_m_config, chan[0].tristate_clk1),
391 .propname = "fspm,ch0-tristate-clk1",
392 }, {
393 .type = FSP_UINT8,
394 .offset = offsetof(struct fsp_m_config, chan[0].mode2_n),
395 .propname = "fspm,ch0-mode2-n",
396 }, {
397 .type = FSP_UINT8,
398 .offset = offsetof(struct fsp_m_config, chan[0].odt_levels),
399 .propname = "fspm,ch0-odt-levels",
400 }, {
401 .type = FSP_UINT8,
402 .offset = offsetof(struct fsp_m_config, chan[1].rank_enable),
403 .propname = "fspm,ch1-rank-enable",
404 }, {
405 .type = FSP_UINT8,
406 .offset = offsetof(struct fsp_m_config, chan[1].device_width),
407 .propname = "fspm,ch1-device-width",
408 }, {
409 .type = FSP_UINT8,
410 .offset = offsetof(struct fsp_m_config, chan[1].dram_density),
411 .propname = "fspm,ch1-dram-density",
412 }, {
413 .type = FSP_UINT8,
414 .offset = offsetof(struct fsp_m_config, chan[1].option),
415 .propname = "fspm,ch1-option",
416 }, {
417 .type = FSP_UINT8,
418 .offset = offsetof(struct fsp_m_config, chan[1].odt_config),
419 .propname = "fspm,ch1-odt-config",
420 }, {
421 .type = FSP_UINT8,
422 .offset = offsetof(struct fsp_m_config, chan[1].tristate_clk1),
423 .propname = "fspm,ch1-tristate-clk1",
424 }, {
425 .type = FSP_UINT8,
426 .offset = offsetof(struct fsp_m_config, chan[1].mode2_n),
427 .propname = "fspm,ch1-mode2-n",
428 }, {
429 .type = FSP_UINT8,
430 .offset = offsetof(struct fsp_m_config, chan[1].odt_levels),
431 .propname = "fspm,ch1-odt-levels",
432 }, {
433 .type = FSP_UINT8,
434 .offset = offsetof(struct fsp_m_config, chan[2].rank_enable),
435 .propname = "fspm,ch2-rank-enable",
436 }, {
437 .type = FSP_UINT8,
438 .offset = offsetof(struct fsp_m_config, chan[2].device_width),
439 .propname = "fspm,ch2-device-width",
440 }, {
441 .type = FSP_UINT8,
442 .offset = offsetof(struct fsp_m_config, chan[2].dram_density),
443 .propname = "fspm,ch2-dram-density",
444 }, {
445 .type = FSP_UINT8,
446 .offset = offsetof(struct fsp_m_config, chan[2].option),
447 .propname = "fspm,ch2-option",
448 }, {
449 .type = FSP_UINT8,
450 .offset = offsetof(struct fsp_m_config, chan[2].odt_config),
451 .propname = "fspm,ch2-odt-config",
452 }, {
453 .type = FSP_UINT8,
454 .offset = offsetof(struct fsp_m_config, chan[2].tristate_clk1),
455 .propname = "fspm,ch2-tristate-clk1",
456 }, {
457 .type = FSP_UINT8,
458 .offset = offsetof(struct fsp_m_config, chan[2].mode2_n),
459 .propname = "fspm,ch2-mode2-n",
460 }, {
461 .type = FSP_UINT8,
462 .offset = offsetof(struct fsp_m_config, chan[2].odt_levels),
463 .propname = "fspm,ch2-odt-levels",
464 }, {
465 .type = FSP_UINT8,
466 .offset = offsetof(struct fsp_m_config, chan[3].rank_enable),
467 .propname = "fspm,ch3-rank-enable",
468 }, {
469 .type = FSP_UINT8,
470 .offset = offsetof(struct fsp_m_config, chan[3].device_width),
471 .propname = "fspm,ch3-device-width",
472 }, {
473 .type = FSP_UINT8,
474 .offset = offsetof(struct fsp_m_config, chan[3].dram_density),
475 .propname = "fspm,ch3-dram-density",
476 }, {
477 .type = FSP_UINT8,
478 .offset = offsetof(struct fsp_m_config, chan[3].option),
479 .propname = "fspm,ch3-option",
480 }, {
481 .type = FSP_UINT8,
482 .offset = offsetof(struct fsp_m_config, chan[3].odt_config),
483 .propname = "fspm,ch3-odt-config",
484 }, {
485 .type = FSP_UINT8,
486 .offset = offsetof(struct fsp_m_config, chan[3].tristate_clk1),
487 .propname = "fspm,ch3-tristate-clk1",
488 }, {
489 .type = FSP_UINT8,
490 .offset = offsetof(struct fsp_m_config, chan[3].mode2_n),
491 .propname = "fspm,ch3-mode2-n",
492 }, {
493 .type = FSP_UINT8,
494 .offset = offsetof(struct fsp_m_config, chan[3].odt_levels),
495 .propname = "fspm,ch3-odt-levels",
496 }, {
497 .type = FSP_UINT8,
498 .offset = offsetof(struct fsp_m_config, rmt_check_run),
499 .propname = "fspm,rmt-check-run",
500 }, {
501 .type = FSP_UINT16,
502 .offset = offsetof(struct fsp_m_config,
503 rmt_margin_check_scale_high_threshold),
504 .propname = "fspm,rmt-margin-check-scale-high-threshold",
505 }, {
506 .type = FSP_LPDDR4_SWIZZLE,
507 .offset = offsetof(struct fsp_m_config, ch_bit_swizzling),
508 .propname = "fspm,ch-bit-swizzling",
509 .count = SIZE_OF_MEMBER(struct fsp_m_config, ch_bit_swizzling) /
510 SIZE_OF_MEMBER(struct fsp_m_config, ch_bit_swizzling[0][0])
511 }, {
512 .type = FSP_UINT32,
513 .offset = offsetof(struct fsp_m_config, msg_level_mask),
514 .propname = "fspm,msg-level-mask",
515 }, {
516 .type = FSP_UINT8,
517 .offset = offsetof(struct fsp_m_config, pre_mem_gpio_table_pin_num),
518 .propname = "fspm,pre-mem-gpio-table-pin-num",
519 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_m_config,
520 pre_mem_gpio_table_pin_num),
521 }, {
522 .type = FSP_UINT32,
523 .offset = offsetof(struct fsp_m_config, pre_mem_gpio_table_ptr),
524 .propname = "fspm,pre-mem-gpio-table-ptr",
525 }, {
526 .type = FSP_UINT8,
527 .offset = offsetof(struct fsp_m_config, pre_mem_gpio_table_entry_num),
528 .propname = "fspm,pre-mem-gpio-table-entry-num",
529 }, {
530 .type = FSP_UINT8,
531 .offset = offsetof(struct fsp_m_config, enhance_port8xh_decoding),
532 .propname = "fspm,enhance-port8xh-decoding",
533 }, {
534 .type = FSP_UINT8,
535 .offset = offsetof(struct fsp_m_config, spd_write_enable),
536 .propname = "fspm,spd-write-enable",
537 }, {
538 .type = FSP_UINT8,
539 .offset = offsetof(struct fsp_m_config, mrc_data_saving),
540 .propname = "fspm,mrc-data-saving",
541 }, {
542 .type = FSP_UINT32,
543 .offset = offsetof(struct fsp_m_config, oem_loading_base),
544 .propname = "fspm,oem-loading-base",
545 }, {
546 .type = FSP_UINT8,
547 .offset = offsetof(struct fsp_m_config, oem_file_name),
548 .propname = "fspm,oem-file-name",
549 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_m_config, oem_file_name),
550 }, {
551 .type = FSP_UINT32,
552 .offset = offsetof(struct fsp_m_config, mrc_boot_data_ptr),
553 .propname = "fspm,mrc-boot-data-ptr",
554 }, {
555 .type = FSP_UINT8,
556 .offset = offsetof(struct fsp_m_config, e_mmc_trace_len),
Wolfgang Wallnerca1dba22020-09-11 16:52:28 +0200557 .propname = "fspm,emmc-trace-len",
Bernhard Messerklingerd9461aa2020-05-18 12:33:34 +0200558 }, {
559 .type = FSP_UINT8,
560 .offset = offsetof(struct fsp_m_config, skip_cse_rbp),
561 .propname = "fspm,skip-cse-rbp",
562 }, {
563 .type = FSP_UINT8,
564 .offset = offsetof(struct fsp_m_config, npk_en),
565 .propname = "fspm,npk-en",
566 }, {
567 .type = FSP_UINT8,
568 .offset = offsetof(struct fsp_m_config, fw_trace_en),
569 .propname = "fspm,fw-trace-en",
570 }, {
571 .type = FSP_UINT8,
572 .offset = offsetof(struct fsp_m_config, fw_trace_destination),
573 .propname = "fspm,fw-trace-destination",
574 }, {
575 .type = FSP_UINT8,
576 .offset = offsetof(struct fsp_m_config, recover_dump),
577 .propname = "fspm,recover-dump",
578 }, {
579 .type = FSP_UINT8,
580 .offset = offsetof(struct fsp_m_config, msc0_wrap),
581 .propname = "fspm,msc0-wrap",
582 }, {
583 .type = FSP_UINT8,
584 .offset = offsetof(struct fsp_m_config, msc1_wrap),
585 .propname = "fspm,msc1-wrap",
586 }, {
587 .type = FSP_UINT32,
588 .offset = offsetof(struct fsp_m_config, msc0_size),
589 .propname = "fspm,msc0-size",
590 }, {
591 .type = FSP_UINT32,
592 .offset = offsetof(struct fsp_m_config, msc1_size),
593 .propname = "fspm,msc1-size",
594 }, {
595 .type = FSP_UINT8,
596 .offset = offsetof(struct fsp_m_config, pti_mode),
597 .propname = "fspm,pti-mode",
598 }, {
599 .type = FSP_UINT8,
600 .offset = offsetof(struct fsp_m_config, pti_training),
601 .propname = "fspm,pti-training",
602 }, {
603 .type = FSP_UINT8,
604 .offset = offsetof(struct fsp_m_config, pti_speed),
605 .propname = "fspm,pti-speed",
606 }, {
607 .type = FSP_UINT8,
608 .offset = offsetof(struct fsp_m_config, punit_mlvl),
609 .propname = "fspm,punit-mlvl",
610 }, {
611 .type = FSP_UINT8,
612 .offset = offsetof(struct fsp_m_config, pmc_mlvl),
613 .propname = "fspm,pmc-mlvl",
614 }, {
615 .type = FSP_UINT8,
616 .offset = offsetof(struct fsp_m_config, sw_trace_en),
617 .propname = "fspm,sw-trace-en",
618 }, {
619 .type = FSP_UINT8,
620 .offset = offsetof(struct fsp_m_config, periodic_retraining_disable),
621 .propname = "fspm,periodic-retraining-disable",
622 }, {
623 .type = FSP_UINT8,
624 .offset = offsetof(struct fsp_m_config, enable_reset_system),
625 .propname = "fspm,enable-reset-system",
626 }, {
627 .type = FSP_UINT8,
628 .offset = offsetof(struct fsp_m_config, enable_s3_heci2),
629 .propname = "fspm,enable-s3-heci2",
630 }, {
631 .type = FSP_UINT32,
632 .offset = offsetof(struct fsp_m_config, variable_nvs_buffer_ptr),
633 .propname = "fspm,variable-nvs-buffer-ptr",
634 }, {
Bernhard Messerklinger68aa38e2020-07-22 09:29:39 +0200635 .type = FSP_UINT64,
636 .offset = offsetof(struct fsp_m_config, start_timer_ticker_of_pfet_assert),
637 .propname = "fspm,start-timer-ticker-of-pfet-assert",
638 }, {
639 .type = FSP_UINT8, .offset = offsetof(struct fsp_m_config, rt_en),
640 .propname = "fspm,rt-en",
641 }, {
642 .type = FSP_UINT8,
643 .offset = offsetof(struct fsp_m_config, skip_pcie_power_sequence),
644 .propname = "fspm,skip-pcie-power-sequence",
645 }, {
Bernhard Messerklingerd9461aa2020-05-18 12:33:34 +0200646 .propname = NULL
647 }
648};
649
650int fsp_m_update_config_from_dtb(ofnode node, struct fsp_m_config *cfg)
651{
652 return fsp_update_config_from_dtb(node, (u8 *)cfg, fsp_m_bindings);
653}
654#endif
Bernhard Messerklingerd65763c2020-05-18 12:33:35 +0200655
656#if !defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD)
657const struct fsp_binding fsp_s_bindings[] = {
658 {
659 .type = FSP_UINT8,
660 .offset = offsetof(struct fsp_s_config, active_processor_cores),
661 .propname = "fsps,active-processor-cores",
662 }, {
663 .type = FSP_UINT8,
664 .offset = offsetof(struct fsp_s_config, disable_core1),
665 .propname = "fsps,disable-core1",
666 }, {
667 .type = FSP_UINT8,
668 .offset = offsetof(struct fsp_s_config, disable_core2),
669 .propname = "fsps,disable-core2",
670 }, {
671 .type = FSP_UINT8,
672 .offset = offsetof(struct fsp_s_config, disable_core3),
673 .propname = "fsps,disable-core3",
674 }, {
675 .type = FSP_UINT8,
676 .offset = offsetof(struct fsp_s_config, vmx_enable),
677 .propname = "fsps,vmx-enable",
678 }, {
679 .type = FSP_UINT8,
680 .offset = offsetof(struct fsp_s_config, proc_trace_mem_size),
681 .propname = "fsps,proc-trace-mem-size",
682 }, {
683 .type = FSP_UINT8,
684 .offset = offsetof(struct fsp_s_config, proc_trace_enable),
685 .propname = "fsps,proc-trace-enable",
686 }, {
687 .type = FSP_UINT8,
688 .offset = offsetof(struct fsp_s_config, eist),
689 .propname = "fsps,eist",
690 }, {
691 .type = FSP_UINT8,
692 .offset = offsetof(struct fsp_s_config, boot_p_state),
693 .propname = "fsps,boot-p-state",
694 }, {
695 .type = FSP_UINT8,
696 .offset = offsetof(struct fsp_s_config, enable_cx),
697 .propname = "fsps,enable-cx",
698 }, {
699 .type = FSP_UINT8,
700 .offset = offsetof(struct fsp_s_config, c1e),
701 .propname = "fsps,c1e",
702 }, {
703 .type = FSP_UINT8,
704 .offset = offsetof(struct fsp_s_config, bi_proc_hot),
705 .propname = "fsps,bi-proc-hot",
706 }, {
707 .type = FSP_UINT8,
708 .offset = offsetof(struct fsp_s_config, pkg_c_state_limit),
709 .propname = "fsps,pkg-c-state-limit",
710 }, {
711 .type = FSP_UINT8,
712 .offset = offsetof(struct fsp_s_config, c_state_auto_demotion),
713 .propname = "fsps,c-state-auto-demotion",
714 }, {
715 .type = FSP_UINT8,
716 .offset = offsetof(struct fsp_s_config, c_state_un_demotion),
717 .propname = "fsps,c-state-un-demotion",
718 }, {
719 .type = FSP_UINT8,
720 .offset = offsetof(struct fsp_s_config, max_core_c_state),
721 .propname = "fsps,max-core-c-state",
722 }, {
723 .type = FSP_UINT8,
724 .offset = offsetof(struct fsp_s_config, pkg_c_state_demotion),
725 .propname = "fsps,pkg-c-state-demotion",
726 }, {
727 .type = FSP_UINT8,
728 .offset = offsetof(struct fsp_s_config, pkg_c_state_un_demotion),
729 .propname = "fsps,pkg-c-state-un-demotion",
730 }, {
731 .type = FSP_UINT8,
732 .offset = offsetof(struct fsp_s_config, turbo_mode),
733 .propname = "fsps,turbo-mode",
734 }, {
735 .type = FSP_UINT8,
736 .offset = offsetof(struct fsp_s_config, hda_verb_table_entry_num),
737 .propname = "fsps,hda-verb-table-entry-num",
738 }, {
739 .type = FSP_UINT32,
740 .offset = offsetof(struct fsp_s_config, hda_verb_table_ptr),
741 .propname = "fsps,hda-verb-table-ptr",
742 }, {
743 .type = FSP_UINT8,
744 .offset = offsetof(struct fsp_s_config, p2sb_unhide),
745 .propname = "fsps,p2sb-unhide",
746 }, {
747 .type = FSP_UINT8,
748 .offset = offsetof(struct fsp_s_config, ipu_en),
749 .propname = "fsps,ipu-en",
750 }, {
751 .type = FSP_UINT8,
752 .offset = offsetof(struct fsp_s_config, ipu_acpi_mode),
753 .propname = "fsps,ipu-acpi-mode",
754 }, {
755 .type = FSP_UINT8,
756 .offset = offsetof(struct fsp_s_config, force_wake),
757 .propname = "fsps,force-wake",
758 }, {
759 .type = FSP_UINT32,
760 .offset = offsetof(struct fsp_s_config, gtt_mm_adr),
761 .propname = "fsps,gtt-mm-adr",
762 }, {
763 .type = FSP_UINT32,
764 .offset = offsetof(struct fsp_s_config, gm_adr),
765 .propname = "fsps,gm-adr",
766 }, {
767 .type = FSP_UINT8,
768 .offset = offsetof(struct fsp_s_config, pavp_lock),
769 .propname = "fsps,pavp-lock",
770 }, {
771 .type = FSP_UINT8,
772 .offset = offsetof(struct fsp_s_config, graphics_freq_modify),
773 .propname = "fsps,graphics-freq-modify",
774 }, {
775 .type = FSP_UINT8,
776 .offset = offsetof(struct fsp_s_config, graphics_freq_req),
777 .propname = "fsps,graphics-freq-req",
778 }, {
779 .type = FSP_UINT8,
780 .offset = offsetof(struct fsp_s_config, graphics_video_freq),
781 .propname = "fsps,graphics-video-freq",
782 }, {
783 .type = FSP_UINT8,
784 .offset = offsetof(struct fsp_s_config, pm_lock),
785 .propname = "fsps,pm-lock",
786 }, {
787 .type = FSP_UINT8,
788 .offset = offsetof(struct fsp_s_config, dop_clock_gating),
789 .propname = "fsps,dop-clock-gating",
790 }, {
791 .type = FSP_UINT8,
792 .offset = offsetof(struct fsp_s_config, unsolicited_attack_override),
793 .propname = "fsps,unsolicited-attack-override",
794 }, {
795 .type = FSP_UINT8,
796 .offset = offsetof(struct fsp_s_config, wopcm_support),
797 .propname = "fsps,wopcm-support",
798 }, {
799 .type = FSP_UINT8,
800 .offset = offsetof(struct fsp_s_config, wopcm_size),
801 .propname = "fsps,wopcm-size",
802 }, {
803 .type = FSP_UINT8,
804 .offset = offsetof(struct fsp_s_config, power_gating),
805 .propname = "fsps,power-gating",
806 }, {
807 .type = FSP_UINT8,
808 .offset = offsetof(struct fsp_s_config, unit_level_clock_gating),
809 .propname = "fsps,unit-level-clock-gating",
810 }, {
811 .type = FSP_UINT8,
812 .offset = offsetof(struct fsp_s_config, fast_boot),
813 .propname = "fsps,fast-boot",
814 }, {
815 .type = FSP_UINT8,
816 .offset = offsetof(struct fsp_s_config, dyn_sr),
817 .propname = "fsps,dyn-sr",
818 }, {
819 .type = FSP_UINT8,
820 .offset = offsetof(struct fsp_s_config, sa_ipu_enable),
821 .propname = "fsps,sa-ipu-enable",
822 }, {
823 .type = FSP_UINT8,
824 .offset = offsetof(struct fsp_s_config, pm_support),
825 .propname = "fsps,pm-support",
826 }, {
827 .type = FSP_UINT8,
828 .offset = offsetof(struct fsp_s_config, enable_render_standby),
829 .propname = "fsps,enable-render-standby",
830 }, {
831 .type = FSP_UINT32,
832 .offset = offsetof(struct fsp_s_config, logo_size),
833 .propname = "fsps,logo-size",
834 }, {
835 .type = FSP_UINT32,
836 .offset = offsetof(struct fsp_s_config, logo_ptr),
837 .propname = "fsps,logo-ptr",
838 }, {
839 .type = FSP_UINT32,
840 .offset = offsetof(struct fsp_s_config, graphics_config_ptr),
841 .propname = "fsps,graphics-config-ptr",
842 }, {
843 .type = FSP_UINT8,
844 .offset = offsetof(struct fsp_s_config, pavp_enable),
845 .propname = "fsps,pavp-enable",
846 }, {
847 .type = FSP_UINT8,
848 .offset = offsetof(struct fsp_s_config, pavp_pr3),
849 .propname = "fsps,pavp-pr3",
850 }, {
851 .type = FSP_UINT8,
852 .offset = offsetof(struct fsp_s_config, cd_clock),
853 .propname = "fsps,cd-clock",
854 }, {
855 .type = FSP_UINT8,
856 .offset = offsetof(struct fsp_s_config, pei_graphics_peim_init),
857 .propname = "fsps,pei-graphics-peim-init",
858 }, {
859 .type = FSP_UINT8,
860 .offset = offsetof(struct fsp_s_config, write_protection_enable),
861 .propname = "fsps,write-protection-enable",
862 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
863 write_protection_enable),
864 }, {
865 .type = FSP_UINT8,
866 .offset = offsetof(struct fsp_s_config, read_protection_enable),
867 .propname = "fsps,read-protection-enable",
868 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
869 read_protection_enable),
870 }, {
871 .type = FSP_UINT16,
872 .offset = offsetof(struct fsp_s_config, protected_range_limit),
873 .propname = "fsps,protected-range-limit",
874 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
875 protected_range_limit),
876 }, {
877 .type = FSP_UINT16,
878 .offset = offsetof(struct fsp_s_config, protected_range_base),
879 .propname = "fsps,protected-range-base",
880 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
881 protected_range_base),
882 }, {
883 .type = FSP_UINT8,
884 .offset = offsetof(struct fsp_s_config, gmm),
885 .propname = "fsps,gmm",
886 }, {
887 .type = FSP_UINT8,
888 .offset = offsetof(struct fsp_s_config, clk_gating_pgcb_clk_trunk),
889 .propname = "fsps,clk-gating-pgcb-clk-trunk",
890 }, {
891 .type = FSP_UINT8,
892 .offset = offsetof(struct fsp_s_config, clk_gating_sb),
893 .propname = "fsps,clk-gating-sb",
894 }, {
895 .type = FSP_UINT8,
896 .offset = offsetof(struct fsp_s_config, clk_gating_sb_clk_trunk),
897 .propname = "fsps,clk-gating-sb-clk-trunk",
898 }, {
899 .type = FSP_UINT8,
900 .offset = offsetof(struct fsp_s_config, clk_gating_sb_clk_partition),
901 .propname = "fsps,clk-gating-sb-clk-partition",
902 }, {
903 .type = FSP_UINT8,
904 .offset = offsetof(struct fsp_s_config, clk_gating_core),
905 .propname = "fsps,clk-gating-core",
906 }, {
907 .type = FSP_UINT8,
908 .offset = offsetof(struct fsp_s_config, clk_gating_dma),
909 .propname = "fsps,clk-gating-dma",
910 }, {
911 .type = FSP_UINT8,
912 .offset = offsetof(struct fsp_s_config, clk_gating_reg_access),
913 .propname = "fsps,clk-gating-reg-access",
914 }, {
915 .type = FSP_UINT8,
916 .offset = offsetof(struct fsp_s_config, clk_gating_host),
917 .propname = "fsps,clk-gating-host",
918 }, {
919 .type = FSP_UINT8,
920 .offset = offsetof(struct fsp_s_config, clk_gating_partition),
921 .propname = "fsps,clk-gating-partition",
922 }, {
923 .type = FSP_UINT8,
924 .offset = offsetof(struct fsp_s_config, clk_gating_trunk),
925 .propname = "fsps,clk-gating-trunk",
926 }, {
927 .type = FSP_UINT8,
928 .offset = offsetof(struct fsp_s_config, hda_enable),
929 .propname = "fsps,hda-enable",
930 }, {
931 .type = FSP_UINT8,
932 .offset = offsetof(struct fsp_s_config, dsp_enable),
933 .propname = "fsps,dsp-enable",
934 }, {
935 .type = FSP_UINT8,
936 .offset = offsetof(struct fsp_s_config, pme),
937 .propname = "fsps,pme",
938 }, {
939 .type = FSP_UINT8,
940 .offset = offsetof(struct fsp_s_config, hd_audio_io_buffer_ownership),
941 .propname = "fsps,hd-audio-io-buffer-ownership",
942 }, {
943 .type = FSP_UINT8,
944 .offset = offsetof(struct fsp_s_config, hd_audio_io_buffer_voltage),
945 .propname = "fsps,hd-audio-io-buffer-voltage",
946 }, {
947 .type = FSP_UINT8,
948 .offset = offsetof(struct fsp_s_config, hd_audio_vc_type),
949 .propname = "fsps,hd-audio-vc-type",
950 }, {
951 .type = FSP_UINT8,
952 .offset = offsetof(struct fsp_s_config, hd_audio_link_frequency),
953 .propname = "fsps,hd-audio-link-frequency",
954 }, {
955 .type = FSP_UINT8,
956 .offset = offsetof(struct fsp_s_config, hd_audio_i_disp_link_frequency),
957 .propname = "fsps,hd-audio-i-disp-link-frequency",
958 }, {
959 .type = FSP_UINT8,
960 .offset = offsetof(struct fsp_s_config, hd_audio_i_disp_link_tmode),
961 .propname = "fsps,hd-audio-i-disp-link-tmode",
962 }, {
963 .type = FSP_UINT8,
964 .offset = offsetof(struct fsp_s_config, dsp_endpoint_dmic),
965 .propname = "fsps,dsp-endpoint-dmic",
966 }, {
967 .type = FSP_UINT8,
968 .offset = offsetof(struct fsp_s_config, dsp_endpoint_bluetooth),
969 .propname = "fsps,dsp-endpoint-bluetooth",
970 }, {
971 .type = FSP_UINT8,
972 .offset = offsetof(struct fsp_s_config, dsp_endpoint_i2s_skp),
973 .propname = "fsps,dsp-endpoint-i2s-skp",
974 }, {
975 .type = FSP_UINT8,
976 .offset = offsetof(struct fsp_s_config, dsp_endpoint_i2s_hp),
977 .propname = "fsps,dsp-endpoint-i2s-hp",
978 }, {
979 .type = FSP_UINT8,
980 .offset = offsetof(struct fsp_s_config, audio_ctl_pwr_gate),
981 .propname = "fsps,audio-ctl-pwr-gate",
982 }, {
983 .type = FSP_UINT8,
984 .offset = offsetof(struct fsp_s_config, audio_dsp_pwr_gate),
985 .propname = "fsps,audio-dsp-pwr-gate",
986 }, {
987 .type = FSP_UINT8,
988 .offset = offsetof(struct fsp_s_config, mmt),
989 .propname = "fsps,mmt",
990 }, {
991 .type = FSP_UINT8,
992 .offset = offsetof(struct fsp_s_config, hmt),
993 .propname = "fsps,hmt",
994 }, {
995 .type = FSP_UINT8,
996 .offset = offsetof(struct fsp_s_config, hd_audio_pwr_gate),
997 .propname = "fsps,hd-audio-pwr-gate",
998 }, {
999 .type = FSP_UINT8,
1000 .offset = offsetof(struct fsp_s_config, hd_audio_clk_gate),
1001 .propname = "fsps,hd-audio-clk-gate",
1002 }, {
1003 .type = FSP_UINT32,
1004 .offset = offsetof(struct fsp_s_config, dsp_feature_mask),
1005 .propname = "fsps,dsp-feature-mask",
1006 }, {
1007 .type = FSP_UINT32,
1008 .offset = offsetof(struct fsp_s_config, dsp_pp_module_mask),
1009 .propname = "fsps,dsp-pp-module-mask",
1010 }, {
1011 .type = FSP_UINT8,
1012 .offset = offsetof(struct fsp_s_config, bios_cfg_lock_down),
1013 .propname = "fsps,bios-cfg-lock-down",
1014 }, {
1015 .type = FSP_UINT8,
1016 .offset = offsetof(struct fsp_s_config, hpet),
1017 .propname = "fsps,hpet",
1018 }, {
1019 .type = FSP_UINT8,
1020 .offset = offsetof(struct fsp_s_config, hpet_bdf_valid),
1021 .propname = "fsps,hpet-bdf-valid",
1022 }, {
1023 .type = FSP_UINT8,
1024 .offset = offsetof(struct fsp_s_config, hpet_bus_number),
1025 .propname = "fsps,hpet-bus-number",
1026 }, {
1027 .type = FSP_UINT8,
1028 .offset = offsetof(struct fsp_s_config, hpet_device_number),
1029 .propname = "fsps,hpet-device-number",
1030 }, {
1031 .type = FSP_UINT8,
1032 .offset = offsetof(struct fsp_s_config, hpet_function_number),
1033 .propname = "fsps,hpet-function-number",
1034 }, {
1035 .type = FSP_UINT8,
1036 .offset = offsetof(struct fsp_s_config, io_apic_bdf_valid),
1037 .propname = "fsps,io-apic-bdf-valid",
1038 }, {
1039 .type = FSP_UINT8,
1040 .offset = offsetof(struct fsp_s_config, io_apic_bus_number),
1041 .propname = "fsps,io-apic-bus-number",
1042 }, {
1043 .type = FSP_UINT8,
1044 .offset = offsetof(struct fsp_s_config, io_apic_device_number),
1045 .propname = "fsps,io-apic-device-number",
1046 }, {
1047 .type = FSP_UINT8,
1048 .offset = offsetof(struct fsp_s_config, io_apic_function_number),
1049 .propname = "fsps,io-apic-function-number",
1050 }, {
1051 .type = FSP_UINT8,
1052 .offset = offsetof(struct fsp_s_config, io_apic_entry24_119),
1053 .propname = "fsps,io-apic-entry24-119",
1054 }, {
1055 .type = FSP_UINT8,
1056 .offset = offsetof(struct fsp_s_config, io_apic_id),
1057 .propname = "fsps,io-apic-id",
1058 }, {
1059 .type = FSP_UINT8,
1060 .offset = offsetof(struct fsp_s_config, io_apic_range_select),
1061 .propname = "fsps,io-apic-range-select",
1062 }, {
1063 .type = FSP_UINT8,
1064 .offset = offsetof(struct fsp_s_config, ish_enable),
1065 .propname = "fsps,ish-enable",
1066 }, {
1067 .type = FSP_UINT8,
1068 .offset = offsetof(struct fsp_s_config, bios_interface),
1069 .propname = "fsps,bios-interface",
1070 }, {
1071 .type = FSP_UINT8,
1072 .offset = offsetof(struct fsp_s_config, bios_lock),
1073 .propname = "fsps,bios-lock",
1074 }, {
1075 .type = FSP_UINT8,
1076 .offset = offsetof(struct fsp_s_config, spi_eiss),
1077 .propname = "fsps,spi-eiss",
1078 }, {
1079 .type = FSP_UINT8,
1080 .offset = offsetof(struct fsp_s_config, bios_lock_sw_smi_number),
1081 .propname = "fsps,bios-lock-sw-smi-number",
1082 }, {
1083 .type = FSP_UINT8,
1084 .offset = offsetof(struct fsp_s_config, lpss_s0ix_enable),
1085 .propname = "fsps,lpss-s0ix-enable",
1086 }, {
1087 .type = FSP_UINT8,
1088 .offset = offsetof(struct fsp_s_config, i2c_clk_gate_cfg),
1089 .propname = "fsps,i2c-clk-gate-cfg",
1090 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, i2c_clk_gate_cfg),
1091 }, {
1092 .type = FSP_UINT8,
1093 .offset = offsetof(struct fsp_s_config, hsuart_clk_gate_cfg),
1094 .propname = "fsps,hsuart-clk-gate-cfg",
1095 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, hsuart_clk_gate_cfg),
1096 }, {
1097 .type = FSP_UINT8,
1098 .offset = offsetof(struct fsp_s_config, spi_clk_gate_cfg),
1099 .propname = "fsps,spi-clk-gate-cfg",
1100 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, spi_clk_gate_cfg),
1101 }, {
1102 .type = FSP_UINT8,
1103 .offset = offsetof(struct fsp_s_config, i2c0_enable),
1104 .propname = "fsps,i2c0-enable",
1105 }, {
1106 .type = FSP_UINT8,
1107 .offset = offsetof(struct fsp_s_config, i2c1_enable),
1108 .propname = "fsps,i2c1-enable",
1109 }, {
1110 .type = FSP_UINT8,
1111 .offset = offsetof(struct fsp_s_config, i2c2_enable),
1112 .propname = "fsps,i2c2-enable",
1113 }, {
1114 .type = FSP_UINT8,
1115 .offset = offsetof(struct fsp_s_config, i2c3_enable),
1116 .propname = "fsps,i2c3-enable",
1117 }, {
1118 .type = FSP_UINT8,
1119 .offset = offsetof(struct fsp_s_config, i2c4_enable),
1120 .propname = "fsps,i2c4-enable",
1121 }, {
1122 .type = FSP_UINT8,
1123 .offset = offsetof(struct fsp_s_config, i2c5_enable),
1124 .propname = "fsps,i2c5-enable",
1125 }, {
1126 .type = FSP_UINT8,
1127 .offset = offsetof(struct fsp_s_config, i2c6_enable),
1128 .propname = "fsps,i2c6-enable",
1129 }, {
1130 .type = FSP_UINT8,
1131 .offset = offsetof(struct fsp_s_config, i2c7_enable),
1132 .propname = "fsps,i2c7-enable",
1133 }, {
1134 .type = FSP_UINT8,
1135 .offset = offsetof(struct fsp_s_config, hsuart0_enable),
1136 .propname = "fsps,hsuart0-enable",
1137 }, {
1138 .type = FSP_UINT8,
1139 .offset = offsetof(struct fsp_s_config, hsuart1_enable),
1140 .propname = "fsps,hsuart1-enable",
1141 }, {
1142 .type = FSP_UINT8,
1143 .offset = offsetof(struct fsp_s_config, hsuart2_enable),
1144 .propname = "fsps,hsuart2-enable",
1145 }, {
1146 .type = FSP_UINT8,
1147 .offset = offsetof(struct fsp_s_config, hsuart3_enable),
1148 .propname = "fsps,hsuart3-enable",
1149 }, {
1150 .type = FSP_UINT8,
1151 .offset = offsetof(struct fsp_s_config, spi0_enable),
1152 .propname = "fsps,spi0-enable",
1153 }, {
1154 .type = FSP_UINT8,
1155 .offset = offsetof(struct fsp_s_config, spi1_enable),
1156 .propname = "fsps,spi1-enable",
1157 }, {
1158 .type = FSP_UINT8,
1159 .offset = offsetof(struct fsp_s_config, spi2_enable),
1160 .propname = "fsps,spi2-enable",
1161 }, {
1162 .type = FSP_UINT8,
1163 .offset = offsetof(struct fsp_s_config, os_dbg_enable),
1164 .propname = "fsps,os-dbg-enable",
1165 }, {
1166 .type = FSP_UINT8,
1167 .offset = offsetof(struct fsp_s_config, dci_en),
1168 .propname = "fsps,dci-en",
1169 }, {
1170 .type = FSP_UINT32,
1171 .offset = offsetof(struct fsp_s_config,
1172 uart2_kernel_debug_base_address),
1173 .propname = "fsps,uart2-kernel-debug-base-address",
1174 }, {
1175 .type = FSP_UINT8,
1176 .offset = offsetof(struct fsp_s_config, pcie_clock_gating_disabled),
1177 .propname = "fsps,pcie-clock-gating-disabled",
1178 }, {
1179 .type = FSP_UINT8,
1180 .offset = offsetof(struct fsp_s_config, pcie_root_port8xh_decode),
1181 .propname = "fsps,pcie-root-port8xh-decode",
1182 }, {
1183 .type = FSP_UINT8,
1184 .offset = offsetof(struct fsp_s_config, pcie8xh_decode_port_index),
1185 .propname = "fsps,pcie8xh-decode-port-index",
1186 }, {
1187 .type = FSP_UINT8,
1188 .offset = offsetof(struct fsp_s_config,
1189 pcie_root_port_peer_memory_write_enable),
1190 .propname = "fsps,pcie-root-port-peer-memory-write-enable",
1191 }, {
1192 .type = FSP_UINT8,
1193 .offset = offsetof(struct fsp_s_config, pcie_aspm_sw_smi_number),
1194 .propname = "fsps,pcie-aspm-sw-smi-number",
1195 }, {
1196 .type = FSP_UINT8,
1197 .offset = offsetof(struct fsp_s_config, pcie_root_port_en),
1198 .propname = "fsps,pcie-root-port-en",
1199 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, pcie_root_port_en),
1200 }, {
1201 .type = FSP_UINT8,
1202 .offset = offsetof(struct fsp_s_config, pcie_rp_hide),
1203 .propname = "fsps,pcie-rp-hide",
1204 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, pcie_rp_hide),
1205 }, {
1206 .type = FSP_UINT8,
1207 .offset = offsetof(struct fsp_s_config, pcie_rp_slot_implemented),
1208 .propname = "fsps,pcie-rp-slot-implemented",
1209 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1210 pcie_rp_slot_implemented),
1211 }, {
1212 .type = FSP_UINT8,
1213 .offset = offsetof(struct fsp_s_config, pcie_rp_hot_plug),
1214 .propname = "fsps,pcie-rp-hot-plug",
1215 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, pcie_rp_hot_plug),
1216 }, {
1217 .type = FSP_UINT8,
1218 .offset = offsetof(struct fsp_s_config, pcie_rp_pm_sci),
1219 .propname = "fsps,pcie-rp-pm-sci",
1220 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, pcie_rp_pm_sci),
1221 }, {
1222 .type = FSP_UINT8,
1223 .offset = offsetof(struct fsp_s_config, pcie_rp_ext_sync),
1224 .propname = "fsps,pcie-rp-ext-sync",
1225 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, pcie_rp_ext_sync),
1226 }, {
1227 .type = FSP_UINT8,
1228 .offset = offsetof(struct fsp_s_config,
1229 pcie_rp_transmitter_half_swing),
1230 .propname = "fsps,pcie-rp-transmitter-half-swing",
1231 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1232 pcie_rp_transmitter_half_swing),
1233 }, {
1234 .type = FSP_UINT8,
1235 .offset = offsetof(struct fsp_s_config, pcie_rp_acs_enabled),
1236 .propname = "fsps,pcie-rp-acs-enabled",
1237 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, pcie_rp_acs_enabled),
1238 }, {
1239 .type = FSP_UINT8,
1240 .offset = offsetof(struct fsp_s_config, pcie_rp_clk_req_supported),
1241 .propname = "fsps,pcie-rp-clk-req-supported",
1242 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1243 pcie_rp_clk_req_supported),
1244 }, {
1245 .type = FSP_UINT8,
1246 .offset = offsetof(struct fsp_s_config, pcie_rp_clk_req_number),
1247 .propname = "fsps,pcie-rp-clk-req-number",
1248 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1249 pcie_rp_clk_req_number),
1250 }, {
1251 .type = FSP_UINT8,
1252 .offset = offsetof(struct fsp_s_config, pcie_rp_clk_req_detect),
1253 .propname = "fsps,pcie-rp-clk-req-detect",
1254 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1255 pcie_rp_clk_req_detect),
1256 }, {
1257 .type = FSP_UINT8,
1258 .offset = offsetof(struct fsp_s_config, advanced_error_reporting),
1259 .propname = "fsps,advanced-error-reporting",
1260 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1261 advanced_error_reporting),
1262 }, {
1263 .type = FSP_UINT8,
1264 .offset = offsetof(struct fsp_s_config, pme_interrupt),
1265 .propname = "fsps,pme-interrupt",
1266 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, pme_interrupt),
1267 }, {
1268 .type = FSP_UINT8,
1269 .offset = offsetof(struct fsp_s_config, unsupported_request_report),
1270 .propname = "fsps,unsupported-request-report",
1271 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1272 unsupported_request_report),
1273 }, {
1274 .type = FSP_UINT8,
1275 .offset = offsetof(struct fsp_s_config, fatal_error_report),
1276 .propname = "fsps,fatal-error-report",
1277 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, fatal_error_report),
1278 }, {
1279 .type = FSP_UINT8,
1280 .offset = offsetof(struct fsp_s_config, no_fatal_error_report),
1281 .propname = "fsps,no-fatal-error-report",
1282 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1283 no_fatal_error_report),
1284 }, {
1285 .type = FSP_UINT8,
1286 .offset = offsetof(struct fsp_s_config, correctable_error_report),
1287 .propname = "fsps,correctable-error-report",
1288 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1289 correctable_error_report),
1290 }, {
1291 .type = FSP_UINT8,
1292 .offset = offsetof(struct fsp_s_config,
1293 system_error_on_fatal_error),
1294 .propname = "fsps,system-error-on-fatal-error",
1295 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1296 system_error_on_fatal_error),
1297 }, {
1298 .type = FSP_UINT8,
1299 .offset = offsetof(struct fsp_s_config,
1300 system_error_on_non_fatal_error),
1301 .propname = "fsps,system-error-on-non-fatal-error",
1302 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1303 system_error_on_non_fatal_error),
1304 }, {
1305 .type = FSP_UINT8,
1306 .offset = offsetof(struct fsp_s_config,
1307 system_error_on_correctable_error),
1308 .propname = "fsps,system-error-on-correctable-error",
1309 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1310 system_error_on_correctable_error),
1311 }, {
1312 .type = FSP_UINT8,
1313 .offset = offsetof(struct fsp_s_config, pcie_rp_speed),
1314 .propname = "fsps,pcie-rp-speed",
1315 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, pcie_rp_speed),
1316 }, {
1317 .type = FSP_UINT8,
1318 .offset = offsetof(struct fsp_s_config, physical_slot_number),
1319 .propname = "fsps,physical-slot-number",
1320 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1321 physical_slot_number),
1322 }, {
1323 .type = FSP_UINT8,
1324 .offset = offsetof(struct fsp_s_config, pcie_rp_completion_timeout),
1325 .propname = "fsps,pcie-rp-completion-timeout",
1326 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1327 pcie_rp_completion_timeout),
1328 }, {
1329 .type = FSP_UINT8,
1330 .offset = offsetof(struct fsp_s_config, ptm_enable),
1331 .propname = "fsps,ptm-enable",
1332 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, ptm_enable),
1333 }, {
1334 .type = FSP_UINT8,
1335 .offset = offsetof(struct fsp_s_config, pcie_rp_aspm),
1336 .propname = "fsps,pcie-rp-aspm",
1337 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, pcie_rp_aspm),
1338 }, {
1339 .type = FSP_UINT8,
1340 .offset = offsetof(struct fsp_s_config, pcie_rp_l1_substates),
1341 .propname = "fsps,pcie-rp-l1-substates",
1342 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1343 pcie_rp_l1_substates),
1344 }, {
1345 .type = FSP_UINT8,
1346 .offset = offsetof(struct fsp_s_config, pcie_rp_ltr_enable),
1347 .propname = "fsps,pcie-rp-ltr-enable",
1348 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, pcie_rp_ltr_enable),
1349 }, {
1350 .type = FSP_UINT8,
1351 .offset = offsetof(struct fsp_s_config, pcie_rp_ltr_config_lock),
1352 .propname = "fsps,pcie-rp-ltr-config-lock",
1353 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1354 pcie_rp_ltr_config_lock),
1355 }, {
1356 .type = FSP_UINT8,
1357 .offset = offsetof(struct fsp_s_config, pme_b0_s5_dis),
1358 .propname = "fsps,pme-b0-s5-dis",
1359 }, {
1360 .type = FSP_UINT8,
1361 .offset = offsetof(struct fsp_s_config, pci_clock_run),
1362 .propname = "fsps,pci-clock-run",
1363 }, {
1364 .type = FSP_UINT8,
1365 .offset = offsetof(struct fsp_s_config, timer8254_clk_setting),
1366 .propname = "fsps,timer8254-clk-setting",
1367 }, {
1368 .type = FSP_UINT8,
1369 .offset = offsetof(struct fsp_s_config, enable_sata),
1370 .propname = "fsps,enable-sata",
1371 }, {
1372 .type = FSP_UINT8,
1373 .offset = offsetof(struct fsp_s_config, sata_mode),
1374 .propname = "fsps,sata-mode",
1375 }, {
1376 .type = FSP_UINT8,
1377 .offset = offsetof(struct fsp_s_config, sata_salp_support),
1378 .propname = "fsps,sata-salp-support",
1379 }, {
1380 .type = FSP_UINT8,
1381 .offset = offsetof(struct fsp_s_config, sata_pwr_opt_enable),
1382 .propname = "fsps,sata-pwr-opt-enable",
1383 }, {
1384 .type = FSP_UINT8,
1385 .offset = offsetof(struct fsp_s_config, e_sata_speed_limit),
1386 .propname = "fsps,e-sata-speed-limit",
1387 }, {
1388 .type = FSP_UINT8,
1389 .offset = offsetof(struct fsp_s_config, speed_limit),
1390 .propname = "fsps,speed-limit",
1391 }, {
1392 .type = FSP_UINT8,
1393 .offset = offsetof(struct fsp_s_config, sata_ports_enable),
1394 .propname = "fsps,sata-ports-enable",
1395 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, sata_ports_enable),
1396 }, {
1397 .type = FSP_UINT8,
1398 .offset = offsetof(struct fsp_s_config, sata_ports_dev_slp),
1399 .propname = "fsps,sata-ports-dev-slp",
1400 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, sata_ports_dev_slp),
1401 }, {
1402 .type = FSP_UINT8,
1403 .offset = offsetof(struct fsp_s_config, sata_ports_hot_plug),
1404 .propname = "fsps,sata-ports-hot-plug",
1405 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, sata_ports_hot_plug),
1406 }, {
1407 .type = FSP_UINT8,
1408 .offset = offsetof(struct fsp_s_config, sata_ports_interlock_sw),
1409 .propname = "fsps,sata-ports-interlock-sw",
1410 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1411 sata_ports_interlock_sw),
1412 }, {
1413 .type = FSP_UINT8,
1414 .offset = offsetof(struct fsp_s_config, sata_ports_external),
1415 .propname = "fsps,sata-ports-external",
1416 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, sata_ports_external),
1417 }, {
1418 .type = FSP_UINT8,
1419 .offset = offsetof(struct fsp_s_config, sata_ports_spin_up),
1420 .propname = "fsps,sata-ports-spin-up",
1421 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, sata_ports_spin_up),
1422 }, {
1423 .type = FSP_UINT8,
1424 .offset = offsetof(struct fsp_s_config, sata_ports_solid_state_drive),
1425 .propname = "fsps,sata-ports-solid-state-drive",
1426 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1427 sata_ports_solid_state_drive),
1428 }, {
1429 .type = FSP_UINT8,
1430 .offset = offsetof(struct fsp_s_config, sata_ports_enable_dito_config),
1431 .propname = "fsps,sata-ports-enable-dito-config",
1432 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1433 sata_ports_enable_dito_config),
1434 }, {
1435 .type = FSP_UINT8,
1436 .offset = offsetof(struct fsp_s_config, sata_ports_dm_val),
1437 .propname = "fsps,sata-ports-dm-val",
1438 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, sata_ports_dm_val),
1439 }, {
1440 .type = FSP_UINT16,
1441 .offset = offsetof(struct fsp_s_config, sata_ports_dito_val),
1442 .propname = "fsps,sata-ports-dito-val",
1443 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, sata_ports_dito_val),
1444 }, {
1445 .type = FSP_UINT16,
1446 .offset = offsetof(struct fsp_s_config, sub_system_vendor_id),
1447 .propname = "fsps,sub-system-vendor-id",
1448 }, {
1449 .type = FSP_UINT16,
1450 .offset = offsetof(struct fsp_s_config, sub_system_id),
1451 .propname = "fsps,sub-system-id",
1452 }, {
1453 .type = FSP_UINT8,
1454 .offset = offsetof(struct fsp_s_config, crid_settings),
1455 .propname = "fsps,crid-settings",
1456 }, {
1457 .type = FSP_UINT8,
1458 .offset = offsetof(struct fsp_s_config, reset_select),
1459 .propname = "fsps,reset-select",
1460 }, {
1461 .type = FSP_UINT8,
1462 .offset = offsetof(struct fsp_s_config, sdcard_enabled),
1463 .propname = "fsps,sdcard-enabled",
1464 }, {
1465 .type = FSP_UINT8,
1466 .offset = offsetof(struct fsp_s_config, e_mmc_enabled),
Wolfgang Wallnerca1dba22020-09-11 16:52:28 +02001467 .propname = "fsps,emmc-enabled",
Bernhard Messerklingerd65763c2020-05-18 12:33:35 +02001468 }, {
1469 .type = FSP_UINT8,
1470 .offset = offsetof(struct fsp_s_config, e_mmc_host_max_speed),
Wolfgang Wallnerca1dba22020-09-11 16:52:28 +02001471 .propname = "fsps,emmc-host-max-speed",
Bernhard Messerklingerd65763c2020-05-18 12:33:35 +02001472 }, {
1473 .type = FSP_UINT8,
1474 .offset = offsetof(struct fsp_s_config, ufs_enabled),
1475 .propname = "fsps,ufs-enabled",
1476 }, {
1477 .type = FSP_UINT8,
1478 .offset = offsetof(struct fsp_s_config, sdio_enabled),
1479 .propname = "fsps,sdio-enabled",
1480 }, {
1481 .type = FSP_UINT8,
1482 .offset = offsetof(struct fsp_s_config, gpp_lock),
1483 .propname = "fsps,gpp-lock",
1484 }, {
1485 .type = FSP_UINT8,
1486 .offset = offsetof(struct fsp_s_config, sirq_enable),
1487 .propname = "fsps,sirq-enable",
1488 }, {
1489 .type = FSP_UINT8,
1490 .offset = offsetof(struct fsp_s_config, sirq_mode),
1491 .propname = "fsps,sirq-mode",
1492 }, {
1493 .type = FSP_UINT8,
1494 .offset = offsetof(struct fsp_s_config, start_frame_pulse),
1495 .propname = "fsps,start-frame-pulse",
1496 }, {
1497 .type = FSP_UINT8,
1498 .offset = offsetof(struct fsp_s_config, smbus_enable),
1499 .propname = "fsps,smbus-enable",
1500 }, {
1501 .type = FSP_UINT8,
1502 .offset = offsetof(struct fsp_s_config, arp_enable),
1503 .propname = "fsps,arp-enable",
1504 }, {
1505 .type = FSP_UINT16,
1506 .offset = offsetof(struct fsp_s_config, num_rsvd_smbus_addresses),
1507 .propname = "fsps,num-rsvd-smbus-addresses",
1508 }, {
1509 .type = FSP_UINT8,
1510 .offset = offsetof(struct fsp_s_config, rsvd_smbus_address_table),
1511 .propname = "fsps,rsvd-smbus-address-table",
1512 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1513 rsvd_smbus_address_table),
1514 }, {
1515 .type = FSP_UINT8,
1516 .offset = offsetof(struct fsp_s_config, disable_compliance_mode),
1517 .propname = "fsps,disable-compliance-mode",
1518 }, {
1519 .type = FSP_UINT8,
1520 .offset = offsetof(struct fsp_s_config, usb_per_port_ctl),
1521 .propname = "fsps,usb-per-port-ctl",
1522 }, {
1523 .type = FSP_UINT8,
1524 .offset = offsetof(struct fsp_s_config, usb30_mode),
1525 .propname = "fsps,usb30-mode",
1526 }, {
1527 .type = FSP_UINT8,
1528 .offset = offsetof(struct fsp_s_config, port_usb20_enable),
1529 .propname = "fsps,port-usb20-enable",
1530 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, port_usb20_enable),
1531 }, {
1532 .type = FSP_UINT8,
1533 .offset = offsetof(struct fsp_s_config, port_us20b_over_current_pin),
1534 .propname = "fsps,port-us20b-over-current-pin",
1535 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1536 port_us20b_over_current_pin),
1537 }, {
1538 .type = FSP_UINT8,
1539 .offset = offsetof(struct fsp_s_config, usb_otg),
1540 .propname = "fsps,usb-otg",
1541 }, {
1542 .type = FSP_UINT8,
1543 .offset = offsetof(struct fsp_s_config, hsic_support_enable),
1544 .propname = "fsps,hsic-support-enable",
1545 }, {
1546 .type = FSP_UINT8,
1547 .offset = offsetof(struct fsp_s_config, port_usb30_enable),
1548 .propname = "fsps,port-usb30-enable",
1549 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, port_usb30_enable),
1550 }, {
1551 .type = FSP_UINT8,
1552 .offset = offsetof(struct fsp_s_config, port_us30b_over_current_pin),
1553 .propname = "fsps,port-us30b-over-current-pin",
1554 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1555 port_us30b_over_current_pin),
1556 }, {
1557 .type = FSP_UINT8,
1558 .offset = offsetof(struct fsp_s_config, ssic_port_enable),
1559 .propname = "fsps,ssic-port-enable",
1560 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, ssic_port_enable),
1561 }, {
1562 .type = FSP_UINT16,
1563 .offset = offsetof(struct fsp_s_config, dlane_pwr_gating),
1564 .propname = "fsps,dlane-pwr-gating",
1565 }, {
1566 .type = FSP_UINT8,
1567 .offset = offsetof(struct fsp_s_config, vtd_enable),
1568 .propname = "fsps,vtd-enable",
1569 }, {
1570 .type = FSP_UINT8,
1571 .offset = offsetof(struct fsp_s_config, lock_down_global_smi),
1572 .propname = "fsps,lock-down-global-smi",
1573 }, {
1574 .type = FSP_UINT16,
1575 .offset = offsetof(struct fsp_s_config, reset_wait_timer),
1576 .propname = "fsps,reset-wait-timer",
1577 }, {
1578 .type = FSP_UINT8,
1579 .offset = offsetof(struct fsp_s_config, rtc_lock),
1580 .propname = "fsps,rtc-lock",
1581 }, {
1582 .type = FSP_UINT8,
1583 .offset = offsetof(struct fsp_s_config, sata_test_mode),
1584 .propname = "fsps,sata-test-mode",
1585 }, {
1586 .type = FSP_UINT8,
1587 .offset = offsetof(struct fsp_s_config, ssic_rate),
1588 .propname = "fsps,ssic-rate",
1589 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, ssic_rate),
1590 }, {
1591 .type = FSP_UINT16,
1592 .offset = offsetof(struct fsp_s_config, dynamic_power_gating),
1593 .propname = "fsps,dynamic-power-gating",
1594 }, {
1595 .type = FSP_UINT16,
1596 .offset = offsetof(struct fsp_s_config, pcie_rp_ltr_max_snoop_latency),
1597 .propname = "fsps,pcie-rp-ltr-max-snoop-latency",
1598 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1599 pcie_rp_ltr_max_snoop_latency),
1600 }, {
1601 .type = FSP_UINT8,
1602 .offset = offsetof(struct fsp_s_config,
1603 pcie_rp_snoop_latency_override_mode),
1604 .propname = "fsps,pcie-rp-snoop-latency-override-mode",
1605 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1606 pcie_rp_snoop_latency_override_mode),
1607 }, {
1608 .type = FSP_UINT16,
1609 .offset = offsetof(struct fsp_s_config,
1610 pcie_rp_snoop_latency_override_value),
1611 .propname = "fsps,pcie-rp-snoop-latency-override-value",
1612 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1613 pcie_rp_snoop_latency_override_value),
1614 }, {
1615 .type = FSP_UINT8,
1616 .offset = offsetof(struct fsp_s_config,
1617 pcie_rp_snoop_latency_override_multiplier),
1618 .propname = "fsps,pcie-rp-snoop-latency-override-multiplier",
1619 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1620 pcie_rp_snoop_latency_override_multiplier),
1621 }, {
1622 .type = FSP_UINT8,
1623 .offset = offsetof(struct fsp_s_config, skip_mp_init),
1624 .propname = "fsps,skip-mp-init",
1625 }, {
1626 .type = FSP_UINT8,
1627 .offset = offsetof(struct fsp_s_config, dci_auto_detect),
1628 .propname = "fsps,dci-auto-detect",
1629 }, {
1630 .type = FSP_UINT16,
1631 .offset = offsetof(struct fsp_s_config,
1632 pcie_rp_ltr_max_non_snoop_latency),
1633 .propname = "fsps,pcie-rp-ltr-max-non-snoop-latency",
1634 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1635 pcie_rp_ltr_max_non_snoop_latency),
1636 }, {
1637 .type = FSP_UINT8,
1638 .offset = offsetof(struct fsp_s_config,
1639 pcie_rp_non_snoop_latency_override_mode),
1640 .propname = "fsps,pcie-rp-non-snoop-latency-override-mode",
1641 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1642 pcie_rp_non_snoop_latency_override_mode),
1643 }, {
1644 .type = FSP_UINT8,
1645 .offset = offsetof(struct fsp_s_config, tco_timer_halt_lock),
1646 .propname = "fsps,tco-timer-halt-lock",
1647 }, {
1648 .type = FSP_UINT8,
1649 .offset = offsetof(struct fsp_s_config, pwr_btn_override_period),
1650 .propname = "fsps,pwr-btn-override-period",
1651 }, {
1652 .type = FSP_UINT16,
1653 .offset = offsetof(struct fsp_s_config,
1654 pcie_rp_non_snoop_latency_override_value),
1655 .propname = "fsps,pcie-rp-non-snoop-latency-override-value",
1656 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1657 pcie_rp_non_snoop_latency_override_value),
1658 }, {
1659 .type = FSP_UINT8,
1660 .offset = offsetof(struct fsp_s_config,
1661 pcie_rp_non_snoop_latency_override_multiplier),
1662 .propname = "fsps,pcie-rp-non-snoop-latency-override-multiplier",
1663 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1664 pcie_rp_non_snoop_latency_override_multiplier),
1665 }, {
1666 .type = FSP_UINT8,
1667 .offset = offsetof(struct fsp_s_config, pcie_rp_slot_power_limit_scale),
1668 .propname = "fsps,pcie-rp-slot-power-limit-scale",
1669 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1670 pcie_rp_slot_power_limit_scale),
1671 }, {
1672 .type = FSP_UINT8,
1673 .offset = offsetof(struct fsp_s_config, pcie_rp_slot_power_limit_value),
1674 .propname = "fsps,pcie-rp-slot-power-limit-value",
1675 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1676 pcie_rp_slot_power_limit_value),
1677 }, {
1678 .type = FSP_UINT8,
1679 .offset = offsetof(struct fsp_s_config, disable_native_power_button),
1680 .propname = "fsps,disable-native-power-button",
1681 }, {
1682 .type = FSP_UINT8,
1683 .offset = offsetof(struct fsp_s_config, power_butter_debounce_mode),
1684 .propname = "fsps,power-butter-debounce-mode",
1685 }, {
1686 .type = FSP_UINT32,
1687 .offset = offsetof(struct fsp_s_config, sdio_tx_cmd_cntl),
1688 .propname = "fsps,sdio-tx-cmd-cntl",
1689 }, {
1690 .type = FSP_UINT32,
1691 .offset = offsetof(struct fsp_s_config, sdio_tx_data_cntl1),
1692 .propname = "fsps,sdio-tx-data-cntl1",
1693 }, {
1694 .type = FSP_UINT32,
1695 .offset = offsetof(struct fsp_s_config, sdio_tx_data_cntl2),
1696 .propname = "fsps,sdio-tx-data-cntl2",
1697 }, {
1698 .type = FSP_UINT32,
1699 .offset = offsetof(struct fsp_s_config, sdio_rx_cmd_data_cntl1),
1700 .propname = "fsps,sdio-rx-cmd-data-cntl1",
1701 }, {
1702 .type = FSP_UINT32,
1703 .offset = offsetof(struct fsp_s_config, sdio_rx_cmd_data_cntl2),
1704 .propname = "fsps,sdio-rx-cmd-data-cntl2",
1705 }, {
1706 .type = FSP_UINT32,
1707 .offset = offsetof(struct fsp_s_config, sdcard_tx_cmd_cntl),
1708 .propname = "fsps,sdcard-tx-cmd-cntl",
1709 }, {
1710 .type = FSP_UINT32,
1711 .offset = offsetof(struct fsp_s_config, sdcard_tx_data_cntl1),
1712 .propname = "fsps,sdcard-tx-data-cntl1",
1713 }, {
1714 .type = FSP_UINT32,
1715 .offset = offsetof(struct fsp_s_config, sdcard_tx_data_cntl2),
1716 .propname = "fsps,sdcard-tx-data-cntl2",
1717 }, {
1718 .type = FSP_UINT32,
1719 .offset = offsetof(struct fsp_s_config, sdcard_rx_cmd_data_cntl1),
1720 .propname = "fsps,sdcard-rx-cmd-data-cntl1",
1721 }, {
1722 .type = FSP_UINT32,
1723 .offset = offsetof(struct fsp_s_config, sdcard_rx_strobe_cntl),
1724 .propname = "fsps,sdcard-rx-strobe-cntl",
1725 }, {
1726 .type = FSP_UINT32,
1727 .offset = offsetof(struct fsp_s_config, sdcard_rx_cmd_data_cntl2),
1728 .propname = "fsps,sdcard-rx-cmd-data-cntl2",
1729 }, {
1730 .type = FSP_UINT32,
1731 .offset = offsetof(struct fsp_s_config, emmc_tx_cmd_cntl),
1732 .propname = "fsps,emmc-tx-cmd-cntl",
1733 }, {
1734 .type = FSP_UINT32,
1735 .offset = offsetof(struct fsp_s_config, emmc_tx_data_cntl1),
1736 .propname = "fsps,emmc-tx-data-cntl1",
1737 }, {
1738 .type = FSP_UINT32,
1739 .offset = offsetof(struct fsp_s_config, emmc_tx_data_cntl2),
1740 .propname = "fsps,emmc-tx-data-cntl2",
1741 }, {
1742 .type = FSP_UINT32,
1743 .offset = offsetof(struct fsp_s_config, emmc_rx_cmd_data_cntl1),
1744 .propname = "fsps,emmc-rx-cmd-data-cntl1",
1745 }, {
1746 .type = FSP_UINT32,
1747 .offset = offsetof(struct fsp_s_config, emmc_rx_strobe_cntl),
1748 .propname = "fsps,emmc-rx-strobe-cntl",
1749 }, {
1750 .type = FSP_UINT32,
1751 .offset = offsetof(struct fsp_s_config, emmc_rx_cmd_data_cntl2),
1752 .propname = "fsps,emmc-rx-cmd-data-cntl2",
1753 }, {
1754 .type = FSP_UINT32,
1755 .offset = offsetof(struct fsp_s_config, emmc_master_sw_cntl),
1756 .propname = "fsps,emmc-master-sw-cntl",
1757 }, {
1758 .type = FSP_UINT8,
1759 .offset = offsetof(struct fsp_s_config, pcie_rp_selectable_deemphasis),
1760 .propname = "fsps,pcie-rp-selectable-deemphasis",
1761 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1762 pcie_rp_selectable_deemphasis),
1763 }, {
1764 .type = FSP_UINT8,
1765 .offset = offsetof(struct fsp_s_config, monitor_mwait_enable),
1766 .propname = "fsps,monitor-mwait-enable",
1767 }, {
1768 .type = FSP_UINT8,
1769 .offset = offsetof(struct fsp_s_config, hd_audio_dsp_uaa_compliance),
1770 .propname = "fsps,hd-audio-dsp-uaa-compliance",
1771 }, {
1772 .type = FSP_UINT32,
1773 .offset = offsetof(struct fsp_s_config, ipc),
1774 .propname = "fsps,ipc",
1775 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config, ipc),
1776 }, {
1777 .type = FSP_UINT8,
1778 .offset = offsetof(struct fsp_s_config, sata_ports_disable_dynamic_pg),
1779 .propname = "fsps,sata-ports-disable-dynamic-pg",
1780 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1781 sata_ports_disable_dynamic_pg),
1782 }, {
1783 .type = FSP_UINT8,
1784 .offset = offsetof(struct fsp_s_config, init_s3_cpu),
1785 .propname = "fsps,init-s3-cpu",
1786 }, {
1787 .type = FSP_UINT8,
1788 .offset = offsetof(struct fsp_s_config, skip_punit_init),
1789 .propname = "fsps,skip-punit-init",
1790 }, {
1791 .type = FSP_UINT8,
1792 .offset = offsetof(struct fsp_s_config, port_usb20_per_port_tx_pe_half),
1793 .propname = "fsps,port-usb20-per-port-tx-pe-half",
1794 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1795 port_usb20_per_port_tx_pe_half),
1796 }, {
1797 .type = FSP_UINT8,
1798 .offset = offsetof(struct fsp_s_config, port_usb20_per_port_pe_txi_set),
1799 .propname = "fsps,port-usb20-per-port-pe-txi-set",
1800 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1801 port_usb20_per_port_pe_txi_set),
1802 }, {
1803 .type = FSP_UINT8,
1804 .offset = offsetof(struct fsp_s_config, port_usb20_per_port_txi_set),
1805 .propname = "fsps,port-usb20-per-port-txi-set",
1806 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1807 port_usb20_per_port_txi_set),
1808 }, {
1809 .type = FSP_UINT8,
1810 .offset = offsetof(struct fsp_s_config, port_usb20_hs_skew_sel),
1811 .propname = "fsps,port-usb20-hs-skew-sel",
1812 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1813 port_usb20_hs_skew_sel),
1814 }, {
1815 .type = FSP_UINT8,
1816 .offset = offsetof(struct fsp_s_config,
1817 port_usb20_i_usb_tx_emphasis_en),
1818 .propname = "fsps,port-usb20-i-usb-tx-emphasis-en",
1819 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1820 port_usb20_i_usb_tx_emphasis_en),
1821 }, {
1822 .type = FSP_UINT8,
1823 .offset = offsetof(struct fsp_s_config,
1824 port_usb20_per_port_rxi_set),
1825 .propname = "fsps,port-usb20-per-port-rxi-set",
1826 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1827 port_usb20_per_port_rxi_set),
1828 }, {
1829 .type = FSP_UINT8,
1830 .offset = offsetof(struct fsp_s_config, port_usb20_hs_npre_drv_sel),
1831 .propname = "fsps,port-usb20-hs-npre-drv-sel",
1832 .count = ARRAY_SIZE_OF_MEMBER(struct fsp_s_config,
1833 port_usb20_hs_npre_drv_sel),
1834 }, {
Bernhard Messerklinger68aa38e2020-07-22 09:29:39 +02001835 .type = FSP_UINT8,
1836 .offset = offsetof(struct fsp_s_config, os_selection),
1837 .propname = "fsps,os-selection",
1838 }, {
1839 .type = FSP_UINT8,
1840 .offset = offsetof(struct fsp_s_config, dptf_enabled),
1841 .propname = "fsps,dptf-enabled",
1842 }, {
1843 .type = FSP_UINT8,
1844 .offset = offsetof(struct fsp_s_config, pwm_enabled),
1845 .propname = "fsps,pwm-enabled",
1846 }, {
Bernhard Messerklingerd65763c2020-05-18 12:33:35 +02001847 .propname = NULL
1848 }
1849};
1850
1851int fsp_s_update_config_from_dtb(ofnode node, struct fsp_s_config *cfg)
1852{
1853 return fsp_update_config_from_dtb(node, (u8 *)cfg, fsp_s_bindings);
1854}
1855#endif