sl28.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. Kontron SMARC-sAL28
  3. ===================
  4. The Kontron SMARC-sAL28 board is a TSN-enabled dual-core ARM A72
  5. processor module with an on-chip 6-port TSN switch and a 3D GPU.
  6. Quickstart
  7. ----------
  8. Compile U-Boot
  9. ^^^^^^^^^^^^^^
  10. Configure and compile the binary::
  11. $ make kontron_sl28_defconfig
  12. $ CROSS_COMPILE=aarch64-linux-gnu make
  13. Copy u-boot.rom to a TFTP server.
  14. Install the bootloader on the board
  15. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  16. To install the bootloader binary use the following command::
  17. > tftp path/to/u-boot.rom
  18. > sf probe 0
  19. > sf update $fileaddr 0x210000 $filesize
  20. The board is fully failsafe, you can't break anything. If builtin watchdog
  21. is enabled, you'll automatically end up in the failsafe bootloader if
  22. something goes wrong. If the watchdog is disabled, you have to manually
  23. enter failsafe mode by asserting the ``FORCE_RECOV#`` line during board
  24. reset.
  25. Update image
  26. ------------
  27. After the build finished, there will be an update image called
  28. u-boot.update. This can either be used in the DFU mode (which isn't
  29. supported yet) or encapsulated in an EFI UpdateCapsule.
  30. To build the capsule use the following command
  31. $ tools/mkeficapsule -f u-boot.update -i 1 UpdateUboot
  32. Afterward you can copy this file to your ESP into the /EFI/UpdateCapsule/
  33. folder. On the next EFI boot this will automatically update your
  34. bootloader.
  35. Builtin watchdog
  36. ----------------
  37. The builtin watchdog will supervise the bootloader startup. If anything
  38. goes wrong it will reset the board and boot into the failsafe bootloader.
  39. Once the bootloader is started successfully, it will disable the watchdog
  40. timer.
  41. wdt command flags
  42. ^^^^^^^^^^^^^^^^^
  43. The `wdt start` as well as the `wdt expire` command take a flags argument.
  44. The supported bitmask is as follows.
  45. | Bit | Description |
  46. | --- | ----------------------------- |
  47. | 0 | Enable failsafe mode |
  48. | 1 | Lock the control register |
  49. | 2 | Disable board reset |
  50. | 3 | Enable WDT_TIME_OUT# line |
  51. For example, you can use `wdt expire 1` to issue a reset and boot into the
  52. failsafe bootloader.
  53. Disable the builtin watchdog
  54. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  55. If for some reason, this isn't a desired behavior, the watchdog can also
  56. be configured to not be enabled on board reset. It's configuration is saved
  57. in the non-volatile board configuration bits. To change these you can use
  58. the `sl28 nvm` command.
  59. For more information on the non-volatile board configuration bits, see the
  60. following section.
  61. Non-volatile Board Configuration Bits
  62. -------------------------------------
  63. The board has 16 configuration bits which are stored in the CPLD and are
  64. non-volatile. These can be changed by the `sl28 nvm` command.
  65. === ===============================================================
  66. Bit Description
  67. === ===============================================================
  68. 0 Power-on inhibit
  69. 1 Enable eMMC boot
  70. 2 Enable watchdog by default
  71. 3 Disable failsafe watchdog by default
  72. 4 Clock generator selection bit 0
  73. 5 Clock generator selection bit 1
  74. 6 Disable CPU SerDes clock #2 and PCIe-A clock output
  75. 7 Disable PCIe-B and PCIe-C clock output
  76. 8 Keep onboard PHYs in reset
  77. 9 Keep USB hub in reset
  78. 10 Keep eDP-to-LVDS converter in reset
  79. 11 Enable I2C stuck recovery on I2C PM and I2C GP busses
  80. 12 Enable automatic onboard PHY H/W reset
  81. 13 reserved
  82. 14 Used by the RCW to determine boot source
  83. 15 Used by the RCW to determine boot source
  84. === ===============================================================
  85. Please note, that if the board is in failsafe mode, the bits will have the
  86. factory defaults, ie. all bits are off.
  87. Power-On Inhibit
  88. ^^^^^^^^^^^^^^^^
  89. If this is set, the board doesn't automatically turn on when power is
  90. applied. Instead, the user has to either toggle the ``PWR_BTN#`` line or
  91. use any other wake-up source such as RTC alarm or Wake-on-LAN.
  92. eMMC Boot
  93. ^^^^^^^^^
  94. If this is set, the RCW will be fetched from the on-board eMMC at offset
  95. 1MiB. For further details, have a look at the `Reset Configuration Word
  96. Documentation`_.
  97. Watchdog
  98. ^^^^^^^^
  99. By default, the CPLD watchdog is enabled in failsafe mode. Using bits 2 and
  100. 3, the user can change its mode or disable it altogether.
  101. ===== ===== ===============================
  102. Bit 2 Bit 3 Description
  103. ===== ===== ===============================
  104. 0 0 Watchdog enabled, failsafe mode
  105. 0 1 Watchdog disabled
  106. 1 0 Watchdog enabled, failsafe mode
  107. 1 1 Watchdog enabled, normal mode
  108. ===== ===== ===============================
  109. Clock Generator Select
  110. ^^^^^^^^^^^^^^^^^^^^^^
  111. The board is prepared to supply different SerDes clock speeds. But for now,
  112. only setting 0 is supported, otherwise the CPU will hang because the PLL
  113. will not lock.
  114. Clock Output Disable And Keep Devices In Reset
  115. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  116. To safe power, the user might disable different devices and clock output of
  117. the board. It is not supported to disable the "CPU SerDes clock #2" for
  118. now, otherwise the CPU will hang because the PLL will not lock.
  119. Automatic reset of the onboard PHYs
  120. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  121. By default, there is no hardware reset of the onboard PHY. This is because
  122. for Wake-on-LAN, some registers have to retain their values. If you don't
  123. use the WOL feature and a soft reset of the PHY is not enough you can
  124. enable the hardware reset. The onboard PHY hardware reset follows the
  125. power-on reset.
  126. Further documentation
  127. ---------------------
  128. - `Vendor Documentation`_
  129. - `Reset Configuration Word Documentation`_
  130. .. _Reset Configuration Word Documentation: https://raw.githubusercontent.com/kontron/rcw-smarc-sal28/master/README.md
  131. .. _Vendor Documentation: https://raw.githubusercontent.com/kontron/u-boot-smarc-sal28/master/board/kontron/sl28/README.md