t210: miscellaneous patches
Subsystems (3)
cover t210: miscellaneous patches
From: Tom Warren <[email protected]>
These patches change some PLL power sequencing, remove pinmuxing and GPIO init on T210, and adjust some load addresses to allow for larger kernels.
JC Kuo (1):
t210: do not enable PLLE and UPHY PLL HW PWRSEQ
Tom Warren (2):
t210: Adjust ramdisk_addr_r/fdt_addr_r to allow for large kernels
t210: pinmux: Remove pinmux/GPIO init from T210 boards
arch/arm/cpu/armv8/cpu.c | 5 + arch/arm/include/asm/arch-tegra/xusb-padctl.h | 1 + arch/arm/mach-tegra/board2.c | 6 + arch/arm/mach-tegra/tegra210/Makefile | 3 +- arch/arm/mach-tegra/tegra210/clock.c | 19 -- arch/arm/mach-tegra/tegra210/pinmux.c | 194 -------------- arch/arm/mach-tegra/tegra210/xusb-padctl.c | 68 +++-- arch/arm/mach-tegra/xusb-padctl-dummy.c | 4 + board/nvidia/e2220-1170/e2220-1170.c | 21 +- board/nvidia/e2220-1170/pinmux-config-e2220-1170.h | 276 -------------------- board/nvidia/p2371-0000/p2371-0000.c | 21 +- board/nvidia/p2371-0000/pinmux-config-p2371-0000.h | 267 -------------------- board/nvidia/p2371-2180/p2371-2180.c | 21 +- board/nvidia/p2371-2180/pinmux-config-p2371-2180.h | 278 --------------------- board/nvidia/p2571/p2571.c | 21 +- board/nvidia/p2571/pinmux-config-p2571.h | 242 ------------------ include/configs/tegra210-common.h | 4 +- 17 files changed, 66 insertions(+), 1385 deletions(-) delete mode 100644 arch/arm/mach-tegra/tegra210/pinmux.c delete mode 100644 board/nvidia/e2220-1170/pinmux-config-e2220-1170.h delete mode 100644 board/nvidia/p2371-0000/pinmux-config-p2371-0000.h delete mode 100644 board/nvidia/p2371-2180/pinmux-config-p2371-2180.h delete mode 100644 board/nvidia/p2571/pinmux-config-p2571.h
Signature · 9 lines
1.8.2.1.610.g562af5b ----------------------------------------------------------------------------------- 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 1/3 t210: do not enable PLLE and UPHY PLL HW PWRSEQ
From: JC Kuo <[email protected]>
This commit removes the programming sequence that enables PLLE and UPHY PLL hardware power sequencers. Per TRM, boot software should enable PLLE and UPHY PLLs in software controlled power-on state and should power down PLL before jumping into kernel or the next stage boot software.
Adds call to board_cleanup_before_linux to facilitate this.
--- arch/arm/cpu/armv8/cpu.c | 5 ++ arch/arm/include/asm/arch-tegra/xusb-padctl.h | 1 + arch/arm/mach-tegra/board2.c | 6 +++ arch/arm/mach-tegra/tegra210/clock.c | 19 -------- arch/arm/mach-tegra/tegra210/xusb-padctl.c | 68 +++++++++++++++++---------- arch/arm/mach-tegra/xusb-padctl-dummy.c | 4 ++ 6 files changed, 59 insertions(+), 44 deletions(-)
arch/arm/cpu/armv8/cpu.c +5 -0
@@ -32,6 +32,8 @@ void sdelay(unsigned long loops) "b.ne 1b" : "=r" (loops) : "0"(loops) : "cc"); } +void __weak board_cleanup_before_linux (void ){} +int cleanup_before_linux (void ) {/*
@@ -40,6 +42,9 @@ int cleanup_before_linux(void)* * disable interrupt and turn off caches etc ... */ + +board_cleanup_before_linux (); +disable_interrupts ();/*
arch/arm/include/asm/arch-tegra/xusb-padctl.h +1 -0
@@ -16,6 +16,7 @@ struct tegra_xusb_phy;struct tegra_xusb_phy *tegra_xusb_phy_get (unsigned int type);void tegra_xusb_padctl_init (void ); +void tegra_xusb_padctl_exit (void );int tegra_xusb_phy_prepare (struct tegra_xusb_phy *phy);int tegra_xusb_phy_enable (struct tegra_xusb_phy *phy);int tegra_xusb_phy_disable (struct tegra_xusb_phy *phy);
arch/arm/mach-tegra/board2.c +6 -0
@@ -181,6 +181,12 @@ int board_init(void)return nvidia_board_init (); } +void board_cleanup_before_linux (void ) +{ +/* power down UPHY PLL */ +tegra_xusb_padctl_exit (); +} +#ifdef CONFIG_BOARD_EARLY_INIT_F static void __gpio_early_init (void ) {
arch/arm/mach-tegra/tegra210/clock.c +0 -19
@@ -1235,25 +1235,6 @@ int tegra_plle_enable(void) value &= ~PLLE_SS_CNTL_INTERP_RESET ;writel (value,NV_PA_CLK_RST_BASE +PLLE_SS_CNTL ); -/* 7. Enable HW power sequencer for PLLE */ - - value =readl (NV_PA_CLK_RST_BASE +PLLE_MISC ); - value &= ~PLLE_MISC_IDDQ_SWCTL ; -writel (value,NV_PA_CLK_RST_BASE +PLLE_MISC ); - - value =readl (NV_PA_CLK_RST_BASE +PLLE_AUX ); - value &= ~PLLE_AUX_SS_SWCTL ; - value &= ~PLLE_AUX_ENABLE_SWCTL ; - value |=PLLE_AUX_SS_SEQ_INCLUDE ; - value |=PLLE_AUX_USE_LOCKDET ; -writel (value,NV_PA_CLK_RST_BASE +PLLE_AUX ); - -/* 8. Wait 1 us */ - -udelay (1 ); - value |=PLLE_AUX_SEQ_ENABLE ; -writel (value,NV_PA_CLK_RST_BASE +PLLE_AUX ); -return 0 ; }
arch/arm/mach-tegra/tegra210/xusb-padctl.c +43 -25
83 lines not on this page · raw message
arch/arm/mach-tegra/xusb-padctl-dummy.c +4 -0
@@ -36,3 +36,7 @@ int __weak tegra_xusb_phy_unprepare(struct tegra_xusb_phy *phy)void __weak tegra_xusb_padctl_init (void ) { } + +void __weak tegra_xusb_padctl_exit (void ) +{ +}
Signature · 9 lines
1.8.2.1.610.g562af5b ----------------------------------------------------------------------------------- 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 2/3 t210: Adjust ramdisk_addr_r/fdt_addr_r to allow for large kernels
In reply to tomcwarren3959 at gmail.comFrom: Tom Warren <[email protected]>
The L4T kernel is 32MB+, and can overwrite the ramdisk/fdt loaded from extlinux.conf. Adjust the load addresses to fix this for now. Using the calculated_env addresses table from T186 U-Boot is a better fix, but it isn't working correctly on T210 U-Boot right now, so this will do until I can fix it.
--- include/configs/tegra210-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/tegra210-common.h +2 -2
@@ -46,8 +46,8 @@"scriptaddr=0x90000000\0" \"pxefile_addr_r=0x90100000\0" \ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ -"fdt_addr_r=0x82000000\0" \ -"ramdisk_addr_r=0x82100000\0" +"fdt_addr_r=0x83000000\0" \ +"ramdisk_addr_r=0x83200000\0" /* For USB EHCI controller */ #define CONFIG_EHCI_IS_TDI
Signature · 9 lines
1.8.2.1.610.g562af5b ----------------------------------------------------------------------------------- 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 3/3 t210: pinmux: Remove pinmux/GPIO init from T210 boards
In reply to tomcwarren3959 at gmail.comFrom: Tom Warren <[email protected]>
T210 CBoot is now doing the full pinmux and GPIO init, based on the DTB tables. Remove pinmux/GPIO init tables & code from all T210-based builds below:
p2371-2180 aka TX1
p2371-0000
e2220-1170
p2571
--- arch/arm/mach-tegra/tegra210/Makefile | 3 +- arch/arm/mach-tegra/tegra210/pinmux.c | 194 -------------- board/nvidia/e2220-1170/e2220-1170.c | 21 +- board/nvidia/e2220-1170/pinmux-config-e2220-1170.h | 276 -------------------- board/nvidia/p2371-0000/p2371-0000.c | 21 +- board/nvidia/p2371-0000/pinmux-config-p2371-0000.h | 267 -------------------- board/nvidia/p2371-2180/p2371-2180.c | 21 +- board/nvidia/p2371-2180/pinmux-config-p2371-2180.h | 278 --------------------- board/nvidia/p2571/p2571.c | 21 +- board/nvidia/p2571/pinmux-config-p2571.h | 242 ------------------ 10 files changed, 5 insertions(+), 1339 deletions(-) delete mode 100644 arch/arm/mach-tegra/tegra210/pinmux.c delete mode 100644 board/nvidia/e2220-1170/pinmux-config-e2220-1170.h delete mode 100644 board/nvidia/p2371-0000/pinmux-config-p2371-0000.h delete mode 100644 board/nvidia/p2371-2180/pinmux-config-p2371-2180.h delete mode 100644 board/nvidia/p2571/pinmux-config-p2571.h
arch/arm/mach-tegra/tegra210/Makefile +1 -2
@@ -1,5 +1,5 @@ # -# (C) Copyright 2013-2015 +# (C) Copyright 2013-2020 # NVIDIA Corporation <www.nvidia.com> # # SPDX-License-Identifier: GPL-2.0+
@@ -7,6 +7,5 @@ obj-y += clock.o obj-y += funcmux.o -obj-y += pinmux.o obj-y += xusb-padctl.o obj-y += ../xusb-padctl-common.o
arch/arm/mach-tegra/tegra210/pinmux.c deleted +0 -194
194 lines not on this page · raw message
board/nvidia/e2220-1170/e2220-1170.c +1 -20
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* (C) Copyright 2013-2015 +* (C) Copyright 2013-2019 * NVIDIA Corporation <www.nvidia.com> */
@@ -9,7 +9,6 @@#include <asm/arch/gpio.h> #include <asm/arch/pinmux.h> #include "../p2571/max77620_init.h" -#include "pinmux-config-e2220-1170.h" void pin_mux_mmc (void ) {
@@ -30,21 +29,3 @@ void pin_mux_mmc(void)if (ret)printf ("i2c_write 0 0x3c 0x27 failed: %d\n" , ret); } - -/* -* Routine: pinmux_init -* Description: Do individual peripheral pinmux configs -*/ -void pinmux_init (void ) -{ -pinmux_clear_tristate_input_clamping (); - -gpio_config_table (e2220_1170_gpio_inits, -ARRAY_SIZE (e2220_1170_gpio_inits)); - -pinmux_config_pingrp_table (e2220_1170_pingrps, -ARRAY_SIZE (e2220_1170_pingrps)); - -pinmux_config_drvgrp_table (e2220_1170_drvgrps, -ARRAY_SIZE (e2220_1170_drvgrps)); -}
board/nvidia/e2220-1170/pinmux-config-e2220-1170.h deleted +0 -276
276 lines not on this page · raw message
board/nvidia/p2371-0000/p2371-0000.c +1 -20
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* (C) Copyright 2013-2015 +* (C) Copyright 2013-2019 * NVIDIA Corporation <www.nvidia.com> */
@@ -9,7 +9,6 @@#include <asm/arch/gpio.h> #include <asm/arch/pinmux.h> #include "../p2571/max77620_init.h" -#include "pinmux-config-p2371-0000.h" void pin_mux_mmc (void ) {
@@ -30,21 +29,3 @@ void pin_mux_mmc(void)if (ret)printf ("i2c_write 0 0x3c 0x27 failed: %d\n" , ret); } - -/* -* Routine: pinmux_init -* Description: Do individual peripheral pinmux configs -*/ -void pinmux_init (void ) -{ -pinmux_clear_tristate_input_clamping (); - -gpio_config_table (p2371_0000_gpio_inits, -ARRAY_SIZE (p2371_0000_gpio_inits)); - -pinmux_config_pingrp_table (p2371_0000_pingrps, -ARRAY_SIZE (p2371_0000_pingrps)); - -pinmux_config_drvgrp_table (p2371_0000_drvgrps, -ARRAY_SIZE (p2371_0000_drvgrps)); -}
board/nvidia/p2371-0000/pinmux-config-p2371-0000.h deleted +0 -267
267 lines not on this page · raw message
board/nvidia/p2371-2180/p2371-2180.c +1 -20
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* (C) Copyright 2013-2015 +* (C) Copyright 2013-2019 * NVIDIA Corporation <www.nvidia.com> */
@@ -13,7 +13,6 @@#include <asm/arch/pinmux.h> #include <asm/arch-tegra/cboot.h> #include "../p2571/max77620_init.h" -#include "pinmux-config-p2371-2180.h" void pin_mux_mmc (void ) {
@@ -57,24 +56,6 @@ void pin_mux_mmc(void) } } -/* -* Routine: pinmux_init -* Description: Do individual peripheral pinmux configs -*/ -void pinmux_init (void ) -{ -pinmux_clear_tristate_input_clamping (); - -gpio_config_table (p2371_2180_gpio_inits, -ARRAY_SIZE (p2371_2180_gpio_inits)); - -pinmux_config_pingrp_table (p2371_2180_pingrps, -ARRAY_SIZE (p2371_2180_pingrps)); - -pinmux_config_drvgrp_table (p2371_2180_drvgrps, -ARRAY_SIZE (p2371_2180_drvgrps)); -} -#ifdef CONFIG_PCI_TEGRA int tegra_pcie_board_init (void ) {
board/nvidia/p2371-2180/pinmux-config-p2371-2180.h deleted +0 -278
278 lines not on this page · raw message
board/nvidia/p2571/p2571.c +1 -20
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* (C) Copyright 2013-2015 +* (C) Copyright 2013-2019 * NVIDIA Corporation <www.nvidia.com> */
@@ -10,7 +10,6 @@#include <asm/arch/pinmux.h> #include <asm/gpio.h> #include "max77620_init.h" -#include "pinmux-config-p2571.h" void pin_mux_mmc (void ) {
@@ -33,24 +32,6 @@ void pin_mux_mmc(void) }/* -* Routine: pinmux_init -* Description: Do individual peripheral pinmux configs -*/ -void pinmux_init (void ) -{ -pinmux_clear_tristate_input_clamping (); - -gpio_config_table (p2571_gpio_inits, -ARRAY_SIZE (p2571_gpio_inits)); - -pinmux_config_pingrp_table (p2571_pingrps, -ARRAY_SIZE (p2571_pingrps)); - -pinmux_config_drvgrp_table (p2571_drvgrps, -ARRAY_SIZE (p2571_drvgrps)); -} - -/* * Routine: start_cpu_fan * Description: Enable/start PWM CPU fan on P2571 */
board/nvidia/p2571/pinmux-config-p2571.h deleted +0 -242
242 lines not on this page · raw message
Signature · 9 lines
1.8.2.1.610.g562af5b ----------------------------------------------------------------------------------- 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. -----------------------------------------------------------------------------------