Skip to contentSkip to conversation

arm: tegra: apalis-tk1 and ext clock loopback

PATCH Superseded Marcel Ziswiler 5 participants 13 messages Mar 21, 2017 – Apr 3, 2017

Subsystems (4)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover arm: tegra: apalis-tk1 and ext clock loopback

This series adds support for the Toradex Apalis TK1 and introduces a new option to disable the external clock loopback on SDMMC3.

The whole series is also available here:

http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-next

Changes in v4:
- Re-based.
- Drop patches 2 and 3:
mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig
in favor of commit 1d2c0506d31a9997e5ffc22e90942902f673b107
mmc: move more driver config options to Kconfig
from Masahiro.
- Meld patch 6
apalis-tk1: clean-up defconfig
into first one.
- Add distro boot fallback.
- Enable FIT and device tree overlay support.
- Explicitly drop EFI loader support.
- Re-based.

Changes in v3:
- Changes involved now dropped patches.

Changes in v2:
- Added Simon's reviewed-by.
- Added TODO(email) as suggested by Simon so it is clear this is temporary and will be moved to device tree controlled approach once proper kernel integration made it mainline.

Marcel Ziswiler (3):
arm: tegra: initial support for apalis tk1
mmc: tegra: allow disabling external clock loopback
apalis-tk1: disable external clock loopback on SDMMC3

 arch/arm/dts/Makefile                              |    1 +
 arch/arm/dts/tegra124-apalis.dts                   | 2203 ++++++++++++++++++++
 arch/arm/include/asm/arch-tegra/tegra_mmc.h        |    2 +
 arch/arm/mach-tegra/tegra124/Kconfig               |    7 +
 board/toradex/apalis-tk1/Kconfig                   |   30 +
 board/toradex/apalis-tk1/MAINTAINERS               |    7 +
 board/toradex/apalis-tk1/Makefile                  |    5 +
 board/toradex/apalis-tk1/apalis-tk1.c              |  175 ++
 board/toradex/apalis-tk1/as3722_init.c             |  117 ++
 board/toradex/apalis-tk1/as3722_init.h             |   41 +
 .../toradex/apalis-tk1/pinmux-config-apalis-tk1.h  |  287 +++
 configs/apalis-tk1_defconfig                       |   48 +
 drivers/mmc/Kconfig                                |   11 +
 drivers/mmc/tegra_mmc.c                            |   16 +
 include/configs/apalis-tk1.h                       |  176 ++
 15 files changed, 3126 insertions(+)
 create mode 100644 arch/arm/dts/tegra124-apalis.dts
 create mode 100644 board/toradex/apalis-tk1/Kconfig
 create mode 100644 board/toradex/apalis-tk1/MAINTAINERS
 create mode 100644 board/toradex/apalis-tk1/Makefile
 create mode 100644 board/toradex/apalis-tk1/apalis-tk1.c
 create mode 100644 board/toradex/apalis-tk1/as3722_init.c
 create mode 100644 board/toradex/apalis-tk1/as3722_init.h
 create mode 100644 board/toradex/apalis-tk1/pinmux-config-apalis-tk1.h
 create mode 100644 configs/apalis-tk1_defconfig
 create mode 100644 include/configs/apalis-tk1.h
Signature · 1 line
2.9.3
#1 lore raw

PATCH v4 1/3 arm: tegra: initial support for apalis tk1

From: Marcel Ziswiler <[email protected]>

This patch adds board support for the Toradex Apalis TK1 a computer on module which can be used on different carrier boards.

The module consists of a Tegra TK1 SoC, a PMIC solution, 2 GB of DDR3L RAM, a bunch of level shifters, an eMMC, a TMP451 temperature sensor chip, an I210 gigabit Ethernet controller and a SGTL5000 audio codec. Furthermore, there is a Kinetis MK20DN512 companion micro controller for analogue, CAN and resistive touch functionality.

For the sake of ease of use we do not distinguish between different carrier boards for now as the base module features are deemed sufficient enough for regular booting.

The following functionality is working so far:
- eMMC boot, environment storage and Toradex factory config block
- Gigabit Ethernet
- MMC/SD cards (both MMC1 as well as SD1 slot)
- USB client/host (dual role OTG port as client e.g. for DFU/UMS or host, other two ports as host)

---

Changes in v4:
- Re-based.
- Drop patches 2 and 3:
mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig
in favor of commit 1d2c0506d31a9997e5ffc22e90942902f673b107
mmc: move more driver config options to Kconfig
from Masahiro.
- Meld patch 6
apalis-tk1: clean-up defconfig
into first one.
- Add distro boot fallback.
- Enable FIT and device tree overlay support.
- Explicitly drop EFI loader support.

Changes in v3:
- Changes involved now dropped patches.

