arm: tegra: apalis-tk1 and ext clock loopback
v5 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 v5:
- Re-enabled EFI loader support after discussion with Alexander.
- Added Jaehoon's acked-by.
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 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 | 47 + drivers/mmc/Kconfig | 11 + drivers/mmc/tegra_mmc.c | 16 + include/configs/apalis-tk1.h | 176 ++ 15 files changed, 3125 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
PATCH v5 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 v5:
- Re-enabled EFI loader support after discussion with Alexander.
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 | 46 + include/configs/apalis-tk1.h | 176 ++ 12 files changed, 3095 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 +46 -0
46 lines not on this page · raw message
include/configs/apalis-tk1.h new file +176 -0
64 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.
PATCH v5 1/3 arm: tegra: initial support for apalis tk1
Hi Marcel,
Quoted 22 lines · Marcel Ziswiler
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)
Quoted 8 lines
Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Simon Glass <[email protected]>Signed-off-by Marcel Ziswiler <[email protected]>---
Changes in v5:
- Re-enabled EFI loader support after discussion with Alexander.
Well OK, either way is fine with me.
Regards,
Simon
PATCH v5 1/3 arm: tegra: initial support for apalis tk1
Quoted 35 lines · Simon Glass
Hi Marcel,
Quoted 31 lines · Marcel Ziswiler
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)Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Simon Glass <[email protected]>
Quoted 7 lines
Quoted 5 lines
Signed-off-by Marcel Ziswiler <[email protected]>---
Changes in v5:
- Re-enabled EFI loader support after discussion with Alexander.Well OK, either way is fine with me.
Thanks, Simon.
Do you happen to know whether anybody will actually pick that series up and apply it any time soon?
Quoted 2 lines
Regards,
Simon
PATCH v5 1/3 arm: tegra: initial support for apalis tk1
Marcel,
u-boot-tegra is my repo, I've been monitoring the discussion here to see if any more changes were in-bound.
I'll apply your 3 v5 patches on Monday and post a new u-boot-tegra/master if it all looks good (applies cleanly, all Tegra boards build OK).
Thanks,
Tom
Quoted 51 lines
-----Original Message-----
From: Marcel Ziswiler [mailto:marcel.ziswiler at toradex.com]
Sent: Saturday, April 01, 2017 1:18 PM
To: sjg at chromium.org
Cc: jh80.chung at samsung.com; Peter.Chubb at data61.csiro.au; Tom Warren <[email protected]>; hdegoede at redhat.com; agraf at suse.de; u- boot at lists.denx.de; Stephen Warren <[email protected]>; york.sun at nxp.com; Max Krummenacher <[email protected]>; hs at denx.de; yamada.masahiro at socionext.com; jagan at amarulasolutions.com; lokeshvutla at ti.com; albert.u.boot at aribaud.net; Stefan Agner <[email protected]>
Subject: Re: [PATCH v5 1/3] arm: tegra: initial support for apalis tk1Quoted 37 lines · Simon Glass
Hi Marcel,
Quoted 32 lines · Marcel Ziswiler
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)Signed-off-by Marcel Ziswiler <[email protected]>Reviewed-by Simon Glass <[email protected]>Signed-off-by Marcel Ziswiler <[email protected]>---
Changes in v5:
- Re-enabled EFI loader support after discussion with Alexander.
Quoted 9 lines
Quoted 1 line
Well OK, either way is fine with me.
Thanks, Simon.
Do you happen to know whether anybody will actually pick that series up and apply it any time soon?
Quoted 2 lines
Regards,
Simon
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
PATCH v5 2/3 mmc: tegra: allow disabling external clock loopback
In reply to Marcel ZiswilerFrom: 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 v5:
- Added Jaehoon's acked-by.
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
@@ -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
@@ -367,6 +367,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
@@ -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
PATCH v5 3/3 apalis-tk1: disable external clock loopback on SDMMC3
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Actually make use of that shiny new CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK.
---
Changes in v5: None
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
@@ -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
v5 cover arm: tegra: apalis-tk1 and ext clock loopback
In reply to Marcel ZiswilerQuoted 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
Changes in v5:
- Re-enabled EFI loader support after discussion with Alexander.
Thanks :)
Alex