All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands
@ 2020-05-30  3:24 Denis 'GNUtoo' Carikli
  2020-05-30  3:24 ` [PATCHv5][ 2/7] board: tbs2910: disable CONFIG_GZIP Denis 'GNUtoo' Carikli
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-05-30  3:24 UTC (permalink / raw)
  To: u-boot

The loadb and loads commands are not needed for booting.

There are also more reliable and faster alternatives to
loadb and loads that can be used with the current configuration.

As that the resulting image is already very close to the
size limit, removing the loadb and loads commands shouldn't
hurt.

With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola
GNU/Linux distribution we have the following size
reduction:
- text: 6733 bytes
- data: 116 bytes
- bss: 1172 bytes
- total: 8021 bytes

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Soeren Moch <smoch@web.de>
---
Changelog since v4:
-------------------
- Fixed Acked-by location in the commit message as requested by
  Soeren Moch.
---
 configs/tbs2910_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index 2ff0e160f7..2623eb73cd 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -28,6 +28,8 @@ CONFIG_SYS_MEMTEST_START=0x10000000
 CONFIG_SYS_MEMTEST_END=0x2f400000
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
+# CONFIG_CMD_LOADB is not set
+# CONFIG_CMD_LOADS is not set
 CONFIG_CMD_MMC=y
 CONFIG_CMD_PART=y
 CONFIG_CMD_PCI=y
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCHv5][ 2/7] board: tbs2910: disable CONFIG_GZIP
  2020-05-30  3:24 [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Denis 'GNUtoo' Carikli
@ 2020-05-30  3:24 ` Denis 'GNUtoo' Carikli
  2020-06-12 21:17   ` Tom Rini
  2020-05-30  3:24 ` [PATCHv5][ 3/7] board: tbs2910: move CONFIG_BOOTCOMMAND from header to defconfig Denis 'GNUtoo' Carikli
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-05-30  3:24 UTC (permalink / raw)
  To: u-boot

As that the resulting image is already very close to the
size limit, and that CONFIG_GZIP is not strictly required,
removing it shouldn't hurt.

With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola
GNU/Linux distribution we have the following size
reduction:
- text: 9752
- data: 0
- bss: 16
- total: 9768

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Soeren Moch <smoch@web.de>
---
Changelog since v4:
-------------------
- Added the following tag:
  Acked-by: Soeren Moch <smoch@web.de>
---
 configs/tbs2910_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index 2623eb73cd..cc459e6de6 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -88,5 +88,6 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_I2C_EDID=y
 CONFIG_VIDEO_IPUV3=y
 CONFIG_VIDEO=y