Changes in v2:
- Added Simon's reviewed-by.

 arch/arm/dts/Makefile                              |    1 +
 arch/arm/dts/tegra124-apalis.dts                   | 2203 ++++++++++++++++++++
 arch/arm/mach-tegra/tegra124/Kconfig               |    7 +
 board/toradex/apalis-tk1/Kconfig                   |   30 +
 board/toradex/apalis-tk1/MAINTAINERS               |    7 +
 board/toradex/apalis-tk1/Makefile                  |    5 +
 board/toradex/apalis-tk1/apalis-tk1.c              |  175 ++
 board/toradex/apalis-tk1/as3722_init.c             |  117 ++
 board/toradex/apalis-tk1/as3722_init.h             |   41 +
 .../toradex/apalis-tk1/pinmux-config-apalis-tk1.h  |  287 +++
 configs/apalis-tk1_defconfig                       |   47 +
 include/configs/apalis-tk1.h                       |  176 ++
 12 files changed, 3096 insertions(+)
 create mode 100644 arch/arm/dts/tegra124-apalis.dts
 create mode 100644 board/toradex/apalis-tk1/Kconfig
 create mode 100644 board/toradex/apalis-tk1/MAINTAINERS
 create mode 100644 board/toradex/apalis-tk1/Makefile
 create mode 100644 board/toradex/apalis-tk1/apalis-tk1.c
 create mode 100644 board/toradex/apalis-tk1/as3722_init.c
 create mode 100644 board/toradex/apalis-tk1/as3722_init.h
 create mode 100644 board/toradex/apalis-tk1/pinmux-config-apalis-tk1.h
 create mode 100644 configs/apalis-tk1_defconfig
 create mode 100644 include/configs/apalis-tk1.h
arch/arm/dts/Makefile +1 -0
index afeb43f..fa67c77 100644
@@ -58,6 +58,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
 	tegra30-colibri.dtb \
 	tegra30-tec-ng.dtb \
 	tegra114-dalmore.dtb \
+	tegra124-apalis.dtb \
 	tegra124-jetson-tk1.dtb \
 	tegra124-nyan-big.dtb \
 	tegra124-cei-tk1-som.dtb \
arch/arm/dts/tegra124-apalis.dts new file +2203 -0

2,203 lines not on this page · raw message

arch/arm/mach-tegra/tegra124/Kconfig +7 -0
index ca96a26..a07add6 100644
@@ -4,6 +4,12 @@ choice
 	prompt "Tegra124 board select"
 	optional
 
+config TARGET_APALIS_TK1
+	bool "Toradex Apalis TK1 module"
+	select CPU_V7_HAS_NONSEC
+	select CPU_V7_HAS_VIRT
+	select ARCH_SUPPORT_PSCI
+
 config TARGET_JETSON_TK1
 	bool "NVIDIA Tegra124 Jetson TK1 board"
 	select BOARD_LATE_INIT
@@ -46,5 +52,6 @@ source "board/cei/cei-tk1-som/Kconfig"
 source "board/nvidia/jetson-tk1/Kconfig"
 source "board/nvidia/nyan-big/Kconfig"
 source "board/nvidia/venice2/Kconfig"
+source "board/toradex/apalis-tk1/Kconfig"
 
 endif
board/toradex/apalis-tk1/Kconfig new file +30 -0
new file mode 100644
index 0000000..05407ad
@@ -0,0 +1,30 @@
+if TARGET_APALIS_TK1
+
+config SYS_BOARD
+	default "apalis-tk1"
+
+config SYS_VENDOR
+	default "toradex"
+
+config SYS_CONFIG_NAME
+	default "apalis-tk1"
+
+config TDX_CFG_BLOCK
+	default y
+
+config TDX_HAVE_MMC
+	default y
+
+config TDX_CFG_BLOCK_DEV
+	default "0"
+
+config TDX_CFG_BLOCK_PART
+	default "1"
+
+# Toradex config block in eMMC, at the end of 1st "boot sector"
+config TDX_CFG_BLOCK_OFFSET
+	default "-512"
+
+source "board/toradex/common/Kconfig"
+
+endif
board/toradex/apalis-tk1/MAINTAINERS new file +7 -0
new file mode 100644
index 0000000..3c908e1
@@ -0,0 +1,7 @@
+Apalis TK1
+M:	Marcel Ziswiler <[email protected]>
+S:	Maintained
+F:	board/toradex/apalis-tk1/
+F:	include/configs/apalis-tk1.h
+F:	configs/apalis-tk1_defconfig
+F:	arch/arm/dts/tegra124-apalis.dtb
board/toradex/apalis-tk1/Makefile new file +5 -0
new file mode 100644
index 0000000..9ef06dd
@@ -0,0 +1,5 @@
+# Copyright (c) 2016 Toradex, Inc.
+# SPDX-License-Identifier:      GPL-2.0+
+
+obj-y	+= as3722_init.o
+obj-y	+= apalis-tk1.o
board/toradex/apalis-tk1/apalis-tk1.c new file +175 -0

175 lines not on this page · raw message

board/toradex/apalis-tk1/as3722_init.c new file +117 -0

117 lines not on this page · raw message

board/toradex/apalis-tk1/as3722_init.h new file +41 -0

41 lines not on this page · raw message

board/toradex/apalis-tk1/pinmux-config-apalis-tk1.h new file +287 -0

287 lines not on this page · raw message

configs/apalis-tk1_defconfig new file +47 -0

47 lines not on this page · raw message

include/configs/apalis-tk1.h new file +176 -0

63 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.9.3

Part of the diff is not shown here. View the raw message.

#2 lore raw

PATCH v4 2/3 mmc: tegra: allow disabling external clock loopback

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Introduce CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK to disable the external clock loopback and use the internal one on SDMMC3 as per the SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits being set to 0xfffd according to the TRM.

---

