General Tegra improvements
Subsystems (6)
v3 cover General Tegra improvements
List of changes in patch set:
- add missing EXTPERIPH clocks for t30
- swap host1x and disp1 clock parents (as they should be)
- add clk_id_to_pll_id and clock_decode_pair helpers to use dts deeper (in tegra clocks often go in pair child - parent)
- include PLLD setup in T30 (DISP1 may use it as parent on some device)
- fix Tegra PWM parent clock inline with linux
- Tegra SLINK: patch to accept any word length (unlike 8bit aligned which was before)
- provide default USB gadget setup for existing Nvidia boards
- add late init function to be able to configure pre-boot stage (like uncovering serial number or setting mac address)
- create common pre-dm i2c write for PMIC (used on T30 and T124 to configure basic PMIC voltages required to boot like cpu and core voltages)
- expose crypto module for all Tegra SoCs and implement BCT patching (ability to update bootloader from u-boot on production devices without need in host PC)
---
Changelog from v2
- fixed T114 TEGRA114_CLK_PLL_E_OUT0
- adjusted pre-dm i2c write commit description
- added description file for ebtupdate command
- minor improvements of bct.c comments
Changelog from v1
- rebased to latest u-boot master
- PLLD setup for T30 moved specifically into T30 area
---
Maxim Schwalm (1):
ARM: tegra: provide default USB gadget setup
Ramin Khonsari (1):
ARM: tegra30: implement BCT patching
Svyatoslav Ryhel (14):
tegra30: clock: add EXTPERIPH
ARM: t20/t30: swap host1x and disp1 clock parents
ARM: tegra: clock: add clk_id_to_pll_id helper
ARM: tegra: clock: add clock_decode_pair helper
ARM: tegra30: add PLLD to pll setup
ARM: tegra: Fix Tegra PWM parent clock
spi: tegra20_slink: accept any word length
ARM: tegra: add late init support
ARM: tegra: create common pre-dm i2c write
board: tegra124: switch to updated pre-dm i2c write
board: tegra30: switch to updated pre-dm i2c write
ARM: tegra: expose crypto module for all Tegra SoCs
ARM: tegra: crypto: extend crypto functional
ARM: tegra20: implement BCT patching
arch/arm/dts/tegra114.dtsi | 2 +-
arch/arm/dts/tegra124.dtsi | 2 +-
arch/arm/include/asm/arch-tegra/clock.h | 21 +++++
arch/arm/include/asm/arch-tegra/crypto.h | 47 ++++++++++
arch/arm/include/asm/arch-tegra/sys_proto.h | 6 ++
arch/arm/include/asm/arch-tegra/tegra_i2c.h | 17 ++++
.../include/asm/arch-tegra30/clock-tables.h | 6 +-
arch/arm/mach-tegra/Kconfig | 14 +++
arch/arm/mach-tegra/Makefile | 1 +
arch/arm/mach-tegra/board2.c | 2 +
arch/arm/mach-tegra/clock.c | 23 +++++
arch/arm/mach-tegra/cpu.h | 1 -
arch/arm/mach-tegra/{tegra20 => }/crypto.c | 63 +++++++++----
arch/arm/mach-tegra/tegra114/clock.c | 39 +++++++-
arch/arm/mach-tegra/tegra124/clock.c | 40 ++++++++-
arch/arm/mach-tegra/tegra124/cpu.c | 4 +
arch/arm/mach-tegra/tegra20/Kconfig | 1 +
arch/arm/mach-tegra/tegra20/Makefile | 7 +-
arch/arm/mach-tegra/tegra20/bct.c | 79 ++++++++++++++++
arch/arm/mach-tegra/tegra20/bct.h | 42 +++++++++
arch/arm/mach-tegra/tegra20/clock.c | 43 ++++++++-
arch/arm/mach-tegra/tegra20/crypto.h | 19 ----
arch/arm/mach-tegra/tegra210/clock.c | 39 +++++++-
arch/arm/mach-tegra/tegra30/Kconfig | 8 --
arch/arm/mach-tegra/tegra30/Makefile | 1 +
arch/arm/mach-tegra/tegra30/bct.c | 79 ++++++++++++++++
arch/arm/mach-tegra/tegra30/bct.h | 42 +++++++++
arch/arm/mach-tegra/tegra30/clock.c | 90 +++++++++++++++++--
arch/arm/mach-tegra/tegra30/cpu.c | 55 +-----------
board/avionic-design/tec-ng/Makefile | 4 +-
board/avionic-design/tec-ng/tec-ng-spl.c | 34 +++++++
board/nvidia/beaver/Makefile | 2 +
board/nvidia/beaver/beaver-spl.c | 43 +++++++++
board/nvidia/cardhu/Makefile | 4 +-
board/nvidia/cardhu/cardhu-spl.c | 43 +++++++++
board/nvidia/venice2/as3722_init.c | 65 +++++++++-----
board/nvidia/venice2/as3722_init.h | 43 ---------
board/toradex/apalis-tk1/as3722_init.c | 85 ++++++++++--------
board/toradex/apalis-tk1/as3722_init.h | 40 ---------
board/toradex/apalis_t30/Makefile | 2 +
board/toradex/apalis_t30/apalis_t30-spl.c | 34 +++++++
board/toradex/colibri_t30/Makefile | 2 +
board/toradex/colibri_t30/colibri_t30-spl.c | 34 +++++++
configs/beaver_defconfig | 3 -
configs/cei-tk1-som_defconfig | 3 -
configs/dalmore_defconfig | 3 -
configs/jetson-tk1_defconfig | 3 -
configs/nyan-big_defconfig | 3 -
configs/p2371-0000_defconfig | 3 -
configs/p2371-2180_defconfig | 3 -
configs/p2571_defconfig | 3 -
configs/p3450-0000_defconfig | 3 -
configs/venice2_defconfig | 3 -
doc/usage/cmd/ebtupdate.rst | 70 +++++++++++++++
drivers/pwm/tegra_pwm.c | 10 ++-
drivers/spi/tegra20_slink.c | 19 ++--
drivers/usb/gadget/Kconfig | 3 +
57 files changed, 1051 insertions(+), 309 deletions(-)
create mode 100644 arch/arm/include/asm/arch-tegra/crypto.h
rename arch/arm/mach-tegra/{tegra20 => }/crypto.c (68%)
create mode 100644 arch/arm/mach-tegra/tegra20/bct.c
create mode 100644 arch/arm/mach-tegra/tegra20/bct.h
delete mode 100644 arch/arm/mach-tegra/tegra20/crypto.h
create mode 100644 arch/arm/mach-tegra/tegra30/bct.c
create mode 100644 arch/arm/mach-tegra/tegra30/bct.h
create mode 100644 board/avionic-design/tec-ng/tec-ng-spl.c
create mode 100644 board/nvidia/beaver/beaver-spl.c
create mode 100644 board/nvidia/cardhu/cardhu-spl.c
delete mode 100644 board/nvidia/venice2/as3722_init.h
delete mode 100644 board/toradex/apalis-tk1/as3722_init.h
create mode 100644 board/toradex/apalis_t30/apalis_t30-spl.c
create mode 100644 board/toradex/colibri_t30/colibri_t30-spl.c
create mode 100644 doc/usage/cmd/ebtupdate.rstSignature · 1 line
2.37.2
PATCH v3 1/16 tegra30: clock: add EXTPERIPH
This mappings were missing for some reason.
--- arch/arm/include/asm/arch-tegra30/clock-tables.h | 6 +++--- arch/arm/mach-tegra/tegra30/clock.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/include/asm/arch-tegra30/clock-tables.h +3 -3
@@ -190,9 +190,9 @@ enum periph_id {PERIPH_ID_ACTMON ,/* 24 */ -PERIPH_ID_EX_RESERVED24 , -PERIPH_ID_EX_RESERVED25 , -PERIPH_ID_EX_RESERVED26 , +PERIPH_ID_EXTPERIPH1 , +PERIPH_ID_EXTPERIPH2 , +PERIPH_ID_EXTPERIPH3 ,PERIPH_ID_EX_RESERVED27 ,PERIPH_ID_SATA , PERIPH_ID_HDA,
arch/arm/mach-tegra/tegra30/clock.c +3 -3
@@ -377,9 +377,9 @@ static s8 periph_id_to_internal_id[PERIPH_ID_COUNT] = {PERIPHC_ACTMON ,/* 24 */ -NONE (RESERVED24 ), -NONE (RESERVED25 ), -NONE (RESERVED26 ), +PERIPHC_EXTPERIPH1 , +PERIPHC_EXTPERIPH2 , +PERIPHC_EXTPERIPH3 ,NONE (RESERVED27 ),PERIPHC_SATA , PERIPHC_HDA,
Signature · 1 line
2.37.2
PATCH v3 2/16 ARM: t20/t30: swap host1x and disp1 clock parents
In reply to Svyatoslav RyhelAccording to mainline clock tables and TRM HOST1X
parent is PLLC, while DISP1 usually uses PLLP as
parent clock.
--- arch/arm/mach-tegra/tegra20/clock.c | 4 ++-- arch/arm/mach-tegra/tegra30/clock.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-tegra/tegra20/clock.c +2 -2
@@ -760,8 +760,8 @@ struct periph_clk_init periph_clk_init_table[] = { { PERIPH_ID_SBC2, CLOCK_ID_PERIPH }, { PERIPH_ID_SBC3, CLOCK_ID_PERIPH }, { PERIPH_ID_SBC4, CLOCK_ID_PERIPH }, - { PERIPH_ID_HOST1X, CLOCK_ID_PERIPH }, - { PERIPH_ID_DISP1, CLOCK_ID_CGENERAL }, + { PERIPH_ID_HOST1X, CLOCK_ID_CGENERAL }, + { PERIPH_ID_DISP1, CLOCK_ID_PERIPH }, { PERIPH_ID_NDFLASH, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC1, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC2, CLOCK_ID_PERIPH },
arch/arm/mach-tegra/tegra30/clock.c +2 -2
@@ -799,8 +799,8 @@ struct periph_clk_init periph_clk_init_table[] = { { PERIPH_ID_SBC4, CLOCK_ID_PERIPH }, { PERIPH_ID_SBC5, CLOCK_ID_PERIPH }, { PERIPH_ID_SBC6, CLOCK_ID_PERIPH }, - { PERIPH_ID_HOST1X, CLOCK_ID_PERIPH }, - { PERIPH_ID_DISP1, CLOCK_ID_CGENERAL }, + { PERIPH_ID_HOST1X, CLOCK_ID_CGENERAL }, + { PERIPH_ID_DISP1, CLOCK_ID_PERIPH }, { PERIPH_ID_NDFLASH, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC1, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC2, CLOCK_ID_PERIPH },
Signature · 1 line
2.37.2
PATCH v3 3/16 ARM: tegra: clock: add clk_id_to_pll_id helper
In reply to Svyatoslav RyhelThis function allows to convert a device tree clock ID to PLL ID.
--- arch/arm/include/asm/arch-tegra/clock.h | 8 ++++++ arch/arm/mach-tegra/tegra114/clock.c | 37 ++++++++++++++++++++++++ arch/arm/mach-tegra/tegra124/clock.c | 38 +++++++++++++++++++++++++ arch/arm/mach-tegra/tegra20/clock.c | 37 ++++++++++++++++++++++++ arch/arm/mach-tegra/tegra210/clock.c | 37 ++++++++++++++++++++++++ arch/arm/mach-tegra/tegra30/clock.c | 37 ++++++++++++++++++++++++ 6 files changed, 194 insertions(+)
arch/arm/include/asm/arch-tegra/clock.h +8 -0
@@ -354,6 +354,14 @@ int get_periph_clock_source(enum periph_id periph_id,*/ enum periph_id clk_id_to_periph_id (int clk_id); +/* +* Convert a device tree clock ID to our PLL ID. +* +* @param clk_id Clock ID according to tegra device tree binding +* Return: clock ID, or CLOCK_ID_NONE if the clock ID is invalid +*/ +enum clock_id clk_id_to_pll_id (int clk_id); +/** * Set the output frequency you want for each PLL clock. * PLL output frequencies are programmed by setting their N, M and P values.
arch/arm/mach-tegra/tegra114/clock.c +37 -0
@@ -19,6 +19,8 @@#include <fdtdec.h> #include <linux/delay.h> +#include <dt-bindings/clock/tegra114-car.h> +/* * Clock types that we can use as a source. The Tegra114 has muxes for the * peripheral clocks, and in most cases there are four options for the clock
@@ -646,6 +648,41 @@ enum periph_id clk_id_to_periph_id(int clk_id) return clk_id; } } + +/* +* Convert a device tree clock ID to our PLL ID. +* +* @param clk_id Clock ID according to tegra114 device tree binding +* Return: clock ID, or CLOCK_ID_NONE if the clock ID is invalid +*/ +enum clock_id clk_id_to_pll_id (int clk_id) +{ +switch (clk_id) { +case TEGRA114_CLK_PLL_C : +return CLOCK_ID_CGENERAL ; +case TEGRA114_CLK_PLL_M : +return CLOCK_ID_MEMORY ; +case TEGRA114_CLK_PLL_P : +return CLOCK_ID_PERIPH ; +case TEGRA114_CLK_PLL_A : +return CLOCK_ID_AUDIO ; +case TEGRA114_CLK_PLL_U : +return CLOCK_ID_USB ; +case TEGRA114_CLK_PLL_D : +case TEGRA114_CLK_PLL_D_OUT0 : +return CLOCK_ID_DISPLAY ; +case TEGRA114_CLK_PLL_X : +return CLOCK_ID_XCPU ; +case TEGRA114_CLK_PLL_E_OUT0 : +return CLOCK_ID_EPCI ; +case TEGRA114_CLK_CLK_32K : +return CLOCK_ID_32KHZ ; +case TEGRA114_CLK_CLK_M : +return CLOCK_ID_CLK_M ; +default : +return CLOCK_ID_NONE ; + } +}#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ void clock_early_init (void )
arch/arm/mach-tegra/tegra124/clock.c +38 -0
@@ -19,6 +19,9 @@#include <fdtdec.h> #include <linux/delay.h> +#include <dt-bindings/clock/tegra124-car.h> +#include <dt-bindings/clock/tegra124-car-common.h> +/* * Clock types that we can use as a source. The Tegra124 has muxes for the * peripheral clocks, and in most cases there are four options for the clock
@@ -826,6 +829,41 @@ enum periph_id clk_id_to_periph_id(int clk_id) return clk_id; } } + +/* +* Convert a device tree clock ID to our PLL ID. +* +* @param clk_id Clock ID according to tegra124 device tree binding +* Return: clock ID, or CLOCK_ID_NONE if the clock ID is invalid +*/ +enum clock_id clk_id_to_pll_id (int clk_id) +{ +switch (clk_id) { +case TEGRA124_CLK_PLL_C : +return CLOCK_ID_CGENERAL ; +case TEGRA124_CLK_PLL_M : +return CLOCK_ID_MEMORY ; +case TEGRA124_CLK_PLL_P : +return CLOCK_ID_PERIPH ; +case TEGRA124_CLK_PLL_A : +return CLOCK_ID_AUDIO ; +case TEGRA124_CLK_PLL_U : +return CLOCK_ID_USB ; +case TEGRA124_CLK_PLL_D : +case TEGRA124_CLK_PLL_D_OUT0 : +return CLOCK_ID_DISPLAY ; +case TEGRA124_CLK_PLL_X : +return CLOCK_ID_XCPU ; +case TEGRA124_CLK_PLL_E : +return CLOCK_ID_EPCI ; +case TEGRA124_CLK_CLK_32K : +return CLOCK_ID_32KHZ ; +case TEGRA124_CLK_CLK_M : +return CLOCK_ID_CLK_M ; +default : +return CLOCK_ID_NONE ; + } +}#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ void clock_early_init (void )
arch/arm/mach-tegra/tegra20/clock.c +37 -0
@@ -20,6 +20,8 @@#include <fdtdec.h> #include <linux/delay.h> +#include <dt-bindings/clock/tegra20-car.h> +/* * Clock types that we can use as a source. The Tegra20 has muxes for the * peripheral clocks, and in most cases there are four options for the clock
@@ -578,6 +580,41 @@ enum periph_id clk_id_to_periph_id(int clk_id) return clk_id; } } + +/* +* Convert a device tree clock ID to our PLL ID. +* +* @param clk_id Clock ID according to tegra20 device tree binding +* Return: clock ID, or CLOCK_ID_NONE if the clock ID is invalid +*/ +enum clock_id clk_id_to_pll_id (int clk_id) +{ +switch (clk_id) { +case TEGRA20_CLK_PLL_C : +return CLOCK_ID_CGENERAL ; +case TEGRA20_CLK_PLL_M : +return CLOCK_ID_MEMORY ; +case TEGRA20_CLK_PLL_P : +return CLOCK_ID_PERIPH ; +case TEGRA20_CLK_PLL_A : +return CLOCK_ID_AUDIO ; +case TEGRA20_CLK_PLL_U : +return CLOCK_ID_USB ; +case TEGRA20_CLK_PLL_D : +case TEGRA20_CLK_PLL_D_OUT0 : +return CLOCK_ID_DISPLAY ; +case TEGRA20_CLK_PLL_X : +return CLOCK_ID_XCPU ; +case TEGRA20_CLK_PLL_E : +return CLOCK_ID_EPCI ; +case TEGRA20_CLK_CLK_32K : +return CLOCK_ID_32KHZ ; +case TEGRA20_CLK_CLK_M : +return CLOCK_ID_CLK_M ; +default : +return CLOCK_ID_NONE ; + } +}#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ void clock_early_init (void )
arch/arm/mach-tegra/tegra210/clock.c +37 -0
@@ -22,6 +22,8 @@#include <linux/bitops.h> #include <linux/delay.h> +#include <dt-bindings/clock/tegra210-car.h> +/* * Clock types that we can use as a source. The Tegra210 has muxes for the * peripheral clocks, and in most cases there are four options for the clock
@@ -914,6 +916,41 @@ enum periph_id clk_id_to_periph_id(int clk_id) return clk_id; } } + +/* +* Convert a device tree clock ID to our PLL ID. +* +* @param clk_id Clock ID according to tegra210 device tree binding +* Return: clock ID, or CLOCK_ID_NONE if the clock ID is invalid +*/ +enum clock_id clk_id_to_pll_id (int clk_id) +{ +switch (clk_id) { +case TEGRA210_CLK_PLL_C : +return CLOCK_ID_CGENERAL ; +case TEGRA210_CLK_PLL_M : +return CLOCK_ID_MEMORY ; +case TEGRA210_CLK_PLL_P : +return CLOCK_ID_PERIPH ; +case TEGRA210_CLK_PLL_A : +return CLOCK_ID_AUDIO ; +case TEGRA210_CLK_PLL_U : +return CLOCK_ID_USB ; +case TEGRA210_CLK_PLL_D : +case TEGRA210_CLK_PLL_D_OUT0 : +return CLOCK_ID_DISPLAY ; +case TEGRA210_CLK_PLL_X : +return CLOCK_ID_XCPU ; +case TEGRA210_CLK_PLL_E : +return CLOCK_ID_EPCI ; +case TEGRA210_CLK_CLK_32K : +return CLOCK_ID_32KHZ ; +case TEGRA210_CLK_CLK_M : +return CLOCK_ID_CLK_M ; +default : +return CLOCK_ID_NONE ; + } +}#endif /* CONFIG_OF_CONTROL */ /*
arch/arm/mach-tegra/tegra30/clock.c +37 -0
@@ -19,6 +19,8 @@#include <fdtdec.h> #include <linux/delay.h> +#include <dt-bindings/clock/tegra30-car.h> +/* * Clock types that we can use as a source. The Tegra30 has muxes for the * peripheral clocks, and in most cases there are four options for the clock
@@ -628,6 +630,41 @@ enum periph_id clk_id_to_periph_id(int clk_id) return clk_id; } } + +/* +* Convert a device tree clock ID to our PLL ID. +* +* @param clk_id Clock ID according to tegra30 device tree binding +* Return: clock ID, or CLOCK_ID_NONE if the clock ID is invalid +*/ +enum clock_id clk_id_to_pll_id (int clk_id) +{ +switch (clk_id) { +case TEGRA30_CLK_PLL_C : +return CLOCK_ID_CGENERAL ; +case TEGRA30_CLK_PLL_M : +return CLOCK_ID_MEMORY ; +case TEGRA30_CLK_PLL_P : +return CLOCK_ID_PERIPH ; +case TEGRA30_CLK_PLL_A : +return CLOCK_ID_AUDIO ; +case TEGRA30_CLK_PLL_U : +return CLOCK_ID_USB ; +case TEGRA30_CLK_PLL_D : +case TEGRA30_CLK_PLL_D_OUT0 : +return CLOCK_ID_DISPLAY ; +case TEGRA30_CLK_PLL_X : +return CLOCK_ID_XCPU ; +case TEGRA30_CLK_PLL_E : +return CLOCK_ID_EPCI ; +case TEGRA30_CLK_CLK_32K : +return CLOCK_ID_32KHZ ; +case TEGRA30_CLK_CLK_M : +return CLOCK_ID_CLK_M ; +default : +return CLOCK_ID_NONE ; + } +}#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ void clock_early_init (void )
Signature · 1 line
2.37.2
PATCH v3 4/16 ARM: tegra: clock: add clock_decode_pair helper
In reply to Svyatoslav RyhelGet periph clock id and its parent from device tree. This works by looking up the peripheral's 'clocks' node and reading out the second and fourth cells, which are the peripheral and PLL clock numbers.
--- arch/arm/include/asm/arch-tegra/clock.h | 13 +++++++++++++ arch/arm/mach-tegra/clock.c | 23 +++++++++++++++++++++++ 2 files changed, 36 insertions(+)
arch/arm/include/asm/arch-tegra/clock.h +13 -0
@@ -270,6 +270,19 @@ void clock_ll_start_uart(enum periph_id periph_id);*/ int clock_decode_periph_id (struct udevice *dev); +/** +* Get periph clock id and its parent from device tree. +* +* This works by looking up the peripheral's 'clocks' node and reading out +* the second and fourth cells, which are the peripheral and PLL clock numbers. +* +* @param dev udevice associated with FDT node +* @param clk_id pointer to int array of 2 values +* first is periph clock, second is +* its PLL parent according to FDT. +*/ +int clock_decode_pair (struct udevice *dev,int *clk_id); +/** * Checks if the oscillator bypass is enabled (XOBP bit) *
arch/arm/mach-tegra/clock.c +23 -0
@@ -678,6 +678,29 @@ int clock_decode_periph_id(struct udevice *dev)assert (clock_periph_id_isvalid (id)); return id; } + +/* +* Get periph clock id and its parent from device tree. +* +* @param dev udevice associated with FDT node +* @param clk_id pointer to u32 array of 2 values +* first is periph clock, second is +* its PLL parent according to FDT. +*/ +int clock_decode_pair (struct udevice *dev,int *clk_id) +{ +u32 cell[4 ]; +int err; + + err =dev_read_u32_array (dev,"clocks" , cell,ARRAY_SIZE (cell)); +if (err) +return -EINVAL ; + + clk_id[0 ] =clk_id_to_periph_id (cell[1 ]); + clk_id[1 ] =clk_id_to_pll_id (cell[3 ]); + +return 0 ; +}#endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ int clock_verify (void )
Signature · 1 line
2.37.2
PATCH v3 5/16 ARM: tegra30: add PLLD to pll setup
In reply to Svyatoslav RyhelOn T30 unlike T20 dsi panels are wider used on devices and PLLD is used as DISP1 parent more often, so lets enable it as well for this cases.
--- arch/arm/mach-tegra/tegra30/clock.c | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
arch/arm/mach-tegra/tegra30/clock.c +41 -0
@@ -669,7 +669,48 @@ enum clock_id clk_id_to_pll_id(int clk_id)void clock_early_init (void ) { +struct clk_rst_ctlr *clkrst = + (struct clk_rst_ctlr *)NV_PA_CLK_RST_BASE ; +struct clk_pll_info *pllinfo; +u32 data; +tegra30_set_up_pllp (); + +/* +* PLLD output frequency set to 925Mhz +*/ +switch (clock_get_osc_freq ()) { +case CLOCK_OSC_FREQ_12_0 :/* OSC is 12Mhz */ +case CLOCK_OSC_FREQ_48_0 :/* OSC is 48Mhz */ +clock_set_rate (CLOCK_ID_DISPLAY ,925 ,12 ,0 ,12 ); +break ; + +case CLOCK_OSC_FREQ_26_0 :/* OSC is 26Mhz */ +clock_set_rate (CLOCK_ID_DISPLAY ,925 ,26 ,0 ,12 ); +break ; + +case CLOCK_OSC_FREQ_13_0 :/* OSC is 13Mhz */ +case CLOCK_OSC_FREQ_16_8 :/* OSC is 16.8Mhz */ +clock_set_rate (CLOCK_ID_DISPLAY ,925 ,13 ,0 ,12 ); +break ; + +case CLOCK_OSC_FREQ_19_2 : +case CLOCK_OSC_FREQ_38_4 : +default : +/* +* These are not supported. It is too early to print a +* message and the UART likely won't work anyway due to the +* oscillator being wrong. +*/ +break ; + } + +/* PLLD_MISC: Set CLKENABLE, CPCON 12, LFCON 1, and enable lock */ + pllinfo = &tegra_pll_info_table[CLOCK_ID_DISPLAY ]; + data = (12 << pllinfo->kcp_shift) | (1 << pllinfo->kvco_shift); + data |= (1 <<PLLD_CLKENABLE ) | (1 << pllinfo->lock_ena); +writel (data, &clkrst->crc_pll[CLOCK_ID_DISPLAY ].pll_misc); +udelay (2 ); }void arch_timer_init (void )
Signature · 1 line
2.37.2
PATCH v3 6/16 ARM: tegra: Fix Tegra PWM parent clock
In reply to Svyatoslav RyhelDefault parent clock for the PWM on Tegra is a 32kHz clock and is unable to support the requested PWM period.
Fix PWM support on Tegra20, Tegra30, Tegra114, Tegra124 and Tegra210 by updating the parent clock for the PWM to be the PLL_P.
This commit is equivalent to Linux kernel commit:
https://lore.kernel.org/all/[email protected]/
--- arch/arm/dts/tegra114.dtsi | 2 +- arch/arm/dts/tegra124.dtsi | 2 +- arch/arm/mach-tegra/tegra114/clock.c | 2 +- arch/arm/mach-tegra/tegra124/clock.c | 2 +- arch/arm/mach-tegra/tegra20/clock.c | 2 +- arch/arm/mach-tegra/tegra210/clock.c | 2 +- arch/arm/mach-tegra/tegra30/clock.c | 2 +- drivers/pwm/tegra_pwm.c | 10 ++++++---- 8 files changed, 13 insertions(+), 11 deletions(-)
arch/arm/dts/tegra114.dtsi +1 -1
@@ -312,7 +312,7 @@ }; pwm: pwm@7000a000 { - compatible = "nvidia,tegra114-pwm", "nvidia,tegra20-pwm"; + compatible = "nvidia,tegra114-pwm"; reg = <0x7000a000 0x100>; #pwm-cells = <2>; clocks = <&tegra_car TEGRA114_CLK_PWM>;
arch/arm/dts/tegra124.dtsi +1 -1
@@ -377,7 +377,7 @@ }; pwm: pwm@7000a000 { - compatible = "nvidia,tegra124-pwm", "nvidia,tegra20-pwm"; + compatible = "nvidia,tegra124-pwm", "nvidia,tegra114-pwm"; reg = <0x7000a000 0x100>; #pwm-cells = <2>; clocks = <&tegra_car TEGRA124_CLK_PWM>;
arch/arm/mach-tegra/tegra114/clock.c +1 -1
@@ -782,7 +782,7 @@ struct periph_clk_init periph_clk_init_table[] = { { PERIPH_ID_SDMMC2, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC3, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC4, CLOCK_ID_PERIPH }, - { PERIPH_ID_PWM, CLOCK_ID_SFROM32KHZ }, + { PERIPH_ID_PWM, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C1, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C2, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C3, CLOCK_ID_PERIPH },
arch/arm/mach-tegra/tegra124/clock.c +1 -1
@@ -1208,7 +1208,7 @@ struct periph_clk_init periph_clk_init_table[] = { { PERIPH_ID_SDMMC2, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC3, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC4, CLOCK_ID_PERIPH }, - { PERIPH_ID_PWM, CLOCK_ID_SFROM32KHZ }, + { PERIPH_ID_PWM, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C1, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C2, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C3, CLOCK_ID_PERIPH },
arch/arm/mach-tegra/tegra20/clock.c +1 -1
@@ -804,7 +804,7 @@ struct periph_clk_init periph_clk_init_table[] = { { PERIPH_ID_SDMMC2, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC3, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC4, CLOCK_ID_PERIPH }, - { PERIPH_ID_PWM, CLOCK_ID_SFROM32KHZ }, + { PERIPH_ID_PWM, CLOCK_ID_PERIPH }, { PERIPH_ID_DVC_I2C, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C1, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C2, CLOCK_ID_PERIPH },
arch/arm/mach-tegra/tegra210/clock.c +1 -1
@@ -1278,7 +1278,7 @@ struct periph_clk_init periph_clk_init_table[] = { { PERIPH_ID_SDMMC2, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC3, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC4, CLOCK_ID_PERIPH }, - { PERIPH_ID_PWM, CLOCK_ID_SFROM32KHZ }, + { PERIPH_ID_PWM, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C1, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C2, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C3, CLOCK_ID_PERIPH },
arch/arm/mach-tegra/tegra30/clock.c +1 -1
@@ -884,7 +884,7 @@ struct periph_clk_init periph_clk_init_table[] = { { PERIPH_ID_SDMMC2, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC3, CLOCK_ID_PERIPH }, { PERIPH_ID_SDMMC4, CLOCK_ID_PERIPH }, - { PERIPH_ID_PWM, CLOCK_ID_SFROM32KHZ }, + { PERIPH_ID_PWM, CLOCK_ID_PERIPH }, { PERIPH_ID_DVC_I2C, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C1, CLOCK_ID_PERIPH }, { PERIPH_ID_I2C2, CLOCK_ID_PERIPH },
drivers/pwm/tegra_pwm.c +6 -4
@@ -20,19 +20,21 @@ static int tegra_pwm_set_config(struct udevice *dev, uint channel, {struct tegra_pwm_priv *priv =dev_get_priv (dev);struct pwm_ctlr *regs = priv->regs; +const u32 pwm_max_freq =dev_get_driver_data (dev);uint pulse_width;u32 reg;if (channel >=4 )return -EINVAL ;debug ("%s: Configure '%s' channel %u\n" , __func__, dev->name, channel); -/* We ignore the period here and just use 32KHz */ -clock_start_periph_pll (PERIPH_ID_PWM ,CLOCK_ID_SFROM32KHZ ,32768 ); + +clock_start_periph_pll (PERIPH_ID_PWM ,CLOCK_ID_PERIPH , pwm_max_freq); pulse_width = duty_ns *255 / period_ns; reg = pulse_width <<PWM_WIDTH_SHIFT ; reg |=1 <<PWM_DIVIDER_SHIFT ; + reg |=PWM_ENABLE_MASK ;writel (reg, ®s[channel].control);debug ("%s: pulse_width=%u\n" , __func__, pulse_width);
@@ -68,8 +70,8 @@ static const struct pwm_ops tegra_pwm_ops = { };static const struct udevice_id tegra_pwm_ids[] = { - { .compatible ="nvidia,tegra124-pwm" }, - { .compatible ="nvidia,tegra20-pwm" }, + { .compatible ="nvidia,tegra20-pwm" , .data =48 *1000000 }, + { .compatible ="nvidia,tegra114-pwm" , .data =408 *1000000 }, { } };
Signature · 1 line
2.37.2
PATCH v3 7/16 spi: tegra20_slink: accept any word length
In reply to Svyatoslav RyhelOriginal t20 slink could work with commands only
fully divisible by 8. This patch removes such
restriction, so commands of any bitlength now
can be passed and processed.
--- drivers/spi/tegra20_slink.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
drivers/spi/tegra20_slink.c +11 -8
@@ -208,16 +208,14 @@ static int tegra30_spi_xfer(struct udevice *dev, unsigned int bitlen,u32 reg, tmpdout, tmpdin =0 ;const u8 *dout = data_out;u8 *din = data_in; -int num_bytes; -int ret; +int num_bytes, overflow; +int ret =0 ;debug ("%s: slave %u:%u dout %p din %p bitlen %u\n" , __func__,dev_seq (bus),spi_chip_select (dev), dout, din, bitlen); -if (bitlen %8 ) -return -1 ; - num_bytes = bitlen /8 ; - ret =0 ; + num_bytes =DIV_ROUND_UP (bitlen,8 ); + overflow = bitlen %8 ; reg =readl (®s->status);writel (reg, ®s->status);/* Clear all SPI events via R/W */
@@ -254,8 +252,13 @@ static int tegra30_spi_xfer(struct udevice *dev, unsigned int bitlen, num_bytes -= bytes; -clrsetbits_le32 (®s->command,SLINK_CMD_BIT_LENGTH_MASK , - bytes *8 -1 ); +if (overflow && !num_bytes) +clrsetbits_le32 (®s->command,SLINK_CMD_BIT_LENGTH_MASK , + (bytes -1 ) *8 + overflow -1 ); +else +clrsetbits_le32 (®s->command,SLINK_CMD_BIT_LENGTH_MASK , + bytes *8 -1 ); +writel (tmpdout, ®s->tx_fifo);setbits_le32 (®s->command,SLINK_CMD_GO );
Signature · 1 line
2.37.2
PATCH v3 8/16 ARM: tegra: provide default USB gadget setup
In reply to Svyatoslav RyhelFrom: Maxim Schwalm <[email protected]>
All Nvidia boards use the same manufacturer, vendor ID and product ID for the gadgets. Make them the defaults to remove some boilerplate from the defconfigs.
Inspired by commit e02687bda96c ("sunxi: provide default USB gadget setup") which did the same for Allwinner boards.
--- configs/beaver_defconfig | 3 --- configs/cei-tk1-som_defconfig | 3 --- configs/dalmore_defconfig | 3 --- configs/jetson-tk1_defconfig | 3 --- configs/nyan-big_defconfig | 3 --- configs/p2371-0000_defconfig | 3 --- configs/p2371-2180_defconfig | 3 --- configs/p2571_defconfig | 3 --- configs/p3450-0000_defconfig | 3 --- configs/venice2_defconfig | 3 --- drivers/usb/gadget/Kconfig | 3 +++ 11 files changed, 3 insertions(+), 30 deletions(-)
configs/beaver_defconfig +0 -3
@@ -64,8 +64,5 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="NVIDIA" -CONFIG_USB_GADGET_VENDOR_NUM=0x0955 -CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y
configs/cei-tk1-som_defconfig +0 -3
@@ -70,8 +70,5 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="NVIDIA" -CONFIG_USB_GADGET_VENDOR_NUM=0x0955 -CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y
configs/dalmore_defconfig +0 -3
@@ -60,8 +60,5 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="NVIDIA" -CONFIG_USB_GADGET_VENDOR_NUM=0x0955 -CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y
configs/jetson-tk1_defconfig +0 -3
@@ -70,8 +70,5 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="NVIDIA" -CONFIG_USB_GADGET_VENDOR_NUM=0x0955 -CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y
configs/nyan-big_defconfig +0 -3
@@ -93,9 +93,6 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="NVIDIA" -CONFIG_USB_GADGET_VENDOR_NUM=0x0955 -CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_VIDEO=y
configs/p2371-0000_defconfig +0 -3
@@ -48,8 +48,5 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="NVIDIA" -CONFIG_USB_GADGET_VENDOR_NUM=0x0955 -CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y
configs/p2371-2180_defconfig +0 -3
@@ -57,8 +57,5 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="NVIDIA" -CONFIG_USB_GADGET_VENDOR_NUM=0x0955 -CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y
configs/p2571_defconfig +0 -3
@@ -49,8 +49,5 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="NVIDIA" -CONFIG_USB_GADGET_VENDOR_NUM=0x0955 -CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y
configs/p3450-0000_defconfig +0 -3
@@ -61,8 +61,5 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="NVIDIA" -CONFIG_USB_GADGET_VENDOR_NUM=0x0955 -CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y
configs/venice2_defconfig +0 -3
@@ -59,8 +59,5 @@ CONFIG_USB_EHCI_TEGRA=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_ASIX=y CONFIG_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="NVIDIA" -CONFIG_USB_GADGET_VENDOR_NUM=0x0955 -CONFIG_USB_GADGET_PRODUCT_NUM=0x701a CONFIG_CI_UDC=y CONFIG_USB_GADGET_DOWNLOAD=y
drivers/usb/gadget/Kconfig +3 -0
@@ -40,6 +40,7 @@ if USB_GADGET config USB_GADGET_MANUFACTURER string "Vendor name of the USB device" + default "NVIDIA" if ARCH_TEGRA default "Allwinner Technology" if ARCH_SUNXI default "Rockchip" if ARCH_ROCKCHIP default "U-Boot"
@@ -49,6 +50,7 @@ config USB_GADGET_MANUFACTURER config USB_GADGET_VENDOR_NUM hex "Vendor ID of the USB device" + default 0x0955 if ARCH_TEGRA default 0x1f3a if ARCH_SUNXI default 0x2207 if ARCH_ROCKCHIP default 0x0
@@ -59,6 +61,7 @@ config USB_GADGET_VENDOR_NUM config USB_GADGET_PRODUCT_NUM hex "Product ID of the USB device" + default 0x701a if ARCH_TEGRA default 0x1010 if ARCH_SUNXI default 0x310a if ROCKCHIP_RK3036 default 0x300a if ROCKCHIP_RK3066
Signature · 1 line
2.37.2
PATCH v3 9/16 ARM: tegra: add late init support
In reply to Svyatoslav RyhelLate init function allows passing values like identifiers and perform device specific configurations of pre-boot stage.
--- arch/arm/include/asm/arch-tegra/sys_proto.h | 6 ++++++ arch/arm/mach-tegra/board2.c | 2 ++ 2 files changed, 8 insertions(+)
arch/arm/include/asm/arch-tegra/sys_proto.h +6 -0
@@ -31,4 +31,10 @@ int tegra_lcd_pmic_init(int board_id);*/ int nvidia_board_init (void ); +/** +* nvidia_board_late_init() - perform any board-specific +* init on late stages +*/ +void nvidia_board_late_init (void ); +#endif
arch/arm/mach-tegra/board2.c +2 -0
@@ -56,6 +56,7 @@ __weak void gpio_early_init_uart(void) {}__weak void pin_mux_display (void ) {}__weak void start_cpu_fan (void ) {}__weak void cboot_late_init (void ) {} +__weak void nvidia_board_late_init (void ) {}#if defined(CONFIG_TEGRA_NAND )__weak void pin_mux_nand (void )
@@ -267,6 +268,7 @@ int board_late_init(void)#endif start_cpu_fan ();cboot_late_init (); +nvidia_board_late_init ();return 0 ; }
Signature · 1 line
2.37.2
PATCH v3 10/16 ARM: tegra: create common pre-dm i2c write
In reply to Svyatoslav RyhelThis implementation allows pwr i2c writing on early SPL stages when DM is not yet setup.
Such writing is needed to configure main voltages of PMIC on early SPL for bootloader to boot properly.
--- arch/arm/include/asm/arch-tegra/tegra_i2c.h | 17 ++++++++++ arch/arm/mach-tegra/cpu.h | 1 - arch/arm/mach-tegra/tegra124/cpu.c | 4 +++ arch/arm/mach-tegra/tegra30/cpu.c | 37 +++++++-------------- 4 files changed, 33 insertions(+), 26 deletions(-)
arch/arm/include/asm/arch-tegra/tegra_i2c.h +17 -0
@@ -8,6 +8,7 @@#ifndef _TEGRA_I2C_H_#define _TEGRA_I2C_H_ +#include <asm/io.h> #include <asm/types.h> struct udevice ;
@@ -154,4 +155,20 @@ struct i2c_ctlr {*/ int tegra_i2c_get_dvc_bus (struct udevice **busp); +/* Pre-dm section used for initial setup of PMIC */ +#define I2C_SEND_2_BYTES 0x0A02 + +static inline void tegra_i2c_ll_write (uint addr,uint data) +{ +struct i2c_ctlr *reg = (struct i2c_ctlr *)TEGRA_DVC_BASE ; + +writel (addr, ®->cmd_addr0); +writel (0x2 , ®->cnfg); + +writel (data, ®->cmd_data1); +writel (I2C_SEND_2_BYTES , ®->cnfg); +} + +void pmic_enable_cpu_vdd (void ); +#endif /* _TEGRA_I2C_H_ */
arch/arm/mach-tegra/cpu.h +0 -1
@@ -74,4 +74,3 @@ int tegra_get_chip(void);int tegra_get_sku_info (void );int tegra_get_chip_sku (void );void adjust_pllp_out_freqs (void ); -void pmic_enable_cpu_vdd (void );
arch/arm/mach-tegra/tegra124/cpu.c +4 -0
@@ -14,10 +14,14 @@#include <asm/arch/tegra.h> #include <asm/arch-tegra/clk_rst.h> #include <asm/arch-tegra/pmc.h> +#include <asm/arch-tegra/tegra_i2c.h> #include <asm/arch-tegra/ap.h> #include <linux/delay.h> #include "../cpu.h" +/* In case this function is not defined */ +__weak void pmic_enable_cpu_vdd (void ) {} +/* Tegra124-specific CPU init code */ static void enable_cpu_power_rail (void )
arch/arm/mach-tegra/tegra30/cpu.c +12 -25
@@ -15,23 +15,6 @@#include <linux/delay.h> #include "../cpu.h" -/* Tegra30-specific CPU init code */ -void tegra_i2c_ll_write_addr (uint addr,uint config) -{ -struct i2c_ctlr *reg = (struct i2c_ctlr *)TEGRA_DVC_BASE ; - -writel (addr, ®->cmd_addr0); -writel (config, ®->cnfg); -} - -void tegra_i2c_ll_write_data (uint data,uint config) -{ -struct i2c_ctlr *reg = (struct i2c_ctlr *)TEGRA_DVC_BASE ; - -writel (data, ®->cmd_data1); -writel (config, ®->cnfg); -} -#define TPS62366A_I2C_ADDR 0xC0#define TPS62366A_SET1_REG 0x01#define TPS62366A_SET1_DATA (0x4600 | TPS62366A_SET1_REG)
@@ -45,7 +28,9 @@ void tegra_i2c_ll_write_data(uint data, uint config)#define TPS65911_VDDCTRL_SR_REG 0x27#define TPS65911_VDDCTRL_OP_DATA (0x2400 | TPS65911_VDDCTRL_OP_REG)#define TPS65911_VDDCTRL_SR_DATA (0x0100 | TPS65911_VDDCTRL_SR_REG) -#define I2C_SEND_2_BYTES 0x0A02 + +/* In case this function is not defined */ +__weak void pmic_enable_cpu_vdd (void ) {}static void enable_cpu_power_rail (void ) {
@@ -59,12 +44,12 @@ static void enable_cpu_power_rail(void)/* Set VDD_CORE to 1.200V. */ #ifdef CONFIG_TEGRA_VDD_CORE_TPS62366A_SET1 -tegra_i2c_ll_write_addr (TPS62366A_I2C_ADDR ,2 ); -tegra_i2c_ll_write_data (TPS62366A_SET1_DATA ,I2C_SEND_2_BYTES ); +tegra_i2c_ll_write (TPS62366A_I2C_ADDR , +TPS62366A_SET1_DATA );#endif #ifdef CONFIG_TEGRA_VDD_CORE_TPS62361B_SET3 -tegra_i2c_ll_write_addr (TPS62361B_I2C_ADDR ,2 ); -tegra_i2c_ll_write_data (TPS62361B_SET3_DATA ,I2C_SEND_2_BYTES ); +tegra_i2c_ll_write (TPS62361B_I2C_ADDR , +TPS62361B_SET3_DATA );#endif udelay (1000 );
@@ -72,10 +57,11 @@ static void enable_cpu_power_rail(void)* Bring up CPU VDD via the TPS65911x PMIC on the DVC I2C bus. * First set VDD to 1.0125V, then enable the VDD regulator. */ -tegra_i2c_ll_write_addr (TPS65911_I2C_ADDR ,2 ); -tegra_i2c_ll_write_data (TPS65911_VDDCTRL_OP_DATA ,I2C_SEND_2_BYTES ); +tegra_i2c_ll_write (TPS65911_I2C_ADDR , +TPS65911_VDDCTRL_OP_DATA );udelay (1000 ); -tegra_i2c_ll_write_data (TPS65911_VDDCTRL_SR_DATA ,I2C_SEND_2_BYTES ); +tegra_i2c_ll_write (TPS65911_I2C_ADDR , +TPS65911_VDDCTRL_SR_DATA );udelay (10 *1000 ); }
@@ -142,6 +128,7 @@ void start_cpu(u32 reset_vector)/* Enable VDD_CPU */ enable_cpu_power_rail (); +pmic_enable_cpu_vdd ();set_cpu_running (0 );
Signature · 1 line
2.37.2
PATCH v3 11/16 board: tegra124: switch to updated pre-dm i2c write
In reply to Svyatoslav RyhelConfigure PMIC for early stages using updated i2c write.
--- board/nvidia/venice2/as3722_init.c | 65 ++++++++++++-------- board/nvidia/venice2/as3722_init.h | 43 ------------- board/toradex/apalis-tk1/as3722_init.c | 85 ++++++++++++++------------ board/toradex/apalis-tk1/as3722_init.h | 40 ------------ 4 files changed, 88 insertions(+), 145 deletions(-) delete mode 100644 board/nvidia/venice2/as3722_init.h delete mode 100644 board/toradex/apalis-tk1/as3722_init.h
board/nvidia/venice2/as3722_init.c +41 -24
@@ -9,25 +9,42 @@#include <asm/io.h> #include <asm/arch-tegra/tegra_i2c.h> #include <linux/delay.h> -#include "as3722_init.h" -/* AS3722-PMIC-specific early init code - get CPU rails up, etc */ +/* AS3722-PMIC-specific early init regs */ -void tegra_i2c_ll_write_addr (uint addr,uint config) -{ -struct i2c_ctlr *reg = (struct i2c_ctlr *)TEGRA_DVC_BASE ; +#define AS3722_I2C_ADDR 0x80 -writel (addr, ®->cmd_addr0); -writel (config, ®->cnfg); -} +#define AS3722_SD0VOLTAGE_REG 0x00/* CPU */ +#define AS3722_SD1VOLTAGE_REG 0x01/* CORE, already set by OTP */ +#define AS3722_SD6VOLTAGE_REG 0x06/* GPU */ +#define AS3722_SDCONTROL_REG 0x4D -void tegra_i2c_ll_write_data (uint data,uint config) -{ -struct i2c_ctlr *reg = (struct i2c_ctlr *)TEGRA_DVC_BASE ; +#define AS3722_LDO2VOLTAGE_REG 0x12/* VPP_FUSE */ +#define AS3722_LDO6VOLTAGE_REG 0x16/* VDD_SDMMC */ +#define AS3722_LDCONTROL_REG 0x4E -writel (data, ®->cmd_data1); -writel (config, ®->cnfg); -} +#if defined(CONFIG_TARGET_VENICE2 ) +#define AS3722_SD0VOLTAGE_DATA (0x2800 | AS3722_SD0VOLTAGE_REG) +#else /* TK1 or Nyan-Big */ +#define AS3722_SD0VOLTAGE_DATA (0x3C00 | AS3722_SD0VOLTAGE_REG) +#endif +#define AS3722_SD0CONTROL_DATA (0x0100 | AS3722_SDCONTROL_REG) + +#if defined(CONFIG_TARGET_JETSON_TK1 ) || defined(CONFIG_TARGET_CEI_TK1_SOM ) +#define AS3722_SD1VOLTAGE_DATA (0x2800 | AS3722_SD1VOLTAGE_REG) +#define AS3722_SD1CONTROL_DATA (0x0200 | AS3722_SDCONTROL_REG) +#endif + +#define AS3722_SD6CONTROL_DATA (0x4000 | AS3722_SDCONTROL_REG) +#define AS3722_SD6VOLTAGE_DATA (0x2800 | AS3722_SD6VOLTAGE_REG) + +#define AS3722_LDO2CONTROL_DATA (0x0400 | AS3722_LDCONTROL_REG) +#define AS3722_LDO2VOLTAGE_DATA (0x1000 | AS3722_LDO2VOLTAGE_REG) + +#define AS3722_LDO6CONTROL_DATA (0x4000 | AS3722_LDCONTROL_REG) +#define AS3722_LDO6VOLTAGE_DATA (0x3F00 | AS3722_LDO6VOLTAGE_REG) + +/* AS3722-PMIC-specific early init code - get CPU rails up, etc */ void pmic_enable_cpu_vdd (void ) {
@@ -37,8 +54,8 @@ void pmic_enable_cpu_vdd(void)/* Set up VDD_CORE, for boards where OTP is incorrect*/ debug ("%s: Setting VDD_CORE via AS3722 reg 1\n" , __func__);/* Configure VDD_CORE via the AS3722 PMIC on the PWR I2C bus */ -tegra_i2c_ll_write_addr (AS3722_I2C_ADDR ,2 ); -tegra_i2c_ll_write_data (AS3722_SD1VOLTAGE_DATA ,I2C_SEND_2_BYTES ); +tegra_i2c_ll_write (AS3722_I2C_ADDR , +AS3722_SD1VOLTAGE_DATA );/* * Don't write SDCONTROL - it's already 0x7F, i.e. all SDs enabled. * tegra_i2c_ll_write_data(AS3722_SD1CONTROL_DATA, I2C_SEND_2_BYTES);
@@ -51,8 +68,8 @@ void pmic_enable_cpu_vdd(void)* Bring up VDD_CPU via the AS3722 PMIC on the PWR I2C bus. * First set VDD to 1.0V, then enable the VDD regulator. */ -tegra_i2c_ll_write_addr (AS3722_I2C_ADDR ,2 ); -tegra_i2c_ll_write_data (AS3722_SD0VOLTAGE_DATA ,I2C_SEND_2_BYTES ); +tegra_i2c_ll_write (AS3722_I2C_ADDR , +AS3722_SD0VOLTAGE_DATA );/* * Don't write SDCONTROL - it's already 0x7F, i.e. all SDs enabled. * tegra_i2c_ll_write_data(AS3722_SD0CONTROL_DATA, I2C_SEND_2_BYTES);
@@ -64,8 +81,8 @@ void pmic_enable_cpu_vdd(void)* Bring up VDD_GPU via the AS3722 PMIC on the PWR I2C bus. * First set VDD to 1.0V, then enable the VDD regulator. */ -tegra_i2c_ll_write_addr (AS3722_I2C_ADDR ,2 ); -tegra_i2c_ll_write_data (AS3722_SD6VOLTAGE_DATA ,I2C_SEND_2_BYTES ); +tegra_i2c_ll_write (AS3722_I2C_ADDR , +AS3722_SD6VOLTAGE_DATA );/* * Don't write SDCONTROL - it's already 0x7F, i.e. all SDs enabled. * tegra_i2c_ll_write_data(AS3722_SD6CONTROL_DATA, I2C_SEND_2_BYTES);
@@ -77,8 +94,8 @@ void pmic_enable_cpu_vdd(void)* Bring up VPP_FUSE via the AS3722 PMIC on the PWR I2C bus. * First set VDD to 1.2V, then enable the VDD regulator. */ -tegra_i2c_ll_write_addr (AS3722_I2C_ADDR ,2 ); -tegra_i2c_ll_write_data (AS3722_LDO2VOLTAGE_DATA ,I2C_SEND_2_BYTES ); +tegra_i2c_ll_write (AS3722_I2C_ADDR , +AS3722_LDO2VOLTAGE_DATA );/* * Don't write LDCONTROL - it's already 0xFF, i.e. all LDOs enabled. * tegra_i2c_ll_write_data(AS3722_LDO2CONTROL_DATA, I2C_SEND_2_BYTES);
@@ -93,8 +110,8 @@ void pmic_enable_cpu_vdd(void)* NOTE: We do this early because doing it later seems to hose the CPU * power rail/partition startup. Need to debug. */ -tegra_i2c_ll_write_addr (AS3722_I2C_ADDR ,2 ); -tegra_i2c_ll_write_data (AS3722_LDO6VOLTAGE_DATA ,I2C_SEND_2_BYTES ); +tegra_i2c_ll_write (AS3722_I2C_ADDR , +AS3722_LDO6VOLTAGE_DATA );/* * Don't write LDCONTROL - it's already 0xFF, i.e. all LDOs enabled. * tegra_i2c_ll_write_data(AS3722_LDO6CONTROL_DATA, I2C_SEND_2_BYTES);
board/nvidia/venice2/as3722_init.h deleted +0 -43
43 lines not on this page · raw message
board/toradex/apalis-tk1/as3722_init.c +47 -38
143 lines not on this page · raw message
board/toradex/apalis-tk1/as3722_init.h deleted +0 -40
@@ -1,40 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* -* Copyright (c) 2012-2016 Toradex, Inc. -*/ - -/* AS3722-PMIC-specific early init regs */ - -#define AS3722_I2C_ADDR 0x80 - -#define AS3722_SD0VOLTAGE_REG 0x00/* CPU */ -#define AS3722_SD1VOLTAGE_REG 0x01/* CORE, already set by OTP */ -#define AS3722_SD6VOLTAGE_REG 0x06/* GPU */ -#define AS3722_SDCONTROL_REG 0x4D - -#define AS3722_LDO1VOLTAGE_REG 0x11/* VDD_SDMMC1 */ -#define AS3722_LDO2VOLTAGE_REG 0x12/* VPP_FUSE */ -#define AS3722_LDO6VOLTAGE_REG 0x16/* VDD_SDMMC3 */ -#define AS3722_LDCONTROL_REG 0x4E - -#define AS3722_SD0VOLTAGE_DATA (0x3C00 | AS3722_SD0VOLTAGE_REG) -#define AS3722_SD0CONTROL_DATA (0x0100 | AS3722_SDCONTROL_REG) - -#define AS3722_SD1VOLTAGE_DATA (0x3200 | AS3722_SD1VOLTAGE_REG) -#define AS3722_SD1CONTROL_DATA (0x0200 | AS3722_SDCONTROL_REG) - -#define AS3722_SD6CONTROL_DATA (0x4000 | AS3722_SDCONTROL_REG) -#define AS3722_SD6VOLTAGE_DATA (0x2800 | AS3722_SD6VOLTAGE_REG) - -#define AS3722_LDO1CONTROL_DATA (0x0200 | AS3722_LDCONTROL_REG) -#define AS3722_LDO1VOLTAGE_DATA (0x7F00 | AS3722_LDO1VOLTAGE_REG) - -#define AS3722_LDO2CONTROL_DATA (0x0400 | AS3722_LDCONTROL_REG) -#define AS3722_LDO2VOLTAGE_DATA (0x1000 | AS3722_LDO2VOLTAGE_REG) - -#define AS3722_LDO6CONTROL_DATA (0x4000 | AS3722_LDCONTROL_REG) -#define AS3722_LDO6VOLTAGE_DATA (0x3F00 | AS3722_LDO6VOLTAGE_REG) - -#define I2C_SEND_2_BYTES 0x0A02 - -void pmic_enable_cpu_vdd (void );
Signature · 1 line
2.37.2
PATCH v3 12/16 board: tegra30: switch to updated pre-dm i2c write
In reply to Svyatoslav RyhelConfigure PMIC voltages for early stages using updated early i2c write.
--- arch/arm/mach-tegra/tegra30/Kconfig | 8 ---- arch/arm/mach-tegra/tegra30/cpu.c | 36 ----------------- board/avionic-design/tec-ng/Makefile | 4 +- board/avionic-design/tec-ng/tec-ng-spl.c | 34 ++++++++++++++++ board/nvidia/beaver/Makefile | 2 + board/nvidia/beaver/beaver-spl.c | 43 +++++++++++++++++++++ board/nvidia/cardhu/Makefile | 4 +- board/nvidia/cardhu/cardhu-spl.c | 43 +++++++++++++++++++++ board/toradex/apalis_t30/Makefile | 2 + board/toradex/apalis_t30/apalis_t30-spl.c | 34 ++++++++++++++++ board/toradex/colibri_t30/Makefile | 2 + board/toradex/colibri_t30/colibri_t30-spl.c | 34 ++++++++++++++++ 12 files changed, 200 insertions(+), 46 deletions(-) create mode 100644 board/avionic-design/tec-ng/tec-ng-spl.c create mode 100644 board/nvidia/beaver/beaver-spl.c create mode 100644 board/nvidia/cardhu/cardhu-spl.c create mode 100644 board/toradex/apalis_t30/apalis_t30-spl.c create mode 100644 board/toradex/colibri_t30/colibri_t30-spl.c
arch/arm/mach-tegra/tegra30/Kconfig +0 -8
@@ -1,11 +1,5 @@ if TEGRA30 -config TEGRA_VDD_CORE_TPS62361B_SET3 - bool - -config TEGRA_VDD_CORE_TPS62366A_SET1 - bool - choice prompt "Tegra30 board select" optional
@@ -17,12 +11,10 @@ config TARGET_APALIS_T30 config TARGET_BEAVER bool "NVIDIA Tegra30 Beaver evaluation board" select BOARD_LATE_INIT - select TEGRA_VDD_CORE_TPS62366A_SET1 config TARGET_CARDHU bool "NVIDIA Tegra30 Cardhu evaluation board" select BOARD_LATE_INIT - select TEGRA_VDD_CORE_TPS62361B_SET3 config TARGET_COLIBRI_T30 bool "Toradex Colibri T30 board"
arch/arm/mach-tegra/tegra30/cpu.c +0 -36
@@ -15,20 +15,6 @@#include <linux/delay.h> #include "../cpu.h" -#define TPS62366A_I2C_ADDR 0xC0 -#define TPS62366A_SET1_REG 0x01 -#define TPS62366A_SET1_DATA (0x4600 | TPS62366A_SET1_REG) - -#define TPS62361B_I2C_ADDR 0xC0 -#define TPS62361B_SET3_REG 0x03 -#define TPS62361B_SET3_DATA (0x4600 | TPS62361B_SET3_REG) - -#define TPS65911_I2C_ADDR 0x5A -#define TPS65911_VDDCTRL_OP_REG 0x28 -#define TPS65911_VDDCTRL_SR_REG 0x27 -#define TPS65911_VDDCTRL_OP_DATA (0x2400 | TPS65911_VDDCTRL_OP_REG) -#define TPS65911_VDDCTRL_SR_DATA (0x0100 | TPS65911_VDDCTRL_SR_REG) -/* In case this function is not defined */ __weak void pmic_enable_cpu_vdd (void ) {}
@@ -41,28 +27,6 @@ static void enable_cpu_power_rail(void) reg =readl (&pmc->pmc_cntrl); reg |=CPUPWRREQ_OE ;writel (reg, &pmc->pmc_cntrl); - -/* Set VDD_CORE to 1.200V. */ -#ifdef CONFIG_TEGRA_VDD_CORE_TPS62366A_SET1 -tegra_i2c_ll_write (TPS62366A_I2C_ADDR , -TPS62366A_SET1_DATA ); -#endif -#ifdef CONFIG_TEGRA_VDD_CORE_TPS62361B_SET3 -tegra_i2c_ll_write (TPS62361B_I2C_ADDR , -TPS62361B_SET3_DATA ); -#endif -udelay (1000 ); - -/* -* Bring up CPU VDD via the TPS65911x PMIC on the DVC I2C bus. -* First set VDD to 1.0125V, then enable the VDD regulator. -*/ -tegra_i2c_ll_write (TPS65911_I2C_ADDR , -TPS65911_VDDCTRL_OP_DATA ); -udelay (1000 ); -tegra_i2c_ll_write (TPS65911_I2C_ADDR , -TPS65911_VDDCTRL_SR_DATA ); -udelay (10 *1000 ); }/**
board/avionic-design/tec-ng/Makefile +3 -1
@@ -3,4 +3,6 @@ # (C) Copyright 2013 # Avionic Design GmbH <www.avionic-design.de> -obj-y := ../common/tamonten-ng.o +obj-$(CONFIG_SPL_BUILD) += tec-ng-spl.o + +obj-y += ../common/tamonten-ng.o
board/avionic-design/tec-ng/tec-ng-spl.c new file +34 -0
@@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* (C) Copyright 2010-2013 +* NVIDIA Corporation <www.nvidia.com> +* +* (C) Copyright 2021 +* Svyatoslav Ryhel <[email protected]> +*/ + +#include <common.h> +#include <asm/arch-tegra/tegra_i2c.h> +#include <linux/delay.h> + +/* I2C addr is in 8 bit */ +#define TPS65911_I2C_ADDR 0x5A +#define TPS65911_VDDCTRL_OP_REG 0x28 +#define TPS65911_VDDCTRL_SR_REG 0x27 +#define TPS65911_VDDCTRL_OP_DATA (0x2400 | TPS65911_VDDCTRL_OP_REG) +#define TPS65911_VDDCTRL_SR_DATA (0x0100 | TPS65911_VDDCTRL_SR_REG) + +void pmic_enable_cpu_vdd (void ) +{ +/* +* Bring up CPU VDD via the TPS65911x PMIC on the DVC I2C bus. +* First set VDD to 1.0125V, then enable the VDD regulator. +*/ +udelay (1000 ); +tegra_i2c_ll_write (TPS65911_I2C_ADDR , +TPS65911_VDDCTRL_OP_DATA ); +udelay (1000 ); +tegra_i2c_ll_write (TPS65911_I2C_ADDR , +TPS65911_VDDCTRL_SR_DATA ); +udelay (10 *1000 ); +}
board/nvidia/beaver/Makefile +2 -0
@@ -2,4 +2,6 @@ # # Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +obj-$(CONFIG_SPL_BUILD) += beaver-spl.o + obj-y = ../cardhu/cardhu.o
board/nvidia/beaver/beaver-spl.c new file +43 -0
43 lines not on this page · raw message
board/nvidia/cardhu/Makefile +3 -1
@@ -3,4 +3,6 @@ # (C) Copyright 2010-2012 # NVIDIA Corporation <www.nvidia.com> -obj-y := cardhu.o +obj-$(CONFIG_SPL_BUILD) += cardhu-spl.o + +obj-y += cardhu.o
board/nvidia/cardhu/cardhu-spl.c new file +43 -0
43 lines not on this page · raw message
board/toradex/apalis_t30/Makefile +2 -0
@@ -1,4 +1,6 @@ # Copyright (c) 2014 Marcel Ziswiler # SPDX-License-Identifier: GPL-2.0+ +obj-$(CONFIG_SPL_BUILD) += apalis_t30-spl.o + obj-y += apalis_t30.o
board/toradex/apalis_t30/apalis_t30-spl.c new file +34 -0
@@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* (C) Copyright 2010-2013 +* NVIDIA Corporation <www.nvidia.com> +* +* (C) Copyright 2021 +* Svyatoslav Ryhel <[email protected]> +*/ + +#include <common.h> +#include <asm/arch-tegra/tegra_i2c.h> +#include <linux/delay.h> + +/* I2C addr is in 8 bit */ +#define TPS65911_I2C_ADDR 0x5A +#define TPS65911_VDDCTRL_OP_REG 0x28 +#define TPS65911_VDDCTRL_SR_REG 0x27 +#define TPS65911_VDDCTRL_OP_DATA (0x2400 | TPS65911_VDDCTRL_OP_REG) +#define TPS65911_VDDCTRL_SR_DATA (0x0100 | TPS65911_VDDCTRL_SR_REG) + +void pmic_enable_cpu_vdd (void ) +{ +/* +* Bring up CPU VDD via the TPS65911x PMIC on the DVC I2C bus. +* First set VDD to 1.0125V, then enable the VDD regulator. +*/ +udelay (1000 ); +tegra_i2c_ll_write (TPS65911_I2C_ADDR , +TPS65911_VDDCTRL_OP_DATA ); +udelay (1000 ); +tegra_i2c_ll_write (TPS65911_I2C_ADDR , +TPS65911_VDDCTRL_SR_DATA ); +udelay (10 *1000 ); +}
board/toradex/colibri_t30/Makefile +2 -0
@@ -1,4 +1,6 @@ # Copyright (c) 2013-2014 Stefan Agner # SPDX-License-Identifier: GPL-2.0+ +obj-$(CONFIG_SPL_BUILD) += colibri_t30-spl.o + obj-y += colibri_t30.o
board/toradex/colibri_t30/colibri_t30-spl.c new file +34 -0
@@ -0,0 +1,34 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* +* (C) Copyright 2010-2013 +* NVIDIA Corporation <www.nvidia.com> +* +* (C) Copyright 2021 +* Svyatoslav Ryhel <[email protected]> +*/ + +#include <common.h> +#include <asm/arch-tegra/tegra_i2c.h> +#include <linux/delay.h> + +/* I2C addr is in 8 bit */ +#define TPS65911_I2C_ADDR 0x5A +#define TPS65911_VDDCTRL_OP_REG 0x28 +#define TPS65911_VDDCTRL_SR_REG 0x27 +#define TPS65911_VDDCTRL_OP_DATA (0x2400 | TPS65911_VDDCTRL_OP_REG) +#define TPS65911_VDDCTRL_SR_DATA (0x0100 | TPS65911_VDDCTRL_SR_REG) + +void pmic_enable_cpu_vdd (void ) +{ +/* +* Bring up CPU VDD via the TPS65911x PMIC on the DVC I2C bus. +* First set VDD to 1.0125V, then enable the VDD regulator. +*/ +udelay (1000 ); +tegra_i2c_ll_write (TPS65911_I2C_ADDR , +TPS65911_VDDCTRL_OP_DATA ); +udelay (1000 ); +tegra_i2c_ll_write (TPS65911_I2C_ADDR , +TPS65911_VDDCTRL_SR_DATA ); +udelay (10 *1000 ); +}
Signature · 1 line
2.37.2
PATCH v3 13/16 ARM: tegra: expose crypto module for all Tegra SoCs
In reply to Svyatoslav RyhelMove crypto module from T20 only into common Tegra dir.
---
arch/arm/mach-tegra/Kconfig | 5 +++++
arch/arm/mach-tegra/Makefile | 1 +
arch/arm/mach-tegra/{tegra20 => }/crypto.c | 0
arch/arm/mach-tegra/{tegra20 => }/crypto.h | 0
arch/arm/mach-tegra/tegra20/Kconfig | 1 +
arch/arm/mach-tegra/tegra20/Makefile | 2 +-
6 files changed, 8 insertions(+), 1 deletion(-)
rename arch/arm/mach-tegra/{tegra20 => }/crypto.c (100%)
rename arch/arm/mach-tegra/{tegra20 => }/crypto.h (100%)arch/arm/mach-tegra/Kconfig +5 -0
@@ -15,6 +15,11 @@ config SPL_SERIAL config TEGRA_CLKRST bool +config TEGRA_CRYPTO + bool "Tegra AES128 crypto module" + select AES + default n + config TEGRA_GP_PADCTRL bool
arch/arm/mach-tegra/Makefile +1 -0
@@ -16,6 +16,7 @@ obj-$(CONFIG_TEGRA_GP_PADCTRL) += ap.o obj-y += board.o board2.o obj-y += cache.o obj-$(CONFIG_TEGRA_CLKRST) += clock.o +obj-$(CONFIG_$(SPL_)TEGRA_CRYPTO) += crypto.o obj-$(CONFIG_TEGRA_PINCTRL) += pinmux-common.o obj-$(CONFIG_TEGRA_PMC) += powergate.o obj-y += xusb-padctl-dummy.o
arch/arm/mach-tegra/crypto.c renamed from arch/arm/mach-tegra/tegra20/crypto.c +0 -0
arch/arm/mach-tegra/crypto.h renamed from arch/arm/mach-tegra/tegra20/crypto.h +0 -0
arch/arm/mach-tegra/tegra20/Kconfig +1 -0
@@ -3,6 +3,7 @@ if TEGRA20 config TEGRA_LP0 bool select TEGRA_CLOCK_SCALING + select TEGRA_CRYPTO config TEGRA_PMU bool
arch/arm/mach-tegra/tegra20/Makefile +1 -1
@@ -13,6 +13,6 @@ CFLAGS_warmboot_avp.o = -march=armv4t -U__LINUX_ARM_ARCH__ \ CFLAGS_REMOVE_warmboot_avp.o := $(LTO_CFLAGS) obj-y += clock.o funcmux.o pinmux.o -obj-$(CONFIG_TEGRA_LP0) += warmboot.o crypto.o warmboot_avp.o +obj-$(CONFIG_TEGRA_LP0) += warmboot.o warmboot_avp.o obj-$(CONFIG_TEGRA_CLOCK_SCALING) += emc.o obj-$(CONFIG_TEGRA_PMU) += pmu.o
Signature · 1 line
2.37.2
PATCH v3 14/16 ARM: tegra: crypto: extend crypto functional
In reply to Svyatoslav RyhelAdd support for encryption, decryption and signinig with non-zero key saving backward compatibility.
--- arch/arm/include/asm/arch-tegra/crypto.h | 47 ++++++++++++++++++ arch/arm/mach-tegra/crypto.c | 63 +++++++++++++++++------- arch/arm/mach-tegra/crypto.h | 19 ------- 3 files changed, 91 insertions(+), 38 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra/crypto.h delete mode 100644 arch/arm/mach-tegra/crypto.h
arch/arm/include/asm/arch-tegra/crypto.h new file +47 -0
@@ -0,0 +1,47 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (c) 2011 The Chromium OS Authors. +* (C) Copyright 2010 - 2011 NVIDIA Corporation <www.nvidia.com> +*/ + +#ifndef _CRYPTO_H_ +#define _CRYPTO_H_ + +/** +* Sign a block of data +* +* \param source Source data +* \param length Size of source data +* \param signature Destination address for signature, AES_KEY_LENGTH bytes +*/ +int sign_data_block (u8 *source,unsigned int length,u8 *signature); + +/** +* Sign an encrypted block of data +* +* \param source Source data +* \param length Size of source data +* \param signature Destination address for signature, AES_KEY_LENGTH bytes +* \param key AES128 encryption key +*/ +int sign_enc_data_block (u8 *source,unsigned int length,u8 *signature,u8 *key); + +/** +* Encrypt a block of data +* +* \param source Source data +* \param length Size of source data +* \param key AES128 encryption key +*/ +int encrypt_data_block (u8 *source,unsigned int length,u8 *key); + +/** +* Decrypt a block of data +* +* \param source Source data +* \param length Size of source data +* \param key AES128 encryption key +*/ +int decrypt_data_block (u8 *source,unsigned int length,u8 *key); + +#endif /* #ifndef _CRYPTO_H_ */
arch/arm/mach-tegra/crypto.c +44 -19
115 lines not on this page · raw message
arch/arm/mach-tegra/crypto.h deleted +0 -19
@@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* -* Copyright (c) 2011 The Chromium OS Authors. -* (C) Copyright 2010 - 2011 NVIDIA Corporation <www.nvidia.com> -*/ - -#ifndef _CRYPTO_H_ -#define _CRYPTO_H_ - -/** -* Sign a block of data -* -* \param source Source data -* \param length Size of source data -* \param signature Destination address for signature, AES_KEY_LENGTH bytes -*/ -int sign_data_block (u8 *source,unsigned length,u8 *signature); - -#endif /* #ifndef _CRYPTO_H_ */
Signature · 1 line
2.37.2
PATCH v3 15/16 ARM: tegra30: implement BCT patching
In reply to Svyatoslav RyhelFrom: Ramin Khonsari <[email protected]>
This function allows updating bootloader from u-boot on production devices without need in host PC.
Be aware! It works only with re-crypted BCT.
--- arch/arm/mach-tegra/Kconfig | 9 ++++ arch/arm/mach-tegra/tegra30/Makefile | 1 + arch/arm/mach-tegra/tegra30/bct.c | 79 ++++++++++++++++++++++++++++ arch/arm/mach-tegra/tegra30/bct.h | 42 +++++++++++++++ 4 files changed, 131 insertions(+) create mode 100644 arch/arm/mach-tegra/tegra30/bct.c create mode 100644 arch/arm/mach-tegra/tegra30/bct.h
arch/arm/mach-tegra/Kconfig +9 -0
@@ -229,4 +229,13 @@ config CMD_ENTERRCM for mechanical button actuators, or hooking up relays/... to the button. +config CMD_EBTUPDATE + bool "Enable 'ebtupdate' command" + depends on TEGRA30 + select TEGRA_CRYPTO + help + Updating u-boot from within u-boot in rather complex or even + impossible on production devices. To make it easier procedure of + re-cryption was created. If your device was re-crypted choose Y. + endif
arch/arm/mach-tegra/tegra30/Makefile +1 -0
@@ -3,5 +3,6 @@ # Copyright (c) 2010-2012, NVIDIA CORPORATION. All rights reserved. obj-$(CONFIG_SPL_BUILD) += cpu.o +obj-$(CONFIG_$(SPL_)CMD_EBTUPDATE) += bct.o obj-y += clock.o funcmux.o pinmux.o
arch/arm/mach-tegra/tegra30/bct.c new file +79 -0
79 lines not on this page · raw message
arch/arm/mach-tegra/tegra30/bct.h new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
2.37.2
PATCH v3 16/16 ARM: tegra20: implement BCT patching
In reply to Svyatoslav RyhelThis function allows updating bootloader from u-boot on production devices without need in host PC.
Be aware! It works only with re-crypt BCT.
--- arch/arm/mach-tegra/Kconfig | 2 +- arch/arm/mach-tegra/tegra20/Makefile | 5 +- arch/arm/mach-tegra/tegra20/bct.c | 79 ++++++++++++++++++++++++++++ arch/arm/mach-tegra/tegra20/bct.h | 42 +++++++++++++++ doc/usage/cmd/ebtupdate.rst | 70 ++++++++++++++++++++++++ 5 files changed, 194 insertions(+), 4 deletions(-) create mode 100644 arch/arm/mach-tegra/tegra20/bct.c create mode 100644 arch/arm/mach-tegra/tegra20/bct.h create mode 100644 doc/usage/cmd/ebtupdate.rst
arch/arm/mach-tegra/Kconfig +1 -1
@@ -231,7 +231,7 @@ config CMD_ENTERRCM config CMD_EBTUPDATE bool "Enable 'ebtupdate' command" - depends on TEGRA30 + depends on TEGRA20 || TEGRA30 select TEGRA_CRYPTO help Updating u-boot from within u-boot in rather complex or even
arch/arm/mach-tegra/tegra20/Makefile +2 -3
@@ -2,9 +2,8 @@ # # (C) Copyright 2010,2011 Nvidia Corporation. -ifdef CONFIG_SPL_BUILD -obj-y += cpu.o -endif +obj-$(CONFIG_SPL_BUILD) += cpu.o +obj-$(CONFIG_$(SPL_)CMD_EBTUPDATE) += bct.o # The AVP is ARMv4T architecture so we must use special compiler # flags for any startup files it might use.
arch/arm/mach-tegra/tegra20/bct.c new file +79 -0
79 lines not on this page · raw message
arch/arm/mach-tegra/tegra20/bct.h new file +42 -0
42 lines not on this page · raw message
doc/usage/cmd/ebtupdate.rst new file +70 -0
70 lines not on this page · raw message
Signature · 1 line
2.37.2
I've applied these (v3) to TOT u-boot-tegra/master OK, and 'buildman tegra' is OK.
I don't have the HW to test all of these combos (T20, T30, T114, T124) - they're mothballed in favor of my current work on T210/T186/T194/T234 (the last two w/no U-Boot). So I'd appreciate any 'Tested-by's from anyone (Thierry, Marcel, Marek, etc.) that might be using these older boards still. This is a substantive set of changes, and I don't want to break anything.
BTW - you can remove Stephen Warren from your CC list - he's moved out of the group that's concerned w/L4T & upstream bootloaders, and probably doesn't want to see this in his inbox any longer.
Thanks,
Tom
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Friday, February 3, 2023 2:26 AM
To: Tom Warren <[email protected]>; Stephen Warren <[email protected]>; Marcel Ziswiler <[email protected]>; Allen Martin <[email protected]>; Jagan Teki <[email protected]>; Lukasz Majewski <[email protected]>; Marek Vasut <[email protected]>; Svyatoslav Ryhel <[email protected]>; Ramin Khonsari <[email protected]>; Thierry Reding <[email protected]>; Maxim Schwalm <[email protected]>; Dmitry Osipenko <[email protected]>
Cc: [email protected]
Subject: [PATCH v3 00/16] General Tegra improvements
External email: Use caution opening links or attachments
List of changes in patch set:
- add missing EXTPERIPH clocks for t30
- swap host1x and disp1 clock parents (as they should be)
- add clk_id_to_pll_id and clock_decode_pair helpers to use dts deeper (in tegra clocks often go in pair child - parent)
- include PLLD setup in T30 (DISP1 may use it as parent on some device)
- fix Tegra PWM parent clock inline with linux
- Tegra SLINK: patch to accept any word length (unlike 8bit aligned which was before)
- provide default USB gadget setup for existing Nvidia boards
- add late init function to be able to configure pre-boot stage (like uncovering serial number or setting mac address)
- create common pre-dm i2c write for PMIC (used on T30 and T124 to configure basic PMIC voltages required to boot like cpu and core voltages)
- expose crypto module for all Tegra SoCs and implement BCT patching (ability to update bootloader from u-boot on production devices without need in host PC)
---
Changelog from v2
- fixed T114 TEGRA114_CLK_PLL_E_OUT0
- adjusted pre-dm i2c write commit description
- added description file for ebtupdate command
- minor improvements of bct.c comments
Changelog from v1
- rebased to latest u-boot master
- PLLD setup for T30 moved specifically into T30 area
---
Maxim Schwalm (1):
ARM: tegra: provide default USB gadget setup
Ramin Khonsari (1):
ARM: tegra30: implement BCT patching
Svyatoslav Ryhel (14):
tegra30: clock: add EXTPERIPH
ARM: t20/t30: swap host1x and disp1 clock parents
ARM: tegra: clock: add clk_id_to_pll_id helper
ARM: tegra: clock: add clock_decode_pair helper
ARM: tegra30: add PLLD to pll setup
ARM: tegra: Fix Tegra PWM parent clock
spi: tegra20_slink: accept any word length
ARM: tegra: add late init support
ARM: tegra: create common pre-dm i2c write
board: tegra124: switch to updated pre-dm i2c write
board: tegra30: switch to updated pre-dm i2c write
ARM: tegra: expose crypto module for all Tegra SoCs
ARM: tegra: crypto: extend crypto functional
ARM: tegra20: implement BCT patching
arch/arm/dts/tegra114.dtsi | 2 +-
arch/arm/dts/tegra124.dtsi | 2 +-
arch/arm/include/asm/arch-tegra/clock.h | 21 +++++
arch/arm/include/asm/arch-tegra/crypto.h | 47 ++++++++++
arch/arm/include/asm/arch-tegra/sys_proto.h | 6 ++
arch/arm/include/asm/arch-tegra/tegra_i2c.h | 17 ++++
.../include/asm/arch-tegra30/clock-tables.h | 6 +-
arch/arm/mach-tegra/Kconfig | 14 +++
arch/arm/mach-tegra/Makefile | 1 +
arch/arm/mach-tegra/board2.c | 2 +
arch/arm/mach-tegra/clock.c | 23 +++++
arch/arm/mach-tegra/cpu.h | 1 -
arch/arm/mach-tegra/{tegra20 => }/crypto.c | 63 +++++++++----
arch/arm/mach-tegra/tegra114/clock.c | 39 +++++++-
arch/arm/mach-tegra/tegra124/clock.c | 40 ++++++++-
arch/arm/mach-tegra/tegra124/cpu.c | 4 +
arch/arm/mach-tegra/tegra20/Kconfig | 1 +
arch/arm/mach-tegra/tegra20/Makefile | 7 +-
arch/arm/mach-tegra/tegra20/bct.c | 79 ++++++++++++++++
arch/arm/mach-tegra/tegra20/bct.h | 42 +++++++++
arch/arm/mach-tegra/tegra20/clock.c | 43 ++++++++-
arch/arm/mach-tegra/tegra20/crypto.h | 19 ----
arch/arm/mach-tegra/tegra210/clock.c | 39 +++++++-
arch/arm/mach-tegra/tegra30/Kconfig | 8 --
arch/arm/mach-tegra/tegra30/Makefile | 1 +
arch/arm/mach-tegra/tegra30/bct.c | 79 ++++++++++++++++
arch/arm/mach-tegra/tegra30/bct.h | 42 +++++++++
arch/arm/mach-tegra/tegra30/clock.c | 90 +++++++++++++++++--
arch/arm/mach-tegra/tegra30/cpu.c | 55 +-----------
board/avionic-design/tec-ng/Makefile | 4 +-
board/avionic-design/tec-ng/tec-ng-spl.c | 34 +++++++
board/nvidia/beaver/Makefile | 2 +
board/nvidia/beaver/beaver-spl.c | 43 +++++++++
board/nvidia/cardhu/Makefile | 4 +-
board/nvidia/cardhu/cardhu-spl.c | 43 +++++++++
board/nvidia/venice2/as3722_init.c | 65 +++++++++-----
board/nvidia/venice2/as3722_init.h | 43 ---------
board/toradex/apalis-tk1/as3722_init.c | 85 ++++++++++--------
board/toradex/apalis-tk1/as3722_init.h | 40 ---------
board/toradex/apalis_t30/Makefile | 2 +
board/toradex/apalis_t30/apalis_t30-spl.c | 34 +++++++
board/toradex/colibri_t30/Makefile | 2 +
board/toradex/colibri_t30/colibri_t30-spl.c | 34 +++++++
configs/beaver_defconfig | 3 -
configs/cei-tk1-som_defconfig | 3 -
configs/dalmore_defconfig | 3 -
configs/jetson-tk1_defconfig | 3 -
configs/nyan-big_defconfig | 3 -
configs/p2371-0000_defconfig | 3 -
configs/p2371-2180_defconfig | 3 -
configs/p2571_defconfig | 3 -
configs/p3450-0000_defconfig | 3 -
configs/venice2_defconfig | 3 -
doc/usage/cmd/ebtupdate.rst | 70 +++++++++++++++
drivers/pwm/tegra_pwm.c | 10 ++-
drivers/spi/tegra20_slink.c | 19 ++--
drivers/usb/gadget/Kconfig | 3 +
57 files changed, 1051 insertions(+), 309 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra/crypto.h
rename arch/arm/mach-tegra/{tegra20 => }/crypto.c (68%) create mode 100644 arch/arm/mach-tegra/tegra20/bct.c create mode 100644 arch/arm/mach-tegra/tegra20/bct.h delete mode 100644 arch/arm/mach-tegra/tegra20/crypto.h
create mode 100644 arch/arm/mach-tegra/tegra30/bct.c create mode 100644 arch/arm/mach-tegra/tegra30/bct.h create mode 100644 board/avionic-design/tec-ng/tec-ng-spl.c
create mode 100644 board/nvidia/beaver/beaver-spl.c create mode 100644 board/nvidia/cardhu/cardhu-spl.c delete mode 100644 board/nvidia/venice2/as3722_init.h
delete mode 100644 board/toradex/apalis-tk1/as3722_init.h
create mode 100644 board/toradex/apalis_t30/apalis_t30-spl.c
create mode 100644 board/toradex/colibri_t30/colibri_t30-spl.c
create mode 100644 doc/usage/cmd/ebtupdate.rst--
2.37.2
Thanks! I will shrink mailing list in the next iteration.
Thierry, may you check if these patches do not break anything on your boards. I have tested them on my devices (T20 and T30) without any issues. I am especially interested in T124 pre-dm i2c changes, iirc you have a board I have changed.
Best Regards.
Svyatoslav R.
пт, 3 лют. 2023 р. о 19:30 Tom Warren <[email protected]> пише:
Quoted 144 lines
I've applied these (v3) to TOT u-boot-tegra/master OK, and 'buildman tegra' is OK.
I don't have the HW to test all of these combos (T20, T30, T114, T124) - they're mothballed in favor of my current work on T210/T186/T194/T234 (the last two w/no U-Boot). So I'd appreciate any 'Tested-by's from anyone (Thierry, Marcel, Marek, etc.) that might be using these older boards still. This is a substantive set of changes, and I don't want to break anything.
BTW - you can remove Stephen Warren from your CC list - he's moved out of the group that's concerned w/L4T & upstream bootloaders, and probably doesn't want to see this in his inbox any longer.
Thanks,
Tom
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Friday, February 3, 2023 2:26 AM
To: Tom Warren <[email protected]>; Stephen Warren <[email protected]>; Marcel Ziswiler <[email protected]>; Allen Martin <[email protected]>; Jagan Teki <[email protected]>; Lukasz Majewski <[email protected]>; Marek Vasut <[email protected]>; Svyatoslav Ryhel <[email protected]>; Ramin Khonsari <[email protected]>; Thierry Reding <[email protected]>; Maxim Schwalm <[email protected]>; Dmitry Osipenko <[email protected]>
Cc: [email protected]
Subject: [PATCH v3 00/16] General Tegra improvementsExternal email: Use caution opening links or attachments
List of changes in patch set:
- add missing EXTPERIPH clocks for t30
- swap host1x and disp1 clock parents (as they should be)
- addclk_id_to_pll_idandclock_decode_pairhelpers to use dts deeper (in tegra clocks often go in pair child - parent)
- include PLLD setup in T30 (DISP1 may use it as parent on some device)
- fix Tegra PWM parent clock inline with linux
- Tegra SLINK: patch to accept any word length (unlike 8bit aligned which was before)
- provide default USB gadget setup for existing Nvidia boards
- add late init function to be able to configure pre-boot stage (like uncovering serial number or setting mac address)
- create common pre-dm i2c write for PMIC (used on T30 and T124 to configure basic PMIC voltages required to boot like cpu and core voltages)
- expose crypto module for all Tegra SoCs and implement BCT patching (ability to update bootloader from u-boot on production devices without need in host PC)---
Changelog from v2
- fixed T114TEGRA114_CLK_PLL_E_OUT0
- adjusted pre-dm i2c write commit description
- added description file for ebtupdate command
- minor improvements ofbct.ccommentsChangelog from v1
- rebased to latest u-boot master
- PLLD setup for T30 moved specifically into T30 area
---Maxim Schwalm (1):
ARM: tegra: provide default USB gadget setupRamin Khonsari (1):
ARM: tegra30: implement BCT patchingSvyatoslav Ryhel (14):
tegra30: clock: add EXTPERIPH
ARM: t20/t30: swap host1x and disp1 clock parents
ARM: tegra: clock: addclk_id_to_pll_idhelper
ARM: tegra: clock: addclock_decode_pairhelper
ARM: tegra30: add PLLD to pll setup
ARM: tegra: Fix Tegra PWM parent clock
spi:tegra20_slink: accept any word length
ARM: tegra: add late init support
ARM: tegra: create common pre-dm i2c write
board: tegra124: switch to updated pre-dm i2c write
board: tegra30: switch to updated pre-dm i2c write
ARM: tegra: expose crypto module for all Tegra SoCs
ARM: tegra: crypto: extend crypto functional
ARM: tegra20: implement BCT patchingarch/arm/dts/tegra114.dtsi | 2 +- arch/arm/dts/tegra124.dtsi | 2 +- arch/arm/include/asm/arch-tegra/clock.h | 21 +++++ arch/arm/include/asm/arch-tegra/crypto.h | 47 ++++++++++ arch/arm/include/asm/arch-tegra/sys_proto.h | 6 ++ arch/arm/include/asm/arch-tegra/tegra_i2c.h | 17 ++++ .../include/asm/arch-tegra30/clock-tables.h | 6 +- arch/arm/mach-tegra/Kconfig | 14 +++ arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/board2.c | 2 + arch/arm/mach-tegra/clock.c | 23 +++++ arch/arm/mach-tegra/cpu.h | 1 - arch/arm/mach-tegra/{tegra20 => }/crypto.c | 63 +++++++++---- arch/arm/mach-tegra/tegra114/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra124/clock.c | 40 ++++++++- arch/arm/mach-tegra/tegra124/cpu.c | 4 + arch/arm/mach-tegra/tegra20/Kconfig | 1 + arch/arm/mach-tegra/tegra20/Makefile | 7 +- arch/arm/mach-tegra/tegra20/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra20/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra20/clock.c | 43 ++++++++- arch/arm/mach-tegra/tegra20/crypto.h | 19 ---- arch/arm/mach-tegra/tegra210/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra30/Kconfig | 8 -- arch/arm/mach-tegra/tegra30/Makefile | 1 + arch/arm/mach-tegra/tegra30/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra30/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra30/clock.c | 90 +++++++++++++++++-- arch/arm/mach-tegra/tegra30/cpu.c | 55 +----------- board/avionic-design/tec-ng/Makefile | 4 +- board/avionic-design/tec-ng/tec-ng-spl.c | 34 +++++++ board/nvidia/beaver/Makefile | 2 + board/nvidia/beaver/beaver-spl.c | 43 +++++++++ board/nvidia/cardhu/Makefile | 4 +- board/nvidia/cardhu/cardhu-spl.c | 43 +++++++++ board/nvidia/venice2/as3722_init.c | 65 +++++++++----- board/nvidia/venice2/as3722_init.h | 43 --------- board/toradex/apalis-tk1/as3722_init.c | 85 ++++++++++-------- board/toradex/apalis-tk1/as3722_init.h | 40 --------- board/toradex/apalis_t30/Makefile | 2 + board/toradex/apalis_t30/apalis_t30-spl.c | 34 +++++++ board/toradex/colibri_t30/Makefile | 2 + board/toradex/colibri_t30/colibri_t30-spl.c | 34 +++++++ configs/beaver_defconfig | 3 - configs/cei-tk1-som_defconfig | 3 - configs/dalmore_defconfig | 3 - configs/jetson-tk1_defconfig | 3 - configs/nyan-big_defconfig | 3 - configs/p2371-0000_defconfig | 3 - configs/p2371-2180_defconfig | 3 - configs/p2571_defconfig | 3 - configs/p3450-0000_defconfig | 3 - configs/venice2_defconfig | 3 - doc/usage/cmd/ebtupdate.rst | 70 +++++++++++++++ drivers/pwm/tegra_pwm.c | 10 ++- drivers/spi/tegra20_slink.c | 19 ++-- drivers/usb/gadget/Kconfig | 3 + 57 files changed, 1051 insertions(+), 309 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra/crypto.h rename arch/arm/mach-tegra/{tegra20 => }/crypto.c (68%) create mode 100644 arch/arm/mach-tegra/tegra20/bct.c create mode 100644 arch/arm/mach-tegra/tegra20/bct.h delete mode 100644 arch/arm/mach-tegra/tegra20/crypto.h create mode 100644 arch/arm/mach-tegra/tegra30/bct.c create mode 100644 arch/arm/mach-tegra/tegra30/bct.h create mode 100644 board/avionic-design/tec-ng/tec-ng-spl.c create mode 100644 board/nvidia/beaver/beaver-spl.c create mode 100644 board/nvidia/cardhu/cardhu-spl.c delete mode 100644 board/nvidia/venice2/as3722_init.h delete mode 100644 board/toradex/apalis-tk1/as3722_init.h create mode 100644 board/toradex/apalis_t30/apalis_t30-spl.c create mode 100644 board/toradex/colibri_t30/colibri_t30-spl.c create mode 100644 doc/usage/cmd/ebtupdate.rst--
2.37.2
Where does testing/reviewing stand on these changes? I'd like to submit a PR early next week, but I can't until I know they won't break anything.
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Friday, February 3, 2023 10:40 AM
To: Tom Warren <[email protected]>; Thierry Reding <[email protected]>
Cc: Ramin Khonsari <[email protected]>; Maxim Schwalm <[email protected]>; Dmitry Osipenko <[email protected]>; [email protected]; Allen Martin <[email protected]>; Jagan Teki <[email protected]>; Lukasz Majewski <[email protected]>; Marcel Ziswiler <[email protected]>; Marek Vasut <[email protected]>
Subject: Re: [PATCH v3 00/16] General Tegra improvements
External email: Use caution opening links or attachments
Thanks! I will shrink mailing list in the next iteration.
Thierry, may you check if these patches do not break anything on your boards. I have tested them on my devices (T20 and T30) without any issues. I am especially interested in T124 pre-dm i2c changes, iirc you have a board I have changed.
Best Regards.
Svyatoslav R.
пт, 3 лют. 2023 р. о 19:30 Tom Warren <[email protected]> пише:
Quoted 159 lines
I've applied these (v3) to TOT u-boot-tegra/master OK, and 'buildman tegra' is OK.
I don't have the HW to test all of these combos (T20, T30, T114, T124) - they're mothballed in favor of my current work on T210/T186/T194/T234 (the last two w/no U-Boot). So I'd appreciate any 'Tested-by's from anyone (Thierry, Marcel, Marek, etc.) that might be using these older boards still. This is a substantive set of changes, and I don't want to break anything.
BTW - you can remove Stephen Warren from your CC list - he's moved out of the group that's concerned w/L4T & upstream bootloaders, and probably doesn't want to see this in his inbox any longer.
Thanks,
Tom
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Friday, February 3, 2023 2:26 AM
To: Tom Warren <[email protected]>; Stephen Warren <[email protected]>; Marcel Ziswiler <[email protected]>; Allen Martin <[email protected]>; Jagan Teki <[email protected]>; Lukasz Majewski <[email protected]>; Marek Vasut <[email protected]>; Svyatoslav Ryhel <[email protected]>; Ramin Khonsari <[email protected]>; Thierry Reding <[email protected]>; Maxim Schwalm <[email protected]>; Dmitry Osipenko <[email protected]>
Cc: [email protected]
Subject: [PATCH v3 00/16] General Tegra improvementsExternal email: Use caution opening links or attachments
List of changes in patch set:
- add missing EXTPERIPH clocks for t30
- swap host1x and disp1 clock parents (as they should be)
- addclk_id_to_pll_idandclock_decode_pairhelpers to use dts deeper (in tegra clocks often go in pair child - parent)
- include PLLD setup in T30 (DISP1 may use it as parent on some device)
- fix Tegra PWM parent clock inline with linux
- Tegra SLINK: patch to accept any word length (unlike 8bit aligned which was before)
- provide default USB gadget setup for existing Nvidia boards
- add late init function to be able to configure pre-boot stage (like uncovering serial number or setting mac address)
- create common pre-dm i2c write for PMIC (used on T30 and T124 to configure basic PMIC voltages required to boot like cpu and core voltages)
- expose crypto module for all Tegra SoCs and implement BCT patching (ability to update bootloader from u-boot on production devices without need in host PC)---
Changelog from v2
- fixed T114TEGRA114_CLK_PLL_E_OUT0
- adjusted pre-dm i2c write commit description
- added description file for ebtupdate command
- minor improvements ofbct.ccommentsChangelog from v1
- rebased to latest u-boot master
- PLLD setup for T30 moved specifically into T30 area
---Maxim Schwalm (1):
ARM: tegra: provide default USB gadget setupRamin Khonsari (1):
ARM: tegra30: implement BCT patchingSvyatoslav Ryhel (14):
tegra30: clock: add EXTPERIPH
ARM: t20/t30: swap host1x and disp1 clock parents
ARM: tegra: clock: addclk_id_to_pll_idhelper
ARM: tegra: clock: addclock_decode_pairhelper
ARM: tegra30: add PLLD to pll setup
ARM: tegra: Fix Tegra PWM parent clock
spi:tegra20_slink: accept any word length
ARM: tegra: add late init support
ARM: tegra: create common pre-dm i2c write
board: tegra124: switch to updated pre-dm i2c write
board: tegra30: switch to updated pre-dm i2c write
ARM: tegra: expose crypto module for all Tegra SoCs
ARM: tegra: crypto: extend crypto functional
ARM: tegra20: implement BCT patchingarch/arm/dts/tegra114.dtsi | 2 +- arch/arm/dts/tegra124.dtsi | 2 +- arch/arm/include/asm/arch-tegra/clock.h | 21 +++++ arch/arm/include/asm/arch-tegra/crypto.h | 47 ++++++++++ arch/arm/include/asm/arch-tegra/sys_proto.h | 6 ++ arch/arm/include/asm/arch-tegra/tegra_i2c.h | 17 ++++ .../include/asm/arch-tegra30/clock-tables.h | 6 +- arch/arm/mach-tegra/Kconfig | 14 +++ arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/board2.c | 2 + arch/arm/mach-tegra/clock.c | 23 +++++ arch/arm/mach-tegra/cpu.h | 1 - arch/arm/mach-tegra/{tegra20 => }/crypto.c | 63 +++++++++---- arch/arm/mach-tegra/tegra114/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra124/clock.c | 40 ++++++++- arch/arm/mach-tegra/tegra124/cpu.c | 4 + arch/arm/mach-tegra/tegra20/Kconfig | 1 + arch/arm/mach-tegra/tegra20/Makefile | 7 +- arch/arm/mach-tegra/tegra20/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra20/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra20/clock.c | 43 ++++++++- arch/arm/mach-tegra/tegra20/crypto.h | 19 ---- arch/arm/mach-tegra/tegra210/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra30/Kconfig | 8 -- arch/arm/mach-tegra/tegra30/Makefile | 1 + arch/arm/mach-tegra/tegra30/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra30/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra30/clock.c | 90 +++++++++++++++++-- arch/arm/mach-tegra/tegra30/cpu.c | 55 +----------- board/avionic-design/tec-ng/Makefile | 4 +- board/avionic-design/tec-ng/tec-ng-spl.c | 34 +++++++ board/nvidia/beaver/Makefile | 2 + board/nvidia/beaver/beaver-spl.c | 43 +++++++++ board/nvidia/cardhu/Makefile | 4 +- board/nvidia/cardhu/cardhu-spl.c | 43 +++++++++ board/nvidia/venice2/as3722_init.c | 65 +++++++++----- board/nvidia/venice2/as3722_init.h | 43 --------- board/toradex/apalis-tk1/as3722_init.c | 85 ++++++++++-------- board/toradex/apalis-tk1/as3722_init.h | 40 --------- board/toradex/apalis_t30/Makefile | 2 + board/toradex/apalis_t30/apalis_t30-spl.c | 34 +++++++ board/toradex/colibri_t30/Makefile | 2 + board/toradex/colibri_t30/colibri_t30-spl.c | 34 +++++++ configs/beaver_defconfig | 3 - configs/cei-tk1-som_defconfig | 3 - configs/dalmore_defconfig | 3 - configs/jetson-tk1_defconfig | 3 - configs/nyan-big_defconfig | 3 - configs/p2371-0000_defconfig | 3 - configs/p2371-2180_defconfig | 3 - configs/p2571_defconfig | 3 - configs/p3450-0000_defconfig | 3 - configs/venice2_defconfig | 3 - doc/usage/cmd/ebtupdate.rst | 70 +++++++++++++++ drivers/pwm/tegra_pwm.c | 10 ++- drivers/spi/tegra20_slink.c | 19 ++-- drivers/usb/gadget/Kconfig | 3 + 57 files changed, 1051 insertions(+), 309 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra/crypto.h rename arch/arm/mach-tegra/{tegra20 => }/crypto.c (68%) create mode 100644 arch/arm/mach-tegra/tegra20/bct.c create mode 100644 arch/arm/mach-tegra/tegra20/bct.h delete mode 100644 arch/arm/mach-tegra/tegra20/crypto.h create mode 100644 arch/arm/mach-tegra/tegra30/bct.c create mode 100644 arch/arm/mach-tegra/tegra30/bct.h create mode 100644 board/avionic-design/tec-ng/tec-ng-spl.c create mode 100644 board/nvidia/beaver/beaver-spl.c create mode 100644 board/nvidia/cardhu/cardhu-spl.c delete mode 100644 board/nvidia/venice2/as3722_init.h delete mode 100644 board/toradex/apalis-tk1/as3722_init.h create mode 100644 board/toradex/apalis_t30/apalis_t30-spl.c create mode 100644 board/toradex/colibri_t30/colibri_t30-spl.c create mode 100644 doc/usage/cmd/ebtupdate.rst--
2.37.2
I have asked Thierry to check if his boards work with these changes but got no response from him (at least yet). Others seem to have no interest.
Best regards
Svyatoslav R.
пт, 10 лют. 2023 р. о 18:31 Tom Warren <[email protected]> пише:
Quoted 180 lines
Where does testing/reviewing stand on these changes? I'd like to submit a PR early next week, but I can't until I know they won't break anything.
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Friday, February 3, 2023 10:40 AM
To: Tom Warren <[email protected]>; Thierry Reding <[email protected]>
Cc: Ramin Khonsari <[email protected]>; Maxim Schwalm <[email protected]>; Dmitry Osipenko <[email protected]>; [email protected]; Allen Martin <[email protected]>; Jagan Teki <[email protected]>; Lukasz Majewski <[email protected]>; Marcel Ziswiler <[email protected]>; Marek Vasut <[email protected]>
Subject: Re: [PATCH v3 00/16] General Tegra improvementsExternal email: Use caution opening links or attachments
Thanks! I will shrink mailing list in the next iteration.
Thierry, may you check if these patches do not break anything on your boards. I have tested them on my devices (T20 and T30) without any issues. I am especially interested in T124 pre-dm i2c changes, iirc you have a board I have changed.
Best Regards.
Svyatoslav R.пт, 3 лют. 2023 р. о 19:30 Tom Warren <[email protected]> пише:
Quoted 159 lines
I've applied these (v3) to TOT u-boot-tegra/master OK, and 'buildman tegra' is OK.
I don't have the HW to test all of these combos (T20, T30, T114, T124) - they're mothballed in favor of my current work on T210/T186/T194/T234 (the last two w/no U-Boot). So I'd appreciate any 'Tested-by's from anyone (Thierry, Marcel, Marek, etc.) that might be using these older boards still. This is a substantive set of changes, and I don't want to break anything.
BTW - you can remove Stephen Warren from your CC list - he's moved out of the group that's concerned w/L4T & upstream bootloaders, and probably doesn't want to see this in his inbox any longer.
Thanks,
Tom
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Friday, February 3, 2023 2:26 AM
To: Tom Warren <[email protected]>; Stephen Warren <[email protected]>; Marcel Ziswiler <[email protected]>; Allen Martin <[email protected]>; Jagan Teki <[email protected]>; Lukasz Majewski <[email protected]>; Marek Vasut <[email protected]>; Svyatoslav Ryhel <[email protected]>; Ramin Khonsari <[email protected]>; Thierry Reding <[email protected]>; Maxim Schwalm <[email protected]>; Dmitry Osipenko <[email protected]>
Cc: [email protected]
Subject: [PATCH v3 00/16] General Tegra improvementsExternal email: Use caution opening links or attachments
List of changes in patch set:
- add missing EXTPERIPH clocks for t30
- swap host1x and disp1 clock parents (as they should be)
- addclk_id_to_pll_idandclock_decode_pairhelpers to use dts deeper (in tegra clocks often go in pair child - parent)
- include PLLD setup in T30 (DISP1 may use it as parent on some device)
- fix Tegra PWM parent clock inline with linux
- Tegra SLINK: patch to accept any word length (unlike 8bit aligned which was before)
- provide default USB gadget setup for existing Nvidia boards
- add late init function to be able to configure pre-boot stage (like uncovering serial number or setting mac address)
- create common pre-dm i2c write for PMIC (used on T30 and T124 to configure basic PMIC voltages required to boot like cpu and core voltages)
- expose crypto module for all Tegra SoCs and implement BCT patching (ability to update bootloader from u-boot on production devices without need in host PC)---
Changelog from v2
- fixed T114TEGRA114_CLK_PLL_E_OUT0
- adjusted pre-dm i2c write commit description
- added description file for ebtupdate command
- minor improvements ofbct.ccommentsChangelog from v1
- rebased to latest u-boot master
- PLLD setup for T30 moved specifically into T30 area
---Maxim Schwalm (1):
ARM: tegra: provide default USB gadget setupRamin Khonsari (1):
ARM: tegra30: implement BCT patchingSvyatoslav Ryhel (14):
tegra30: clock: add EXTPERIPH
ARM: t20/t30: swap host1x and disp1 clock parents
ARM: tegra: clock: addclk_id_to_pll_idhelper
ARM: tegra: clock: addclock_decode_pairhelper
ARM: tegra30: add PLLD to pll setup
ARM: tegra: Fix Tegra PWM parent clock
spi:tegra20_slink: accept any word length
ARM: tegra: add late init support
ARM: tegra: create common pre-dm i2c write
board: tegra124: switch to updated pre-dm i2c write
board: tegra30: switch to updated pre-dm i2c write
ARM: tegra: expose crypto module for all Tegra SoCs
ARM: tegra: crypto: extend crypto functional
ARM: tegra20: implement BCT patchingarch/arm/dts/tegra114.dtsi | 2 +- arch/arm/dts/tegra124.dtsi | 2 +- arch/arm/include/asm/arch-tegra/clock.h | 21 +++++ arch/arm/include/asm/arch-tegra/crypto.h | 47 ++++++++++ arch/arm/include/asm/arch-tegra/sys_proto.h | 6 ++ arch/arm/include/asm/arch-tegra/tegra_i2c.h | 17 ++++ .../include/asm/arch-tegra30/clock-tables.h | 6 +- arch/arm/mach-tegra/Kconfig | 14 +++ arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/board2.c | 2 + arch/arm/mach-tegra/clock.c | 23 +++++ arch/arm/mach-tegra/cpu.h | 1 - arch/arm/mach-tegra/{tegra20 => }/crypto.c | 63 +++++++++---- arch/arm/mach-tegra/tegra114/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra124/clock.c | 40 ++++++++- arch/arm/mach-tegra/tegra124/cpu.c | 4 + arch/arm/mach-tegra/tegra20/Kconfig | 1 + arch/arm/mach-tegra/tegra20/Makefile | 7 +- arch/arm/mach-tegra/tegra20/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra20/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra20/clock.c | 43 ++++++++- arch/arm/mach-tegra/tegra20/crypto.h | 19 ---- arch/arm/mach-tegra/tegra210/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra30/Kconfig | 8 -- arch/arm/mach-tegra/tegra30/Makefile | 1 + arch/arm/mach-tegra/tegra30/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra30/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra30/clock.c | 90 +++++++++++++++++-- arch/arm/mach-tegra/tegra30/cpu.c | 55 +----------- board/avionic-design/tec-ng/Makefile | 4 +- board/avionic-design/tec-ng/tec-ng-spl.c | 34 +++++++ board/nvidia/beaver/Makefile | 2 + board/nvidia/beaver/beaver-spl.c | 43 +++++++++ board/nvidia/cardhu/Makefile | 4 +- board/nvidia/cardhu/cardhu-spl.c | 43 +++++++++ board/nvidia/venice2/as3722_init.c | 65 +++++++++----- board/nvidia/venice2/as3722_init.h | 43 --------- board/toradex/apalis-tk1/as3722_init.c | 85 ++++++++++-------- board/toradex/apalis-tk1/as3722_init.h | 40 --------- board/toradex/apalis_t30/Makefile | 2 + board/toradex/apalis_t30/apalis_t30-spl.c | 34 +++++++ board/toradex/colibri_t30/Makefile | 2 + board/toradex/colibri_t30/colibri_t30-spl.c | 34 +++++++ configs/beaver_defconfig | 3 - configs/cei-tk1-som_defconfig | 3 - configs/dalmore_defconfig | 3 - configs/jetson-tk1_defconfig | 3 - configs/nyan-big_defconfig | 3 - configs/p2371-0000_defconfig | 3 - configs/p2371-2180_defconfig | 3 - configs/p2571_defconfig | 3 - configs/p3450-0000_defconfig | 3 - configs/venice2_defconfig | 3 - doc/usage/cmd/ebtupdate.rst | 70 +++++++++++++++ drivers/pwm/tegra_pwm.c | 10 ++- drivers/spi/tegra20_slink.c | 19 ++-- drivers/usb/gadget/Kconfig | 3 + 57 files changed, 1051 insertions(+), 309 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra/crypto.h rename arch/arm/mach-tegra/{tegra20 => }/crypto.c (68%) create mode 100644 arch/arm/mach-tegra/tegra20/bct.c create mode 100644 arch/arm/mach-tegra/tegra20/bct.h delete mode 100644 arch/arm/mach-tegra/tegra20/crypto.h create mode 100644 arch/arm/mach-tegra/tegra30/bct.c create mode 100644 arch/arm/mach-tegra/tegra30/bct.h create mode 100644 board/avionic-design/tec-ng/tec-ng-spl.c create mode 100644 board/nvidia/beaver/beaver-spl.c create mode 100644 board/nvidia/cardhu/cardhu-spl.c delete mode 100644 board/nvidia/venice2/as3722_init.h delete mode 100644 board/toradex/apalis-tk1/as3722_init.h create mode 100644 board/toradex/apalis_t30/apalis_t30-spl.c create mode 100644 board/toradex/colibri_t30/colibri_t30-spl.c create mode 100644 doc/usage/cmd/ebtupdate.rst--
2.37.2
Hello! Thierry, may you check if these patches do not break anything on your boards. I have tested them on my devices (T20 and T30) without any issues. I am especially interested in T124 pre-dm i2c changes, iirc you have a board I have changed.
Best Regards.
Svyatoslav R.
пт, 10 лют. 2023 р. о 18:35 Svyatoslav Ryhel <[email protected]> пише:
Quoted 189 lines
I have asked Thierry to check if his boards work with these changes but got no response from him (at least yet). Others seem to have no interest.
Best regards
Svyatoslav R.пт, 10 лют. 2023 р. о 18:31 Tom Warren <[email protected]> пише:
Quoted 180 lines
Where does testing/reviewing stand on these changes? I'd like to submit a PR early next week, but I can't until I know they won't break anything.
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Friday, February 3, 2023 10:40 AM
To: Tom Warren <[email protected]>; Thierry Reding <[email protected]>
Cc: Ramin Khonsari <[email protected]>; Maxim Schwalm <[email protected]>; Dmitry Osipenko <[email protected]>; [email protected]; Allen Martin <[email protected]>; Jagan Teki <[email protected]>; Lukasz Majewski <[email protected]>; Marcel Ziswiler <[email protected]>; Marek Vasut <[email protected]>
Subject: Re: [PATCH v3 00/16] General Tegra improvementsExternal email: Use caution opening links or attachments
Thanks! I will shrink mailing list in the next iteration.
Thierry, may you check if these patches do not break anything on your boards. I have tested them on my devices (T20 and T30) without any issues. I am especially interested in T124 pre-dm i2c changes, iirc you have a board I have changed.
Best Regards.
Svyatoslav R.пт, 3 лют. 2023 р. о 19:30 Tom Warren <[email protected]> пише:
Quoted 159 lines
I've applied these (v3) to TOT u-boot-tegra/master OK, and 'buildman tegra' is OK.
I don't have the HW to test all of these combos (T20, T30, T114, T124) - they're mothballed in favor of my current work on T210/T186/T194/T234 (the last two w/no U-Boot). So I'd appreciate any 'Tested-by's from anyone (Thierry, Marcel, Marek, etc.) that might be using these older boards still. This is a substantive set of changes, and I don't want to break anything.
BTW - you can remove Stephen Warren from your CC list - he's moved out of the group that's concerned w/L4T & upstream bootloaders, and probably doesn't want to see this in his inbox any longer.
Thanks,
Tom
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Friday, February 3, 2023 2:26 AM
To: Tom Warren <[email protected]>; Stephen Warren <[email protected]>; Marcel Ziswiler <[email protected]>; Allen Martin <[email protected]>; Jagan Teki <[email protected]>; Lukasz Majewski <[email protected]>; Marek Vasut <[email protected]>; Svyatoslav Ryhel <[email protected]>; Ramin Khonsari <[email protected]>; Thierry Reding <[email protected]>; Maxim Schwalm <[email protected]>; Dmitry Osipenko <[email protected]>
Cc: [email protected]
Subject: [PATCH v3 00/16] General Tegra improvementsExternal email: Use caution opening links or attachments
List of changes in patch set:
- add missing EXTPERIPH clocks for t30
- swap host1x and disp1 clock parents (as they should be)
- addclk_id_to_pll_idandclock_decode_pairhelpers to use dts deeper (in tegra clocks often go in pair child - parent)
- include PLLD setup in T30 (DISP1 may use it as parent on some device)
- fix Tegra PWM parent clock inline with linux
- Tegra SLINK: patch to accept any word length (unlike 8bit aligned which was before)
- provide default USB gadget setup for existing Nvidia boards
- add late init function to be able to configure pre-boot stage (like uncovering serial number or setting mac address)
- create common pre-dm i2c write for PMIC (used on T30 and T124 to configure basic PMIC voltages required to boot like cpu and core voltages)
- expose crypto module for all Tegra SoCs and implement BCT patching (ability to update bootloader from u-boot on production devices without need in host PC)---
Changelog from v2
- fixed T114TEGRA114_CLK_PLL_E_OUT0
- adjusted pre-dm i2c write commit description
- added description file for ebtupdate command
- minor improvements ofbct.ccommentsChangelog from v1
- rebased to latest u-boot master
- PLLD setup for T30 moved specifically into T30 area
---Maxim Schwalm (1):
ARM: tegra: provide default USB gadget setupRamin Khonsari (1):
ARM: tegra30: implement BCT patchingSvyatoslav Ryhel (14):
tegra30: clock: add EXTPERIPH
ARM: t20/t30: swap host1x and disp1 clock parents
ARM: tegra: clock: addclk_id_to_pll_idhelper
ARM: tegra: clock: addclock_decode_pairhelper
ARM: tegra30: add PLLD to pll setup
ARM: tegra: Fix Tegra PWM parent clock
spi:tegra20_slink: accept any word length
ARM: tegra: add late init support
ARM: tegra: create common pre-dm i2c write
board: tegra124: switch to updated pre-dm i2c write
board: tegra30: switch to updated pre-dm i2c write
ARM: tegra: expose crypto module for all Tegra SoCs
ARM: tegra: crypto: extend crypto functional
ARM: tegra20: implement BCT patchingarch/arm/dts/tegra114.dtsi | 2 +- arch/arm/dts/tegra124.dtsi | 2 +- arch/arm/include/asm/arch-tegra/clock.h | 21 +++++ arch/arm/include/asm/arch-tegra/crypto.h | 47 ++++++++++ arch/arm/include/asm/arch-tegra/sys_proto.h | 6 ++ arch/arm/include/asm/arch-tegra/tegra_i2c.h | 17 ++++ .../include/asm/arch-tegra30/clock-tables.h | 6 +- arch/arm/mach-tegra/Kconfig | 14 +++ arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/board2.c | 2 + arch/arm/mach-tegra/clock.c | 23 +++++ arch/arm/mach-tegra/cpu.h | 1 - arch/arm/mach-tegra/{tegra20 => }/crypto.c | 63 +++++++++---- arch/arm/mach-tegra/tegra114/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra124/clock.c | 40 ++++++++- arch/arm/mach-tegra/tegra124/cpu.c | 4 + arch/arm/mach-tegra/tegra20/Kconfig | 1 + arch/arm/mach-tegra/tegra20/Makefile | 7 +- arch/arm/mach-tegra/tegra20/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra20/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra20/clock.c | 43 ++++++++- arch/arm/mach-tegra/tegra20/crypto.h | 19 ---- arch/arm/mach-tegra/tegra210/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra30/Kconfig | 8 -- arch/arm/mach-tegra/tegra30/Makefile | 1 + arch/arm/mach-tegra/tegra30/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra30/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra30/clock.c | 90 +++++++++++++++++-- arch/arm/mach-tegra/tegra30/cpu.c | 55 +----------- board/avionic-design/tec-ng/Makefile | 4 +- board/avionic-design/tec-ng/tec-ng-spl.c | 34 +++++++ board/nvidia/beaver/Makefile | 2 + board/nvidia/beaver/beaver-spl.c | 43 +++++++++ board/nvidia/cardhu/Makefile | 4 +- board/nvidia/cardhu/cardhu-spl.c | 43 +++++++++ board/nvidia/venice2/as3722_init.c | 65 +++++++++----- board/nvidia/venice2/as3722_init.h | 43 --------- board/toradex/apalis-tk1/as3722_init.c | 85 ++++++++++-------- board/toradex/apalis-tk1/as3722_init.h | 40 --------- board/toradex/apalis_t30/Makefile | 2 + board/toradex/apalis_t30/apalis_t30-spl.c | 34 +++++++ board/toradex/colibri_t30/Makefile | 2 + board/toradex/colibri_t30/colibri_t30-spl.c | 34 +++++++ configs/beaver_defconfig | 3 - configs/cei-tk1-som_defconfig | 3 - configs/dalmore_defconfig | 3 - configs/jetson-tk1_defconfig | 3 - configs/nyan-big_defconfig | 3 - configs/p2371-0000_defconfig | 3 - configs/p2371-2180_defconfig | 3 - configs/p2571_defconfig | 3 - configs/p3450-0000_defconfig | 3 - configs/venice2_defconfig | 3 - doc/usage/cmd/ebtupdate.rst | 70 +++++++++++++++ drivers/pwm/tegra_pwm.c | 10 ++- drivers/spi/tegra20_slink.c | 19 ++-- drivers/usb/gadget/Kconfig | 3 + 57 files changed, 1051 insertions(+), 309 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra/crypto.h rename arch/arm/mach-tegra/{tegra20 => }/crypto.c (68%) create mode 100644 arch/arm/mach-tegra/tegra20/bct.c create mode 100644 arch/arm/mach-tegra/tegra20/bct.h delete mode 100644 arch/arm/mach-tegra/tegra20/crypto.h create mode 100644 arch/arm/mach-tegra/tegra30/bct.c create mode 100644 arch/arm/mach-tegra/tegra30/bct.h create mode 100644 board/avionic-design/tec-ng/tec-ng-spl.c create mode 100644 board/nvidia/beaver/beaver-spl.c create mode 100644 board/nvidia/cardhu/cardhu-spl.c delete mode 100644 board/nvidia/venice2/as3722_init.h delete mode 100644 board/toradex/apalis-tk1/as3722_init.h create mode 100644 board/toradex/apalis_t30/apalis_t30-spl.c create mode 100644 board/toradex/colibri_t30/colibri_t30-spl.c create mode 100644 doc/usage/cmd/ebtupdate.rst--
2.37.2
Quoted 119 lines · Svyatoslav Ryhel
List of changes in patch set:
- add missing EXTPERIPH clocks for t30
- swap host1x and disp1 clock parents (as they should be)
- addclk_id_to_pll_idandclock_decode_pairhelpers to use dts deeper (in tegra clocks often go in pair child - parent)
- include PLLD setup in T30 (DISP1 may use it as parent on some device)
- fix Tegra PWM parent clock inline with linux
- Tegra SLINK: patch to accept any word length (unlike 8bit aligned which was before)
- provide default USB gadget setup for existing Nvidia boards
- add late init function to be able to configure pre-boot stage (like uncovering serial number or setting mac address)
- create common pre-dm i2c write for PMIC (used on T30 and T124 to configure basic PMIC voltages required to boot like cpu and core voltages)
- expose crypto module for all Tegra SoCs and implement BCT patching (ability to update bootloader from u-boot on production devices without need in host PC)---
Changelog from v2
- fixed T114TEGRA114_CLK_PLL_E_OUT0
- adjusted pre-dm i2c write commit description
- added description file for ebtupdate command
- minor improvements ofbct.ccommentsChangelog from v1
- rebased to latest u-boot master
- PLLD setup for T30 moved specifically into T30 area
---Maxim Schwalm (1):
ARM: tegra: provide default USB gadget setupRamin Khonsari (1):
ARM: tegra30: implement BCT patchingSvyatoslav Ryhel (14):
tegra30: clock: add EXTPERIPH
ARM: t20/t30: swap host1x and disp1 clock parents
ARM: tegra: clock: addclk_id_to_pll_idhelper
ARM: tegra: clock: addclock_decode_pairhelper
ARM: tegra30: add PLLD to pll setup
ARM: tegra: Fix Tegra PWM parent clock
spi:tegra20_slink: accept any word length
ARM: tegra: add late init support
ARM: tegra: create common pre-dm i2c write
board: tegra124: switch to updated pre-dm i2c write
board: tegra30: switch to updated pre-dm i2c write
ARM: tegra: expose crypto module for all Tegra SoCs
ARM: tegra: crypto: extend crypto functional
ARM: tegra20: implement BCT patchingarch/arm/dts/tegra114.dtsi | 2 +- arch/arm/dts/tegra124.dtsi | 2 +- arch/arm/include/asm/arch-tegra/clock.h | 21 +++++ arch/arm/include/asm/arch-tegra/crypto.h | 47 ++++++++++ arch/arm/include/asm/arch-tegra/sys_proto.h | 6 ++ arch/arm/include/asm/arch-tegra/tegra_i2c.h | 17 ++++ .../include/asm/arch-tegra30/clock-tables.h | 6 +- arch/arm/mach-tegra/Kconfig | 14 +++ arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/board2.c | 2 + arch/arm/mach-tegra/clock.c | 23 +++++ arch/arm/mach-tegra/cpu.h | 1 - arch/arm/mach-tegra/{tegra20 => }/crypto.c | 63 +++++++++---- arch/arm/mach-tegra/tegra114/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra124/clock.c | 40 ++++++++- arch/arm/mach-tegra/tegra124/cpu.c | 4 + arch/arm/mach-tegra/tegra20/Kconfig | 1 + arch/arm/mach-tegra/tegra20/Makefile | 7 +- arch/arm/mach-tegra/tegra20/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra20/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra20/clock.c | 43 ++++++++- arch/arm/mach-tegra/tegra20/crypto.h | 19 ---- arch/arm/mach-tegra/tegra210/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra30/Kconfig | 8 -- arch/arm/mach-tegra/tegra30/Makefile | 1 + arch/arm/mach-tegra/tegra30/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra30/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra30/clock.c | 90 +++++++++++++++++-- arch/arm/mach-tegra/tegra30/cpu.c | 55 +----------- board/avionic-design/tec-ng/Makefile | 4 +- board/avionic-design/tec-ng/tec-ng-spl.c | 34 +++++++ board/nvidia/beaver/Makefile | 2 + board/nvidia/beaver/beaver-spl.c | 43 +++++++++ board/nvidia/cardhu/Makefile | 4 +- board/nvidia/cardhu/cardhu-spl.c | 43 +++++++++ board/nvidia/venice2/as3722_init.c | 65 +++++++++----- board/nvidia/venice2/as3722_init.h | 43 --------- board/toradex/apalis-tk1/as3722_init.c | 85 ++++++++++-------- board/toradex/apalis-tk1/as3722_init.h | 40 --------- board/toradex/apalis_t30/Makefile | 2 + board/toradex/apalis_t30/apalis_t30-spl.c | 34 +++++++ board/toradex/colibri_t30/Makefile | 2 + board/toradex/colibri_t30/colibri_t30-spl.c | 34 +++++++ configs/beaver_defconfig | 3 - configs/cei-tk1-som_defconfig | 3 - configs/dalmore_defconfig | 3 - configs/jetson-tk1_defconfig | 3 - configs/nyan-big_defconfig | 3 - configs/p2371-0000_defconfig | 3 - configs/p2371-2180_defconfig | 3 - configs/p2571_defconfig | 3 - configs/p3450-0000_defconfig | 3 - configs/venice2_defconfig | 3 - doc/usage/cmd/ebtupdate.rst | 70 +++++++++++++++ drivers/pwm/tegra_pwm.c | 10 ++- drivers/spi/tegra20_slink.c | 19 ++-- drivers/usb/gadget/Kconfig | 3 + 57 files changed, 1051 insertions(+), 309 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra/crypto.h rename arch/arm/mach-tegra/{tegra20 => }/crypto.c (68%) create mode 100644 arch/arm/mach-tegra/tegra20/bct.c create mode 100644 arch/arm/mach-tegra/tegra20/bct.h delete mode 100644 arch/arm/mach-tegra/tegra20/crypto.h create mode 100644 arch/arm/mach-tegra/tegra30/bct.c create mode 100644 arch/arm/mach-tegra/tegra30/bct.h
Quoted 8 lines
create mode 100644 board/avionic-design/tec-ng/tec-ng-spl.c create mode 100644 board/nvidia/beaver/beaver-spl.c create mode 100644 board/nvidia/cardhu/cardhu-spl.c delete mode 100644 board/nvidia/venice2/as3722_init.h delete mode 100644 board/toradex/apalis-tk1/as3722_init.h create mode 100644 board/toradex/apalis_t30/apalis_t30-spl.c create mode 100644 board/toradex/colibri_t30/colibri_t30-spl.c create mode 100644 doc/usage/cmd/ebtupdate.rst
I haven't tested this exhaustively, just merely made sure that it can PXE boot into Linux. Seems to work fine on Beaver and Jetson TK1, so:
Thierry, thank you very much for a quick test.
Tom, should I amend patches and upload the next iteration of patchset with Thierry's tested-by or, if no more objections/comments there are, you will add Thierry's tested-by on your own?
Best regards.
Svyatoslav R.
вт, 14 лют. 2023 р. о 16:00 Thierry Reding <[email protected]> пише:
Quoted 134 lines · Svyatoslav Ryhel
Quoted 119 lines
List of changes in patch set:
- add missing EXTPERIPH clocks for t30
- swap host1x and disp1 clock parents (as they should be)
- addclk_id_to_pll_idandclock_decode_pairhelpers to use dts deeper (in tegra clocks often go in pair child - parent)
- include PLLD setup in T30 (DISP1 may use it as parent on some device)
- fix Tegra PWM parent clock inline with linux
- Tegra SLINK: patch to accept any word length (unlike 8bit aligned which was before)
- provide default USB gadget setup for existing Nvidia boards
- add late init function to be able to configure pre-boot stage (like uncovering serial number or setting mac address)
- create common pre-dm i2c write for PMIC (used on T30 and T124 to configure basic PMIC voltages required to boot like cpu and core voltages)
- expose crypto module for all Tegra SoCs and implement BCT patching (ability to update bootloader from u-boot on production devices without need in host PC)---
Changelog from v2
- fixed T114TEGRA114_CLK_PLL_E_OUT0
- adjusted pre-dm i2c write commit description
- added description file for ebtupdate command
- minor improvements ofbct.ccommentsChangelog from v1
- rebased to latest u-boot master
- PLLD setup for T30 moved specifically into T30 area
---Maxim Schwalm (1):
ARM: tegra: provide default USB gadget setupRamin Khonsari (1):
ARM: tegra30: implement BCT patchingSvyatoslav Ryhel (14):
tegra30: clock: add EXTPERIPH
ARM: t20/t30: swap host1x and disp1 clock parents
ARM: tegra: clock: addclk_id_to_pll_idhelper
ARM: tegra: clock: addclock_decode_pairhelper
ARM: tegra30: add PLLD to pll setup
ARM: tegra: Fix Tegra PWM parent clock
spi:tegra20_slink: accept any word length
ARM: tegra: add late init support
ARM: tegra: create common pre-dm i2c write
board: tegra124: switch to updated pre-dm i2c write
board: tegra30: switch to updated pre-dm i2c write
ARM: tegra: expose crypto module for all Tegra SoCs
ARM: tegra: crypto: extend crypto functional
ARM: tegra20: implement BCT patchingarch/arm/dts/tegra114.dtsi | 2 +- arch/arm/dts/tegra124.dtsi | 2 +- arch/arm/include/asm/arch-tegra/clock.h | 21 +++++ arch/arm/include/asm/arch-tegra/crypto.h | 47 ++++++++++ arch/arm/include/asm/arch-tegra/sys_proto.h | 6 ++ arch/arm/include/asm/arch-tegra/tegra_i2c.h | 17 ++++ .../include/asm/arch-tegra30/clock-tables.h | 6 +- arch/arm/mach-tegra/Kconfig | 14 +++ arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/board2.c | 2 + arch/arm/mach-tegra/clock.c | 23 +++++ arch/arm/mach-tegra/cpu.h | 1 - arch/arm/mach-tegra/{tegra20 => }/crypto.c | 63 +++++++++---- arch/arm/mach-tegra/tegra114/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra124/clock.c | 40 ++++++++- arch/arm/mach-tegra/tegra124/cpu.c | 4 + arch/arm/mach-tegra/tegra20/Kconfig | 1 + arch/arm/mach-tegra/tegra20/Makefile | 7 +- arch/arm/mach-tegra/tegra20/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra20/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra20/clock.c | 43 ++++++++- arch/arm/mach-tegra/tegra20/crypto.h | 19 ---- arch/arm/mach-tegra/tegra210/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra30/Kconfig | 8 -- arch/arm/mach-tegra/tegra30/Makefile | 1 + arch/arm/mach-tegra/tegra30/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra30/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra30/clock.c | 90 +++++++++++++++++-- arch/arm/mach-tegra/tegra30/cpu.c | 55 +----------- board/avionic-design/tec-ng/Makefile | 4 +- board/avionic-design/tec-ng/tec-ng-spl.c | 34 +++++++ board/nvidia/beaver/Makefile | 2 + board/nvidia/beaver/beaver-spl.c | 43 +++++++++ board/nvidia/cardhu/Makefile | 4 +- board/nvidia/cardhu/cardhu-spl.c | 43 +++++++++ board/nvidia/venice2/as3722_init.c | 65 +++++++++----- board/nvidia/venice2/as3722_init.h | 43 --------- board/toradex/apalis-tk1/as3722_init.c | 85 ++++++++++-------- board/toradex/apalis-tk1/as3722_init.h | 40 --------- board/toradex/apalis_t30/Makefile | 2 + board/toradex/apalis_t30/apalis_t30-spl.c | 34 +++++++ board/toradex/colibri_t30/Makefile | 2 + board/toradex/colibri_t30/colibri_t30-spl.c | 34 +++++++ configs/beaver_defconfig | 3 - configs/cei-tk1-som_defconfig | 3 - configs/dalmore_defconfig | 3 - configs/jetson-tk1_defconfig | 3 - configs/nyan-big_defconfig | 3 - configs/p2371-0000_defconfig | 3 - configs/p2371-2180_defconfig | 3 - configs/p2571_defconfig | 3 - configs/p3450-0000_defconfig | 3 - configs/venice2_defconfig | 3 - doc/usage/cmd/ebtupdate.rst | 70 +++++++++++++++ drivers/pwm/tegra_pwm.c | 10 ++- drivers/spi/tegra20_slink.c | 19 ++-- drivers/usb/gadget/Kconfig | 3 + 57 files changed, 1051 insertions(+), 309 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra/crypto.h rename arch/arm/mach-tegra/{tegra20 => }/crypto.c (68%) create mode 100644 arch/arm/mach-tegra/tegra20/bct.c create mode 100644 arch/arm/mach-tegra/tegra20/bct.h delete mode 100644 arch/arm/mach-tegra/tegra20/crypto.h create mode 100644 arch/arm/mach-tegra/tegra30/bct.c create mode 100644 arch/arm/mach-tegra/tegra30/bct.hQuoted 8 lines
create mode 100644 board/avionic-design/tec-ng/tec-ng-spl.c create mode 100644 board/nvidia/beaver/beaver-spl.c create mode 100644 board/nvidia/cardhu/cardhu-spl.c delete mode 100644 board/nvidia/venice2/as3722_init.h delete mode 100644 board/toradex/apalis-tk1/as3722_init.h create mode 100644 board/toradex/apalis_t30/apalis_t30-spl.c create mode 100644 board/toradex/colibri_t30/colibri_t30-spl.c create mode 100644 doc/usage/cmd/ebtupdate.rstI haven't tested this exhaustively, just merely made sure that it can PXE boot into Linux. Seems to work fine on Beaver and Jetson TK1, so:
Tested-by Thierry Reding <[email protected]>
Usually best to have the original author make sure all of the patches have all the attributes required, so if you wouldn't mind, I'll take v4 when it's ready. Thanks!
Tom
-----Original Message-----
From: Svyatoslav Ryhel <[email protected]>
Sent: Tuesday, February 14, 2023 7:15 AM
To: Thierry Reding <[email protected]>; Tom Warren <[email protected]>
Cc: Marcel Ziswiler <[email protected]>; Allen Martin <[email protected]>; Jagan Teki <[email protected]>; Lukasz Majewski <[email protected]>; Marek Vasut <[email protected]>; Ramin Khonsari <[email protected]>; Maxim Schwalm <[email protected]>; Dmitry Osipenko <[email protected]>; [email protected]
Subject: Re: [PATCH v3 00/16] General Tegra improvements
External email: Use caution opening links or attachments
Thierry, thank you very much for a quick test.
Tom, should I amend patches and upload the next iteration of patchset with Thierry's tested-by or, if no more objections/comments there are, you will add Thierry's tested-by on your own?
Best regards.
Svyatoslav R.
вт, 14 лют. 2023 р. о 16:00 Thierry Reding <[email protected]> пише:
Quoted 134 lines · Svyatoslav Ryhel
Quoted 119 lines
List of changes in patch set:
- add missing EXTPERIPH clocks for t30
- swap host1x and disp1 clock parents (as they should be)
- addclk_id_to_pll_idandclock_decode_pairhelpers to use dts deeper (in tegra clocks often go in pair child - parent)
- include PLLD setup in T30 (DISP1 may use it as parent on some device)
- fix Tegra PWM parent clock inline with linux
- Tegra SLINK: patch to accept any word length (unlike 8bit aligned which was before)
- provide default USB gadget setup for existing Nvidia boards
- add late init function to be able to configure pre-boot stage (like uncovering serial number or setting mac address)
- create common pre-dm i2c write for PMIC (used on T30 and T124 to configure basic PMIC voltages required to boot like cpu and core voltages)
- expose crypto module for all Tegra SoCs and implement BCT patching (ability to update bootloader from u-boot on production devices without need in host PC)---
Changelog from v2
- fixed T114TEGRA114_CLK_PLL_E_OUT0
- adjusted pre-dm i2c write commit description
- added description file for ebtupdate command
- minor improvements ofbct.ccommentsChangelog from v1
- rebased to latest u-boot master
- PLLD setup for T30 moved specifically into T30 area
---Maxim Schwalm (1):
ARM: tegra: provide default USB gadget setupRamin Khonsari (1):
ARM: tegra30: implement BCT patchingSvyatoslav Ryhel (14):
tegra30: clock: add EXTPERIPH
ARM: t20/t30: swap host1x and disp1 clock parents
ARM: tegra: clock: addclk_id_to_pll_idhelper
ARM: tegra: clock: addclock_decode_pairhelper
ARM: tegra30: add PLLD to pll setup
ARM: tegra: Fix Tegra PWM parent clock
spi:tegra20_slink: accept any word length
ARM: tegra: add late init support
ARM: tegra: create common pre-dm i2c write
board: tegra124: switch to updated pre-dm i2c write
board: tegra30: switch to updated pre-dm i2c write
ARM: tegra: expose crypto module for all Tegra SoCs
ARM: tegra: crypto: extend crypto functional
ARM: tegra20: implement BCT patchingarch/arm/dts/tegra114.dtsi | 2 +- arch/arm/dts/tegra124.dtsi | 2 +- arch/arm/include/asm/arch-tegra/clock.h | 21 +++++ arch/arm/include/asm/arch-tegra/crypto.h | 47 ++++++++++ arch/arm/include/asm/arch-tegra/sys_proto.h | 6 ++ arch/arm/include/asm/arch-tegra/tegra_i2c.h | 17 ++++ .../include/asm/arch-tegra30/clock-tables.h | 6 +- arch/arm/mach-tegra/Kconfig | 14 +++ arch/arm/mach-tegra/Makefile | 1 + arch/arm/mach-tegra/board2.c | 2 + arch/arm/mach-tegra/clock.c | 23 +++++ arch/arm/mach-tegra/cpu.h | 1 - arch/arm/mach-tegra/{tegra20 => }/crypto.c | 63 +++++++++---- arch/arm/mach-tegra/tegra114/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra124/clock.c | 40 ++++++++- arch/arm/mach-tegra/tegra124/cpu.c | 4 + arch/arm/mach-tegra/tegra20/Kconfig | 1 + arch/arm/mach-tegra/tegra20/Makefile | 7 +- arch/arm/mach-tegra/tegra20/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra20/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra20/clock.c | 43 ++++++++- arch/arm/mach-tegra/tegra20/crypto.h | 19 ---- arch/arm/mach-tegra/tegra210/clock.c | 39 +++++++- arch/arm/mach-tegra/tegra30/Kconfig | 8 -- arch/arm/mach-tegra/tegra30/Makefile | 1 + arch/arm/mach-tegra/tegra30/bct.c | 79 ++++++++++++++++ arch/arm/mach-tegra/tegra30/bct.h | 42 +++++++++ arch/arm/mach-tegra/tegra30/clock.c | 90 +++++++++++++++++-- arch/arm/mach-tegra/tegra30/cpu.c | 55 +----------- board/avionic-design/tec-ng/Makefile | 4 +- board/avionic-design/tec-ng/tec-ng-spl.c | 34 +++++++ board/nvidia/beaver/Makefile | 2 + board/nvidia/beaver/beaver-spl.c | 43 +++++++++ board/nvidia/cardhu/Makefile | 4 +- board/nvidia/cardhu/cardhu-spl.c | 43 +++++++++ board/nvidia/venice2/as3722_init.c | 65 +++++++++----- board/nvidia/venice2/as3722_init.h | 43 --------- board/toradex/apalis-tk1/as3722_init.c | 85 ++++++++++-------- board/toradex/apalis-tk1/as3722_init.h | 40 --------- board/toradex/apalis_t30/Makefile | 2 + board/toradex/apalis_t30/apalis_t30-spl.c | 34 +++++++ board/toradex/colibri_t30/Makefile | 2 + board/toradex/colibri_t30/colibri_t30-spl.c | 34 +++++++ configs/beaver_defconfig | 3 - configs/cei-tk1-som_defconfig | 3 - configs/dalmore_defconfig | 3 - configs/jetson-tk1_defconfig | 3 - configs/nyan-big_defconfig | 3 - configs/p2371-0000_defconfig | 3 - configs/p2371-2180_defconfig | 3 - configs/p2571_defconfig | 3 - configs/p3450-0000_defconfig | 3 - configs/venice2_defconfig | 3 - doc/usage/cmd/ebtupdate.rst | 70 +++++++++++++++ drivers/pwm/tegra_pwm.c | 10 ++- drivers/spi/tegra20_slink.c | 19 ++-- drivers/usb/gadget/Kconfig | 3 + 57 files changed, 1051 insertions(+), 309 deletions(-) create mode 100644 arch/arm/include/asm/arch-tegra/crypto.h rename arch/arm/mach-tegra/{tegra20 => }/crypto.c (68%) create mode 100644 arch/arm/mach-tegra/tegra20/bct.c create mode 100644 arch/arm/mach-tegra/tegra20/bct.h delete mode 100644 arch/arm/mach-tegra/tegra20/crypto.h create mode 100644 arch/arm/mach-tegra/tegra30/bct.c create mode100644
arch/arm/mach-tegra/tegra30/bct.hcreate mode 100644Quoted 8 lines
board/avionic-design/tec-ng/tec-ng-spl.ccreate mode 100644 board/nvidia/beaver/beaver-spl.c create mode 100644 board/nvidia/cardhu/cardhu-spl.c delete mode 100644 board/nvidia/venice2/as3722_init.h delete mode 100644 board/toradex/apalis-tk1/as3722_init.h create mode 100644 board/toradex/apalis_t30/apalis_t30-spl.c create mode 100644 board/toradex/colibri_t30/colibri_t30-spl.c create mode 100644 doc/usage/cmd/ebtupdate.rstI haven't tested this exhaustively, just merely made sure that it can PXE boot into Linux. Seems to work fine on Beaver and Jetson TK1, so:
Tested-by Thierry Reding <[email protected]>