+# CONFIG_GZIP is not set
 CONFIG_OF_LIBFDT_ASSUME_MASK=0xff
 # CONFIG_EFI_LOADER is not set
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCHv5][ 3/7] board: tbs2910: move CONFIG_BOOTCOMMAND from header to defconfig
  2020-05-30  3:24 [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Denis 'GNUtoo' Carikli
  2020-05-30  3:24 ` [PATCHv5][ 2/7] board: tbs2910: disable CONFIG_GZIP Denis 'GNUtoo' Carikli
@ 2020-05-30  3:24 ` Denis 'GNUtoo' Carikli
  2020-06-12 21:17   ` Tom Rini
  2020-05-30  3:24 ` [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions Denis 'GNUtoo' Carikli
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-05-30  3:24 UTC (permalink / raw)
  To: u-boot

This doesn't affect the size of the image: with
arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola GNU/Linux
distribution, the text, data, bss and total sizes remain
unchanged.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Soeren Moch <smoch@web.de>
---
Changelog since v4:
-------------------
- Added the following tag:
  Acked-by: Soeren Moch <smoch@web.de>
---
 configs/tbs2910_defconfig | 2 ++
 include/configs/tbs2910.h | 8 --------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index cc459e6de6..d14ff45615 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -10,6 +10,8 @@ CONFIG_PRE_CON_BUF_ADDR=0x7c000000
 CONFIG_CMD_HDMIDETECT=y
 CONFIG_AHCI=y
 CONFIG_BOOTDELAY=3
+CONFIG_USE_BOOTCOMMAND=y
+CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc; fi"
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="echo PCI:; pci enum; pci 1; usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi"
 CONFIG_PRE_CONSOLE_BUFFER=y
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
index 7376b91f55..a230111251 100644
--- a/include/configs/tbs2910.h
+++ b/include/configs/tbs2910.h
@@ -100,12 +100,4 @@
 	"stdin=serial,usbkbd\0" \
 	"stdout=serial,vga\0"
 
-#define CONFIG_BOOTCOMMAND \
-	"mmc rescan; " \
-	"if run bootcmd_up1; then " \
-		"run bootcmd_up2; " \
-	"else " \
-		"run bootcmd_mmc; " \
-	"fi"
-
 #endif			       /* __TBS2910_CONFIG_H * */
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions
  2020-05-30  3:24 [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Denis 'GNUtoo' Carikli
  2020-05-30  3:24 ` [PATCHv5][ 2/7] board: tbs2910: disable CONFIG_GZIP Denis 'GNUtoo' Carikli
  2020-05-30  3:24 ` [PATCHv5][ 3/7] board: tbs2910: move CONFIG_BOOTCOMMAND from header to defconfig Denis 'GNUtoo' Carikli
@ 2020-05-30  3:24 ` Denis 'GNUtoo' Carikli
  2020-05-30 17:17   ` Soeren Moch
  2020-06-12 21:18   ` Tom Rini
  2020-05-30  3:24 ` [PATCHv5][ 5/7] board: tbs2910: remove CONFIG_DHCP Denis 'GNUtoo' Carikli
                   ` (3 subsequent siblings)
  6 siblings, 2 replies; 22+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-05-30  3:24 UTC (permalink / raw)
  To: u-boot

This is needed to enable distro_boot support later on.

Adding the necessary configuration to enable booting general
purpose distributions is typically done by enabling
CONFIG_DISTRO_DEFAULTS.

However the resulting image size is is already very close to
the size limit and PXE isn't strictly needed, so instead we
made sure that all the configuration selected by
CONFIG_DISTRO_DEFAULTS were selected, with the exception of
PXE related configuration (CONFIG_BOOTP_PXE and
CONFIG_CMD_PXE) that are both disabled.

With arm-linux-gnueabi-gcc 9.3.0-1 from the Parabola
GNU/Linux distribution, we have the following size
differences:
- text: +7526 bytes
- data: +28 bytes
- bss: -12 bytes
- total: +7542 bytes

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
Changelog since v4:
-------------------
- As requested, I Added in the commit message the reason why the
  change is really needed as the short summary is not self
  explanatory enough.
- Fixed a typo in the commit message
  (resultimg image instead of resulting image).
- Switched to the use of CONFIG_CMD_SYSBOOT instead of
  CONFIG_DISTRO_BOOTCMD as suggested
  The only changes between the two resulting .config are the following:
  -CONFIG_DISTRO_DEFAULTS=y
  +# CONFIG_DISTRO_DEFAULTS is not set
  -CONFIG_BOOTP_PXE=y
  -CONFIG_BOOTP_PXE_CLIENTARCH=0x15
  -CONFIG_CMD_PXE=y
  +# CONFIG_CMD_PXE is not set
---
 configs/tbs2910_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index d14ff45615..fc9095c859 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -9,6 +9,7 @@ CONFIG_NR_DRAM_BANKS=1
 CONFIG_PRE_CON_BUF_ADDR=0x7c000000
 CONFIG_CMD_HDMIDETECT=y
 CONFIG_AHCI=y
+CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTCOMMAND=y
 CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc; fi"
@@ -43,6 +44,7 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_TIME=y
+CONFIG_CMD_SYSBOOT=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCHv5][ 5/7] board: tbs2910: remove CONFIG_DHCP
  2020-05-30  3:24 [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Denis 'GNUtoo' Carikli
                   ` (2 preceding siblings ...)
  2020-05-30  3:24 ` [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions Denis 'GNUtoo' Carikli
@ 2020-05-30  3:24 ` Denis 'GNUtoo' Carikli
  2020-05-30 17:18   ` Soeren Moch
  2020-05-30  3:24 ` [PATCHv5][ 6/7] board: tbs2910: Enable distro_boot support Denis 'GNUtoo' Carikli
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 22+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-05-30  3:24 UTC (permalink / raw)
  To: u-boot

As that the resulting image is already very close to the
size limit, and that CONFIG_DHCP is not strictly required,
removing it shouldn't hurt.

With arm-linux-gnueabi-gcc 9.3.0-1 from the Parabola
GNU/Linux distribution, we have the following size
differences:
- text: -1708 bytes
- data: -28 bytes
- bss:  -20 bytes
- total: -1756 bytes

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
Changelog since v4:
-------------------
- I was requested to remove DHCP in the v3 review
  but I forgot about it in v4. This fixes it.
---
 configs/tbs2910_defconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index fc9095c859..9b25dcff5e 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -39,7 +39,6 @@ CONFIG_CMD_PCI=y
 CONFIG_CMD_SATA=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_MASS_STORAGE=y
-CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCHv5][ 6/7] board: tbs2910: Enable distro_boot support.
  2020-05-30  3:24 [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Denis 'GNUtoo' Carikli
                   ` (3 preceding siblings ...)
  2020-05-30  3:24 ` [PATCHv5][ 5/7] board: tbs2910: remove CONFIG_DHCP Denis 'GNUtoo' Carikli
@ 2020-05-30  3:24 ` Denis 'GNUtoo' Carikli
  2020-05-30 17:18   ` Soeren Moch
  2020-06-12 21:18   ` Tom Rini
  2020-05-30  3:24 ` [PATCHv5][ 7/7] board: tbs2910: add documentation Denis 'GNUtoo' Carikli
  2020-06-12 21:17 ` [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Tom Rini
  6 siblings, 2 replies; 22+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-05-30  3:24 UTC (permalink / raw)
  To: u-boot

This keeps the compatibility with the old bootcmd.

The fdtfile environment variable also needed to be set to
imx6q-tbs2910.dtb to enable booting mainline kernels
otherwise with extlinux.conf it tries to load
mx6-tbs2910.dtb instead.

With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola
GNU/Linux distribution, we have the following size
differences:
- text: +2041 bytes
- data: 0 bytes
- bss: 0 bytes
- total: +2041 bytes

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
Changelog since v4:
-------------------
- Sorted EXTRA_ENV_SETTINGS alphabetically as requested
  BOOTENV was also moved at the begining of
  EXTRA_ENV_SETTINGS like on include/configs/colibri-imx8x.h
- Moved BOOT_TARGET_DEVICES at the end of the file as suggested
---
 configs/tbs2910_defconfig |  3 ++-
 include/configs/tbs2910.h | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
index 9b25dcff5e..df5013e87c 100644
--- a/configs/tbs2910_defconfig
+++ b/configs/tbs2910_defconfig
@@ -12,11 +12,12 @@ CONFIG_AHCI=y
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_BOOTDELAY=3
 CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc; fi"
+CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc || run distro_bootcmd; fi"
 CONFIG_USE_PREBOOT=y
 CONFIG_PREBOOT="echo PCI:; pci enum; pci 1; usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi"
 CONFIG_PRE_CONSOLE_BUFFER=y
 CONFIG_SUPPORT_RAW_INITRD=y
+CONFIG_DEFAULT_FDT_FILE="imx6q-tbs2910.dtb"
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOARD_EARLY_INIT_F=y
 CONFIG_HUSH_PARSER=y
diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
index a230111251..17de122852 100644
--- a/include/configs/tbs2910.h
+++ b/include/configs/tbs2910.h
@@ -76,6 +76,7 @@
 #define CONFIG_BOARD_SIZE_LIMIT		392192 /* (CONFIG_ENV_OFFSET - 1024) */
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
+	BOOTENV \
 	"bootargs_mmc1=console=ttymxc0,115200 di0_primary console=tty1\0" \
 	"bootargs_mmc2=video=mxcfb0:dev=hdmi,1920x1080M at 60 " \
 			"video=mxcfb1:off video=mxcfb2:off fbmem=28M\0" \
@@ -92,6 +93,13 @@
 			"bootm 0x10800000 0x10d00000\0" \
 	"console=ttymxc0\0" \
 	"fan=gpio set 92\0" \
+	"fdt_addr=0x13000000\0" \
+	"fdt_addr_r=0x13000000\0" \
+	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
+	"kernel_addr_r=0x10008000\0" \
+	"pxefile_addr_r=0x10008000\0" \
+	"ramdisk_addr_r=0x18000000\0" \
+	"scriptaddr=0x14000000\0" \
 	"set_con_serial=setenv stdout serial; " \
 			"setenv stderr serial\0" \
 	"set_con_hdmi=setenv stdout serial,vga; " \
@@ -100,4 +108,14 @@
 	"stdin=serial,usbkbd\0" \
 	"stdout=serial,vga\0"
 
+/* Enable distro boot */
+#define BOOT_TARGET_DEVICES(func) \
+	func(MMC, mmc, 0) \
+	func(MMC, mmc, 1) \
+	func(MMC, mmc, 2) \
+	func(SATA, sata, 0) \
+	func(USB, usb, 0)
+
+#include <config_distro_bootcmd.h>
+
 #endif			       /* __TBS2910_CONFIG_H * */
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCHv5][ 7/7] board: tbs2910: add documentation
  2020-05-30  3:24 [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Denis 'GNUtoo' Carikli
                   ` (4 preceding siblings ...)
  2020-05-30  3:24 ` [PATCHv5][ 6/7] board: tbs2910: Enable distro_boot support Denis 'GNUtoo' Carikli
@ 2020-05-30  3:24 ` Denis 'GNUtoo' Carikli
  2020-05-30 17:18   ` Soeren Moch
  2020-06-12 21:18   ` Tom Rini
  2020-06-12 21:17 ` [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Tom Rini
  6 siblings, 2 replies; 22+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-05-30  3:24 UTC (permalink / raw)
  To: u-boot

This documents the u-boot installation procedure and the
hardware in order to get started.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
Changelog since v4:
-------------------
- Added dded information about SYSBOOT boot support as requested.
- Fixed the switch positions as suggested.
---
 doc/board/index.rst       |   1 +
 doc/board/tbs/index.rst   |   9 ++
 doc/board/tbs/tbs2910.rst | 191 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 201 insertions(+)
 create mode 100644 doc/board/tbs/index.rst
 create mode 100644 doc/board/tbs/tbs2910.rst

diff --git a/doc/board/index.rst b/doc/board/index.rst
index 01b233f737..bb4473152a 100644
--- a/doc/board/index.rst
+++ b/doc/board/index.rst
@@ -18,5 +18,6 @@ Board-specific doc
    rockchip/index
    sifive/index
    st/index
+   tbs/index
    toradex/index
    xilinx/index
diff --git a/doc/board/tbs/index.rst b/doc/board/tbs/index.rst
new file mode 100644
index 0000000000..b677bc624f
--- /dev/null
+++ b/doc/board/tbs/index.rst
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+TBS
+===
+
+.. toctree::
+   :maxdepth: 2
+
+   tbs2910
diff --git a/doc/board/tbs/tbs2910.rst b/doc/board/tbs/tbs2910.rst
new file mode 100644
index 0000000000..e97f2b6e61
--- /dev/null
+++ b/doc/board/tbs/tbs2910.rst
@@ -0,0 +1,191 @@
+TBS2910 Matrix ARM miniPC
+=========================
+
+Building
+--------
+To build u-boot for the TBS2910 Matrix ARM miniPC, you can use the following
+procedure:
+
+First add the ARM toolchain to your PATH
+
+Then setup the ARCH and cross compilation environment variables.
+
+When this is done you can then build u-boot for the TBS2910 Matrix ARM miniPC
+with the following commands:
+
+.. code-block:: none
+
+   make mrproper
+   make tbs2910_defconfig
+   make
+
+Once the build is complete, you can find the resulting image as u-boot.imx in
+the current directory.
+
+UART
+----
+The UART voltage is at 3.3V and its settings are 115200bps 8N1
+
+BOOT/UPDATE boot switch:
+------------------------
+The BOOT/UPDATE switch (SW11) is connected to the BOOT_MODE0 and
+BOOT_MODE1 SoC pins. It has "BOOT" and "UPDATE" markings both on
+the PCB and on the plastic case.
+
+When set to the "UPDATE" position, the SoC will use the "Boot From Fuses"
+configuration, and since BT_FUSE_SEL is 0, this makes the SOC jump to serial
+downloader.
+
+When set in the "BOOT" position, the SoC will use the "Internal boot"
+configuration, and since BT_FUSE_SEL is 0, it will then use the GPIO pins
+for the boot configuration.
+
+SW6 binary DIP switch array on the PCB revision 2.1:
+----------------------------------------------------
+On that PCB revision, SW6 has 8 positions.
+
+Switching a position to ON sets the corresponding
+register to 1.
+
+See the following table for a correspondence between the switch positions and
+registers:
+
+===============    ============
+Switch position    Register
+===============    ============
+1                  BOOT_CFG2[3]
+2                  BOOT_CFG2[4]
+3                  BOOT_CFG2[5]
+4                  BOOT_CFG2[6]
+5                  BOOT_CFG1[4]
+6                  BOOT_CFG1[5]
+7                  BOOT_CFG1[6]
+8                  BOOT_CFG1[7]
+===============    ============
+
+For example:
+
+  - To boot from the eMMC: 1:ON , 2:ON, 3:ON, 4:OFF, 5:OFF, 6:ON, 7:ON, 8:OFF
+  - To boot from the microSD slot: 1: ON, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:OFF,
+    7:ON, 8:OFF
+  - To boot from the SD slot: 1: OFF, 2: ON, 3: OFF, 4: OFF, 5:OFF, 6:OFF, 7:ON,
+    8:OFF
+  - To boot from SATA: 1: OFF, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:ON, 7:OFF, 8:OFF
+
+You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for
+additional details.
+
+SW6 binary DIP switch array on the PCB revision 2.3:
+----------------------------------------------------
+On that PCB revision, SW6 has only 4 positions.
+
+Switching a position to ON sets the corresponding
+register to 1.
+
+See the following table for a correspondence between the switch positions and
+registers:
+
+===============    ============
+Switch position    Register
+===============    ============
+1                  BOOT_CFG2[3]
+2                  BOOT_CFG2[4]
+3                  BOOT_CFG2[5]
+4                  BOOT_CFG1[5]
+===============    ============
+
+For example:
+
+- To boot from the eMMC: 1:ON, 2:ON, 3:ON, 4:ON
+- To boot from the microSD slot: 1:ON, 2:OFF, 3:OFF, 4:OFF
+- To boot from the SD slot: 1:OFF, 2:ON, 3:OFF, 4:OFF
+
+You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for
+additional details.
+
+Loading u-boot from USB:
+------------------------
+If you need to load u-boot from USB, you can use the following instructions:
+
+First build imx_usb_loader, as we will need it to load u-boot from USB. This
+can be done with the following commands:
+
+.. code-block:: none
+
+   git clone git://github.com/boundarydevices/imx_usb_loader.git
+   cd imx_usb_loader
+   make
+
+This will create the resulting imx_usb binary.
+
+When this is done, you can copy the u-boot.imx image that you built earlier
+in in the imx_usb_loader directory.
+
+You will then need to power off the TBS2910 Matrix ARM miniPC and make sure that
+the boot switch is set to "UPDATE"
+
+Once this is done you can connect an USB cable between the computer that will
+run imx_usb and the TBS2910 Matrix ARM miniPC.
+
+If you also need to access the u-boot console, you will also need to connect an
+UART cable between the computer running imx_usb and the TBS2910 Matrix ARM
+miniPC.
+
+Once everything is connected you can finally power on the TBS2910 Matrix ARM
+miniPC. The SoC will then jump to the serial download and wait for you.
+
+Finlay, you can load u-boot through USB with with the following command:
+
+.. code-block:: none
+
+   sudo ./imx_usb -v u-boot.imx
+
+The u-boot boot messages will then appear in the serial console.
+
+Install u-boot on the eMMC:
+---------------------------
+To install u-boot on the eMMC, you first need to boot the TBS2910 Matrix ARM
+miniPC.
+
+Once booted, you can flash u-boot.imx to mmcblk0boot0 with the
+following commands:
+
+.. code-block:: none
+
+   sudo echo 0 >/sys/block/mmcblk0boot0/force_ro
+   sudo dd if=u-boot.imx of=/dev/mmcblk0boot0 bs=1k seek=1; sync
+
+Note that the eMMC card node may vary, so adjust this as needed.
+
+Once the new u-boot version is installed, to boot on it you then need to power
+off the TBS2910 Matrix ARM miniPC.
+
+Once it is off, you need make sure that the boot switch is set to "BOOT" and
+that the SW6 switch is set to boot on the eMMC as described in the previous
+sections.
+
+If you also need to access the u-boot console, you will also need to connect an
+UART cable between the computer running imx_usb and the TBS2910 Matrix ARM
+miniPC.
+
+You can then power up the TBS2910 Matrix ARM miniPC and U-Boot messages will
+appear in the serial console.
+
+Booting a distribution:
+-----------------------
+When booting on the TBS2910 Matrix ARM miniPC, by default U-Boot will first try
+to boot from hardcoded offsets from the start of the eMMC. This is for
+compatibility with the stock GNU/Linux distribution.
+
+If that fails it will then try to boot from several interfaces using
+'distro_bootcmd': It will first try to boot from the microSD slot, then the
+SD slot, then the internal eMMC, then the SATA interface and finally the USB
+interface. For more information on how to configure your distribution to boot,
+see 'README.distro'.
+
+Links:
+------
+  - https://www.tbsdtv.com/download/document/tbs2910/TBS2910-Matrix-ARM-mini-PC-SCH_rev2.1.pdf
+    - The schematics for the revision 2.1 of the TBS2910 Matrix ARM miniPC.
+  - https://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf - The
+    SoC reference manual for additional details on the BOOT_CFG registers.
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions
  2020-05-30  3:24 ` [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions Denis 'GNUtoo' Carikli
@ 2020-05-30 17:17   ` Soeren Moch
  2020-06-04  4:13     ` Denis 'GNUtoo' Carikli
  2020-06-12 21:18   ` Tom Rini
  1 sibling, 1 reply; 22+ messages in thread
From: Soeren Moch @ 2020-05-30 17:17 UTC (permalink / raw)
  To: u-boot

On 30.05.20 05:24, Denis 'GNUtoo' Carikli wrote:
> This is needed to enable distro_boot support later on.
>
> Adding the necessary configuration to enable booting general
> purpose distributions is typically done by enabling
> CONFIG_DISTRO_DEFAULTS.
>
> However the resulting image size is is already very close to
> the size limit and PXE isn't strictly needed, so instead we
> made sure that all the configuration selected by
> CONFIG_DISTRO_DEFAULTS were selected, with the exception of
> PXE related configuration (CONFIG_BOOTP_PXE and
> CONFIG_CMD_PXE) that are both disabled.
>
> With arm-linux-gnueabi-gcc 9.3.0-1 from the Parabola
> GNU/Linux distribution, we have the following size
> differences:
> - text: +7526 bytes
> - data: +28 bytes
> - bss: -12 bytes
> - total: +7542 bytes
>
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
It is quite uncommon to use "board: tbs2910_defconfig" instead of
"board: tbs2910" in the patch title.But maybe not that important.

Reviewed-by: Soeren Moch <smoch@web.de>

Thanks,
Soeren
> ---
> Changelog since v4:
> -------------------
> - As requested, I Added in the commit message the reason why the
>   change is really needed as the short summary is not self
>   explanatory enough.
> - Fixed a typo in the commit message
>   (resultimg image instead of resulting image).
> - Switched to the use of CONFIG_CMD_SYSBOOT instead of
>   CONFIG_DISTRO_BOOTCMD as suggested
>   The only changes between the two resulting .config are the following:
>   -CONFIG_DISTRO_DEFAULTS=y
>   +# CONFIG_DISTRO_DEFAULTS is not set
>   -CONFIG_BOOTP_PXE=y
>   -CONFIG_BOOTP_PXE_CLIENTARCH=0x15
>   -CONFIG_CMD_PXE=y
>   +# CONFIG_CMD_PXE is not set
> ---
>  configs/tbs2910_defconfig | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
> index d14ff45615..fc9095c859 100644
> --- a/configs/tbs2910_defconfig
> +++ b/configs/tbs2910_defconfig
> @@ -9,6 +9,7 @@ CONFIG_NR_DRAM_BANKS=1
>  CONFIG_PRE_CON_BUF_ADDR=0x7c000000
>  CONFIG_CMD_HDMIDETECT=y
>  CONFIG_AHCI=y
> +CONFIG_ENV_VARS_UBOOT_CONFIG=y
>  CONFIG_BOOTDELAY=3
>  CONFIG_USE_BOOTCOMMAND=y
>  CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc; fi"
> @@ -43,6 +44,7 @@ CONFIG_CMD_MII=y
>  CONFIG_CMD_PING=y
>  CONFIG_CMD_CACHE=y
>  CONFIG_CMD_TIME=y
> +CONFIG_CMD_SYSBOOT=y
>  CONFIG_CMD_EXT2=y
>  CONFIG_CMD_EXT4=y
>  CONFIG_CMD_EXT4_WRITE=y

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 5/7] board: tbs2910: remove CONFIG_DHCP
  2020-05-30  3:24 ` [PATCHv5][ 5/7] board: tbs2910: remove CONFIG_DHCP Denis 'GNUtoo' Carikli
@ 2020-05-30 17:18   ` Soeren Moch
  0 siblings, 0 replies; 22+ messages in thread
From: Soeren Moch @ 2020-05-30 17:18 UTC (permalink / raw)
  To: u-boot

On 30.05.20 05:24, Denis 'GNUtoo' Carikli wrote:
> As that the resulting image is already very close to the
> size limit, and that CONFIG_DHCP is not strictly required,
> removing it shouldn't hurt.
You removed CONFIG_CMD_DHCP.? This is used to check the ethernet
connection of the board. And since we enable NFS boot in defconfig, we
also want DHCP.
Please keep this command and drop this patch.
>
> With arm-linux-gnueabi-gcc 9.3.0-1 from the Parabola
> GNU/Linux distribution, we have the following size
> differences:
> - text: -1708 bytes
> - data: -28 bytes
> - bss:  -20 bytes
> - total: -1756 bytes
>
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
> ---
> Changelog since v4:
> -------------------
> - I was requested to remove DHCP in the v3 review
>   but I forgot about it in v4. This fixes it.
I asked to "remove DHCP and PXE boot targets" in BOOT_TARGET_DEVICES for
distroboot. This already was correctly done in v4 of this series.

Please drop this patch.

Thanks,
Soeren
> ---
>  configs/tbs2910_defconfig | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
> index fc9095c859..9b25dcff5e 100644
> --- a/configs/tbs2910_defconfig
> +++ b/configs/tbs2910_defconfig
> @@ -39,7 +39,6 @@ CONFIG_CMD_PCI=y
>  CONFIG_CMD_SATA=y
>  CONFIG_CMD_USB=y
>  CONFIG_CMD_USB_MASS_STORAGE=y
> -CONFIG_CMD_DHCP=y
>  CONFIG_CMD_MII=y
>  CONFIG_CMD_PING=y
>  CONFIG_CMD_CACHE=y

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 6/7] board: tbs2910: Enable distro_boot support.
  2020-05-30  3:24 ` [PATCHv5][ 6/7] board: tbs2910: Enable distro_boot support Denis 'GNUtoo' Carikli
@ 2020-05-30 17:18   ` Soeren Moch
  2020-06-12 21:18   ` Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Soeren Moch @ 2020-05-30 17:18 UTC (permalink / raw)
  To: u-boot

On 30.05.20 05:24, Denis 'GNUtoo' Carikli wrote:
> This keeps the compatibility with the old bootcmd.
>
> The fdtfile environment variable also needed to be set to
> imx6q-tbs2910.dtb to enable booting mainline kernels
> otherwise with extlinux.conf it tries to load
> mx6-tbs2910.dtb instead.
>
> With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola
> GNU/Linux distribution, we have the following size
> differences:
> - text: +2041 bytes
> - data: 0 bytes
> - bss: 0 bytes
> - total: +2041 bytes
>
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Reviewed-by: Soeren Moch <smoch@web.de>

Thanks,
Soeren
> ---
> Changelog since v4:
> -------------------
> - Sorted EXTRA_ENV_SETTINGS alphabetically as requested
>   BOOTENV was also moved at the begining of
>   EXTRA_ENV_SETTINGS like on include/configs/colibri-imx8x.h
> - Moved BOOT_TARGET_DEVICES at the end of the file as suggested
> ---
>  configs/tbs2910_defconfig |  3 ++-
>  include/configs/tbs2910.h | 18 ++++++++++++++++++
>  2 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/configs/tbs2910_defconfig b/configs/tbs2910_defconfig
> index 9b25dcff5e..df5013e87c 100644
> --- a/configs/tbs2910_defconfig
> +++ b/configs/tbs2910_defconfig
> @@ -12,11 +12,12 @@ CONFIG_AHCI=y
>  CONFIG_ENV_VARS_UBOOT_CONFIG=y
>  CONFIG_BOOTDELAY=3
>  CONFIG_USE_BOOTCOMMAND=y
> -CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc; fi"
> +CONFIG_BOOTCOMMAND="mmc rescan; if run bootcmd_up1; then run bootcmd_up2; else run bootcmd_mmc || run distro_bootcmd; fi"
>  CONFIG_USE_PREBOOT=y
>  CONFIG_PREBOOT="echo PCI:; pci enum; pci 1; usb start; if hdmidet; then run set_con_hdmi; else run set_con_serial; fi"
>  CONFIG_PRE_CONSOLE_BUFFER=y
>  CONFIG_SUPPORT_RAW_INITRD=y
> +CONFIG_DEFAULT_FDT_FILE="imx6q-tbs2910.dtb"
>  CONFIG_BOUNCE_BUFFER=y
>  CONFIG_BOARD_EARLY_INIT_F=y
>  CONFIG_HUSH_PARSER=y
> diff --git a/include/configs/tbs2910.h b/include/configs/tbs2910.h
> index a230111251..17de122852 100644
> --- a/include/configs/tbs2910.h
> +++ b/include/configs/tbs2910.h
> @@ -76,6 +76,7 @@
>  #define CONFIG_BOARD_SIZE_LIMIT		392192 /* (CONFIG_ENV_OFFSET - 1024) */
>
>  #define CONFIG_EXTRA_ENV_SETTINGS \
> +	BOOTENV \
>  	"bootargs_mmc1=console=ttymxc0,115200 di0_primary console=tty1\0" \
>  	"bootargs_mmc2=video=mxcfb0:dev=hdmi,1920x1080M at 60 " \
>  			"video=mxcfb1:off video=mxcfb2:off fbmem=28M\0" \
> @@ -92,6 +93,13 @@
>  			"bootm 0x10800000 0x10d00000\0" \
>  	"console=ttymxc0\0" \
>  	"fan=gpio set 92\0" \
> +	"fdt_addr=0x13000000\0" \
> +	"fdt_addr_r=0x13000000\0" \
> +	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
> +	"kernel_addr_r=0x10008000\0" \
> +	"pxefile_addr_r=0x10008000\0" \
> +	"ramdisk_addr_r=0x18000000\0" \
> +	"scriptaddr=0x14000000\0" \
>  	"set_con_serial=setenv stdout serial; " \
>  			"setenv stderr serial\0" \
>  	"set_con_hdmi=setenv stdout serial,vga; " \
> @@ -100,4 +108,14 @@
>  	"stdin=serial,usbkbd\0" \
>  	"stdout=serial,vga\0"
>
> +/* Enable distro boot */
> +#define BOOT_TARGET_DEVICES(func) \
> +	func(MMC, mmc, 0) \
> +	func(MMC, mmc, 1) \
> +	func(MMC, mmc, 2) \
> +	func(SATA, sata, 0) \
> +	func(USB, usb, 0)
> +#include <config_distro_bootcmd.h>
> +
>  #endif			       /* __TBS2910_CONFIG_H * */

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 7/7] board: tbs2910: add documentation
  2020-05-30  3:24 ` [PATCHv5][ 7/7] board: tbs2910: add documentation Denis 'GNUtoo' Carikli
@ 2020-05-30 17:18   ` Soeren Moch
  2020-06-04  4:39     ` Denis 'GNUtoo' Carikli
  2020-06-12 21:18   ` Tom Rini
  1 sibling, 1 reply; 22+ messages in thread
From: Soeren Moch @ 2020-05-30 17:18 UTC (permalink / raw)
  To: u-boot

On 30.05.20 05:24, Denis 'GNUtoo' Carikli wrote:
> This documents the u-boot installation procedure and the
> hardware in order to get started.
>
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
> ---
> Changelog since v4:
> -------------------
> - Added dded information about SYSBOOT boot support as requested.
> - Fixed the switch positions as suggested.
> ---
>  doc/board/index.rst       |   1 +
>  doc/board/tbs/index.rst   |   9 ++
>  doc/board/tbs/tbs2910.rst | 191 ++++++++++++++++++++++++++++++++++++++
>  3 files changed, 201 insertions(+)
>  create mode 100644 doc/board/tbs/index.rst
>  create mode 100644 doc/board/tbs/tbs2910.rst
Denis,

thanks for providing this documentation. 2 remarks below.
Since this already is v5, do you want to resend a fixed version of this
series, or should we fix this later in a separate patch?

If you want to send a new version of this patch, please also add
---8<---
diff --git a/board/tbs/tbs2910/MAINTAINERS b/board/tbs/tbs2910/MAINTAINERS
index a3ad2f712a..1e3c0d0ece 100644
--- a/board/tbs/tbs2910/MAINTAINERS
+++ b/board/tbs/tbs2910/MAINTAINERS
@@ -4,4 +4,5 @@ S:????? Maintained
?F:???? arch/arm/dts/imx6q-tbs2910.dts
?F:???? board/tbs/tbs2910/
?F:???? configs/tbs2910_defconfig
+F:???? doc/board/tbs/
?F:???? include/configs/tbs2910.h
---8<---
(whitespace may be broken in this snippet)

Thanks,
Soeren
>
> diff --git a/doc/board/index.rst b/doc/board/index.rst
> index 01b233f737..bb4473152a 100644
> --- a/doc/board/index.rst
> +++ b/doc/board/index.rst
> @@ -18,5 +18,6 @@ Board-specific doc
>     rockchip/index
>     sifive/index
>     st/index
> +   tbs/index
>     toradex/index
>     xilinx/index
> diff --git a/doc/board/tbs/index.rst b/doc/board/tbs/index.rst
> new file mode 100644
> index 0000000000..b677bc624f
> --- /dev/null
> +++ b/doc/board/tbs/index.rst
> @@ -0,0 +1,9 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +
> +TBS
> +===
> +
> +.. toctree::
> +   :maxdepth: 2
> +
> +   tbs2910
> diff --git a/doc/board/tbs/tbs2910.rst b/doc/board/tbs/tbs2910.rst
> new file mode 100644
> index 0000000000..e97f2b6e61
> --- /dev/null
> +++ b/doc/board/tbs/tbs2910.rst
> @@ -0,0 +1,191 @@
> +TBS2910 Matrix ARM miniPC
> +=========================
> +
> +Building
> +--------
> +To build u-boot for the TBS2910 Matrix ARM miniPC, you can use the following
> +procedure:
> +
> +First add the ARM toolchain to your PATH
> +
> +Then setup the ARCH and cross compilation environment variables.
> +
> +When this is done you can then build u-boot for the TBS2910 Matrix ARM miniPC
> +with the following commands:
> +
> +.. code-block:: none
> +
> +   make mrproper
> +   make tbs2910_defconfig
> +   make
> +
> +Once the build is complete, you can find the resulting image as u-boot.imx in
> +the current directory.
> +
> +UART
> +----
> +The UART voltage is at 3.3V and its settings are 115200bps 8N1
> +
> +BOOT/UPDATE boot switch:
> +------------------------
> +The BOOT/UPDATE switch (SW11) is connected to the BOOT_MODE0 and
> +BOOT_MODE1 SoC pins. It has "BOOT" and "UPDATE" markings both on
> +the PCB and on the plastic case.
> +
> +When set to the "UPDATE" position, the SoC will use the "Boot From Fuses"
> +configuration, and since BT_FUSE_SEL is 0, this makes the SOC jump to serial
> +downloader.
> +
> +When set in the "BOOT" position, the SoC will use the "Internal boot"
> +configuration, and since BT_FUSE_SEL is 0, it will then use the GPIO pins
> +for the boot configuration.
> +
> +SW6 binary DIP switch array on the PCB revision 2.1:
> +----------------------------------------------------
> +On that PCB revision, SW6 has 8 positions.
> +
> +Switching a position to ON sets the corresponding
> +register to 1.
> +
> +See the following table for a correspondence between the switch positions and
> +registers:
> +
> +===============    ============
> +Switch position    Register
> +===============    ============
> +1                  BOOT_CFG2[3]
> +2                  BOOT_CFG2[4]
> +3                  BOOT_CFG2[5]
> +4                  BOOT_CFG2[6]
> +5                  BOOT_CFG1[4]
> +6                  BOOT_CFG1[5]
> +7                  BOOT_CFG1[6]
> +8                  BOOT_CFG1[7]
> +===============    ============
> +
> +For example:
> +
> +  - To boot from the eMMC: 1:ON , 2:ON, 3:ON, 4:OFF, 5:OFF, 6:ON, 7:ON, 8:OFF
> +  - To boot from the microSD slot: 1: ON, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:OFF,
> +    7:ON, 8:OFF
> +  - To boot from the SD slot: 1: OFF, 2: ON, 3: OFF, 4: OFF, 5:OFF, 6:OFF, 7:ON,
> +    8:OFF
> +  - To boot from SATA: 1: OFF, 2: OFF, 3: OFF, 4: OFF, 5:OFF, 6:ON, 7:OFF, 8:OFF
> +
> +You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for
> +additional details.
> +
> +SW6 binary DIP switch array on the PCB revision 2.3:
> +----------------------------------------------------
> +On that PCB revision, SW6 has only 4 positions.
> +
> +Switching a position to ON sets the corresponding
> +register to 1.
> +
> +See the following table for a correspondence between the switch positions and
> +registers:
> +
> +===============    ============
> +Switch position    Register
> +===============    ============
> +1                  BOOT_CFG2[3]
> +2                  BOOT_CFG2[4]
> +3                  BOOT_CFG2[5]
> +4                  BOOT_CFG1[5]
> +===============    ============
> +
> +For example:
> +
> +- To boot from the eMMC: 1:ON, 2:ON, 3:ON, 4:ON
> +- To boot from the microSD slot: 1:ON, 2:OFF, 3:OFF, 4:OFF
> +- To boot from the SD slot: 1:OFF, 2:ON, 3:OFF, 4:OFF
> +
> +You can refer to the BOOT_CFG registers in the I.MX6Q reference manual for
> +additional details.
> +
> +Loading u-boot from USB:
> +------------------------
> +If you need to load u-boot from USB, you can use the following instructions:
> +
> +First build imx_usb_loader, as we will need it to load u-boot from USB. This
> +can be done with the following commands:
> +
> +.. code-block:: none
> +
> +   git clone git://github.com/boundarydevices/imx_usb_loader.git
> +   cd imx_usb_loader
> +   make
> +
> +This will create the resulting imx_usb binary.
> +
> +When this is done, you can copy the u-boot.imx image that you built earlier
> +in in the imx_usb_loader directory.
> +
> +You will then need to power off the TBS2910 Matrix ARM miniPC and make sure that
> +the boot switch is set to "UPDATE"
> +
> +Once this is done you can connect an USB cable between the computer that will
> +run imx_usb and the TBS2910 Matrix ARM miniPC.
> +
> +If you also need to access the u-boot console, you will also need to connect an
> +UART cable between the computer running imx_usb and the TBS2910 Matrix ARM
> +miniPC.
> +
> +Once everything is connected you can finally power on the TBS2910 Matrix ARM
> +miniPC. The SoC will then jump to the serial download and wait for you.
> +
> +Finlay, you can load u-boot through USB with with the following command:
Typo:
s/Finlay/Finally/
> +
> +.. code-block:: none
> +
> +   sudo ./imx_usb -v u-boot.imx
> +
> +The u-boot boot messages will then appear in the serial console.
> +
> +Install u-boot on the eMMC:
> +---------------------------
> +To install u-boot on the eMMC, you first need to boot the TBS2910 Matrix ARM
> +miniPC.
> +
> +Once booted, you can flash u-boot.imx to mmcblk0boot0 with the
> +following commands:
> +
> +.. code-block:: none
> +
> +   sudo echo 0 >/sys/block/mmcblk0boot0/force_ro
> +   sudo dd if=u-boot.imx of=/dev/mmcblk0boot0 bs=1k seek=1; sync
> +
> +Note that the eMMC card node may vary, so adjust this as needed.
> +
> +Once the new u-boot version is installed, to boot on it you then need to power
> +off the TBS2910 Matrix ARM miniPC.
> +
> +Once it is off, you need make sure that the boot switch is set to "BOOT" and
> +that the SW6 switch is set to boot on the eMMC as described in the previous
> +sections.
> +
> +If you also need to access the u-boot console, you will also need to connect an
> +UART cable between the computer running imx_usb and the TBS2910 Matrix ARM
> +miniPC.
> +
> +You can then power up the TBS2910 Matrix ARM miniPC and U-Boot messages will
> +appear in the serial console.
> +
> +Booting a distribution:
> +-----------------------
> +When booting on the TBS2910 Matrix ARM miniPC, by default U-Boot will first try
> +to boot from hardcoded offsets from the start of the eMMC. This is for
> +compatibility with the stock GNU/Linux distribution.
> +
> +If that fails it will then try to boot from several interfaces using
> +'distro_bootcmd': It will first try to boot from the microSD slot, then the
> +SD slot, then the internal eMMC, then the SATA interface and finally the USB
> +interface. For more information on how to configure your distribution to boot,
> +see 'README.distro'.
> +
> +Links:
> +------
> +  - https://www.tbsdtv.com/download/document/tbs2910/TBS2910-Matrix-ARM-mini-PC-SCH_rev2.1.pdf
> +    - The schematics for the revision 2.1 of the TBS2910 Matrix ARM miniPC.
> +  - https://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf - The
> +    SoC reference manual for additional details on the BOOT_CFG registers.
Unfortunately this link does not work for me. Is some sort of login
required? Or was this moved away?

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions
  2020-05-30 17:17   ` Soeren Moch
@ 2020-06-04  4:13     ` Denis 'GNUtoo' Carikli
  2020-06-04  9:17       ` Soeren Moch
  0 siblings, 1 reply; 22+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-06-04  4:13 UTC (permalink / raw)
  To: u-boot

On Sat, 30 May 2020 19:17:49 +0200
Soeren Moch <smoch@web.de> wrote:

Since I need to fix the MAINTAINER file to add the documentation path
in it anyway, it's probably better to resend again a v6 serie.

As I plan to resend a serie anyway, would the following work better:
> board: tbs2910: Add support for booting general purpose distributions
> in defconfig

Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200604/d8f7f9ee/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 7/7] board: tbs2910: add documentation
  2020-05-30 17:18   ` Soeren Moch
@ 2020-06-04  4:39     ` Denis 'GNUtoo' Carikli
  2020-06-04  9:29       ` Soeren Moch
  0 siblings, 1 reply; 22+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-06-04  4:39 UTC (permalink / raw)
  To: u-boot

On Sat, 30 May 2020 19:18:33 +0200
Soeren Moch <smoch@web.de> wrote:

> > +Links:
> > +------
> > +  -
> > https://www.tbsdtv.com/download/document/tbs2910/TBS2910-Matrix-ARM-mini-PC-SCH_rev2.1.pdf
> > +    - The schematics for the revision 2.1 of the TBS2910 Matrix
> > ARM miniPC.
> > +  -
> > https://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf
> > - The
> > +    SoC reference manual for additional details on the BOOT_CFG
> > registers.
> Unfortunately this link does not work for me. Is some sort of login
> required? Or was this moved away?
I didn't know it has moved.

The old address has been archived by archive.org/web at the following
address:
https://web.archive.org/web/20190826025113/https://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf

The Linux kernel has a unique link to this document at this URL:
http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6DQRM.pdf

And it's the same since since 2017, and it was introduced by this
commit:
> commit e130291212df5ce8160cd2e35387c96439863ad3
> Author: Steve Longerbeam <slongerbeam@gmail.com>
> Date:   Sat Jun 10 16:00:29 2017 -0300
> 
>     [media] media: Add i.MX media core driver
>     
>     Add the core media driver for i.MX SOC.
>     
>     Switch from the v4l2_of_ APIs to the v4l2_fwnode_ APIs.
>     Add the bayer formats to imx-media's list of supported pixel and
>     bus formats.
>     
>     Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
>     Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
>     Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
>     Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>     Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

However that redirects to https://www.nxp.com/doc/IMX6DQRM which
redirects to a login page.

Archive.org/web has many links for that page, but I only found one of
them to work, which is older than the archive of the link I had: 
https://web.archive.org/web/20180829173128/https://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf

I'm not aware of any project tracking datasheet / reference manual URLs
and versions though, but it would probably be something very useful to
have.

At some point, I plan to see if it's possible to something like that
with Wikidata, but I'm not sure if it's fit to track datasheets URLs
over time.

Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200604/8f699e73/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions
  2020-06-04  4:13     ` Denis 'GNUtoo' Carikli
@ 2020-06-04  9:17       ` Soeren Moch
  0 siblings, 0 replies; 22+ messages in thread
From: Soeren Moch @ 2020-06-04  9:17 UTC (permalink / raw)
  To: u-boot

On 04.06.20 06:13, Denis 'GNUtoo' Carikli wrote:
> On Sat, 30 May 2020 19:17:49 +0200
> Soeren Moch <smoch@web.de> wrote:
>
> Since I need to fix the MAINTAINER file to add the documentation path
> in it anyway, it's probably better to resend again a v6 serie.
>
> As I plan to resend a serie anyway, would the following work better:
>> board: tbs2910: Add support for booting general purpose distributions
>> in defconfig
>
It is good style to limit the patch title length to 75 characters. So I
would prefer just "board: tbs2910: Add support for booting general
purpose distributions".

Soeren

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 7/7] board: tbs2910: add documentation
  2020-06-04  4:39     ` Denis 'GNUtoo' Carikli
@ 2020-06-04  9:29       ` Soeren Moch
  2020-06-12 21:30         ` Fabio Estevam
  0 siblings, 1 reply; 22+ messages in thread
From: Soeren Moch @ 2020-06-04  9:29 UTC (permalink / raw)
  To: u-boot

On 04.06.20 06:39, Denis 'GNUtoo' Carikli wrote:
> On Sat, 30 May 2020 19:18:33 +0200
> Soeren Moch <smoch@web.de> wrote:
>
>>> +Links:
>>> +------
>>> +  -
>>> https://www.tbsdtv.com/download/document/tbs2910/TBS2910-Matrix-ARM-mini-PC-SCH_rev2.1.pdf
>>> +    - The schematics for the revision 2.1 of the TBS2910 Matrix
>>> ARM miniPC.
>>> +  -
>>> https://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf
>>> - The
>>> +    SoC reference manual for additional details on the BOOT_CFG
>>> registers.
>> Unfortunately this link does not work for me. Is some sort of login
>> required? Or was this moved away?
> I didn't know it has moved.
>
> The old address has been archived by archive.org/web at the following
> address:
> https://web.archive.org/web/20190826025113/https://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf
>
> The Linux kernel has a unique link to this document at this URL:
> http://www.nxp.com/assets/documents/data/en/reference-manuals/IMX6DQRM.pdf
>
> And it's the same since since 2017, and it was introduced by this
> commit:
>> commit e130291212df5ce8160cd2e35387c96439863ad3
>> Author: Steve Longerbeam <slongerbeam@gmail.com>
>> Date:   Sat Jun 10 16:00:29 2017 -0300
>>
>>     [media] media: Add i.MX media core driver
>>     
>>     Add the core media driver for i.MX SOC.
>>     
>>     Switch from the v4l2_of_ APIs to the v4l2_fwnode_ APIs.
>>     Add the bayer formats to imx-media's list of supported pixel and
>>     bus formats.
>>     
>>     Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
>>     Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
>>     Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
>>     Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>>     Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> However that redirects to https://www.nxp.com/doc/IMX6DQRM which
> redirects to a login page.
AFAIK a login (free of charge, besides registering the e-mail address)
is required to download NXP documents. This way you always get the
latest document version, not a old version from some archive.

Maybe Fabio knows a better way how to reference NXP manuals? Otherwise
for this u-boot board documentation the link from linux would be fine
with me, maybe with the additional archive reference.

Soeren
> Archive.org/web has many links for that page, but I only found one of
> them to work, which is older than the archive of the link I had: 
> https://web.archive.org/web/20180829173128/https://www.nxp.com/docs/en/reference-manual/IMX6DQRM.pdf
>
> I'm not aware of any project tracking datasheet / reference manual URLs
> and versions though, but it would probably be something very useful to
> have.
>
> At some point, I plan to see if it's possible to something like that
> with Wikidata, but I'm not sure if it's fit to track datasheets URLs
> over time.
>
> Denis.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands
  2020-05-30  3:24 [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Denis 'GNUtoo' Carikli
                   ` (5 preceding siblings ...)
  2020-05-30  3:24 ` [PATCHv5][ 7/7] board: tbs2910: add documentation Denis 'GNUtoo' Carikli
@ 2020-06-12 21:17 ` Tom Rini
  6 siblings, 0 replies; 22+ messages in thread
From: Tom Rini @ 2020-06-12 21:17 UTC (permalink / raw)
  To: u-boot

On Sat, May 30, 2020 at 05:24:19AM +0200, Denis 'GNUtoo' Carikli wrote:

> The loadb and loads commands are not needed for booting.
> 
> There are also more reliable and faster alternatives to
> loadb and loads that can be used with the current configuration.
> 
> As that the resulting image is already very close to the
> size limit, removing the loadb and loads commands shouldn't
> hurt.
> 
> With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola
> GNU/Linux distribution we have the following size
> reduction:
> - text: 6733 bytes
> - data: 116 bytes
> - bss: 1172 bytes
> - total: 8021 bytes
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
> Acked-by: Soeren Moch <smoch@web.de>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200612/d0ec3ade/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 2/7] board: tbs2910: disable CONFIG_GZIP
  2020-05-30  3:24 ` [PATCHv5][ 2/7] board: tbs2910: disable CONFIG_GZIP Denis 'GNUtoo' Carikli
@ 2020-06-12 21:17   ` Tom Rini
  0 siblings, 0 replies; 22+ messages in thread
From: Tom Rini @ 2020-06-12 21:17 UTC (permalink / raw)
  To: u-boot

On Sat, May 30, 2020 at 05:24:20AM +0200, Denis 'GNUtoo' Carikli wrote:

> As that the resulting image is already very close to the
> size limit, and that CONFIG_GZIP is not strictly required,
> removing it shouldn't hurt.
> 
> With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola
> GNU/Linux distribution we have the following size
> reduction:
> - text: 9752
> - data: 0
> - bss: 16
> - total: 9768
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
> Acked-by: Soeren Moch <smoch@web.de>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200612/c2fcc7a0/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 3/7] board: tbs2910: move CONFIG_BOOTCOMMAND from header to defconfig
  2020-05-30  3:24 ` [PATCHv5][ 3/7] board: tbs2910: move CONFIG_BOOTCOMMAND from header to defconfig Denis 'GNUtoo' Carikli
@ 2020-06-12 21:17   ` Tom Rini
  0 siblings, 0 replies; 22+ messages in thread