Changes in v4:
- Re-based.

Changes in v3: None
Changes in v2:
- Added Simon's reviewed-by.
- Added TODO(email) as suggested by Simon so it is clear this is temporary and will be moved to device tree controlled approach once proper kernel integration made it mainline.

 arch/arm/include/asm/arch-tegra/tegra_mmc.h |  2 ++
 drivers/mmc/Kconfig                         | 11 +++++++++++
 drivers/mmc/tegra_mmc.c                     | 16 ++++++++++++++++
 3 files changed, 29 insertions(+)
arch/arm/include/asm/arch-tegra/tegra_mmc.h +2 -0
index 64c848a..c40599a 100644
@@ -108,6 +108,8 @@ struct tegra_mmc {
 #define TEGRA_MMC_CLKCON_SDCLK_FREQ_SEL_SHIFT			8
 #define TEGRA_MMC_CLKCON_SDCLK_FREQ_SEL_MASK			(0xff << 8)
 
+#define TEGRA_MMC_MISCON_ENABLE_EXT_LOOPBACK			(1 << 17)
+
 #define TEGRA_MMC_SWRST_SW_RESET_FOR_ALL			(1 << 0)
 #define TEGRA_MMC_SWRST_SW_RESET_FOR_CMD_LINE			(1 << 1)
 #define TEGRA_MMC_SWRST_SW_RESET_FOR_DAT_LINE			(1 << 2)
drivers/mmc/Kconfig +11 -0
index ddef59a..3a6dcec 100644
@@ -345,6 +345,17 @@ config MMC_SUNXI
 
 endif
 
+config TEGRA124_MMC_DISABLE_EXT_LOOPBACK
+	bool "Disable external clock loopback"
+	depends on MMC_SDHCI_TEGRA && TEGRA124
+	help
+	  Disable the external clock loopback and use the internal one on SDMMC3
+	  as per the SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits
+	  being set to 0xfffd according to the TRM.
+
+	  TODO(marcel.ziswiler at toradex.com): Move to device tree controlled
+	  approach once proper kernel integration made it mainline.
+
 endmenu
 
 config SYS_FSL_ERRATUM_ESDHC111
drivers/mmc/tegra_mmc.c +16 -0
index 0df74ef..6c6affb 100644
@@ -513,6 +513,22 @@ static int tegra_mmc_init(struct mmc *mmc)
 
 	tegra_mmc_reset(priv, mmc);
 
+#if defined(CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK)
+	/*
+	 * Disable the external clock loopback and use the internal one on
+	 * SDMMC3 as per the SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1
+	 * bits being set to 0xfffd according to the TRM.
+	 *
+	 * TODO([email protected]): Move to device tree controlled
+	 * approach once proper kernel integration made it mainline.
+	 */
+	if (priv->reg == (void *)0x700b0400) {
+		mask = readl(&priv->reg->venmiscctl);
+		mask &= ~TEGRA_MMC_MISCON_ENABLE_EXT_LOOPBACK;
+		writel(mask, &priv->reg->venmiscctl);
+	}
+#endif
+
 	priv->version = readw(&priv->reg->hcver);
 	debug("host version = %x\n", priv->version);
 
Signature · 1 line
2.9.3
#3 lore raw

PATCH v4 2/3 mmc: tegra: allow disabling external clock loopback

Quoted 10 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Introduce CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK to disable the external clock loopback and use the internal one on SDMMC3 as per the SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits being set to 0xfffd according to the TRM.

Best Regards,
Jaehoon Chung

Quoted 80 lines

---

Changes in v4:
- Re-based.

Changes in v3: None
Changes in v2:
- Added Simon's reviewed-by.
- Added TODO(email) as suggested by Simon so it is clear this is temporary and will be moved to device tree controlled approach once proper kernel integration made it mainline.

 arch/arm/include/asm/arch-tegra/tegra_mmc.h |  2 ++
 drivers/mmc/Kconfig                         | 11 +++++++++++
 drivers/mmc/tegra_mmc.c                     | 16 ++++++++++++++++
 3 files changed, 29 insertions(+)
arch/arm/include/asm/arch-tegra/tegra_mmc.h +2 -0
index 64c848a..c40599a 100644
@@ -108,6 +108,8 @@ struct tegra_mmc {
 #define TEGRA_MMC_CLKCON_SDCLK_FREQ_SEL_SHIFT			8
 #define TEGRA_MMC_CLKCON_SDCLK_FREQ_SEL_MASK			(0xff << 8)
 
+#define TEGRA_MMC_MISCON_ENABLE_EXT_LOOPBACK			(1 << 17)
+
 #define TEGRA_MMC_SWRST_SW_RESET_FOR_ALL			(1 << 0)
 #define TEGRA_MMC_SWRST_SW_RESET_FOR_CMD_LINE			(1 << 1)
 #define TEGRA_MMC_SWRST_SW_RESET_FOR_DAT_LINE			(1 << 2)
drivers/mmc/Kconfig +11 -0
index ddef59a..3a6dcec 100644
@@ -345,6 +345,17 @@ config MMC_SUNXI
 
 endif
 
+config TEGRA124_MMC_DISABLE_EXT_LOOPBACK
+	bool "Disable external clock loopback"
+	depends on MMC_SDHCI_TEGRA && TEGRA124
+	help
+	  Disable the external clock loopback and use the internal one on SDMMC3
+	  as per the SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits
+	  being set to 0xfffd according to the TRM.
+
+	  TODO(marcel.ziswiler at toradex.com): Move to device tree controlled
+	  approach once proper kernel integration made it mainline.
+
 endmenu
 
 config SYS_FSL_ERRATUM_ESDHC111
drivers/mmc/tegra_mmc.c +16 -0
index 0df74ef..6c6affb 100644
@@ -513,6 +513,22 @@ static int tegra_mmc_init(struct mmc *mmc)
 
 	tegra_mmc_reset(priv, mmc);
 
+#if defined(CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK)
+	/*
+	 * Disable the external clock loopback and use the internal one on
+	 * SDMMC3 as per the SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1
+	 * bits being set to 0xfffd according to the TRM.
+	 *
+	 * TODO(marcel.ziswiler at toradex.com): Move to device tree controlled
+	 * approach once proper kernel integration made it mainline.
+	 */
+	if (priv->reg == (void *)0x700b0400) {
+		mask = readl(&priv->reg->venmiscctl);
+		mask &= ~TEGRA_MMC_MISCON_ENABLE_EXT_LOOPBACK;
+		writel(mask, &priv->reg->venmiscctl);
+	}
+#endif
+
 	priv->version = readw(&priv->reg->hcver);
 	debug("host version = %x\n", priv->version);
 
#4 lore raw

PATCH v4 3/3 apalis-tk1: disable external clock loopback on SDMMC3

In reply to Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

Actually make use of that shiny new CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK.

---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 configs/apalis-tk1_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/apalis-tk1_defconfig +1 -0
index 1c1d6df..4928551 100644
@@ -28,6 +28,7 @@ CONFIG_SPL_DM=y
 CONFIG_DFU_MMC=y
 CONFIG_DFU_RAM=y
 # CONFIG_DM_MMC_OPS is not set
+CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK=y
 CONFIG_E1000=y
 CONFIG_PCI=y
 CONFIG_DM_PCI=y
Signature · 1 line
2.9.3
#5 lore raw

v4 cover arm: tegra: apalis-tk1 and ext clock loopback

In reply to Marcel Ziswiler
Quoted 7 lines · Marcel Ziswiler

This series adds support for the Toradex Apalis TK1 and introduces a new option to disable the external clock loopback on SDMMC3.

The whole series is also available here:

http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-next

Quoted 14 lines

Changes in v4:
- Re-based.
- Drop patches 2 and 3:
mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig
in favor of commit 1d2c0506d31a9997e5ffc22e90942902f673b107
mmc: move more driver config options to Kconfig
from Masahiro.
- Meld patch 6
apalis-tk1: clean-up defconfig
into first one.
- Add distro boot fallback.
- Enable FIT and device tree overlay support.
- Explicitly drop EFI loader support.

Any particular reason for this?

Alex

#6 lore raw

v4 cover arm: tegra: apalis-tk1 and ext clock loopback

Hi Alex

Quoted 25 lines · Alexander Graf
Quoted 8 lines · Marcel Ziswiler

This series adds support for the Toradex Apalis TK1 and introduces a new
option to disable the external clock loopback on SDMMC3.

The whole series is also available here:

http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-next

Quoted 14 lines

Changes in v4:
- Re-based.
- Drop patches 2 and 3:
    mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
    mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig in favor of commit 1d2c0506d31a9997e5ffc22e90942902f673b107
    mmc: move more driver config options to Kconfig from Masahiro.
- Meld patch 6
    apalis-tk1: clean-up defconfig
  into first one.
- Add distro boot fallback.
- Enable FIT and device tree overlay support.
- Explicitly drop EFI loader support.

Quoted 1 line

Any particular reason for this?

Yes, a waste of 20K which on some of our modules is rather crucial. I personally think force enabling EFI for everything was not too smart an idea but whatever.

Quoted 1 line

Alex

Cheers

Marcel

#7 lore raw

v4 cover arm: tegra: apalis-tk1 and ext clock loopback

Quoted 28 lines · Marcel Ziswiler

Hi Alex

Quoted 25 lines · Alexander Graf
Quoted 22 lines · Marcel Ziswiler

This series adds support for the Toradex Apalis TK1 and introduces a new
option to disable the external clock loopback on SDMMC3.

The whole series is also available here:

http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-next

Changes in v4:
- Re-based.
- Drop patches 2 and 3:
mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig
in favor of commit 1d2c0506d31a9997e5ffc22e90942902f673b107
mmc: move more driver config options to Kconfig
from Masahiro.
- Meld patch 6
apalis-tk1: clean-up defconfig
into first one.
- Add distro boot fallback.
- Enable FIT and device tree overlay support.
- Explicitly drop EFI loader support.

Quoted 5 lines
Quoted 1 line

Any particular reason for this?

Yes, a waste of 20K which on some of our modules is rather crucial. I personally think force enabling EFI for everything was not too smart an idea but whatever.

Well, it's enabled by default for a good reason: Compatibility. I want to move to a world where people can just take a random distribution and expect it to work, rather than waste weeks over weeks on fiddling around with random BSPs that nobody really wants only to realize 2 years down the road that their security footprint is en par with a swiss cheese.

It's also the preferred option to boot BSD for example.

So how bad are the 20k for you? In fact, I'm surprised it's 20k at all - it used to be 10k. The overhead of DM should be much higher and I doubt you want to disable that ;). Usually a full U-Boot build is ~500k, so even at 20k we're talking about 4% - less than a compiler update usually gets you.

If size really is such a big concern, moving to THUMB code is going to buy you much more in storage savings than dropping (quite useful) UEFI support.

If however there are real technical issues with it, I'm happy to hear them and fix them as far as possible.

Alex

#8 lore raw

v4 cover arm: tegra: apalis-tk1 and ext clock loopback

Hi Alexander

Quoted 34 lines · Alexander Graf
Quoted 32 lines · Marcel Ziswiler

Hi Alex

Quoted 28 lines · Alexander Graf
Quoted 9 lines · Marcel Ziswiler

This series adds support for the Toradex Apalis TK1 and introduces
a new
option to disable the external clock loopback on SDMMC3.

The whole series is also available here:

http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-next

Quoted 15 lines

Changes in v4:
- Re-based.
- Drop patches 2 and 3:
    mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
    mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig in favor of commit 1d2c0506d31a9997e5ffc22e90942902f673b107
    mmc: move more driver config options to Kconfig from Masahiro.
- Meld patch 6
    apalis-tk1: clean-up defconfig
  into first one.
- Add distro boot fallback.
- Enable FIT and device tree overlay support.
- Explicitly drop EFI loader support.

Any particular reason for this?

Quoted 7 lines
Quoted 5 lines

Yes, a waste of 20K which on some of our modules is rather crucial. I
personally think force enabling EFI for everything was not too smart an
idea but whatever.

Well, it's enabled by default for a good reason: Compatibility.

While I do agree about compatibility I don't quite see what this has to do with EFI. I personally don't believe the BIOS/EFI disaster of the x86 world is worth copying to ARM, sorry. Other distributions like Fedora e.g. achieve the same with distro boot isn't it? After all isn't the device tree the agreed upon hardware description in the ARM world?

Quoted 5 lines

I want to move to a world where people can just take a random distribution and expect it to work, rather than waste weeks over weeks on fiddling around with random BSPs that nobody really wants only to realize 2 years down the road that their security footprint is en par with a swiss cheese.

Hey, nothing against Swiss cheese! And BTW the term Swiss cheese is about as nonsense as the term Linux. There is really a huge collection of different Swiss cheeses... Sorry, I just do get upset at times if certain countries gastronomy people do ask whether I want my sandwich with Swiss cheese wondering what they mean by that. But I guess those chaps now do have their very own issues (;-p).

Quoted 18 lines

It's also the preferred option to boot BSD for example.

So how bad are the 20k for you? In fact, I'm surprised it's 20k at all -
it used to be 10k. The overhead of DM should be much higher and I doubt
you want to disable that ;). Usually a full U-Boot build is ~500k, so
even at 20k we're talking about 4% - less than a compiler update usually
gets you.

