arm: tegra: apalis-tk1, mmc and ext clock loopback
cover arm: tegra: apalis-tk1, mmc and ext clock loopback
From: Marcel Ziswiler <[email protected]>
This series adds support for the Toradex Apalis TK1 as well as moves the CONFIG_TEGRA_MMC to Kconfig 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
Marcel Ziswiler (5):
arm: tegra: initial support for apalis tk1
mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig
mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
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 | 55 + configs/apalis_t30_defconfig | 1 + configs/beaver_defconfig | 1 + configs/cardhu_defconfig | 1 + configs/cei-tk1-som_defconfig | 1 + configs/colibri_t20_defconfig | 1 + configs/colibri_t30_defconfig | 1 + configs/dalmore_defconfig | 1 + configs/harmony_defconfig | 1 + configs/jetson-tk1_defconfig | 1 + configs/medcom-wide_defconfig | 1 + configs/nyan-big_defconfig | 1 + configs/paz00_defconfig | 1 + configs/plutux_defconfig | 1 + configs/seaboard_defconfig | 1 + configs/tec-ng_defconfig | 1 + configs/tec_defconfig | 1 + configs/trimslice_defconfig | 1 + configs/venice2_defconfig | 1 + configs/ventana_defconfig | 1 + configs/whistler_defconfig | 1 + drivers/mmc/Kconfig | 14 + drivers/mmc/tegra_mmc.c | 13 + include/configs/apalis-tk1.h | 180 ++ include/configs/apalis_t30.h | 1 - include/configs/beaver.h | 1 - include/configs/cardhu.h | 1 - include/configs/cei-tk1-som.h | 1 - include/configs/colibri_t20.h | 1 - include/configs/colibri_t30.h | 1 - include/configs/dalmore.h | 1 - include/configs/e2220-1170.h | 1 - include/configs/harmony.h | 1 - include/configs/jetson-tk1.h | 1 - include/configs/medcom-wide.h | 1 - include/configs/nyan-big.h | 1 - include/configs/p2371-0000.h | 1 - include/configs/p2371-2180.h | 1 - include/configs/p2571.h | 1 - include/configs/p2771-0000.h | 1 - include/configs/paz00.h | 1 - include/configs/plutux.h | 1 - include/configs/seaboard.h | 1 - include/configs/tec-ng.h | 1 - include/configs/tec.h | 1 - include/configs/trimslice.h | 1 - include/configs/venice2.h | 1 - include/configs/ventana.h | 1 - include/configs/whistler.h | 1 - scripts/config_whitelist.txt | 1 - 61 files changed, 3157 insertions(+), 26 deletions(-) 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 1/5 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)
---
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 | 53 + include/configs/apalis-tk1.h | 181 ++ 12 files changed, 3107 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
@@ -57,6 +57,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 CPU_V7_HAS_NONSEC
@@ -42,5 +48,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 +53 -0
53 lines not on this page · raw message
include/configs/apalis-tk1.h new file +181 -0
57 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 2/5 mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
---
drivers/mmc/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/mmc/Kconfig +6 -0
@@ -95,4 +95,10 @@ config SANDBOX_MMC improves build coverage for sandbox and makes it easier to detect MMC build errors with sandbox. +config TEGRA_MMC + bool "Tegra SDHCI aka MMC support" + depends on DM_MMC && TEGRA + help + This selects support for SDHCI on Tegra SoCs. + endmenu
Signature · 1 line
2.9.3
PATCH 3/5 mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
In reply to Marcel ZiswilerFrom: Marcel Ziswiler <[email protected]>
Basically running the following script:
tools/moveconfig.py CONFIG_TEGRA_MMC
Note that I left the SPL specific handling ininclude/configs/tegra-common-post.h unchanged.
---
configs/apalis-tk1_defconfig | 1 + configs/apalis_t30_defconfig | 1 + configs/beaver_defconfig | 1 + configs/cardhu_defconfig | 1 + configs/cei-tk1-som_defconfig | 1 + configs/colibri_t20_defconfig | 1 + configs/colibri_t30_defconfig | 1 + configs/dalmore_defconfig | 1 + configs/harmony_defconfig | 1 + configs/jetson-tk1_defconfig | 1 + configs/medcom-wide_defconfig | 1 + configs/nyan-big_defconfig | 1 + configs/paz00_defconfig | 1 + configs/plutux_defconfig | 1 + configs/seaboard_defconfig | 1 + configs/tec-ng_defconfig | 1 + configs/tec_defconfig | 1 + configs/trimslice_defconfig | 1 + configs/venice2_defconfig | 1 + configs/ventana_defconfig | 1 + configs/whistler_defconfig | 1 + include/configs/apalis-tk1.h | 1 - include/configs/apalis_t30.h | 1 - include/configs/beaver.h | 1 - include/configs/cardhu.h | 1 - include/configs/cei-tk1-som.h | 1 - include/configs/colibri_t20.h | 1 - include/configs/colibri_t30.h | 1 - include/configs/dalmore.h | 1 - include/configs/e2220-1170.h | 1 - include/configs/harmony.h | 1 - include/configs/jetson-tk1.h | 1 - include/configs/medcom-wide.h | 1 - include/configs/nyan-big.h | 1 - include/configs/p2371-0000.h | 1 - include/configs/p2371-2180.h | 1 - include/configs/p2571.h | 1 - include/configs/p2771-0000.h | 1 - include/configs/paz00.h | 1 - include/configs/plutux.h | 1 - include/configs/seaboard.h | 1 - include/configs/tec-ng.h | 1 - include/configs/tec.h | 1 - include/configs/trimslice.h | 1 - include/configs/venice2.h | 1 - include/configs/ventana.h | 1 - include/configs/whistler.h | 1 - scripts/config_whitelist.txt | 1 - 48 files changed, 21 insertions(+), 27 deletions(-)
configs/apalis-tk1_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y
configs/apalis_t30_defconfig +1 -0
@@ -34,6 +34,7 @@ CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y
configs/beaver_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DFU_SF=y # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_RTL8169=y
configs/cardhu_defconfig +1 -0
@@ -32,6 +32,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_RTL8169=y
configs/cei-tk1-som_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DFU_SF=y # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_RTL8169=y
configs/colibri_t20_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_DM_PMIC=y CONFIG_DM_REGULATOR=y
configs/colibri_t30_defconfig +1 -0
@@ -34,6 +34,7 @@ CONFIG_SPL_DM=y CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_DM_USB=y
configs/dalmore_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DFU_SF=y # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_SYS_NS16550=y
configs/harmony_defconfig +1 -0
@@ -30,6 +30,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_PCI=y CONFIG_DM_PCI=y CONFIG_DM_PCI_COMPAT=y
configs/jetson-tk1_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DFU_SF=y # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_RTL8169=y
configs/medcom-wide_defconfig +1 -0
@@ -31,6 +31,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_DM_PMIC=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y
configs/nyan-big_defconfig +1 -0
@@ -45,6 +45,7 @@ CONFIG_CROS_EC_KEYB=y CONFIG_CROS_EC=y CONFIG_CROS_EC_SPI=y # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_DM_PMIC=y
configs/paz00_defconfig +1 -0
@@ -30,6 +30,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_DM_PMIC=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y
configs/plutux_defconfig +1 -0
@@ -30,6 +30,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_DM_USB=y
configs/seaboard_defconfig +1 -0
@@ -30,6 +30,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_DM_PMIC=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y
configs/tec-ng_defconfig +1 -0
@@ -33,6 +33,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_SYS_NS16550=y
configs/tec_defconfig +1 -0
@@ -31,6 +31,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_DM_PMIC=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y
configs/trimslice_defconfig +1 -0
@@ -32,6 +32,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_RTL8169=y
configs/venice2_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y CONFIG_DFU_SF=y # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y CONFIG_SYS_NS16550=y
configs/ventana_defconfig +1 -0
@@ -29,6 +29,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_DM_PMIC=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y
configs/whistler_defconfig +1 -0
@@ -30,6 +30,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_SPL_DM=y # CONFIG_BLK is not set # CONFIG_DM_MMC_OPS is not set +CONFIG_TEGRA_MMC=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_DM_USB=y
include/configs/apalis-tk1.h +0 -1
@@ -31,7 +31,6 @@/* SD/MMC support */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC #define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */ /* Environment in eMMC, before config block at the end of 1st "boot sector" */
include/configs/apalis_t30.h +0 -1
@@ -30,7 +30,6 @@/* SD/MMC support */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, before config block at the end of 1st "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/beaver.h +0 -1
@@ -30,7 +30,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/cardhu.h +0 -1
@@ -33,7 +33,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/cei-tk1-som.h +0 -1
@@ -32,7 +32,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/colibri_t20.h +0 -1
@@ -29,7 +29,6 @@/* SD/MMC support */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* USB host support */ #define CONFIG_USB_EHCI
include/configs/colibri_t30.h +0 -1
@@ -30,7 +30,6 @@/* SD/MMC support */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, before config block at the end of 1st "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/dalmore.h +0 -1
@@ -26,7 +26,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/e2220-1170.h +0 -1
@@ -24,7 +24,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/harmony.h +0 -1
@@ -29,7 +29,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* NAND support */ #define CONFIG_CMD_NAND
include/configs/jetson-tk1.h +0 -1
@@ -28,7 +28,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/medcom-wide.h +0 -1
@@ -22,7 +22,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* NAND support */ #define CONFIG_CMD_NAND
include/configs/nyan-big.h +0 -1
@@ -27,7 +27,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/p2371-0000.h +0 -1
@@ -24,7 +24,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/p2371-2180.h +0 -1
@@ -24,7 +24,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/p2571.h +0 -1
@@ -25,7 +25,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/p2771-0000.h +0 -1
@@ -20,7 +20,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/paz00.h +0 -1
@@ -25,7 +25,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/plutux.h +0 -1
@@ -22,7 +22,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* NAND support */ #define CONFIG_CMD_NAND
include/configs/seaboard.h +0 -1
@@ -34,7 +34,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/tec-ng.h +0 -1
@@ -23,7 +23,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/tec.h +0 -1
@@ -22,7 +22,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* NAND support */ #define CONFIG_CMD_NAND
include/configs/trimslice.h +0 -1
@@ -30,7 +30,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in SPI */ #define CONFIG_ENV_IS_IN_SPI_FLASH
include/configs/venice2.h +0 -1
@@ -25,7 +25,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/ventana.h +0 -1
@@ -23,7 +23,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* Environment in eMMC, at the end of 2nd "boot sector" */ #define CONFIG_ENV_IS_IN_MMC
include/configs/whistler.h +0 -1
@@ -27,7 +27,6 @@/* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA_MMC /* * Environment in eMMC, at the end of 2nd "boot sector". Note: This assumes
scripts/config_whitelist.txt +0 -1
@@ -7913,7 +7913,6 @@ CONFIG_TEGRA_ENABLE_UARTE CONFIG_TEGRA_GPU CONFIG_TEGRA_KEYBOARD CONFIG_TEGRA_LP0 -CONFIG_TEGRA_MMC CONFIG_TEGRA_NAND CONFIG_TEGRA_PMU CONFIG_TEGRA_SLINK_CTRLS
Signature · 1 line
2.9.3
PATCH 4/5 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.
---
arch/arm/include/asm/arch-tegra/tegra_mmc.h | 2 ++ drivers/mmc/Kconfig | 8 ++++++++ drivers/mmc/tegra_mmc.c | 13 +++++++++++++ 3 files changed, 23 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 +8 -0
@@ -101,4 +101,12 @@ config TEGRA_MMC help This selects support for SDHCI on Tegra SoCs. +config TEGRA124_MMC_DISABLE_EXT_LOOPBACK + bool "Disable external clock loopback" + depends on TEGRA_MMC && 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. + endmenu
drivers/mmc/tegra_mmc.c +13 -0
@@ -511,6 +511,19 @@ 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. +*/ +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 5/5 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.
---
configs/apalis-tk1_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/apalis-tk1_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y # CONFIG_DM_MMC_OPS is not set CONFIG_TEGRA_MMC=y +CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK=y CONFIG_E1000=y CONFIG_PCI=y CONFIG_DM_PCI=y
Signature · 1 line
2.9.3
PATCH 1/5 arm: tegra: initial support for apalis tk1
In reply to Marcel ZiswilerQuoted 41 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]>---
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 | 53 + include/configs/apalis-tk1.h | 181 ++ 12 files changed, 3107 insertions(+) create mode 100644 arch/arm/dts/tegra124-apalis.dts create mode 100644 board/toradex/apalis-tk1/Kconfig
Quoted 8 lines
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
PATCH 2/5 mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig
In reply to Marcel ZiswilerQuoted 8 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Signed-off-by Marcel Ziswiler <[email protected]>---
drivers/mmc/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)
But how about adding more help text? What versions of MMC/SD does it support? What bus speed and width?
Quoted 16 lines
drivers/mmc/Kconfig +6
-1@@ -95,4 +95,10 @@ config SANDBOX_MMC improves build coverage for sandbox and makes it easier to detect MMC build errors with sandbox. +config TEGRA_MMC + bool "Tegra SDHCI aka MMC support" + depends on DM_MMC && TEGRA + help + This selects support for SDHCI on Tegra SoCs. + endmenu --
Quoted 2 lines
2.9.3
Regards,
Simon
PATCH 3/5 mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
In reply to Marcel ZiswilerQuoted 11 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Basically running the following script:
tools/moveconfig.pyCONFIG_TEGRA_MMCNote that I left the SPL specific handling in
include/configs/tegra-common-post.hunchanged.Signed-off-by Marcel Ziswiler <[email protected]>---
But can you please look at converting tegra to use CONFIG_BLK and CONFIG_DM_MMC_OPS? It should be easy enough. Tegra is only one of two SoCs with this problem I think.
Regards,
Simon
PATCH 4/5 mmc: tegra: allow disabling external clock loopback
In reply to Marcel ZiswilerHi Marcel,
Quoted 6 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Introduce
CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACKto disable the external clock loopback and use the internal one on SDMMC3 as per theSDMMC_VENDOR_MISC_CNTRL_0register'sSDMMC_SPARE1bits being set to0xfffdaccording to the TRM.
Quoted 7 lines
Signed-off-by Marcel Ziswiler <[email protected]>---
arch/arm/include/asm/arch-tegra/tegra_mmc.h | 2 ++ drivers/mmc/Kconfig | 8 ++++++++ drivers/mmc/tegra_mmc.c | 13 +++++++++++++ 3 files changed, 23 insertions(+)
This should be controlled by the device tree, shouldn't it?
Regards,
Simon
PATCH 2/5 mmc: tegra: introduce CONFIG_TEGRA_MMC to Kconfig
In reply to Simon GlassQuoted 4 lines · Simon Glass
Quoted 2 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Quoted 8 lines
Quoted 6 lines
Signed-off-by Marcel Ziswiler <[email protected]>---
drivers/mmc/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+)Reviewed-by Simon Glass <[email protected]>
Thanks!
Quoted 1 line
But how about adding more help text?
I don't recall others indicating that much more help text to be honest.
Quoted 1 line
What versions of MMC/SD does it support What bus speed and width?
Good question. I guess the same as before which is highly SoC specific plus U-Boot won't be doing any higher speed modes requiring voltage switching as far as I know. To be honest I'm not even sure U-Boot's MMC stack would even support any such at all.
Quoted 9 lines
drivers/mmc/Kconfig config SANDBOX_MMC · line 95
Quoted 6 lines
drivers/mmc/Kconfig +0
-0@@ -95,4 +95,10 @@ config SANDBOX_MMC improves build coverage for sandbox and makes it easier todetect
Quoted 2 lines
drivers/mmc/Kconfig +0
-0MMC build errors with sandbox.
Quoted 13 lines
Quoted 10 lines
drivers/mmc/Kconfig +6
-1+config TEGRA_MMC + bool "Tegra SDHCI aka MMC support" + depends on DM_MMC && TEGRA + help + This selects support for SDHCI on Tegra SoCs. + endmenu --2.9.3
Regards,
Simon
Cheers
Marcel
PATCH 3/5 mmc: tegra: move CONFIG_TEGRA_MMC from headers to defconfigs
In reply to Simon GlassQuoted 8 lines · Simon Glass
Quoted 6 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Basically running the following script:
tools/moveconfig.pyCONFIG_TEGRA_MMC
Quoted 7 lines
Quoted 5 lines
Note that I left the SPL specific handling in
include/configs/tegra-common-post.hunchanged.Signed-off-by Marcel Ziswiler <[email protected]>---
Reviewed-by Simon Glass <[email protected]>
Thanks!
Quoted 3 lines
But can you please look at converting tegra to use
CONFIG_BLKandCONFIG_DM_MMC_OPS? It should be easy enough. Tegra is only one of two SoCs with this problem I think.
I can sure look into it but it's the first time I ever even heard about any of this.
Quoted 2 lines
Regards,
Simon
Cheers
Marcel
PATCH 4/5 mmc: tegra: allow disabling external clock loopback
In reply to Simon GlassQuoted 16 lines · Simon Glass
Hi Marcel,
Quoted 3 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Introduce
CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACKto disable theexternal clock
Quoted 1 line
loopback and use the internal one on SDMMC3 as per the
SDMMC_VENDOR_MISC_CNTRL_0Quoted 1 line
register's
SDMMC_SPARE1bits being set to0xfffdaccording to theTRM.
Quoted 4 lines
Signed-off-by Marcel Ziswiler <[email protected]>---
Quoted 6 lines
Quoted 4 lines
arch/arm/include/asm/arch-tegra/tegra_mmc.h | 2 ++ drivers/mmc/Kconfig | 8 ++++++++ drivers/mmc/tegra_mmc.c | 13 +++++++++++++ 3 files changed, 23 insertions(+)This should be controlled by the device tree, shouldn't it?
Glad you brought it up. So far NVIDIA hasn't even acknowledged that they completely seriously screwed this one up big time. Unlike their PCIe bug I reported which eventually did make it to the errata... Anyway, my hopes were kind of to sneak this one into U-Boot first, then work on a proper kernel integration probably involving device tree integration and only in a later third step maybe updating this in U-Boot again.
Quoted 2 lines
Regards,
Simon
Cheers
Marcel
PATCH 4/5 mmc: tegra: allow disabling external clock loopback
Quoted 19 lines · Marcel Ziswiler
Quoted 16 lines · Simon Glass
Hi Marcel,
Quoted 3 lines · Marcel Ziswiler
From: Marcel Ziswiler <[email protected]>
Introduce
CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACKto disable theexternal clock
Quoted 1 line
loopback and use the internal one on SDMMC3 as per the
SDMMC_VENDOR_MISC_CNTRL_0Quoted 1 line
register's
SDMMC_SPARE1bits being set to0xfffdaccording to theTRM.
Quoted 4 lines
Signed-off-by Marcel Ziswiler <[email protected]>---
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
arch/arm/include/asm/arch-tegra/tegra_mmc.h | 2 ++ drivers/mmc/Kconfig | 8 ++++++++ drivers/mmc/tegra_mmc.c | 13 +++++++++++++ 3 files changed, 23 insertions(+)This should be controlled by the device tree, shouldn't it?
Glad you brought it up. So far NVIDIA hasn't even acknowledged that they completely seriously screwed this one up big time. Unlike their PCIe bug I reported which eventually did make it to the errata... Anyway, my hopes were kind of to sneak this one into U-Boot first, then work on a proper kernel integration probably involving device tree integration and only in a later third step maybe updating this in U-Boot again.
OK, please can you add a TODO(email) in there so it is clear this is temporary?