Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 1 | .. SPDX-License-Identifier: GPL-2.0+ |
| 2 | |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 3 | Kontron SMARC-sAL28 |
| 4 | =================== |
Michael Walle | 36ba764 | 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 | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 11 | ---------- |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 12 | |
| 13 | Compile U-Boot |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 14 | ^^^^^^^^^^^^^^ |
Michael Walle | 36ba764 | 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 | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 24 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 25 | |
| 26 | Please note, this bootloader doesn't support the builtin watchdog (yet), |
| 27 | therefore you have to disable it, see below. Otherwise you'll end up in |
| 28 | the failsafe bootloader on every reset:: |
| 29 | |
| 30 | > tftp path/to/u-boot.rom |
| 31 | > sf probe 0 |
| 32 | > sf update $fileaddr 0x210000 $filesize |
| 33 | |
| 34 | The board is fully failsafe, you can't break anything. But because you've |
| 35 | disabled the builtin watchdog you might have to manually enter failsafe |
| 36 | mode by asserting the ``FORCE_RECOV#`` line during board reset. |
| 37 | |
| 38 | Disable the builtin watchdog |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 39 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 40 | |
| 41 | - boot into the failsafe bootloader, either by asserting the |
| 42 | ``FORCE_RECOV#`` line or if you still have the original bootloader |
| 43 | installed you can use the command:: |
| 44 | |
| 45 | > wdt dev cpld_watchdog@4a; wdt expire 1 |
| 46 | |
| 47 | - in the failsafe bootloader use the "sl28 nvm" command to disable |
| 48 | the automatic start of the builtin watchdog:: |
| 49 | |
| 50 | > sl28 nvm 0008 |
| 51 | |
| 52 | - power-cycle the board |
| 53 | |
| 54 | |
Michael Walle | 53c7bfa | 2021-09-29 13:39:13 +0200 | [diff] [blame] | 55 | Update image |
| 56 | ------------ |
| 57 | |
| 58 | After the build finished, there will be an update image called |
| 59 | u-boot.update. This can either be used in the DFU mode (which isn't |
| 60 | supported yet) or encapsulated in an EFI UpdateCapsule. |
| 61 | |
| 62 | To build the capsule use the following command |
| 63 | |
| 64 | $ tools/mkeficapsule -f u-boot.update -i 1 UpdateUboot |
| 65 | |
| 66 | Afterward you can copy this file to your ESP into the /EFI/UpdateCapsule/ |
| 67 | folder. On the next EFI boot this will automatically update your |
| 68 | bootloader. |
| 69 | |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 70 | Useful I2C tricks |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 71 | ----------------- |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 72 | |
| 73 | The board has a board management controller which is not supported in |
| 74 | u-boot (yet). But you can use the i2c command to access it. |
| 75 | |
| 76 | - reset into failsafe bootloader:: |
| 77 | |
| 78 | > i2c mw 4a 5.1 0; i2c mw 4a 6.1 6b; i2c mw 4a 4.1 42 |
| 79 | |
| 80 | - read board management controller version:: |
| 81 | |
| 82 | > i2c md 4a 3.1 1 |
| 83 | |
| 84 | |
| 85 | Non-volatile Board Configuration Bits |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 86 | ------------------------------------- |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 87 | |
| 88 | The board has 16 configuration bits which are stored in the CPLD and are |
| 89 | non-volatile. These can be changed by the `sl28 nvm` command. |
| 90 | |
| 91 | === =============================================================== |
| 92 | Bit Description |
| 93 | === =============================================================== |
| 94 | 0 Power-on inhibit |
| 95 | 1 Enable eMMC boot |
| 96 | 2 Enable watchdog by default |
| 97 | 3 Disable failsafe watchdog by default |
| 98 | 4 Clock generator selection bit 0 |
| 99 | 5 Clock generator selection bit 1 |
| 100 | 6 Disable CPU SerDes clock #2 and PCIe-A clock output |
| 101 | 7 Disable PCIe-B and PCIe-C clock output |
| 102 | 8 Keep onboard PHYs in reset |
| 103 | 9 Keep USB hub in reset |
| 104 | 10 Keep eDP-to-LVDS converter in reset |
| 105 | 11 Enable I2C stuck recovery on I2C PM and I2C GP busses |
| 106 | 12 Enable automatic onboard PHY H/W reset |
| 107 | 13 reserved |
| 108 | 14 Used by the RCW to determine boot source |
| 109 | 15 Used by the RCW to determine boot source |
| 110 | === =============================================================== |
| 111 | |
| 112 | Please note, that if the board is in failsafe mode, the bits will have the |
| 113 | factory defaults, ie. all bits are off. |
| 114 | |
| 115 | Power-On Inhibit |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 116 | ^^^^^^^^^^^^^^^^ |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 117 | |
| 118 | If this is set, the board doesn't automatically turn on when power is |
| 119 | applied. Instead, the user has to either toggle the ``PWR_BTN#`` line or |
| 120 | use any other wake-up source such as RTC alarm or Wake-on-LAN. |
| 121 | |
| 122 | eMMC Boot |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 123 | ^^^^^^^^^ |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 124 | |
| 125 | If this is set, the RCW will be fetched from the on-board eMMC at offset |
| 126 | 1MiB. For further details, have a look at the `Reset Configuration Word |
| 127 | Documentation`_. |
| 128 | |
| 129 | Watchdog |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 130 | ^^^^^^^^ |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 131 | |
| 132 | By default, the CPLD watchdog is enabled in failsafe mode. Using bits 2 and |
| 133 | 3, the user can change its mode or disable it altogether. |
| 134 | |
| 135 | ===== ===== =============================== |
| 136 | Bit 2 Bit 3 Description |
| 137 | ===== ===== =============================== |
| 138 | 0 0 Watchdog enabled, failsafe mode |
| 139 | 0 1 Watchdog disabled |
| 140 | 1 0 Watchdog enabled, failsafe mode |
| 141 | 1 1 Watchdog enabled, normal mode |
| 142 | ===== ===== =============================== |
| 143 | |
| 144 | Clock Generator Select |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 145 | ^^^^^^^^^^^^^^^^^^^^^^ |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 146 | |
| 147 | The board is prepared to supply different SerDes clock speeds. But for now, |
| 148 | only setting 0 is supported, otherwise the CPU will hang because the PLL |
| 149 | will not lock. |
| 150 | |
| 151 | Clock Output Disable And Keep Devices In Reset |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 152 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 153 | |
| 154 | To safe power, the user might disable different devices and clock output of |
| 155 | the board. It is not supported to disable the "CPU SerDes clock #2" for |
| 156 | now, otherwise the CPU will hang because the PLL will not lock. |
| 157 | |
| 158 | Automatic reset of the onboard PHYs |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 159 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 160 | |
| 161 | By default, there is no hardware reset of the onboard PHY. This is because |
| 162 | for Wake-on-LAN, some registers have to retain their values. If you don't |
| 163 | use the WOL feature and a soft reset of the PHY is not enough you can |
| 164 | enable the hardware reset. The onboard PHY hardware reset follows the |
| 165 | power-on reset. |
| 166 | |
| 167 | |
| 168 | Further documentation |
Frieder Schrempf | 215c72f | 2021-09-29 13:39:12 +0200 | [diff] [blame] | 169 | --------------------- |
Michael Walle | 36ba764 | 2020-10-15 23:08:57 +0200 | [diff] [blame] | 170 | |
| 171 | - `Vendor Documentation`_ |
| 172 | - `Reset Configuration Word Documentation`_ |
| 173 | |
| 174 | .. _Reset Configuration Word Documentation: https://raw.githubusercontent.com/kontron/rcw-smarc-sal28/master/README.md |
| 175 | .. _Vendor Documentation: https://raw.githubusercontent.com/kontron/u-boot-smarc-sal28/master/board/kontron/sl28/README.md |