If size really is such a big concern, moving to THUMB code is going to
buy you much more in storage savings than dropping (quite useful) UEFI
support.

Quoted 3 lines

If however there are real technical issues with it, I'm happy to hear
them and fix them as far as possible.

The technical issue is that I still don't quite see why U-Boot needs EFI. I stopped using SuSE more than 15 years ago and never regretted it, no pun intended.

But if it is really agreed upon mandatory to enable it I am happy to do so as I would love to finally get that thing in after an almost 4 months endeavour.

Quoted 1 line

Alex

Cheers

Marcel

#9 lore raw

v4 cover arm: tegra: apalis-tk1 and ext clock loopback

Quoted 43 lines · Marcel Ziswiler

Hi Alexander

Quoted 40 lines · Alexander Graf
Quoted 37 lines · Marcel Ziswiler

Hi Alex

Quoted 27 lines · Alexander Graf
Quoted 9 lines · Marcel Ziswiler

This series adds support for the Toradex Apalis TK1 and introduces
a new
option to disable the external clock loopback on SDMMC3.

The whole series is also available here:

http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-next

Quoted 15 lines

Changes in v4:
- Re-based.
- Drop patches 2 and 3:
mmc: tegra: move CONFIG_TEGRA_MMC from headers to
defconfigs
mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig
in favor of commit 1d2c0506d31a9997e5ffc22e90942902f673b107
mmc: move more driver config options to Kconfig
from Masahiro.
- Meld patch 6
apalis-tk1: clean-up defconfig
into first one.
- Add distro boot fallback.
- Enable FIT and device tree overlay support.
- Explicitly drop EFI loader support.

