¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io
Date   
[PATCH 2/2] configs: meson64_android: Remove dtbo support 2
The device tree overlays are not part of the Android Common Kernel code [1] Historically, they existed to enable some Android specific features but they have been removed. Remove the dtbos logic since these files do no longer exist. [1] https://android.googlesource.com/kernel/common/+/ac2ea0bb91a3b5f5e71eba66c441e58beca6767e/arch/arm64/boot/dts/amlogic/ Signed-off-by: Mattijs Korpershoek <mkorpershoek@...> --- include/configs/meson64_android.h | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/include/configs/meson64_android.h b/include/configs/meson64_android.h index c0e977abb01f..fa520265800c 100644 --- a/include/configs/meson64_android.h +++ b/include/configs/meson64_android.h @@ -116,31 +116,7 @@ "fi; " \ "abootimg get dtb --index=$dtb_index dtb_start dtb_size; " \ "cp.b $dtb_start $fdt_addr_r $dtb_size; " \ - "fdt addr $fdt_addr_r 0x80000; " \ - "if test $board_name = sei510; then " \ - "echo \" Reading DTBO for sei510...\"; " \ - "setenv dtbo_index 0;" \ - "elif test $board_name = sei610; then " \ - "echo \" Reading DTBO for sei610...\"; " \ - "setenv dtbo_index 1;" \ - "elif test $board_name = vim3l; then " \ - "echo \" Reading DTBO for vim3l...\"; " \ - "setenv dtbo_index 2;" \ - "elif test $board_name = vim3; then " \ - "echo \" Reading DTBO for vim3...\"; " \ - "setenv dtbo_index 3;" \ - "else " \ - "echo Error: Android boot is not supported for $board_name; " \ - "exit; " \ - "fi; " \ - "part start mmc ${mmcdev} dtbo${slot_suffix} p_dtbo_start; " \ - "part size mmc ${mmcdev} dtbo${slot_suffix} p_dtbo_size; " \ - "mmc read ${dtboaddr} ${p_dtbo_start} ${p_dtbo_size}; " \ - "echo \" Applying DTBOs...\"; " \ - "adtimg addr $dtboaddr; " \ - "adtimg get dt --index=$dtbo_index dtbo0_addr; " \ - "fdt apply $dtbo0_addr;" \ - "setenv bootargs \"$bootargs androidboot.dtbo_idx=$dtbo_index \";"\ + "fdt addr $fdt_addr_r 0x80000; " #define BOOT_CMD "bootm ${loadaddr} ${loadaddr} ${fdt_addr_r};" -- 2.46.2
Started by Mattijs Korpershoek @ · Most recent @
[PATCH 0/2] ARM: mach-meson: fix HDMI since DT update to v6.11 2
The DT was updated with unhandled clocks and a shared power domain, causing a probe failure and a green output. Add the missing clocks and avoid enabling a power domain twice. Signed-off-by: Neil Armstrong <neil.armstrong@...> --- Neil Armstrong (2): clk: meson: gxbb: add HDMI clocks power/domain: meson-ee-pwrc: make sure to not enable a domain twice drivers/clk/meson/gxbb.c | 50 +++++++++++++++++++++++++++++++++++- drivers/power/domain/meson-ee-pwrc.c | 15 +++++++++-- 2 files changed, 62 insertions(+), 3 deletions(-) --- base-commit: 28dc47038edc4e93f32d75a357131bcf01a18d85 change-id: 20241009-u-boot-topic-fix-hdmi-bb39cd876446 Best regards, -- Neil Armstrong <neil.armstrong@...>
Started by Neil Armstrong @ · Most recent @
[PATCH v2] video: meson: dw-hdmi: do not fail probe if HDMI regulator is already enabled 2
If the regulator is already enabled, this happens if the regulator is set in regulator-always-on, regulator_set_enable() return -EALREADY. Ignore the -EALREADY return since it's not an error. Suggested-by: Jonas Karlman <jonas@...> Signed-off-by: Neil Armstrong <neil.armstrong@...> --- Changes in v2: - Switch to regulator_set_enable_if_allowed thanks to Jonas's suggestion - Link to v1: https://lore.kernel.org/r/20241008-u-boot-video-fix-hdmi-supply-already-on-v1-1-3a12c73ff3f1@... --- drivers/video/meson/meson_dw_hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/meson/meson_dw_hdmi.c b/drivers/video/meson/meson_dw_hdmi.c index 587df7beb9b..1631dc38416 100644 --- a/drivers/video/meson/meson_dw_hdmi.c +++ b/drivers/video/meson/meson_dw_hdmi.c @@ -418,8 +418,8 @@ static int meson_dw_hdmi_probe(struct udevice *dev) } if (!ret) { - ret = regulator_set_enable(supply, true); - if (ret) + ret = regulator_set_enable_if_allowed(supply, true); + if (ret && ret != -ENOSYS) return ret; } #endif --- base-commit: 28dc47038edc4e93f32d75a357131bcf01a18d85 change-id: 20241008-u-boot-video-fix-hdmi-supply-already-on-e6a9af27b1eb Best regards, -- Neil Armstrong <neil.armstrong@...>
Started by Neil Armstrong @ · Most recent @
[PATCH] dts: meson-g12-common-u-boot: do not disable canvas 2
We were disabling canvas, which causes meson vpu probe failure, just stop and leave canvas alone. Fixes: ce9fa7bffc5 ("ARM: dts: meson-g12a: add U-Boot specific DT for graphics") Signed-off-by: Neil Armstrong <neil.armstrong@...> --- arch/arm/dts/meson-g12-common-u-boot.dtsi | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm/dts/meson-g12-common-u-boot.dtsi b/arch/arm/dts/meson-g12-common-u-boot.dtsi index 8070b62af5b..6629f3256a8 100644 --- a/arch/arm/dts/meson-g12-common-u-boot.dtsi +++ b/arch/arm/dts/meson-g12-common-u-boot.dtsi @@ -17,10 +17,6 @@ }; }; -&canvas { - status = "disabled"; -}; - &vpu { reg = <0x0 0xff900000 0x0 0x100000>, <0x0 0xff63c000 0x0 0x1000>, --- base-commit: 28dc47038edc4e93f32d75a357131bcf01a18d85 change-id: 20241008-u-boot-topic-g12-do-not-disable-canvas-ece09f18ebaf Best regards, -- Neil Armstrong <neil.armstrong@...>
Started by Neil Armstrong @ · Most recent @
[PATCH 1/2] clk: meson: gxbb: add HDMI clocks
Align with g12a driver to handle the CLKID_HDMI, CLKID_HDMI_SEL and CLKID_HDMI_DIV clocks since they were added to the upstream GXBB/GXL Devicetree on v6.11 with [1] [1] https://lore.kernel.org/all/20240626152733.1350376-1-jbrunet@.../ Signed-off-by: Neil Armstrong <neil.armstrong@...> --- drivers/clk/meson/gxbb.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 72ad4fd0e85..51f124869c9 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -66,6 +66,8 @@ #define CLKID_VDEC_HEVC_SEL 154 #define CLKID_VDEC_HEVC_DIV 155 +#define CLKID_XTAL 0x10000000 + #define XTAL_RATE 24000000 struct meson_clk { @@ -192,6 +194,7 @@ static struct meson_gate gates[] = { MESON_GATE(CLKID_VAPB_0, HHI_VAPBCLK_CNTL, 8), MESON_GATE(CLKID_VAPB_1, HHI_VAPBCLK_CNTL, 24), MESON_GATE(CLKID_VAPB, HHI_VAPBCLK_CNTL, 30), + MESON_GATE(CLKID_HDMI, HHI_HDMI_CLK_CNTL, 8), }; static int meson_set_gate_by_id(struct clk *clk, unsigned long id, bool on) @@ -267,6 +270,12 @@ static struct parm meson_vapb_1_div_parm = { int meson_vapb_1_div_parent = CLKID_VAPB_1_SEL; +static struct parm meson_hdmi_div_parm = { + HHI_HDMI_CLK_CNTL, 0, 7, +}; + +int meson_hdmi_div_parent = CLKID_HDMI_SEL; + static ulong meson_div_get_rate(struct clk *clk, unsigned long id) { struct meson_clk *priv = dev_get_priv(clk->dev); @@ -292,6 +301,10 @@ static ulong meson_div_get_rate(struct clk *clk, unsigned long id) parm = &meson_vapb_1_div_parm; parent = meson_vapb_1_div_parent; break; + case CLKID_HDMI_DIV: + parm = &meson_hdmi_div_parm; + parent = meson_hdmi_div_parent; + break; default: return -ENOENT; } @@ -347,6 +360,10 @@ static ulong meson_div_set_rate(struct clk *clk, unsigned long id, ulong rate, parm = &meson_vapb_1_div_parm; parent = meson_vapb_1_div_parent; break; + case CLKID_HDMI_DIV: + parm = &meson_hdmi_div_parm; + parent = meson_hdmi_div_parent; + break; default: return -ENOENT; } @@ -443,6 +460,17 @@ static int meson_vapb_0_1_mux_parents[] = { CLKID_FCLK_DIV7, }; +static struct parm meson_hdmi_mux_parm = { + HHI_HDMI_CLK_CNTL, 9, 2, +}; + +static int meson_hdmi_mux_parents[] = { + CLKID_XTAL, + CLKID_FCLK_DIV4, + CLKID_FCLK_DIV3, + CLKID_FCLK_DIV5, +}; + static ulong meson_mux_get_parent(struct clk *clk, unsigned long id) { struct meson_clk *priv = dev_get_priv(clk->dev); @@ -475,6 +503,10 @@ static ulong meson_mux_get_parent(struct clk *clk, unsigned long id) parm = &meson_vapb_1_mux_parm; parents = meson_vapb_0_1_mux_parents; break; + case CLKID_HDMI_SEL: + parm = &meson_hdmi_mux_parm; + parents = meson_hdmi_mux_parents; + break; default: return -ENOENT; } @@ -532,6 +564,10 @@ static ulong meson_mux_set_parent(struct clk *clk, unsigned long id, parm = &meson_vapb_1_mux_parm; parents = meson_vapb_0_1_mux_parents; break; + case CLKID_HDMI_SEL: + parm = &meson_hdmi_mux_parm; + parents = meson_hdmi_mux_parents; + break; default: /* Not a mux */ return -ENOENT; @@ -572,7 +608,7 @@ static unsigned long meson_clk81_get_rate(struct clk *clk) unsigned long parent_rate; uint reg; int parents[] = { - -1, + CLKID_XTAL, -1, CLKID_FCLK_DIV7, CLKID_MPLL1, @@ -727,6 +763,9 @@ static ulong meson_clk_get_rate_by_id(struct clk *clk, unsigned long id) ulong rate; switch (id) { + case CLKID_XTAL: + rate = XTAL_RATE; + break; case CLKID_FIXED_PLL: case CLKID_SYS_PLL: rate = meson_pll_get_rate(clk, id); @@ -769,10 +808,14 @@ static ulong meson_clk_get_rate_by_id(struct clk *clk, unsigned long id) case CLKID_VAPB_1: rate = meson_div_get_rate(clk, CLKID_VAPB_1_DIV); break; + case CLKID_HDMI: + rate = meson_div_get_rate(clk, CLKID_HDMI_DIV); + break; case CLKID_VPU_0_DIV: case CLKID_VPU_1_DIV: case CLKID_VAPB_0_DIV: case CLKID_VAPB_1_DIV: + case CLKID_HDMI_DIV: rate = meson_div_get_rate(clk, id); break; case CLKID_VPU: @@ -781,6 +824,7 @@ static ulong meson_clk_get_rate_by_id(struct clk *clk, unsigned long id) case CLKID_VAPB_SEL: case CLKID_VAPB_0_SEL: case CLKID_VAPB_1_SEL: + case CLKID_HDMI_SEL: rate = meson_mux_get_rate(clk, id); break; default: @@ -
Started by Neil Armstrong @
[PATCH v3 1/4] power: regulator: Trigger probe of regulators which are always-on or boot-on 2
In case a regulator DT node contains regulator-always-on or regulator-boo= t-on property, make sure the regulator gets correctly configured by U-Boot on = start up. Unconditionally probe such regulator drivers. This is a preparatory p= atch for introduction of .regulator_post_probe() which would trigger the regul= ator configuration. Parsing of regulator-always-on and regulator-boot-on DT property has been moved to regulator_post_bind() as the information is required early, the rest of the DT parsing has been kept in regulator_pre_probe() to avoid slowing down the boot process. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Kostya Porotchkin <kostap@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: [email protected] Cc: [email protected] Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- V2: - Rebase on current u-boot/next - Update test cases to handle already started regulators correctly V3: - Fix conditional around DM_FLAG_PROBE_AFTER_BIND to ORR --- drivers/power/regulator/regulator-uclass.c | 22 +++++++++++++++------- test/dm/panel.c | 2 +- test/dm/regulator.c | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/r= egulator/regulator-uclass.c index 00922900292..1a970004540 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -439,6 +439,8 @@ static int regulator_post_bind(struct udevice *dev) const char *property =3D "regulator-name"; =20 uc_pdata =3D dev_get_uclass_plat(dev); + uc_pdata->always_on =3D dev_read_bool(dev, "regulator-always-on"); + uc_pdata->boot_on =3D dev_read_bool(dev, "regulator-boot-on"); =20 /* Regulator's mandatory constraint */ uc_pdata->name =3D dev_read_string(dev, property); @@ -450,13 +452,21 @@ static int regulator_post_bind(struct udevice *dev) return -EINVAL; } =20 - if (regulator_name_is_unique(dev, uc_pdata->name)) - return 0; + if (!regulator_name_is_unique(dev, uc_pdata->name)) { + debug("'%s' of dev: '%s', has nonunique value: '%s\n", + property, dev->name, uc_pdata->name); + return -EINVAL; + } =20 - debug("'%s' of dev: '%s', has nonunique value: '%s\n", - property, dev->name, uc_pdata->name); + /* + * In case the regulator has regulator-always-on or + * regulator-boot-on DT property, trigger probe() to + * configure its default state during startup. + */ + if (uc_pdata->always_on || uc_pdata->boot_on) + dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND); =20 - return -EINVAL; + return 0; } =20 static int regulator_pre_probe(struct udevice *dev) @@ -479,8 +489,6 @@ static int regulator_pre_probe(struct udevice *dev) -ENODATA); uc_pdata->max_uA =3D dev_read_u32_default(dev, "regulator-max-microamp"= , -ENODATA); - uc_pdata->always_on =3D dev_read_bool(dev, "regulator-always-on"); - uc_pdata->boot_on =3D dev_read_bool(dev, "regulator-boot-on"); uc_pdata->ramp_delay =3D dev_read_u32_default(dev, "regulator-ramp-dela= y", 0); uc_pdata->force_off =3D dev_read_bool(dev, "regulator-force-boot-off"); diff --git a/test/dm/panel.c b/test/dm/panel.c index ce835c96ed0..ec85a9b1e6e 100644 --- a/test/dm/panel.c +++ b/test/dm/panel.c @@ -33,7 +33,7 @@ static int dm_test_pane
Started by Marek Vasut @ · Most recent @
[PATCH 00/26] Support display (and even more) on the BSH SMM S2/PRO boards 3
This series was created out of the need to supportsimple-framebuffer for BSH boards SMM_S2 and SMM_S2PRO. To achieve this goal, it was necessary to develop additional code and/or drivers for all the required components (i. e. clock, power domain, video, etc.). This series has a Linux counterpart that will also be submitted upstream as soon as possible. Furthermore, given the overlap in topics with the recent series [1], we are open to collaborate on the common parts to ensure proper development. [1] https://lore.kernel.org/all/20240910101344.110633-1-miquel.raynal@.../T/#mb7cd440abc6fcc0de205f577eb3225e1c1c76823 Dario Binacchi (6): boot: fdt_simplefb: add a debug message video: mxsfb: support simple frame-buffer video: bridge: samsung: support simple frame-buffer imx8mn_bsh_smm_s2/pro: support simple frame-buffer imx8mn_bsh_smm_s2/pro: enable simple frame-buffer imx8mn_bsh_smm_s2/pro: add splash screen with BSH logo Michael Trimarchi (20): clk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present for gate and mux clk: imx8mn: Prevent clock critical path from disabling during reparent and set_rate clk: imx8mm: Prevent clock critical path from disabling during reparent and set_rate clk: clk-uclass: Implement CLK_OPS_PARENT_ENABLE clk: imx8mm: Mark IMX8MM_SYS_PLL2 and IMX8MM_SYS_PLL3 as enabled clk: imx8mn: Mark IMX8MN_SYS_PLL2 and IMX8MN_SYS_PLL3 as enabled clk: imx8mn: add video clocks support power: Add iMX8M block ctrl driver for dispmix video: Add video link framework video: bridge: Add check_timing interface video: dsi_host: add disable host interface video: Update mxsfb video drivers for iMX8MM/iMX8MN display video: Enable DM_UC_FLAG_SEQ_ALIAS for display and bridge phy: dphy: add support to calculate the timing based on hs_clk_rate phy: dphy: Correct lpx parameter and its derivatives(ta_{get,go,sure}) phy: dphy: Correct clk_pre parameter lib: div64: sync with Linux video: bridge: Add Samsung DSIM bridge video: Add Synaptics R63353 panel driver imx8mn_bsh_smm_s2/pro: Enable display on reference design .../dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi | 23 + board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c | 99 ++ boot/fdt_simplefb.c | 2 + common/stdio.c | 4 + configs/imx8mn_bsh_smm_s2_defconfig | 21 + configs/imx8mn_bsh_smm_s2pro_defconfig | 21 + drivers/clk/clk-gate.c | 1 + drivers/clk/clk-mux.c | 2 +- drivers/clk/clk-uclass.c | 67 +- drivers/clk/clk.c | 9 + drivers/clk/imx/clk-imx8mm.c | 73 +- drivers/clk/imx/clk-imx8mn.c | 131 +- drivers/phy/meson-axg-mipi-dphy.c | 2 +- drivers/phy/phy-core-mipi-dphy.c | 36 +- drivers/power/domain/Kconfig | 6 + drivers/power/domain/Makefile | 1 + drivers/power/domain/imx8m-blk-ctrl.c | 438 +++++ drivers/power/domain/imx8m-power-domain.c | 213 ++- drivers/video/Kconfig | 14 + drivers/video/Makefile | 2 + drivers/video/bridge/Kconfig | 13 + drivers/video/bridge/Makefile | 1 + drivers/video/bridge/samsung-dsi-host.c | 1576 +++++++++++++++++ drivers/video/bridge/samsung-dsim.c | 151 ++ drivers/video/bridge/samsung-dsim.h | 20 + drivers/video/bridge/video-bridge-uclass.c | 11 + drivers/video/display-uclass.c | 1 + drivers/video/dsi-host-uclass.c | 10 + drivers/video/mxsfb.c | 144 +- drivers/video/synaptics-r63353.c | 228 +++ drivers/video/video_link.c | 529 ++++++ include/clk.h | 9 + include/configs/imx8mn_bsh_smm_s2.h | 1 + include/configs/imx8mn_bsh_smm_s2_common.h | 4 + include/configs/imx8mn_bsh_smm_s2pro.h | 1 + include/dsi_host.h | 8 + include/linux/clk-provider.h | 1 + include/linux/math64.h | 110 ++ include/phy-mipi-dphy.h | 3 + include/video_bridge.h | 20 + include/video_link.h | 19 + tools/logos/bsh.bmp | Bin 0 -> 10644 bytes 42 files changed, 3942 insertions(+), 83 deletions(-) create mode 100644 drivers/power/domain/imx8m-blk-ctrl.c create mode 100644 drivers/video/bridge/samsung-dsi-host.c create mode 100644 drivers/video/bridge/samsung-dsim.c create mode 100644 drivers/video/bridge/samsung-dsim.h create mode 100644 drivers/video/synaptics-r63353.c create mode 100644 drivers/video/video_link.c create mode 100644 include/video_link.h create mode 100644 tools/logos/bsh.bmp -- 2.43.0
Started by Dario Binacchi @ · Most recent @
[PATCH 0/2] board: libre-computer: Add support for Libre Computer aml-a311d-cc & aml-s905d3-cc boards 2
Add support for the Libre Computer aml-a311d-cc "Alta" & aml-s905d3-cc "Solitude" boards: https://libre.computer/products/aml-a311d-cc/ https://libre.computer/products/aml-s905d3-cc/ The Alta & Solitude boards have a Credit Card form factor, similar to the the previous "Le Potato" card, but with the Amlogic A311D or S903D3 SoCS, MIPI DSI and CSI connectors. PoE header and a single USB2 Type-C connector replacing the microUSB one for power and USB 2.0. The boards have an embedded SPI NOR flash, and EFI Capsule support is added. Signed-off-by: Neil Armstrong <neil.armstrong@...> --- Neil Armstrong (2): ARM: meson: add support for Libre Computer aml-a311d-cc ARM: meson: add support for Libre Computer aml-s905d3-cc .../dts/meson-g12b-a311d-libretech-cc-u-boot.dtsi | 15 +++ .../dts/meson-sm1-s905d3-libretech-cc-u-boot.dtsi | 15 +++ board/libre-computer/aml-a311d-cc/MAINTAINERS | 7 ++ board/libre-computer/aml-a311d-cc/Makefile | 6 ++ board/libre-computer/aml-a311d-cc/aml-a311d-cc.c | 44 +++++++++ board/libre-computer/aml-s905d3-cc/MAINTAINERS | 7 ++ board/libre-computer/aml-s905d3-cc/Makefile | 6 ++ board/libre-computer/aml-s905d3-cc/aml-s905d3-cc.c | 44 +++++++++ configs/aml-a311d-cc_defconfig | 108 +++++++++++++++++++++ configs/aml-s905d3-cc_defconfig | 108 +++++++++++++++++++++ doc/board/amlogic/aml-a311d-cc.rst | 46 +++++++++ doc/board/amlogic/aml-s905d3-cc.rst | 46 +++++++++ doc/board/amlogic/index.rst | 2 + 13 files changed, 454 insertions(+) --- base-commit: 13fd7a17858e5f2555a1d68e4afa75fceda0dac0 change-id: 20240920-u-boot-topic-libre-computer-solitude-alta-c3b22cbd16df Best regards, -- Neil Armstrong <neil.armstrong@...>
Started by Neil Armstrong @ · Most recent @
[PATCH v2 0/2] ARM: meson: libretech-ac: add support for EFI Capsules Update 2
The necessary changes were made in U-Boot to easily support EFI Capsules Update and be compliant with Arm SystemReady IR. Let's add support for the libretech-ac/AML-S805X-CC since it's an easy well-supported target having a dedicated SPI Flash to store U-Boot. Signed-off-by: Neil Armstrong <neil.armstrong@...> --- Changes in v2: - Add set_dfu_alt_info() + CONFIG_SET_DFU_ALT_INFO to support both RAM and SF DFU backend - Fix typo in cover letter and commit message - Link to v1: https://lore.kernel.org/r/20240916-u-boot-topic-dynamic-uuid-v1-0-7e4f48542a0f@... --- Neil Armstrong (2): board: libretech-ac: move board support into dedicated directory board: libre-computer: aml-s805x-cc: Enable capsule updates board/amlogic/p212/MAINTAINERS | 2 - board/libre-computer/aml-s805x-ac/MAINTAINERS | 8 +++ board/libre-computer/aml-s805x-ac/Makefile | 6 ++ board/libre-computer/aml-s805x-ac/aml-s805x-ac.c | 71 ++++++++++++++++++++++++ configs/libretech-ac_defconfig | 8 +++ 5 files changed, 93 insertions(+), 2 deletions(-) --- base-commit: df84c019c46e6833cc79385bdb23efba4882c09d change-id: 20240916-u-boot-topic-dynamic-uuid-a871c25236a4 Best regards, -- Neil Armstrong <neil.armstrong@...>
Started by Neil Armstrong @ · Most recent @
[PATCH v3 4/4] power: regulator: Drop regulators_enable_boot_on/off()
Both regulators_enable_boot_on/off() are unused and superseded by regulator uclass regulator_post_probe(). Remove both functions. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: [email protected] Cc: [email protected] Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- V2: Rebase on current u-boot/next V3: No change --- arch/arm/mach-rockchip/board.c | 8 ------ arch/arm/mach-snapdragon/board.c | 1 - arch/arm/mach-tegra/board2.c | 3 --- board/Marvell/octeontx2_cn913x/board.c | 5 ---- .../amlogic/odroid-go-ultra/odroid-go-ultra.c | 2 -- board/dhelectronics/dh_imx6/dh_imx6.c | 2 -- .../dh_imx8mp/imx8mp_dhcom_pdk2.c | 2 -- board/dhelectronics/dh_stm32mp1/board.c | 2 -- board/engicam/stm32mp1/stm32mp1.c | 3 --- board/google/veyron/veyron.c | 4 --- board/samsung/common/exynos5-dt.c | 4 --- board/st/stm32mp1/stm32mp1.c | 2 -- drivers/power/regulator/regulator-uclass.c | 10 -------- include/power/regulator.h | 25 ------------------- 14 files changed, 73 deletions(-) diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/boar= d.c index 0fdf9365b41..3fadf7e4122 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -202,14 +202,6 @@ int board_late_init(void) =20 int board_init(void) { - int ret; - -#ifdef CONFIG_DM_REGULATOR - ret =3D regulators_enable_boot_on(false); - if (ret) - debug("%s: Cannot enable boot on regulator\n", __func__); -#endif - return 0; } =20 diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/= board.c index 0af297470a6..2ab2ceb5138 100644 --- a/arch/arm/mach-snapdragon/board.c +++ b/arch/arm/mach-snapdragon/board.c @@ -237,7 +237,6 @@ void __weak qcom_board_init(void) =20 int board_init(void) { - regulators_enable_boot_on(false); show_psci_version(); qcom_of_fixup_nodes(); qcom_board_init(); diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index 7971e3b68d5..5c5838629b2 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -187,9 +187,6 @@ int board_init(void) warmboot_prepare_code(TEGRA_LP0_ADDR, TEGRA_LP0_SIZE); #endif =20 - /* Set up boot-on regulators */ - regulators_enable_boot_on(_DEBUG); - return nvidia_board_init(); } =20 diff --git a/board/Marvell/octeontx2_cn913x/board.c b/board/Marvell/octeo= ntx2_cn913x/board.c index 3d20cfb2fab..3ffe15d42b8 100644 --- a/board/Marvell/octeontx2_cn913x/board.c +++ b/board/Marvell/octeontx2_cn913x/board.c @@ -23,11 +23,6 @@ int board_early_init_f(void) =20 int board_early_init_r(void) { - if (CONFIG_IS_ENABLED(DM_REGULATOR)) { - /* Check if any existing regulator should be turned down */ - regulators_enable_boot_off(false); - } - return 0; } =20 diff --git a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c b/board/amlo= gic/odroid-go-ultra/odroid-go-ultra.c index 8f3f2045d74..f9412071737 100644 --- a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c +++ b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c @@ -16,7 +16,5 @@ int mmc_get_env_dev(void) =20 int board_init(void) { - regulators_enable_boot_on(_DEBUG); - return 0; } diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/= dh_imx6/dh_imx6.c index
Started by Marek Vasut @
[PATCH v3 3/4] power: regulator: Drop regulator_unset()
This function is never called, drop it. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: [email protected] Cc: [email protected] Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- V2: Rebase on current u-boot/next V3: No change --- drivers/power/regulator/regulator-uclass.c | 11 ----------- include/power/regulator.h | 14 +------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/r= egulator/regulator-uclass.c index 9fcc4bd85b9..4e83819ff73 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -345,17 +345,6 @@ out: return ret; } =20 -int regulator_unset(struct udevice *dev) -{ - struct dm_regulator_uclass_plat *uc_pdata; - - uc_pdata =3D dev_get_uclass_plat(dev); - if (uc_pdata && uc_pdata->force_off) - return regulator_set_enable(dev, false); - - return -EMEDIUMTYPE; -} - static void regulator_show(struct udevice *dev, int ret) { struct dm_regulator_uclass_plat *uc_pdata; diff --git a/include/power/regulator.h b/include/power/regulator.h index bb07a814c79..5363483d02a 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -430,7 +430,7 @@ int regulators_enable_boot_on(bool verbose); * * This disables all regulators which are marked to be off at boot time. * - * This effectively calls regulator_unset() for every regulator. + * This effectively does nothing. */ int regulators_enable_boot_off(bool verbose); =20 @@ -453,18 +453,6 @@ int regulators_enable_boot_off(bool verbose); */ int regulator_autoset(struct udevice *dev); =20 -/** - * regulator_unset: turn off a regulator - * - * The setup depends on constraints found in device's uclass's platform = data - * (struct dm_regulator_uclass_platdata): - * - * - Disable - will set - if 'force_off' is set to true, - * - * The function returns on the first-encountered error. - */ -int regulator_unset(struct udevice *dev); - /** * regulator_autoset_by_name: setup the regulator given by its uclass's * platform data name field. The setup depends on constraints found in d= evice's --=20 2.45.2
Started by Marek Vasut @
[PATCH 1/4] power: regulator: Trigger probe of regulators which are always-on or boot-on 26
In case a regulator DT node contains regulator-always-on or regulator-boo= t-on property, make sure the regulator gets correctly configured by U-Boot on = start up. Unconditionally probe such regulator drivers. This is a preparatory p= atch for introduction of .regulator_post_probe() which would trigger the regul= ator configuration. Parsing of regulator-always-on and regulator-boot-on DT property has been moved to regulator_post_bind() as the information is required early, the rest of the DT parsing has been kept in regulator_pre_probe() to avoid slowing down the boot process. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Kostya Porotchkin <kostap@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: [email protected] Cc: [email protected] Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- drivers/power/regulator/regulator-uclass.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/r= egulator/regulator-uclass.c index 66fd531da04..ccc4ef33d83 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -433,6 +433,8 @@ static int regulator_post_bind(struct udevice *dev) const char *property =3D "regulator-name"; =20 uc_pdata =3D dev_get_uclass_plat(dev); + uc_pdata->always_on =3D dev_read_bool(dev, "regulator-always-on"); + uc_pdata->boot_on =3D dev_read_bool(dev, "regulator-boot-on"); =20 /* Regulator's mandatory constraint */ uc_pdata->name =3D dev_read_string(dev, property); @@ -444,13 +446,21 @@ static int regulator_post_bind(struct udevice *dev) return -EINVAL; } =20 - if (regulator_name_is_unique(dev, uc_pdata->name)) - return 0; + if (!regulator_name_is_unique(dev, uc_pdata->name)) { + debug("'%s' of dev: '%s', has nonunique value: '%s\n", + property, dev->name, uc_pdata->name); + return -EINVAL; + } =20 - debug("'%s' of dev: '%s', has nonunique value: '%s\n", - property, dev->name, uc_pdata->name); + /* + * In case the regulator has regulator-always-on or + * regulator-boot-on DT property, trigger probe() to + * configure its default state during startup. + */ + if (uc_pdata->always_on && uc_pdata->boot_on) + dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND); =20 - return -EINVAL; + return 0; } =20 static int regulator_pre_probe(struct udevice *dev) @@ -473,8 +483,6 @@ static int regulator_pre_probe(struct udevice *dev) -ENODATA); uc_pdata->max_uA =3D dev_read_u32_default(dev, "regulator-max-microamp"= , -ENODATA); - uc_pdata->always_on =3D dev_read_bool(dev, "regulator-always-on"); - uc_pdata->boot_on =3D dev_read_bool(dev, "regulator-boot-on"); uc_pdata->ramp_delay =3D dev_read_u32_default(dev, "regulator-ramp-dela= y", 0); uc_pdata->force_off =3D dev_read_bool(dev, "regulator-force-boot-off"); --=20 2.43.0
Started by Marek Vasut @ · Most recent @
[PATCH v2 1/5] power: regulator: Trigger probe of regulators which are always-on or boot-on 3
In case a regulator DT node contains regulator-always-on or regulator-boo= t-on property, make sure the regulator gets correctly configured by U-Boot on = start up. Unconditionally probe such regulator drivers. This is a preparatory p= atch for introduction of .regulator_post_probe() which would trigger the regul= ator configuration. Parsing of regulator-always-on and regulator-boot-on DT property has been moved to regulator_post_bind() as the information is required early, the rest of the DT parsing has been kept in regulator_pre_probe() to avoid slowing down the boot process. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Kostya Porotchkin <kostap@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: [email protected] Cc: [email protected] Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- V2: - Rebase on current u-boot/next - Update test cases to handle already started regulators correctly --- drivers/power/regulator/regulator-uclass.c | 22 +++++++++++++++------- test/dm/panel.c | 2 +- test/dm/regulator.c | 4 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/r= egulator/regulator-uclass.c index 88a8525b3c4..e2f703702e3 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -433,6 +433,8 @@ static int regulator_post_bind(struct udevice *dev) const char *property =3D "regulator-name"; =20 uc_pdata =3D dev_get_uclass_plat(dev); + uc_pdata->always_on =3D dev_read_bool(dev, "regulator-always-on"); + uc_pdata->boot_on =3D dev_read_bool(dev, "regulator-boot-on"); =20 /* Regulator's mandatory constraint */ uc_pdata->name =3D dev_read_string(dev, property); @@ -444,13 +446,21 @@ static int regulator_post_bind(struct udevice *dev) return -EINVAL; } =20 - if (regulator_name_is_unique(dev, uc_pdata->name)) - return 0; + if (!regulator_name_is_unique(dev, uc_pdata->name)) { + debug("'%s' of dev: '%s', has nonunique value: '%s\n", + property, dev->name, uc_pdata->name); + return -EINVAL; + } =20 - debug("'%s' of dev: '%s', has nonunique value: '%s\n", - property, dev->name, uc_pdata->name); + /* + * In case the regulator has regulator-always-on or + * regulator-boot-on DT property, trigger probe() to + * configure its default state during startup. + */ + if (uc_pdata->always_on && uc_pdata->boot_on) + dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND); =20 - return -EINVAL; + return 0; } =20 static int regulator_pre_probe(struct udevice *dev) @@ -473,8 +483,6 @@ static int regulator_pre_probe(struct udevice *dev) -ENODATA); uc_pdata->max_uA =3D dev_read_u32_default(dev, "regulator-max-microamp"= , -ENODATA); - uc_pdata->always_on =3D dev_read_bool(dev, "regulator-always-on"); - uc_pdata->boot_on =3D dev_read_bool(dev, "regulator-boot-on"); uc_pdata->ramp_delay =3D dev_read_u32_default(dev, "regulator-ramp-dela= y", 0); uc_pdata->force_off =3D dev_read_bool(dev, "regulator-force-boot-off"); diff --git a/test/dm/panel.c b/test/dm/panel.c index ce835c96ed0..ec85a9b1e6e 100644 --- a/test/dm/panel.c +++ b/test/dm/panel.c @@ -33,7 +33,7 @@ static int dm_test_panel(struct unit_test_state *uts) ut_assertok(sandbox_pwm_get_co
Started by Marek Vasut @ · Most recent @
[PATCH v2 3/5] power: regulator: Exit from regulator_set_suspend_value on poorly described regulators 2
Hi Marek, I sent a different fix for this some time ago, please check it out: https://patchwork.ozlabs.org/patch/1964571/ Regards, Jonas
Started by Jonas Karlman @ · Most recent @
[PATCH v2 4/5] power: regulator: Drop regulator_unset()
This function is never called, drop it. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: [email protected] Cc: [email protected] Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- V2: Rebase on current u-boot/next --- drivers/power/regulator/regulator-uclass.c | 11 ----------- include/power/regulator.h | 14 +------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/r= egulator/regulator-uclass.c index 3c05fdf1966..34c2a36ec44 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -343,17 +343,6 @@ out: return ret; } =20 -int regulator_unset(struct udevice *dev) -{ - struct dm_regulator_uclass_plat *uc_pdata; - - uc_pdata =3D dev_get_uclass_plat(dev); - if (uc_pdata && uc_pdata->force_off) - return regulator_set_enable(dev, false); - - return -EMEDIUMTYPE; -} - static void regulator_show(struct udevice *dev, int ret) { struct dm_regulator_uclass_plat *uc_pdata; diff --git a/include/power/regulator.h b/include/power/regulator.h index bb07a814c79..5363483d02a 100644 --- a/include/power/regulator.h +++ b/include/power/regulator.h @@ -430,7 +430,7 @@ int regulators_enable_boot_on(bool verbose); * * This disables all regulators which are marked to be off at boot time. * - * This effectively calls regulator_unset() for every regulator. + * This effectively does nothing. */ int regulators_enable_boot_off(bool verbose); =20 @@ -453,18 +453,6 @@ int regulators_enable_boot_off(bool verbose); */ int regulator_autoset(struct udevice *dev); =20 -/** - * regulator_unset: turn off a regulator - * - * The setup depends on constraints found in device's uclass's platform = data - * (struct dm_regulator_uclass_platdata): - * - * - Disable - will set - if 'force_off' is set to true, - * - * The function returns on the first-encountered error. - */ -int regulator_unset(struct udevice *dev); - /** * regulator_autoset_by_name: setup the regulator given by its uclass's * platform data name field. The setup depends on constraints found in d= evice's --=20 2.45.2
Started by Marek Vasut @
[PATCH v2 3/5] power: regulator: Exit from regulator_set_suspend_value on poorly described regulators
In case the DT regulator node does not contain 'regulator-max-microvolt' property and does not contain 'regulator-state-mem' subnode (like the test.dts regul1_scmi: reg@1 {} regulator node), then regulator_pre_probe(= ) will parse this regulator node and set uc_pdata->suspend_on =3D true and uc_pdata->suspend_uV =3D uc_pdata->max_uV, where uc_pdata->max_uV is set to -ENODATA because "regulator-max-microvolt" is missing, and therefore uc_pdata->suspend_uV is also -ENODATA. In case regulator_autoset() is used afterward, it will attempt to call regulator_set_suspend_value() with uV =3D uc_pdata->suspend_uV =3D -ENODATA and fail with -EINVAL. Chec= k for this case in regulator_set_suspend_value() and immediately return 0, because there is no way to set meaningful suspend voltage, so do nothing and retain the existing settings of the regulator. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: [email protected] Cc: [email protected] Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- V2: New patch --- drivers/power/regulator/regulator-uclass.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/r= egulator/regulator-uclass.c index 14cf3159203..3c05fdf1966 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -85,6 +85,10 @@ int regulator_set_suspend_value(struct udevice *dev, i= nt uV) const struct dm_regulator_ops *ops =3D dev_get_driver_ops(dev); struct dm_regulator_uclass_plat *uc_pdata; =20 + /* Regulator did not set limits, assume already configured. */ + if (uV =3D=3D -ENODATA) + return 0; + uc_pdata =3D dev_get_uclass_plat(dev); if (uc_pdata->min_uV !=3D -ENODATA && uV < uc_pdata->min_uV) return -EINVAL; --=20 2.45.2
Started by Marek Vasut @
[PATCH v2 2/5] power: regulator: Convert regulators_enable_boot_on/off() to regulator_post_probe
Turn regulators_enable_boot_on() and regulators_enable_boot_off() into empty functions. Implement matching functionality in regulator_post_probe= () instead. The regulator_post_probe() is called for all regulators after th= ey probe, and regulators that have regulator-always-on or regulator-boot-on = DT properties now always probe due to DM_FLAG_PROBE_AFTER_BIND being set on such regulators in regulator_post_bind(). Finally, fold regulator_unset() functionality into regulator_autoset(). Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: [email protected] Cc: [email protected] Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- V2: Rebase on current u-boot/next --- drivers/power/regulator/regulator-uclass.c | 60 +++++++--------------- 1 file changed, 19 insertions(+), 41 deletions(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/r= egulator/regulator-uclass.c index e2f703702e3..14cf3159203 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -308,6 +308,11 @@ int regulator_autoset(struct udevice *dev) return ret; } =20 + if (uc_pdata->force_off) { + ret =3D regulator_set_enable(dev, false); + goto out; + } + if (!uc_pdata->always_on && !uc_pdata->boot_on) { ret =3D -EMEDIUMTYPE; goto out; @@ -512,56 +517,28 @@ static int regulator_pre_probe(struct udevice *dev) return 0; } =20 -int regulators_enable_boot_on(bool verbose) +static int regulator_post_probe(struct udevice *dev) { - struct udevice *dev; - struct uclass *uc; int ret; =20 - ret =3D uclass_get(UCLASS_REGULATOR, &uc); - if (ret) + ret =3D regulator_autoset(dev); + if (ret && ret !=3D -EMEDIUMTYPE && ret !=3D -EALREADY && ret !=3D ENOS= YS) return ret; - for (uclass_first_device(UCLASS_REGULATOR, &dev); - dev; - uclass_next_device(&dev)) { - ret =3D regulator_autoset(dev); - if (ret =3D=3D -EMEDIUMTYPE || ret =3D=3D -EALREADY) { - ret =3D 0; - continue; - } - if (verbose) - regulator_show(dev, ret); - if (ret =3D=3D -ENOSYS) - ret =3D 0; - } =20 - return ret; + if (_DEBUG) + regulator_show(dev, ret); + + return 0; } =20 -int regulators_enable_boot_off(bool verbose) +int regulators_enable_boot_on(bool verbose) { - struct udevice *dev; - struct uclass *uc; - int ret; - - ret =3D uclass_get(UCLASS_REGULATOR, &uc); - if (ret) - return ret; - for (uclass_first_device(UCLASS_REGULATOR, &dev); - dev; - uclass_next_device(&dev)) { - ret =3D regulator_unset(dev); - if (ret =3D=3D -EMEDIUMTYPE) { - ret =3D 0; - continue; - } - if (verbose) - regulator_show(dev, ret); - if (ret =3D=3D -ENOSYS) - ret =3D 0; - } + return 0; +} =20 - return ret; +int regulators_enable_boot_off(bool verbose) +{ + return 0; } =20 UCLASS_DRIVER(regulator) =3D { @@ -569,5 +546,6 @@ UCLASS_DRIVER(regulator) =3D { .name =3D "regulator", .post_bind =3D regulator_post_bind, .pre_probe =3D regulator_pre_probe, + .post_probe =3D regulator_post_probe, .per_device_plat_auto =3D sizeof(struct dm_regulator_uclass_plat), }; --=20 2.45.2
Started by Marek Vasut @
[PATCH v2 5/5] power: regulator: Drop regulators_enable_boot_on/off()
Both regulators_enable_boot_on/off() are unused and superseded by regulator uclass regulator_post_probe(). Remove both functions. Signed-off-by: Marek Vasut <marex@...> --- Cc: Ben Wolsieffer <benwolsieffer@...> Cc: Caleb Connolly <caleb.connolly@...> Cc: Chris Morgan <macromorgan@...> Cc: Dragan Simic <dsimic@...> Cc: Eugen Hristev <eugen.hristev@...> Cc: Francesco Dolcini <francesco.dolcini@...> Cc: Heinrich Schuchardt <xypron.glpk@...> Cc: Jaehoon Chung <jh80.chung@...> Cc: Jagan Teki <jagan@...> Cc: Jonas Karlman <jonas@...> Cc: Kever Yang <kever.yang@...> Cc: Matteo Lisi <matteo.lisi@...> Cc: Mattijs Korpershoek <mkorpershoek@...> Cc: Max Krummenacher <max.krummenacher@...> Cc: Neil Armstrong <neil.armstrong@...> Cc: Patrice Chotard <patrice.chotard@...> Cc: Patrick Delaunay <patrick.delaunay@...> Cc: Philipp Tomsich <philipp.tomsich@...> Cc: Quentin Schulz <quentin.schulz@...> Cc: Sam Day <me@...> Cc: Simon Glass <sjg@...> Cc: Sumit Garg <sumit.garg@...> Cc: Svyatoslav Ryhel <clamor95@...> Cc: Thierry Reding <treding@...> Cc: Tom Rini <trini@...> Cc: Volodymyr Babchuk <Volodymyr_Babchuk@...> Cc: [email protected] Cc: [email protected] Cc: u-boot@... Cc: u-boot@... Cc: uboot-stm32@... --- V2: Rebase on current u-boot/next --- arch/arm/mach-rockchip/board.c | 8 ------ arch/arm/mach-snapdragon/board.c | 1 - arch/arm/mach-tegra/board2.c | 3 --- board/Marvell/octeontx2_cn913x/board.c | 5 ---- .../amlogic/odroid-go-ultra/odroid-go-ultra.c | 2 -- board/dhelectronics/dh_imx6/dh_imx6.c | 2 -- .../dh_imx8mp/imx8mp_dhcom_pdk2.c | 2 -- board/dhelectronics/dh_stm32mp1/board.c | 2 -- board/engicam/stm32mp1/stm32mp1.c | 3 --- board/google/veyron/veyron.c | 4 --- board/samsung/common/exynos5-dt.c | 4 --- board/st/stm32mp1/stm32mp1.c | 2 -- drivers/power/regulator/regulator-uclass.c | 10 -------- include/power/regulator.h | 25 ------------------- 14 files changed, 73 deletions(-) diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/boar= d.c index 0fdf9365b41..3fadf7e4122 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -202,14 +202,6 @@ int board_late_init(void) =20 int board_init(void) { - int ret; - -#ifdef CONFIG_DM_REGULATOR - ret =3D regulators_enable_boot_on(false); - if (ret) - debug("%s: Cannot enable boot on regulator\n", __func__); -#endif - return 0; } =20 diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/= board.c index 0af297470a6..2ab2ceb5138 100644 --- a/arch/arm/mach-snapdragon/board.c +++ b/arch/arm/mach-snapdragon/board.c @@ -237,7 +237,6 @@ void __weak qcom_board_init(void) =20 int board_init(void) { - regulators_enable_boot_on(false); show_psci_version(); qcom_of_fixup_nodes(); qcom_board_init(); diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c index 7971e3b68d5..5c5838629b2 100644 --- a/arch/arm/mach-tegra/board2.c +++ b/arch/arm/mach-tegra/board2.c @@ -187,9 +187,6 @@ int board_init(void) warmboot_prepare_code(TEGRA_LP0_ADDR, TEGRA_LP0_SIZE); #endif =20 - /* Set up boot-on regulators */ - regulators_enable_boot_on(_DEBUG); - return nvidia_board_init(); } =20 diff --git a/board/Marvell/octeontx2_cn913x/board.c b/board/Marvell/octeo= ntx2_cn913x/board.c index 3d20cfb2fab..3ffe15d42b8 100644 --- a/board/Marvell/octeontx2_cn913x/board.c +++ b/board/Marvell/octeontx2_cn913x/board.c @@ -23,11 +23,6 @@ int board_early_init_f(void) =20 int board_early_init_r(void) { - if (CONFIG_IS_ENABLED(DM_REGULATOR)) { - /* Check if any existing regulator should be turned down */ - regulators_enable_boot_off(false); - } - return 0; } =20 diff --git a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c b/board/amlo= gic/odroid-go-ultra/odroid-go-ultra.c index 8f3f2045d74..f9412071737 100644 --- a/board/amlogic/odroid-go-ultra/odroid-go-ultra.c +++ b/board/amlogic/odroid-go-ultra/odroid-go-ultra.c @@ -16,7 +16,5 @@ int mmc_get_env_dev(void) =20 int board_init(void) { - regulators_enable_boot_on(_DEBUG); - return 0; } diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/= dh_imx6/dh_imx6.c index ada44e01424..f
Started by Marek Vasut @
[PATCH 2/2] board: libre-computer: aml-s805-cc: Enable capsule updates 2
Since the aml-s805-cc works well using EFI, and now the capsule updates backend has been merged, let's enable the missing configs and add the required structures to support it. The GUID is dynamically generated for the board, to get it: => efidebug capsule esrt ======================================== ESRT: fw_resource_count=1 ESRT: fw_resource_count_max=1 ESRT: fw_resource_version=1 [entry 0]============================== ESRT: fw_class=B8079027-9B2C-57D4-86AA-CC782ADA598C ESRT: fw_type=unknown ESRT: fw_version=0 ESRT: lowest_supported_fw_version=0 ESRT: capsule_flags=0 ESRT: last_attempt_version=0 ESRT: last_attempt_status=success ======================================== On the host (with the aml_encrypt_gxl result binary): $ eficapsule --guid B8079027-9B2C-57D4-86AA-CC782ADA598C -i 1 u-boot.bin u-boot.cap On the board (from USB disk containing u-boot.cap at root): => load usb 0:1 $kernel_addr_r u-boot.cap => efidebug capsule update $kernel_addr_r The binary will then be flashed on the SPI. Signed-off-by: Neil Armstrong <neil.armstrong@...> --- board/libre-computer/aml-s805x-ac/aml-s805x-ac.c | 14 ++++++++++++++ configs/libretech-ac_defconfig | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/board/libre-computer/aml-s805x-ac/aml-s805x-ac.c b/board/libre-computer/aml-s805x-ac/aml-s805x-ac.c index ae9834c0bf8..ba14df54967 100644 --- a/board/libre-computer/aml-s805x-ac/aml-s805x-ac.c +++ b/board/libre-computer/aml-s805x-ac/aml-s805x-ac.c @@ -8,6 +8,7 @@ #include <env.h> #include <init.h> #include <net.h> +#include <efi_loader.h> #include <asm/io.h> #include <asm/arch/gx.h> #include <asm/arch/sm.h> @@ -19,6 +20,19 @@ #define EFUSE_MAC_OFFSET 52 #define EFUSE_MAC_SIZE 6 +struct efi_fw_image fw_images[] = { + { + .fw_name = u"AML_S805X_AC_BOOT", + .image_index = 1, + }, +}; + +struct efi_capsule_update_info update_info = { + .dfu_string = "sf 0:0=u-boot-bin raw 0 0x10000", + .num_images = ARRAY_SIZE(fw_images), + .images = fw_images, +}; + int misc_init_r(void) { u8 mac_addr[EFUSE_MAC_SIZE + 1]; diff --git a/configs/libretech-ac_defconfig b/configs/libretech-ac_defconfig index 11d9795e05d..f146a495654 100644 --- a/configs/libretech-ac_defconfig +++ b/configs/libretech-ac_defconfig @@ -35,6 +35,7 @@ CONFIG_SYS_MAXARGS=32 # CONFIG_CMD_IMI is not set CONFIG_CMD_ADC=y CONFIG_CMD_DFU=y +CONFIG_CMD_NVEDIT_EFI=y CONFIG_CMD_GPIO=y # CONFIG_CMD_LOADS is not set CONFIG_CMD_MMC=y @@ -42,6 +43,7 @@ CONFIG_CMD_SF_TEST=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_EFIDEBUG=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_REGULATOR=y CONFIG_OF_CONTROL=y @@ -49,6 +51,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SARADC_MESON=y CONFIG_DFU_RAM=y +CONFIG_DFU_SF=y CONFIG_MMC_MESON_GX=y CONFIG_MTD=y CONFIG_DM_MTD=y @@ -98,3 +101,5 @@ CONFIG_VIDEO_BMP_RLE8=y CONFIG_BMP_16BPP=y CONFIG_BMP_24BPP=y CONFIG_BMP_32BPP=y +CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y -- 2.34.1
Started by Neil Armstrong @ · Most recent @
Quick Reminder- IBC Convention Data List- 2024
Hi, Would you be interested in acquiring IBC Convention Attendees Data List-2024? Number of Contacts:- 40,236. Cost:-$1,889 Interested? Email me back; I would love to provide more information on the list. Kind Regards, Peyton Marketing Coordinator
Started by Peyton Jack @
Current Image
Image Name
Sat 8:39am