coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
tegra_lp0_resume.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /* Function unit addresses. */
4 enum {
5  UP_TAG_BASE = 0x60000000,
6  TIMER_BASE = 0x60005000,
7  CLK_RST_BASE = 0x60006000,
8  FLOW_CTLR_BASE = 0x60007000,
9  SECURE_BOOT_BASE = 0x6000C200,
10  TEGRA_EVP_BASE = 0x6000f000,
11  APB_MISC_BASE = 0x70000000,
12  PINMUX_BASE = 0x70003000,
13  PMC_CTLR_BASE = 0x7000e400,
14  MC_CTLR_BASE = 0x70019000,
15  FUSE_BASE = 0x7000F800,
16  TEGRA_SDMMC1_BASE = 0x700b0000,
17  TEGRA_SDMMC3_BASE = 0x700b0400,
18  EMC_BASE = 0x7001B000,
19  I2C5_BASE = 0x7000D000,
20  I2S_BASE = 0x702d1000
21 };
22 
23 /* UP tag registers. */
24 static uint32_t *up_tag_ptr = (void *)(UP_TAG_BASE + 0x0);
25 enum {
26  UP_TAG_AVP = 0xaaaaaaaa
27 };
28 
29 /* APB Misc JTAG Configuration Register */
30 static uint32_t *misc_pp_config_ctl_ptr = (void *)(APB_MISC_BASE + 0x24);
31 enum {
32  PP_CONFIG_CTL_TBE = 0x1 << 7,
33  PP_CONFIG_CTL_JTAG = 0x1 << 6
34 };
35 
36 static uint32_t *misc_gp_asdbgreg_ptr = (void *)(APB_MISC_BASE + 0x810);
37 enum {
40 };
41 
42 /* PINMUX registers. */
43 static uint32_t *pinmux_pwr_i2c_scl_ptr = (void *)(PINMUX_BASE + 0xdc);
44 static uint32_t *pinmux_pwr_i2c_sda_ptr = (void *)(PINMUX_BASE + 0xe0);
45 static uint32_t *pinmux_dvfs_pwm_ptr = (void *)(PINMUX_BASE + 0x184);
46 static uint32_t *pinmux_gpio_pa6_ptr = (void *)(PINMUX_BASE + 0x244);
47 enum {
48  E_INPUT = 1 << 6,
49  TRISTATE = 1 << 4,
50  PM_CLDVFS = 1,
51  PM_I2CPMU = 0
52 };
53 
54 /* Timer registers. */
55 static uint32_t *timer_us_ptr = (void *)(TIMER_BASE + 0x10);
56 static uint32_t *timer_us_cfg_ptr = (void *)(TIMER_BASE + 0x14);
57 
58 /* Clock and reset controller registers. */
60 enum {
61  SWR_TRIG_SYS_RST = 0x1 << 2
62 };
63 
65 
67 enum {
68  CCLKG_PLLP_BURST_POLICY = 0x20004444
69 };
70 
72 enum {
73  CCLKLP_PLLP_BURST_POLICY = 0x20004444
74 };
75 
78 enum {
79  SUPER_CDIV_ENB = 0x1 << 31
80 };
81 
82 static uint32_t *clk_rst_osc_ctrl_ptr = (void *)(CLK_RST_BASE + 0x50);
83 enum {
84  OSC_XOE = 0x1 << 0,
89 };
90 
91 static uint32_t *clk_rst_pllx_base_ptr = (void *)(CLK_RST_BASE + 0xe0);
92 enum {
93  PLLX_ENABLE = 0x1 << 30
94 };
95 
97 enum {
99 };
100 
101 static uint32_t *clk_rst_rst_dev_h_set_ptr = (void *)(CLK_RST_BASE + 0x308);
102 enum {
103  I2C5_RST = 0x1 << 15
104 };
105 
106 static uint32_t *clk_rst_rst_dev_h_clr_ptr = (void *)(CLK_RST_BASE + 0x30c);
107 
108 static uint32_t *clk_rst_rst_dev_u_clr_ptr = (void *)(CLK_RST_BASE + 0x314);
109 enum {
110  SWR_CSITE_RST = 0x1 << 9
111 };
112 
113 static uint32_t *clk_rst_rst_dev_v_clr_ptr = (void *)(CLK_RST_BASE + 0x434);
114 enum {
115  MSELECT_RST = 0x1 << 3
116 };
117 
118 static uint32_t *clk_rst_clk_enb_l_set_ptr = (void *)(CLK_RST_BASE + 0x320);
119 enum {
120  CLK_ENB_CPU = 0x1 << 0
121 };
122 
123 static uint32_t *clk_rst_clk_enb_h_set_ptr = (void *)(CLK_RST_BASE + 0x328);
124 enum {
125  CLK_ENB_I2C5 = 0x1 << 15
126 };
127 
129  (void *)(CLK_RST_BASE + 0x330);
130 enum {
131  CLK_ENB_CSITE = 0x1 << 9
132 };
133 
135  (void *)(CLK_RST_BASE + 0x388);
136 enum {
139 };
140 
141 static uint32_t *clk_rst_clk_enb_v_set_ptr = (void *)(CLK_RST_BASE + 0x440);
142 enum {
143  CLK_ENB_CPUG = 0x1 << 0,
144 };
145 
146 static uint32_t *clk_rst_clk_enb_y_set_ptr = (void *)(CLK_RST_BASE + 0x29c);
147 enum {
148  CLK_ENB_PLLP_OUT_CPU = 0x1 << 31
149 };
150 
152  (void *)(CLK_RST_BASE + 0x454);
153 enum {
154  CLR_CPURESET0 = 0x1 << 0,
155  CLR_CPURESET1 = 0x1 << 1,
156  CLR_CPURESET2 = 0x1 << 2,
157  CLR_CPURESET3 = 0x1 << 3,
158  CLR_DBGRESET0 = 0x1 << 12,
159  CLR_DBGRESET1 = 0x1 << 13,
160  CLR_DBGRESET2 = 0x1 << 14,
161  CLR_DBGRESET3 = 0x1 << 15,
162  CLR_CORERESET0 = 0x1 << 16,
163  CLR_CORERESET1 = 0x1 << 17,
164  CLR_CORERESET2 = 0x1 << 18,
165  CLR_CORERESET3 = 0x1 << 19,
166  CLR_CXRESET0 = 0x1 << 20,
167  CLR_CXRESET1 = 0x1 << 21,
168  CLR_CXRESET2 = 0x1 << 22,
169  CLR_CXRESET3 = 0x1 << 23,
170  CLR_L2RESET = 0x1 << 24,
171  CLR_NONCPURESET = 0x1 << 29,
172  CLR_PRESETDBG = 0x1 << 30
173 };
174 
176  (void *)(CLK_RST_BASE + 0x55c);
177 enum {
178  CLK_M_DIVISOR_MASK = 0x3 << 2,
179  CLK_M_DIVISOR_BY_2 = 0x1 << 2
180 };
181 
187 
191 static uint32_t *clk_rst_clk_out_enb_v_ptr = (void *)(CLK_RST_BASE + 0x360);
192 static uint32_t *clk_rst_clk_out_enb_w_ptr = (void *)(CLK_RST_BASE + 0x364);
193 static uint32_t *clk_rst_clk_out_enb_x_ptr = (void *)(CLK_RST_BASE + 0x280);
194 static uint32_t *clk_rst_clk_out_enb_y_ptr = (void *)(CLK_RST_BASE + 0x298);
195 
196 static uint32_t *clk_rst_clk_enb_l_clr_ptr = (void *)(CLK_RST_BASE + 0x324);
197 static uint32_t *clk_rst_clk_enb_h_clr_ptr = (void *)(CLK_RST_BASE + 0x32c);
198 static uint32_t *clk_rst_clk_enb_u_clr_ptr = (void *)(CLK_RST_BASE + 0x334);
199 static uint32_t *clk_rst_clk_enb_v_clr_ptr = (void *)(CLK_RST_BASE + 0x444);
200 static uint32_t *clk_rst_clk_enb_w_clr_ptr = (void *)(CLK_RST_BASE + 0x44c);
201 static uint32_t *clk_rst_clk_enb_x_clr_ptr = (void *)(CLK_RST_BASE + 0x288);
202 static uint32_t *clk_rst_clk_enb_y_clr_ptr = (void *)(CLK_RST_BASE + 0x2a0);
203 
204 #define MBIST_CLK_ENB_L_0 0x80000130
205 #define MBIST_CLK_ENB_H_0 0x020000C1
206 #define MBIST_CLK_ENB_U_0 0x01F00200
207 #define MBIST_CLK_ENB_V_0 0x80400008
208 #define MBIST_CLK_ENB_W_0 0x002000FC
209 #define MBIST_CLK_ENB_X_0 0x23004780
210 #define MBIST_CLK_ENB_Y_0 0x00000300
211 
212 static uint32_t *clk_rst_clk_enb_v_ptr = (void *)(CLK_RST_BASE + 0x440);
213 enum {
214  CLK_ENB_MSELECT = 0x1 << 3
215 };
216 
217 static uint32_t *clk_rst_clk_enb_w_set_ptr = (void *)(CLK_RST_BASE + 0x448);
218 enum {
219  CLK_ENB_MC1 = 0x1 << 30,
220  CLK_ENB_DVFS = 0x1 << 27
221 };
222 
224 enum {
225  CLK_SRC_PLLP_OUT0 = (0x0 << 29),
227 };
228 
229 static uint32_t *clk_rst_clk_dvfs_ref_ptr = (void *)(CLK_RST_BASE + 0x62c);
230 enum {
232 };
233 
234 static uint32_t *clk_rst_clk_dvfs_soc_ptr = (void *)(CLK_RST_BASE + 0x630);
235 enum {
237 };
238 
239 /* Flow controller registers. */
241  (void *)(FLOW_CTLR_BASE + 0x4);
242 enum {
243  EVENT_MSEC = 0x1 << 24,
244  EVENT_JTAG = 0x1 << 28,
247 };
248 
250  (void *)(FLOW_CTLR_BASE + 0x40);
252  (void *)(FLOW_CTLR_BASE + 0x58);
253 enum {
254  RAM_REPAIR_REQ = 0x1 << 0,
255  RAM_REPAIR_STS = 0x1 << 1,
256 };
257 
259  (void *)(FLOW_CTLR_BASE + 0x98);
260 enum {
261  ACTIVE_SLOW = 0x1 << 0
262 };
263 
264 /* Power management controller registers. */
265 enum {
272 };
273 
274 static uint32_t *pmc_dpd_sample_ptr = (void *)(PMC_CTLR_BASE + 0x20);
275 static uint32_t *pmc_clamp_status_ptr = (void *)(PMC_CTLR_BASE + 0x2c);
276 
277 static uint32_t *pmc_pwrgate_toggle_ptr = (void *)(PMC_CTLR_BASE + 0x30);
278 enum {
279  PWRGATE_TOGGLE_START = 0x1 << 8
280 };
281 
283 
284 static uint32_t *pmc_pwrgate_status_ptr = (void *)(PMC_CTLR_BASE + 0x38);
285 
287 
288 static uint32_t *pmc_odmdata_ptr = (void *)(PMC_CTLR_BASE + 0xa0);
289 
290 static uint32_t *pmc_scratch4_ptr = (void *)(PMC_CTLR_BASE + 0x60);
291 enum {
292  PMC_WAKEUP_CLUSTER_LPCPU = 1 << 31
293 };
294 
295 static uint32_t *pmc_scratch190_ptr = (void *)(PMC_CTLR_BASE + 0x818);
296 
297 /* SCRATCH201 bit 1 is used to designate 77621 PMIC for CPU rail. */
298 static uint32_t *pmc_scratch201_ptr = (void *)(PMC_CTLR_BASE + 0x844);
299 enum {
300  PMIC_77621 = 0x1 << 1
301 };
302 
303 static uint32_t *pmc_secure_scratch34_ptr = (void *)(PMC_CTLR_BASE + 0x368);
304 static uint32_t *pmc_secure_scratch35_ptr = (void *)(PMC_CTLR_BASE + 0x36c);
305 
306 static uint32_t *pmc_osc_edpd_over_ptr = (void *)(PMC_CTLR_BASE + 0x1a4);
307 enum {
309  PMC_XOFS_MASK = 0x3f << PMC_XOFS_SHIFT
310 };
311 
312 static uint32_t *pmc_sticky_bits_ptr = (void *)(PMC_CTLR_BASE + 0x2c0);
313 enum {
314  HDA_LPBK_DIS = 1 << 0,
315 };
316 
317 static uint32_t *pmc_set_sw_clamp_ptr = (void *)(PMC_CTLR_BASE + 0x47c);
318 
319 /* Memory controller registers. */
321 static uint32_t *mc_intmask_ptr = (void *)(MC_CTLR_BASE + 0x4);
323 
325  (void *)(MC_CTLR_BASE + 0x650);
326 enum {
328  VPR_ALLOW_TZ_WR_ACCESS = 0x1 << 1
329 };
330 /* FUSE registers */
331 static uint32_t *fuse_security_mode_ptr = (void *)(FUSE_BASE + 0x1a0);
332 enum {
333  SECURITY_MODE = 0x1 << 0
334 };
335 
336 /* SECURE_BOOT registers */
337 static uint32_t *sb_pfcfg_ptr = (void *)(SECURE_BOOT_BASE + 0x8);
338 enum {
339  SECURE_BOOT_DEBUG_CONFIG = 0x1 << 3
340 };
341 
342 static uint32_t *sb_aa64_reset_low = (void *)(SECURE_BOOT_BASE + 0x30);
343 static uint32_t *sb_aa64_reset_high = (void *)(SECURE_BOOT_BASE + 0x34);
344 
345 /* EMC registers */
346 static uint32_t *pmacro_cfg_pm_global = (void *)(EMC_BASE + 0xc30);
347 enum {
348  DISABLE_CFG_BYTE0 = 0x1 << 16,
349  DISABLE_CFG_BYTE1 = 0x1 << 17,
350  DISABLE_CFG_BYTE2 = 0x1 << 18,
351  DISABLE_CFG_BYTE3 = 0x1 << 19,
352  DISABLE_CFG_BYTE4 = 0x1 << 20,
353  DISABLE_CFG_BYTE5 = 0x1 << 21,
354  DISABLE_CFG_BYTE6 = 0x1 << 22,
355  DISABLE_CFG_BYTE7 = 0x1 << 23,
356  DISABLE_CFG_BYTES = 0xff << 16,
357  ENABLE_CFG_BYTES = 0 << 16,
358  DISABLE_CFG_CMD0 = 0x1 << 24,
359  DISABLE_CFG_CMD1 = 0x1 << 25,
360  DISABLE_CFG_CMD2 = 0x1 << 26,
361  DISABLE_CFG_CMD3 = 0x1 << 27,
362 };
363 
364 static uint32_t *pmacro_training_ctrl_0_ptr = (void *)(EMC_BASE + 0xcf8);
365 static uint32_t *pmacro_training_ctrl_1_ptr = (void *)(EMC_BASE + 0xcfc);
366 enum {
367  TRAINING_E_WRPTR = 0x1 << 3
368 };
369 
370 static uint32_t *fbio_cfg7_ptr = (void *)(EMC_BASE + 0x584);
371 enum {
372  CH1_ENABLE = 0x1 << 2
373 };
374 
375 /* I2C5 registers */
376 static uint32_t *i2c5_cnfg_ptr = (void *)(I2C5_BASE + 0x0);
377 enum {
380  I2C_SEND = 1 << 9,
381  I2C_LENGTH_2_BYTES = 1 << 1
382 };
383 
384 static uint32_t *i2c5_cmd_addr0_ptr = (void *)(I2C5_BASE + 0x4);
385 static uint32_t *i2c5_cmd_data1_ptr = (void *)(I2C5_BASE + 0xc);
386 static uint32_t *i2c5_status_ptr = (void *)(I2C5_BASE + 0x1c);
387 enum {
388  I2C_STATUS_BUSY = 1 << 8,
391 };
392 
393 static uint32_t *i2c5_config_load_ptr = (void *)(I2C5_BASE + 0x8c);
394 enum {
395  MSTR_CONFIG_LOAD = 1 << 0
396 };
397 
398 #define MAX77620_I2C_ADDR (0x3c << 1)
399 #define MAX77620_GPIO5_DATA (0x3b | (0x9 << 8))
400 
401 #define MAX77621_I2C_ADDR (0x1b << 1)
402 #define MAX77621_VOUT_REG 0x0
403 #define MAX77621_VOUT_VAL (0x80 | 0x27)
404 #define MAX77621_VOUT_DATA (MAX77621_VOUT_REG | (MAX77621_VOUT_VAL << 8))
405 
406 /* Utility functions. */
407 
408 static __always_inline void __noreturn halt(void)
409 {
410  for (;;);
411 }
412 
413 static inline uint32_t read32(const void *addr)
414 {
415  return *(volatile uint32_t *)addr;
416 }
417 
418 static inline void write32(void *addr, uint32_t val)
419 {
420  *(volatile uint32_t *)addr = val;
421 }
422 
423 static inline void setbits32(uint32_t bits, void *addr)
424 {
425  write32(addr, read32(addr) | bits);
426 }
427 
428 static inline void clrbits32(uint32_t bits, void *addr)
429 {
430  write32(addr, read32(addr) & ~bits);
431 }
432 
433 static void __noreturn reset(void)
434 {
436  halt();
437 }
438 
439 static void udelay(unsigned int usecs)
440 {
441  uint32_t start = read32(timer_us_ptr);
442  while (read32(timer_us_ptr) - start < usecs)
443  ;
444 }
445 
446 /* UART related defines */
448  (uint32_t *)0x60006010,
449  (uint32_t *)0x60006010,
450  (uint32_t *)0x60006014,
451  (uint32_t *)0x60006018
452 };
453 
455  (uint32_t *)0x60006004,
456  (uint32_t *)0x60006004,
457  (uint32_t *)0x60006008,
458  (uint32_t *)0x6000600c
459 };
460 
462  1 << 6,
463  1 << 7,
464  1 << 23,
465  1 << 1
466 };
467 
469  (uint32_t *)0x60006178,
470  (uint32_t *)0x6000617c,
471  (uint32_t *)0x600061a0,
472  (uint32_t *)0x600061c0
473 };
474 
475 static uint32_t *uart_base_regs[4] = {
476  (uint32_t *)0x70006000,
477  (uint32_t *)0x70006040,
478  (uint32_t *)0x70006200,
479  (uint32_t *)0x70006300
480 };
481 
482 enum {
486  UART_LCR = 0x3
487 };
488 enum {
489  UART_RATE_115200 = (408000000/115200/16), /* based on 408000000 PLLP */
490  FCR_TX_CLR = 0x4, /* bit 2 of FCR : clear TX FIFO */
491  FCR_RX_CLR = 0x2, /* bit 1 of FCR : clear RX FIFO */
492  FCR_EN_FIFO = 0x1, /* bit 0 of FCR : enable TX & RX FIFO */
493  LCR_DLAB = 0x80, /* bit 7 of LCR : Divisor Latch Access Bit */
494  LCR_WD_SIZE_8 = 0x3 /* bit 1:0 of LCR : word length of 8 */
495 };
496 
497 static void enable_uart(void)
498 {
499  uint32_t *uart_clk_enb_reg;
500  uint32_t *uart_rst_reg;
501  uint32_t *uart_clk_source;
502  uint32_t uart_port;
503  uint32_t uart_mask;
504  uint32_t *uart_base;
505 
506  /*
507  * Read odmdata (stored in pmc->odmdata) to determine debug uart port.
508  *
509  * Bits 15-17 of odmdata contains debug uart port.
510  * 0 : UARTA
511  * 1 : UARTB
512  * 2 : UARTC
513  * 3 : UARTD
514  */
515  uart_port = (read32(pmc_odmdata_ptr) >> 15) & 0x7;
516 
517  /* Default to UARTA if uart_port is out of range */
518  if (uart_port >= 4)
519  uart_port = 0;
520 
521  uart_clk_enb_reg = uart_clk_out_enb_regs[uart_port];
522  uart_rst_reg = uart_rst_devices_regs[uart_port];
523  uart_mask = uart_enable_mask[uart_port];
524  uart_clk_source = uart_clk_source_regs[uart_port];
525  uart_base = uart_base_regs[uart_port];
526 
527  /* Enable UART clock */
528  setbits32(uart_mask, uart_clk_enb_reg);
529 
530  /* Reset and unreset UART */
531  setbits32(uart_mask, uart_rst_reg);
532  clrbits32(uart_mask, uart_rst_reg);
533 
534  /* Program UART clock source: PLLP (408000000) */
535  write32(uart_clk_source, 0);
536 
537  /* Program 115200n8 to the uart port */
538  /* baud-rate of 115200 */
539  write32((uart_base + UART_LCR), LCR_DLAB);
540  write32((uart_base + UART_THR_DLAB), (UART_RATE_115200 & 0xff));
541  write32((uart_base + UART_IER_DLAB), (UART_RATE_115200 >> 8));
542  /* 8-bit and no parity */
543  write32((uart_base + UART_LCR), LCR_WD_SIZE_8);
544  /* enable and clear RX/TX FIFO */
545  write32((uart_base + UART_IIR_FCR),
547 }
548 
549 /* Accessors. */
550 
551 /* Jtag configuration. */
552 
553 static void enable_jtag(void)
554 {
556 }
557 
558 /* Clock configuration. */
559 
560 static void config_oscillator(void)
561 {
562  /*
563  * Read oscillator drive strength from OSC_EDPD_OVER.XOFS and copy
564  * to OSC_CTRL.XOFS and set XOE.
565  */
568 
570  osc_ctrl &= ~OSC_XOFS_MASK;
571  osc_ctrl |= (xofs << OSC_XOFS_SHIFT);
572  osc_ctrl |= OSC_XOE;
573  write32(clk_rst_osc_ctrl_ptr, osc_ctrl);
574 }
575 
576 static void enable_select_cpu_clocks(void)
577 {
578  /* Enable the CPU complex clock. */
581  udelay(10);
582 
583  /* Select CPU complex clock source. */
586  udelay(10);
587 }
588 
589 /* Function unit configuration. */
590 
591 static void config_core_sight(void)
592 {
593  /* Enable the CoreSight clock. */
595 
596  /*
597  * De-assert CoreSight reset.
598  * NOTE: We're leaving the CoreSight clock on the oscillator for
599  * now. It will be restored to its original clock source
600  * when the CPU-side restoration code runs.
601  */
603 }
604 
605 /* RAM repair */
606 
607 void ram_repair(void)
608 {
609  /* Request Cluster0 RAM repair. */
611  /* Poll for Cluster0 RAM repair status. */
613  ;
614 }
615 
616 /* Power. */
617 
618 static void power_on_partition(unsigned int id)
619 {
620  uint32_t bit = 0x1 << id;
621  if (!(read32(pmc_pwrgate_status_ptr) & bit)) {
622  /* Partition is not on. Turn it on. */
624 
625  /* Wait until the partition is powerd on. */
626  while (!(read32(pmc_pwrgate_status_ptr) & bit))
627  ;
628 
629  /* Wait until clamp is off. */
630  while (read32(pmc_clamp_status_ptr) & bit)
631  ;
632  }
633 }
634 
635 static void config_hda_lpbk_dis(void)
636 {
637  /* Set HDA_LPBK_DIS bit in APBDEV_PMC_STICKY_BITS_0 register */
640 }
641 
642 static void set_gpio_pa6_input_mode(void)
643 {
645 }
646 
647 static void set_clk_m(void)
648 {
649  uint32_t spare;
650 
651  /* set clk_m frequency to 19.2MHz: set divisor to 2. */
653  spare &= ~CLK_M_DIVISOR_MASK;
654  spare |= CLK_M_DIVISOR_BY_2;
656 
657  /*
658  * Restore TIMERUS config for 19.2MHz. (19.2 = 96/5 = 0x60/5)
659  * USEC_DIVIDEND(15:8) = 5-1; USEC_DIVISOR(7:0) = 0x60-1
660  */
661  write32(timer_us_cfg_ptr, 0x045f);
662 }
663 
664 static void restore_ram_svop(void)
665 {
666  uint32_t asdbgreg;
667 
668  asdbgreg = read32(misc_gp_asdbgreg_ptr);
669  asdbgreg &= ~CFG2TMC_RAM_SVOP_PDP_MASK;
670  asdbgreg |= CFG2TMC_RAM_SVOP_PDP_VAL_2;
671  write32(misc_gp_asdbgreg_ptr, asdbgreg);
672 }
673 
674 static void set_pmacro_training_wrptr(void)
675 {
676  /* disable writes to BYTES 7-0 of pad macro */
678 
679  /* Set E_WRPTR mode on Channel 0 and 1 */
682 
683  /* Re-enable writes to BYTE0-7 */
685 }
686 
687 static uint32_t *i2s_0_master = (void *)(I2S_BASE + 0x0a0);
688 static uint32_t *i2s_1_master = (void *)(I2S_BASE + 0x1a0);
689 static uint32_t *i2s_2_master = (void *)(I2S_BASE + 0x2a0);
690 static uint32_t *i2s_3_master = (void *)(I2S_BASE + 0x3a0);
691 static uint32_t *i2s_4_master = (void *)(I2S_BASE + 0x4a0);
692 
693 static uint32_t *i2s_0_slcg = (void *)(I2S_BASE + 0x088);
694 static uint32_t *i2s_1_slcg = (void *)(I2S_BASE + 0x188);
695 static uint32_t *i2s_2_slcg = (void *)(I2S_BASE + 0x288);
696 static uint32_t *i2s_3_slcg = (void *)(I2S_BASE + 0x388);
697 static uint32_t *i2s_4_slcg = (void *)(I2S_BASE + 0x488);
698 
699 static uint32_t *clk_rst_ape_clear = (void *)(CLK_RST_BASE + 0x2ac);
700 static uint32_t *clk_rst_ape_set = (void *)(CLK_RST_BASE + 0x2a8);
701 
702 static void mbist_workaround(void)
703 {
704  uint32_t clks_to_be_cleared;
705  uint32_t i2s_read;
706 
707  write32(clk_rst_ape_clear, 0x40);
708  udelay(2);
709 
710  i2s_read = read32(i2s_0_master);
711  i2s_read |= 0x400;
712  write32(i2s_0_master, i2s_read);
713 
714  i2s_read = read32(i2s_0_slcg);
715  i2s_read &= ~1;
716  write32(i2s_0_slcg, i2s_read);
717 
718  i2s_read = read32(i2s_1_master);
719  i2s_read |= 0x400;
720  write32(i2s_1_master, i2s_read);
721 
722  i2s_read = read32(i2s_1_slcg);
723  i2s_read &= ~1;
724  write32(i2s_1_slcg, i2s_read);
725 
726  i2s_read = read32(i2s_2_master);
727  i2s_read |= 0x400;
728  write32(i2s_2_master, i2s_read);
729 
730  i2s_read = read32(i2s_2_slcg);
731  i2s_read &= ~1;
732  write32(i2s_2_slcg, i2s_read);
733 
734  i2s_read = read32(i2s_3_master);
735  i2s_read |= 0x400;
736  write32(i2s_3_master, i2s_read);
737 
738  i2s_read = read32(i2s_3_slcg);
739  i2s_read &= ~1;
740  write32(i2s_3_slcg, i2s_read);
741 
742  i2s_read = read32(i2s_4_master);
743  i2s_read |= 0x400;
744  write32(i2s_4_master, i2s_read);
745 
746  i2s_read = read32(i2s_4_slcg);
747  i2s_read &= ~1;
748  write32(i2s_4_slcg, i2s_read);
749 
750  udelay(2);
751 
755  write32(clk_rst_lvl2_clk_gate_ovrd_ptr, 0x01000000); /* QSPI OVR=1 */
757 
758  clks_to_be_cleared = read32(clk_rst_clk_out_enb_l_ptr);
759  clks_to_be_cleared &= ~MBIST_CLK_ENB_L_0;
760  write32(clk_rst_clk_enb_l_clr_ptr, clks_to_be_cleared);
761 
762  clks_to_be_cleared = read32(clk_rst_clk_out_enb_h_ptr);
763  clks_to_be_cleared &= ~MBIST_CLK_ENB_H_0;
764  write32(clk_rst_clk_enb_h_clr_ptr, clks_to_be_cleared);
765 
766  clks_to_be_cleared = read32(clk_rst_clk_out_enb_u_ptr);
767  clks_to_be_cleared &= ~MBIST_CLK_ENB_U_0;
768  write32(clk_rst_clk_enb_u_clr_ptr, clks_to_be_cleared);
769 
770  clks_to_be_cleared = read32(clk_rst_clk_out_enb_v_ptr);
771  clks_to_be_cleared &= ~MBIST_CLK_ENB_V_0;
772  write32(clk_rst_clk_enb_v_clr_ptr, clks_to_be_cleared);
773 
774  clks_to_be_cleared = read32(clk_rst_clk_out_enb_w_ptr);
775  clks_to_be_cleared &= ~MBIST_CLK_ENB_W_0;
776  write32(clk_rst_clk_enb_w_clr_ptr, clks_to_be_cleared);
777 
778  clks_to_be_cleared = read32(clk_rst_clk_out_enb_x_ptr);
779  clks_to_be_cleared &= ~MBIST_CLK_ENB_X_0;
780  write32(clk_rst_clk_enb_x_clr_ptr, clks_to_be_cleared);
781 
782  clks_to_be_cleared = read32(clk_rst_clk_out_enb_y_ptr);
783  clks_to_be_cleared &= ~MBIST_CLK_ENB_Y_0;
784  write32(clk_rst_clk_enb_y_clr_ptr, clks_to_be_cleared);
785 
787  /* if Dual Channel enable MC1 clock */
789 }
790 
793 static uint32_t *sdmmc1_comppadctrl = (void *)(TEGRA_SDMMC1_BASE + 0x1e0);
794 static uint32_t *sdmmc3_comppadctrl = (void *)(TEGRA_SDMMC3_BASE + 0x1e0);
795 
796 enum {
797  SDMMC1_DEV_L = 0x1 << 14,
798  SDMMC3_DEV_U = 0x1 << 5,
800  SEL_VREG_VENDOR_IO_TRIM = 0x1 << 2
801 };
802 
803 static void low_power_sdmmc_pads(void)
804 {
805  /* Enable SDMMC1 clock */
807  udelay(2);
808  /* Unreset SDMMC1 */
810 
811  /* Clear SEL_VREG bit and PAD_E_INPUT bit of SDMMC1 */
814  /* Read the last accessed SDMMC1 register then disable SDMMC1 clock */
816  /* Disable SDMMC1 clock, but keep SDMMC1 un-reset */
818 
819  /* Enable SDMMC3 clock */
821  udelay(2);
822  /* Unreset SDMMC3 */
824 
825  /* Clear SEL_VREG bit and PAD_E_INPUT bit of SDMMC3 */
828  /* Read the last accessed SDMMC3 register then disable SDMMC3 clock */
830  /* Disable SDMMC3 clock, but keep SDMMC3 un-reset */
832 }
833 
834 static void config_mselect(void)
835 {
836  /* Set MSELECT clock source to PLL_P with 1:4 divider */
839  /* Enable clock to MSELECT */
841  /* Bring MSELECT out of reset, after 2 microsecond wait */
842  udelay(2);
844 }
845 
846 /* Routine to do i2c send of 'data' to 'addr' */
847 static void i2c_send(uint32_t addr, uint32_t data)
848 {
849  uint32_t delay;
850 
853 
856 
858  delay = 0;
860  udelay(1);
861  if (++delay > 100)
862  reset();
863  }
864 
867 
868  /* Check busy */
869  delay = 0;
871  udelay(1);
872  if (++delay > 1000)
873  reset();
874  }
875 
876  /* Check xfer successful; */
878  reset();
879 }
880 
881 /* Entry point. */
882 
883 void lp0_resume(void)
884 {
885  uint32_t orig_timer;
886 
887  /* If not on the AVP, reset. */
888  if (read32(up_tag_ptr) != UP_TAG_AVP)
889  reset();
890 
891  /* Enable JTAG */
892  enable_jtag();
893 
894  /* Set HDA_LPBK_DIS bit in APBDEV_PMC_STICKY_BITS_0 register */
896 
897  /*
898  * From T210 TRM:
899  * 8.9.1.2 Deep Sleep Exit:
900  * 5.a: Set the E_INPUT bit of the PINMUX_AUX_GPIO_PA6_0 register
901  * to Logic 1.
902  */
904 
906 
907  /* set clk_m frequency to 19.2MHz */
908  set_clk_m();
909 
910  /* Restore RAM SVOP setting */
912 
913  /* Bad qpop value on cmd pad macros removes clock gating from IB path */
915 
916  /* Restore CAR CE's, SLCG overrides */
918 
919  /* Configure unused SDMMC1/3 pads for low power leakage */
921 
922  /*
923  * Find out which CPU (slow or fast) to wake up. The default setting
924  * in flow controller is to wake up GCPU
925  */
928  }
929 
930  /* Set the CPU reset vector */
933 
934  /* Program SUPER_CCLK_DIVIDER. */
937 
939 
940  /* Set MSELECT clock source to PLL_P with 1:4 divider */
941  config_mselect();
942 
943  /* Enable UART */
944  enable_uart();
945 
946  /* Disable PLLX since it isn't used in the kernel as CPU clk source. */
948 
949  /* Set CAR2PMC_CPU_ACK_WIDTH to 0 */
951 
952  /* Clear PMC_SCRATCH190 */
954 
955  /* Clear PMC_DPD_SAMPLE */
957  udelay(10);
958 
959  /* Clear the MC_INTSTATUS if MC_INTMASK was 0. */
960  if (!read32(mc_intmask_ptr)) {
961  uint32_t mc_intst_val = read32(mc_intstatus_ptr);
962  if (mc_intst_val)
963  write32(mc_intstatus_ptr, mc_intst_val);
964  }
965 
966  /*
967  * Set both _ACCESS bits so that kernel/secure code
968  * can reconfig VPR careveout as needed from the TrustZone.
969  */
973 
974  /* Tristate CLDVFS PWM */
976 
977  /* Restore PWR I2C pinmux configuration */
980 
981  /* Enable CLDVFS clock */
983 
984  /* Set CLDVFS clock source and divider */
987 
988  /* Enable PWR I2C controller */
991  udelay(5);
994 
995  /*
996  * Turn on CPU rail:
997  * SCRATCH201[1] is being used to identify CPU PMIC in warmboot code.
998  * 0 : OVR2
999  * 1 : MAX77621
1000  */
1002  /* Set CPU rail 0.85V */
1004  else
1005  /* Enable GPIO5 on MAX77620 PMIC */
1007 
1008  /* Disable PWR I2C */
1011 
1012  /* Delay before removing clamp */
1013  udelay(2000);
1014 
1015  /*
1016  * Reprogram PMC_CPUPWRGOOD_TIMER register:
1017  *
1018  * XXX This is a fragile assumption. XXX
1019  * The kernel prepares PMC_CPUPWRGOOD_TIMER based on a 32768Hz clock.
1020  * Note that PMC_CPUPWRGOOD_TIMER is running at pclk.
1021  *
1022  * We need to reprogram PMC_CPUPWRGOOD_TIMER based on the current pclk
1023  * which is at 204Mhz (pclk = sclk = pllp_out2) after BootROM. Multiply
1024  * PMC_CPUPWRGOOD_TIMER by 204M / 32K.
1025  *
1026  * Save the original PMC_CPUPWRGOOD_TIMER register which we need to
1027  * restore after the CPU is powered up.
1028  */
1029  orig_timer = read32(pmc_cpupwrgood_timer_ptr);
1030  write32(pmc_cpupwrgood_timer_ptr, orig_timer * (204000000 / 32768));
1031 
1032  /* Power on CRAIL in PMC */
1034 
1035  /* Remove SW controlled clamp */
1038  /* Wait until clamp is off. */
1039  while (read32(pmc_clamp_status_ptr) & (1 << PARTID_CRAIL))
1040  ;
1041 
1042  /* Disable CLDVFS clock */
1044 
1045  /* Perform fast cluster RAM repair. */
1047  ram_repair();
1048 
1049  /* Power up the non-CPU partition. */
1051 
1052  /* Enable PLLP branch going to CPU */
1054  udelay(2);
1055 
1056  /* Enable the CPU complex clocks */
1058  udelay(10);
1059 
1060  /* Take non-cpu OUT of reset */
1062 
1063  /* Power up the CPU0 partition. */
1065 
1066  /* Restore the original PMC_CPUPWRGOOD_TIMER. */
1067  write32(pmc_cpupwrgood_timer_ptr, orig_timer);
1068 
1069  /* Clear software controlled reset */
1071 
1072  /* Halt the AVP. */
1073  while (1)
1076 }
1077 
1078 /* Header. */
1079 
1080 extern uint8_t blob_data;
1081 extern uint8_t blob_data_size;
1083 
1084 struct lp0_header {
1085  uint32_t length_insecure; // Insecure total length.
1086  uint32_t reserved[3];
1087  uint8_t rsa_modulus[256]; // RSA key modulus.
1088  uint8_t aes_signature[16]; // AES signature.
1089  uint8_t rsa_signature[256]; // RSA-PSS signature.
1090  uint8_t random_aes_block[16]; // Random data, may be zero.
1091  uint32_t length_secure; // Secure total length.
1092  uint32_t destination; // Where to load the blob in iRAM.
1093  uint32_t entry_point; // Entry point for the blob.
1094  uint32_t code_length; // Length of just the data.
1096 
1097 struct lp0_header header __attribute__((section(".header"))) =
1098 {
1101  .destination = (uintptr_t)&blob_data,
1103  .code_length = (uintptr_t)&blob_data_size
1104 };
static u32 addr
Definition: cirrus.c:14
#define __noreturn
Definition: compiler.h:31
#define __always_inline
Definition: compiler.h:35
void delay(unsigned int secs)
Definition: delay.c:8
unsigned int uint32_t
Definition: stdint.h:14
unsigned long uintptr_t
Definition: stdint.h:21
unsigned char uint8_t
Definition: stdint.h:8
uint32_t length_secure
uint32_t reserved[3]
uint32_t length_insecure
uint8_t aes_signature[16]
uint32_t entry_point
uint8_t rsa_modulus[256]
uint8_t rsa_signature[256]
uint32_t destination
uint8_t random_aes_block[16]
uint32_t code_length
u8 val
Definition: sys.c:300
@ PMC_XOFS_MASK
@ PMC_XOFS_SHIFT
@ UP_TAG_AVP
@ SWR_CSITE_RST
@ PARTID_CE0
@ PARTID_CRAIL
@ PARTID_C0NC
@ SWR_TRIG_SYS_RST
@ PLLX_ENABLE
@ OSC_XOFS_MASK
@ OSC_XOE
@ OSC_XOFS_SHIFT
@ OSC_FREQ_SHIFT
@ OSC_FREQ_MASK
@ CLR_CORERESET2
@ CLR_CXRESET3
@ CLR_CORERESET0
@ CLR_CPURESET2
@ CLR_NONCPURESET
@ CLR_CORERESET1
@ CLR_DBGRESET2
@ CLR_CPURESET1
@ CLR_DBGRESET3
@ CLR_CXRESET1
@ CLR_DBGRESET0
@ CLR_CPURESET0
@ CLR_CORERESET3
@ CLR_DBGRESET1
@ CLR_CXRESET0
@ CLR_CPURESET3
@ CLR_CXRESET2
@ PMC_CTLR_BASE
@ MC_CTLR_BASE
@ FLOW_CTLR_BASE
@ TEGRA_EVP_BASE
@ TIMER_BASE
@ CLK_RST_BASE
@ UP_TAG_BASE
void ram_repair(void)
struct lp0_header header
@ CAR2PMC_CPU_ACK_WIDTH_MASK
@ CAR2PMC_CPU_ACK_WIDTH_SHIFT
uint8_t blob_data_size
struct lp0_header __packed
void lp0_resume(void)
@ CLK_ENB_CPUG
@ CLK_ENB_MSELECT
uint8_t blob_total_size
uint8_t blob_data
@ CLK_ENB_CSITE
@ PWRGATE_TOGGLE_START
@ RAM_REPAIR_REQ
@ RAM_REPAIR_STS
@ CLK_ENB_CPU
@ EVENT_JTAG
@ FLOW_MODE_STOP
@ EVENT_MSEC
@ FLOW_MODE_SHIFT
@ SUPER_CDIV_ENB
static void power_on_partition(unsigned int id)
static uint32_t * i2s_4_master
@ DISABLE_CFG_CMD0
@ DISABLE_CFG_BYTES
@ DISABLE_CFG_BYTE7
@ DISABLE_CFG_CMD1
@ DISABLE_CFG_BYTE0
@ DISABLE_CFG_BYTE2
@ DISABLE_CFG_BYTE1
@ DISABLE_CFG_CMD2
@ DISABLE_CFG_BYTE3
@ DISABLE_CFG_BYTE6
@ DISABLE_CFG_BYTE4
@ DISABLE_CFG_BYTE5
@ ENABLE_CFG_BYTES
@ DISABLE_CFG_CMD3
static uint32_t * timer_us_cfg_ptr
static uint32_t * i2c5_status_ptr
static uint32_t * clk_rst_clk_dvfs_ref_ptr
static uint32_t * uart_clk_out_enb_regs[4]
static uint32_t * uart_rst_devices_regs[4]
static uint32_t * i2s_2_slcg
@ UART_LCR
@ UART_IIR_FCR
@ UART_IER_DLAB
@ UART_THR_DLAB
@ CH1_ENABLE
@ CLK_ENB_PLLP_OUT_CPU
static uint32_t * clk_rst_clk_enb_l_clr_ptr
static uint32_t * clk_rst_clk_enb_h_set_ptr
static uint32_t * clk_rst_rst_dev_h_set_ptr
static uint32_t * timer_us_ptr
static uint32_t * clk_rst_clk_enb_w_clr_ptr
static void config_hda_lpbk_dis(void)
static uint32_t * clk_rst_ape_set
static uint32_t * pmacro_training_ctrl_0_ptr
@ I2C5_RST
@ FUSE_BASE
@ EMC_BASE
@ SECURE_BOOT_BASE
@ APB_MISC_BASE
@ I2S_BASE
@ TEGRA_SDMMC1_BASE
@ I2C5_BASE
@ TEGRA_SDMMC3_BASE
@ PINMUX_BASE
static uint32_t * i2s_2_master
static uint32_t * clk_rst_osc_ctrl_ptr
static uint32_t * sdmmc1_comppadctrl
static uint32_t * pmacro_cfg_pm_global
static uint32_t * pinmux_pwr_i2c_sda_ptr
@ PMIC_77621
static uint32_t * sb_aa64_reset_high
@ PP_CONFIG_CTL_JTAG
@ PP_CONFIG_CTL_TBE
static void write32(void *addr, uint32_t val)
static uint32_t * clk_rst_clk_source_mselect_ptr
static void set_gpio_pa6_input_mode(void)
@ PARTID_CE3
@ PARTID_CE2
@ PARTID_CE1
static uint32_t * fuse_security_mode_ptr
static uint32_t * clk_rst_clk_out_enb_u_ptr
static uint32_t * clk_rst_pllx_base_ptr
@ I2C_STATUS_CMD1_XFER_SUCCESS
@ I2C_STATUS_BUSY
@ I2C_STATUS_CMD1_STAT_MASK
@ CLK_M_DIVISOR_MASK
@ CLK_M_DIVISOR_BY_2
static uint32_t * pmc_cpupwrgood_timer_ptr
static void enable_jtag(void)
static uint32_t * clk_rst_clk_enb_y_set_ptr
static uint32_t * clk_rst_clk_enb_w_set_ptr
#define MBIST_CLK_ENB_L_0
@ MSELECT_CLK_DIVISOR_4
@ CLK_SRC_PLLP_OUT0
static uint32_t * pmc_pwrgate_toggle_ptr
static uint32_t * clk_rst_cclklp_burst_policy_ptr
static uint32_t * clk_rst_clk_enb_h_clr_ptr
@ MSELECT_RST
static uint32_t * mc_video_protect_size_mb_ptr
static void low_power_sdmmc_pads(void)
static uint32_t * sb_pfcfg_ptr
#define MBIST_CLK_ENB_X_0
static uint32_t * pinmux_gpio_pa6_ptr
static void set_pmacro_training_wrptr(void)
static __always_inline void __noreturn halt(void)
static uint32_t * clk_rst_ape_clear
static void config_oscillator(void)
static uint32_t * clk_rst_clk_enb_l_set_ptr
@ HDA_LPBK_DIS
static uint32_t * pmc_scratch4_ptr
static uint32_t * mc_intstatus_ptr
static uint32_t * sb_aa64_reset_low
static uint32_t * pmc_osc_edpd_over_ptr
static uint32_t * clk_rst_cpug_cmplx_clr_ptr
static uint32_t * sdmmc1_vendor_io_trim
static void udelay(unsigned int usecs)
static uint32_t * flow_ctlr_ram_repair_cluster1_ptr
static uint32_t * pmc_pwrgate_status_ptr
static uint32_t * sdmmc3_vendor_io_trim
static uint32_t * uart_clk_source_regs[4]
@ FCR_RX_CLR
@ LCR_DLAB
@ UART_RATE_115200
@ FCR_TX_CLR
@ FCR_EN_FIFO
@ LCR_WD_SIZE_8
static void config_core_sight(void)
static uint32_t * misc_pp_config_ctl_ptr
static void i2c_send(uint32_t addr, uint32_t data)
@ DVFS_SOC_CLK_DIVISOR
static uint32_t * flow_ctlr_ram_repair_ptr
@ CFG2TMC_RAM_SVOP_PDP_VAL_2
@ CFG2TMC_RAM_SVOP_PDP_MASK
@ SECURE_BOOT_DEBUG_CONFIG
@ MSTR_CONFIG_LOAD
static uint32_t * clk_rst_clk_enb_v_ptr
@ SDMMC3_DEV_U
@ PAD_E_INPUT_COMPPADCTRL
@ SDMMC1_DEV_L
@ SEL_VREG_VENDOR_IO_TRIM
static uint32_t * i2c5_cmd_addr0_ptr
@ VPR_ALLOW_TZ_WR_ACCESS
@ VPR_WR_ACCESS_DISABLE
static void setbits32(uint32_t bits, void *addr)
static uint32_t * clk_rst_clk_source_i2c5_ptr
@ PM_I2CPMU
@ E_INPUT
@ TRISTATE
@ PM_CLDVFS
static uint32_t * clk_rst_spare_reg0_ptr
@ SECURITY_MODE
static uint32_t * clk_rst_super_cclkg_div_ptr
static uint32_t * clk_rst_clk_dvfs_soc_ptr
static uint32_t * pmacro_training_ctrl_1_ptr
static uint32_t * i2s_3_slcg
@ PMC_WAKEUP_CLUSTER_LPCPU
static uint32_t * i2s_0_master
static uint32_t * pmc_odmdata_ptr
static uint32_t * clk_rst_rst_dev_u_clr_ptr
#define MBIST_CLK_ENB_H_0
static uint32_t * pmc_remove_clamping_cmd_ptr
static uint32_t * mc_video_protect_reg_ctrl_ptr
static uint32_t read32(const void *addr)
@ CLK_ENB_DVFS
@ CLK_ENB_MC1
static uint32_t * clk_rst_clk_out_enb_v_ptr
static uint32_t * pmc_secure_scratch35_ptr
@ CLR_L2RESET
@ CLR_PRESETDBG
static uint32_t * i2c5_cnfg_ptr
static uint32_t * i2s_1_slcg
#define MBIST_CLK_ENB_W_0
static void config_mselect(void)
static uint32_t * mc_intmask_ptr
static uint32_t * pmc_clamp_status_ptr
static uint32_t * uart_base_regs[4]
static uint32_t * i2s_0_slcg
static uint32_t * fbio_cfg7_ptr
#define MAX77621_I2C_ADDR
static uint32_t * clk_rst_clk_out_enb_l_ptr
static uint32_t * pinmux_dvfs_pwm_ptr
static uint32_t * pmc_sticky_bits_ptr
static uint32_t * clk_rst_lvl2_clk_gate_ovra_ptr
static uint32_t * clk_rst_super_cclklp_div_ptr
static uint32_t * clk_rst_clk_enb_x_clr_ptr
static uint32_t * flow_ctlr_bpmp_cluster_control_ptr
static uint32_t * i2c5_cmd_data1_ptr
static uint32_t * clk_rst_rst_devices_l_ptr
#define MAX77620_I2C_ADDR
static void clrbits32(uint32_t bits, void *addr)
static void restore_ram_svop(void)
static void set_clk_m(void)
static uint32_t * i2c5_config_load_ptr
static uint32_t * pmc_set_sw_clamp_ptr
static uint32_t * i2s_4_slcg
static uint32_t * clk_rst_clk_out_enb_x_ptr
static uint32_t * pinmux_pwr_i2c_scl_ptr
static uint32_t * clk_rst_clk_out_enb_y_ptr
#define MBIST_CLK_ENB_U_0
static uint32_t * pmc_dpd_sample_ptr
@ TRAINING_E_WRPTR
@ CCLKG_PLLP_BURST_POLICY
@ CCLKLP_PLLP_BURST_POLICY
#define MAX77620_GPIO5_DATA
static void enable_select_cpu_clocks(void)
static uint32_t * clk_rst_rst_dev_h_clr_ptr
@ DVFS_REF_CLK_DIVISOR
static uint32_t * clk_rst_clk_out_enb_h_ptr
static uint32_t * clk_rst_lvl2_clk_gate_ovrc_ptr
static uint32_t * pmc_secure_scratch34_ptr
static uint32_t * flow_ctlr_halt_cop_events_ptr
static uint32_t * clk_rst_clk_enb_y_clr_ptr
#define MBIST_CLK_ENB_V_0
static uint32_t * clk_rst_cclkg_burst_policy_ptr
static void __noreturn reset(void)
static uint32_t * clk_rst_rst_devices_u_ptr
static void mbist_workaround(void)
static uint32_t * clk_rst_clk_out_enb_u_set_ptr
@ I2C5_CLK_DIVISOR
static uint32_t * clk_rst_lvl2_clk_gate_ovre_ptr
@ ACTIVE_SLOW
@ I2C_LENGTH_2_BYTES
@ I2C_DEBOUNCE_CNT_4
@ I2C_SEND
@ I2C_NEW_MASTER_FSM
static uint32_t * clk_rst_clk_enb_u_clr_ptr
static uint32_t * up_tag_ptr
static uint32_t * i2s_1_master
static uint32_t * clk_rst_rst_dev_v_clr_ptr
#define MAX77621_VOUT_DATA
static uint32_t * clk_rst_clk_enb_v_set_ptr
static uint32_t * sdmmc3_comppadctrl
static uint32_t * pmc_scratch201_ptr
static void enable_uart(void)
static uint32_t * clk_rst_cpu_softrst_ctrl2_ptr
#define MBIST_CLK_ENB_Y_0
static uint32_t * clk_rst_clk_out_enb_w_ptr
static uint32_t * i2s_3_master
@ CLK_ENB_I2C5
static uint32_t * pmc_scratch190_ptr
static uint32_t * clk_rst_clk_enb_v_clr_ptr
static uint32_t uart_enable_mask[4]
static uint32_t * misc_gp_asdbgreg_ptr
static uint32_t * clk_rst_lvl2_clk_gate_ovrb_ptr
static uint32_t * clk_rst_lvl2_clk_gate_ovrd_ptr