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