0006-board-tbs2910-add-documentation.patch 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. From f3767bcb31d0ce5c6381d5f6c33a951774ee6d41 Mon Sep 17 00:00:00 2001
  2. From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  3. Date: Sat, 30 May 2020 05:24:25 +0200
  4. Subject: [PATCH 6/6] board: tbs2910: add documentation
  5. This documents the u-boot installation procedure and the
  6. hardware in order to get started.
  7. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  8. [trini: Add MAINTAINERS entry for doc file per Soeren's request]
  9. ---
  10. board/tbs/tbs2910/MAINTAINERS | 1 +
  11. doc/board/index.rst | 1 +
  12. doc/board/tbs/index.rst | 9 ++
  13. doc/board/tbs/tbs2910.rst | 191 ++++++++++++++++++++++++++++++++++
  14. 4 files changed, 202 insertions(+)
  15. create mode 100644 doc/board/tbs/index.rst
  16. create mode 100644 doc/board/tbs/tbs2910.rst
  17. diff --git a/board/tbs/tbs2910/MAINTAINERS b/board/tbs/tbs2910/MAINTAINERS
  18. index a3ad2f712a..1e3c0d0ece 100644
  19. --- a/board/tbs/tbs2910/MAINTAINERS
  20. +++ b/board/tbs/tbs2910/MAINTAINERS
  21. @@ -4,4 +4,5 @@ S: Maintained
  22. F: arch/arm/dts/imx6q-tbs2910.dts
  23. F: board/tbs/tbs2910/
  24. F: configs/tbs2910_defconfig
  25. +F: doc/board/tbs/
  26. F: include/configs/tbs2910.h
  27. diff --git a/doc/board/index.rst b/doc/board/index.rst
  28. index 01b233f737..bb4473152a 100644
  29. --- a/doc/board/index.rst
  30. +++ b/doc/board/index.rst
  31. @@ -18,5 +18,6 @@ Board-specific doc
  32. rockchip/index
  33. sifive/index
  34. st/index
  35. + tbs/index
  36. toradex/index
  37. xilinx/index
  38. diff --git a/doc/board/tbs/index.rst b/doc/board/tbs/index.rst
  39. new file mode 100644
  40. index 0000000000..b677bc624f
  41. --- /dev/null
  42. +++ b/doc/board/tbs/index.rst
  43. @@ -0,0 +1,9 @@
  44. +.. SPDX-License-Identifier: GPL-2.0+
  45. +
  46. +TBS
  47. +===
  48. +
  49. +.. toctree::
  50. + :maxdepth: 2
  51. +
  52. + tbs2910
  53. diff --git a/doc/board/tbs/tbs2910.rst b/doc/board/tbs/tbs2910.rst
  54. new file mode 100644
  55. index 0000000000..e97f2b6e61
  56. --- /dev/null
  57. +++ b/doc/board/tbs/tbs2910.rst
  58. @@ -0,0 +1,191 @@
  59. +TBS2910 Matrix ARM miniPC
  60. +=========================
  61. +
  62. +Building
  63. +--------
  64. +To build u-boot for the TBS2910 Matrix ARM miniPC, you can use the following
  65. +procedure:
  66. +
  67. +First add the ARM toolchain to your PATH
  68. +
  69. +Then setup the ARCH and cross compilation environment variables.
  70. +
  71. +When this is done you can then build u-boot for the TBS2910 Matrix ARM miniPC
  72. +with the following commands:
  73. +
  74. +.. code-block:: none
  75. +
  76. + make mrproper
  77. + make tbs2910_defconfig
  78. + make
  79. +
  80. +Once the build is complete, you can find the resulting image as u-boot.imx in
  81. +the current directory.
  82. +
  83. +UART
  84. +----
  85. +The UART voltage is at 3.3V and its settings are 115200bps 8N1
  86. +
  87. +BOOT/UPDATE boot switch:
  88. +------------------------
  89. +The BOOT/UPDATE switch (SW11) is connected to the BOOT_MODE0 and
  90. +BOOT_MODE1 SoC pins. It has "BOOT" and "UPDATE" markings both on
  91. +the PCB and on the plastic case.
  92. +
  93. +When set to the "UPDATE" position, the SoC will use the "Boot From Fuses"
  94. +configuration, and since BT_FUSE_SEL is 0, this makes the SOC jump to serial
  95. +downloader.
  96. +
  97. +When set in the "BOOT" position, the SoC will use the "Internal boot"
  98. +configuration, and since BT_FUSE_SEL is 0, it will then use the GPIO pins
  99. +for the boot configuration.
  100. +
  101. +SW6 binary DIP switch array on the PCB revision 2.1:
  102. +----------------------------------------------------
  103. +On that PCB revision, SW6 has 8 positions.
  104. +
  105. +Switching a position to ON sets the corresponding
  106. +register to 1.
  107. +
  108. +See the following table for a correspondence between the switch positions and
  109. +registers:
  110. +
  111. +=============== ============
  112. +Switch position Register
  113. +=============== ============
  114. +1 BOOT_CFG2[3]
  115. +2 BOOT_CFG2[4]
  116. +3 BOOT_CFG2[5]
  117. +4 BOOT_CFG2[6]
  118. +5 BOOT_CFG1[4]
  119. +6 BOOT_CFG1[5]
  120. +7 BOOT_CFG1[6]
  121. +8 BOOT_CFG1[7]
  122. +=============== ============
  123. +
  124. +For example:
  125. +
  126. + - To boot from the eMMC: 1:ON , 2:ON, 3:ON, 4:OFF, 5:OFF, 6:ON, 7:ON, 8:OFF
  127. + - To boot from the microSD slot: 1: ON, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:OFF,
  128. + 7:ON, 8:OFF
  129. + - To boot from the SD slot: 1: OFF, 2: ON, 3: OFF, 4: OFF, 5:OFF, 6:OFF, 7:ON,
  130. + 8:OFF
  131. + - To boot from SATA: 1: OFF, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:ON, 7:OFF, 8:OFF
  132. +
  133. +You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for
  134. +additional details.
  135. +
  136. +SW6 binary DIP switch array on the PCB revision 2.3:
  137. +----------------------------------------------------
  138. +On that PCB revision, SW6 has only 4 positions.
  139. +
  140. +Switching a position to ON sets the corresponding
  141. +register to 1.
  142. +
  143. +See the following table for a correspondence between the switch positions and
  144. +registers:
  145. +
  146. +=============== ============
  147. +Switch position Register
  148. +=============== ============
  149. +1 BOOT_CFG2[3]
  150. +2 BOOT_CFG2[4]
  151. +3 BOOT_CFG2[5]
  152. +4 BOOT_CFG1[5]
  153. +=============== ============
  154. +
  155. +For example:
  156. +
  157. +- To boot from the eMMC: 1:ON, 2:ON, 3:ON, 4:ON
  158. +- To boot from the microSD slot: 1:ON, 2:OFF, 3:OFF, 4:OFF
  159. +- To boot from the SD slot: 1:OFF, 2:ON, 3:OFF, 4:OFF
  160. +
  161. +You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for
  162. +additional details.
  163. +
  164. +Loading u-boot from USB:
  165. +------------------------
  166. +If you need to load u-boot from USB, you can use the following instructions:
  167. +
  168. +First build imx_usb_loader, as we will need it to load u-boot from USB. This
  169. +can be done with the following commands:
  170. +
  171. +.. code-block:: none
  172. +
  173. + git clone git://github.com/boundarydevices/imx_usb_loader.git
  174. + cd imx_usb_loader
  175. + make
  176. +
  177. +This will create the resulting imx_usb binary.
  178. +
  179. +When this is done, you can copy the u-boot.imx image that you built earlier
  180. +in in the imx_usb_loader directory.
  181. +
  182. +You will then need to power off the TBS2910 Matrix ARM miniPC and make sure that
  183. +the boot switch is set to "UPDATE"
  184. +
  185. +Once this is done you can connect an USB cable between the computer that will
  186. +run imx_usb and the TBS2910 Matrix ARM miniPC.
  187. +
  188. +If you also need to access the u-boot console, you will also need to connect an
  189. +UART cable between the computer running imx_usb and the TBS2910 Matrix ARM
  190. +miniPC.
  191. +
  192. +Once everything is connected you can finally power on the TBS2910 Matrix ARM
  193. +miniPC. The SoC will then jump to the serial download and wait for you.
  194. +
  195. +Finlay, you can load u-boot through USB with with the following command:
  196. +
  197. +.. code-block:: none
  198. +
  199. + sudo ./imx_usb -v u-boot.imx
  200. +
  201. +The u-boot boot messages will then appear in the serial console.
  202. +
  203. +Install u-boot on the eMMC:
  204. +---------------------------
  205. +To install u-boot on the eMMC, you first need to boot the TBS2910 Matrix ARM
  206. +miniPC.
  207. +
  208. +Once booted, you can flash u-boot.imx to mmcblk0boot0 with the
  209. +following commands:
  210. +
  211. +.. code-block:: none
  212. +
  213. + sudo echo 0 >/sys/block/mmcblk0boot0/force_ro
  214. + sudo dd if=u-boot.imx of=/dev/mmcblk0boot0 bs=1k seek=1; sync
  215. +
  216. +Note that the eMMC card node may vary, so adjust this as needed.
  217. +
  218. +Once the new u-boot version is installed, to boot on it you then need to power
  219. +off the TBS2910 Matrix ARM miniPC.
  220. +
  221. +Once it is off, you need make sure that the boot switch is set to "BOOT" and
  222. +that the SW6 switch is set to boot on the eMMC as described in the previous
  223. +sections.
  224. +
  225. +If you also need to access the u-boot console, you will also need to connect an
  226. +UART cable between the computer running imx_usb and the TBS2910 Matrix ARM
  227. +miniPC.
  228. +
  229. +You can then power up the TBS2910 Matrix ARM miniPC and U-Boot messages will
  230. +appear in the serial console.
  231. +
  232. +Booting a distribution:
  233. +-----------------------
  234. +When booting on the TBS2910 Matrix ARM miniPC, by default U-Boot will first try
  235. +to boot from hardcoded offsets from the start of the eMMC. This is for
  236. +compatibility with the stock GNU/Linux distribution.
  237. +
  238. +If that fails it will then try to boot from several interfaces using
  239. +'distro_bootcmd': It will first try to boot from the microSD slot, then the
  240. +SD slot, then the internal eMMC, then the SATA interface and finally the USB
  241. +interface. For more information on how to configure your distribution to boot,
  242. +see 'README.distro'.
  243. +
  244. +Links:
  245. +------
  246. + - https://www.tbsdtv.com/download/document/tbs2910/TBS2910-Matrix-ARM-mini-PC-SCH_rev2.1.pdf
  247. + - The schematics for the revision 2.1 of the TBS2910 Matrix ARM miniPC.
  248. + - https://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf - The
  249. + SoC reference manual for additional details on the BOOT_CFG registers.
  250. --
  251. 2.27.0