Quoted 1 line

Any particular reason for this?

Yes, a waste of 20K which on some of our modules is rather crucial. I
personally think force enabling EFI for everything was not too smart an
idea but whatever.

Quoted 6 lines
Quoted 1 line

Well, it's enabled by default for a good reason: Compatibility.

While I do agree about compatibility I don't quite see what this has to do with EFI. I personally don't believe the BIOS/EFI disaster of the x86 world is worth copying to ARM, sorry. Other distributions like Fedora e.g. achieve the same with distro boot isn't it? After all isn't

Fedora uses extlinux for 32bit ARM and UEFI for 64bit ARM. The main reason they're using extlinux is that at the point in time when they standardized on it as their preferred booting method, the UEFI implementation didn't exist yet.

Quoted 1 line

the device tree the agreed upon hardware description in the ARM world?

Yes, device tree is very much agree upon as hardware description! And with UEFI nothing changes in that regard. We still use device tree by default and unless you're really into shooting yourself into your own feet I don't see why you'd want to do it any differently.

This is not an ACPI vs DT discussion. It's really just about the question which entity controls selection and handover into the kernel.

With UEFI it's much easier to implement snapshot booting for example, because you can move all of that logic into a platform agnostic piece of code. It's the only supported way to have KASLR work on arm64. It allows for boot selection logic (A/B fallback for example) in something outside of a boot script or your boot loader sources, so that code stays reusable.

