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