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