blob: e97f2b6e61353da9b547d0d6461ac5535700fbb6 [file] [log] [blame]
Denis 'GNUtoo' Carikli05b4e122020-05-30 05:24:25 +02001TBS2910 Matrix ARM miniPC
2=========================
3
4Building
5--------
6To build u-boot for the TBS2910 Matrix ARM miniPC, you can use the following
7procedure:
8
9First add the ARM toolchain to your PATH
10
11Then setup the ARCH and cross compilation environment variables.
12
13When this is done you can then build u-boot for the TBS2910 Matrix ARM miniPC
14with the following commands:
15
16.. code-block:: none
17
18 make mrproper
19 make tbs2910_defconfig
20 make
21
22Once the build is complete, you can find the resulting image as u-boot.imx in
23the current directory.
24
25UART
26----
27The UART voltage is at 3.3V and its settings are 115200bps 8N1
28
29BOOT/UPDATE boot switch:
30------------------------
31The BOOT/UPDATE switch (SW11) is connected to the BOOT_MODE0 and
32BOOT_MODE1 SoC pins. It has "BOOT" and "UPDATE" markings both on
33the PCB and on the plastic case.
34
35When set to the "UPDATE" position, the SoC will use the "Boot From Fuses"
36configuration, and since BT_FUSE_SEL is 0, this makes the SOC jump to serial
37downloader.
38
39When set in the "BOOT" position, the SoC will use the "Internal boot"
40configuration, and since BT_FUSE_SEL is 0, it will then use the GPIO pins
41for the boot configuration.
42
43SW6 binary DIP switch array on the PCB revision 2.1:
44----------------------------------------------------
45On that PCB revision, SW6 has 8 positions.
46
47Switching a position to ON sets the corresponding
48register to 1.
49
50See the following table for a correspondence between the switch positions and
51registers:
52
53=============== ============
54Switch position Register
55=============== ============
561 BOOT_CFG2[3]
572 BOOT_CFG2[4]
583 BOOT_CFG2[5]
594 BOOT_CFG2[6]
605 BOOT_CFG1[4]
616 BOOT_CFG1[5]
627 BOOT_CFG1[6]
638 BOOT_CFG1[7]
64=============== ============
65
66For example:
67
68 - To boot from the eMMC: 1:ON , 2:ON, 3:ON, 4:OFF, 5:OFF, 6:ON, 7:ON, 8:OFF
69 - To boot from the microSD slot: 1: ON, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:OFF,
70 7:ON, 8:OFF
71 - To boot from the SD slot: 1: OFF, 2: ON, 3: OFF, 4: OFF, 5:OFF, 6:OFF, 7:ON,
72 8:OFF
73 - To boot from SATA: 1: OFF, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:ON, 7:OFF, 8:OFF
74
75You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for
76additional details.
77
78SW6 binary DIP switch array on the PCB revision 2.3:
79----------------------------------------------------
80On that PCB revision, SW6 has only 4 positions.
81
82Switching a position to ON sets the corresponding
83register to 1.
84
85See the following table for a correspondence between the switch positions and
86registers:
87
88=============== ============
89Switch position Register
90=============== ============
911 BOOT_CFG2[3]
922 BOOT_CFG2[4]
933 BOOT_CFG2[5]
944 BOOT_CFG1[5]
95=============== ============
96
97For example:
98
99- To boot from the eMMC: 1:ON, 2:ON, 3:ON, 4:ON
100- To boot from the microSD slot: 1:ON, 2:OFF, 3:OFF, 4:OFF
101- To boot from the SD slot: 1:OFF, 2:ON, 3:OFF, 4:OFF
102
103You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for
104additional details.
105
106Loading u-boot from USB:
107------------------------
108If you need to load u-boot from USB, you can use the following instructions:
109
110First build imx_usb_loader, as we will need it to load u-boot from USB. This
111can be done with the following commands:
112
113.. code-block:: none
114
115 git clone git://github.com/boundarydevices/imx_usb_loader.git
116 cd imx_usb_loader
117 make
118
119This will create the resulting imx_usb binary.
120
121When this is done, you can copy the u-boot.imx image that you built earlier
122in in the imx_usb_loader directory.
123
124You will then need to power off the TBS2910 Matrix ARM miniPC and make sure that
125the boot switch is set to "UPDATE"
126
127Once this is done you can connect an USB cable between the computer that will
128run imx_usb and the TBS2910 Matrix ARM miniPC.
129
130If you also need to access the u-boot console, you will also need to connect an
131UART cable between the computer running imx_usb and the TBS2910 Matrix ARM
132miniPC.
133
134Once everything is connected you can finally power on the TBS2910 Matrix ARM
135miniPC. The SoC will then jump to the serial download and wait for you.
136
137Finlay, you can load u-boot through USB with with the following command:
138
139.. code-block:: none
140
141 sudo ./imx_usb -v u-boot.imx
142
143The u-boot boot messages will then appear in the serial console.
144
145Install u-boot on the eMMC:
146---------------------------
147To install u-boot on the eMMC, you first need to boot the TBS2910 Matrix ARM
148miniPC.
149
150Once booted, you can flash u-boot.imx to mmcblk0boot0 with the
151following commands:
152
153.. code-block:: none
154
155 sudo echo 0 >/sys/block/mmcblk0boot0/force_ro
156 sudo dd if=u-boot.imx of=/dev/mmcblk0boot0 bs=1k seek=1; sync
157
158Note that the eMMC card node may vary, so adjust this as needed.
159
160Once the new u-boot version is installed, to boot on it you then need to power
161off the TBS2910 Matrix ARM miniPC.
162
163Once it is off, you need make sure that the boot switch is set to "BOOT" and
164that the SW6 switch is set to boot on the eMMC as described in the previous
165sections.
166
167If you also need to access the u-boot console, you will also need to connect an
168UART cable between the computer running imx_usb and the TBS2910 Matrix ARM
169miniPC.
170
171You can then power up the TBS2910 Matrix ARM miniPC and U-Boot messages will
172appear in the serial console.
173
174Booting a distribution:
175-----------------------
176When booting on the TBS2910 Matrix ARM miniPC, by default U-Boot will first try
177to boot from hardcoded offsets from the start of the eMMC. This is for
178compatibility with the stock GNU/Linux distribution.
179
180If that fails it will then try to boot from several interfaces using
181'distro_bootcmd': It will first try to boot from the microSD slot, then the
182SD slot, then the internal eMMC, then the SATA interface and finally the USB
183interface. For more information on how to configure your distribution to boot,
184see 'README.distro'.
185
186Links:
187------
188 - https://www.tbsdtv.com/download/document/tbs2910/TBS2910-Matrix-ARM-mini-PC-SCH_rev2.1.pdf
189 - The schematics for the revision 2.1 of the TBS2910 Matrix ARM miniPC.
190 - https://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf - The
191 SoC reference manual for additional details on the BOOT_CFG registers.