blob: c7b18bed10c4b886a4b78adfbf01989929d25796 [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
26Please note, this bootloader doesn't support the builtin watchdog (yet),
27therefore you have to disable it, see below. Otherwise you'll end up in
28the failsafe bootloader on every reset::
29
30 > tftp path/to/u-boot.rom
31 > sf probe 0
32 > sf update $fileaddr 0x210000 $filesize
33
34The board is fully failsafe, you can't break anything. But because you've
35disabled the builtin watchdog you might have to manually enter failsafe
36mode by asserting the ``FORCE_RECOV#`` line during board reset.
37
38Disable the builtin watchdog
Frieder Schrempf215c72f2021-09-29 13:39:12 +020039^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +020040
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 Walle53c7bfa2021-09-29 13:39:13 +020055Update image
56------------
57
58After the build finished, there will be an update image called
59u-boot.update. This can either be used in the DFU mode (which isn't
60supported yet) or encapsulated in an EFI UpdateCapsule.
61
62To build the capsule use the following command
63
64 $ tools/mkeficapsule -f u-boot.update -i 1 UpdateUboot
65
66Afterward you can copy this file to your ESP into the /EFI/UpdateCapsule/
67folder. On the next EFI boot this will automatically update your
68bootloader.
69
Michael Walle36ba7642020-10-15 23:08:57 +020070Useful I2C tricks
Frieder Schrempf215c72f2021-09-29 13:39:12 +020071-----------------
Michael Walle36ba7642020-10-15 23:08:57 +020072
73The board has a board management controller which is not supported in
74u-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
85Non-volatile Board Configuration Bits
Frieder Schrempf215c72f2021-09-29 13:39:12 +020086-------------------------------------
Michael Walle36ba7642020-10-15 23:08:57 +020087
88The board has 16 configuration bits which are stored in the CPLD and are
89non-volatile. These can be changed by the `sl28 nvm` command.
90
91=== ===============================================================
92Bit 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
112Please note, that if the board is in failsafe mode, the bits will have the
113factory defaults, ie. all bits are off.
114
115Power-On Inhibit
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200116^^^^^^^^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200117
118If this is set, the board doesn't automatically turn on when power is
119applied. Instead, the user has to either toggle the ``PWR_BTN#`` line or
120use any other wake-up source such as RTC alarm or Wake-on-LAN.
121
122eMMC Boot
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200123^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200124
125If this is set, the RCW will be fetched from the on-board eMMC at offset
1261MiB. For further details, have a look at the `Reset Configuration Word
127Documentation`_.
128
129Watchdog
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200130^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200131
132By default, the CPLD watchdog is enabled in failsafe mode. Using bits 2 and
1333, the user can change its mode or disable it altogether.
134
135===== ===== ===============================
136Bit 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
144Clock Generator Select
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200145^^^^^^^^^^^^^^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200146
147The board is prepared to supply different SerDes clock speeds. But for now,
148only setting 0 is supported, otherwise the CPU will hang because the PLL
149will not lock.
150
151Clock Output Disable And Keep Devices In Reset
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200152^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200153
154To safe power, the user might disable different devices and clock output of
155the board. It is not supported to disable the "CPU SerDes clock #2" for
156now, otherwise the CPU will hang because the PLL will not lock.
157
158Automatic reset of the onboard PHYs
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200159^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200160
161By default, there is no hardware reset of the onboard PHY. This is because
162for Wake-on-LAN, some registers have to retain their values. If you don't
163use the WOL feature and a soft reset of the PHY is not enough you can
164enable the hardware reset. The onboard PHY hardware reset follows the
165power-on reset.
166
167
168Further documentation
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200169---------------------
Michael Walle36ba7642020-10-15 23:08:57 +0200170
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