From: Tom Rini @ 2020-06-12 21:17 UTC (permalink / raw)
  To: u-boot

On Sat, May 30, 2020 at 05:24:21AM +0200, Denis 'GNUtoo' Carikli wrote:

> This doesn't affect the size of the image: with
> arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola GNU/Linux
> distribution, the text, data, bss and total sizes remain
> unchanged.
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
> Reviewed-by: Soeren Moch <smoch@web.de>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200612/c97a5c22/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions
  2020-05-30  3:24 ` [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions Denis 'GNUtoo' Carikli
  2020-05-30 17:17   ` Soeren Moch
@ 2020-06-12 21:18   ` Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Tom Rini @ 2020-06-12 21:18 UTC (permalink / raw)
  To: u-boot

On Sat, May 30, 2020 at 05:24:22AM +0200, Denis 'GNUtoo' Carikli wrote:

> This is needed to enable distro_boot support later on.
> 
> Adding the necessary configuration to enable booting general
> purpose distributions is typically done by enabling
> CONFIG_DISTRO_DEFAULTS.
> 
> However the resulting image size is is already very close to
> the size limit and PXE isn't strictly needed, so instead we
> made sure that all the configuration selected by
> CONFIG_DISTRO_DEFAULTS were selected, with the exception of
> PXE related configuration (CONFIG_BOOTP_PXE and
> CONFIG_CMD_PXE) that are both disabled.
> 
> With arm-linux-gnueabi-gcc 9.3.0-1 from the Parabola
> GNU/Linux distribution, we have the following size
> differences:
> - text: +7526 bytes
> - data: +28 bytes
> - bss: -12 bytes
> - total: +7542 bytes
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
> Reviewed-by: Soeren Moch <smoch@web.de>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200612/28fb3d8c/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 6/7] board: tbs2910: Enable distro_boot support.
  2020-05-30  3:24 ` [PATCHv5][ 6/7] board: tbs2910: Enable distro_boot support Denis 'GNUtoo' Carikli
  2020-05-30 17:18   ` Soeren Moch
@ 2020-06-12 21:18   ` Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Tom Rini @ 2020-06-12 21:18 UTC (permalink / raw)
  To: u-boot

