CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/30394

- Define memory map for lemans-evk (pending SMEM)
- Fix CONFIG_SYS_INIT_SP_BSS_OFFSET in db410c chainloaded fragment
- Fix the "dump bootargs" command in the qcom-phone boot menu
- Fix a bug in the rpmh-regulator driver where the regulator mode may
  not be set during enable.
- Enable watchdog autostart for Dragonwing boards
- Fix serial console init on ipq5424-rdp466
This commit is contained in:
Tom Rini
2026-06-10 13:11:35 -06:00
9 changed files with 86 additions and 54 deletions

View File

@@ -12,6 +12,9 @@
reg = <0x0 0x80000000 0x0 0x20000000>;
};
chosen {
stdout-path = "serial0:115200n8";
};
};
&sdhc {

View File

@@ -0,0 +1,19 @@
// SPDX-License-Identifier: BSD-3-Clause
/*
* Copyright (c) 2026, Qualcomm Innovation Center, Inc. All rights reserved.
*/
/ {
/* Will be removed when bootloader updates later */
memory@80000000 {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x3ee00000>,
<0x0 0xc0000000 0x0 0x0fd00000>,
<0xD 0x00000000 0x2 0x54100000>,
<0xA 0x80000000 0x1 0x80000000>,
<0x9 0x00000000 0x1 0x80000000>,
<0x1 0x00000000 0x3 0x00000000>,
<0x0 0xd0000000 0x0 0x01900000>,
<0x0 0xd3500000 0x0 0x2cb00000>;
};
};

View File

@@ -4,4 +4,4 @@ CONFIG_TEXT_BASE=0x0
# CONFIG_REMAKE_ELF is not set
CONFIG_POSITION_INDEPENDENT=y
CONFIG_INIT_SP_RELATIVE=y
CONFIG_SYS_INIT_SP_BSS_OFFSET=524288
CONFIG_SYS_INIT_SP_BSS_OFFSET=0x80000

View File

@@ -39,7 +39,7 @@ bootmenu_5=Reset device=reset
bootmenu_6=Dump clocks=clk dump; pause
bootmenu_7=Dump environment=printenv; pause
bootmenu_8=Board info=bdinfo; pause
bootmenu_9=Dump bootargs=fdt print /chosen bootargs; pause
bootmenu_9=Dump bootargs=fdt addr $fdt_addr_r; fdt print /chosen bootargs; pause
# Allow holding the volume down button while U-Boot loads to enter
# the boot menu

View File

@@ -22,3 +22,5 @@ CONFIG_REMAKE_ELF=y
CONFIG_TEXT_BASE=0x9fc00000
CONFIG_FASTBOOT_BUF_ADDR=0xa1600000
CONFIG_WATCHDOG_AUTOSTART=y

View File

@@ -14,3 +14,5 @@ CONFIG_ENV_IS_IN_SCSI=y
CONFIG_ENV_SCSI_PART_UUID="71cb9cd0-acf1-b6cb-ad91-be9572fe11a9"
# CONFIG_ENV_IS_DEFAULT is not set
# CONFIG_ENV_IS_NOWHERE is not set
CONFIG_WATCHDOG_AUTOSTART=y

View File

@@ -344,7 +344,6 @@ static int qcom_gpio_probe(struct udevice *dev)
static const struct udevice_id qcom_gpio_ids[] = {
{ .compatible = "qcom,pm8916-gpio" },
{ .compatible = "qcom,pm8994-gpio" }, /* 22 GPIO's */
{ .compatible = "qcom,pm8998-gpio" },
{ .compatible = "qcom,pms405-gpio" },
{ .compatible = "qcom,pm6125-gpio" },
{ .compatible = "qcom,pm8150-gpio" },

View File

@@ -752,6 +752,7 @@ static const struct udevice_id qcom_spmi_pmic_gpio_ids[] = {
{ .compatible = "qcom,pm8550b-gpio" },
{ .compatible = "qcom,pm8550ve-gpio" },
{ .compatible = "qcom,pm8550vs-gpio" },
{ .compatible = "qcom,pm8998-gpio" },
{ .compatible = "qcom,pmk8550-gpio" },
{ .compatible = "qcom,pmr735d-gpio" },
{ }

View File

@@ -295,57 +295,6 @@ static int rpmh_regulator_vrm_get_value(struct udevice *rdev)
return vreg->uv;
}
static int rpmh_regulator_is_enabled(struct udevice *rdev)
{
struct rpmh_vreg *vreg = dev_get_priv(rdev);
int ret;
debug("%s: is_enabled %d\n", rdev->name, vreg->enabled);
if (vreg->enabled < 0) {
struct tcs_cmd cmd = {
.addr = vreg->addr + RPMH_REGULATOR_REG_ENABLE,
};
ret = rpmh_regulator_read_data(vreg, &cmd);
/*
* Don't override if disabled since we will also vote the right voltage
* while enabling
*/
if (!ret && cmd.data)
vreg->enabled = cmd.data & RPMH_REGULATOR_ENABLE_MASK;
}
return vreg->enabled > 0;
}
static int rpmh_regulator_set_enable_state(struct udevice *rdev,
bool enable)
{
struct rpmh_vreg *vreg = dev_get_priv(rdev);
struct tcs_cmd cmd = {
.addr = vreg->addr + RPMH_REGULATOR_REG_ENABLE,
.data = enable,
};
int ret;
debug("%s: set_enable %d (current %d)\n", rdev->name, enable,
vreg->enabled);
if (vreg->enabled == -EINVAL &&
vreg->uv != -ENOTRECOVERABLE) {
ret = _rpmh_regulator_vrm_set_value(rdev,
vreg->uv, true);
if (ret < 0)
return ret;
}
ret = rpmh_regulator_send_request(vreg, &cmd, enable);
if (!ret)
vreg->enabled = enable;
return ret;
}
static int rpmh_regulator_vrm_set_mode_bypass(struct rpmh_vreg *vreg,
unsigned int mode, bool bypassed)
{
@@ -396,6 +345,63 @@ static int rpmh_regulator_vrm_set_mode(struct udevice *rdev,
return ret;
}
static int rpmh_regulator_is_enabled(struct udevice *rdev)
{
struct rpmh_vreg *vreg = dev_get_priv(rdev);
int ret;
debug("%s: is_enabled %d\n", rdev->name, vreg->enabled);
if (vreg->enabled < 0) {
struct tcs_cmd cmd = {
.addr = vreg->addr + RPMH_REGULATOR_REG_ENABLE,
};
ret = rpmh_regulator_read_data(vreg, &cmd);
/*
* Don't override if disabled since we will also vote the right voltage
* while enabling
*/
if (!ret && cmd.data)
vreg->enabled = cmd.data & RPMH_REGULATOR_ENABLE_MASK;
}
return vreg->enabled > 0;
}
static int rpmh_regulator_set_enable_state(struct udevice *rdev,
bool enable)
{
struct rpmh_vreg *vreg = dev_get_priv(rdev);
struct tcs_cmd cmd = {
.addr = vreg->addr + RPMH_REGULATOR_REG_ENABLE,
.data = enable,
};
int ret;
debug("%s: set_enable %d (current %d)\n", rdev->name, enable,
vreg->enabled);
if (vreg->mode != -EINVAL) {
ret = rpmh_regulator_vrm_set_mode_bypass(vreg, vreg->mode, vreg->bypassed);
if (ret < 0)
return ret;
}
if (vreg->enabled == -EINVAL &&
vreg->uv != -ENOTRECOVERABLE) {
ret = _rpmh_regulator_vrm_set_value(rdev,
vreg->uv, true);
if (ret < 0)
return ret;
}
ret = rpmh_regulator_send_request(vreg, &cmd, enable);
if (!ret)
vreg->enabled = enable;
return ret;
}
static int rpmh_regulator_vrm_get_pmic_mode(struct rpmh_vreg *vreg, int *pmic_mode)
{
struct tcs_cmd cmd = {