Take a look at my video at ELC for some rationale behind it:

https://www.youtube.com/watch?v=qJAkJ3nmWgM

Quoted 6 lines
Quoted 5 lines

I want to move to a world where people can just take a random distribution and expect it to work, rather than waste weeks over weeks on fiddling around with random BSPs that nobody really wants only to realize 2 years down the road that their security footprint is en par with a swiss cheese.

Quoted 6 lines

Hey, nothing against Swiss cheese! And BTW the term Swiss cheese is about as nonsense as the term Linux. There is really a huge collection of different Swiss cheeses... Sorry, I just do get upset at times if certain countries gastronomy people do ask whether I want my sandwich with Swiss cheese wondering what they mean by that. But I guess those chaps now do have their very own issues (;-p).

:)

Quoted 19 lines
Quoted 19 lines

It's also the preferred option to boot BSD for example.

So how bad are the 20k for you? In fact, I'm surprised it's 20k at all -
it used to be 10k. The overhead of DM should be much higher and I doubt
you want to disable that ;). Usually a full U-Boot build is ~500k, so
even at 20k we're talking about 4% - less than a compiler update usually
gets you.

If size really is such a big concern, moving to THUMB code is going to
buy you much more in storage savings than dropping (quite useful) UEFI
support.

Quoted 6 lines
Quoted 3 lines

If however there are real technical issues with it, I'm happy to hear
them and fix them as far as possible.

The technical issue is that I still don't quite see why U-Boot needs EFI. I stopped using SuSE more than 15 years ago and never regretted

For 32bit ARM it doesn't really "need" it. If you feel terribly strongly about it, I don't have hard feelings with leaving it out. But if it's really just a matter of taste rather than technical merit, I'd rather prefer to have the option available for users. The same reason you usually want to have distro boot support enabled and not just a hardcoded bootcmd line.

Quoted 5 lines

it, no pun intended.

But if it is really agreed upon mandatory to enable it I am happy to do so as I would love to finally get that thing in after an almost 4 months endeavour.

I'm not nacking this patch set, even with EFI_LOADER disabled. But I think that if there's no good reason to disable the feature, we should leave it enabled.

And if you really are size constrained with today's configuration, please enable thumb2, otherwise you will get bitten on random compiler updates down the road.

Thanks,

Alex

#10 lore raw

v4 cover arm: tegra: apalis-tk1 and ext clock loopback

Quoted 58 lines · Alexander Graf
Quoted 48 lines · Marcel Ziswiler

Hi Alexander

Quoted 36 lines · Alexander Graf
Quoted 34 lines · Marcel Ziswiler

Hi Alex

Quoted 30 lines · Alexander Graf
Quoted 10 lines · Marcel Ziswiler

This series adds support for the Toradex Apalis TK1 and introduces
a new
option to disable the external clock loopback on SDMMC3.

The whole series is also available here:

http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-n
ext

Quoted 16 lines

Changes in v4:
- Re-based.
- Drop patches 2 and 3:
    mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
    mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig in favor of commit 1d2c0506d31a9997e5ffc22e90942902f673b107
    mmc: move more driver config options to Kconfig from Masahiro.
- Meld patch 6
    apalis-tk1: clean-up defconfig
  into first one.
- Add distro boot fallback.
- Enable FIT and device tree overlay support.
- Explicitly drop EFI loader support.

Any particular reason for this?

Quoted 8 lines
Quoted 6 lines

Yes, a waste of 20K which on some of our modules is rather crucial.
I
personally think force enabling EFI for everything was not too smart an
idea but whatever.

Well, it's enabled by default for a good reason: Compatibility.

Quoted 7 lines

While I do agree about compatibility I don't quite see what this has to
do with EFI. I personally don't believe the BIOS/EFI disaster of the
x86 world is worth copying to ARM, sorry. Other distributions like Fedora e.g. achieve the same with distro boot isn't it? After all isn't

Quoted 4 lines

Fedora uses extlinux for 32bit ARM and UEFI for 64bit ARM. The main reason they're using extlinux is that at the point in time when they standardized on it as their preferred booting method, the UEFI implementation didn't exist yet.

It probably also will never work across all 32-bit ARM variants available out there.

Quoted 15 lines
Quoted 2 lines

the device tree the agreed upon hardware description in the ARM world?

Yes, device tree is very much agree upon as hardware description! And
with UEFI nothing changes in that regard. We still use device tree by
default and unless you're really into shooting yourself into your own
feet I don't see why you'd want to do it any differently.

This is not an ACPI vs DT discussion. It's really just about the question which entity controls selection and handover into the kernel.

Quoted 10 lines

