summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/exception_level.c8
-rw-r--r--arch/arm/cpu/armv8/exception_level.c8
-rw-r--r--arch/arm/dts/Makefile1
-rw-r--r--arch/arm/dts/k3-am62-lp4-50-800-800.dtsi16
-rw-r--r--arch/arm/dts/k3-am625-phycore-som-binman.dtsi28
-rw-r--r--arch/arm/dts/k3-am62a-ddr-1866mhz-32bit.dtsi50
-rw-r--r--arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi12
-rw-r--r--arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi14
-rw-r--r--arch/arm/dts/k3-am64-evm-ddr4-1600MTs.dtsi16
-rw-r--r--arch/arm/dts/k3-am642-phycore-som-binman.dtsi28
-rw-r--r--arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi18
-rw-r--r--arch/arm/dts/rk3308-rock-s0-u-boot.dtsi12
-rw-r--r--arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi5
-rw-r--r--arch/arm/dts/stm32746g-eval-u-boot.dtsi10
-rw-r--r--arch/arm/dts/stm32f746-disco-u-boot.dtsi10
-rw-r--r--arch/arm/dts/stm32f769-disco-u-boot.dtsi10
-rw-r--r--arch/arm/dts/stm32mp13-pinctrl.dtsi15
-rw-r--r--arch/arm/dts/stm32mp135f-dhcor-dhsbc-u-boot.dtsi22
-rw-r--r--arch/arm/dts/stm32mp135f-dk.dts14
-rw-r--r--arch/arm/dts/stm32mp13xx-dhcor-u-boot.dtsi2
-rw-r--r--arch/arm/dts/tegra124-xiaomi-mocha.dts592
-rw-r--r--arch/arm/dts/tegra20-u-boot.dtsi4
-rw-r--r--arch/arm/dts/tegra30-htc-endeavoru.dts23
-rw-r--r--arch/arm/include/asm/arch-tegra124/pinmux.h4
-rw-r--r--arch/arm/include/asm/arch-tegra20/clock-tables.h2
-rw-r--r--arch/arm/include/asm/setjmp.h17
-rw-r--r--arch/arm/lib/bootm.c4
-rw-r--r--arch/arm/mach-imx/imx8m/Kconfig2
-rw-r--r--arch/arm/mach-k3/am65x/Kconfig2
-rw-r--r--arch/arm/mach-k3/j722s/j722s_init.c32
-rw-r--r--arch/arm/mach-rockchip/bootrom.c2
-rw-r--r--arch/arm/mach-sc5xx/soc.c36
-rw-r--r--arch/arm/mach-stm32mp/Kconfig6
-rw-r--r--arch/arm/mach-stm32mp/Makefile1
-rw-r--r--arch/arm/mach-stm32mp/include/mach/timers.h55
-rw-r--r--arch/arm/mach-stm32mp/stm32mp1/cpu.c4
-rw-r--r--arch/arm/mach-stm32mp/timers.c82
-rw-r--r--arch/arm/mach-tegra/Kconfig2
-rw-r--r--arch/arm/mach-tegra/clock.c30
-rw-r--r--arch/arm/mach-tegra/tegra124/Kconfig5
-rw-r--r--arch/arm/mach-tegra/tegra124/Makefile1
-rw-r--r--arch/arm/mach-tegra/tegra124/bct.c91
-rw-r--r--arch/arm/mach-tegra/tegra124/bct.h55
-rw-r--r--arch/arm/mach-versal2/include/mach/hardware.h3
-rw-r--r--arch/riscv/include/asm/setjmp.h15
-rw-r--r--arch/riscv/lib/bootm.c4
-rw-r--r--arch/sandbox/Kconfig2
-rw-r--r--arch/sandbox/cpu/cpu.c2
-rw-r--r--arch/sandbox/dts/test.dts101
-rw-r--r--arch/sandbox/include/asm/setjmp.h18
-rw-r--r--arch/x86/cpu/intel_common/intel_opregion.c1
-rw-r--r--arch/x86/include/asm/setjmp.h11
-rw-r--r--arch/x86/lib/fsp2/fsp_init.c3
53 files changed, 1294 insertions, 217 deletions
diff --git a/arch/arm/cpu/armv7/exception_level.c b/arch/arm/cpu/armv7/exception_level.c
index 7baade61b07..a55c158ce51 100644
--- a/arch/arm/cpu/armv7/exception_level.c
+++ b/arch/arm/cpu/armv7/exception_level.c
@@ -11,9 +11,9 @@
#include <bootm.h>
#include <cpu_func.h>
#include <log.h>
+#include <setjmp.h>
#include <asm/armv7.h>
#include <asm/secure.h>
-#include <asm/setjmp.h>
/**
* entry_non_secure() - entry point when switching to non-secure mode
@@ -24,7 +24,7 @@
*
* @non_secure_jmp: jump buffer for restoring stack and registers
*/
-static void entry_non_secure(struct jmp_buf_data *non_secure_jmp)
+static void entry_non_secure(jmp_buf non_secure_jmp)
{
dcache_enable();
debug("Reached non-secure mode\n");
@@ -42,10 +42,10 @@ static void entry_non_secure(struct jmp_buf_data *non_secure_jmp)
void switch_to_non_secure_mode(void)
{
static bool is_nonsec;
- struct jmp_buf_data non_secure_jmp;
+ jmp_buf non_secure_jmp;
if (armv7_boot_nonsec() && !is_nonsec) {
- if (setjmp(&non_secure_jmp))
+ if (setjmp(non_secure_jmp))
return;
dcache_disable(); /* flush cache before switch to HYP */
armv7_init_nonsec();
diff --git a/arch/arm/cpu/armv8/exception_level.c b/arch/arm/cpu/armv8/exception_level.c
index 85c78f55789..746737861e7 100644
--- a/arch/arm/cpu/armv8/exception_level.c
+++ b/arch/arm/cpu/armv8/exception_level.c
@@ -11,8 +11,8 @@
#include <bootm.h>
#include <cpu_func.h>
#include <log.h>
+#include <setjmp.h>
#include <asm/cache.h>
-#include <asm/setjmp.h>
/**
* entry_non_secure() - entry point when switching to non-secure mode
@@ -23,7 +23,7 @@
*
* @non_secure_jmp: jump buffer for restoring stack and registers
*/
-static void entry_non_secure(struct jmp_buf_data *non_secure_jmp)
+static void entry_non_secure(jmp_buf non_secure_jmp)
{
dcache_enable();
debug("Reached non-secure mode\n");
@@ -42,11 +42,11 @@ static void entry_non_secure(struct jmp_buf_data *non_secure_jmp)
*/
void switch_to_non_secure_mode(void)
{
- struct jmp_buf_data non_secure_jmp;
+ jmp_buf non_secure_jmp;
/* On AArch64 we need to make sure we call our payload in < EL3 */
if (current_el() == 3) {
- if (setjmp(&non_secure_jmp))
+ if (setjmp(non_secure_jmp))
return;
dcache_disable(); /* flush cache before switch to EL2 */
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 85a03b512b6..73231824526 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -121,6 +121,7 @@ dtb-$(CONFIG_ARCH_TEGRA) += \
tegra124-nyan-big.dtb \
tegra124-cei-tk1-som.dtb \
tegra124-venice2.dtb \
+ tegra124-xiaomi-mocha.dtb \
tegra186-p2771-0000-000.dtb \
tegra186-p2771-0000-500.dtb \
tegra210-p2371-0000.dtb \
diff --git a/arch/arm/dts/k3-am62-lp4-50-800-800.dtsi b/arch/arm/dts/k3-am62-lp4-50-800-800.dtsi
index c255ae6530f..ee9e213be84 100644
--- a/arch/arm/dts/k3-am62-lp4-50-800-800.dtsi
+++ b/arch/arm/dts/k3-am62-lp4-50-800-800.dtsi
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* This file was generated with the
- * AM62x SysConfig DDR Subsystem Register Configuration Tool v0.09.07
- * Wed Mar 01 2023 17:52:11 GMT-0600 (Central Standard Time)
+ * AM623/AM625 SysConfig DDR Configuration Tool for AM64x, AM625, AM623, AM62Ax, AM62Px v0.10.02
+ * Tue Sep 17 2024 13:07:19 GMT+0530 (India Standard Time)
* DDR Type: LPDDR4
* F0 = 50MHz F1 = NA F2 = 800MHz
* Density (per channel): 16Gb
@@ -13,6 +13,8 @@
#define DDRSS_PLL_FHS_CNT 3
#define DDRSS_PLL_FREQUENCY_1 400000000
#define DDRSS_PLL_FREQUENCY_2 400000000
+#define DDRSS_SDRAM_IDX 15
+#define DDRSS_REGION_IDX 16
#define DDRSS_CTL_0_DATA 0x00000B00
#define DDRSS_CTL_1_DATA 0x00000000
@@ -847,7 +849,7 @@
#define DDRSS_PHY_62_DATA 0x00000000
#define DDRSS_PHY_63_DATA 0x00000000
#define DDRSS_PHY_64_DATA 0x00000000
-#define DDRSS_PHY_65_DATA 0x00000004
+#define DDRSS_PHY_65_DATA 0x00000104
#define DDRSS_PHY_66_DATA 0x00000000
#define DDRSS_PHY_67_DATA 0x00000000
#define DDRSS_PHY_68_DATA 0x00000000
@@ -869,7 +871,7 @@
#define DDRSS_PHY_84_DATA 0x00100010
#define DDRSS_PHY_85_DATA 0x00100010
#define DDRSS_PHY_86_DATA 0x00100010
-#define DDRSS_PHY_87_DATA 0x02020010
+#define DDRSS_PHY_87_DATA 0x02000010
#define DDRSS_PHY_88_DATA 0x51516041
#define DDRSS_PHY_89_DATA 0x31C06000
#define DDRSS_PHY_90_DATA 0x07AB0340
@@ -1103,7 +1105,7 @@
#define DDRSS_PHY_318_DATA 0x00000000
#define DDRSS_PHY_319_DATA 0x00000000
#define DDRSS_PHY_320_DATA 0x00000000
-#define DDRSS_PHY_321_DATA 0x00000004
+#define DDRSS_PHY_321_DATA 0x00000104
#define DDRSS_PHY_322_DATA 0x00000000
#define DDRSS_PHY_323_DATA 0x00000000
#define DDRSS_PHY_324_DATA 0x00000000
@@ -1125,7 +1127,7 @@
#define DDRSS_PHY_340_DATA 0x00100010
#define DDRSS_PHY_341_DATA 0x00100010
#define DDRSS_PHY_342_DATA 0x00100010
-#define DDRSS_PHY_343_DATA 0x02020010
+#define DDRSS_PHY_343_DATA 0x02000010
#define DDRSS_PHY_344_DATA 0x51516041
#define DDRSS_PHY_345_DATA 0x31C06000
#define DDRSS_PHY_346_DATA 0x07AB0340
@@ -2181,7 +2183,7 @@
#define DDRSS_PHY_1396_DATA 0x0089FF00
#define DDRSS_PHY_1397_DATA 0x000C3F11
#define DDRSS_PHY_1398_DATA 0x01990000
-#define DDRSS_PHY_1399_DATA 0x000C3F11
+#define DDRSS_PHY_1399_DATA 0x000C3F91
#define DDRSS_PHY_1400_DATA 0x01990000
#define DDRSS_PHY_1401_DATA 0x3F0DFF11
#define DDRSS_PHY_1402_DATA 0x01990000
diff --git a/arch/arm/dts/k3-am625-phycore-som-binman.dtsi b/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
index 31456d23167..4a65427e877 100644
--- a/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
+++ b/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
@@ -321,8 +321,11 @@
compression = "none";
load = <0x8F000000>;
arch = "arm";
-
- blob-ext {
+ ti-secure {
+ content = <&am6xx_phycore_disable_rtc_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_rtc_dtbo: blob-ext {
filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-disable-rtc.dtbo";
};
};
@@ -333,8 +336,11 @@
compression = "none";
load = <0x8F001000>;
arch = "arm";
-
- blob-ext {
+ ti-secure {
+ content = <&am6xx_phycore_disable_spi_not_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_spi_not_dtbo: blob-ext {
filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-disable-spi-nor.dtbo";
};
};
@@ -345,8 +351,11 @@
compression = "none";
load = <0x8F002000>;
arch = "arm";
-
- blob-ext {
+ ti-secure {
+ content = <&am6xx_phycore_disable_eth_phy_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_eth_phy_dtbo: blob-ext {
filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-disable-eth-phy.dtbo";
};
};
@@ -357,8 +366,11 @@
compression = "none";
load = <0x8F003000>;
arch = "arm";
-
- blob-ext {
+ ti-secure {
+ content = <&am6xx_phycore_disable_qspi_nor_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_qspi_nor_dtbo: blob-ext {
filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-qspi-nor.dtbo";
};
};
diff --git a/arch/arm/dts/k3-am62a-ddr-1866mhz-32bit.dtsi b/arch/arm/dts/k3-am62a-ddr-1866mhz-32bit.dtsi
index 9f50d7eae69..35202651221 100644
--- a/arch/arm/dts/k3-am62a-ddr-1866mhz-32bit.dtsi
+++ b/arch/arm/dts/k3-am62a-ddr-1866mhz-32bit.dtsi
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* This file was generated with the
- * AM62A SysConfig DDR Subsystem Register Configuration Tool v0.09.01
- * Wed Aug 10 2022 17:34:54 GMT-0500 (Central Daylight Time)
+ * AM62Ax SysConfig DDR Configuration Tool for AM64x, AM625, AM623, AM62Ax, AM62Px v0.10.02
+ * Tue Sep 17 2024 10:55:17 GMT+0530 (India Standard Time)
* DDR Type: LPDDR4
* F0 = 50MHz F1 = NA F2 = 1866MHz
* Density (per channel): 8Gb
@@ -12,6 +12,8 @@
#define DDRSS_PLL_FHS_CNT 5
#define DDRSS_PLL_FREQUENCY_1 933000000
#define DDRSS_PLL_FREQUENCY_2 933000000
+#define DDRSS_SDRAM_IDX 16
+#define DDRSS_REGION_IDX 17
#define DDRSS_CTL_0_DATA 0x00000B00
#define DDRSS_CTL_1_DATA 0x00000000
@@ -402,10 +404,10 @@
#define DDRSS_CTL_386_DATA 0x01090903
#define DDRSS_CTL_387_DATA 0x05020201
#define DDRSS_CTL_388_DATA 0x0E081B1B
-#define DDRSS_CTL_389_DATA 0x0008030E
-#define DDRSS_CTL_390_DATA 0x0B12030E
-#define DDRSS_CTL_391_DATA 0x0B120314
-#define DDRSS_CTL_392_DATA 0x12120814
+#define DDRSS_CTL_389_DATA 0x0008040E
+#define DDRSS_CTL_390_DATA 0x0B120406
+#define DDRSS_CTL_391_DATA 0x0B120406
+#define DDRSS_CTL_392_DATA 0x12120806
#define DDRSS_CTL_393_DATA 0x01000000
#define DDRSS_CTL_394_DATA 0x07030701
#define DDRSS_CTL_395_DATA 0x04000103
@@ -417,8 +419,8 @@
#define DDRSS_CTL_401_DATA 0x00000200
#define DDRSS_CTL_402_DATA 0x00000693
#define DDRSS_CTL_403_DATA 0x00000E9C
-#define DDRSS_CTL_404_DATA 0x03050202
-#define DDRSS_CTL_405_DATA 0x37200201
+#define DDRSS_CTL_404_DATA 0x03000202
+#define DDRSS_CTL_405_DATA 0x37200404
#define DDRSS_CTL_406_DATA 0x000038C8
#define DDRSS_CTL_407_DATA 0x00000200
#define DDRSS_CTL_408_DATA 0x00000200
@@ -426,8 +428,8 @@
#define DDRSS_CTL_410_DATA 0x00000200
#define DDRSS_CTL_411_DATA 0x0000FF84
#define DDRSS_CTL_412_DATA 0x000237D0
-#define DDRSS_CTL_413_DATA 0x111F0402
-#define DDRSS_CTL_414_DATA 0x37200C0D
+#define DDRSS_CTL_413_DATA 0x111A0402
+#define DDRSS_CTL_414_DATA 0x37200C09
#define DDRSS_CTL_415_DATA 0x000038C8
#define DDRSS_CTL_416_DATA 0x00000200
#define DDRSS_CTL_417_DATA 0x00000200
@@ -435,8 +437,8 @@
#define DDRSS_CTL_419_DATA 0x00000200
#define DDRSS_CTL_420_DATA 0x0000FF84
#define DDRSS_CTL_421_DATA 0x000237D0
-#define DDRSS_CTL_422_DATA 0x111F0402
-#define DDRSS_CTL_423_DATA 0x00200C0D
+#define DDRSS_CTL_422_DATA 0x111A0402
+#define DDRSS_CTL_423_DATA 0x00200C09
#define DDRSS_CTL_424_DATA 0x00000000
#define DDRSS_CTL_425_DATA 0x02000A00
#define DDRSS_CTL_426_DATA 0x00050003
@@ -939,7 +941,7 @@
#define DDRSS_PHY_64_DATA 0x00000000
#define DDRSS_PHY_65_DATA 0x00000000
#define DDRSS_PHY_66_DATA 0x00000000
-#define DDRSS_PHY_67_DATA 0x00000004
+#define DDRSS_PHY_67_DATA 0x00000104
#define DDRSS_PHY_68_DATA 0x00000000
#define DDRSS_PHY_69_DATA 0x00000000
#define DDRSS_PHY_70_DATA 0x00000000
@@ -964,7 +966,7 @@
#define DDRSS_PHY_89_DATA 0x00100010
#define DDRSS_PHY_90_DATA 0x00100010
#define DDRSS_PHY_91_DATA 0x00100010
-#define DDRSS_PHY_92_DATA 0x02040010
+#define DDRSS_PHY_92_DATA 0x02000010
#define DDRSS_PHY_93_DATA 0x00000005
#define DDRSS_PHY_94_DATA 0x51516042
#define DDRSS_PHY_95_DATA 0x31C06000
@@ -1195,7 +1197,7 @@
#define DDRSS_PHY_320_DATA 0x00000000
#define DDRSS_PHY_321_DATA 0x00000000
#define DDRSS_PHY_322_DATA 0x00000000
-#define DDRSS_PHY_323_DATA 0x00000004
+#define DDRSS_PHY_323_DATA 0x00000104
#define DDRSS_PHY_324_DATA 0x00000000
#define DDRSS_PHY_325_DATA 0x00000000
#define DDRSS_PHY_326_DATA 0x00000000
@@ -1220,7 +1222,7 @@
#define DDRSS_PHY_345_DATA 0x00100010
#define DDRSS_PHY_346_DATA 0x00100010
#define DDRSS_PHY_347_DATA 0x00100010
-#define DDRSS_PHY_348_DATA 0x02040010
+#define DDRSS_PHY_348_DATA 0x02000010
#define DDRSS_PHY_349_DATA 0x00000005
#define DDRSS_PHY_350_DATA 0x51516042
#define DDRSS_PHY_351_DATA 0x31C06000
@@ -1451,7 +1453,7 @@
#define DDRSS_PHY_576_DATA 0x00000000
#define DDRSS_PHY_577_DATA 0x00000000
#define DDRSS_PHY_578_DATA 0x00000000
-#define DDRSS_PHY_579_DATA 0x00000004
+#define DDRSS_PHY_579_DATA 0x00000104
#define DDRSS_PHY_580_DATA 0x00000000
#define DDRSS_PHY_581_DATA 0x00000000
#define DDRSS_PHY_582_DATA 0x00000000
@@ -1476,7 +1478,7 @@
#define DDRSS_PHY_601_DATA 0x00100010
#define DDRSS_PHY_602_DATA 0x00100010
#define DDRSS_PHY_603_DATA 0x00100010
-#define DDRSS_PHY_604_DATA 0x02040010
+#define DDRSS_PHY_604_DATA 0x02000010
#define DDRSS_PHY_605_DATA 0x00000005
#define DDRSS_PHY_606_DATA 0x51516042
#define DDRSS_PHY_607_DATA 0x31C06000
@@ -1707,7 +1709,7 @@
#define DDRSS_PHY_832_DATA 0x00000000
#define DDRSS_PHY_833_DATA 0x00000000
#define DDRSS_PHY_834_DATA 0x00000000
-#define DDRSS_PHY_835_DATA 0x00000004
+#define DDRSS_PHY_835_DATA 0x00000104
#define DDRSS_PHY_836_DATA 0x00000000
#define DDRSS_PHY_837_DATA 0x00000000
#define DDRSS_PHY_838_DATA 0x00000000
@@ -1732,7 +1734,7 @@
#define DDRSS_PHY_857_DATA 0x00100010
#define DDRSS_PHY_858_DATA 0x00100010
#define DDRSS_PHY_859_DATA 0x00100010
-#define DDRSS_PHY_860_DATA 0x02040010
+#define DDRSS_PHY_860_DATA 0x02000010
#define DDRSS_PHY_861_DATA 0x00000005
#define DDRSS_PHY_862_DATA 0x51516042
#define DDRSS_PHY_863_DATA 0x31C06000
@@ -2699,7 +2701,7 @@
#define DDRSS_PHY_1824_DATA 0x0F0F0804
#define DDRSS_PHY_1825_DATA 0x00800120
#define DDRSS_PHY_1826_DATA 0x00041B42
-#define DDRSS_PHY_1827_DATA 0x00005201
+#define DDRSS_PHY_1827_DATA 0x00004201
#define DDRSS_PHY_1828_DATA 0x00000000
#define DDRSS_PHY_1829_DATA 0x00000000
#define DDRSS_PHY_1830_DATA 0x00000000
@@ -2760,7 +2762,7 @@
#define DDRSS_PHY_1885_DATA 0x00000002
#define DDRSS_PHY_1886_DATA 0x00000000
#define DDRSS_PHY_1887_DATA 0x00000000
-#define DDRSS_PHY_1888_DATA 0x00000AC4
+#define DDRSS_PHY_1888_DATA 0x0001F7C4
#define DDRSS_PHY_1889_DATA 0x04000004
#define DDRSS_PHY_1890_DATA 0x00000000
#define DDRSS_PHY_1891_DATA 0x00001142
@@ -2789,10 +2791,10 @@
#define DDRSS_PHY_1914_DATA 0x0089FF00
#define DDRSS_PHY_1915_DATA 0x000C3F11
#define DDRSS_PHY_1916_DATA 0x01990000
-#define DDRSS_PHY_1917_DATA 0x000C3F11
+#define DDRSS_PHY_1917_DATA 0x000C3F91
#define DDRSS_PHY_1918_DATA 0x01990000
#define DDRSS_PHY_1919_DATA 0x3F0DFF11
#define DDRSS_PHY_1920_DATA 0x00EF0000
#define DDRSS_PHY_1921_DATA 0x00018011
#define DDRSS_PHY_1922_DATA 0x0089FF00
-#define DDRSS_PHY_1923_DATA 0x20040004
+#define DDRSS_PHY_1923_DATA 0x20040006
diff --git a/arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi b/arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi
index f6643520153..c7e33ba50b9 100644
--- a/arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi
+++ b/arch/arm/dts/k3-am62p-ddr-lp4-50-1600.dtsi
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* This file was generated with the
- * AM62Px SysConfig DDR Subsystem Register Configuration Tool v0.10.02
- * Thu Jan 25 2024 10:43:46 GMT-0600 (Central Standard Time)
+ * AM62Px SysConfig DDR Configuration Tool for AM64x, AM625, AM623, AM62Ax, AM62Px v0.10.02
+ * Tue Sep 17 2024 11:03:07 GMT+0530 (India Standard Time)
* DDR Type: LPDDR4
* F0 = 50MHz F1 = NA F2 = 1600MHz
* Density (per channel): 16Gb
@@ -941,7 +941,7 @@
#define DDRSS_PHY_64_DATA 0x00000000
#define DDRSS_PHY_65_DATA 0x00000000
#define DDRSS_PHY_66_DATA 0x00000000
-#define DDRSS_PHY_67_DATA 0x00000004
+#define DDRSS_PHY_67_DATA 0x00000104
#define DDRSS_PHY_68_DATA 0x00000000
#define DDRSS_PHY_69_DATA 0x00000000
#define DDRSS_PHY_70_DATA 0x00000000
@@ -1197,7 +1197,7 @@
#define DDRSS_PHY_320_DATA 0x00000000
#define DDRSS_PHY_321_DATA 0x00000000
#define DDRSS_PHY_322_DATA 0x00000000
-#define DDRSS_PHY_323_DATA 0x00000004
+#define DDRSS_PHY_323_DATA 0x00000104
#define DDRSS_PHY_324_DATA 0x00000000
#define DDRSS_PHY_325_DATA 0x00000000
#define DDRSS_PHY_326_DATA 0x00000000
@@ -1453,7 +1453,7 @@
#define DDRSS_PHY_576_DATA 0x00000000
#define DDRSS_PHY_577_DATA 0x00000000
#define DDRSS_PHY_578_DATA 0x00000000
-#define DDRSS_PHY_579_DATA 0x00000004
+#define DDRSS_PHY_579_DATA 0x00000104
#define DDRSS_PHY_580_DATA 0x00000000
#define DDRSS_PHY_581_DATA 0x00000000
#define DDRSS_PHY_582_DATA 0x00000000
@@ -1709,7 +1709,7 @@
#define DDRSS_PHY_832_DATA 0x00000000
#define DDRSS_PHY_833_DATA 0x00000000
#define DDRSS_PHY_834_DATA 0x00000000
-#define DDRSS_PHY_835_DATA 0x00000004
+#define DDRSS_PHY_835_DATA 0x00000104
#define DDRSS_PHY_836_DATA 0x00000000
#define DDRSS_PHY_837_DATA 0x00000000
#define DDRSS_PHY_838_DATA 0x00000000
diff --git a/arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi b/arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi
index d92e3ce048b..8def52b07f4 100644
--- a/arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi
+++ b/arch/arm/dts/k3-am62x-sk-ddr4-1600MTs.dtsi
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* This file was generated with the
- * AM62x SysConfig DDR Subsystem Register Configuration Tool v0.08.60
- * Wed Mar 16 2022 17:41:20 GMT-0500 (Central Daylight Time)
+ * AM623/AM625 SysConfig DDR Configuration Tool for AM64x, AM625, AM623, AM62Ax, AM62Px v0.10.02
+ * Tue Sep 17 2024 11:00:17 GMT+0530 (India Standard Time)
* DDR Type: DDR4
* Frequency = 800MHz (1600MTs)
* Density: 16Gb
@@ -12,6 +12,8 @@
#define DDRSS_PLL_FHS_CNT 6
#define DDRSS_PLL_FREQUENCY_1 400000000
#define DDRSS_PLL_FREQUENCY_2 400000000
+#define DDRSS_SDRAM_IDX 15
+#define DDRSS_REGION_IDX 17
#define DDRSS_CTL_0_DATA 0x00000A00
#define DDRSS_CTL_1_DATA 0x00000000
@@ -334,7 +336,7 @@
#define DDRSS_CTL_318_DATA 0x3FFF0000
#define DDRSS_CTL_319_DATA 0x000FFF00
#define DDRSS_CTL_320_DATA 0xFFFFFFFF
-#define DDRSS_CTL_321_DATA 0x000FFF00
+#define DDRSS_CTL_321_DATA 0x00FFFF00
#define DDRSS_CTL_322_DATA 0x0A000000
#define DDRSS_CTL_323_DATA 0x0001FFFF
#define DDRSS_CTL_324_DATA 0x01010101
@@ -901,7 +903,7 @@
#define DDRSS_PHY_117_DATA 0x00800080
#define DDRSS_PHY_118_DATA 0x00800080
#define DDRSS_PHY_119_DATA 0x01000080
-#define DDRSS_PHY_120_DATA 0x01A00000
+#define DDRSS_PHY_120_DATA 0x01000000
#define DDRSS_PHY_121_DATA 0x00000000
#define DDRSS_PHY_122_DATA 0x00000000
#define DDRSS_PHY_123_DATA 0x00080200
@@ -1157,7 +1159,7 @@
#define DDRSS_PHY_373_DATA 0x00800080
#define DDRSS_PHY_374_DATA 0x00800080
#define DDRSS_PHY_375_DATA 0x01000080
-#define DDRSS_PHY_376_DATA 0x01A00000
+#define DDRSS_PHY_376_DATA 0x01000000
#define DDRSS_PHY_377_DATA 0x00000000
#define DDRSS_PHY_378_DATA 0x00000000
#define DDRSS_PHY_379_DATA 0x00080200
@@ -2152,7 +2154,7 @@
#define DDRSS_PHY_1368_DATA 0x00000002
#define DDRSS_PHY_1369_DATA 0x00000100
#define DDRSS_PHY_1370_DATA 0x00000000
-#define DDRSS_PHY_1371_DATA 0x0001F7C0
+#define DDRSS_PHY_1371_DATA 0x0001F7C2
#define DDRSS_PHY_1372_DATA 0x00020002
#define DDRSS_PHY_1373_DATA 0x00000000
#define DDRSS_PHY_1374_DATA 0x00001142
diff --git a/arch/arm/dts/k3-am64-evm-ddr4-1600MTs.dtsi b/arch/arm/dts/k3-am64-evm-ddr4-1600MTs.dtsi
index 491412119b1..1b5fabc3dd1 100644
--- a/arch/arm/dts/k3-am64-evm-ddr4-1600MTs.dtsi
+++ b/arch/arm/dts/k3-am64-evm-ddr4-1600MTs.dtsi
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* This file was generated with the
- * AM64x SysConfig DDR Subsystem Register Configuration Tool v0.08.40
- * Wed Feb 02 2022 16:24:50 GMT-0600 (Central Standard Time)
+ * AM64x SysConfig DDR Configuration Tool for AM64x, AM625, AM623, AM62Ax, AM62Px v0.10.02
+ * Tue Sep 17 2024 11:01:31 GMT+0530 (India Standard Time)
* DDR Type: DDR4
* Frequency = 800MHz (1600MTs)
* Density: 16Gb
@@ -12,6 +12,8 @@
#define DDRSS_PLL_FHS_CNT 6
#define DDRSS_PLL_FREQUENCY_1 400000000
#define DDRSS_PLL_FREQUENCY_2 400000000
+#define DDRSS_SDRAM_IDX 15
+#define DDRSS_REGION_IDX 15
#define DDRSS_CTL_0_DATA 0x00000A00
#define DDRSS_CTL_1_DATA 0x00000000
@@ -178,7 +180,7 @@
#define DDRSS_CTL_162_DATA 0x0E0A0907
#define DDRSS_CTL_163_DATA 0x0A090000
#define DDRSS_CTL_164_DATA 0x0A090701
-#define DDRSS_CTL_165_DATA 0x0000000E
+#define DDRSS_CTL_165_DATA 0x0000080E
#define DDRSS_CTL_166_DATA 0x00040003
#define DDRSS_CTL_167_DATA 0x00000007
#define DDRSS_CTL_168_DATA 0x00000000
@@ -334,7 +336,7 @@
#define DDRSS_CTL_318_DATA 0x3FFF0000
#define DDRSS_CTL_319_DATA 0x000FFF00
#define DDRSS_CTL_320_DATA 0xFFFFFFFF
-#define DDRSS_CTL_321_DATA 0x000FFF00
+#define DDRSS_CTL_321_DATA 0x00FFFF00
#define DDRSS_CTL_322_DATA 0x0A000000
#define DDRSS_CTL_323_DATA 0x0001FFFF
#define DDRSS_CTL_324_DATA 0x01010101
@@ -901,7 +903,7 @@
#define DDRSS_PHY_117_DATA 0x00800080
#define DDRSS_PHY_118_DATA 0x00800080
#define DDRSS_PHY_119_DATA 0x01000080
-#define DDRSS_PHY_120_DATA 0x01A00000
+#define DDRSS_PHY_120_DATA 0x01000000
#define DDRSS_PHY_121_DATA 0x00000000
#define DDRSS_PHY_122_DATA 0x00000000
#define DDRSS_PHY_123_DATA 0x00080200
@@ -1157,7 +1159,7 @@
#define DDRSS_PHY_373_DATA 0x00800080
#define DDRSS_PHY_374_DATA 0x00800080
#define DDRSS_PHY_375_DATA 0x01000080
-#define DDRSS_PHY_376_DATA 0x01A00000
+#define DDRSS_PHY_376_DATA 0x01000000
#define DDRSS_PHY_377_DATA 0x00000000
#define DDRSS_PHY_378_DATA 0x00000000
#define DDRSS_PHY_379_DATA 0x00080200
@@ -2152,7 +2154,7 @@
#define DDRSS_PHY_1368_DATA 0x00000002
#define DDRSS_PHY_1369_DATA 0x00000100
#define DDRSS_PHY_1370_DATA 0x00000000
-#define DDRSS_PHY_1371_DATA 0x0001F7C0
+#define DDRSS_PHY_1371_DATA 0x0001F7C2
#define DDRSS_PHY_1372_DATA 0x00020002
#define DDRSS_PHY_1373_DATA 0x00000000
#define DDRSS_PHY_1374_DATA 0x00001142
diff --git a/arch/arm/dts/k3-am642-phycore-som-binman.dtsi b/arch/arm/dts/k3-am642-phycore-som-binman.dtsi
index 3710564cd4a..5228eed19bf 100644
--- a/arch/arm/dts/k3-am642-phycore-som-binman.dtsi
+++ b/arch/arm/dts/k3-am642-phycore-som-binman.dtsi
@@ -363,8 +363,11 @@
compression = "none";
load = <0x8F000000>;
arch = "arm";
-
- blob-ext {
+ ti-secure {
+ content = <&am6xx_phycore_disable_rtc_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_rtc_dtbo: blob-ext {
filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-disable-rtc.dtbo";
};
};
@@ -375,8 +378,11 @@
compression = "none";
load = <0x8F001000>;
arch = "arm";
-
- blob-ext {
+ ti-secure {
+ content = <&am6xx_phycore_disable_spi_not_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_spi_not_dtbo: blob-ext {
filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-disable-spi-nor.dtbo";
};
};
@@ -387,8 +393,11 @@
compression = "none";
load = <0x8F002000>;
arch = "arm";
-
- blob-ext {
+ ti-secure {
+ content = <&am6xx_phycore_disable_eth_phy_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_eth_phy_dtbo: blob-ext {
filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-disable-eth-phy.dtbo";
};
};
@@ -399,8 +408,11 @@
compression = "none";
load = <0x8F003000>;
arch = "arm";
-
- blob-ext {
+ ti-secure {
+ content = <&am6xx_phycore_disable_qspi_nor_dtbo>;
+ keyfile = "custMpk.pem";
+ };
+ am6xx_phycore_disable_qspi_nor_dtbo: blob-ext {
filename = "dts/upstream/src/arm64/ti/k3-am6xx-phycore-qspi-nor.dtbo";
};
};
diff --git a/arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi b/arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi
index b6d2c816acc..55337179f9f 100644
--- a/arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi
+++ b/arch/arm/dts/k3-am65-iot2050-common-u-boot.dtsi
@@ -14,6 +14,24 @@
spi0 = &ospi0;
};
+ sysinfo {
+ compatible = "siemens,sysinfo-iot2050";
+ /* TI_SRAM_SCRATCH_BOARD_EEPROM_START */
+ offset = <0x40280000>;
+ bootph-all;
+
+ smbios {
+ system {
+ manufacturer = "SIEMENS AG";
+ product = "SIMATIC IOT2050";
+ };
+
+ baseboard {
+ manufacturer = "SIEMENS AG";
+ };
+ };
+ };
+
leds {
bootph-all;
status-led-red {
diff --git a/arch/arm/dts/rk3308-rock-s0-u-boot.dtsi b/arch/arm/dts/rk3308-rock-s0-u-boot.dtsi
index 84ca2ee0d5f..c8c56b17a15 100644
--- a/arch/arm/dts/rk3308-rock-s0-u-boot.dtsi
+++ b/arch/arm/dts/rk3308-rock-s0-u-boot.dtsi
@@ -7,6 +7,14 @@
bootph-some-ram;
};
+&gpio4 {
+ bootph-pre-ram;
+};
+
+&sdmmc_2030 {
+ bootph-pre-ram;
+};
+
&uart0 {
bootph-all;
clock-frequency = <24000000>;
@@ -16,6 +24,10 @@
bootph-all;
};
+&vcc_sd {
+ bootph-pre-ram;
+};
+
&vdd_core {
regulator-init-microvolt = <1015000>;
};
diff --git a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi
index 69800cc368d..931499b084c 100644
--- a/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi
+++ b/arch/arm/dts/rk3399-nanopi-r4s-u-boot.dtsi
@@ -36,3 +36,8 @@
};
};
};
+
+&u2phy1_host {
+ phy-supply = <&vdd_5v>;
+ status = "okay";
+};
diff --git a/arch/arm/dts/stm32746g-eval-u-boot.dtsi b/arch/arm/dts/stm32746g-eval-u-boot.dtsi
index 1c288acec99..32b5c7cea4b 100644
--- a/arch/arm/dts/stm32746g-eval-u-boot.dtsi
+++ b/arch/arm/dts/stm32746g-eval-u-boot.dtsi
@@ -22,16 +22,6 @@
mmc0 = &sdio1;
spi0 = &qspi;
};
-
- button1 {
- compatible = "st,button1";
- button-gpio = <&gpioc 13 0>;
- };
-
- led1 {
- compatible = "st,led1";
- led-gpio = <&gpiof 10 0>;
- };
};
&fmc {
diff --git a/arch/arm/dts/stm32f746-disco-u-boot.dtsi b/arch/arm/dts/stm32f746-disco-u-boot.dtsi
index 1b42d6cbbc1..38d797e49a0 100644
--- a/arch/arm/dts/stm32f746-disco-u-boot.dtsi
+++ b/arch/arm/dts/stm32f746-disco-u-boot.dtsi
@@ -22,16 +22,6 @@
mmc0 = &sdio1;
spi0 = &qspi;
};
-
- button1 {
- compatible = "st,button1";
- button-gpio = <&gpioi 11 0>;
- };
-
- led1 {
- compatible = "st,led1";
- led-gpio = <&gpioi 1 0>;
- };
};
&ltdc {
diff --git a/arch/arm/dts/stm32f769-disco-u-boot.dtsi b/arch/arm/dts/stm32f769-disco-u-boot.dtsi
index add55c96e21..7c99a6e61b6 100644
--- a/arch/arm/dts/stm32f769-disco-u-boot.dtsi
+++ b/arch/arm/dts/stm32f769-disco-u-boot.dtsi
@@ -23,16 +23,6 @@
spi0 = &qspi;
};
- button1 {
- compatible = "st,button1";
- button-gpio = <&gpioa 0 0>;
- };
-
- led1 {
- compatible = "st,led1";
- led-gpio = <&gpioj 5 0>;
- };
-
panel: panel {
compatible = "orisetech,otm8009a";
reset-gpios = <&gpioj 15 1>;
diff --git a/arch/arm/dts/stm32mp13-pinctrl.dtsi b/arch/arm/dts/stm32mp13-pinctrl.dtsi
index c01d39f03ea..52c2a9f24d7 100644
--- a/arch/arm/dts/stm32mp13-pinctrl.dtsi
+++ b/arch/arm/dts/stm32mp13-pinctrl.dtsi
@@ -215,6 +215,21 @@
};
};
+ pwm1_ch3n_pins_a: pwm1-ch3n-0 {
+ pins {
+ pinmux = <STM32_PINMUX('E', 12, AF1)>; /* TIM1_CH3N */
+ bias-pull-down;
+ drive-push-pull;
+ slew-rate = <0>;
+ };
+ };
+
+ pwm1_ch3n_sleep_pins_a: pwm1-ch3n-sleep-0 {
+ pins {
+ pinmux = <STM32_PINMUX('E', 12, ANALOG)>; /* TIM1_CH3N */
+ };
+ };
+
pwm3_pins_a: pwm3-0 {
pins {
pinmux = <STM32_PINMUX('B', 1, AF2)>; /* TIM3_CH4 */
diff --git a/arch/arm/dts/stm32mp135f-dhcor-dhsbc-u-boot.dtsi b/arch/arm/dts/stm32mp135f-dhcor-dhsbc-u-boot.dtsi
index d718aae16ca..eace94f5fa4 100644
--- a/arch/arm/dts/stm32mp135f-dhcor-dhsbc-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp135f-dhcor-dhsbc-u-boot.dtsi
@@ -23,3 +23,25 @@
&usbphyc {
bootph-all;
};
+
+&st33htph {
+ reset-gpios = <&gpioe 12 GPIO_ACTIVE_LOW>;
+};
+
+/* LDO2 is expansion connector 3V3 supply on STM32MP13xx DHCOR DHSBC rev.200 */
+&vdd_ldo2 {
+ bootph-all;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+};
+
+/* LDO5 is carrier board 3V3 supply on STM32MP13xx DHCOR DHSBC rev.200 */
+&vdd_sd {
+ bootph-all;
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+};
diff --git a/arch/arm/dts/stm32mp135f-dk.dts b/arch/arm/dts/stm32mp135f-dk.dts
index eea740d097c..275823da3c6 100644
--- a/arch/arm/dts/stm32mp135f-dk.dts
+++ b/arch/arm/dts/stm32mp135f-dk.dts
@@ -9,6 +9,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/regulator/st,stm32mp13-regulator.h>
#include "stm32mp135.dtsi"
#include "stm32mp13xf.dtsi"
@@ -207,6 +208,19 @@
status = "disabled";
};
+&timers1 {
+ /* spare dmas for other usage */
+ /delete-property/dmas;
+ /delete-property/dma-names;
+ status = "okay";
+ pwm1: pwm {
+ pinctrl-0 = <&pwm1_ch3n_pins_a>;
+ pinctrl-1 = <&pwm1_ch3n_sleep_pins_a>;
+ pinctrl-names = "default", "sleep";
+ status = "okay";
+ };
+};
+
&timers3 {
/delete-property/dmas;
/delete-property/dma-names;
diff --git a/arch/arm/dts/stm32mp13xx-dhcor-u-boot.dtsi b/arch/arm/dts/stm32mp13xx-dhcor-u-boot.dtsi
index 30e3b91bccc..9ff42ab8248 100644
--- a/arch/arm/dts/stm32mp13xx-dhcor-u-boot.dtsi
+++ b/arch/arm/dts/stm32mp13xx-dhcor-u-boot.dtsi
@@ -13,6 +13,8 @@
config {
dh,ddr3-coding-gpios = <&gpiod 5 0>, <&gpiod 9 0>;
dh,som-coding-gpios = <&gpioa 13 0>, <&gpioi 1 0>;
+ u-boot,mmc-env-offset = <0x3fc000>;
+ u-boot,mmc-env-offset-redundant = <0x3fc000>;
};
};
diff --git a/arch/arm/dts/tegra124-xiaomi-mocha.dts b/arch/arm/dts/tegra124-xiaomi-mocha.dts
new file mode 100644
index 00000000000..6cb1781566f
--- /dev/null
+++ b/arch/arm/dts/tegra124-xiaomi-mocha.dts
@@ -0,0 +1,592 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include <dt-bindings/input/input.h>
+#include "tegra124.dtsi"
+
+/ {
+ model = "Xiaomi Mi Pad A0101";
+ compatible = "xiaomi,mocha", "nvidia,tegra124";
+
+ chosen {
+ stdout-path = &uartd;
+ };
+
+ aliases {
+ i2c0 = &pwr_i2c;
+ i2c1 = &gen1_i2c;
+
+ mmc0 = &sdmmc4; /* eMMC */
+ mmc1 = &sdmmc3; /* uSD slot */
+
+ usb0 = &usb1;
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <0x80000000 0x80000000>;
+ };
+
+ host1x@50000000 {
+ dsia: dsi@54300000 {
+ status = "okay";
+
+ avdd-dsi-csi-supply = <&avdd_dsi_csi>;
+ nvidia,ganged-mode = <&dsib>;
+
+ panel@0 {
+ compatible = "sharp,lq079l1sx01";
+ reg = <0>;
+
+ link2 = <&panel_secondary>;
+
+ avdd-supply = <&avdd_lcd>;
+ vddio-supply = <&vdd_lcd_io>;
+
+ vsp-supply = <&vsp_5v5_lcd>;
+ vsn-supply = <&vsn_5v5_lcd>;
+
+ reset-gpios = <&gpio TEGRA_GPIO(H, 3) GPIO_ACTIVE_LOW>;
+
+ backlight = <&lp8556>;
+ };
+ };
+
+ dsib: dsi@54400000 {
+ status = "okay";
+
+ avdd-dsi-csi-supply = <&avdd_dsi_csi>;
+
+ panel_secondary: panel@0 {
+ compatible = "sharp,lq079l1sx01";
+ reg = <0>;
+ };
+ };
+ };
+
+ pinmux@70000868 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&state_default>;
+
+ state_default: pinmux {
+ /* Keys pinmux */
+ keys {
+ nvidia,pins = "kb_col0_pq0",
+ "kb_col6_pq6",
+ "kb_col7_pq7";
+ nvidia,function = "rsvd2";
+ nvidia,pull = <TEGRA_PIN_PULL_UP>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ };
+ hall-front {
+ nvidia,pins = "pi5";
+ nvidia,function = "gmi";
+ nvidia,pull = <TEGRA_PIN_PULL_UP>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ };
+ hall-back {
+ nvidia,pins = "gpio_w3_aud_pw3";
+ nvidia,function = "spi1";
+ nvidia,pull = <TEGRA_PIN_PULL_UP>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ };
+
+ /* Leds pinmux */
+ bl-en {
+ nvidia,pins = "pbb4";
+ nvidia,function = "vgp4";
+ nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+ };
+ keys-led {
+ nvidia,pins = "ph1";
+ nvidia,function = "pwm1";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+ };
+
+ /* Panel pinmux */
+ lcd-rst {
+ nvidia,pins = "ph3";
+ nvidia,function = "gmi";
+ nvidia,pull = <TEGRA_PIN_PULL_UP>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+ };
+ lcd-vsp {
+ nvidia,pins = "pi4";
+ nvidia,function = "gmi";
+ nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+ };
+ lcd-vsn {
+ nvidia,pins = "kb_row10_ps2";
+ nvidia,function = "kbc";
+ nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+ };
+ lcd-id {
+ nvidia,pins = "kb_row6_pr6";
+ nvidia,function = "displaya_alt";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ };
+ lcd-pwm {
+ nvidia,pins = "ph2";
+ nvidia,function = "pwm2";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+ };
+
+ /* SDMMC3 pinmux */
+ sdmmc3-clk {
+ nvidia,pins = "sdmmc3_clk_pa6";
+ nvidia,function = "sdmmc3";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ };
+ sdmmc3-cmd {
+ nvidia,pins = "sdmmc3_cmd_pa7",
+ "sdmmc3_dat0_pb7",
+ "sdmmc3_dat1_pb6",
+ "sdmmc3_dat2_pb5",
+ "sdmmc3_dat3_pb4",
+ "sdmmc3_clk_lb_out_pee4",
+ "sdmmc3_clk_lb_in_pee5";
+ nvidia,function = "sdmmc3";
+ nvidia,pull = <TEGRA_PIN_PULL_UP>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ };
+ sdmmc3-cd {
+ nvidia,pins = "sdmmc3_cd_n_pv2";
+ nvidia,function = "sdmmc3";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ };
+ usd-pwr {
+ nvidia,pins = "kb_row0_pr0";
+ nvidia,function = "rsvd4";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_DISABLE>;
+ };
+
+ /* SDMMC4 pinmux */
+ sdmmc4-clk {
+ nvidia,pins = "sdmmc4_clk_pcc4";
+ nvidia,function = "sdmmc4";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ };
+ sdmmc4-cmd {
+ nvidia,pins = "sdmmc4_cmd_pt7",
+ "sdmmc4_dat0_paa0",
+ "sdmmc4_dat1_paa1",
+ "sdmmc4_dat2_paa2",
+ "sdmmc4_dat3_paa3",
+ "sdmmc4_dat4_paa4",
+ "sdmmc4_dat5_paa5",
+ "sdmmc4_dat6_paa6",
+ "sdmmc4_dat7_paa7";
+ nvidia,function = "sdmmc4";
+ nvidia,pull = <TEGRA_PIN_PULL_UP>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ };
+
+ /* I2C pinmux */
+ gen1-i2c {
+ nvidia,pins = "gen1_i2c_sda_pc5",
+ "gen1_i2c_scl_pc4";
+ nvidia,function = "i2c1";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ nvidia,lock = <1>;
+ nvidia,open-drain = <1>;
+ };
+ gen2-i2c {
+ nvidia,pins = "gen2_i2c_scl_pt5",
+ "gen2_i2c_sda_pt6";
+ nvidia,function = "i2c2";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ nvidia,lock = <1>;
+ nvidia,open-drain = <1>;
+ };
+ cam-i2c {
+ nvidia,pins = "cam_i2c_scl_pbb1",
+ "cam_i2c_sda_pbb2";
+ nvidia,function = "i2c3";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ nvidia,lock = <1>;
+ nvidia,open-drain = <1>;
+ };
+ ddc-i2c {
+ nvidia,pins = "ddc_scl_pv4",
+ "ddc_sda_pv5";
+ nvidia,function = "i2c4";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ };
+ pwr-i2c {
+ nvidia,pins = "pwr_i2c_scl_pz6",
+ "pwr_i2c_sda_pz7";
+ nvidia,function = "i2cpwr";
+ nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ nvidia,enable-input = <TEGRA_PIN_ENABLE>;
+ nvidia,open-drain = <1>;
+ };
+
+ dsi-b {
+ nvidia,pins = "mipi_pad_ctrl_dsi_b";
+ nvidia,function = "dsi_b";
+ };
+
+ /* GPIO power/drive control */
+ drive-sdio1 {
+ nvidia,pins = "drive_sdio1";
+ nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
+ nvidia,schmitt = <TEGRA_PIN_DISABLE>;
+ nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
+ nvidia,pull-down-strength = <32>;
+ nvidia,pull-up-strength = <42>;
+ nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_FASTEST>;
+ nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_FASTEST>;
+ };
+
+ drive-sdio3 {
+ nvidia,pins = "drive_sdio3";
+ nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
+ nvidia,schmitt = <TEGRA_PIN_DISABLE>;
+ nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
+ nvidia,pull-down-strength = <20>;
+ nvidia,pull-up-strength = <36>;
+ nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_FASTEST>;
+ nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_FASTEST>;
+ };
+
+ drive-gma {
+ nvidia,pins = "drive_gma";
+ nvidia,high-speed-mode = <TEGRA_PIN_ENABLE>;
+ nvidia,schmitt = <TEGRA_PIN_DISABLE>;
+ nvidia,low-power-mode = <TEGRA_PIN_LP_DRIVE_DIV_1>;
+ nvidia,pull-down-strength = <1>;
+ nvidia,pull-up-strength = <2>;
+ nvidia,slew-rate-rising = <TEGRA_PIN_SLEW_RATE_FASTEST>;
+ nvidia,slew-rate-falling = <TEGRA_PIN_SLEW_RATE_FASTEST>;
+ };
+ };
+ };
+
+ uartd: serial@70006300 {
+ status = "okay";
+ };
+
+ gen1_i2c: i2c@7000c000 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ lp8556: backlight@2c {
+ compatible = "ti,lp8556";
+ reg = <0x2c>;
+
+ dev-ctrl = /bits/ 8 <0x83>;
+ init-brt = /bits/ 8 <0x1f>;
+
+ power-supply = <&vdd_3v3_sys>;
+ enable-supply = <&vddio_1v8_bl>;
+
+ rom-98h {
+ rom-addr = /bits/ 8 <0x98>;
+ rom-val = /bits/ 8 <0x80>;
+ };
+
+ rom-9eh {
+ rom-addr = /bits/ 8 <0x9e>;
+ rom-val = /bits/ 8 <0x21>;
+ };
+
+ rom-a0h {
+ rom-addr = /bits/ 8 <0xa0>;
+ rom-val = /bits/ 8 <0xff>;
+ };
+
+ rom-a1h {
+ rom-addr = /bits/ 8 <0xa1>;
+ rom-val = /bits/ 8 <0x3f>;
+ };
+
+ rom-a2h {
+ rom-addr = /bits/ 8 <0xa2>;
+ rom-val = /bits/ 8 <0x20>;
+ };
+
+ rom-a3h {
+ rom-addr = /bits/ 8 <0xa3>;
+ rom-val = /bits/ 8 <0x00>;
+ };
+
+ rom-a4h {
+ rom-addr = /bits/ 8 <0xa4>;
+ rom-val = /bits/ 8 <0x72>;
+ };
+
+ rom-a5h {
+ rom-addr = /bits/ 8 <0xa5>;
+ rom-val = /bits/ 8 <0x24>;
+ };
+
+ rom-a6h {
+ rom-addr = /bits/ 8 <0xa6>;
+ rom-val = /bits/ 8 <0x80>;
+ };
+
+ rom-a7h {
+ rom-addr = /bits/ 8 <0xa7>;
+ rom-val = /bits/ 8 <0xf5>;
+ };
+
+ rom-a8h {
+ rom-addr = /bits/ 8 <0xa8>;
+ rom-val = /bits/ 8 <0x24>;
+ };
+
+ rom-a9h {
+ rom-addr = /bits/ 8 <0xa9>;
+ rom-val = /bits/ 8 <0xb2>;
+ };
+
+ rom-aah {
+ rom-addr = /bits/ 8 <0xaa>;
+ rom-val = /bits/ 8 <0x8f>;
+ };
+
+ rom-aeh {
+ rom-addr = /bits/ 8 <0xae>;
+ rom-val = /bits/ 8 <0x0f>;
+ };
+ };
+ };
+
+ pwr_i2c: i2c@7000d000 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ /* Texas Instruments TPS65913 PMIC */
+ pmic: tps65913@58 {
+ compatible = "ti,tps65913";
+ reg = <0x58>;
+
+ interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+ #interrupt-cells = <2>;
+ interrupt-controller;
+
+ ti,system-power-controller;
+
+ palmas_gpio: gpio {
+ compatible = "ti,palmas-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ pinmux {
+ compatible = "ti,tps65913-pinctrl";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&palmas_default>;
+
+ palmas_default: pinmux {
+ pin_gpio4 {
+ pins = "gpio4";
+ function = "gpio";
+ };
+ };
+ };
+
+ pmic {
+ compatible = "ti,tps65913-pmic";
+
+ regulators {
+ vdd_1v8_vio: smps8 {
+ regulator-name = "vdd_1v8_gen";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ vdd_hv_sdmmc: smps9 {
+ regulator-name = "vdd_hv_sdmmc";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ avdd_lcd: ldo2 {
+ regulator-name = "avdd_lcd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-boot-on;
+ };
+
+ avdd_dsi_csi: ldo5 {
+ regulator-name = "avdd_dsi_csi";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-boot-on;
+ };
+
+ vddio_usd: ldo9 {
+ regulator-name = "vddio_sdmmc";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
+ avdd_usb: ldousb {
+ regulator-name = "vdd_usb";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+ };
+ };
+ };
+ };
+
+ sdmmc3: sdhci@700b0400 {
+ status = "okay";
+ bus-width = <4>;
+
+ cd-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>;
+ power-gpios = <&gpio TEGRA_GPIO(R, 0) GPIO_ACTIVE_HIGH>;
+
+ vmmc-supply = <&vdd_hv_sdmmc>;
+ vqmmc-supply = <&vddio_usd>;
+ };
+
+ sdmmc4: sdhci@700b0600 {
+ status = "okay";
+ bus-width = <8>;
+ non-removable;
+
+ vmmc-supply = <&vdd_hv_sdmmc>;
+ vqmmc-supply = <&vdd_1v8_vio>;
+ };
+
+ usb1: usb@7d000000 {
+ status = "okay";
+ dr_mode = "otg";
+ };
+
+ clk32k_in: clock-32k {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <32768>;
+ clock-output-names = "ref-oscillator";
+ };
+
+ extcon-keys {
+ compatible = "gpio-keys";
+
+ switch-back-hall-sensor {
+ label = "Hall sensor (back)";
+ gpios = <&gpio TEGRA_GPIO(W, 3) GPIO_ACTIVE_LOW>;
+ linux,code = <SW_LID>;
+ };
+
+ switch-front-hall-sensor {
+ label = "Hall sensor (front)";
+ gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
+ linux,code = <SW_LID>;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ key-power {
+ label = "Power";
+ gpios = <&gpio TEGRA_GPIO(Q, 0) GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_ENTER>;
+ };
+
+ key-volume-down {
+ label = "Volume Down";
+ gpios = <&gpio TEGRA_GPIO(Q, 7) GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_DOWN>;
+ };
+
+ key-volume-up {
+ label = "Volume Up";
+ gpios = <&gpio TEGRA_GPIO(Q, 6) GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_UP>;
+ };
+ };
+
+ vdd_3v3_sys: regulator-bl-en {
+ compatible = "regulator-fixed";
+ regulator-name = "vdd_5v0_bl";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ enable-active-high;
+ };
+
+ vddio_1v8_bl: regulator-bl-io {
+ compatible = "regulator-fixed";
+ regulator-name = "vddio_1v8_bl";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ enable-active-high;
+ gpio = <&gpio TEGRA_GPIO(BB, 4) GPIO_ACTIVE_HIGH>;
+ };
+
+ vdd_lcd_io: regulator-lcdvio {
+ compatible = "regulator-fixed";
+ regulator-name = "dvdd_lcd";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ enable-active-high;
+ gpio = <&palmas_gpio 4 GPIO_ACTIVE_HIGH>;
+ };
+
+ vsp_5v5_lcd: regulator-vsp {
+ compatible = "regulator-fixed";
+ regulator-name = "avdd_lcd_vsp";
+ regulator-min-microvolt = <5500000>;
+ regulator-max-microvolt = <5500000>;
+ enable-active-high;
+ gpio = <&gpio TEGRA_GPIO(I, 4) GPIO_ACTIVE_HIGH>;
+ };
+
+ vsn_5v5_lcd: regulator-vsn {
+ compatible = "regulator-fixed";
+ regulator-name = "avdd_lcd_vsn";
+ regulator-min-microvolt = <5500000>;
+ regulator-max-microvolt = <5500000>;
+ enable-active-high;
+ gpio = <&gpio TEGRA_GPIO(S, 2) GPIO_ACTIVE_HIGH>;
+ };
+};
diff --git a/arch/arm/dts/tegra20-u-boot.dtsi b/arch/arm/dts/tegra20-u-boot.dtsi
index fa582bcb9fd..b74aa5bb0d4 100644
--- a/arch/arm/dts/tegra20-u-boot.dtsi
+++ b/arch/arm/dts/tegra20-u-boot.dtsi
@@ -9,5 +9,9 @@
dc@54200000 {
bootph-all;
};
+
+ dc@54240000 {
+ bootph-all;
+ };
};
};
diff --git a/arch/arm/dts/tegra30-htc-endeavoru.dts b/arch/arm/dts/tegra30-htc-endeavoru.dts
index dbff795bd89..8a0ba3c07cc 100644
--- a/arch/arm/dts/tegra30-htc-endeavoru.dts
+++ b/arch/arm/dts/tegra30-htc-endeavoru.dts
@@ -48,7 +48,17 @@
avdd-dsi-csi-supply = <&avdd_dsi_csi>;
- panel = <&panel>;
+ panel@0 {
+ compatible = "htc,edge-panel";
+ reg = <0>;
+
+ reset-gpios = <&gpio TEGRA_GPIO(N, 6) GPIO_ACTIVE_LOW>;
+
+ vdd-supply = <&vdd_3v3_panel>;
+ vddio-supply = <&vdd_1v8_panel>;
+
+ backlight = <&backlight>;
+ };
};
};
@@ -1292,17 +1302,6 @@
};
};
- panel: panel {
- compatible = "htc,edge-panel";
-
- reset-gpios = <&gpio TEGRA_GPIO(N, 6) GPIO_ACTIVE_LOW>;
-
- vdd-supply = <&vdd_3v3_panel>;
- vddio-supply = <&vdd_1v8_panel>;
-
- backlight = <&backlight>;
- };
-
vcore_emmc: regulator-emmc {
compatible = "regulator-fixed";
regulator-name = "vdd_2v85_sdmmc";
diff --git a/arch/arm/include/asm/arch-tegra124/pinmux.h b/arch/arm/include/asm/arch-tegra124/pinmux.h
index 3aba17d21e4..fbe15fc612d 100644
--- a/arch/arm/include/asm/arch-tegra124/pinmux.h
+++ b/arch/arm/include/asm/arch-tegra124/pinmux.h
@@ -578,6 +578,10 @@ static const char * const tegra_pinctrl_to_drvgrp[] = {
[PMUX_DRVGRP_AO4] = "ao4",
};
+static const char * const tegra_pinctrl_to_mipipadgrp[] = {
+ [PMUX_MIPIPADCTRLGRP_DSI_B] = "mipi_pad_ctrl_dsi_b",
+};
+
static const char * const tegra_pinctrl_to_func[] = {
[PMUX_FUNC_DEFAULT] = "default",
[PMUX_FUNC_BLINK] = "blink",
diff --git a/arch/arm/include/asm/arch-tegra20/clock-tables.h b/arch/arm/include/asm/arch-tegra20/clock-tables.h
index 861b3d5d07c..82685353bd1 100644
--- a/arch/arm/include/asm/arch-tegra20/clock-tables.h
+++ b/arch/arm/include/asm/arch-tegra20/clock-tables.h
@@ -32,6 +32,7 @@ enum clock_id {
CLOCK_ID_COUNT, /* number of clocks */
CLOCK_ID_NONE = -1,
+ CLOCK_ID_DISPLAY2 = CLOCK_ID_NONE, /* for compatibility */
};
/* The clocks supported by the hardware */
@@ -159,6 +160,7 @@ enum periph_id {
PERIPH_ID_COUNT,
PERIPH_ID_NONE = -1,
+ PERIPH_ID_DSIB = CLOCK_ID_NONE, /* for compatibility */
};
enum pll_out_id {
diff --git a/arch/arm/include/asm/setjmp.h b/arch/arm/include/asm/setjmp.h
index 662bec86321..a9eccf7f632 100644
--- a/arch/arm/include/asm/setjmp.h
+++ b/arch/arm/include/asm/setjmp.h
@@ -4,13 +4,11 @@
* (C) Copyright 2016 Alexander Graf <agraf@suse.de>
*/
-#ifndef _SETJMP_H_
-#define _SETJMP_H_ 1
+#ifndef _ASM_SETJMP_H_
+#define _ASM_SETJMP_H_ 1
+
+#include <asm-generic/int-ll64.h>
-/*
- * This really should be opaque, but the EFI implementation wrongly
- * assumes that a 'struct jmp_buf_data' is defined.
- */
struct jmp_buf_data {
#if defined(__aarch64__)
u64 regs[13];
@@ -19,9 +17,4 @@ struct jmp_buf_data {
#endif
};
-typedef struct jmp_buf_data jmp_buf[1];
-
-int setjmp(jmp_buf jmp);
-void longjmp(jmp_buf jmp, int ret);
-
-#endif /* _SETJMP_H_ */
+#endif /* _ASM_SETJMP_H_ */
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 974cbfe8400..7eb764e1f4e 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -61,10 +61,6 @@ static void announce_and_cleanup(int fake)
bootstage_report();
#endif
-#ifdef CONFIG_USB_DEVICE
- udc_disconnect();
-#endif
-
board_quiesce_devices();
printf("\nStarting kernel ...%s\n\n", fake ?
diff --git a/arch/arm/mach-imx/imx8m/Kconfig b/arch/arm/mach-imx/imx8m/Kconfig
index 0fe9c46e499..89f2b50c8a2 100644
--- a/arch/arm/mach-imx/imx8m/Kconfig
+++ b/arch/arm/mach-imx/imx8m/Kconfig
@@ -92,6 +92,8 @@ config TARGET_IMX8MM_EVK
select FSL_CAAM
select ARCH_MISC_INIT
select SPL_CRYPTO if SPL
+ imply BOOTSTD_FULL
+ imply BOOTSTD_BOOTCOMMAND
imply OF_UPSTREAM
config TARGET_IMX8MM_ICORE_MX8MM
diff --git a/arch/arm/mach-k3/am65x/Kconfig b/arch/arm/mach-k3/am65x/Kconfig
index 72a8298aebf..056ae118c9e 100644
--- a/arch/arm/mach-k3/am65x/Kconfig
+++ b/arch/arm/mach-k3/am65x/Kconfig
@@ -35,6 +35,8 @@ config TARGET_IOT2050_A53
select BOARD_LATE_INIT
select SYS_DISABLE_DCACHE_OPS
select BINMAN
+ select SYSINFO
+ select SPL_SYSINFO if SPL
help
This builds U-Boot for the IOT2050 devices.
diff --git a/arch/arm/mach-k3/j722s/j722s_init.c b/arch/arm/mach-k3/j722s/j722s_init.c
index f8c5c2a5edc..af211377e7c 100644
--- a/arch/arm/mach-k3/j722s/j722s_init.c
+++ b/arch/arm/mach-k3/j722s/j722s_init.c
@@ -27,6 +27,9 @@ struct fwl_data cbass_main_fwls[] = {
u32 bootindex __section(".data");
static struct rom_extended_boot_data bootdata __section(".data");
+#define CTRLMMR_MCU_RST_CTRL (MCU_CTRL_MMR0_BASE + 0x18170)
+#define RST_CTRL_ESM_ERROR_RST_EN_Z_MASK (~BIT(17))
+
static void store_boot_info_from_rom(void)
{
bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX);
@@ -161,11 +164,40 @@ static void k3_mem_init(void)
}
}
+static __maybe_unused void enable_mcu_esm_reset(void)
+{
+ /* Set CTRLMMR_MCU_RST_CTRL:MCU_ESM_ERROR_RST_EN_Z to '0' (low active) */
+ u32 stat = readl(CTRLMMR_MCU_RST_CTRL);
+
+ stat &= RST_CTRL_ESM_ERROR_RST_EN_Z_MASK;
+ writel(stat, CTRLMMR_MCU_RST_CTRL);
+}
+
void board_init_f(ulong dummy)
{
+ int ret;
+ struct udevice *dev;
+
k3_spl_init();
k3_mem_init();
setup_qos();
+
+ if (IS_ENABLED(CONFIG_ESM_K3)) {
+ /* Probe/configure ESM0 */
+ ret = uclass_get_device_by_name(UCLASS_MISC, "esm@420000", &dev);
+ if (ret) {
+ printf("esm main init failed: %d\n", ret);
+ return;
+ }
+
+ /* Probe/configure MCUESM */
+ ret = uclass_get_device_by_name(UCLASS_MISC, "esm@4100000", &dev);
+ if (ret) {
+ printf("esm mcu init failed: %d\n", ret);
+ return;
+ }
+ enable_mcu_esm_reset();
+ }
}
static u32 __get_backup_bootmedia(u32 devstat)
diff --git a/arch/arm/mach-rockchip/bootrom.c b/arch/arm/mach-rockchip/bootrom.c
index 82a0b3efef9..1db38546d55 100644
--- a/arch/arm/mach-rockchip/bootrom.c
+++ b/arch/arm/mach-rockchip/bootrom.c
@@ -4,11 +4,11 @@
*/
#include <hang.h>
+#include <setjmp.h>
#include <asm/arch-rockchip/bootrom.h>
#include <asm/arch-rockchip/boot_mode.h>
#include <asm/cache.h>
#include <asm/io.h>
-#include <asm/setjmp.h>
#include <asm/system.h>
/*
diff --git a/arch/arm/mach-sc5xx/soc.c b/arch/arm/mach-sc5xx/soc.c
index f3619206e91..8f13127a660 100644
--- a/arch/arm/mach-sc5xx/soc.c
+++ b/arch/arm/mach-sc5xx/soc.c
@@ -172,42 +172,6 @@ void fixup_dp83867_phy(struct phy_device *phydev)
phy_write(phydev, MDIO_DEVAD_NONE, 0, 0x3100);
}
-extern char __bss_start, __bss_end;
-extern char __rel_dyn_end;
-
-void bss_clear(void)
-{
- char *bss_start = &__bss_start;
- char *bss_end = &__bss_end;
- char *rel_dyn_end = &__rel_dyn_end;
-
- char *start;
-
- if (rel_dyn_end >= bss_start && rel_dyn_end <= bss_end)
- start = rel_dyn_end;
- else
- start = bss_start;
-
- u32 *pt;
- size_t sz = bss_end - start;
-
- for (int i = 0; i < sz; i += 4) {
- pt = (u32 *)(start + i);
- *pt = 0;
- }
-}
-
-int board_early_init_f(void)
-{
- bss_clear();
- return 0;
-}
-
-int board_init(void)
-{
- return 0;
-}
-
int dram_init(void)
{
gd->ram_size = CFG_SYS_SDRAM_SIZE;
diff --git a/arch/arm/mach-stm32mp/Kconfig b/arch/arm/mach-stm32mp/Kconfig
index 25663a99464..002da2e3d3b 100644
--- a/arch/arm/mach-stm32mp/Kconfig
+++ b/arch/arm/mach-stm32mp/Kconfig
@@ -153,6 +153,12 @@ config CMD_STM32KEY
This command is used to evaluate the secure boot on stm32mp SOC,
it is deactivated by default in real products.
+config MFD_STM32_TIMERS
+ bool "STM32 multifonction timer support"
+ help
+ Select this to enable support for the multifunction timer found on
+ STM32 devices.
+
source "arch/arm/mach-stm32mp/Kconfig.13x"
source "arch/arm/mach-stm32mp/Kconfig.15x"
source "arch/arm/mach-stm32mp/Kconfig.25x"
diff --git a/arch/arm/mach-stm32mp/Makefile b/arch/arm/mach-stm32mp/Makefile
index db7ed19bd91..103e3410ad9 100644
--- a/arch/arm/mach-stm32mp/Makefile
+++ b/arch/arm/mach-stm32mp/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_STM32MP15X) += stm32mp1/
obj-$(CONFIG_STM32MP13X) += stm32mp1/
obj-$(CONFIG_STM32MP25X) += stm32mp2/
+obj-$(CONFIG_MFD_STM32_TIMERS) += timers.o
obj-$(CONFIG_STM32_ECDSA_VERIFY) += ecdsa_romapi.o
ifndef CONFIG_XPL_BUILD
obj-y += cmd_stm32prog/
diff --git a/arch/arm/mach-stm32mp/include/mach/timers.h b/arch/arm/mach-stm32mp/include/mach/timers.h
new file mode 100644
index 00000000000..a84465bb28e
--- /dev/null
+++ b/arch/arm/mach-stm32mp/include/mach/timers.h
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C) 2025, STMicroelectronics - All Rights Reserved
+ * Author: Cheick Traore <cheick.traore@foss.st.com>
+ *
+ * Originally based on the Linux kernel v6.1 include/linux/mfd/stm32-timers.h.
+ */
+
+#ifndef __STM32_TIMERS_H
+#define __STM32_TIMERS_H
+
+#include <clk.h>
+
+#define TIM_CR1 0x00 /* Control Register 1 */
+#define TIM_CR2 0x04 /* Control Register 2 */
+#define TIM_SMCR 0x08 /* Slave mode control reg */
+#define TIM_DIER 0x0C /* DMA/interrupt register */
+#define TIM_SR 0x10 /* Status register */
+#define TIM_EGR 0x14 /* Event Generation Reg */
+#define TIM_CCMR1 0x18 /* Capt/Comp 1 Mode Reg */
+#define TIM_CCMR2 0x1C /* Capt/Comp 2 Mode Reg */
+#define TIM_CCER 0x20 /* Capt/Comp Enable Reg */
+#define TIM_CNT 0x24 /* Counter */
+#define TIM_PSC 0x28 /* Prescaler */
+#define TIM_ARR 0x2c /* Auto-Reload Register */
+#define TIM_CCRx(x) (0x34 + 4 * ((x) - 1)) /* Capt/Comp Register x (x ∈ {1, .. 4}) */
+#define TIM_BDTR 0x44 /* Break and Dead-Time Reg */
+#define TIM_DCR 0x48 /* DMA control register */
+#define TIM_DMAR 0x4C /* DMA register for transfer */
+#define TIM_TISEL 0x68 /* Input Selection */
+
+#define TIM_CR1_CEN BIT(0) /* Counter Enable */
+#define TIM_CR1_ARPE BIT(7)
+#define TIM_CCER_CCXE (BIT(0) | BIT(4) | BIT(8) | BIT(12))
+#define TIM_CCER_CC1E BIT(0)
+#define TIM_CCER_CC1P BIT(1) /* Capt/Comp 1 Polarity */
+#define TIM_CCER_CC1NE BIT(2) /* Capt/Comp 1N out Ena */
+#define TIM_CCER_CC1NP BIT(3) /* Capt/Comp 1N Polarity */
+#define TIM_CCMR_PE BIT(3) /* Channel Preload Enable */
+#define TIM_CCMR_M1 (BIT(6) | BIT(5)) /* Channel PWM Mode 1 */
+#define TIM_BDTR_MOE BIT(15) /* Main Output Enable */
+#define TIM_EGR_UG BIT(0) /* Update Generation */
+
+#define MAX_TIM_PSC 0xFFFF
+
+struct stm32_timers_plat {
+ void __iomem *base;
+};
+
+struct stm32_timers_priv {
+ u32 max_arr;
+ ulong rate;
+};
+
+#endif
diff --git a/arch/arm/mach-stm32mp/stm32mp1/cpu.c b/arch/arm/mach-stm32mp/stm32mp1/cpu.c
index cb1b84c9af9..18175fd12cc 100644
--- a/arch/arm/mach-stm32mp/stm32mp1/cpu.c
+++ b/arch/arm/mach-stm32mp/stm32mp1/cpu.c
@@ -82,7 +82,7 @@ void dram_bank_mmu_setup(int bank)
option = DCACHE_DEFAULT_OPTION;
if (use_lmb &&
(lmb_is_reserved_flags(i << MMU_SECTION_SHIFT, LMB_NOMAP) ||
- addr >= gd->ram_top)
+ (gd->ram_top && addr >= gd->ram_top))
)
option = 0; /* INVALID ENTRY in TLB */
set_section_dcache(i, option);
@@ -138,8 +138,6 @@ int mach_cpu_init(void)
if (IS_ENABLED(CONFIG_CMD_STM32PROG_SERIAL) &&
(boot_mode & TAMP_BOOT_DEVICE_MASK) == BOOT_SERIAL_UART)
gd->flags |= GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE;
- else if (IS_ENABLED(CONFIG_DEBUG_UART) && IS_ENABLED(CONFIG_XPL_BUILD))
- debug_uart_init();
return 0;
}
diff --git a/arch/arm/mach-stm32mp/timers.c b/arch/arm/mach-stm32mp/timers.c
new file mode 100644
index 00000000000..a3207895f40
--- /dev/null
+++ b/arch/arm/mach-stm32mp/timers.c
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2025, STMicroelectronics - All Rights Reserved
+ * Author: Cheick Traore <cheick.traore@foss.st.com>
+ *
+ * Originally based on the Linux kernel v6.1 drivers/mfd/stm32-timers.c.
+ */
+
+#include <dm.h>
+#include <asm/io.h>
+#include <asm/arch/timers.h>
+#include <dm/device_compat.h>
+
+static void stm32_timers_get_arr_size(struct udevice *dev)
+{
+ struct stm32_timers_plat *plat = dev_get_plat(dev);
+ struct stm32_timers_priv *priv = dev_get_priv(dev);
+ u32 arr;
+
+ /* Backup ARR to restore it after getting the maximum value */
+ arr = readl(plat->base + TIM_ARR);
+
+ /*
+ * Only the available bits will be written so when readback
+ * we get the maximum value of auto reload register
+ */
+ writel(~0L, plat->base + TIM_ARR);
+ priv->max_arr = readl(plat->base + TIM_ARR);
+ writel(arr, plat->base + TIM_ARR);
+}
+
+static int stm32_timers_of_to_plat(struct udevice *dev)
+{
+ struct stm32_timers_plat *plat = dev_get_plat(dev);
+
+ plat->base = dev_read_addr_ptr(dev);
+ if (!plat->base) {
+ dev_err(dev, "can't get address\n");
+ return -ENOENT;
+ }
+
+ return 0;
+}
+
+static int stm32_timers_probe(struct udevice *dev)
+{
+ struct stm32_timers_priv *priv = dev_get_priv(dev);
+ struct clk clk;
+ int ret = 0;
+
+ ret = clk_get_by_index(dev, 0, &clk);
+ if (ret < 0)
+ return ret;
+
+ ret = clk_enable(&clk);
+ if (ret) {
+ dev_err(dev, "failed to enable clock: ret=%d\n", ret);
+ return ret;
+ }
+
+ priv->rate = clk_get_rate(&clk);
+
+ stm32_timers_get_arr_size(dev);
+
+ return ret;
+}
+
+static const struct udevice_id stm32_timers_ids[] = {
+ { .compatible = "st,stm32-timers" },
+ {}
+};
+
+U_BOOT_DRIVER(stm32_timers) = {
+ .name = "stm32_timers",
+ .id = UCLASS_NOP,
+ .of_match = stm32_timers_ids,
+ .of_to_plat = stm32_timers_of_to_plat,
+ .plat_auto = sizeof(struct stm32_timers_plat),
+ .probe = stm32_timers_probe,
+ .priv_auto = sizeof(struct stm32_timers_priv),
+ .bind = dm_scan_fdt_dev,
+};
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 78b89729f19..4690dcb3ea6 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -247,7 +247,7 @@ config CMD_ENTERRCM
config CMD_EBTUPDATE
bool "Enable 'ebtupdate' command"
- depends on TEGRA20 || TEGRA30
+ depends on TEGRA20 || TEGRA30 || TEGRA124
select TEGRA_CRYPTO
help
Updating u-boot from within u-boot in rather complex or even
diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index 157e6c4911a..a375693481e 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -358,6 +358,13 @@ unsigned long clock_get_periph_rate(enum periph_id periph_id,
break;
}
+ /*
+ * PLLD/PLLD2 raw clock rate is never used, instead plld_out0 is used
+ * that is PLLD/PLLD2 halved.
+ */
+ if (parent == CLOCK_ID_DISPLAY || parent == CLOCK_ID_DISPLAY2)
+ parent_rate /= 2;
+
return get_rate_from_divider(parent_rate, div);
}
@@ -449,6 +456,7 @@ unsigned clock_adjust_periph_pll_div(enum periph_id periph_id,
enum clock_id parent, unsigned rate, int *extra_div)
{
unsigned effective_rate;
+ unsigned int parent_rate;
int mux_bits, divider_bits, source;
int divider;
int xdiv = 0;
@@ -457,7 +465,17 @@ unsigned clock_adjust_periph_pll_div(enum periph_id periph_id,
source = get_periph_clock_source(periph_id, parent, &mux_bits,
&divider_bits);
- divider = find_best_divider(divider_bits, pll_rate[parent],
+ /*
+ * Clocks derived from PLLD/D2 are actually sourced from its halved
+ * output, plld_out0/plld2_out0. No peripheral clocks use the raw
+ * PLLD/D2 frequency. This halving must be accounted for in derived
+ * clock calculations.
+ */
+ parent_rate = pll_rate[parent];
+ if (parent == CLOCK_ID_DISPLAY || parent == CLOCK_ID_DISPLAY2)
+ parent_rate /= 2;
+
+ divider = find_best_divider(divider_bits, parent_rate,
rate, &xdiv);
if (extra_div)
*extra_div = xdiv;
@@ -685,6 +703,16 @@ int clock_set_rate(enum clock_id clkid, u32 n, u32 m, u32 p, u32 cpcon)
else
writel(base_reg, &simple_pll->pll_base);
+ /*
+ * Changing clocks was never intended in the U-Boot for Tegra.
+ * If a clock is changed after clock_init() the parent rate is wrong.
+ * Usually there is no reason to change peripheral clocks, but Display
+ * PLLs which needs to generate a precise pixelclock might be adjusted.
+ * Especially in the case of HDMI display with changing and prior
+ * unknown resolution.
+ */
+ pll_rate[clkid] = clock_get_rate(clkid);
+
return 0;
}
diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig
index 84c8f86bad0..a62b055f7e6 100644
--- a/arch/arm/mach-tegra/tegra124/Kconfig
+++ b/arch/arm/mach-tegra/tegra124/Kconfig
@@ -30,6 +30,10 @@ config TARGET_CEI_TK1_SOM
the SoC are assigned to which functions, and the PCIEe
configuration.
+config TARGET_MOCHA
+ bool "Xiaomi Tegra124 Mi Pad board"
+ select BOARD_LATE_INIT
+
config TARGET_NYAN_BIG
bool "Google/NVIDIA Nyan-big Chromebook"
select BOARD_LATE_INIT
@@ -54,5 +58,6 @@ source "board/nvidia/jetson-tk1/Kconfig"
source "board/nvidia/nyan-big/Kconfig"
source "board/nvidia/venice2/Kconfig"
source "board/toradex/apalis-tk1/Kconfig"
+source "board/xiaomi/mocha/Kconfig"
endif
diff --git a/arch/arm/mach-tegra/tegra124/Makefile b/arch/arm/mach-tegra/tegra124/Makefile
index dee790015a3..7b93db89c0f 100644
--- a/arch/arm/mach-tegra/tegra124/Makefile
+++ b/arch/arm/mach-tegra/tegra124/Makefile
@@ -6,6 +6,7 @@
#
obj-$(CONFIG_XPL_BUILD) += cpu.o
+obj-$(CONFIG_$(XPL_)CMD_EBTUPDATE) += bct.o
obj-y += clock.o
obj-y += pmc.o
diff --git a/arch/arm/mach-tegra/tegra124/bct.c b/arch/arm/mach-tegra/tegra124/bct.c
new file mode 100644
index 00000000000..a71aa87fce1
--- /dev/null
+++ b/arch/arm/mach-tegra/tegra124/bct.c
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2022, Ramin <raminterex@yahoo.com>
+ * Copyright (c) 2022, Svyatoslav Ryhel <clamor95@gmail.com>
+ */
+
+#include <command.h>
+#include <log.h>
+#include <vsprintf.h>
+#include <asm/arch-tegra/crypto.h>
+#include "bct.h"
+#include "uboot_aes.h"
+
+/* Device with "sbk burned: false" will expose zero key */
+const u8 nosbk[AES128_KEY_LENGTH] = { 0 };
+
+/*
+ * @param bct boot config table start in RAM
+ * @param ect bootloader start in RAM
+ * @param ebt_size bootloader file size in bytes
+ * Return: 0, or 1 if failed
+ */
+static int bct_patch(u8 *bct, u8 *ebt, u32 ebt_size)
+{
+ struct nvboot_config_table *bct_tbl = NULL;
+ u8 ebt_hash[AES128_KEY_LENGTH] = { 0 };
+ u8 bct_hash[AES128_KEY_LENGTH] = { 0 };
+ u8 sbk[AES128_KEY_LENGTH] = { 0 };
+ u8 *sbct = bct + UBCT_LENGTH;
+ bool encrypted;
+ int ret;
+
+ ebt_size = roundup(ebt_size, EBT_ALIGNMENT);
+
+ memcpy(sbk, (u8 *)(bct + UBCT_LENGTH + SBCT_LENGTH),
+ NVBOOT_CMAC_AES_HASH_LENGTH * 4);
+
+ encrypted = memcmp(&sbk, &nosbk, AES128_KEY_LENGTH);
+
+ if (encrypted) {
+ ret = decrypt_data_block(sbct, SBCT_LENGTH, sbk);
+ if (ret)
+ return 1;
+
+ ret = encrypt_data_block(ebt, ebt_size, sbk);
+ if (ret)
+ return 1;
+ }
+
+ ret = sign_enc_data_block(ebt, ebt_size, ebt_hash, sbk);
+ if (ret)
+ return 1;
+
+ bct_tbl = (struct nvboot_config_table *)bct;
+
+ memcpy((u8 *)&bct_tbl->bootloader[0].crypto_hash,
+ ebt_hash, NVBOOT_CMAC_AES_HASH_LENGTH * 4);
+ bct_tbl->bootloader[0].entry_point = CONFIG_SPL_TEXT_BASE;
+ bct_tbl->bootloader[0].load_addr = CONFIG_SPL_TEXT_BASE;
+ bct_tbl->bootloader[0].length = ebt_size;
+
+ if (encrypted) {
+ ret = encrypt_data_block(sbct, SBCT_LENGTH, sbk);
+ if (ret)
+ return 1;
+ }
+
+ ret = sign_enc_data_block(sbct, SBCT_LENGTH, bct_hash, sbk);
+ if (ret)
+ return 1;
+
+ memcpy((u8 *)&bct_tbl->crypto_hash, bct_hash,
+ NVBOOT_CMAC_AES_HASH_LENGTH * 4);
+
+ return 0;
+}
+
+static int do_ebtupdate(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
+{
+ u32 bct_addr = hextoul(argv[1], NULL);
+ u32 ebt_addr = hextoul(argv[2], NULL);
+ u32 ebt_size = hextoul(argv[3], NULL);
+
+ return bct_patch((u8 *)bct_addr, (u8 *)ebt_addr, ebt_size);
+}
+
+U_BOOT_CMD(ebtupdate, 4, 0, do_ebtupdate,
+ "update bootloader on re-crypted Tegra124 devices",
+ ""
+);
diff --git a/arch/arm/mach-tegra/tegra124/bct.h b/arch/arm/mach-tegra/tegra124/bct.h
new file mode 100644
index 00000000000..eb0f712d595
--- /dev/null
+++ b/arch/arm/mach-tegra/tegra124/bct.h
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef _BCT_H_
+#define _BCT_H_
+
+/*
+ * Defines the BCT parametres for T124
+ */
+#define UBCT_LENGTH 0x6b0 /* bytes */
+#define SBCT_LENGTH 0x1950 /* bytes */
+
+#define BCT_HASH 0x10
+#define EBT_ALIGNMENT 0x10
+
+/*
+ * Defines the CMAC-AES-128 hash length in 32 bit words. (128 bits = 4 words)
+ */
+#define NVBOOT_CMAC_AES_HASH_LENGTH 4
+
+/*
+ * Defines the RSA modulus length in 32 bit words used for PKC secure boot.
+ */
+#define NVBOOT_SE_RSA_MODULUS_LENGTH 64
+
+/*
+ * Defines the maximum number of bootloader descriptions in the BCT.
+ */
+#define NVBOOT_MAX_BOOTLOADERS 4
+
+struct nv_bootloader_info {
+ u32 version;
+ u32 start_blk;
+ u32 start_page;
+ u32 length;
+ u32 load_addr;
+ u32 entry_point;
+ u32 attribute;
+
+ /* Specifies the AES-CMAC MAC or RSASSA-PSS signature of the BL. */
+ u32 crypto_hash[NVBOOT_CMAC_AES_HASH_LENGTH];
+ u32 bl_rsa_sig[NVBOOT_SE_RSA_MODULUS_LENGTH];
+};
+
+struct nvboot_config_table {
+ u32 ubct_unused1[196];
+ u32 crypto_hash[NVBOOT_CMAC_AES_HASH_LENGTH];
+ u32 ubct_unused2[228];
+
+ u32 sbct_unused1[1318];
+ u32 bootloader_used;
+ struct nv_bootloader_info bootloader[NVBOOT_MAX_BOOTLOADERS];
+ u32 sbct_unused2;
+};
+
+#endif /* _BCT_H_ */
diff --git a/arch/arm/mach-versal2/include/mach/hardware.h b/arch/arm/mach-versal2/include/mach/hardware.h
index 42e3061a0ae..15085f941e0 100644
--- a/arch/arm/mach-versal2/include/mach/hardware.h
+++ b/arch/arm/mach-versal2/include/mach/hardware.h
@@ -51,7 +51,8 @@ struct crp_regs {
#define PMC_TAP_VERSION (PMC_TAP + 0x4)
# define PMC_VERSION_MASK GENMASK(7, 0)
# define PS_VERSION_MASK GENMASK(15, 8)
-# define PS_VERSION_PRODUCTION 0x20
+# define PS_VERSION_MAJOR GENMASK(7, 4)
+# define PS_VERSION_MINOR GENMASK(3, 0)
# define RTL_VERSION_MASK GENMASK(23, 16)
# define PLATFORM_MASK GENMASK(27, 24)
# define PLATFORM_VERSION_MASK GENMASK(31, 28)
diff --git a/arch/riscv/include/asm/setjmp.h b/arch/riscv/include/asm/setjmp.h
index 72383d43303..08687e0f92b 100644
--- a/arch/riscv/include/asm/setjmp.h
+++ b/arch/riscv/include/asm/setjmp.h
@@ -3,13 +3,9 @@
* (C) Copyright 2018 Alexander Graf <agraf@suse.de>
*/
-#ifndef _SETJMP_H_
-#define _SETJMP_H_ 1
+#ifndef _ASM_SETJMP_H_
+#define _ASM_SETJMP_H_ 1
-/*
- * This really should be opaque, but the EFI implementation wrongly
- * assumes that a 'struct jmp_buf_data' is defined.
- */
struct jmp_buf_data {
/* x2, x8, x9, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, sp */
unsigned long s_regs[12]; /* s0 - s11 */
@@ -17,9 +13,4 @@ struct jmp_buf_data {
unsigned long sp;
};
-typedef struct jmp_buf_data jmp_buf[1];
-
-int setjmp(jmp_buf jmp);
-void longjmp(jmp_buf jmp, int ret);
-
-#endif /* _SETJMP_H_ */
+#endif /* _ASM_SETJMP_H_ */
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c
index 76c610bcee0..9544907ab1e 100644
--- a/arch/riscv/lib/bootm.c
+++ b/arch/riscv/lib/bootm.c
@@ -46,10 +46,6 @@ static void announce_and_cleanup(int fake)
bootstage_report();
#endif
-#ifdef CONFIG_USB_DEVICE
- udc_disconnect();
-#endif
-
board_quiesce_devices();
/*
diff --git a/arch/sandbox/Kconfig b/arch/sandbox/Kconfig
index 4c169034d9a..d61a327f151 100644
--- a/arch/sandbox/Kconfig
+++ b/arch/sandbox/Kconfig
@@ -77,7 +77,7 @@ config SANDBOX_BITS_PER_LONG
config SYS_FDT_LOAD_ADDR
hex "Address at which to load devicetree"
- default 0x100
+ default 0x1000
help
With sandbox the devicetree is loaded into the emulated RAM. This sets
the address that is used. There must be enough space at this address
diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 6407193c5f1..6db8739e66b 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -10,10 +10,10 @@
#include <errno.h>
#include <log.h>
#include <os.h>
+#include <setjmp.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/malloc.h>
-#include <asm/setjmp.h>
#include <asm/state.h>
#include <dm/ofnode.h>
#include <linux/delay.h>
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index b8f3012873e..52e9ddbf50f 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -1047,6 +1047,31 @@
};
};
+ lvds-encoder {
+ compatible = "lvds-encoder";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ bridge_input: endpoint {
+ /* link to output */
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ bridge_output: endpoint {
+ remote-endpoint = <&panel_input>;
+ };
+ };
+ };
+ };
+
wdt-gpio-toggle {
gpios = <&gpio_a 8 0>;
compatible = "linux,wdt-gpio";
@@ -1402,6 +1427,27 @@
panel {
compatible = "simple-panel";
backlight = <&backlight 0 100>;
+
+ display-timings {
+ timing@0 {
+ /* 1280x800@60Hz */
+ clock-frequency = <68000000>;
+ hactive = <1280>;
+ hfront-porch = <48>;
+ hback-porch = <18>;
+ hsync-len = <30>;
+ vactive = <800>;
+ vfront-porch = <3>;
+ vback-porch = <12>;
+ vsync-len = <5>;
+ };
+ };
+
+ port {
+ panel_input: endpoint {
+ remote-endpoint = <&bridge_output>;
+ };
+ };
};
scsi {
@@ -2048,6 +2094,61 @@
sandbox,err-step-size = <512>;
};
};
+
+ graph1 {
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ reg = <0>;
+
+ endpoint@0 {
+ reg = <0>;
+ };
+
+ endpoint@1 {
+ reg = <1>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ endpoint {
+ test-property-0;
+ };
+ };
+
+ port@2 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ reg = <2>;
+
+ graph2_link: endpoint@0 {
+ reg = <0>;
+ test-property-1;
+ remote-endpoint = <&graph1_link>;
+ };
+
+ endpoint@1 {
+ reg = <1>;
+ };
+ };
+ };
+ };
+
+ graph2 {
+ port {
+ graph1_link: endpoint {
+ remote-endpoint = <&graph2_link>;
+ };
+ };
+ };
};
#include "sandbox_pmic.dtsi"
diff --git a/arch/sandbox/include/asm/setjmp.h b/arch/sandbox/include/asm/setjmp.h
index 001c7ea322d..3413c747783 100644
--- a/arch/sandbox/include/asm/setjmp.h
+++ b/arch/sandbox/include/asm/setjmp.h
@@ -4,8 +4,8 @@
* Written by Simon Glass <sjg@chromium.org>
*/
-#ifndef _SETJMP_H_
-#define _SETJMP_H_
+#ifndef _ASM_SETJMP_H_
+#define _ASM_SETJMP_H_
struct jmp_buf_data {
/*
@@ -19,17 +19,7 @@ struct jmp_buf_data {
* We don't need to worry about 16-byte alignment, since this does not
* run on Windows.
*/
- ulong data[128];
+ unsigned long data[128];
};
-typedef struct jmp_buf_data jmp_buf[1];
-
-/*
- * We have to directly link with the system versions of
- * setjmp/longjmp, because setjmp must not return as otherwise
- * the stack may become invalid.
- */
-int setjmp(jmp_buf jmp);
-__noreturn void longjmp(jmp_buf jmp, int ret);
-
-#endif /* _SETJMP_H_ */
+#endif /* _ASM_SETJMP_H_ */
diff --git a/arch/x86/cpu/intel_common/intel_opregion.c b/arch/x86/cpu/intel_common/intel_opregion.c
index 78caff0dc12..4a2717b3584 100644
--- a/arch/x86/cpu/intel_common/intel_opregion.c
+++ b/arch/x86/cpu/intel_common/intel_opregion.c
@@ -31,6 +31,7 @@ static int locate_vbt(char **vbtp, int *sizep)
size = vbt.size;
if (size > sizeof(vbt_data))
return log_msg_ret("vbt", -E2BIG);
+ vbt.image_pos += CONFIG_ROM_SIZE;
ret = spi_flash_read_dm(dev, vbt.image_pos, size, vbt_data);
if (ret)
return log_msg_ret("read", ret);
diff --git a/arch/x86/include/asm/setjmp.h b/arch/x86/include/asm/setjmp.h
index 15915d0dc6b..13772574e15 100644
--- a/arch/x86/include/asm/setjmp.h
+++ b/arch/x86/include/asm/setjmp.h
@@ -5,8 +5,8 @@
* From Linux arch/um/sys-i386/setjmp.S
*/
-#ifndef __setjmp_h
-#define __setjmp_h
+#ifndef _ASM_SETJMP_H_
+#define _ASM_SETJMP_H_ 1
#ifdef CONFIG_X86_64
@@ -34,9 +34,4 @@ struct jmp_buf_data {
#endif
-typedef struct jmp_buf_data jmp_buf[1];
-
-int setjmp(jmp_buf env);
-void longjmp(jmp_buf env, int val);
-
-#endif
+#endif /* _ASM_SETJMP_H_ */
diff --git a/arch/x86/lib/fsp2/fsp_init.c b/arch/x86/lib/fsp2/fsp_init.c
index 1a2bf46c5c5..0be892b14dc 100644
--- a/arch/x86/lib/fsp2/fsp_init.c
+++ b/arch/x86/lib/fsp2/fsp_init.c
@@ -107,7 +107,6 @@ int fsp_locate_fsp(enum fsp_type_t type, struct binman_entry *entry,
bool use_spi_flash, struct udevice **devp,
struct fsp_header **hdrp, ulong *rom_offsetp)
{
- ulong mask = CONFIG_ROM_SIZE - 1;
struct udevice *dev;
ulong rom_offset = 0;
uint map_size;
@@ -141,7 +140,7 @@ int fsp_locate_fsp(enum fsp_type_t type, struct binman_entry *entry,
if (ret)
return log_msg_ret("binman entry", ret);
if (!use_spi_flash)
- rom_offset = (map_base & mask) - CONFIG_ROM_SIZE;
+ rom_offset = map_base + CONFIG_ROM_SIZE;
} else {
ret = -ENOENT;
if (false)