On Sat, May 30, 2020 at 05:24:24AM +0200, Denis 'GNUtoo' Carikli wrote:

> This keeps the compatibility with the old bootcmd.
> 
> The fdtfile environment variable also needed to be set to
> imx6q-tbs2910.dtb to enable booting mainline kernels
> otherwise with extlinux.conf it tries to load
> mx6-tbs2910.dtb instead.
> 
> With arm-linux-gnueabi-gcc 9.2.0-1 from the Parabola
> GNU/Linux distribution, we have the following size
> differences:
> - text: +2041 bytes
> - data: 0 bytes
> - bss: 0 bytes
> - total: +2041 bytes
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
> Reviewed-by: Soeren Moch <smoch@web.de>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200612/a845df96/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 7/7] board: tbs2910: add documentation
  2020-05-30  3:24 ` [PATCHv5][ 7/7] board: tbs2910: add documentation Denis 'GNUtoo' Carikli
  2020-05-30 17:18   ` Soeren Moch
@ 2020-06-12 21:18   ` Tom Rini
  1 sibling, 0 replies; 22+ messages in thread
From: Tom Rini @ 2020-06-12 21:18 UTC (permalink / raw)
  To: u-boot

On Sat, May 30, 2020 at 05:24:25AM +0200, Denis 'GNUtoo' Carikli wrote:

> This documents the u-boot installation procedure and the
> hardware in order to get started.
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>

I see there's some unresolved discussion about how to have a more
persistent link to (now move/removed) documentation but that can be
handled in a follow-up I believe.

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200612/ed65f8f3/attachment.sig>

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCHv5][ 7/7] board: tbs2910: add documentation
  2020-06-04  9:29       ` Soeren Moch
