blob: 44435d90c624a6beaba18be32985448b76560d8b [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 Wallefa842012021-11-15 23:45:43 +010053Builtin watchdog
54----------------
55
56The builtin watchdog will supervise the bootloader startup. If anything
57goes wrong it will reset the board and boot into the failsafe bootloader.
58
59Once the bootloader is started successfully, it will disable the watchdog
60timer.
61
62wdt command flags
63^^^^^^^^^^^^^^^^^
64
65The `wdt start` as well as the `wdt expire` command take a flags argument.
66The 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
75For example, you can use `wdt expire 1` to issue a reset and boot into the
76failsafe bootloader.
77
78Disable the builtin watchdog
79^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
81If for some reason, this isn't a desired behavior, the watchdog can also
82be configured to not be enabled on board reset. It's configuration is saved
83in the non-volatile board configuration bits. To change these you can use
84the `sl28 nvm` command.
85
86For more information on the non-volatile board configuration bits, see the
87following section.
Michael Walle36ba7642020-10-15 23:08:57 +020088
89Non-volatile Board Configuration Bits
Frieder Schrempf215c72f2021-09-29 13:39:12 +020090-------------------------------------
Michael Walle36ba7642020-10-15 23:08:57 +020091
92The board has 16 configuration bits which are stored in the CPLD and are
93non-volatile. These can be changed by the `sl28 nvm` command.
94
95=== ===============================================================
96Bit 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
116Please note, that if the board is in failsafe mode, the bits will have the
117factory defaults, ie. all bits are off.
118
119Power-On Inhibit
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200120^^^^^^^^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200121
122If this is set, the board doesn't automatically turn on when power is
123applied. Instead, the user has to either toggle the ``PWR_BTN#`` line or
124use any other wake-up source such as RTC alarm or Wake-on-LAN.
125
126eMMC Boot
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200127^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200128
129If this is set, the RCW will be fetched from the on-board eMMC at offset
1301MiB. For further details, have a look at the `Reset Configuration Word
131Documentation`_.
132
133Watchdog
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200134^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200135
136By default, the CPLD watchdog is enabled in failsafe mode. Using bits 2 and
1373, the user can change its mode or disable it altogether.
138
139===== ===== ===============================
140Bit 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
148Clock Generator Select
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200149^^^^^^^^^^^^^^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200150
151The board is prepared to supply different SerDes clock speeds. But for now,
152only setting 0 is supported, otherwise the CPU will hang because the PLL
153will not lock.
154
155Clock Output Disable And Keep Devices In Reset
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200156^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200157
158To safe power, the user might disable different devices and clock output of
159the board. It is not supported to disable the "CPU SerDes clock #2" for
160now, otherwise the CPU will hang because the PLL will not lock.
161
162Automatic reset of the onboard PHYs
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200163^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Michael Walle36ba7642020-10-15 23:08:57 +0200164
165By default, there is no hardware reset of the onboard PHY. This is because
166for Wake-on-LAN, some registers have to retain their values. If you don't
167use the WOL feature and a soft reset of the PHY is not enough you can
168enable the hardware reset. The onboard PHY hardware reset follows the
169power-on reset.
170
171
172Further documentation
Frieder Schrempf215c72f2021-09-29 13:39:12 +0200173---------------------
Michael Walle36ba7642020-10-15 23:08:57 +0200174
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