With UEFI it's much easier to implement snapshot booting for example,
because you can move all of that logic into a platform agnostic piece of
code. It's the only supported way to have KASLR work on arm64. It allows
for boot selection logic (A/B fallback for example) in something outside
of a boot script or your boot loader sources, so that code stays reusable.

Another area which probably will never generically work across all hardware just because there are simply too many hardware variants out there in the 32-bit ARM world.

Quoted 3 lines

Take a look at my video at ELC for some rationale behind it:

   https://www.youtube.com/watch?v=qJAkJ3nmWgM

Yes, I have seen that one before and we were shaking our heads. But maybe it really is the way to go just like systemd is now ruling the world (;-p).

Quoted 52 lines
Quoted 8 lines
Quoted 7 lines

I want to move to a world where people can just take a random distribution and expect it to work, rather than waste weeks over weeks on fiddling around with random BSPs that nobody really wants
only to realize 2 years down the road that their security footprint
is en par with a swiss cheese.

Quoted 10 lines

Hey, nothing against Swiss cheese! And BTW the term Swiss cheese is about as nonsense as the term Linux. There is really a huge collection
of different Swiss cheeses... Sorry, I just do get upset at times if
certain countries gastronomy people do ask whether I want my sandwich
with Swiss cheese wondering what they mean by that. But I guess those
chaps now do have their very own issues (;-p).

:)

Quoted 22 lines
Quoted 22 lines

It's also the preferred option to boot BSD for example.

So how bad are the 20k for you? In fact, I'm surprised it's 20k at
all -
it used to be 10k. The overhead of DM should be much higher and I doubt
you want to disable that ;). Usually a full U-Boot build is ~500k,
so
even at 20k we're talking about 4% - less than a compiler update usually
gets you.

If size really is such a big concern, moving to THUMB code is going
to
buy you much more in storage savings than dropping (quite useful) UEFI
support.

Quoted 8 lines
Quoted 3 lines

If however there are real technical issues with it, I'm happy to hear
them and fix them as far as possible.

The technical issue is that I still don't quite see why U-Boot needs
EFI. I stopped using SuSE more than 15 years ago and never regretted

Quoted 9 lines

For 32bit ARM it doesn't really "need" it. If you feel terribly strongly
about it, I don't have hard feelings with leaving it out. But if it's
really just a matter of taste rather than technical merit, I'd rather
prefer to have the option available for users. The same reason you usually want to have distro boot support enabled and not just a hardcoded bootcmd line.

Uups, we still have it kind of hard coded by default but at least with a distro boot fall back.

Quoted 11 lines
Quoted 6 lines

it, no pun intended.

But if it is really agreed upon mandatory to enable it I am happy to do
so as I would love to finally get that thing in after an almost 4 months endeavour.

I'm not nacking this patch set, even with EFI_LOADER disabled. But I think that if there's no good reason to disable the feature, we should
leave it enabled.

OK, I will send a V5 which does not explicitly disable it.

Quoted 4 lines

And if you really are size constrained with today's configuration, please enable thumb2, otherwise you will get bitten on random compiler
updates down the road.

Unfortunately the platforms I have that are space constrained do not support any such but again those probably won't ever run any regular distro neither.

Quoted 1 line

Thanks,

Thank you.

Quoted 1 line

Alex

Cheers

Marcel

#11 lore raw

v4 cover arm: tegra: apalis-tk1 and ext clock loopback

Hi,

Quoted 177 lines · Marcel Ziswiler
Quoted 58 lines · Alexander Graf
Quoted 48 lines · Marcel Ziswiler

Hi Alexander

Quoted 36 lines · Alexander Graf
Quoted 34 lines · Marcel Ziswiler

Hi Alex

Quoted 30 lines · Alexander Graf
Quoted 10 lines · Marcel Ziswiler

This series adds support for the Toradex Apalis TK1 and introduces
a new
option to disable the external clock loopback on SDMMC3.

The whole series is also available here:

http://git.toradex.com/cgit/u-boot-toradex.git/log/?h=for-n
ext

Quoted 16 lines

Changes in v4:
- Re-based.
- Drop patches 2 and 3:
mmc: tegra: move CONFIG_TEGRA_MMC from headers to
defconfigs
mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig
in favor of commit
1d2c0506d31a9997e5ffc22e90942902f673b107
mmc: move more driver config options to Kconfig
from Masahiro.
- Meld patch 6
apalis-tk1: clean-up defconfig
into first one.
- Add distro boot fallback.
- Enable FIT and device tree overlay support.
- Explicitly drop EFI loader support.

Any particular reason for this?

Quoted 8 lines
Quoted 6 lines

Yes, a waste of 20K which on some of our modules is rather crucial.
I
personally think force enabling EFI for everything was not too smart an
idea but whatever.

Well, it's enabled by default for a good reason: Compatibility.

Quoted 7 lines

While I do agree about compatibility I don't quite see what this has to
do with EFI. I personally don't believe the BIOS/EFI disaster of the
x86 world is worth copying to ARM, sorry. Other distributions like Fedora e.g. achieve the same with distro boot isn't it? After all isn't

Quoted 4 lines

Fedora uses extlinux for 32bit ARM and UEFI for 64bit ARM. The main reason they're using extlinux is that at the point in time when they standardized on it as their preferred booting method, the UEFI implementation didn't exist yet.