@ 2020-06-12 21:30         ` Fabio Estevam
  0 siblings, 0 replies; 22+ messages in thread
From: Fabio Estevam @ 2020-06-12 21:30 UTC (permalink / raw)
  To: u-boot

Hi Soeren,

On Thu, Jun 4, 2020 at 6:29 AM Soeren Moch <smoch@web.de> wrote:

> Maybe Fabio knows a better way how to reference NXP manuals? Otherwise

It seems that all the URLs for accessing the i.MX6 Reference Manual
require a login now, unfortunately.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-06-12 21:30 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30  3:24 [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Denis 'GNUtoo' Carikli
2020-05-30  3:24 ` [PATCHv5][ 2/7] board: tbs2910: disable CONFIG_GZIP Denis 'GNUtoo' Carikli
2020-06-12 21:17   ` Tom Rini
2020-05-30  3:24 ` [PATCHv5][ 3/7] board: tbs2910: move CONFIG_BOOTCOMMAND from header to defconfig Denis 'GNUtoo' Carikli
2020-06-12 21:17   ` Tom Rini
2020-05-30  3:24 ` [PATCHv5][ 4/7] board: tbs2910_defconfig: Add support for booting general purpose distributions Denis 'GNUtoo' Carikli
2020-05-30 17:17   ` Soeren Moch
2020-06-04  4:13     ` Denis 'GNUtoo' Carikli
2020-06-04  9:17       ` Soeren Moch
2020-06-12 21:18   ` Tom Rini
2020-05-30  3:24 ` [PATCHv5][ 5/7] board: tbs2910: remove CONFIG_DHCP Denis 'GNUtoo' Carikli
2020-05-30 17:18   ` Soeren Moch
2020-05-30  3:24 ` [PATCHv5][ 6/7] board: tbs2910: Enable distro_boot support Denis 'GNUtoo' Carikli
2020-05-30 17:18   ` Soeren Moch
2020-06-12 21:18   ` Tom Rini
2020-05-30  3:24 ` [PATCHv5][ 7/7] board: tbs2910: add documentation Denis 'GNUtoo' Carikli
2020-05-30 17:18   ` Soeren Moch
2020-06-04  4:39     ` Denis 'GNUtoo' Carikli
2020-06-04  9:29       ` Soeren Moch
2020-06-12 21:30         ` Fabio Estevam
2020-06-12 21:18   ` Tom Rini
2020-06-12 21:17 ` [PATCHv5][ 1/7] board: tbs2910: disable loadb and loads commands Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.