mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-17 10:18:38 +00:00
c74f6e748b
The GPT table is taking the first 34 sectors, which amounts to 0x4400
bytes. Saving the environment below this address in storage will corrupt
the GPT table.
While technically the table ends at 0x4400, some tools (e.g. bmaptool)
are rounding everything to the logical block size (0x1000), so it is
safer to make it point to 0x5000 so that the environment could still
persist when flashing a sparse image with bmaptool or similar tools.
Obviously, the default 0x4000 environment size does not work anymore, so
let's set it to 0x3000 so it does fill the gap between the GPT table
(rounded to 0x1000) and the start of the idbloader.img.
Fixes: 56f580d3eb
("rockchip: dts: rk3399-puma: put environment (in MMC/SD configurations) before SPL")
Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
112 lines
2.1 KiB
Text
112 lines
2.1 KiB
Text
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
#include "rk3399-u-boot.dtsi"
|
|
|
|
#ifdef CONFIG_TARGET_PUMA_RK3399_RAM_DDR3_1333
|
|
#include "rk3399-sdram-ddr3-1333.dtsi"
|
|
#endif
|
|
#ifdef CONFIG_TARGET_PUMA_RK3399_RAM_DDR3_1600
|
|
#include "rk3399-sdram-ddr3-1600.dtsi"
|
|
#endif
|
|
#ifdef CONFIG_TARGET_PUMA_RK3399_RAM_DDR3_1866
|
|
#include "rk3399-sdram-ddr3-1866.dtsi"
|
|
#endif
|
|
|
|
/ {
|
|
config {
|
|
u-boot,spl-payload-offset = <0x80000>; /* @ 512KB */
|
|
u-boot,mmc-env-offset = <0x5000>; /* @ 20KB */
|
|
u-boot,efi-partition-entries-offset = <0x200000>; /* 2MB */
|
|
u-boot,boot-led = "module_led";
|
|
sysreset-gpio = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
|
|
};
|
|
|
|
chosen {
|
|
stdout-path = "serial0:115200n8";
|
|
u-boot,spl-boot-order = \
|
|
"same-as-spl", &norflash, &sdhci, &sdmmc;
|
|
};
|
|
|
|
aliases {
|
|
spi5 = &spi5;
|
|
};
|
|
|
|
vdd_log: vdd-log {
|
|
compatible = "pwm-regulator";
|
|
pwms = <&pwm2 0 25000 1>;
|
|
regulator-name = "vdd_log";
|
|
regulator-always-on;
|
|
regulator-boot-on;
|
|
regulator-min-microvolt = <800000>;
|
|
regulator-max-microvolt = <1400000>;
|
|
regulator-init-microvolt = <950000>;
|
|
vin-supply = <&vcc5v0_sys>;
|
|
};
|
|
};
|
|
|
|
&binman {
|
|
simple-bin {
|
|
blob {
|
|
offset = <((CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR - 64) * 512)>;
|
|
};
|
|
};
|
|
|
|
#ifdef CONFIG_ROCKCHIP_SPI_IMAGE
|
|
simple-bin-spi {
|
|
blob {
|
|
/* same as u-boot,spl-payload-offset */
|
|
offset = <0x80000>;
|
|
};
|
|
};
|
|
#endif
|
|
};
|
|
|
|
&gpio1 {
|
|
u-boot,dm-pre-reloc;
|
|
};
|
|
|
|
&gpio3 {
|
|
u-boot,dm-pre-reloc;
|
|
|
|
/*
|
|
* The Qseven BIOS_DISABLE signal on the RK3399-Q7 keeps the on-module
|
|
* eMMC and SPI flash powered-down initially (in fact it keeps the
|
|
* reset signal asserted). BIOS_DISABLE_OVERRIDE pin allows to re-enable
|
|
* eMMC and SPI after the SPL has been booted from SD Card.
|
|
*/
|
|
bios_disable_override {
|
|
u-boot,dm-pre-reloc;
|
|
gpios = <RK_PD5 GPIO_ACTIVE_LOW>;
|
|
output-high;
|
|
line-name = "bios_disable_override";
|
|
gpio-hog;
|
|
};
|
|
};
|
|
|
|
&gpio4 {
|
|
u-boot,dm-pre-reloc;
|
|
};
|
|
|
|
&norflash {
|
|
u-boot,dm-pre-reloc;
|
|
};
|
|
|
|
&pcfg_pull_none {
|
|
u-boot,dm-pre-reloc;
|
|
};
|
|
|
|
&pcfg_pull_up {
|
|
u-boot,dm-pre-reloc;
|
|
};
|
|
|
|
&sdmmc_bus4 {
|
|
u-boot,dm-pre-reloc;
|
|
};
|
|
|
|
&sdmmc_clk {
|
|
u-boot,dm-pre-reloc;
|
|
};
|
|
|
|
&sdmmc_cmd {
|
|
u-boot,dm-pre-reloc;
|
|
};
|