It probably also will never work across all 32-bit ARM variants available out there.

Quoted 15 lines
Quoted 2 lines

the device tree the agreed upon hardware description in the ARM world?

Yes, device tree is very much agree upon as hardware description! And
with UEFI nothing changes in that regard. We still use device tree by
default and unless you're really into shooting yourself into your own
feet I don't see why you'd want to do it any differently.

This is not an ACPI vs DT discussion. It's really just about the question which entity controls selection and handover into the kernel.

Quoted 10 lines

With UEFI it's much easier to implement snapshot booting for example,
because you can move all of that logic into a platform agnostic piece of
code. It's the only supported way to have KASLR work on arm64. It allows
for boot selection logic (A/B fallback for example) in something outside
of a boot script or your boot loader sources, so that code stays reusable.

Another area which probably will never generically work across all hardware just because there are simply too many hardware variants out there in the 32-bit ARM world.

Quoted 3 lines

Take a look at my video at ELC for some rationale behind it:

https://www.youtube.com/watch?v=qJAkJ3nmWgM

Yes, I have seen that one before and we were shaking our heads. But maybe it really is the way to go just like systemd is now ruling the world (;-p).

Quoted 52 lines
Quoted 8 lines
Quoted 7 lines

I want to move to a world where people can just take a random distribution and expect it to work, rather than waste weeks over weeks on fiddling around with random BSPs that nobody really wants
only to realize 2 years down the road that their security footprint
is en par with a swiss cheese.

Quoted 10 lines

Hey, nothing against Swiss cheese! And BTW the term Swiss cheese is about as nonsense as the term Linux. There is really a huge collection
of different Swiss cheeses... Sorry, I just do get upset at times if
certain countries gastronomy people do ask whether I want my sandwich
with Swiss cheese wondering what they mean by that. But I guess those
chaps now do have their very own issues (;-p).

:)

Quoted 22 lines
Quoted 22 lines

It's also the preferred option to boot BSD for example.

So how bad are the 20k for you? In fact, I'm surprised it's 20k at
all -
it used to be 10k. The overhead of DM should be much higher and I doubt
you want to disable that ;). Usually a full U-Boot build is ~500k,
so
even at 20k we're talking about 4% - less than a compiler update usually
gets you.

If size really is such a big concern, moving to THUMB code is going
to
buy you much more in storage savings than dropping (quite useful) UEFI
support.

Quoted 8 lines
Quoted 3 lines

If however there are real technical issues with it, I'm happy to hear
them and fix them as far as possible.

The technical issue is that I still don't quite see why U-Boot needs
EFI. I stopped using SuSE more than 15 years ago and never regretted

Quoted 9 lines

For 32bit ARM it doesn't really "need" it. If you feel terribly strongly
about it, I don't have hard feelings with leaving it out. But if it's
really just a matter of taste rather than technical merit, I'd rather
prefer to have the option available for users. The same reason you usually want to have distro boot support enabled and not just a hardcoded bootcmd line.

Uups, we still have it kind of hard coded by default but at least with a distro boot fall back.

Quoted 7 lines
Quoted 6 lines

it, no pun intended.

But if it is really agreed upon mandatory to enable it I am happy to do
so as I would love to finally get that thing in after an almost 4 months endeavour.

Quoted 6 lines
Quoted 4 lines

I'm not nacking this patch set, even with EFI_LOADER disabled. But I think that if there's no good reason to disable the feature, we should
leave it enabled.

OK, I will send a V5 which does not explicitly disable it.

It's your board, I don't see why you can't disable it.

Quoted 9 lines
Quoted 5 lines

And if you really are size constrained with today's configuration, please enable thumb2, otherwise you will get bitten on random compiler
updates down the road.

Unfortunately the platforms I have that are space constrained do not support any such but again those probably won't ever run any regular distro neither.

We certainly should not mandate EFI support in U-Boot :-( I think it's a nice idea if you have to use EFI/grub on your system though. A great way to get past the legacy problem.

Anyway, the video looks interesting - are the slides available somewhere? I'd really like to see how this is presented.

Regards,
Simon

#12 lore raw

v4 cover arm: tegra: apalis-tk1 and ext clock loopback

Quoted 4 lines · Simon Glass

Hi,

On 24 March 2017 at 17:52, Marcel Ziswiler <[email protected]> wrote:

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

And if you really are size constrained with today's configuration, please enable thumb2, otherwise you will get bitten on random compiler
updates down the road.

Unfortunately the platforms I have that are space constrained do not support any such but again those probably won't ever run any regular distro neither.

We certainly should not mandate EFI support in U-Boot :-(

I don't think anyone mandates EFI support. I merely asked for reasoning why it was explicitly disabled - with a preference not to have it disabled, but that's by no means a mandate :).

Quoted 6 lines

I think it's
a nice idea if you have to use EFI/grub on your system though. A great way to get past the legacy problem.

Anyway, the video looks interesting - are the slides available somewhere? I'd really like to see how this is presented.

The slides should be on the ELC web site, yes:

http://events.linuxfoundation.org/sites/events/files/slides/Marrying%20U-Boot%2C%20UEFI%20and%20grub.pdf

They're presented using keynote on a Mac. I haven't found anything remotely as comfortable for creating presentations anywhere else :).

Alex