* [PATCH v5 01/13] pinctrl: Add compact Nomadik pin controller
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-24 13:17 ` Stephan Gerhold
2026-08-23 20:39 ` [PATCH v5 02/13] mmc: arm_pl180: Configure Ux500 signal direction Linus Walleij
` (11 subsequent siblings)
12 siblings, 1 reply; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
Add the minimal pin control support needed to consume default states from
the upstream DB8500 device trees. Resolve the nine Nomadik GPIO banks
through nomadik-gpio-chips and apply the mux, direction, value, pull and
low-EMI settings directly to their registers.
Only the DB8500 binding and default-state configuration needed by
U-Boot are supported. There is no GPIO ownership or sleep-state
handling.
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
MAINTAINERS | 1 +
arch/arm/Kconfig | 2 +
drivers/pinctrl/Kconfig | 7 ++
drivers/pinctrl/Makefile | 1 +
drivers/pinctrl/pinctrl-nomadik.c | 230 ++++++++++++++++++++++++++++++++++++++
5 files changed, 241 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index eb48eea55c5a..a5d6b5be29dc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -787,6 +787,7 @@ S: Maintained
F: arch/arm/dts/ste-*
F: arch/arm/mach-u8500/
F: drivers/gpio/nmk_gpio.c
+F: drivers/pinctrl/pinctrl-nomadik.c
F: drivers/phy/phy-ab8500-usb.c
F: drivers/power/pmic/ab8500.c
F: drivers/timer/nomadik-mtu-timer.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 1b474a346bf2..5b02ff18bd0e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1278,6 +1278,8 @@ config ARCH_U8500
imply DM_RTC
imply NOMADIK_GPIO
imply NOMADIK_MTU_TIMER
+ imply PINCTRL
+ imply PINCTRL_NOMADIK
imply PHY
imply PL01X_SERIAL
imply PMIC_AB8500
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index fd30aaeeaa89..04785a927fec 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -75,6 +75,13 @@ config PINCONF_RECURSIVE
configuration; you can save memory footprint when this feature is
no needed.
+config PINCTRL_NOMADIK
+ bool "Nomadik pin control driver"
+ depends on PINCTRL_FULL
+ help
+ Enable pin multiplexing and configuration support for the Nomadik
+ GPIO blocks in the ST-Ericsson DB8500.
+
config SPL_PINCTRL
bool "Support pin controllers in SPL"
depends on SPL && SPL_DM
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index 91149796bb5f..23219626e392 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_PINCTRL_K210) += pinctrl-k210.o
obj-$(CONFIG_PINCTRL_MESON) += meson/
obj-$(CONFIG_PINCTRL_MSCC) += mscc/
obj-$(CONFIG_PINCTRL_MTK) += mediatek/
+obj-$(CONFIG_PINCTRL_NOMADIK) += pinctrl-nomadik.o
obj-$(CONFIG_PINCTRL_PIC32) += pinctrl_pic32.o
obj-$(CONFIG_PINCTRL_QCOM) += qcom/
obj-$(CONFIG_PINCTRL_QE) += pinctrl-qe-io.o
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
new file mode 100644
index 000000000000..12d032226608
--- /dev/null
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -0,0 +1,230 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* Copyright (C) 2026 Linus Walleij <linusw@kernel.org> */
+
+#include <dm.h>
+#include <dm/pinctrl.h>
+#include <dt-bindings/pinctrl/nomadik.h>
+#include <vsprintf.h>
+#include <asm/io.h>
+
+#define NMK_GPIO_BANKS 9
+#define NMK_GPIO_PER_BANK 32
+
+struct nmk_gpio_regs {
+ u32 dat;
+ u32 dats;
+ u32 datc;
+ u32 pdis;
+ u32 dir;
+ u32 dirs;
+ u32 dirc;
+ u32 slpm;
+ u32 afsla;
+ u32 afslb;
+ u32 lowemi;
+};
+
+struct nmk_pinctrl_priv {
+ struct nmk_gpio_regs *bank[NMK_GPIO_BANKS];
+};
+
+enum nmk_alt {
+ NMK_ALT_GPIO,
+ NMK_ALT_A,
+ NMK_ALT_B,
+ NMK_ALT_C,
+};
+
+static int nmk_pinctrl_parse_pin(const char *name, unsigned int *pin)
+{
+ char *end;
+
+ if (strncmp(name, "GPIO", 4))
+ return -EINVAL;
+
+ *pin = dectoul(name + 4, &end);
+ if (end == name + 4 || *end != '_' ||
+ *pin >= NMK_GPIO_BANKS * NMK_GPIO_PER_BANK)
+ return -EINVAL;
+
+ return 0;
+}
+
+static struct nmk_gpio_regs *
+nmk_pinctrl_bank(struct udevice *dev, unsigned int pin)
+{
+ struct nmk_pinctrl_priv *priv = dev_get_priv(dev);
+
+ return priv->bank[pin / NMK_GPIO_PER_BANK];
+}
+
+static void nmk_pinctrl_set_mux(struct udevice *dev, unsigned int pin,
+ unsigned int alt)
+{
+ struct nmk_gpio_regs *regs = nmk_pinctrl_bank(dev, pin);
+ u32 mask = BIT(pin % NMK_GPIO_PER_BANK);
+ u32 val;
+
+ val = readl(®s->afsla);
+ if (alt & NMK_ALT_A)
+ val |= mask;
+ else
+ val &= ~mask;
+ writel(val, ®s->afsla);
+
+ val = readl(®s->afslb);
+ if (alt & NMK_ALT_B)
+ val |= mask;
+ else
+ val &= ~mask;
+ writel(val, ®s->afslb);
+}
+
+static int nmk_pinctrl_set_config(struct udevice *dev, ofnode node,
+ unsigned int pin)
+{
+ struct nmk_gpio_regs *regs = nmk_pinctrl_bank(dev, pin);
+ u32 mask = BIT(pin % NMK_GPIO_PER_BANK);
+ u32 val;
+
+ if (!ofnode_read_u32(node, "ste,input", &val)) {
+ writel(mask, ®s->dirc);
+ if (val == INPUT_NOPULL) {
+ setbits_le32(®s->pdis, mask);
+ } else {
+ clrbits_le32(®s->pdis, mask);
+ if (val == INPUT_PULLUP)
+ writel(mask, ®s->dats);
+ else if (val == INPUT_PULLDOWN)
+ writel(mask, ®s->datc);
+ else
+ return -EINVAL;
+ }
+ }
+
+ if (!ofnode_read_u32(node, "ste,output", &val)) {
+ if (val == OUTPUT_HIGH)
+ writel(mask, ®s->dats);
+ else if (val == OUTPUT_LOW)
+ writel(mask, ®s->datc);
+ else
+ return -EINVAL;
+ writel(mask, ®s->dirs);
+ }
+
+ if (!ofnode_read_u32(node, "ste,lowemi", &val)) {
+ if (val)
+ setbits_le32(®s->lowemi, mask);
+ else
+ clrbits_le32(®s->lowemi, mask);
+ }
+
+ return 0;
+}
+
+static int nmk_pinctrl_get_alt(ofnode node, unsigned int *alt)
+{
+ const char *group;
+
+ if (ofnode_read_string_index(node, "groups", 0, &group))
+ return -EINVAL;
+
+ if (strstr(group, "_a_"))
+ *alt = NMK_ALT_A;
+ else if (strstr(group, "_b_"))
+ *alt = NMK_ALT_B;
+ else if (strstr(group, "_c_"))
+ *alt = NMK_ALT_C;
+ else
+ return -EINVAL;
+
+ return 0;
+}
+
+static int nmk_pinctrl_set_state(struct udevice *dev, struct udevice *config)
+{
+ unsigned int alt = NMK_ALT_GPIO;
+ ofnode node;
+ int count;
+ int ret;
+ int i;
+
+ dev_for_each_subnode(node, config) {
+ if (ofnode_read_string(node, "function")) {
+ ret = nmk_pinctrl_get_alt(node, &alt);
+ if (ret)
+ return ret;
+ }
+ }
+
+ dev_for_each_subnode(node, config) {
+ ofnode cfg;
+
+ count = ofnode_read_string_count(node, "pins");
+ if (count < 0)
+ continue;
+
+ cfg = ofnode_parse_phandle(node, "ste,config", 0);
+ if (!ofnode_valid(cfg))
+ cfg = node;
+
+ for (i = 0; i < count; i++) {
+ const char *name;
+ unsigned int pin;
+
+ ret = ofnode_read_string_index(node, "pins", i, &name);
+ if (ret)
+ return ret;
+ ret = nmk_pinctrl_parse_pin(name, &pin);
+ if (ret)
+ return ret;
+ ret = nmk_pinctrl_set_config(dev, cfg, pin);
+ if (ret)
+ return ret;
+ nmk_pinctrl_set_mux(dev, pin, alt);
+ }
+ }
+
+ return 0;
+}
+
+static int nmk_pinctrl_probe(struct udevice *dev)
+{
+ struct nmk_pinctrl_priv *priv = dev_get_priv(dev);
+ struct ofnode_phandle_args args;
+ fdt_addr_t addr;
+ int ret;
+ int i;
+
+ for (i = 0; i < NMK_GPIO_BANKS; i++) {
+ ret = dev_read_phandle_with_args(dev, "nomadik-gpio-chips",
+ NULL, 0, i, &args);
+ if (ret)
+ return ret;
+
+ addr = ofnode_get_addr(args.node);
+ if (addr == FDT_ADDR_T_NONE)
+ return -EINVAL;
+ priv->bank[i] = (struct nmk_gpio_regs *)addr;
+ }
+
+ return 0;
+}
+
+static const struct pinctrl_ops nmk_pinctrl_ops = {
+ .set_state = nmk_pinctrl_set_state,
+};
+
+static const struct udevice_id nmk_pinctrl_ids[] = {
+ { .compatible = "stericsson,db8500-pinctrl" },
+ { }
+};
+
+U_BOOT_DRIVER(pinctrl_nomadik) = {
+ .name = "pinctrl_nomadik",
+ .id = UCLASS_PINCTRL,
+ .of_match = nmk_pinctrl_ids,
+ .probe = nmk_pinctrl_probe,
+ .priv_auto = sizeof(struct nmk_pinctrl_priv),
+ .ops = &nmk_pinctrl_ops,
+};
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v5 01/13] pinctrl: Add compact Nomadik pin controller
2026-08-23 20:39 ` [PATCH v5 01/13] pinctrl: Add compact Nomadik pin controller Linus Walleij
@ 2026-08-24 13:17 ` Stephan Gerhold
0 siblings, 0 replies; 26+ messages in thread
From: Stephan Gerhold @ 2026-08-24 13:17 UTC (permalink / raw)
To: Linus Walleij; +Cc: u-boot, Tom Rini, Stefan Hansson
On Sun, Aug 23, 2026 at 10:39:20PM +0200, Linus Walleij wrote:
> Add the minimal pin control support needed to consume default states from
> the upstream DB8500 device trees. Resolve the nine Nomadik GPIO banks
> through nomadik-gpio-chips and apply the mux, direction, value, pull and
> low-EMI settings directly to their registers.
>
> Only the DB8500 binding and default-state configuration needed by
> U-Boot are supported. There is no GPIO ownership or sleep-state
> handling.
>
> Signed-off-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Thanks!
> ---
> MAINTAINERS | 1 +
> arch/arm/Kconfig | 2 +
> drivers/pinctrl/Kconfig | 7 ++
> drivers/pinctrl/Makefile | 1 +
> drivers/pinctrl/pinctrl-nomadik.c | 230 ++++++++++++++++++++++++++++++++++++++
> 5 files changed, 241 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index eb48eea55c5a..a5d6b5be29dc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -787,6 +787,7 @@ S: Maintained
> F: arch/arm/dts/ste-*
> F: arch/arm/mach-u8500/
> F: drivers/gpio/nmk_gpio.c
> +F: drivers/pinctrl/pinctrl-nomadik.c
> F: drivers/phy/phy-ab8500-usb.c
> F: drivers/power/pmic/ab8500.c
> F: drivers/timer/nomadik-mtu-timer.c
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 1b474a346bf2..5b02ff18bd0e 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1278,6 +1278,8 @@ config ARCH_U8500
> imply DM_RTC
> imply NOMADIK_GPIO
> imply NOMADIK_MTU_TIMER
> + imply PINCTRL
> + imply PINCTRL_NOMADIK
> imply PHY
> imply PL01X_SERIAL
> imply PMIC_AB8500
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index fd30aaeeaa89..04785a927fec 100644
> --- a/drivers/pinctrl/Kconfig
> +++ b/drivers/pinctrl/Kconfig
> @@ -75,6 +75,13 @@ config PINCONF_RECURSIVE
> configuration; you can save memory footprint when this feature is
> no needed.
>
> +config PINCTRL_NOMADIK
> + bool "Nomadik pin control driver"
> + depends on PINCTRL_FULL
> + help
> + Enable pin multiplexing and configuration support for the Nomadik
> + GPIO blocks in the ST-Ericsson DB8500.
> +
> config SPL_PINCTRL
> bool "Support pin controllers in SPL"
> depends on SPL && SPL_DM
> diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
> index 91149796bb5f..23219626e392 100644
> --- a/drivers/pinctrl/Makefile
> +++ b/drivers/pinctrl/Makefile
> @@ -25,6 +25,7 @@ obj-$(CONFIG_PINCTRL_K210) += pinctrl-k210.o
> obj-$(CONFIG_PINCTRL_MESON) += meson/
> obj-$(CONFIG_PINCTRL_MSCC) += mscc/
> obj-$(CONFIG_PINCTRL_MTK) += mediatek/
> +obj-$(CONFIG_PINCTRL_NOMADIK) += pinctrl-nomadik.o
> obj-$(CONFIG_PINCTRL_PIC32) += pinctrl_pic32.o
> obj-$(CONFIG_PINCTRL_QCOM) += qcom/
> obj-$(CONFIG_PINCTRL_QE) += pinctrl-qe-io.o
> diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
> new file mode 100644
> index 000000000000..12d032226608
> --- /dev/null
> +++ b/drivers/pinctrl/pinctrl-nomadik.c
> @@ -0,0 +1,230 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/* Copyright (C) 2026 Linus Walleij <linusw@kernel.org> */
> +
> +#include <dm.h>
> +#include <dm/pinctrl.h>
> +#include <dt-bindings/pinctrl/nomadik.h>
> +#include <vsprintf.h>
> +#include <asm/io.h>
> +
> +#define NMK_GPIO_BANKS 9
> +#define NMK_GPIO_PER_BANK 32
> +
> +struct nmk_gpio_regs {
> + u32 dat;
> + u32 dats;
> + u32 datc;
> + u32 pdis;
> + u32 dir;
> + u32 dirs;
> + u32 dirc;
> + u32 slpm;
> + u32 afsla;
> + u32 afslb;
> + u32 lowemi;
> +};
> +
> +struct nmk_pinctrl_priv {
> + struct nmk_gpio_regs *bank[NMK_GPIO_BANKS];
> +};
> +
> +enum nmk_alt {
> + NMK_ALT_GPIO,
> + NMK_ALT_A,
> + NMK_ALT_B,
> + NMK_ALT_C,
> +};
> +
> +static int nmk_pinctrl_parse_pin(const char *name, unsigned int *pin)
> +{
> + char *end;
> +
> + if (strncmp(name, "GPIO", 4))
> + return -EINVAL;
> +
> + *pin = dectoul(name + 4, &end);
> + if (end == name + 4 || *end != '_' ||
> + *pin >= NMK_GPIO_BANKS * NMK_GPIO_PER_BANK)
> + return -EINVAL;
> +
> + return 0;
> +}
> +
> +static struct nmk_gpio_regs *
> +nmk_pinctrl_bank(struct udevice *dev, unsigned int pin)
> +{
> + struct nmk_pinctrl_priv *priv = dev_get_priv(dev);
> +
> + return priv->bank[pin / NMK_GPIO_PER_BANK];
> +}
> +
> +static void nmk_pinctrl_set_mux(struct udevice *dev, unsigned int pin,
> + unsigned int alt)
> +{
> + struct nmk_gpio_regs *regs = nmk_pinctrl_bank(dev, pin);
> + u32 mask = BIT(pin % NMK_GPIO_PER_BANK);
> + u32 val;
> +
> + val = readl(®s->afsla);
> + if (alt & NMK_ALT_A)
> + val |= mask;
> + else
> + val &= ~mask;
> + writel(val, ®s->afsla);
> +
> + val = readl(®s->afslb);
> + if (alt & NMK_ALT_B)
> + val |= mask;
> + else
> + val &= ~mask;
> + writel(val, ®s->afslb);
> +}
> +
> +static int nmk_pinctrl_set_config(struct udevice *dev, ofnode node,
> + unsigned int pin)
> +{
> + struct nmk_gpio_regs *regs = nmk_pinctrl_bank(dev, pin);
> + u32 mask = BIT(pin % NMK_GPIO_PER_BANK);
> + u32 val;
> +
> + if (!ofnode_read_u32(node, "ste,input", &val)) {
> + writel(mask, ®s->dirc);
> + if (val == INPUT_NOPULL) {
> + setbits_le32(®s->pdis, mask);
> + } else {
> + clrbits_le32(®s->pdis, mask);
> + if (val == INPUT_PULLUP)
> + writel(mask, ®s->dats);
> + else if (val == INPUT_PULLDOWN)
> + writel(mask, ®s->datc);
> + else
> + return -EINVAL;
> + }
> + }
> +
> + if (!ofnode_read_u32(node, "ste,output", &val)) {
> + if (val == OUTPUT_HIGH)
> + writel(mask, ®s->dats);
> + else if (val == OUTPUT_LOW)
> + writel(mask, ®s->datc);
> + else
> + return -EINVAL;
> + writel(mask, ®s->dirs);
> + }
> +
> + if (!ofnode_read_u32(node, "ste,lowemi", &val)) {
> + if (val)
> + setbits_le32(®s->lowemi, mask);
> + else
> + clrbits_le32(®s->lowemi, mask);
> + }
> +
> + return 0;
> +}
> +
> +static int nmk_pinctrl_get_alt(ofnode node, unsigned int *alt)
> +{
> + const char *group;
> +
> + if (ofnode_read_string_index(node, "groups", 0, &group))
> + return -EINVAL;
> +
> + if (strstr(group, "_a_"))
> + *alt = NMK_ALT_A;
> + else if (strstr(group, "_b_"))
> + *alt = NMK_ALT_B;
> + else if (strstr(group, "_c_"))
> + *alt = NMK_ALT_C;
> + else
> + return -EINVAL;
> +
> + return 0;
> +}
> +
> +static int nmk_pinctrl_set_state(struct udevice *dev, struct udevice *config)
> +{
> + unsigned int alt = NMK_ALT_GPIO;
> + ofnode node;
> + int count;
> + int ret;
> + int i;
> +
> + dev_for_each_subnode(node, config) {
> + if (ofnode_read_string(node, "function")) {
> + ret = nmk_pinctrl_get_alt(node, &alt);
> + if (ret)
> + return ret;
> + }
> + }
> +
> + dev_for_each_subnode(node, config) {
> + ofnode cfg;
> +
> + count = ofnode_read_string_count(node, "pins");
> + if (count < 0)
> + continue;
> +
> + cfg = ofnode_parse_phandle(node, "ste,config", 0);
> + if (!ofnode_valid(cfg))
> + cfg = node;
> +
> + for (i = 0; i < count; i++) {
> + const char *name;
> + unsigned int pin;
> +
> + ret = ofnode_read_string_index(node, "pins", i, &name);
> + if (ret)
> + return ret;
> + ret = nmk_pinctrl_parse_pin(name, &pin);
> + if (ret)
> + return ret;
> + ret = nmk_pinctrl_set_config(dev, cfg, pin);
> + if (ret)
> + return ret;
> + nmk_pinctrl_set_mux(dev, pin, alt);
> + }
> + }
> +
> + return 0;
> +}
> +
> +static int nmk_pinctrl_probe(struct udevice *dev)
> +{
> + struct nmk_pinctrl_priv *priv = dev_get_priv(dev);
> + struct ofnode_phandle_args args;
> + fdt_addr_t addr;
> + int ret;
> + int i;
> +
> + for (i = 0; i < NMK_GPIO_BANKS; i++) {
> + ret = dev_read_phandle_with_args(dev, "nomadik-gpio-chips",
> + NULL, 0, i, &args);
> + if (ret)
> + return ret;
> +
> + addr = ofnode_get_addr(args.node);
> + if (addr == FDT_ADDR_T_NONE)
> + return -EINVAL;
> + priv->bank[i] = (struct nmk_gpio_regs *)addr;
> + }
> +
> + return 0;
> +}
> +
> +static const struct pinctrl_ops nmk_pinctrl_ops = {
> + .set_state = nmk_pinctrl_set_state,
> +};
> +
> +static const struct udevice_id nmk_pinctrl_ids[] = {
> + { .compatible = "stericsson,db8500-pinctrl" },
> + { }
> +};
> +
> +U_BOOT_DRIVER(pinctrl_nomadik) = {
> + .name = "pinctrl_nomadik",
> + .id = UCLASS_PINCTRL,
> + .of_match = nmk_pinctrl_ids,
> + .probe = nmk_pinctrl_probe,
> + .priv_auto = sizeof(struct nmk_pinctrl_priv),
> + .ops = &nmk_pinctrl_ops,
> +};
>
> --
> 2.55.0
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v5 02/13] mmc: arm_pl180: Configure Ux500 signal direction
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
2026-08-23 20:39 ` [PATCH v5 01/13] pinctrl: Add compact Nomadik pin controller Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-23 20:39 ` [PATCH v5 03/13] mmc: arm_pl180: Gate idle card clocks Linus Walleij
` (10 subsequent siblings)
12 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
The Ux500 MMCI variant can control external level-shifter signal
directions through the power register. Parse the standard ST MMCI
device tree properties and set the corresponding direction and
feedback-clock bits.
This is required by the external SD card slot on Samsung Janice, where
commands cannot reach the card unless the direction controls are set.
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
drivers/mmc/arm_pl180_mmci.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index f00b0ff0dc95..af21b814641e 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -427,6 +427,19 @@ static int arm_pl180_mmc_probe(struct udevice *dev)
host->version2 = false; /* ARM variant */
}
+ if (dev_read_bool(dev, "st,sig-dir-dat0"))
+ host->pwr_init |= SDI_PWR_DAT0DIREN;
+ if (dev_read_bool(dev, "st,sig-dir-dat2"))
+ host->pwr_init |= SDI_PWR_DAT2DIREN;
+ if (dev_read_bool(dev, "st,sig-dir-dat31"))
+ host->pwr_init |= SDI_PWR_DAT31DIREN;
+ if (dev_read_bool(dev, "st,sig-dir-dat74"))
+ host->pwr_init |= SDI_PWR_DAT74DIREN;
+ if (dev_read_bool(dev, "st,sig-dir-cmd"))
+ host->pwr_init |= SDI_PWR_CMDDIREN;
+ if (dev_read_bool(dev, "st,sig-pin-fbclk"))
+ host->pwr_init |= SDI_PWR_FBCLKEN;
+
gpio_request_by_name(dev, "cd-gpios", 0, &host->cd_gpio, GPIOD_IS_IN);
ret = mmc_of_parse(dev, cfg);
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* [PATCH v5 03/13] mmc: arm_pl180: Gate idle card clocks
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
2026-08-23 20:39 ` [PATCH v5 01/13] pinctrl: Add compact Nomadik pin controller Linus Walleij
2026-08-23 20:39 ` [PATCH v5 02/13] mmc: arm_pl180: Configure Ux500 signal direction Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-24 13:25 ` Stephan Gerhold
2026-08-23 20:39 ` [PATCH v5 04/13] power: regulator: Add driver voltage clamp callback Linus Walleij
` (9 subsequent siblings)
12 siblings, 1 reply; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
The MMC core uses mmc->clk_disable to request that the card clock is
stopped, but the PL180 driver leaves SDI_CLKCR_CLKEN unchanged. This can
leave inactive hosts driving their card clocks.
Honor clk_disable when programming the clock control register. Also enable
the PL180 power-save mode so the clock stops automatically while the bus is
idle.
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
drivers/mmc/arm_pl180_mmci.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index af21b814641e..528612359789 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -294,6 +294,11 @@ static int host_set_ios(struct mmc *dev)
u32 sdi_clkcr;
sdi_clkcr = readl(&host->base->clock);
+ sdi_clkcr |= SDI_CLKCR_PWRSAV;
+ if (dev->clk_disable)
+ sdi_clkcr &= ~SDI_CLKCR_CLKEN;
+ else
+ sdi_clkcr |= SDI_CLKCR_CLKEN;
/* Ramp up the clock rate */
if (dev->clock) {
@@ -400,7 +405,7 @@ static int arm_pl180_mmc_probe(struct udevice *dev)
host->pwr_init = INIT_PWR;
host->clkdiv_init = SDI_CLKCR_CLKDIV_INIT_V1 | SDI_CLKCR_CLKEN |
- SDI_CLKCR_HWFC_EN;
+ SDI_CLKCR_PWRSAV | SDI_CLKCR_HWFC_EN;
host->clock_in = clk_get_rate(&clk);
cfg->name = dev->name;
@@ -418,7 +423,7 @@ static int arm_pl180_mmc_probe(struct udevice *dev)
case UX500V2_MMCI_ID:
host->pwr_init = SDI_PWR_OPD | SDI_PWR_PWRCTRL_ON;
host->clkdiv_init = SDI_CLKCR_CLKDIV_INIT_V2 | SDI_CLKCR_CLKEN |
- SDI_CLKCR_HWFC_EN;
+ SDI_CLKCR_PWRSAV | SDI_CLKCR_HWFC_EN;
cfg->voltages = VOLTAGE_WINDOW_MMC;
cfg->f_min = host->clock_in / (2 + SDI_CLKCR_CLKDIV_INIT_V2);
host->version2 = true;
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v5 03/13] mmc: arm_pl180: Gate idle card clocks
2026-08-23 20:39 ` [PATCH v5 03/13] mmc: arm_pl180: Gate idle card clocks Linus Walleij
@ 2026-08-24 13:25 ` Stephan Gerhold
2026-08-24 19:50 ` Linus Walleij
0 siblings, 1 reply; 26+ messages in thread
From: Stephan Gerhold @ 2026-08-24 13:25 UTC (permalink / raw)
To: Linus Walleij; +Cc: u-boot, Tom Rini, Stefan Hansson
On Sun, Aug 23, 2026 at 10:39:22PM +0200, Linus Walleij wrote:
> The MMC core uses mmc->clk_disable to request that the card clock is
> stopped, but the PL180 driver leaves SDI_CLKCR_CLKEN unchanged. This can
> leave inactive hosts driving their card clocks.
>
> Honor clk_disable when programming the clock control register. Also enable
> the PL180 power-save mode so the clock stops automatically while the bus is
> idle.
I'm not so sure about enabling PWRSAV, given that even Linux keeps that
disabled. See mmci_set_clkreg():
clk |= MCI_CLK_ENABLE;
/* This hasn't proven to be worthwhile */
/* clk |= MCI_CLK_PWRSAVE; */
Which is BTW your own change from 2009. :-)
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=a6a6464a0ecd20c5f1594a4fe5b24af6181b7366
The clk_disable part looks fine to me.
Thanks,
Stephan
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v5 03/13] mmc: arm_pl180: Gate idle card clocks
2026-08-24 13:25 ` Stephan Gerhold
@ 2026-08-24 19:50 ` Linus Walleij
0 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2026-08-24 19:50 UTC (permalink / raw)
To: Stephan Gerhold; +Cc: u-boot, Tom Rini, Stefan Hansson
On Mon, Aug 24, 2026 at 3:25 PM Stephan Gerhold
<stephan.gerhold@linaro.org> wrote:
> I'm not so sure about enabling PWRSAV, given that even Linux keeps that
> disabled. See mmci_set_clkreg():
>
> clk |= MCI_CLK_ENABLE;
> /* This hasn't proven to be worthwhile */
> /* clk |= MCI_CLK_PWRSAVE; */
>
> Which is BTW your own change from 2009. :-)
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=a6a6464a0ecd20c5f1594a4fe5b24af6181b7366
Yeah I dug in my old mail archive and I remember why this happened
like that actually.
I had a very sensitive Ampèremeter connected to the Ux500 prototype
platform and it didn't show any power improvement at all. The actual
clock gating at the clock source however did... it may be a bit dependent
on the interconnect and that's why I left it commented out, but let's
drop it.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v5 04/13] power: regulator: Add driver voltage clamp callback
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
` (2 preceding siblings ...)
2026-08-23 20:39 ` [PATCH v5 03/13] mmc: arm_pl180: Gate idle card clocks Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-23 20:39 ` [PATCH v5 05/13] mmc: arm_pl180: Set initial supply voltages Linus Walleij
` (8 subsequent siblings)
12 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
The regulator core can clamp a requested voltage against device tree
constraints, but it cannot account for discrete values supported by the
hardware.
Add an optional set_value_clamp() driver callback. Apply the regulator
constraints in the core before asking the driver to select the closest
supported voltage in the resulting range. Drivers without the callback
retain the existing behavior.
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
drivers/power/regulator/regulator-uclass.c | 2 ++
include/power/regulator.h | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c
index 0f5ba51ad6c2..388c888546a6 100644
--- a/drivers/power/regulator/regulator-uclass.c
+++ b/drivers/power/regulator/regulator-uclass.c
@@ -134,6 +134,8 @@ int regulator_set_value_clamp(struct udevice *dev,
if (uc_pdata->max_uV != -ENODATA)
max_uV = min(max_uV, uc_pdata->max_uV);
uV = clamp(target_uV, min_uV, max_uV);
+ if (ops->set_value_clamp)
+ return ops->set_value_clamp(dev, min_uV, uV, max_uV);
return regulator_set_value(dev, uV);
}
diff --git a/include/power/regulator.h b/include/power/regulator.h
index 8d4d1450b905..f6838cb4605d 100644
--- a/include/power/regulator.h
+++ b/include/power/regulator.h
@@ -195,13 +195,19 @@ struct dm_regulator_ops {
* The regulator output value function calls operates on a micro Volts.
*
* get/set_value - get/set output value of the given output number
+ * set_value_clamp - set the closest supported value within a range
* @dev - regulator device
* Sets:
* @uV - set the output value [micro Volts]
+ * @min_uV - minimum acceptable output value [micro Volts]
+ * @target_uV - preferred output value [micro Volts]
+ * @max_uV - maximum acceptable output value [micro Volts]
* @return output value [uV] on success or negative errno if fail.
*/
int (*get_value)(struct udevice *dev);
int (*set_value)(struct udevice *dev, int uV);
+ int (*set_value_clamp)(struct udevice *dev, int min_uV,
+ int target_uV, int max_uV);
/**
* The regulator suspend output value function calls operates
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* [PATCH v5 05/13] mmc: arm_pl180: Set initial supply voltages
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
` (3 preceding siblings ...)
2026-08-23 20:39 ` [PATCH v5 04/13] power: regulator: Add driver voltage clamp callback Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-23 20:39 ` [PATCH v5 06/13] mmc: arm_pl180: Power down card supplies at OS handoff Linus Walleij
` (7 subsequent siblings)
12 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
Obtain the optional vmmc and vqmmc regulators and configure them for
the normal SD voltage range before card initialization.
Request the standard 3.3 V target within the allowed 2.7-3.6 V range.
The regulator clamp operation lets regulators with discrete selectors
choose the closest supported voltage. This selects 2.91 V on AB8500 and
3.05 V on AB8505.
Ignore the unsupported set-value operation for fixed regulators; their
voltage is already described by their fixed constraints.
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
drivers/mmc/arm_pl180_mmci.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index 528612359789..8483d859fb96 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -16,6 +16,7 @@
#include <log.h>
#include <malloc.h>
#include <mmc.h>
+#include <power/regulator.h>
#include <dm/device_compat.h>
#include <dm.h>
@@ -28,11 +29,21 @@
#define MMC_CLOCK_MAX 48000000
#define MMC_CLOCK_MIN 400000
+#define SD_VOLTAGE_MIN_UV 2700000
+#define SD_VOLTAGE_UV 3300000
+#define SD_VOLTAGE_MAX_UV 3600000
+
struct arm_pl180_mmc_plat {
struct mmc_config cfg;
struct mmc mmc;
};
+static int arm_pl180_set_supply_voltage(struct udevice *supply)
+{
+ return regulator_set_value_clamp(supply, SD_VOLTAGE_MIN_UV,
+ SD_VOLTAGE_UV, SD_VOLTAGE_MAX_UV);
+}
+
static int wait_for_command_end(struct mmc *dev, struct mmc_cmd *cmd)
{
u32 hoststatus, statusmask;
@@ -445,6 +456,24 @@ static int arm_pl180_mmc_probe(struct udevice *dev)
if (dev_read_bool(dev, "st,sig-pin-fbclk"))
host->pwr_init |= SDI_PWR_FBCLKEN;
+ if (CONFIG_IS_ENABLED(DM_REGULATOR)) {
+ ret = device_get_supply_regulator(dev, "vmmc-supply",
+ &mmc->vmmc_supply);
+ if (!ret) {
+ ret = arm_pl180_set_supply_voltage(mmc->vmmc_supply);
+ if (ret && ret != -ENOSYS)
+ return ret;
+ }
+
+ ret = device_get_supply_regulator(dev, "vqmmc-supply",
+ &mmc->vqmmc_supply);
+ if (!ret) {
+ ret = arm_pl180_set_supply_voltage(mmc->vqmmc_supply);
+ if (ret && ret != -ENOSYS)
+ return ret;
+ }
+ }
+
gpio_request_by_name(dev, "cd-gpios", 0, &host->cd_gpio, GPIOD_IS_IN);
ret = mmc_of_parse(dev, cfg);
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* [PATCH v5 06/13] mmc: arm_pl180: Power down card supplies at OS handoff
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
` (4 preceding siblings ...)
2026-08-23 20:39 ` [PATCH v5 05/13] mmc: arm_pl180: Set initial supply voltages Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-24 13:30 ` Stephan Gerhold
2026-08-23 20:39 ` [PATCH v5 07/13] power: regulator: Add AB8500 AUX3 support Linus Walleij
` (6 subsequent siblings)
12 siblings, 1 reply; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
PL180 card supplies remain enabled after probing and while U-Boot is
running. They are no longer needed once control is handed to the operating
system.
Mark the driver for removal during OS preparation and disable its VMMC and
VQMMC supplies from the remove callback.
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
drivers/mmc/arm_pl180_mmci.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index 8483d859fb96..012ee0508776 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -44,6 +44,20 @@ static int arm_pl180_set_supply_voltage(struct udevice *supply)
SD_VOLTAGE_UV, SD_VOLTAGE_MAX_UV);
}
+static int arm_pl180_disable_supply(struct udevice *supply)
+{
+ int ret;
+
+ if (!supply)
+ return 0;
+
+ ret = regulator_set_enable_if_allowed(supply, false);
+ if (ret == -ENOSYS)
+ return 0;
+
+ return ret;
+}
+
static int wait_for_command_end(struct mmc *dev, struct mmc_cmd *cmd)
{
u32 hoststatus, statusmask;
@@ -488,6 +502,20 @@ static int arm_pl180_mmc_probe(struct udevice *dev)
return 0;
}
+static int arm_pl180_mmc_remove(struct udevice *dev)
+{
+ struct mmc *mmc = mmc_get_mmc_dev(dev);
+ int ret, vmmc_ret;
+
+ ret = arm_pl180_disable_supply(mmc->vqmmc_supply);
+ if (mmc->vmmc_supply != mmc->vqmmc_supply)
+ vmmc_ret = arm_pl180_disable_supply(mmc->vmmc_supply);
+ else
+ vmmc_ret = 0;
+
+ return ret ? ret : vmmc_ret;
+}
+
int arm_pl180_mmc_bind(struct udevice *dev)
{
struct arm_pl180_mmc_plat *plat = dev_get_plat(dev);
@@ -551,8 +579,10 @@ U_BOOT_DRIVER(arm_pl180_mmc) = {
.of_match = arm_pl180_mmc_match,
.ops = &arm_pl180_dm_mmc_ops,
.probe = arm_pl180_mmc_probe,
+ .remove = arm_pl180_mmc_remove,
.of_to_plat = arm_pl180_mmc_of_to_plat,
.bind = arm_pl180_mmc_bind,
.priv_auto = sizeof(struct pl180_mmc_host),
.plat_auto = sizeof(struct arm_pl180_mmc_plat),
+ .flags = DM_FLAG_OS_PREPARE,
};
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v5 06/13] mmc: arm_pl180: Power down card supplies at OS handoff
2026-08-23 20:39 ` [PATCH v5 06/13] mmc: arm_pl180: Power down card supplies at OS handoff Linus Walleij
@ 2026-08-24 13:30 ` Stephan Gerhold
2026-08-24 20:01 ` Linus Walleij
0 siblings, 1 reply; 26+ messages in thread
From: Stephan Gerhold @ 2026-08-24 13:30 UTC (permalink / raw)
To: Linus Walleij; +Cc: u-boot, Tom Rini, Stefan Hansson
On Sun, Aug 23, 2026 at 10:39:25PM +0200, Linus Walleij wrote:
> PL180 card supplies remain enabled after probing and while U-Boot is
> running. They are no longer needed once control is handed to the operating
> system.
>
> Mark the driver for removal during OS preparation and disable its VMMC and
> VQMMC supplies from the remove callback.
>
> Signed-off-by: Linus Walleij <linusw@kernel.org>
Is it worth briefly toggling the regulator off before Linux turns it on
again? Linux will typically need to turn them on again later during
boot, and even if not Linux should be able to deal with unused
regulators. I'm not sure it's worth adding such cleanup to U-Boot.
Thanks,
Stephan
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v5 06/13] mmc: arm_pl180: Power down card supplies at OS handoff
2026-08-24 13:30 ` Stephan Gerhold
@ 2026-08-24 20:01 ` Linus Walleij
2026-08-25 7:43 ` Stephan Gerhold
0 siblings, 1 reply; 26+ messages in thread
From: Linus Walleij @ 2026-08-24 20:01 UTC (permalink / raw)
To: Stephan Gerhold; +Cc: u-boot, Tom Rini, Stefan Hansson
On Mon, Aug 24, 2026 at 3:30 PM Stephan Gerhold
<stephan.gerhold@linaro.org> wrote:
> On Sun, Aug 23, 2026 at 10:39:25PM +0200, Linus Walleij wrote:
> > PL180 card supplies remain enabled after probing and while U-Boot is
> > running. They are no longer needed once control is handed to the operating
> > system.
> >
> > Mark the driver for removal during OS preparation and disable its VMMC and
> > VQMMC supplies from the remove callback.
> >
> > Signed-off-by: Linus Walleij <linusw@kernel.org>
>
> Is it worth briefly toggling the regulator off before Linux turns it on
> again? Linux will typically need to turn them on again later during
> boot, and even if not Linux should be able to deal with unused
> regulators. I'm not sure it's worth adding such cleanup to U-Boot.
For our specific Ux500 target it is true.
But this driver is used by a bunch of platforms including some
ARM reference designs, and also booting other operating systems
than Linux.
Something could EFI boot off one SD card, then have rootfs
on another one and the original boot card undefined in the
hardware description for example. Albeit that sounds a bit
stupid.
So I thought it'd be more clean to shut off the light on your way
out.
But it's not like I'm married to the patch.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v5 06/13] mmc: arm_pl180: Power down card supplies at OS handoff
2026-08-24 20:01 ` Linus Walleij
@ 2026-08-25 7:43 ` Stephan Gerhold
0 siblings, 0 replies; 26+ messages in thread
From: Stephan Gerhold @ 2026-08-25 7:43 UTC (permalink / raw)
To: Linus Walleij; +Cc: u-boot, Tom Rini, Stefan Hansson
On Mon, Aug 24, 2026 at 10:01:15PM +0200, Linus Walleij wrote:
> On Mon, Aug 24, 2026 at 3:30 PM Stephan Gerhold
> <stephan.gerhold@linaro.org> wrote:
> > On Sun, Aug 23, 2026 at 10:39:25PM +0200, Linus Walleij wrote:
>
> > > PL180 card supplies remain enabled after probing and while U-Boot is
> > > running. They are no longer needed once control is handed to the operating
> > > system.
> > >
> > > Mark the driver for removal during OS preparation and disable its VMMC and
> > > VQMMC supplies from the remove callback.
> > >
> > > Signed-off-by: Linus Walleij <linusw@kernel.org>
> >
> > Is it worth briefly toggling the regulator off before Linux turns it on
> > again? Linux will typically need to turn them on again later during
> > boot, and even if not Linux should be able to deal with unused
> > regulators. I'm not sure it's worth adding such cleanup to U-Boot.
>
> For our specific Ux500 target it is true.
>
> But this driver is used by a bunch of platforms including some
> ARM reference designs, and also booting other operating systems
> than Linux.
>
> Something could EFI boot off one SD card, then have rootfs
> on another one and the original boot card undefined in the
> hardware description for example. Albeit that sounds a bit
> stupid.
>
> So I thought it'd be more clean to shut off the light on your way
> out.
>
> But it's not like I'm married to the patch.
>
I don't really have a strong opinion either. We can just leave it up to
the maintainers.
Can you re-run get_maintainer.pl on this series for v6? Seems like the
U-Boot MMC maintainers aren't included in this patch. I think it would
also be worth Ccing the "ARM STM STM32MP" maintainers for arm_pl180
changes, they use the STM32_MMCI_ID code path in this driver and
reviewed/tested my last changes (Patrice Chotard in particular).
Thanks,
Stephan
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v5 07/13] power: regulator: Add AB8500 AUX3 support
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
` (5 preceding siblings ...)
2026-08-23 20:39 ` [PATCH v5 06/13] mmc: arm_pl180: Power down card supplies at OS handoff Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-24 13:45 ` Stephan Gerhold
2026-08-23 20:39 ` [PATCH v5 08/13] arm: u8500: Enable SD card regulators Linus Walleij
` (5 subsequent siblings)
12 siblings, 1 reply; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
Add regulator support for LDO AUX3 on AB8500 and AB8505 PMICs.
AUX3 supplies the removable SD card on the upstream Ux500 Samsung
device trees.
Support the AB8505-specific 3.05 V selector override and clear it after
programming an ordinary voltage. Treat both normal and low-power modes
as enabled and select the supported voltage closest to a requested
target. AB8500 cut 2.0 or later is assumed.
Imply the regulator core for ARCH_U8500 so the driver can instantiate
from the upstream device trees.
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
MAINTAINERS | 1 +
arch/arm/Kconfig | 2 +
drivers/power/pmic/ab8500.c | 1 +
drivers/power/regulator/Kconfig | 7 ++
drivers/power/regulator/Makefile | 1 +
drivers/power/regulator/ab8500.c | 168 +++++++++++++++++++++++++++++++++++++++
6 files changed, 180 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index a5d6b5be29dc..8e78a7f224fa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -790,6 +790,7 @@ F: drivers/gpio/nmk_gpio.c
F: drivers/pinctrl/pinctrl-nomadik.c
F: drivers/phy/phy-ab8500-usb.c
F: drivers/power/pmic/ab8500.c
+F: drivers/power/regulator/ab8500.c
F: drivers/timer/nomadik-mtu-timer.c
F: drivers/usb/musb-new/ux500.c
F: drivers/video/mcde_simple.c
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5b02ff18bd0e..62aa9e8cc565 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1275,6 +1275,7 @@ config ARCH_U8500
imply ARM_PL180_MMCI
imply CLK
imply DM_PMIC
+ imply DM_REGULATOR
imply DM_RTC
imply NOMADIK_GPIO
imply NOMADIK_MTU_TIMER
@@ -1283,6 +1284,7 @@ config ARCH_U8500
imply PHY
imply PL01X_SERIAL
imply PMIC_AB8500
+ imply REGULATOR_AB8500
imply RTC_PL031
imply SYS_THUMB_BUILD
imply SYSRESET_SYSCON
diff --git a/drivers/power/pmic/ab8500.c b/drivers/power/pmic/ab8500.c
index 9ba096711e14..b9fae7000b78 100644
--- a/drivers/power/pmic/ab8500.c
+++ b/drivers/power/pmic/ab8500.c
@@ -253,6 +253,7 @@ static int ab8500_probe(struct udevice *dev)
static const struct udevice_id ab8500_ids[] = {
{ .compatible = "stericsson,ab8500" },
+ { .compatible = "stericsson,ab8505" },
{ }
};
diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
index 00a25acfdf99..a27fe4925cf9 100644
--- a/drivers/power/regulator/Kconfig
+++ b/drivers/power/regulator/Kconfig
@@ -16,6 +16,13 @@ config DM_REGULATOR
for this purpose if PMIC I/O driver is implemented or dm_scan_fdt_dev()
otherwise. Detailed information can be found in the header file.
+config REGULATOR_AB8500
+ bool "ST-Ericsson AB8500/AB8505 regulator support"
+ depends on DM_REGULATOR && PMIC_AB8500
+ help
+ Enable LDO AUX3 regulator support for AB8500 and AB8505 PMICs.
+ This supply is used to power removable SD cards on Ux500 boards.
+
config SPL_DM_REGULATOR
bool "Enable regulators for SPL"
depends on DM_REGULATOR && SPL_POWER
diff --git a/drivers/power/regulator/Makefile b/drivers/power/regulator/Makefile
index a40c9d340d98..a500a3da98d4 100644
--- a/drivers/power/regulator/Makefile
+++ b/drivers/power/regulator/Makefile
@@ -5,6 +5,7 @@
#
obj-$(CONFIG_$(PHASE_)DM_REGULATOR) += regulator-uclass.o
+obj-$(CONFIG_REGULATOR_AB8500) += ab8500.o
obj-$(CONFIG_REGULATOR_ACT8846) += act8846.o
obj-$(CONFIG_REGULATOR_AS3722) += as3722_regulator.o
obj-$(CONFIG_$(PHASE_)REGULATOR_AXP) += axp_regulator.o
diff --git a/drivers/power/regulator/ab8500.c b/drivers/power/regulator/ab8500.c
new file mode 100644
index 000000000000..4eab7fcd0f40
--- /dev/null
+++ b/drivers/power/regulator/ab8500.c
@@ -0,0 +1,168 @@
+// SPDX-License-Identifier: GPL-2.0+
+/* ST-Ericsson AB8500/AB8505 LDO AUX3 regulator */
+
+#include <dm.h>
+#include <dm/lists.h>
+#include <linux/errno.h>
+#include <power/ab8500.h>
+#include <power/pmic.h>
+#include <power/regulator.h>
+
+#define AB8500_VAUX3_REGU AB8500_REGU_CTRL2(0x0a)
+#define AB8500_VAUX3_SEL AB8500_REGU_CTRL2(0x21)
+#define AB8500_VAUX3_EN_MASK GENMASK(1, 0)
+#define AB8500_VAUX3_REGU_EN BIT(0)
+#define AB8500_VAUX3_SEL_MASK GENMASK(2, 0)
+#define AB8505_VAUX3_SEL3 AB8500_REGU_CTRL2(0x01)
+#define AB8505_VAUX3_SEL3_MASK BIT(4)
+#define AB8505_VAUX3_SEL3_UV 3050000
+
+static const int ab8500_vaux3_voltages[] = {
+ 1200000, 1500000, 1800000, 2100000,
+ 2500000, 2750000, 2790000, 2910000,
+};
+
+static struct udevice *ab8500_regulator_pmic(struct udevice *dev)
+{
+ return dev->parent->parent;
+}
+
+static int ab8500_regulator_get_value(struct udevice *dev)
+{
+ struct udevice *pmic = ab8500_regulator_pmic(dev);
+ int ret;
+
+ if (device_is_compatible(pmic, "stericsson,ab8505")) {
+ ret = pmic_reg_read(pmic, AB8505_VAUX3_SEL3);
+ if (ret < 0)
+ return ret;
+ if (ret & AB8505_VAUX3_SEL3_MASK)
+ return AB8505_VAUX3_SEL3_UV;
+ }
+
+ ret = pmic_reg_read(pmic, AB8500_VAUX3_SEL);
+ if (ret < 0)
+ return ret;
+ ret &= AB8500_VAUX3_SEL_MASK;
+
+ return ab8500_vaux3_voltages[ret];
+}
+
+static int ab8500_regulator_set_value(struct udevice *dev, int uV)
+{
+ struct udevice *pmic = ab8500_regulator_pmic(dev);
+ bool is_ab8505 = device_is_compatible(pmic, "stericsson,ab8505");
+ int ret;
+ int i;
+
+ if (uV == AB8505_VAUX3_SEL3_UV) {
+ if (!is_ab8505)
+ return -EINVAL;
+
+ return pmic_clrsetbits(pmic, AB8505_VAUX3_SEL3,
+ AB8505_VAUX3_SEL3_MASK,
+ AB8505_VAUX3_SEL3_MASK);
+ }
+
+ for (i = 0; i < ARRAY_SIZE(ab8500_vaux3_voltages); i++) {
+ if (ab8500_vaux3_voltages[i] != uV)
+ continue;
+
+ ret = pmic_clrsetbits(pmic, AB8500_VAUX3_SEL,
+ AB8500_VAUX3_SEL_MASK, i);
+ if (ret || !is_ab8505)
+ return ret;
+
+ return pmic_clrsetbits(pmic, AB8505_VAUX3_SEL3,
+ AB8505_VAUX3_SEL3_MASK, 0);
+ }
+
+ return -EINVAL;
+}
+
+static int ab8500_regulator_set_value_clamp(struct udevice *dev, int min_uV,
+ int target_uV, int max_uV)
+{
+ struct udevice *pmic = ab8500_regulator_pmic(dev);
+ int best_uV = -EINVAL;
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(ab8500_vaux3_voltages); i++) {
+ int uV = ab8500_vaux3_voltages[i];
+
+ if (uV < min_uV || uV > max_uV)
+ continue;
+ if (best_uV < 0 || abs(uV - target_uV) <
+ abs(best_uV - target_uV))
+ best_uV = uV;
+ }
+
+ if (device_is_compatible(pmic, "stericsson,ab8505") &&
+ min_uV <= AB8505_VAUX3_SEL3_UV &&
+ max_uV >= AB8505_VAUX3_SEL3_UV &&
+ (best_uV < 0 || abs(AB8505_VAUX3_SEL3_UV - target_uV) <
+ abs(best_uV - target_uV)))
+ best_uV = AB8505_VAUX3_SEL3_UV;
+
+ if (best_uV < 0)
+ return best_uV;
+
+ return ab8500_regulator_set_value(dev, best_uV);
+}
+
+static int ab8500_regulator_get_enable(struct udevice *dev)
+{
+ int ret;
+
+ ret = pmic_reg_read(ab8500_regulator_pmic(dev), AB8500_VAUX3_REGU);
+ if (ret < 0)
+ return ret;
+
+ return !!(ret & AB8500_VAUX3_EN_MASK);
+}
+
+static int ab8500_regulator_set_enable(struct udevice *dev, bool enable)
+{
+ return pmic_clrsetbits(ab8500_regulator_pmic(dev), AB8500_VAUX3_REGU,
+ AB8500_VAUX3_EN_MASK,
+ enable ? AB8500_VAUX3_REGU_EN : 0);
+}
+
+static const struct dm_regulator_ops ab8500_regulator_ops = {
+ .get_value = ab8500_regulator_get_value,
+ .set_value = ab8500_regulator_set_value,
+ .set_value_clamp = ab8500_regulator_set_value_clamp,
+ .get_enable = ab8500_regulator_get_enable,
+ .set_enable = ab8500_regulator_set_enable,
+};
+
+U_BOOT_DRIVER(ab8500_ldo_aux3) = {
+ .name = "ab8500_ldo_aux3",
+ .id = UCLASS_REGULATOR,
+ .ops = &ab8500_regulator_ops,
+};
+
+static int ab8500_regulators_bind(struct udevice *dev)
+{
+ ofnode node;
+
+ node = dev_read_subnode(dev, "ab8500_ldo_aux3");
+ if (!ofnode_valid(node))
+ return -ENODEV;
+
+ return device_bind_driver_to_node(dev, "ab8500_ldo_aux3",
+ ofnode_get_name(node), node, NULL);
+}
+
+static const struct udevice_id ab8500_regulator_ids[] = {
+ { .compatible = "stericsson,ab8500-regulator" },
+ { .compatible = "stericsson,ab8505-regulator" },
+ { }
+};
+
+U_BOOT_DRIVER(ab8500_regulators) = {
+ .name = "ab8500_regulators",
+ .id = UCLASS_NOP,
+ .of_match = ab8500_regulator_ids,
+ .bind = ab8500_regulators_bind,
+};
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v5 07/13] power: regulator: Add AB8500 AUX3 support
2026-08-23 20:39 ` [PATCH v5 07/13] power: regulator: Add AB8500 AUX3 support Linus Walleij
@ 2026-08-24 13:45 ` Stephan Gerhold
2026-08-24 20:04 ` Linus Walleij
0 siblings, 1 reply; 26+ messages in thread
From: Stephan Gerhold @ 2026-08-24 13:45 UTC (permalink / raw)
To: Linus Walleij; +Cc: u-boot, Tom Rini, Stefan Hansson
On Sun, Aug 23, 2026 at 10:39:26PM +0200, Linus Walleij wrote:
> Add regulator support for LDO AUX3 on AB8500 and AB8505 PMICs.
> AUX3 supplies the removable SD card on the upstream Ux500 Samsung
> device trees.
>
> Support the AB8505-specific 3.05 V selector override and clear it after
> programming an ordinary voltage. Treat both normal and low-power modes
> as enabled and select the supported voltage closest to a requested
> target. AB8500 cut 2.0 or later is assumed.
>
> Imply the regulator core for ARCH_U8500 so the driver can instantiate
> from the upstream device trees.
>
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
> MAINTAINERS | 1 +
> arch/arm/Kconfig | 2 +
> drivers/power/pmic/ab8500.c | 1 +
> drivers/power/regulator/Kconfig | 7 ++
> drivers/power/regulator/Makefile | 1 +
> drivers/power/regulator/ab8500.c | 168 +++++++++++++++++++++++++++++++++++++++
> 6 files changed, 180 insertions(+)
>
> [...]
> diff --git a/drivers/power/regulator/ab8500.c b/drivers/power/regulator/ab8500.c
> new file mode 100644
> index 000000000000..4eab7fcd0f40
> --- /dev/null
> +++ b/drivers/power/regulator/ab8500.c
> @@ -0,0 +1,168 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/* ST-Ericsson AB8500/AB8505 LDO AUX3 regulator */
> +
> +#include <dm.h>
> +#include <dm/lists.h>
> +#include <linux/errno.h>
> +#include <power/ab8500.h>
> +#include <power/pmic.h>
> +#include <power/regulator.h>
> +
> +#define AB8500_VAUX3_REGU AB8500_REGU_CTRL2(0x0a)
> +#define AB8500_VAUX3_SEL AB8500_REGU_CTRL2(0x21)
> +#define AB8500_VAUX3_EN_MASK GENMASK(1, 0)
> +#define AB8500_VAUX3_REGU_EN BIT(0)
> +#define AB8500_VAUX3_SEL_MASK GENMASK(2, 0)
> +#define AB8505_VAUX3_SEL3 AB8500_REGU_CTRL2(0x01)
> +#define AB8505_VAUX3_SEL3_MASK BIT(4)
> +#define AB8505_VAUX3_SEL3_UV 3050000
I'm a bit confused by this list now, please either have all register
addresses (AB8500_REGU_CTRL2(...)) at the top, followed by the bitmasks
or make it interleaved (probably better for readability), i.e.
+#define AB8500_VAUX3_REGU AB8500_REGU_CTRL2(0x0a)
+#define AB8500_VAUX3_EN_MASK GENMASK(1, 0) /* <-- would be also good
to rename this for consistency */
+#define AB8500_VAUX3_REGU_EN BIT(0)
+#define AB8500_VAUX3_SEL AB8500_REGU_CTRL2(0x21)
+#define AB8500_VAUX3_SEL_MASK GENMASK(2, 0)
+#define AB8505_VAUX3_SEL3 AB8500_REGU_CTRL2(0x01)
+#define AB8505_VAUX3_SEL3_MASK BIT(4)
+#define AB8505_VAUX3_SEL3_UV 3050000
Am I blind or do we have no support for the AB8505 3.05V in the Linux
regulator driver?
Thanks,
Stephan
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH v5 07/13] power: regulator: Add AB8500 AUX3 support
2026-08-24 13:45 ` Stephan Gerhold
@ 2026-08-24 20:04 ` Linus Walleij
0 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2026-08-24 20:04 UTC (permalink / raw)
To: Stephan Gerhold; +Cc: u-boot, Tom Rini, Stefan Hansson
On Mon, Aug 24, 2026 at 3:45 PM Stephan Gerhold
<stephan.gerhold@linaro.org> wrote:
> > +#define AB8500_VAUX3_REGU AB8500_REGU_CTRL2(0x0a)
> > +#define AB8500_VAUX3_SEL AB8500_REGU_CTRL2(0x21)
> > +#define AB8500_VAUX3_EN_MASK GENMASK(1, 0)
> > +#define AB8500_VAUX3_REGU_EN BIT(0)
> > +#define AB8500_VAUX3_SEL_MASK GENMASK(2, 0)
> > +#define AB8505_VAUX3_SEL3 AB8500_REGU_CTRL2(0x01)
> > +#define AB8505_VAUX3_SEL3_MASK BIT(4)
> > +#define AB8505_VAUX3_SEL3_UV 3050000
>
> I'm a bit confused by this list now, please either have all register
> addresses (AB8500_REGU_CTRL2(...)) at the top, followed by the bitmasks
> or make it interleaved (probably better for readability), i.e.
OK I fix!
> Am I blind or do we have no support for the AB8505 3.05V in the Linux
> regulator driver?
We do not.
I have a pending patch series fixing this and a few other issues in the
Linux driver, that I will send after the Linux merge window is over.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v5 08/13] arm: u8500: Enable SD card regulators
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
` (6 preceding siblings ...)
2026-08-23 20:39 ` [PATCH v5 07/13] power: regulator: Add AB8500 AUX3 support Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-23 20:39 ` [PATCH v5 09/13] configs: stemmy: Boot EFI from external SD card Linus Walleij
` (4 subsequent siblings)
12 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
Have ARCH_U8500 imply the fixed regulator driver needed by level
shifters on the supported boards. The architecture already enables the
regulator core and Nomadik GPIO driver.
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
arch/arm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 62aa9e8cc565..2a01ac9b7675 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1276,6 +1276,7 @@ config ARCH_U8500
imply CLK
imply DM_PMIC
imply DM_REGULATOR
+ imply DM_REGULATOR_FIXED
imply DM_RTC
imply NOMADIK_GPIO
imply NOMADIK_MTU_TIMER
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* [PATCH v5 09/13] configs: stemmy: Boot EFI from external SD card
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
` (7 preceding siblings ...)
2026-08-23 20:39 ` [PATCH v5 08/13] arm: u8500: Enable SD card regulators Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-24 13:46 ` Stephan Gerhold
2026-08-23 20:39 ` [PATCH v5 10/13] arm: u8500: Switch Stemmy to upstream Janice device tree Linus Walleij
` (3 subsequent siblings)
12 siblings, 1 reply; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
Replace the fastboot-only command with standard bootflow scanning and
enable the EFI loader so the removable SD card can provide the default
ARM EFI executable. Filesystem probing is handled by the standard boot
framework and does not require the FAT command.
Skip global boot methods so EFI variables cannot redirect the scan to
the internal eMMC.
Disable mkeficapsule because generating capsule tools is unrelated to
running EFI payloads and adds a host GnuTLS build dependency.
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
configs/stemmy_defconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/configs/stemmy_defconfig b/configs/stemmy_defconfig
index 631ccababf1c..b1a14ab38210 100644
--- a/configs/stemmy_defconfig
+++ b/configs/stemmy_defconfig
@@ -14,10 +14,10 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000
CONFIG_DEFAULT_DEVICE_TREE="ste-ux500-samsung-stemmy"
CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_SYS_LOAD_ADDR=0x100000
-# CONFIG_EFI_LOADER is not set
+CONFIG_BOOTSTD_FULL=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="run fastbootcmd"
+CONFIG_BOOTCOMMAND="bootflow scan -lbG"
CONFIG_SYS_CBSIZE=256
CONFIG_SYS_PBSIZE=276
CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -43,3 +43,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x685d
CONFIG_VIDEO=y
CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_VIDEO_MCDE_SIMPLE=y
+# CONFIG_TOOLS_MKEFICAPSULE is not set
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v5 09/13] configs: stemmy: Boot EFI from external SD card
2026-08-23 20:39 ` [PATCH v5 09/13] configs: stemmy: Boot EFI from external SD card Linus Walleij
@ 2026-08-24 13:46 ` Stephan Gerhold
0 siblings, 0 replies; 26+ messages in thread
From: Stephan Gerhold @ 2026-08-24 13:46 UTC (permalink / raw)
To: Linus Walleij; +Cc: u-boot, Tom Rini, Stefan Hansson
On Sun, Aug 23, 2026 at 10:39:28PM +0200, Linus Walleij wrote:
> Replace the fastboot-only command with standard bootflow scanning and
> enable the EFI loader so the removable SD card can provide the default
> ARM EFI executable. Filesystem probing is handled by the standard boot
> framework and does not require the FAT command.
> Skip global boot methods so EFI variables cannot redirect the scan to
> the internal eMMC.
>
> Disable mkeficapsule because generating capsule tools is unrelated to
> running EFI payloads and adds a host GnuTLS build dependency.
>
> Signed-off-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Thanks!
> ---
> configs/stemmy_defconfig | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/configs/stemmy_defconfig b/configs/stemmy_defconfig
> index 631ccababf1c..b1a14ab38210 100644
> --- a/configs/stemmy_defconfig
> +++ b/configs/stemmy_defconfig
> @@ -14,10 +14,10 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000
> CONFIG_DEFAULT_DEVICE_TREE="ste-ux500-samsung-stemmy"
> CONFIG_SYS_BOOTM_LEN=0x4000000
> CONFIG_SYS_LOAD_ADDR=0x100000
> -# CONFIG_EFI_LOADER is not set
> +CONFIG_BOOTSTD_FULL=y
> CONFIG_OF_BOARD_SETUP=y
> CONFIG_USE_BOOTCOMMAND=y
> -CONFIG_BOOTCOMMAND="run fastbootcmd"
> +CONFIG_BOOTCOMMAND="bootflow scan -lbG"
> CONFIG_SYS_CBSIZE=256
> CONFIG_SYS_PBSIZE=276
> CONFIG_SYS_CONSOLE_INFO_QUIET=y
> @@ -43,3 +43,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x685d
> CONFIG_VIDEO=y
> CONFIG_SYS_WHITE_ON_BLACK=y
> CONFIG_VIDEO_MCDE_SIMPLE=y
> +# CONFIG_TOOLS_MKEFICAPSULE is not set
>
> --
> 2.55.0
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v5 10/13] arm: u8500: Switch Stemmy to upstream Janice device tree
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
` (8 preceding siblings ...)
2026-08-23 20:39 ` [PATCH v5 09/13] configs: stemmy: Boot EFI from external SD card Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-24 13:55 ` Stephan Gerhold
2026-08-23 20:39 ` [PATCH v5 11/13] ARM: dts: ux500: Make panel regulators have unique names Linus Walleij
` (2 subsequent siblings)
12 siblings, 1 reply; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
Use the upstream Samsung Janice device tree as the initial target for
the Stemmy configuration. This also prepares the board to share the
upstream Ux500 Samsung device trees with Linux.
U-Boot does not yet implement the U8500 clock providers used by the
upstream device tree. Add a U-Boot-specific overlay with the known MTU
clock rate and fixed input clocks for the external SD and internal eMMC
controllers. Remove the superseded downstream Stemmy and DBx500 device
tree files, and disable the unused WLAN SDIO controller for U-Boot.
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
arch/arm/dts/Makefile | 1 -
arch/arm/dts/ste-dbx5x0-u-boot.dtsi | 38 -
arch/arm/dts/ste-dbx5x0.dtsi | 1144 -----------------------------
arch/arm/dts/ste-ux500-samsung-stemmy.dts | 36 -
arch/arm/dts/u8500-u-boot.dtsi | 30 +
configs/stemmy_defconfig | 3 +-
6 files changed, 32 insertions(+), 1220 deletions(-)
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index a02dad22f274..355d7cf8ba91 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -503,7 +503,6 @@ dtb-$(CONFIG_TARGET_SL28) += fsl-ls1028a-kontron-sl28.dtb \
dtb-$(CONFIG_TARGET_TEN64) += fsl-ls1088a-ten64.dtb
-dtb-$(CONFIG_TARGET_STEMMY) += ste-ux500-samsung-stemmy.dtb
dtb-$(CONFIG_MACH_SUN4I) += \
sun4i-a10-inet-3f.dtb \
diff --git a/arch/arm/dts/ste-dbx5x0-u-boot.dtsi b/arch/arm/dts/ste-dbx5x0-u-boot.dtsi
deleted file mode 100644
index e350175305e9..000000000000
--- a/arch/arm/dts/ste-dbx5x0-u-boot.dtsi
+++ /dev/null
@@ -1,38 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include "skeleton.dtsi"
-#include "ste-dbx5x0.dtsi"
-
-/ {
- /* FIXME: Remove this when clk driver is implemented */
- sdmmcclk: sdmmcclk {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <100000000>;
- };
-
- soc {
- mtu@a03c6000 {
- clock-frequency = <133000000>;
- };
- uart@80120000 {
- clock = <38400000>;
- };
- uart@80121000 {
- clock = <38400000>;
- };
- uart@80007000 {
- clock = <38400000>;
- };
- mmc@80005000 {
- clocks = <&sdmmcclk>;
- };
- };
-
- reboot {
- compatible = "syscon-reboot";
- regmap = <&prcmu>;
- offset = <0x228>; /* PRCM_APE_SOFTRST */
- mask = <0x1>;
- };
-};
diff --git a/arch/arm/dts/ste-dbx5x0.dtsi b/arch/arm/dts/ste-dbx5x0.dtsi
deleted file mode 100644
index 68607e4ad80c..000000000000
--- a/arch/arm/dts/ste-dbx5x0.dtsi
+++ /dev/null
@@ -1,1144 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- * Copyright 2012 Linaro Ltd
- */
-
-#include <dt-bindings/interrupt-controller/irq.h>
-#include <dt-bindings/interrupt-controller/arm-gic.h>
-#include <dt-bindings/mfd/dbx500-prcmu.h>
-#include <dt-bindings/arm/ux500_pm_domains.h>
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/thermal/thermal.h>
-
-/ {
- #address-cells = <1>;
- #size-cells = <1>;
-
- /* This stablilizes the device enumeration */
- aliases {
- i2c0 = &i2c0;
- i2c1 = &i2c1;
- i2c2 = &i2c2;
- i2c3 = &i2c3;
- i2c4 = &i2c4;
- spi0 = &spi0;
- spi1 = &spi1;
- spi2 = &spi2;
- spi3 = &spi3;
- serial0 = &serial0;
- serial1 = &serial1;
- serial2 = &serial2;
- };
-
- chosen {
- };
-
- cpus {
- #address-cells = <1>;
- #size-cells = <0>;
- enable-method = "ste,dbx500-smp";
-
- cpu-map {
- cluster0 {
- core0 {
- cpu = <&CPU0>;
- };
- core1 {
- cpu = <&CPU1>;
- };
- };
- };
- CPU0: cpu@300 {
- device_type = "cpu";
- compatible = "arm,cortex-a9";
- reg = <0x300>;
- clocks = <&prcmu_clk PRCMU_ARMSS>;
- clock-names = "cpu";
- clock-latency = <20000>;
- #cooling-cells = <2>;
- };
- CPU1: cpu@301 {
- device_type = "cpu";
- compatible = "arm,cortex-a9";
- reg = <0x301>;
- };
- };
-
- thermal-zones {
- /*
- * Thermal zone for the SoC, using the thermal sensor in the
- * PRCMU for temperature and the cpufreq driver for passive
- * cooling.
- */
- cpu_thermal: cpu-thermal {
- polling-delay-passive = <250>;
- /*
- * This sensor fires interrupts to update the thermal
- * zone, so no polling is needed.
- */
- polling-delay = <0>;
-
- thermal-sensors = <&thermal>;
-
- trips {
- cpu_alert: cpu-alert {
- temperature = <70000>;
- hysteresis = <2000>;
- type = "passive";
- };
- cpu-crit {
- temperature = <85000>;
- hysteresis = <0>;
- type = "critical";
- };
- };
-
- cooling-maps {
- trip = <&cpu_alert>;
- cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
- contribution = <100>;
- };
- };
- };
-
- soc {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "stericsson,db8500", "simple-bus";
- interrupt-parent = <&intc>;
- ranges;
-
- ptm@801ae000 {
- compatible = "arm,coresight-etm3x", "arm,primecell";
- reg = <0x801ae000 0x1000>;
-
- clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
- clock-names = "apb_pclk", "atclk";
- cpu = <&CPU0>;
- out-ports {
- port {
- ptm0_out_port: endpoint {
- remote-endpoint = <&funnel_in_port0>;
- };
- };
- };
- };
-
- ptm@801af000 {
- compatible = "arm,coresight-etm3x", "arm,primecell";
- reg = <0x801af000 0x1000>;
-
- clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
- clock-names = "apb_pclk", "atclk";
- cpu = <&CPU1>;
- out-ports {
- port {
- ptm1_out_port: endpoint {
- remote-endpoint = <&funnel_in_port1>;
- };
- };
- };
- };
-
- funnel@801a6000 {
- compatible = "arm,coresight-dynamic-funnel", "arm,primecell";
- reg = <0x801a6000 0x1000>;
-
- clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
- clock-names = "apb_pclk", "atclk";
- out-ports {
- port {
- funnel_out_port: endpoint {
- remote-endpoint =
- <&replicator_in_port0>;
- };
- };
- };
-
- in-ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
- funnel_in_port0: endpoint {
- remote-endpoint = <&ptm0_out_port>;
- };
- };
-
- port@1 {
- reg = <1>;
- funnel_in_port1: endpoint {
- remote-endpoint = <&ptm1_out_port>;
- };
- };
- };
- };
-
- replicator {
- compatible = "arm,coresight-static-replicator";
- clocks = <&prcmu_clk PRCMU_APEATCLK>;
- clock-names = "atclk";
-
- out-ports {
- #address-cells = <1>;
- #size-cells = <0>;
-
- port@0 {
- reg = <0>;
- replicator_out_port0: endpoint {
- remote-endpoint = <&tpiu_in_port>;
- };
- };
- port@1 {
- reg = <1>;
- replicator_out_port1: endpoint {
- remote-endpoint = <&etb_in_port>;
- };
- };
- };
-
- in-ports {
- port {
- replicator_in_port0: endpoint {
- remote-endpoint = <&funnel_out_port>;
- };
- };
- };
- };
-
- tpiu@80190000 {
- compatible = "arm,coresight-tpiu", "arm,primecell";
- reg = <0x80190000 0x1000>;
-
- clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
- clock-names = "apb_pclk", "atclk";
- in-ports {
- port {
- tpiu_in_port: endpoint {
- remote-endpoint = <&replicator_out_port0>;
- };
- };
- };
- };
-
- etb@801a4000 {
- compatible = "arm,coresight-etb10", "arm,primecell";
- reg = <0x801a4000 0x1000>;
-
- clocks = <&prcmu_clk PRCMU_APETRACECLK>, <&prcmu_clk PRCMU_APEATCLK>;
- clock-names = "apb_pclk", "atclk";
- in-ports {
- port {
- etb_in_port: endpoint {
- remote-endpoint = <&replicator_out_port1>;
- };
- };
- };
- };
-
- intc: interrupt-controller@a0411000 {
- compatible = "arm,cortex-a9-gic";
- #interrupt-cells = <3>;
- #address-cells = <1>;
- interrupt-controller;
- reg = <0xa0411000 0x1000>,
- <0xa0410100 0x100>;
- };
-
- scu@a0410000 {
- compatible = "arm,cortex-a9-scu";
- reg = <0xa0410000 0x100>;
- };
-
- /*
- * The backup RAM is used for retention during sleep
- * and various things like spin tables
- */
- backupram@80150000 {
- compatible = "ste,dbx500-backupram";
- reg = <0x80150000 0x2000>;
- };
-
- L2: cache-controller {
- compatible = "arm,pl310-cache";
- reg = <0xa0412000 0x1000>;
- interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
- cache-unified;
- cache-level = <2>;
- };
-
- pmu {
- compatible = "arm,cortex-a9-pmu";
- interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
- };
-
- pm_domains: pm_domains0 {
- compatible = "stericsson,ux500-pm-domains";
- #power-domain-cells = <1>;
- };
-
- clocks {
- compatible = "stericsson,u8500-clks";
- /*
- * Registers for the CLKRST block on peripheral
- * groups 1, 2, 3, 5, 6,
- */
- reg = <0x8012f000 0x1000>, <0x8011f000 0x1000>,
- <0x8000f000 0x1000>, <0xa03ff000 0x1000>,
- <0xa03cf000 0x1000>;
-
- prcmu_clk: prcmu-clock {
- #clock-cells = <1>;
- };
-
- prcc_pclk: prcc-periph-clock {
- #clock-cells = <2>;
- };
-
- prcc_kclk: prcc-kernel-clock {
- #clock-cells = <2>;
- };
-
- rtc_clk: rtc32k-clock {
- #clock-cells = <0>;
- };
-
- smp_twd_clk: smp-twd-clock {
- #clock-cells = <0>;
- };
- };
-
- mtu@a03c6000 {
- /* Nomadik System Timer */
- compatible = "st,nomadik-mtu";
- reg = <0xa03c6000 0x1000>;
- interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
-
- clocks = <&prcmu_clk PRCMU_TIMCLK>, <&prcc_pclk 6 6>;
- clock-names = "timclk", "apb_pclk";
- };
-
- timer@a0410600 {
- compatible = "arm,cortex-a9-twd-timer";
- reg = <0xa0410600 0x20>;
- interrupts = <GIC_PPI 13 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_HIGH)>;
-
- clocks = <&smp_twd_clk>;
- };
-
- watchdog@a0410620 {
- compatible = "arm,cortex-a9-twd-wdt";
- reg = <0xa0410620 0x20>;
- interrupts = <GIC_PPI 14 (GIC_CPU_MASK_RAW(3) | IRQ_TYPE_LEVEL_HIGH)>;
- clocks = <&smp_twd_clk>;
- };
-
- rtc@80154000 {
- compatible = "arm,pl031", "arm,primecell";
- reg = <0x80154000 0x1000>;
- interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
-
- clocks = <&rtc_clk>;
- clock-names = "apb_pclk";
- };
-
- gpio0: gpio@8012e000 {
- compatible = "stericsson,db8500-gpio",
- "st,nomadik-gpio";
- reg = <0x8012e000 0x80>;
- interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- st,supports-sleepmode;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-bank = <0>;
- gpio-ranges = <&pinctrl 0 0 32>;
- clocks = <&prcc_pclk 1 9>;
- };
-
- gpio1: gpio@8012e080 {
- compatible = "stericsson,db8500-gpio",
- "st,nomadik-gpio";
- reg = <0x8012e080 0x80>;
- interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- st,supports-sleepmode;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-bank = <1>;
- gpio-ranges = <&pinctrl 0 32 5>;
- clocks = <&prcc_pclk 1 9>;
- };
-
- gpio2: gpio@8000e000 {
- compatible = "stericsson,db8500-gpio",
- "st,nomadik-gpio";
- reg = <0x8000e000 0x80>;
- interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- st,supports-sleepmode;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-bank = <2>;
- gpio-ranges = <&pinctrl 0 64 32>;
- clocks = <&prcc_pclk 3 8>;
- };
-
- gpio3: gpio@8000e080 {
- compatible = "stericsson,db8500-gpio",
- "st,nomadik-gpio";
- reg = <0x8000e080 0x80>;
- interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- st,supports-sleepmode;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-bank = <3>;
- gpio-ranges = <&pinctrl 0 96 2>;
- clocks = <&prcc_pclk 3 8>;
- };
-
- gpio4: gpio@8000e100 {
- compatible = "stericsson,db8500-gpio",
- "st,nomadik-gpio";
- reg = <0x8000e100 0x80>;
- interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- st,supports-sleepmode;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-bank = <4>;
- gpio-ranges = <&pinctrl 0 128 32>;
- clocks = <&prcc_pclk 3 8>;
- };
-
- gpio5: gpio@8000e180 {
- compatible = "stericsson,db8500-gpio",
- "st,nomadik-gpio";
- reg = <0x8000e180 0x80>;
- interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- st,supports-sleepmode;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-bank = <5>;
- gpio-ranges = <&pinctrl 0 160 12>;
- clocks = <&prcc_pclk 3 8>;
- };
-
- gpio6: gpio@8011e000 {
- compatible = "stericsson,db8500-gpio",
- "st,nomadik-gpio";
- reg = <0x8011e000 0x80>;
- interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- st,supports-sleepmode;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-bank = <6>;
- gpio-ranges = <&pinctrl 0 192 32>;
- clocks = <&prcc_pclk 2 11>;
- };
-
- gpio7: gpio@8011e080 {
- compatible = "stericsson,db8500-gpio",
- "st,nomadik-gpio";
- reg = <0x8011e080 0x80>;
- interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- st,supports-sleepmode;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-bank = <7>;
- gpio-ranges = <&pinctrl 0 224 7>;
- clocks = <&prcc_pclk 2 11>;
- };
-
- gpio8: gpio@a03fe000 {
- compatible = "stericsson,db8500-gpio",
- "st,nomadik-gpio";
- reg = <0xa03fe000 0x80>;
- interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-controller;
- #interrupt-cells = <2>;
- st,supports-sleepmode;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-bank = <8>;
- gpio-ranges = <&pinctrl 0 256 12>;
- clocks = <&prcc_pclk 5 1>;
- };
-
- pinctrl: pinctrl {
- compatible = "stericsson,db8500-pinctrl";
- nomadik-gpio-chips = <&gpio0>, <&gpio1>, <&gpio2>, <&gpio3>,
- <&gpio4>, <&gpio5>, <&gpio6>, <&gpio7>,
- <&gpio8>;
- prcm = <&prcmu>;
- };
-
- usb_per5@a03e0000 {
- compatible = "stericsson,db8500-musb";
- reg = <0xa03e0000 0x10000>;
- interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "mc";
-
- dr_mode = "otg";
-
- dmas = <&dma 38 0 0x2>, /* Logical - DevToMem */
- <&dma 38 0 0x0>, /* Logical - MemToDev */
- <&dma 37 0 0x2>, /* Logical - DevToMem */
- <&dma 37 0 0x0>, /* Logical - MemToDev */
- <&dma 36 0 0x2>, /* Logical - DevToMem */
- <&dma 36 0 0x0>, /* Logical - MemToDev */
- <&dma 19 0 0x2>, /* Logical - DevToMem */
- <&dma 19 0 0x0>, /* Logical - MemToDev */
- <&dma 18 0 0x2>, /* Logical - DevToMem */
- <&dma 18 0 0x0>, /* Logical - MemToDev */
- <&dma 17 0 0x2>, /* Logical - DevToMem */
- <&dma 17 0 0x0>, /* Logical - MemToDev */
- <&dma 16 0 0x2>, /* Logical - DevToMem */
- <&dma 16 0 0x0>, /* Logical - MemToDev */
- <&dma 39 0 0x2>, /* Logical - DevToMem */
- <&dma 39 0 0x0>; /* Logical - MemToDev */
-
- dma-names = "iep_1_9", "oep_1_9",
- "iep_2_10", "oep_2_10",
- "iep_3_11", "oep_3_11",
- "iep_4_12", "oep_4_12",
- "iep_5_13", "oep_5_13",
- "iep_6_14", "oep_6_14",
- "iep_7_15", "oep_7_15",
- "iep_8", "oep_8";
-
- clocks = <&prcc_pclk 5 0>;
- };
-
- dma: dma-controller@801C0000 {
- compatible = "stericsson,db8500-dma40", "stericsson,dma40";
- reg = <0x801C0000 0x1000 0x40010000 0x800>;
- reg-names = "base", "lcpa";
- interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
-
- #dma-cells = <3>;
- memcpy-channels = <56 57 58 59 60>;
-
- clocks = <&prcmu_clk PRCMU_DMACLK>;
- };
-
- prcmu: prcmu@80157000 {
- compatible = "stericsson,db8500-prcmu", "syscon";
- reg = <0x80157000 0x2000>, <0x801b0000 0x8000>, <0x801b8000 0x1000>;
- reg-names = "prcmu", "prcmu-tcpm", "prcmu-tcdm";
- interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <1>;
- interrupt-controller;
- #interrupt-cells = <2>;
- ranges;
-
- prcmu-timer-4@80157450 {
- compatible = "stericsson,db8500-prcmu-timer-4";
- reg = <0x80157450 0xC>;
- };
-
- thermal: thermal@801573c0 {
- compatible = "stericsson,db8500-thermal";
- reg = <0x801573c0 0x40>;
- interrupt-parent = <&prcmu>;
- interrupts = <21 IRQ_TYPE_LEVEL_HIGH>,
- <22 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "IRQ_HOTMON_LOW", "IRQ_HOTMON_HIGH";
- #thermal-sensor-cells = <0>;
- };
-
- db8500-prcmu-regulators {
- compatible = "stericsson,db8500-prcmu-regulator";
-
- // DB8500_REGULATOR_VAPE
- db8500_vape_reg: db8500_vape {
- regulator-always-on;
- };
-
- // DB8500_REGULATOR_VARM
- db8500_varm_reg: db8500_varm {
- };
-
- // DB8500_REGULATOR_VMODEM
- db8500_vmodem_reg: db8500_vmodem {
- };
-
- // DB8500_REGULATOR_VPLL
- db8500_vpll_reg: db8500_vpll {
- };
-
- // DB8500_REGULATOR_VSMPS1
- db8500_vsmps1_reg: db8500_vsmps1 {
- };
-
- // DB8500_REGULATOR_VSMPS2
- db8500_vsmps2_reg: db8500_vsmps2 {
- };
-
- // DB8500_REGULATOR_VSMPS3
- db8500_vsmps3_reg: db8500_vsmps3 {
- };
-
- // DB8500_REGULATOR_VRF1
- db8500_vrf1_reg: db8500_vrf1 {
- };
-
- // DB8500_REGULATOR_SWITCH_SVAMMDSP
- db8500_sva_mmdsp_reg: db8500_sva_mmdsp {
- };
-
- // DB8500_REGULATOR_SWITCH_SVAMMDSPRET
- db8500_sva_mmdsp_ret_reg: db8500_sva_mmdsp_ret {
- };
-
- // DB8500_REGULATOR_SWITCH_SVAPIPE
- db8500_sva_pipe_reg: db8500_sva_pipe {
- };
-
- // DB8500_REGULATOR_SWITCH_SIAMMDSP
- db8500_sia_mmdsp_reg: db8500_sia_mmdsp {
- };
-
- // DB8500_REGULATOR_SWITCH_SIAMMDSPRET
- db8500_sia_mmdsp_ret_reg: db8500_sia_mmdsp_ret {
- };
-
- // DB8500_REGULATOR_SWITCH_SIAPIPE
- db8500_sia_pipe_reg: db8500_sia_pipe {
- };
-
- // DB8500_REGULATOR_SWITCH_SGA
- db8500_sga_reg: db8500_sga {
- vin-supply = <&db8500_vape_reg>;
- };
-
- // DB8500_REGULATOR_SWITCH_B2R2_MCDE
- db8500_b2r2_mcde_reg: db8500_b2r2_mcde {
- vin-supply = <&db8500_vape_reg>;
- };
-
- // DB8500_REGULATOR_SWITCH_ESRAM12
- db8500_esram12_reg: db8500_esram12 {
- };
-
- // DB8500_REGULATOR_SWITCH_ESRAM12RET
- db8500_esram12_ret_reg: db8500_esram12_ret {
- };
-
- // DB8500_REGULATOR_SWITCH_ESRAM34
- db8500_esram34_reg: db8500_esram34 {
- };
-
- // DB8500_REGULATOR_SWITCH_ESRAM34RET
- db8500_esram34_ret_reg: db8500_esram34_ret {
- };
- };
- };
-
- i2c0: i2c@80004000 {
- compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
- reg = <0x80004000 0x1000>;
- interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
-
- #address-cells = <1>;
- #size-cells = <0>;
- v-i2c-supply = <&db8500_vape_reg>;
-
- clock-frequency = <400000>;
- clocks = <&prcc_kclk 3 3>, <&prcc_pclk 3 3>;
- clock-names = "i2cclk", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- i2c1: i2c@80122000 {
- compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
- reg = <0x80122000 0x1000>;
- interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
-
- #address-cells = <1>;
- #size-cells = <0>;
- v-i2c-supply = <&db8500_vape_reg>;
-
- clock-frequency = <400000>;
-
- clocks = <&prcc_kclk 1 2>, <&prcc_pclk 1 2>;
- clock-names = "i2cclk", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- i2c2: i2c@80128000 {
- compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
- reg = <0x80128000 0x1000>;
- interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
-
- #address-cells = <1>;
- #size-cells = <0>;
- v-i2c-supply = <&db8500_vape_reg>;
-
- clock-frequency = <400000>;
-
- clocks = <&prcc_kclk 1 6>, <&prcc_pclk 1 6>;
- clock-names = "i2cclk", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- i2c3: i2c@80110000 {
- compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
- reg = <0x80110000 0x1000>;
- interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
-
- #address-cells = <1>;
- #size-cells = <0>;
- v-i2c-supply = <&db8500_vape_reg>;
-
- clock-frequency = <400000>;
-
- clocks = <&prcc_kclk 2 0>, <&prcc_pclk 2 0>;
- clock-names = "i2cclk", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- i2c4: i2c@8012a000 {
- compatible = "stericsson,db8500-i2c", "st,nomadik-i2c", "arm,primecell";
- reg = <0x8012a000 0x1000>;
- interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
-
- #address-cells = <1>;
- #size-cells = <0>;
- v-i2c-supply = <&db8500_vape_reg>;
-
- clock-frequency = <400000>;
-
- clocks = <&prcc_kclk 1 9>, <&prcc_pclk 1 10>;
- clock-names = "i2cclk", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- ssp0: spi@80002000 {
- compatible = "arm,pl022", "arm,primecell";
- reg = <0x80002000 0x1000>;
- interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
- clocks = <&prcc_kclk 3 1>, <&prcc_pclk 3 1>;
- clock-names = "SSPCLK", "apb_pclk";
- dmas = <&dma 8 0 0x2>, /* Logical - DevToMem */
- <&dma 8 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- ssp1: spi@80003000 {
- compatible = "arm,pl022", "arm,primecell";
- reg = <0x80003000 0x1000>;
- interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
- clocks = <&prcc_kclk 3 2>, <&prcc_pclk 3 2>;
- clock-names = "SSPCLK", "apb_pclk";
- dmas = <&dma 9 0 0x2>, /* Logical - DevToMem */
- <&dma 9 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- spi0: spi@8011a000 {
- compatible = "arm,pl022", "arm,primecell";
- reg = <0x8011a000 0x1000>;
- interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
- /* Same clock wired to kernel and pclk */
- clocks = <&prcc_pclk 2 8>, <&prcc_pclk 2 8>;
- clock-names = "SSPCLK", "apb_pclk";
- dmas = <&dma 0 0 0x2>, /* Logical - DevToMem */
- <&dma 0 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- spi1: spi@80112000 {
- compatible = "arm,pl022", "arm,primecell";
- reg = <0x80112000 0x1000>;
- interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
- /* Same clock wired to kernel and pclk */
- clocks = <&prcc_pclk 2 2>, <&prcc_pclk 2 2>;
- clock-names = "SSPCLK", "apb_pclk";
- dmas = <&dma 35 0 0x2>, /* Logical - DevToMem */
- <&dma 35 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- spi2: spi@80111000 {
- compatible = "arm,pl022", "arm,primecell";
- reg = <0x80111000 0x1000>;
- interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
- /* Same clock wired to kernel and pclk */
- clocks = <&prcc_pclk 2 1>, <&prcc_pclk 2 1>;
- clock-names = "SSPCLK", "apb_pclk";
- dmas = <&dma 33 0 0x2>, /* Logical - DevToMem */
- <&dma 33 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- spi3: spi@80129000 {
- compatible = "arm,pl022", "arm,primecell";
- reg = <0x80129000 0x1000>;
- interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
- /* Same clock wired to kernel and pclk */
- clocks = <&prcc_pclk 1 7>, <&prcc_pclk 1 7>;
- clock-names = "SSPCLK", "apb_pclk";
- dmas = <&dma 40 0 0x2>, /* Logical - DevToMem */
- <&dma 40 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- serial0: uart@80120000 {
- compatible = "arm,pl011", "arm,primecell";
- reg = <0x80120000 0x1000>;
- interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
-
- dmas = <&dma 13 0 0x2>, /* Logical - DevToMem */
- <&dma 13 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 1 0>, <&prcc_pclk 1 0>;
- clock-names = "uart", "apb_pclk";
-
- status = "disabled";
- };
-
- serial1: uart@80121000 {
- compatible = "arm,pl011", "arm,primecell";
- reg = <0x80121000 0x1000>;
- interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
-
- dmas = <&dma 12 0 0x2>, /* Logical - DevToMem */
- <&dma 12 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 1 1>, <&prcc_pclk 1 1>;
- clock-names = "uart", "apb_pclk";
-
- status = "disabled";
- };
-
- serial2: uart@80007000 {
- compatible = "arm,pl011", "arm,primecell";
- reg = <0x80007000 0x1000>;
- interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
-
- dmas = <&dma 11 0 0x2>, /* Logical - DevToMem */
- <&dma 11 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 3 6>, <&prcc_pclk 3 6>;
- clock-names = "uart", "apb_pclk";
-
- status = "disabled";
- };
-
- mmc@80126000 {
- compatible = "arm,pl18x", "arm,primecell";
- reg = <0x80126000 0x1000>;
- interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
-
- dmas = <&dma 29 0 0x2>, /* Logical - DevToMem */
- <&dma 29 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>;
- clock-names = "sdi", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- mmc@80118000 {
- compatible = "arm,pl18x", "arm,primecell";
- reg = <0x80118000 0x1000>;
- interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
-
- dmas = <&dma 32 0 0x2>, /* Logical - DevToMem */
- <&dma 32 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 2 4>, <&prcc_pclk 2 6>;
- clock-names = "sdi", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- mmc@80005000 {
- compatible = "arm,pl18x", "arm,primecell";
- reg = <0x80005000 0x1000>;
- interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
-
- dmas = <&dma 28 0 0x2>, /* Logical - DevToMem */
- <&dma 28 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 3 4>, <&prcc_pclk 3 4>;
- clock-names = "sdi", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- mmc@80119000 {
- compatible = "arm,pl18x", "arm,primecell";
- reg = <0x80119000 0x1000>;
- interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
-
- dmas = <&dma 41 0 0x2>, /* Logical - DevToMem */
- <&dma 41 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 2 5>, <&prcc_pclk 2 7>;
- clock-names = "sdi", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- mmc@80114000 {
- compatible = "arm,pl18x", "arm,primecell";
- reg = <0x80114000 0x1000>;
- interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
-
- dmas = <&dma 42 0 0x2>, /* Logical - DevToMem */
- <&dma 42 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 2 2>, <&prcc_pclk 2 4>;
- clock-names = "sdi", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- mmc@80008000 {
- compatible = "arm,pl18x", "arm,primecell";
- reg = <0x80008000 0x1000>;
- interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
-
- dmas = <&dma 43 0 0x2>, /* Logical - DevToMem */
- <&dma 43 0 0x0>; /* Logical - MemToDev */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 3 7>, <&prcc_pclk 3 7>;
- clock-names = "sdi", "apb_pclk";
- power-domains = <&pm_domains DOMAIN_VAPE>;
-
- status = "disabled";
- };
-
- sound {
- compatible = "stericsson,snd-soc-mop500";
- stericsson,cpu-dai = <&msp1 &msp3>;
- };
-
- msp0: msp@80123000 {
- compatible = "stericsson,ux500-msp-i2s";
- reg = <0x80123000 0x1000>;
- interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
- v-ape-supply = <&db8500_vape_reg>;
-
- dmas = <&dma 31 0 0x12>, /* Logical - DevToMem - HighPrio */
- <&dma 31 0 0x10>; /* Logical - MemToDev - HighPrio */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 1 3>, <&prcc_pclk 1 3>;
- clock-names = "msp", "apb_pclk";
-
- status = "disabled";
- };
-
- msp1: msp@80124000 {
- compatible = "stericsson,ux500-msp-i2s";
- reg = <0x80124000 0x1000>;
- interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
- v-ape-supply = <&db8500_vape_reg>;
-
- /* This DMA channel only exist on DB8500 v1 */
- dmas = <&dma 30 0 0x10>; /* Logical - MemToDev - HighPrio */
- dma-names = "tx";
-
- clocks = <&prcc_kclk 1 4>, <&prcc_pclk 1 4>;
- clock-names = "msp", "apb_pclk";
-
- status = "disabled";
- };
-
- // HDMI sound
- msp2: msp@80117000 {
- compatible = "stericsson,ux500-msp-i2s";
- reg = <0x80117000 0x1000>;
- interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>;
- v-ape-supply = <&db8500_vape_reg>;
-
- dmas = <&dma 14 0 0x12>, /* Logical - DevToMem - HighPrio */
- <&dma 14 1 0x19>; /* Physical Chan 1 - MemToDev
- HighPrio - Fixed */
- dma-names = "rx", "tx";
-
- clocks = <&prcc_kclk 2 3>, <&prcc_pclk 2 5>;
- clock-names = "msp", "apb_pclk";
-
- status = "disabled";
- };
-
- msp3: msp@80125000 {
- compatible = "stericsson,ux500-msp-i2s";
- reg = <0x80125000 0x1000>;
- interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
- v-ape-supply = <&db8500_vape_reg>;
-
- /* This DMA channel only exist on DB8500 v2 */
- dmas = <&dma 30 0 0x12>; /* Logical - DevToMem - HighPrio */
- dma-names = "rx";
-
- clocks = <&prcc_kclk 1 10>, <&prcc_pclk 1 11>;
- clock-names = "msp", "apb_pclk";
-
- status = "disabled";
- };
-
- external-bus@50000000 {
- compatible = "simple-bus";
- reg = <0x50000000 0x4000000>;
- #address-cells = <1>;
- #size-cells = <1>;
- ranges = <0 0x50000000 0x4000000>;
- status = "disabled";
- };
-
- gpu@a0300000 {
- /*
- * This block is referred to as "Smart Graphics Adapter SGA500"
- * in documentation but is in practice a pretty straight-forward
- * MALI-400 GPU block.
- */
- compatible = "stericsson,db8500-mali", "arm,mali-400";
- reg = <0xa0300000 0x10000>;
- interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>,
- <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "gp",
- "gpmmu",
- "pp0",
- "ppmmu0",
- "combined";
- clocks = <&prcmu_clk PRCMU_ACLK>, <&prcmu_clk PRCMU_SGACLK>;
- clock-names = "bus", "core";
- mali-supply = <&db8500_sga_reg>;
- power-domains = <&pm_domains DOMAIN_VAPE>;
- };
-
- mcde@a0350000 {
- compatible = "ste,mcde";
- reg = <0xa0350000 0x1000>;
- interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
- epod-supply = <&db8500_b2r2_mcde_reg>;
- clocks = <&prcmu_clk PRCMU_MCDECLK>, /* Main MCDE clock */
- <&prcmu_clk PRCMU_LCDCLK>, /* LCD clock */
- <&prcmu_clk PRCMU_PLLDSI>; /* HDMI clock */
- clock-names = "mcde", "lcd", "hdmi";
- #address-cells = <1>;
- #size-cells = <1>;
- ranges;
- status = "disabled";
-
- dsi0: dsi@a0351000 {
- compatible = "ste,mcde-dsi";
- reg = <0xa0351000 0x1000>;
- clocks = <&prcmu_clk PRCMU_DSI0CLK>, <&prcmu_clk PRCMU_DSI0ESCCLK>;
- clock-names = "hs", "lp";
- #address-cells = <1>;
- #size-cells = <0>;
- };
- dsi1: dsi@a0352000 {
- compatible = "ste,mcde-dsi";
- reg = <0xa0352000 0x1000>;
- clocks = <&prcmu_clk PRCMU_DSI1CLK>, <&prcmu_clk PRCMU_DSI1ESCCLK>;
- clock-names = "hs", "lp";
- #address-cells = <1>;
- #size-cells = <0>;
- };
- dsi2: dsi@a0353000 {
- compatible = "ste,mcde-dsi";
- reg = <0xa0353000 0x1000>;
- /* This DSI port only has the Low Power / Energy Save clock */
- clocks = <&prcmu_clk PRCMU_DSI2ESCCLK>;
- clock-names = "lp";
- #address-cells = <1>;
- #size-cells = <0>;
- };
- };
-
- cryp@a03cb000 {
- compatible = "stericsson,ux500-cryp";
- reg = <0xa03cb000 0x1000>;
- interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
-
- v-ape-supply = <&db8500_vape_reg>;
- clocks = <&prcc_pclk 6 1>;
- };
-
- hash@a03c2000 {
- compatible = "stericsson,ux500-hash";
- reg = <0xa03c2000 0x1000>;
-
- v-ape-supply = <&db8500_vape_reg>;
- clocks = <&prcc_pclk 6 2>;
- };
- };
-};
diff --git a/arch/arm/dts/ste-ux500-samsung-stemmy.dts b/arch/arm/dts/ste-ux500-samsung-stemmy.dts
deleted file mode 100644
index 14be86086b22..000000000000
--- a/arch/arm/dts/ste-ux500-samsung-stemmy.dts
+++ /dev/null
@@ -1,36 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/dts-v1/;
-
-#include "ste-dbx5x0-u-boot.dtsi"
-#include "ste-ab8500.dtsi"
-
-/ {
- compatible = "samsung,stemmy", "st-ericsson,u8500";
-
- chosen {
- stdout-path = &serial2;
- };
-
- soc {
- /* eMMC */
- mmc@80005000 {
- status = "okay";
-
- arm,primecell-periphid = <0x10480180>;
- max-frequency = <100000000>;
- bus-width = <8>;
-
- non-removable;
- cap-mmc-highspeed;
- };
-
- /* Debugging console UART */
- uart@80007000 {
- status = "okay";
- };
-
- mcde@a0350000 {
- status = "okay";
- };
- };
-};
diff --git a/arch/arm/dts/u8500-u-boot.dtsi b/arch/arm/dts/u8500-u-boot.dtsi
new file mode 100644
index 000000000000..9b69b4fd257e
--- /dev/null
+++ b/arch/arm/dts/u8500-u-boot.dtsi
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/ {
+ /* FIXME: Remove this when the U8500 clock driver is implemented */
+ sdmmcclk: sdmmcclk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <100000000>;
+ };
+
+ soc {
+ mtu@a03c6000 {
+ clock-frequency = <133000000>;
+ };
+
+ mmc@80126000 {
+ clocks = <&sdmmcclk>;
+ };
+
+ mmc@80118000 {
+ status = "disabled";
+ };
+
+ mmc@80005000 {
+ clocks = <&sdmmcclk>;
+ /* U-Boot cannot handle switching the controller to DDR mode */
+ /delete-property/ mmc-ddr-1_8v;
+ };
+ };
+};
diff --git a/configs/stemmy_defconfig b/configs/stemmy_defconfig
index b1a14ab38210..c253780df2ef 100644
--- a/configs/stemmy_defconfig
+++ b/configs/stemmy_defconfig
@@ -11,7 +11,8 @@ CONFIG_SYS_MALLOC_F_LEN=0x400
CONFIG_NR_DRAM_BANKS=2
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000
-CONFIG_DEFAULT_DEVICE_TREE="ste-ux500-samsung-stemmy"
+CONFIG_DEFAULT_DEVICE_TREE="st/ste-ux500-samsung-janice"
+CONFIG_OF_UPSTREAM=y
CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_SYS_LOAD_ADDR=0x100000
CONFIG_BOOTSTD_FULL=y
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v5 10/13] arm: u8500: Switch Stemmy to upstream Janice device tree
2026-08-23 20:39 ` [PATCH v5 10/13] arm: u8500: Switch Stemmy to upstream Janice device tree Linus Walleij
@ 2026-08-24 13:55 ` Stephan Gerhold
2026-08-24 20:21 ` Linus Walleij
0 siblings, 1 reply; 26+ messages in thread
From: Stephan Gerhold @ 2026-08-24 13:55 UTC (permalink / raw)
To: Linus Walleij; +Cc: u-boot, Tom Rini, Stefan Hansson
On Sun, Aug 23, 2026 at 10:39:29PM +0200, Linus Walleij wrote:
> Use the upstream Samsung Janice device tree as the initial target for
> the Stemmy configuration. This also prepares the board to share the
> upstream Ux500 Samsung device trees with Linux.
>
> U-Boot does not yet implement the U8500 clock providers used by the
> upstream device tree. Add a U-Boot-specific overlay with the known MTU
> clock rate and fixed input clocks for the external SD and internal eMMC
> controllers. Remove the superseded downstream Stemmy and DBx500 device
> tree files, and disable the unused WLAN SDIO controller for U-Boot.
>
> Signed-off-by: Linus Walleij <linusw@kernel.org>
> ---
> arch/arm/dts/Makefile | 1 -
> arch/arm/dts/ste-dbx5x0-u-boot.dtsi | 38 -
> arch/arm/dts/ste-dbx5x0.dtsi | 1144 -----------------------------
> arch/arm/dts/ste-ux500-samsung-stemmy.dts | 36 -
> arch/arm/dts/u8500-u-boot.dtsi | 30 +
> configs/stemmy_defconfig | 3 +-
> 6 files changed, 32 insertions(+), 1220 deletions(-)
>
> [...]
> diff --git a/arch/arm/dts/ste-ux500-samsung-stemmy.dts b/arch/arm/dts/ste-ux500-samsung-stemmy.dts
> deleted file mode 100644
> index 14be86086b22..000000000000
> --- a/arch/arm/dts/ste-ux500-samsung-stemmy.dts
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0-or-later
> -/dts-v1/;
> -
> -#include "ste-dbx5x0-u-boot.dtsi"
> -#include "ste-ab8500.dtsi"
> -
> -/ {
> - compatible = "samsung,stemmy", "st-ericsson,u8500";
> -
> - chosen {
> - stdout-path = &serial2;
> - };
> -
> - soc {
> - /* eMMC */
> - mmc@80005000 {
> - status = "okay";
> -
> - arm,primecell-periphid = <0x10480180>;
> - max-frequency = <100000000>;
> - bus-width = <8>;
> -
> - non-removable;
> - cap-mmc-highspeed;
> - };
> -
> - /* Debugging console UART */
> - uart@80007000 {
> - status = "okay";
> - };
> -
> - mcde@a0350000 {
> - status = "okay";
> - };
> - };
> -};
> diff --git a/arch/arm/dts/u8500-u-boot.dtsi b/arch/arm/dts/u8500-u-boot.dtsi
> new file mode 100644
> index 000000000000..9b69b4fd257e
> --- /dev/null
> +++ b/arch/arm/dts/u8500-u-boot.dtsi
> @@ -0,0 +1,30 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +
> +/ {
> + /* FIXME: Remove this when the U8500 clock driver is implemented */
> + sdmmcclk: sdmmcclk {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <100000000>;
> + };
> +
> + soc {
> + mtu@a03c6000 {
> + clock-frequency = <133000000>;
> + };
> +
> + mmc@80126000 {
> + clocks = <&sdmmcclk>;
> + };
> +
> + mmc@80118000 {
> + status = "disabled";
> + };
Nitpick: Maybe you can add a comment here to explain this
/* Typically SDIO, unneeded in U-Boot */
Although long-term I think we should try to drop all of these overrides
and handle workarounds in the board code or drivers if necessary. With
EFI, some people may try to boot generic distro images that don't
override the DTB, in that case Linux will boot with the original U-Boot
DTB. E.g. arch/arm/mach-snapdragon/of_fixup.c has some DTB workarounds
that are applied only to U-Boot and then discarded when booting Linux
with the U-Boot DTB.
But that's something for a future patch series, not this one. :-)
Thanks,
Stephan
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [PATCH v5 10/13] arm: u8500: Switch Stemmy to upstream Janice device tree
2026-08-24 13:55 ` Stephan Gerhold
@ 2026-08-24 20:21 ` Linus Walleij
0 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2026-08-24 20:21 UTC (permalink / raw)
To: Stephan Gerhold; +Cc: u-boot, Tom Rini, Stefan Hansson
On Mon, Aug 24, 2026 at 3:55 PM Stephan Gerhold
<stephan.gerhold@linaro.org> wrote:
> > + mmc@80118000 {
> > + status = "disabled";
> > + };
>
> Nitpick: Maybe you can add a comment here to explain this
>
> /* Typically SDIO, unneeded in U-Boot */
OK!
> Although long-term I think we should try to drop all of these overrides
> and handle workarounds in the board code or drivers if necessary. With
> EFI, some people may try to boot generic distro images that don't
> override the DTB, in that case Linux will boot with the original U-Boot
> DTB. E.g. arch/arm/mach-snapdragon/of_fixup.c has some DTB workarounds
> that are applied only to U-Boot and then discarded when booting Linux
> with the U-Boot DTB.
>
> But that's something for a future patch series, not this one. :-)
Hm yeah Ux500 ARMv7 is a bit fringe but I guess it could be done.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH v5 11/13] ARM: dts: ux500: Make panel regulators have unique names
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
` (9 preceding siblings ...)
2026-08-23 20:39 ` [PATCH v5 10/13] arm: u8500: Switch Stemmy to upstream Janice device tree Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-23 20:39 ` [PATCH v5 12/13] ARM: dts: ux500: Harmonize GPIO key names Linus Walleij
2026-08-23 20:39 ` [PATCH v5 13/13] arm: u8500: Package Stemmy device trees in FIT Linus Walleij
12 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
U-Boot is not happy about regulators with the same name though
Linux can deal with it. Make the names unique, it's more elegant.
Link: https://lore.kernel.org/u-boot/20260817-ux500-external-sdcard-v2-8-ca9a110bd9c6@kernel.org/
Signed-off-by: Linus Walleij <linusw@kernel.org>
[ upstream commit: ..... ]
(cherry picked from commit .....)
---
dts/upstream/src/arm/st/ste-ux500-samsung-golden.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dts/upstream/src/arm/st/ste-ux500-samsung-golden.dts b/dts/upstream/src/arm/st/ste-ux500-samsung-golden.dts
index f736888474e7..d4f364ec8685 100644
--- a/dts/upstream/src/arm/st/ste-ux500-samsung-golden.dts
+++ b/dts/upstream/src/arm/st/ste-ux500-samsung-golden.dts
@@ -510,7 +510,7 @@
panel_reg_1v8: regulator-panel-1v8 {
compatible = "regulator-fixed";
- regulator-name = "panel-fixed-supply";
+ regulator-name = "panel-fixed-supply-1v8";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
/* GPIO219 */
@@ -527,7 +527,7 @@
panel_reg_3v0: regulator-panel-3v0 {
compatible = "regulator-fixed";
- regulator-name = "panel-fixed-supply";
+ regulator-name = "panel-fixed-supply-3v0";
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3000000>;
/* GPIO219 */
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* [PATCH v5 12/13] ARM: dts: ux500: Harmonize GPIO key names
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
` (10 preceding siblings ...)
2026-08-23 20:39 ` [PATCH v5 11/13] ARM: dts: ux500: Make panel regulators have unique names Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-23 20:39 ` [PATCH v5 13/13] arm: u8500: Package Stemmy device trees in FIT Linus Walleij
12 siblings, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
U-Boot want to use the volume down key for activating fastboot mode,
however the code there relies on using the key label, and this
differs betweem Golden and the other devices, so harmonize this
by using the same label as the other devices.
Signed-off-by: Linus Walleij <linusw@kernel.org>
[ upstream commit: ..... ]
(cherry picked from commit .....)
---
dts/upstream/src/arm/st/ste-ux500-samsung-golden.dts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dts/upstream/src/arm/st/ste-ux500-samsung-golden.dts b/dts/upstream/src/arm/st/ste-ux500-samsung-golden.dts
index d4f364ec8685..1bb667300ed3 100644
--- a/dts/upstream/src/arm/st/ste-ux500-samsung-golden.dts
+++ b/dts/upstream/src/arm/st/ste-ux500-samsung-golden.dts
@@ -391,21 +391,21 @@
label = "GPIO Buttons";
volume-up {
- label = "Volume Up";
+ label = "VOL+";
/* GPIO67 (VOL_UP) */
gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEUP>;
};
volume-down {
- label = "Volume Down";
+ label = "VOL-";
/* GPIO92 (VOL_DOWN) */
gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
linux,code = <KEY_VOLUMEDOWN>;
};
home {
- label = "Home";
+ label = "HOME";
/* GPIO91 (HOME_KEY) */
gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
linux,code = <KEY_HOMEPAGE>;
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* [PATCH v5 13/13] arm: u8500: Package Stemmy device trees in FIT
2026-08-23 20:39 [PATCH v5 00/13] arm: u8500: Enable upstream DT based SD card boot Linus Walleij
` (11 preceding siblings ...)
2026-08-23 20:39 ` [PATCH v5 12/13] ARM: dts: ux500: Harmonize GPIO key names Linus Walleij
@ 2026-08-23 20:39 ` Linus Walleij
2026-08-24 13:59 ` Stephan Gerhold
12 siblings, 1 reply; 26+ messages in thread
From: Linus Walleij @ 2026-08-23 20:39 UTC (permalink / raw)
To: u-boot, Tom Rini, Stefan Hansson, Stephan Gerhold; +Cc: Linus Walleij
Build all seven supported Samsung Ux500 device trees into the FIT
appended to U-Boot. Select the appropriate configuration at runtime
from the machine ID passed by the Samsung firmware. Codina and Codina
TMO share a machine ID, so distinguish Codina TMO by its board ID.
Keep a Kconfig default for the generic multi-DTB build dependency, but
remove it from the defconfig since the board selection is now dynamic.
Print the firmware machine and board IDs to aid diagnostics and future
machine ID mappings.
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
arch/arm/Kconfig | 1 +
board/ste/stemmy/Kconfig | 6 ++++
board/ste/stemmy/stemmy.c | 77 ++++++++++++++++++++++++++++++++++++++++++++---
configs/stemmy_defconfig | 1 -
4 files changed, 79 insertions(+), 6 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 2a01ac9b7675..8e697b87d50f 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1278,6 +1278,7 @@ config ARCH_U8500
imply DM_REGULATOR
imply DM_REGULATOR_FIXED
imply DM_RTC
+ imply MULTI_DTB_FIT
imply NOMADIK_GPIO
imply NOMADIK_MTU_TIMER
imply PINCTRL
diff --git a/board/ste/stemmy/Kconfig b/board/ste/stemmy/Kconfig
index b890ba51cb03..e891ddf9f8b2 100644
--- a/board/ste/stemmy/Kconfig
+++ b/board/ste/stemmy/Kconfig
@@ -9,4 +9,10 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "stemmy"
+config DEFAULT_DEVICE_TREE
+ default "st/ste-ux500-samsung-janice"
+
+config OF_LIST
+ default "st/ste-ux500-samsung-codina st/ste-ux500-samsung-codina-tmo st/ste-ux500-samsung-gavini st/ste-ux500-samsung-golden st/ste-ux500-samsung-janice st/ste-ux500-samsung-kyle st/ste-ux500-samsung-skomer"
+
endif
diff --git a/board/ste/stemmy/stemmy.c b/board/ste/stemmy/stemmy.c
index 66330184af86..8526deeb29bc 100644
--- a/board/ste/stemmy/stemmy.c
+++ b/board/ste/stemmy/stemmy.c
@@ -21,6 +21,11 @@ static ulong fw_atags __section(".data");
static const struct tag *fw_atags_copy;
static uint fw_atags_size;
+#define SBL_BOARD "board_id="
+#define SBL_LCDTYPE "lcdtype="
+static ulong board_id;
+static ulong lcdtype;
+
void save_boot_params(ulong r0, ulong r1, ulong r2, ulong r3)
{
fw_mach = r1;
@@ -40,6 +45,70 @@ static const struct tag *fw_atags_get(void)
return tags;
}
+static ulong fw_board_id_get(void)
+{
+ const struct tag *t, *tags = fw_atags_get();
+ const char *str;
+
+ if (!tags)
+ return 0;
+
+ for_each_tag(t, tags) {
+ if (t->hdr.tag != ATAG_CMDLINE)
+ continue;
+
+ str = strstr(t->u.cmdline.cmdline, SBL_BOARD);
+ if (str)
+ return simple_strtoul(str + strlen(SBL_BOARD), NULL, 10);
+ }
+
+ return 0;
+}
+
+int board_fit_config_name_match(const char *name)
+{
+ const char *dt_name;
+
+ switch (fw_mach) {
+ case 5000:
+ dt_name = "ste-ux500-samsung-janice";
+ break;
+ case 3296:
+ case 5002:
+ dt_name = "ste-ux500-samsung-gavini";
+ break;
+ case 5003:
+ switch (fw_board_id_get()) {
+ case 0x101:
+ case 0x102:
+ case 0x103:
+ case 0x104:
+ case 0x105:
+ case 0x106:
+ case 0x107:
+ dt_name = "ste-ux500-samsung-codina-tmo";
+ break;
+ default:
+ dt_name = "ste-ux500-samsung-codina";
+ break;
+ }
+ break;
+ case 5006:
+ dt_name = "ste-ux500-samsung-kyle";
+ break;
+ case 5008:
+ dt_name = "ste-ux500-samsung-golden";
+ break;
+ case 5009:
+ dt_name = "ste-ux500-samsung-skomer";
+ break;
+ default:
+ return -ENOENT;
+ }
+
+ return strcmp(name, dt_name);
+}
+
int dram_init(void)
{
const struct tag *t, *tags = fw_atags_get();
@@ -96,11 +165,6 @@ static void parse_serial(const struct tag_serialnr *serialnr)
env_set("serial#", serial);
}
-#define SBL_BOARD "board_id="
-#define SBL_LCDTYPE "lcdtype="
-static ulong board_id = 0;
-static ulong lcdtype = 0;
-
static void parse_cmdline(const struct tag_cmdline *cmdline)
{
char *buf;
@@ -181,6 +245,9 @@ static void copy_atags(const struct tag *tags)
int misc_init_r(void)
{
copy_atags(fw_atags_get());
+ printf("Firmware machine ID: %lu, board ID: %lu\n",
+ fw_mach, board_id);
+
return 0;
}
diff --git a/configs/stemmy_defconfig b/configs/stemmy_defconfig
index c253780df2ef..cc458befda42 100644
--- a/configs/stemmy_defconfig
+++ b/configs/stemmy_defconfig
@@ -11,7 +11,6 @@ CONFIG_SYS_MALLOC_F_LEN=0x400
CONFIG_NR_DRAM_BANKS=2
CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000
-CONFIG_DEFAULT_DEVICE_TREE="st/ste-ux500-samsung-janice"
CONFIG_OF_UPSTREAM=y
CONFIG_SYS_BOOTM_LEN=0x4000000
CONFIG_SYS_LOAD_ADDR=0x100000
--
2.55.0
^ permalink raw reply related [flat|nested] 26+ messages in thread* Re: [PATCH v5 13/13] arm: u8500: Package Stemmy device trees in FIT
2026-08-23 20:39 ` [PATCH v5 13/13] arm: u8500: Package Stemmy device trees in FIT Linus Walleij
@ 2026-08-24 13:59 ` Stephan Gerhold
0 siblings, 0 replies; 26+ messages in thread
From: Stephan Gerhold @ 2026-08-24 13:59 UTC (permalink / raw)
To: Linus Walleij; +Cc: u-boot, Tom Rini, Stefan Hansson
On Sun, Aug 23, 2026 at 10:39:32PM +0200, Linus Walleij wrote:
> Build all seven supported Samsung Ux500 device trees into the FIT
> appended to U-Boot. Select the appropriate configuration at runtime
> from the machine ID passed by the Samsung firmware. Codina and Codina
> TMO share a machine ID, so distinguish Codina TMO by its board ID.
>
> Keep a Kconfig default for the generic multi-DTB build dependency, but
> remove it from the defconfig since the board selection is now dynamic.
> Print the firmware machine and board IDs to aid diagnostics and future
> machine ID mappings.
>
> Signed-off-by: Linus Walleij <linusw@kernel.org>
Yes! This is great, thanks :)
> ---
> arch/arm/Kconfig | 1 +
> board/ste/stemmy/Kconfig | 6 ++++
> board/ste/stemmy/stemmy.c | 77 ++++++++++++++++++++++++++++++++++++++++++++---
> configs/stemmy_defconfig | 1 -
> 4 files changed, 79 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 2a01ac9b7675..8e697b87d50f 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1278,6 +1278,7 @@ config ARCH_U8500
> imply DM_REGULATOR
> imply DM_REGULATOR_FIXED
> imply DM_RTC
> + imply MULTI_DTB_FIT
> imply NOMADIK_GPIO
> imply NOMADIK_MTU_TIMER
> imply PINCTRL
It's a bit weird to have this in ARCH_U8500 since there may be other
(non-Samsung) U8500 boards who couldn't use MULTI_DTB_FIT.
Can you put this into stemmy_defconfig?
> diff --git a/board/ste/stemmy/Kconfig b/board/ste/stemmy/Kconfig
> index b890ba51cb03..e891ddf9f8b2 100644
> --- a/board/ste/stemmy/Kconfig
> +++ b/board/ste/stemmy/Kconfig
> @@ -9,4 +9,10 @@ config SYS_VENDOR
> config SYS_CONFIG_NAME
> default "stemmy"
>
> +config DEFAULT_DEVICE_TREE
> + default "st/ste-ux500-samsung-janice"
> +
> +config OF_LIST
> + default "st/ste-ux500-samsung-codina st/ste-ux500-samsung-codina-tmo st/ste-ux500-samsung-gavini st/ste-ux500-samsung-golden st/ste-ux500-samsung-janice st/ste-ux500-samsung-kyle st/ste-ux500-samsung-skomer"
> +
> endif
I don't mind adding this here, but I'm also not sure if there is any
advantage compared to adding this directly in stemmy_defconfig?
Thanks,
Stephan
^ permalink raw reply [flat|nested] 26+ messages in thread