[PATCH v4 5/5] starfive: add mac vendor sub-command

2024-05-09 Thread Heinrich Schuchardt
As boards from multiple vendors (Milk-V, StarFive, Pine64) use the mac
command provide a sub-command to set the vendor string.

Reported-by: E. Shattow 
Signed-off-by: Heinrich Schuchardt 
---
v4:
no change
v3:
new patch
---
 .../visionfive2/visionfive2-i2c-eeprom.c  | 25 ++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c 
b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
index 9648a270494..141d3db8667 100644
--- a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
+++ b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
@@ -404,6 +404,24 @@ static void set_product_id(char *string)
update_crc();
 }
 
+/**
+ * set_vendor() - set vendor name
+ *
+ * Takes a pointer to a string representing the vendor name, e.g.
+ * "StarFive Technology Co., Ltd.", stores it in the vendor field
+ * of the EEPROM local copy, and updates the CRC of the local copy.
+ */
+static void set_vendor(char *string)
+{
+   memset(pbuf.eeprom.atom1.data.vstr, 0,
+  sizeof(pbuf.eeprom.atom1.data.vstr));
+
+   snprintf(pbuf.eeprom.atom1.data.vstr,
+sizeof(pbuf.eeprom.atom1.data.vstr), string);
+
+   update_crc();
+}
+
 const char *get_product_id_from_eeprom(void)
 {
if (read_eeprom())
@@ -463,6 +481,9 @@ int do_mac(struct cmd_tbl *cmdtp, int flag, int argc, char 
*const argv[])
} else if (!strcmp(cmd, "product_id")) {
set_product_id(argv[2]);
return 0;
+   } else if (!strcmp(cmd, "vendor")) {
+   set_vendor(argv[2]);
+   return 0;
}
 
return CMD_RET_USAGE;
@@ -586,7 +607,9 @@ U_BOOT_LONGHELP(mac,
"mac bom_revision \n"
"- stores a StarFive BOM revision into the local EEPROM copy\n"
"mac product_id \n"
-   "- stores a StarFive product ID into the local EEPROM copy\n");
+   "- stores a StarFive product ID into the local EEPROM copy\n"
+   "mac vendor \n"
+   "- set vendor string\n");
 
 U_BOOT_CMD(
mac, 3, 1,  do_mac,
-- 
2.43.0



[PATCH v4 4/5] configs: visionfive2: enable SPL_YMODEM_SUPPORT

2024-05-09 Thread Heinrich Schuchardt
We can use U-Boot for recovering JH7110 based boards via UART
if CONFIG_SPL_YMODEM_SUPPORT=y.

* Send u-boot-spl.normal.out via XMODEM.
* Send u-boot.itb via YMODEM.

Signed-off-by: Heinrich Schuchardt 
Reviewed-by: E. Shattow 
---
v4:
no change
v3:
no change
v2:
no change
---
 configs/starfive_visionfive2_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/starfive_visionfive2_defconfig 
b/configs/starfive_visionfive2_defconfig
index 3bbd1dbd67c..174ac24dc74 100644
--- a/configs/starfive_visionfive2_defconfig
+++ b/configs/starfive_visionfive2_defconfig
@@ -62,6 +62,7 @@ CONFIG_SPL_I2C=y
 CONFIG_SPL_DM_SPI_FLASH=y
 CONFIG_SPL_DM_RESET=y
 CONFIG_SPL_SPI_LOAD=y
+CONFIG_SPL_YMODEM_SUPPORT=y
 CONFIG_SYS_PROMPT="StarFive # "
 CONFIG_CMD_EEPROM=y
 CONFIG_SYS_EEPROM_SIZE=512
-- 
2.43.0



[PATCH v4 3/5] doc: Milk-V Mars CM and Milk-V Mars CM Lite

2024-05-09 Thread Heinrich Schuchardt
Provide a man-page describing the usage of U-Boot on
the Milk-V Mars CM and Milk-V Mars CM Lite boards.

Signed-off-by: Heinrich Schuchardt 
Reviewed-by: E Shattow 
---
v4:
remove .rst extension from toctree links
remove superfluous word 'connected' describing booting from SPI
flash
v3:
correct device-tree names
suggest not to use mac initialize
refer to XMODEM-1K
v2:
refer to tio as tool for booting via UART
describe how to update serial number
description updates as suggested by E. Shattow
---
 doc/board/starfive/index.rst  |   1 +
 doc/board/starfive/milk-v_mars_cm.rst | 193 ++
 2 files changed, 194 insertions(+)
 create mode 100644 doc/board/starfive/milk-v_mars_cm.rst

diff --git a/doc/board/starfive/index.rst b/doc/board/starfive/index.rst
index 2762bf74c11..afa85ad2540 100644
--- a/doc/board/starfive/index.rst
+++ b/doc/board/starfive/index.rst
@@ -7,5 +7,6 @@ StarFive
 .. toctree::
:maxdepth: 1
 
-   milk-v_mars.rst
+   milk-v_mars
+   milk-v_mars_cm
visionfive2
diff --git a/doc/board/starfive/milk-v_mars_cm.rst 
b/doc/board/starfive/milk-v_mars_cm.rst
new file mode 100644
index 000..68561adadfc
--- /dev/null
+++ b/doc/board/starfive/milk-v_mars_cm.rst
@@ -0,0 +1,193 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Milk-V Mars CM
+==
+
+U-Boot for the Milk-V Mars CM uses the same U-Boot binaries as the VisionFive 2
+board. In U-Boot SPL the actual board is detected and the device-tree patched
+accordingly.
+
+The Milk-V Mars CM Lite comes without eMMC and needs a different pin muxing
+than the Milk-V Mars CM. The availability and size of the eMMC shows up in the
+serial number displayed by the *mac* command, e.g.
+MARC-V10-2340-D002E016-0304. The number after the E is the MMC size. U-Boot
+takes a value of E000 as an indicator for the Lite version. Unfortunately the
+vendor has not set this value correctly on some Lite boards.
+
+Please, use CONFIG_STARFIVE_NO_EMMC=y if EEPROM data indicates eMMC is present
+on the Milk-V Mars CM Lite. Otherwise you will not be able to read from the
+SD-card.
+
+The serial number can be corrected using the *mac* command:
+
+.. code-block::
+
+mac read_eeprom
+mac product_id MARC-V10-2340-D002E000-0304
+mac write_eeprom
+
+.. note::
+
+   The *mac initialize* command overwrites the vendor string and the MAC
+   addresses. This is why it is avoided here.
+
+By default the EEPROM is write protected. The write protection may be overcome
+by connecting the "GND" and "EN" test pads on top of the module.
+
+Building
+
+
+1. Add the RISC-V toolchain to your PATH.
+2. Setup ARCH & cross compilation environment variable:
+
+.. code-block:: none
+
+   export CROSS_COMPILE=
+
+The M-mode software OpenSBI provides the supervisor binary interface (SBI) and
+is responsible for the switch to S-Mode. It is a prerequisite to build U-Boot.
+Support for the JH7110 was introduced in OpenSBI 1.2. It is recommended to use
+a current release.
+
+.. code-block:: console
+
+   git clone https://github.com/riscv/opensbi.git
+   cd opensbi
+   make PLATFORM=generic FW_TEXT_START=0x4000
+
+(*FW_TEXT_START* is not needed anymore after OpenSBI patch d4d2582eef7a
+"firmware: remove FW_TEXT_START" which should appear in OpenSBI 1.5.)
+
+Now build the U-Boot SPL and U-Boot proper.
+
+.. code-block:: console
+
+   cd 
+   make starfive_visionfive2_defconfig
+   make 
OPENSBI=$(opensbi_dir)/build/platform/generic/firmware/fw_dynamic.bin
+
+This will generate the U-Boot SPL image (spl/u-boot-spl.bin.normal.out) as well
+as the FIT image (u-boot.itb) with OpenSBI and U-Boot.
+
+Device-tree selection
+~
+
+Depending on the board version U-Boot sets variable $fdtfile to either
+starfive/jh7110-milkv-mars-cm.dtb (with eMMC storage) or
+starfive/jh7110-milkv-mars-cm-lite.dtb (without eMMC storage).
+
+To overrule this selection the variable can be set manually and saved in the
+environment
+
+::
+
+env set fdtfile my_device-tree.dtb
+env save
+
+or the configuration variable CONFIG_DEFAULT_FDT_FILE can be used to set to
+provide a default value.
+
+The variable *$fdtfile* is used in the boot process to automatically load
+a device-tree provided by the operating system. For details of the boot
+process refer to the :doc:`U-Boot Standard Boot <../../../develop/bootstd>`
+description.
+
+Boot source selection
+~
+
+The low speed connector nRPIBOOT line is used to switch the boot source.
+
+* If nRPIBOOT is connected to ground, the board boots from UART.
+* If nRPIBOOT is not connected, the board boots from SPI flash.
+
+Compute module boards typically have a switch or jumper for this line.
+
+Flashing a new U-Boot version
+~
+
+U-Boot SPL is provided as file spl/u-boot-spl.bin.normal.out. Main U-Boot is
+in file u-boot.itb.
+
+Assuming your new U-Boot 

[PATCH v4 2/5] board: add support for Milk-V Mars CM

2024-05-09 Thread Heinrich Schuchardt
We already support the VisionFive 2 and the Milk-V Mars board by
patching the VisionFive 2 device tree. With this patch the same
is done for the Milk-V Mars CM.

Signed-off-by: Heinrich Schuchardt 
Tested-by: E. Shattow 
Reviewed-by: E. Shattow 
---
v4:
no change
v3:
no change
v2:
rename spl_fdt_fixup_marc() to spl_fdt_fixup_mars_cm()
rename device-trees for Mars CM and Mars CM Lite
change model and compatible properties
---
 board/starfive/visionfive2/spl.c  | 28 ++-
 .../visionfive2/starfive_visionfive2.c| 11 +++-
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c
index ca61b5be227..b555189556a 100644
--- a/board/starfive/visionfive2/spl.c
+++ b/board/starfive/visionfive2/spl.c
@@ -129,6 +129,30 @@ void spl_fdt_fixup_mars(void *fdt)
}
 }
 
+void spl_fdt_fixup_mars_cm(void *fdt)
+{
+   const char *compat;
+   const char *model;
+
+   spl_fdt_fixup_mars(fdt);
+
+   if (!get_mmc_size_from_eeprom()) {
+   int offset;
+
+   model = "Milk-V Mars CM Lite";
+   compat = "milkv,mars-cm-lite\0starfive,jh7110";
+
+   offset = fdt_path_offset(fdt, 
"/soc/pinctrl/mmc0-pins/mmc0-pins-rest");
+   /* GPIOMUX(22, GPOUT_SYS_SDIO0_RST, GPOEN_ENABLE, GPI_NONE) */
+   fdt_setprop_u32(fdt, offset, "pinmux", 0xff130016);
+   } else {
+   model = "Milk-V Mars CM";
+   compat = "milkv,mars-cm\0starfive,jh7110";
+   }
+   fdt_setprop(fdt, fdt_path_offset(fdt, "/"), "compatible", compat, 
sizeof(compat));
+   fdt_setprop_string(fdt, fdt_path_offset(fdt, "/"), "model", model);
+}
+
 void spl_fdt_fixup_version_a(void *fdt)
 {
static const char compat[] = 
"starfive,visionfive-2-v1.2a\0starfive,jh7110";
@@ -236,7 +260,9 @@ void spl_perform_fixups(struct spl_image_info *spl_image)
pr_err("Can't read EEPROM\n");
return;
}
-   if (!strncmp(product_id, "MARS", 4)) {
+   if (!strncmp(product_id, "MARC", 4)) {
+   spl_fdt_fixup_mars_cm(spl_image->fdt_addr);
+   } else if (!strncmp(product_id, "MARS", 4)) {
spl_fdt_fixup_mars(spl_image->fdt_addr);
} else if (!strncmp(product_id, "VF7110", 6)) {
version = get_pcb_revision_from_eeprom();
diff --git a/board/starfive/visionfive2/starfive_visionfive2.c 
b/board/starfive/visionfive2/starfive_visionfive2.c
index a86bca533b2..6be53489626 100644
--- a/board/starfive/visionfive2/starfive_visionfive2.c
+++ b/board/starfive/visionfive2/starfive_visionfive2.c
@@ -19,6 +19,10 @@ DECLARE_GLOBAL_DATA_PTR;
 #define JH7110_L2_PREFETCHER_HART_OFFSET   0x2000
 #define FDTFILE_MILK_V_MARS \
"starfive/jh7110-milkv-mars.dtb"
+#define FDTFILE_MILK_V_MARS_CM \
+   "starfive/jh7110-milkv-mars-cm.dtb"
+#define FDTFILE_MILK_V_MARS_CM_LITE \
+   "starfive/jh7110-milkv-mars-cm-lite.dtb"
 #define FDTFILE_VISIONFIVE2_1_2A \
"starfive/jh7110-starfive-visionfive-2-v1.2a.dtb"
 #define FDTFILE_VISIONFIVE2_1_3B \
@@ -61,7 +65,12 @@ static void set_fdtfile(void)
log_err("Can't read EEPROM\n");
return;
}
-   if (!strncmp(product_id, "MARS", 4)) {
+   if (!strncmp(product_id, "MARC", 4)) {
+   if (get_mmc_size_from_eeprom())
+   fdtfile = FDTFILE_MILK_V_MARS_CM;
+   else
+   fdtfile = FDTFILE_MILK_V_MARS_CM_LITE;
+   } else if (!strncmp(product_id, "MARS", 4)) {
fdtfile = FDTFILE_MILK_V_MARS;
} else if (!strncmp(product_id, "VF7110", 6)) {
version = get_pcb_revision_from_eeprom();
-- 
2.43.0



[PATCH v4 1/5] board: starfive: function to read eMMC size

2024-05-09 Thread Heinrich Schuchardt
The EEPROM provides information about the size of the eMMC.
Provide a new function get_mmc_size_from_eeprom() to read it.

Signed-off-by: Heinrich Schuchardt 
Reviewed-by: E. Shattow 
---
v4:
no change
v3:
no change
v2:
fix typos in get_mmc_size_from_eeprom() description
---
 arch/riscv/include/asm/arch-jh7110/eeprom.h|  7 +++
 board/starfive/visionfive2/Kconfig |  9 +
 .../visionfive2/visionfive2-i2c-eeprom.c   | 18 ++
 3 files changed, 34 insertions(+)

diff --git a/arch/riscv/include/asm/arch-jh7110/eeprom.h 
b/arch/riscv/include/asm/arch-jh7110/eeprom.h
index 62d184aeb57..45ad2a5f7bc 100644
--- a/arch/riscv/include/asm/arch-jh7110/eeprom.h
+++ b/arch/riscv/include/asm/arch-jh7110/eeprom.h
@@ -12,6 +12,13 @@
 u8 get_pcb_revision_from_eeprom(void);
 u32 get_ddr_size_from_eeprom(void);
 
+/**
+ * get_mmc_size_from_eeprom() - read eMMC size from EEPROM
+ *
+ * @return: size in GiB or 0 on error.
+ */
+u32 get_mmc_size_from_eeprom(void);
+
 /**
  * get_product_id_from_eeprom - get product ID string
  *
diff --git a/board/starfive/visionfive2/Kconfig 
b/board/starfive/visionfive2/Kconfig
index 2186a939646..d7e8a7a7d78 100644
--- a/board/starfive/visionfive2/Kconfig
+++ b/board/starfive/visionfive2/Kconfig
@@ -50,4 +50,13 @@ config BOARD_SPECIFIC_OPTIONS # dummy
imply PHY_LIB
imply PHY_MSCC
 
+config STARFIVE_NO_EMMC
+   bool "Report eMMC size as zero"
+   help
+ The serial number string in the EEPROM is meant to report the
+ size of onboard eMMC. Unfortunately some Milk-V Mars CM Lite
+ modules without eMMC show a non-zero size here.
+
+ Set to 'Y' if you have a Mars CM Lite module.
+
 endif
diff --git a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c 
b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
index 5095a0e9fdb..9648a270494 100644
--- a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
+++ b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
@@ -548,6 +548,24 @@ u32 get_ddr_size_from_eeprom(void)
return hextoul([14], NULL);
 }
 
+u32 get_mmc_size_from_eeprom(void)
+{
+   u32 size;
+
+   if (IS_ENABLED(CONFIG_STARFIVE_NO_EMMC))
+   return 0;
+
+   if (read_eeprom())
+   return 0;
+
+   size = dectoul([19], NULL);
+
+   if (pbuf.eeprom.atom1.data.pstr[21] == 'T')
+   size <<= 10;
+
+   return size;
+}
+
 U_BOOT_LONGHELP(mac,
"\n"
"- display EEPROM content\n"
-- 
2.43.0



[PATCH v4 0/5] board: starfive: add Milk-V Mars CM support

2024-05-09 Thread Heinrich Schuchardt
With this series the Milk-V Mars CM board can be booted.

NVMe, SD-card, Ethernet, UART are working but not USB.

The first series Milk-V Mars CM Lite board (the version without eMMC)
uses incorrect series numbers indicating eMMC presence. For these
CONFIG_STARFIVE_NO_EMMC=y must be set to indicate that eMMC is not
present.

Thanks to E. Shattow for all the helpful discussions.
He figured out what needed to be patched in the device-tree.

v4:
Documentation fixes
v3:
Add mac vendor sub-command
Documentation fixes
v2:
fix typos in get_mmc_size_from_eeprom() description
rename spl_fdt_fixup_marc() to spl_fdt_fixup_mars_cm()
rename device-trees for Mars CM and Mars CM Lite
change model and compatible properties
refer to tio as tool for booting via UART
describe how to update serial number

Heinrich Schuchardt (5):
  board: starfive: function to read eMMC size
  board: add support for Milk-V Mars CM
  doc: Milk-V Mars CM and Milk-V Mars CM Lite
  configs: visionfive2: enable SPL_YMODEM_SUPPORT
  starfive: add mac vendor sub-command

 arch/riscv/include/asm/arch-jh7110/eeprom.h   |   7 +
 board/starfive/visionfive2/Kconfig|   9 +
 board/starfive/visionfive2/spl.c  |  28 ++-
 .../visionfive2/starfive_visionfive2.c|  11 +-
 .../visionfive2/visionfive2-i2c-eeprom.c  |  43 +++-
 configs/starfive_visionfive2_defconfig|   1 +
 doc/board/starfive/index.rst  |   1 +
 doc/board/starfive/milk-v_mars_cm.rst | 193 ++
 8 files changed, 290 insertions(+), 3 deletions(-)
 create mode 100644 doc/board/starfive/milk-v_mars_cm.rst

-- 
2.43.0



Re: [PATCH 1/4] remoteproc: k3-dsp: Enable C71x support for AM62A

2024-05-09 Thread Devarsh Thakkar



On 09/05/24 19:50, Hari Nagalla wrote:
> AM62A SoC has a single C71x DSP subsystem with analytics engine in
> main voltage domain. Extend support to AM62A with compatible strings.
> 
> Signed-off-by: Hari Nagalla 

Reviewed-by: Devarsh Thakkar 

Regards
Devarsh
> ---
>  drivers/remoteproc/ti_k3_dsp_rproc.c | 13 +++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/remoteproc/ti_k3_dsp_rproc.c 
> b/drivers/remoteproc/ti_k3_dsp_rproc.c
> index e790406324..ed13729c33 100644
> --- a/drivers/remoteproc/ti_k3_dsp_rproc.c
> +++ b/drivers/remoteproc/ti_k3_dsp_rproc.c
> @@ -339,7 +339,8 @@ static int k3_dsp_of_get_memories(struct udevice *dev)
>   for (i = 0; i < dsp->num_mems; i++) {
>   /* C71 cores only have a L1P Cache, there are no L1P SRAMs */
>   if (((device_is_compatible(dev, "ti,j721e-c71-dsp")) ||
> -  (device_is_compatible(dev, "ti,j721s2-c71-dsp"))) &&
> + (device_is_compatible(dev, "ti,j721s2-c71-dsp")) ||
> + (device_is_compatible(dev, "ti,am62a-c7xv-dsp"))) &&
>   !strcmp(mem_names[i], "l1pram")) {
>   dsp->mem[i].bus_addr = FDT_ADDR_T_NONE;
>   dsp->mem[i].dev_addr = FDT_ADDR_T_NONE;
> @@ -347,7 +348,14 @@ static int k3_dsp_of_get_memories(struct udevice *dev)
>   dsp->mem[i].size = 0;
>   continue;
>   }
> -
> + if (device_is_compatible(dev, "ti,am62a-c7xv-dsp") &&
> + !strcmp(mem_names[i], "l1dram")) {
> + dsp->mem[i].bus_addr = FDT_ADDR_T_NONE;
> + dsp->mem[i].dev_addr = FDT_ADDR_T_NONE;
> + dsp->mem[i].cpu_addr = NULL;
> + dsp->mem[i].size = 0;
> + continue;
> + }
>   dsp->mem[i].bus_addr = dev_read_addr_size_name(dev, 
> mem_names[i],
> (fdt_addr_t *)>mem[i].size);
>   if (dsp->mem[i].bus_addr == FDT_ADDR_T_NONE) {
> @@ -459,6 +467,7 @@ static const struct udevice_id k3_dsp_ids[] = {
>   { .compatible = "ti,j721e-c66-dsp", .data = (ulong)_data, },
>   { .compatible = "ti,j721e-c71-dsp", .data = (ulong)_data, },
>   { .compatible = "ti,j721s2-c71-dsp", .data = (ulong)_data, },
> + { .compatible = "ti,am62a-c7xv-dsp", .data = (ulong)_data, },
>   {}
>  };
>  


Re: [PATCH v2 26/28] asn1_decoder: remove ASN1 decoder when using MbedTLS

2024-05-09 Thread Ilias Apalodimas
On Tue, 7 May 2024 at 21:03, Raymond Mao  wrote:
>
> When building with MbedTLS, we are using MbedTLS to decode ASN1 data
> for x509, pkcs7 and mscode. So we can remove asn1_decoder when
> MBEDTLS_LIB_X509 is enabled.
>
> Signed-off-by: Raymond Mao 
> ---
> Changes in v2
> - Initial patch.
>
>  lib/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/Makefile b/lib/Makefile
> index 3534b3301ae..7e3dc1084fb 100644
> --- a/lib/Makefile
> +++ b/lib/Makefile
> @@ -82,7 +82,9 @@ obj-$(CONFIG_$(SPL_)SHA512) += sha512.o
>  endif
>
>  obj-$(CONFIG_CRYPT_PW) += crypt/
> +ifneq ($(CONFIG_MBEDTLS_LIB_X509), y)
>  obj-$(CONFIG_$(SPL_)ASN1_DECODER) += asn1_decoder.o
> +endif
>
>  obj-$(CONFIG_$(SPL_)ZLIB) += zlib/
>  obj-$(CONFIG_$(SPL_)ZSTD) += zstd/
> --
> 2.25.1
>

Reviewed-by: Ilias Apalodimas 


Re: [PATCH v4 01/19] doc: uefi: capsules: Add Capsule Update porting section

2024-05-09 Thread Ilias Apalodimas
On Thu, 9 May 2024 at 19:41, Jonathan Humphreys  wrote:
>
> Created a capsule update porting section in the documentation that outlines
> the steps a board developer must do when porting from an existing reference
> board implementation.
>
> In particular, added a big warning that new capsule GUID's need to be
> defined.
>
> Signed-off-by: Jonathan Humphreys 
> ---
>  doc/develop/uefi/uefi.rst | 12 
>  1 file changed, 12 insertions(+)
>
> diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst
> index 0389b269c01..36ac75278fa 100644
> --- a/doc/develop/uefi/uefi.rst
> +++ b/doc/develop/uefi/uefi.rst
> @@ -631,6 +631,18 @@ where version.dtso looks like::
>  The properties of image-type-id and image-index must match the value
>  defined in the efi_fw_image array as image_type_id and image_index.
>
> +Porting Capsule Updates to new boards
> +*
> +
> +It is important, when using a reference board as a starting point for a 
> custom
> +board, that certain steps are taken to properly support Capsule Updates.
> +
> +Capsule GUIDs need to be unique for each firmware and board. That is, if two
> +firmwares are built from the same source but result in different binaries
> +because they are built for different boards, they should have different 
> GUIDs.
> +Therefore it is important when creating support for a new board, new GUIDs 
> are
> +defined in the board's header file.  *DO NOT* reuse capsule GUIDs.
> +
>  Executing the boot manager
>  ~~
>
> --
> 2.34.1
>

Reviewed-by: Ilias Apalodimas 


Re: [PATCH v2 3/6] arch: arm: dts: k3-am68-sk-r5: Sync with J721s2 R5 file

2024-05-09 Thread Manorit Chawdhry
Hi Nishanth,

On 07:29-20240509, Nishanth Menon wrote:
> On 15:23-20240509, Manorit Chawdhry wrote:
> > Currently AM68 SK boots with J721s2 R5 DTS and then later changes to
> > AM68 SK DT during runtime.
> > 
> > To split the support of J721s2 and AM68, sync AM68 R5 DT with J721s2 R5
> > DT as that contains some essential node changes for booting up AM68
> > using AM68 R5 DT.
> > 
> > secure_proxy_mcu and secure_proxy_sa3 node changes are required for
> > establishing contact with TIFS running on M4 core, and the addition of
> 
> s/TIFS/ROM and TIFS - you need sa2 sproxy for ROM and mcu sproxy for
> TIFS.
> 

Thanks for the clarification! Was a bit confused in both of them
actually. Updated the message v3.

Regards,
Manorit

> M4 Core is generic - SMS M4 core will clarify.
> 
> > new power domain helps in holding A72 in reset for configuration of
> > firewalls.
> 
> s/A72/A72 Cluster/
> 

> 
> [...]
> 
> -- 
> Regards,
> Nishanth Menon
> Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 
> 849D 1736 249D


[PATCH v3 6/6] arm: dts: k3-j721s2|am68: Migrate to OF_UPSTREAM

2024-05-09 Thread Manorit Chawdhry
Use OF_UPSTREAM to pull Linux DT from dts/ tree

Signed-off-by: Manorit Chawdhry 
---
 arch/arm/dts/Makefile  |4 +-
 arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi |   20 +-
 arch/arm/dts/k3-am68-sk-base-board.dts |  611 ---
 arch/arm/dts/k3-am68-sk-som.dtsi   |  259 ---
 arch/arm/dts/k3-j721s2-binman.dtsi |2 +-
 .../dts/k3-j721s2-common-proc-board-u-boot.dtsi|   18 +-
 arch/arm/dts/k3-j721s2-common-proc-board.dts   |  504 -
 arch/arm/dts/k3-j721s2-main.dtsi   | 1928 
 arch/arm/dts/k3-j721s2-mcu-wakeup.dtsi |  738 
 arch/arm/dts/k3-j721s2-som-p0.dtsi |  361 
 arch/arm/dts/k3-j721s2-thermal.dtsi|  101 -
 arch/arm/dts/k3-j721s2.dtsi|  175 --
 board/ti/j721s2/MAINTAINERS|8 -
 configs/am68_sk_a72_defconfig  |6 +-
 configs/j721s2_evm_a72_defconfig   |5 +-
 15 files changed, 23 insertions(+), 4717 deletions(-)

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index c9f1b25ad647..60660f24d942 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1331,9 +1331,7 @@ dtb-$(CONFIG_SOC_K3_J721E) += 
k3-j721e-common-proc-board.dtb \
  k3-j721e-beagleboneai64.dtb \
  k3-j721e-r5-beagleboneai64.dtb
 
-dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-board.dtb\
-  k3-am68-sk-r5-base-board.dtb\
-  k3-j721s2-common-proc-board.dtb\
+dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-r5-base-board.dtb\
   k3-j721s2-r5-common-proc-board.dtb
 
 dtb-$(CONFIG_SOC_K3_J784S4) += k3-am69-r5-sk.dtb \
diff --git a/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi 
b/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
index dca588485d41..4b8d73a92d6a 100644
--- a/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
@@ -19,10 +19,14 @@
 
 _mcu_wakeup {
bootph-all;
+};
 
-   chipid@4314 {
-   bootph-all;
-   };
+_conf {
+   bootph-all;
+};
+
+ {
+   bootph-all;
 };
 
 _navss {
@@ -34,14 +38,6 @@
 };
 
 _udmap {
-   reg =   <0x0 0x285c 0x0 0x100>,
-   <0x0 0x284c 0x0 0x4000>,
-   <0x0 0x2a80 0x0 0x4>,
-   <0x0 0x284a 0x0 0x4000>,
-   <0x0 0x2aa0 0x0 0x4>,
-   <0x0 0x2840 0x0 0x2000>;
-   reg-names = "gcfg", "rchan", "rchanrt", "tchan",
-   "tchanrt", "rflow";
bootph-all;
 };
 
@@ -132,7 +128,7 @@
 
 #ifdef CONFIG_TARGET_J721S2_A72_EVM
 
-#define SPL_AM68_SK_DTB "spl/dts/k3-am68-sk-base-board.dtb"
+#define SPL_AM68_SK_DTB "spl/dts/ti/k3-am68-sk-base-board.dtb"
 #define AM68_SK_DTB "u-boot.dtb"
 
 _j721s2_evm_dtb {
diff --git a/arch/arm/dts/k3-am68-sk-base-board.dts 
b/arch/arm/dts/k3-am68-sk-base-board.dts
deleted file mode 100644
index 1e1a82f9d2b8..
--- a/arch/arm/dts/k3-am68-sk-base-board.dts
+++ /dev/null
@@ -1,611 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
- *
- * Base Board: https://www.ti.com/lit/zip/SPRR463
- */
-
-/dts-v1/;
-
-#include "k3-am68-sk-som.dtsi"
-#include 
-#include 
-#include 
-
-#include "k3-serdes.h"
-
-/ {
-   compatible = "ti,am68-sk", "ti,j721s2";
-   model = "Texas Instruments AM68 SK";
-
-   chosen {
-   stdout-path = "serial2:115200n8";
-   };
-
-   aliases {
-   serial0 = _uart0;
-   serial1 = _uart0;
-   serial2 = _uart8;
-   mmc1 = _sdhci1;
-   can0 = _mcan0;
-   can1 = _mcan1;
-   can2 = _mcan6;
-   can3 = _mcan7;
-   };
-
-   vusb_main: regulator-vusb-main5v0 {
-   /* USB MAIN INPUT 5V DC */
-   compatible = "regulator-fixed";
-   regulator-name = "vusb-main5v0";
-   regulator-min-microvolt = <500>;
-   regulator-max-microvolt = <500>;
-   regulator-always-on;
-   regulator-boot-on;
-   };
-
-   vsys_3v3: regulator-vsys3v3 {
-   /* Output of LM5141 */
-   compatible = "regulator-fixed";
-   regulator-name = "vsys_3v3";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   vin-supply = <_main>;
-   regulator-always-on;
-   regulator-boot-on;
-   };
-
-   vdd_mmc1: regulator-sd {
-   /* Output of TPS22918 */
-   compatible = "regulator-fixed";
-   regulator-name = "vdd_mmc1";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-

[PATCH v3 5/6] configs: am68_sk: Move to separate defconfig for AM68 SK board

2024-05-09 Thread Manorit Chawdhry
Add defconfig for AM68 SK R5 and A72 configuration.

This includes and modifies the AM68 EVM defconfigs:
j721s2_evm_r5_defconfig -> am68_sk_r5_defconfig
j721s2_evm_a72_defconfig -> am68_sk_a72_defconfig

Reviewed-by: Neha Malcom Francis 
Signed-off-by: Manorit Chawdhry 
---
 arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi | 23 +++
 arch/arm/dts/k3-j721s2-binman.dtsi | 89 +-
 board/ti/j721s2/MAINTAINERS|  2 +
 configs/am68_sk_a72_defconfig  | 10 +++
 configs/am68_sk_r5_defconfig   | 10 +++
 configs/j721s2_evm_a72_defconfig   |  2 +-
 configs/j721s2_evm_r5_defconfig|  2 +-
 7 files changed, 49 insertions(+), 89 deletions(-)

diff --git a/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi 
b/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
index b8fc62f0dd1c..dca588485d41 100644
--- a/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
@@ -129,3 +129,26 @@
dr_mode = "peripheral";
bootph-all;
 };
+
+#ifdef CONFIG_TARGET_J721S2_A72_EVM
+
+#define SPL_AM68_SK_DTB "spl/dts/k3-am68-sk-base-board.dtb"
+#define AM68_SK_DTB "u-boot.dtb"
+
+_j721s2_evm_dtb {
+   filename = SPL_AM68_SK_DTB;
+};
+
+_evm_dtb {
+   filename = AM68_SK_DTB;
+};
+
+_j721s2_evm_dtb_unsigned {
+   filename = SPL_AM68_SK_DTB;
+};
+
+_evm_dtb_unsigned {
+   filename = AM68_SK_DTB;
+};
+
+#endif
diff --git a/arch/arm/dts/k3-j721s2-binman.dtsi 
b/arch/arm/dts/k3-j721s2-binman.dtsi
index 7efb135bdff9..c46fda66b0b2 100644
--- a/arch/arm/dts/k3-j721s2-binman.dtsi
+++ b/arch/arm/dts/k3-j721s2-binman.dtsi
@@ -142,10 +142,7 @@
 #ifdef CONFIG_TARGET_J721S2_A72_EVM
 
 #define SPL_J721S2_EVM_DTB "spl/dts/k3-j721s2-common-proc-board.dtb"
-#define SPL_AM68_SK_DTB "spl/dts/k3-am68-sk-base-board.dtb"
-
 #define J721S2_EVM_DTB "u-boot.dtb"
-#define AM68_SK_DTB "arch/arm/dts/k3-am68-sk-base-board.dtb"
 
  {
ti-dm {
@@ -306,20 +303,6 @@
};
 
};
-
-   fdt-1 {
-   description = "k3-am68-sk-base-board";
-   type = "flat_dt";
-   arch = "arm";
-   compression = "none";
-   ti-secure {
-   content = <_am68_sk_dtb>;
-   keyfile = "custMpk.pem";
-   };
-   spl_am68_sk_dtb: blob-ext {
-   filename = SPL_AM68_SK_DTB;
-   };
-   };
};
 
configurations {
@@ -331,13 +314,6 @@
loadables = "tee", "dm", "spl";
fdt = "fdt-0";
};
-
-   conf-1 {
-   description = "k3-am68-sk-base-board";
-   firmware = "atf";
-   loadables = "tee", "dm", "spl";
-   fdt = "fdt-1";
-   };
};
};
};
@@ -370,25 +346,6 @@
algo = "crc32";
};
};
-
-   fdt-1 {
-   description = "k3-am68-sk-base-board";
-   type = "flat_dt";
-   arch = "arm";
-   compression = "none";
-   ti-secure {
-   content = <_sk_dtb>;
-   keyfile = "custMpk.pem";
-   };
-   am68_sk_dtb: blob-ext {
-   filename = AM68_SK_DTB;
-   };
-
-   hash {
-   algo = "crc32";
-   };
-   };
-
};
 
configurations {
@@ -400,13 +357,6 @@
loadables = "uboot";
fdt = "fdt-0";
};
-   conf-1 {
-   description = "k3-am68-sk-base-board";
-   firmware = "uboot";
-  

[PATCH v3 4/6] arch: arm: dts: k3-j721s2-r5: Introduce k3-j721s2-r5.dtsi

2024-05-09 Thread Manorit Chawdhry
Create an SoC R5 dtsi file that could be used at board level R5 files. This
would help in keeping the SoC level changes in sync across board files.

Reviewed-by: Neha Malcom Francis 
Signed-off-by: Manorit Chawdhry 
---
 arch/arm/dts/k3-am68-sk-r5-base-board.dts   | 78 +---
 arch/arm/dts/k3-j721s2-r5-common-proc-board.dts | 78 +---
 arch/arm/dts/k3-j721s2-r5.dtsi  | 81 +
 board/ti/j721s2/MAINTAINERS |  1 +
 4 files changed, 84 insertions(+), 154 deletions(-)

diff --git a/arch/arm/dts/k3-am68-sk-r5-base-board.dts 
b/arch/arm/dts/k3-am68-sk-r5-base-board.dts
index 038b08dc3e01..3b2d7af2e528 100644
--- a/arch/arm/dts/k3-am68-sk-r5-base-board.dts
+++ b/arch/arm/dts/k3-am68-sk-r5-base-board.dts
@@ -9,80 +9,4 @@
 #include "k3-j721s2-ddr-evm-lp4-4266.dtsi"
 #include "k3-j721s2-ddr.dtsi"
 #include "k3-am68-sk-base-board-u-boot.dtsi"
-
-/ {
-   chosen {
-   tick-timer = _timer0;
-   };
-
-   aliases {
-   remoteproc0 = 
-   remoteproc1 = _0;
-   };
-
-   a72_0: a72@0 {
-   compatible = "ti,am654-rproc";
-   reg = <0x0 0x00a9 0x0 0x10>;
-   power-domains = <_pds 61 TI_SCI_PD_EXCLUSIVE>,
-   <_pds 202 TI_SCI_PD_EXCLUSIVE>,
-   <_pds 4 TI_SCI_PD_EXCLUSIVE>;
-   resets = <_reset 202 0>;
-   clocks = <_clks 61 1>;
-   assigned-clocks = <_clks 61 1>, <_clks 202 0>;
-   assigned-clock-parents = <_clks 61 2>;
-   assigned-clock-rates = <2>, <20>;
-   ti,sci = <>;
-   ti,sci-proc-id = <32>;
-   ti,sci-host-id = <10>;
-   bootph-pre-ram;
-   };
-
-   dm_tifs: dm-tifs {
-   compatible = "ti,j721e-dm-sci";
-   ti,host-id = <3>;
-   ti,secure-host;
-   mbox-names = "rx", "tx";
-   mboxes= <_proxy_mcu 21>,
-   <_proxy_mcu 23>;
-   bootph-pre-ram;
-   };
-};
-
-_timer0 {
-   clock-frequency = <25000>;
-   bootph-pre-ram;
-};
-
-_proxy_mcu {
-   bootph-pre-ram;
-   status = "okay";
-};
-
-_proxy_sa3 {
-   bootph-pre-ram;
-   status = "okay";
-};
-
-_mcu_wakeup {
-   sysctrler: sysctrler {
-   compatible = "ti,am654-system-controller";
-   mboxes= <_proxy_mcu 4>, <_proxy_mcu 5>, 
<_proxy_sa3 5>;
-   mbox-names = "tx", "rx", "boot_notify";
-   bootph-pre-ram;
-   };
-};
-
- {
-   mboxes= <_proxy_mcu 8>, <_proxy_mcu 6>, 
<_proxy_mcu 5>;
-   mbox-names = "tx", "rx", "notify";
-   ti,host-id = <4>;
-   ti,secure-host;
-};
-
-_ringacc {
-   ti,sci = <_tifs>;
-};
-
-_udmap {
-   ti,sci = <_tifs>;
-};
+#include "k3-j721s2-r5.dtsi"
diff --git a/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts 
b/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts
index 03bd680f4421..e92b1917df4e 100644
--- a/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts
+++ b/arch/arm/dts/k3-j721s2-r5-common-proc-board.dts
@@ -9,80 +9,4 @@
 #include "k3-j721s2-ddr-evm-lp4-4266.dtsi"
 #include "k3-j721s2-ddr.dtsi"
 #include "k3-j721s2-common-proc-board-u-boot.dtsi"
-
-/ {
-   chosen {
-   tick-timer = _timer0;
-   };
-
-   aliases {
-   remoteproc0 = 
-   remoteproc1 = _0;
-   };
-
-   a72_0: a72@0 {
-   compatible = "ti,am654-rproc";
-   reg = <0x0 0x00a9 0x0 0x10>;
-   power-domains = <_pds 61 TI_SCI_PD_EXCLUSIVE>,
-   <_pds 202 TI_SCI_PD_EXCLUSIVE>,
-   <_pds 4 TI_SCI_PD_EXCLUSIVE>;
-   resets = <_reset 202 0>;
-   clocks = <_clks 61 1>;
-   assigned-clocks = <_clks 61 1>, <_clks 202 0>;
-   assigned-clock-parents = <_clks 61 2>;
-   assigned-clock-rates = <2>, <20>;
-   ti,sci = <>;
-   ti,sci-proc-id = <32>;
-   ti,sci-host-id = <10>;
-   bootph-pre-ram;
-   };
-
-   dm_tifs: dm-tifs {
-   compatible = "ti,j721e-dm-sci";
-   ti,host-id = <3>;
-   ti,secure-host;
-   mbox-names = "rx", "tx";
-   mboxes= <_proxy_mcu 21>,
-   <_proxy_mcu 23>;
-   bootph-pre-ram;
-   };
-};
-
-_timer0 {
-   clock-frequency = <25000>;
-   bootph-pre-ram;
-};
-
-_proxy_sa3 {
-   bootph-pre-ram;
-   status = "okay";
-};
-
-_proxy_mcu {
-   bootph-pre-ram;
-   status = "okay";
-};
-
-_mcu_wakeup {
-   sysctrler: sysctrler {
-   compatible = "ti,am654-system-controller";
-   mboxes= <_proxy_mcu 4>, <_proxy_mcu 5>, 
<_proxy_sa3 5>;
-   mbox-names = "tx", "rx", "boot_notify";
- 

[PATCH v3 3/6] arch: arm: dts: k3-am68-sk-r5: Sync with J721s2 R5 file

2024-05-09 Thread Manorit Chawdhry
Currently AM68 SK boots with J721s2 R5 DTS and then later changes to
AM68 SK DT during runtime.

To split the support of J721s2 and AM68, sync AM68 R5 DT with J721s2 R5
DT as that contains some essential node changes for booting up AM68
using AM68 R5 DT.

secure_proxy_sa3 and secure_proxy_mcu node changes are required for
establishing contact with ROM and TIFS running on SMS M4 core,
respectively, and the addition of new power domain helps in holding A72
cluster in reset for configuration of firewalls.

Reviewed-by: Neha Malcom Francis 
Signed-off-by: Manorit Chawdhry 
---
 arch/arm/dts/k3-am68-sk-r5-base-board.dts | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-am68-sk-r5-base-board.dts 
b/arch/arm/dts/k3-am68-sk-r5-base-board.dts
index 695aadc287bd..038b08dc3e01 100644
--- a/arch/arm/dts/k3-am68-sk-r5-base-board.dts
+++ b/arch/arm/dts/k3-am68-sk-r5-base-board.dts
@@ -24,7 +24,8 @@
compatible = "ti,am654-rproc";
reg = <0x0 0x00a9 0x0 0x10>;
power-domains = <_pds 61 TI_SCI_PD_EXCLUSIVE>,
-   <_pds 202 TI_SCI_PD_EXCLUSIVE>;
+   <_pds 202 TI_SCI_PD_EXCLUSIVE>,
+   <_pds 4 TI_SCI_PD_EXCLUSIVE>;
resets = <_reset 202 0>;
clocks = <_clks 61 1>;
assigned-clocks = <_clks 61 1>, <_clks 202 0>;
@@ -54,10 +55,12 @@
 
 _proxy_mcu {
bootph-pre-ram;
+   status = "okay";
 };
 
 _proxy_sa3 {
bootph-pre-ram;
+   status = "okay";
 };
 
 _mcu_wakeup {

-- 
2.43.2



[PATCH v3 2/6] configs: j721s2_evm_a72_defconfig: Switch to bootstd

2024-05-09 Thread Manorit Chawdhry
From: Neha Malcom Francis 

Switch to using bootstd. Note that with this change, we will stop using
distro_bootcmd and instead depend entirely on bootflow method of
starting the system up.

Also config_distro_bootcmd.h header file that is no longer needed in
j721s2_evm.h.

Signed-off-by: Neha Malcom Francis 
Signed-off-by: Manorit Chawdhry 
---
 configs/j721s2_evm_a72_defconfig | 5 +++--
 include/configs/j721s2_evm.h | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configs/j721s2_evm_a72_defconfig b/configs/j721s2_evm_a72_defconfig
index 19cd44b068c0..8b02d07a9f09 100644
--- a/configs/j721s2_evm_a72_defconfig
+++ b/configs/j721s2_evm_a72_defconfig
@@ -33,9 +33,10 @@ CONFIG_SPL_SPI=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x8100
-CONFIG_DISTRO_DEFAULTS=y
 CONFIG_OF_SYSTEM_SETUP=y
-CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;"
+CONFIG_BOOTSTD_FULL=y
+CONFIG_BOOTSTD_DEFAULTS=y
+CONFIG_BOOTCOMMAND="run envboot; bootflow scan -lb"
 CONFIG_LOGLEVEL=7
 CONFIG_SPL_MAX_SIZE=0xc
 CONFIG_SPL_BOARD_INIT=y
diff --git a/include/configs/j721s2_evm.h b/include/configs/j721s2_evm.h
index 846cfa7531cc..6186ec32b1d8 100644
--- a/include/configs/j721s2_evm.h
+++ b/include/configs/j721s2_evm.h
@@ -10,7 +10,6 @@
 #define __CONFIG_J721S2_EVM_H
 
 #include 
-#include 
 
 /* SPL Loader Configuration */
 #if defined(CONFIG_TARGET_J721S2_A72_EVM)

-- 
2.43.2



[PATCH v3 1/6] board: ti: j721s2: j721s2.env: Add explicit boot_targets

2024-05-09 Thread Manorit Chawdhry
From: Neha Malcom Francis 

Add explicit boot_targets to indicate the specific boot sequence to
follow.

Signed-off-by: Neha Malcom Francis 
Signed-off-by: Manorit Chawdhry 
---
 board/ti/j721s2/j721s2.env | 1 +
 1 file changed, 1 insertion(+)

diff --git a/board/ti/j721s2/j721s2.env b/board/ti/j721s2/j721s2.env
index 9a03b9f30aee..a6b22550809e 100644
--- a/board/ti/j721s2/j721s2.env
+++ b/board/ti/j721s2/j721s2.env
@@ -13,6 +13,7 @@ args_all=setenv optargs earlycon=ns16550a,mmio32,0x0288
${mtdparts}
 run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
 
+boot_targets=mmc1 mmc0 usb pxe dhcp
 boot=mmc
 mmcdev=1
 bootpart=1:2

-- 
2.43.2



[PATCH v3 0/6] Enable OF_UPSTREAM for J721s2 and AM68

2024-05-09 Thread Manorit Chawdhry
Series splits AM68 and J721s2 support along with enabling OF_UPSTREAM
and adding stdboot support for both the platforms.

Boot logs: https://gist.github.com/manorit2001/6c669e4273933bc46c3b28a631a96ae3

Signed-off-by: Manorit Chawdhry 
---
Changes in v3:
- Improve the commit message (Nishanth)
- Link to v2: 
https://lore.kernel.org/r/20240509-b4-upstream-j721s2-of-upstream-v2-0-149563cd4...@ti.com

---
Manorit Chawdhry (4):
  arch: arm: dts: k3-am68-sk-r5: Sync with J721s2 R5 file
  arch: arm: dts: k3-j721s2-r5: Introduce k3-j721s2-r5.dtsi
  configs: am68_sk: Move to separate defconfig for AM68 SK board
  arm: dts: k3-j721s2|am68: Migrate to OF_UPSTREAM

Neha Malcom Francis (2):
  board: ti: j721s2: j721s2.env: Add explicit boot_targets
  configs: j721s2_evm_a72_defconfig: Switch to bootstd

 arch/arm/dts/Makefile  |4 +-
 arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi |   41 +-
 arch/arm/dts/k3-am68-sk-base-board.dts |  611 ---
 arch/arm/dts/k3-am68-sk-r5-base-board.dts  |   75 +-
 arch/arm/dts/k3-am68-sk-som.dtsi   |  259 ---
 arch/arm/dts/k3-j721s2-binman.dtsi |   91 +-
 .../dts/k3-j721s2-common-proc-board-u-boot.dtsi|   18 +-
 arch/arm/dts/k3-j721s2-common-proc-board.dts   |  504 -
 arch/arm/dts/k3-j721s2-main.dtsi   | 1928 
 arch/arm/dts/k3-j721s2-mcu-wakeup.dtsi |  738 
 arch/arm/dts/k3-j721s2-r5-common-proc-board.dts|   78 +-
 arch/arm/dts/k3-j721s2-r5.dtsi |   81 +
 arch/arm/dts/k3-j721s2-som-p0.dtsi |  361 
 arch/arm/dts/k3-j721s2-thermal.dtsi|  101 -
 arch/arm/dts/k3-j721s2.dtsi|  175 --
 board/ti/j721s2/MAINTAINERS|   11 +-
 board/ti/j721s2/j721s2.env |1 +
 configs/am68_sk_a72_defconfig  |   10 +
 configs/am68_sk_r5_defconfig   |   10 +
 configs/j721s2_evm_a72_defconfig   |   10 +-
 configs/j721s2_evm_r5_defconfig|2 +-
 include/configs/j721s2_evm.h   |1 -
 22 files changed, 155 insertions(+), 4955 deletions(-)
---
base-commit: 2f1e76bcfee75b9f99ade63002c05ffaaec86afb
change-id: 20240506-b4-upstream-j721s2-of-upstream-3c28ff12d664

Best regards,
-- 
Manorit Chawdhry 



[PATCH v2] rockchip: rv1126: Migrate to OF_UPSTREAM

2024-05-09 Thread Anand Moon
Migrate RV1126 boards that exists in Linux v6.8 to use OF_UPSTREAM.

Following targets is migrated to use OF_UPSTREAM:

- rv1126-edgeble-neu2 : Board is an industrial form factor
IO board.
- sonoff-ihost-rv1126 : Gateway device designed to provide a
Smart Home Hub.

Cc: Tim Lunn 
Cc: Jagan Teki 
Signed-off-by: Anand Moon 
---
v2: remove the dt-bindings for clock and power
fix the typo in commit message

Tested on neu2 board.
---
 arch/arm/dts/Makefile |   3 -
 arch/arm/dts/rv1126-edgeble-neu2-io.dts   | 112 
 arch/arm/dts/rv1126-edgeble-neu2.dtsi | 345 --
 arch/arm/dts/rv1126-pinctrl.dtsi  | 341 --
 arch/arm/dts/rv1126-sonoff-ihost.dts  |  29 -
 arch/arm/dts/rv1126-sonoff-ihost.dtsi | 404 ---
 arch/arm/dts/rv1126.dtsi  | 623 -
 arch/arm/mach-rockchip/Kconfig|   1 +
 configs/neu2-io-rv1126_defconfig  |   2 +-
 configs/sonoff-ihost-rv1126_defconfig |   2 +-
 .../dt-bindings/clock/rockchip,rv1126-cru.h   | 632 --
 .../dt-bindings/power/rockchip,rv1126-power.h |  35 -
 12 files changed, 3 insertions(+), 2526 deletions(-)
 delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2-io.dts
 delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2.dtsi
 delete mode 100644 arch/arm/dts/rv1126-pinctrl.dtsi
 delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dts
 delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dtsi
 delete mode 100644 arch/arm/dts/rv1126.dtsi
 delete mode 100644 include/dt-bindings/clock/rockchip,rv1126-cru.h
 delete mode 100644 include/dt-bindings/power/rockchip,rv1126-power.h

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 087645f354..79fc100dce 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -97,9 +97,6 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \
rk3368-geekbox.dtb \
rk3368-px5-evb.dtb \
 
-dtb-$(CONFIG_ROCKCHIP_RV1126) += \
-   rv1126-edgeble-neu2-io.dtb
-
 dtb-$(CONFIG_ARCH_S5P4418) += \
s5p4418-nanopi2.dtb
 
diff --git a/arch/arm/dts/rv1126-edgeble-neu2-io.dts 
b/arch/arm/dts/rv1126-edgeble-neu2-io.dts
deleted file mode 100644
index 0c2396b8f8..00
--- a/arch/arm/dts/rv1126-edgeble-neu2-io.dts
+++ /dev/null
@@ -1,112 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
- * Copyright (c) 2022 Edgeble AI Technologies Pvt. Ltd.
- */
-
-/dts-v1/;
-#include "rv1126.dtsi"
-#include "rv1126-edgeble-neu2.dtsi"
-
-/ {
-   model = "Edgeble Neu2 IO Board";
-   compatible = "edgeble,neural-compute-module-2-io",
-"edgeble,neural-compute-module-2", "rockchip,rv1126";
-
-   aliases {
-   serial2 = 
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-
-   vcc12v_dcin: vcc12v-dcin-regulator {
-   compatible = "regulator-fixed";
-   regulator-name = "vcc12v_dcin";
-   regulator-always-on;
-   regulator-boot-on;
-   regulator-min-microvolt = <1200>;
-   regulator-max-microvolt = <1200>;
-   };
-
-   vcc5v0_sys: vcc5v0-sys-regulator {
-   compatible = "regulator-fixed";
-   regulator-name = "vcc5v0_sys";
-   regulator-always-on;
-   regulator-boot-on;
-   regulator-min-microvolt = <500>;
-   regulator-max-microvolt = <500>;
-   vin-supply = <_dcin>;
-   };
-
-   v3v3_sys: v3v3-sys-regulator {
-   compatible = "regulator-fixed";
-   regulator-name = "v3v3_sys";
-   regulator-always-on;
-   regulator-boot-on;
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   vin-supply = <_sys>;
-   };
-};
-
- {
-   assigned-clocks = < CLK_GMAC_SRC>, < CLK_GMAC_TX_RX>,
- < CLK_GMAC_ETHERNET_OUT>;
-   assigned-clock-parents = < CLK_GMAC_SRC_M1>, < RGMII_MODE_CLK>;
-   assigned-clock-rates = <12500>, <0>, <2500>;
-   clock_in_out = "input";
-   phy-handle = <>;
-   phy-mode = "rgmii";
-   phy-supply = <_3v3>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_miim _bus2 _bus4 
_out_ethernetm1_pins>;
-   tx_delay = <0x2a>;
-   rx_delay = <0x1a>;
-   status = "okay";
-};
-
- {
-   phy: ethernet-phy@0 {
-   compatible = "ethernet-phy-id001c.c916",
-"ethernet-phy-ieee802.3-c22";
-   reg = <0x0>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_phy_rst>;
-   reset-assert-us = <2>;
-   reset-deassert-us = <10>;
-   reset-gpios = < RK_PB6 GPIO_ACTIVE_LOW>;
-   };
-};
-
- {
-   ethernet {
-  

Re: [PATCH v2] sysreset: psci: drop reliance on SPL support

2024-05-09 Thread Tom Rini
On Fri, May 10, 2024 at 12:06:00AM +0100, Andre Przywara wrote:

> At the moment enabling CONFIG_SYSRESET_PSCI *selects* SPL_ARM_PSCI_FW,
> even though this is a platform design property, so nothing any driver
> should enforce. Some platforms load the PSCI runtime (TF-A) only in the
> SPL, so PSCI is naturally not available during SPL runtime.
> 
> Spit CONFIG_SYSRESET_PSCI up into an SPL and a U-Boot proper version,
> and let the former *depend* on SPL_ARM_PSCI_FW.
> 
> This allows to enable CONFIG_SYSRESET_PSCI on platforms without SPL PSCI
> support.
> 
> Signed-off-by: Andre Przywara 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH 41/81] misc: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:30, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Tom Rini 
Cc: Simon Glass 
Cc: Sean Anderson 
Cc: Eugen Hristev 
Cc: Mario Six 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Michael Walle 
Cc: Patrick Delaunay 
Cc: Patrice Chotard 
Cc: Thierry Reding 
Cc: Svyatoslav Ryhel 
Cc: Liviu Dudau 
Cc: "Michał Barnaś" 
Cc: Bin Meng 
Cc: Dan Carpenter 
Cc: "Milan P. Stanić" 
Cc: Neha Malcom Francis 
Cc: Nishanth Menon 
Cc: Marek Vasut 
Cc: Michel Alex 
Cc: Stefano Babic 
Cc: Peng Fan 
Cc: Igor Opaniuk 
Cc: Clement Faure 
Cc: Mathieu Othacehe 
Cc: Ye Li 
Cc: Jim Liu 
Cc: Heinrich Schuchardt 
Cc: Ilias Apalodimas 
Cc: Tim Lunn 
Cc: "Marek Behún" 
Cc: Stefan Roese 
---
  drivers/misc/altera_sysid.c  | 1 -
  drivers/misc/atsha204a-i2c.c | 1 -
  drivers/misc/cbmem_console.c | 2 +-
  drivers/misc/cros_ec.c   | 2 +-
  drivers/misc/cros_ec_i2c.c   | 1 -
  drivers/misc/cros_ec_lpc.c   | 2 +-
  drivers/misc/cros_ec_sandbox.c   | 2 +-
  drivers/misc/cros_ec_spi.c   | 2 +-
  drivers/misc/ds4510.c| 1 -
  drivers/misc/esm_pmic.c  | 1 -
  drivers/misc/fs_loader.c | 1 -
  drivers/misc/fsl_devdis.c| 2 +-
  drivers/misc/fsl_ifc.c   | 2 +-
  drivers/misc/fsl_iim.c   | 1 -
  drivers/misc/fsl_portals.c   | 2 +-
  drivers/misc/fsl_sec_mon.c   | 2 +-
  drivers/misc/gdsys_ioep.c| 1 -
  drivers/misc/gdsys_rxaui_ctrl.c  | 1 -
  drivers/misc/gdsys_soc.c | 1 -
  drivers/misc/gpio_led.c  | 1 -
  drivers/misc/i2c_eeprom.c| 1 -
  drivers/misc/i2c_eeprom_emul.c   | 1 -
  drivers/misc/ihs_fpga.c  | 1 -
  drivers/misc/imx8/fuse.c | 1 -
  drivers/misc/imx8/scu.c  | 1 -
  drivers/misc/imx8/scu_api.c  | 1 -
  drivers/misc/imx_ele/ele_api.c   | 1 -
  drivers/misc/imx_ele/ele_mu.c| 1 -
  drivers/misc/imx_ele/fuse.c  | 1 -
  drivers/misc/irq-uclass.c| 1 -
  drivers/misc/irq_sandbox.c   | 1 -
  drivers/misc/irq_sandbox_test.c  | 1 -
  drivers/misc/jz4780_efuse.c  | 1 -
  drivers/misc/k3_avs.c| 1 -
  drivers/misc/k3_esm.c| 1 -
  drivers/misc/ls2_sfp.c   | 1 -
  drivers/misc/microchip_flexcom.c | 1 -
  drivers/misc/misc-uclass.c   | 1 -
  drivers/misc/misc_sandbox.c  | 1 -
  drivers/misc/mpc83xx_serdes.c| 1 -
  drivers/misc/mxc_ocotp.c | 1 -
  drivers/misc/mxs_ocotp.c | 1 -
  drivers/misc/npcm_host_intf.c| 1 -
  drivers/misc/npcm_otp.c  | 1 -
  drivers/misc/nuvoton_nct6102d.c  | 1 -
  drivers/misc/nvmem.c | 1 -
  drivers/misc/p2sb-uclass.c   | 1 -
  drivers/misc/p2sb_emul.c | 1 -
  drivers/misc/p2sb_sandbox.c  | 1 -
  drivers/misc/pca9551_led.c   | 1 -
  drivers/misc/pwrseq-uclass.c | 1 -
  drivers/misc/qfw.c   | 1 -
  drivers/misc/rockchip-efuse.c| 1 -
  drivers/misc/rockchip-otp.c  | 1 -
  drivers/misc/sandbox_adder.c | 1 -
  drivers/misc/sifive-otp.c| 1 -
  drivers/misc/sl28cpld.c  | 1 -
  drivers/misc/smsc_lpc47m.c   | 1 -
  drivers/misc/smsc_sio1007.c  | 1 -
  drivers/misc/spltest_sandbox.c   | 1 -
  drivers/misc/status_led.c| 2 +-
  drivers/misc/stm32_rcc.c | 1 -
  drivers/misc/stm32mp_fuse.c  | 1 -
  drivers/misc/swap_case.c | 1 -
  drivers/misc/syscon_sandbox.c| 1 -
  drivers/misc/tegra186_bpmp.c | 1 -
  drivers/misc/tegra_car.c | 1 -
  drivers/misc/test_drv.c  | 1 -
  drivers/misc/turris_omnia_mcu.c  | 1 -
  drivers/misc/usb251xb.c  | 1 -
  drivers/misc/vexpress_config.c   | 1 -
  drivers/misc/winbond_w83627.c| 1 -
  72 files changed, 10 insertions(+), 72 deletions(-)

diff --git a/drivers/misc/altera_sysid.c b/drivers/misc/altera_sysid.c
index 878df12771c8..21e64fa3e6fe 100644
--- a/drivers/misc/altera_sysid.c
+++ b/drivers/misc/altera_sysid.c
@@ -4,7 +4,6 @@
   * Scott McNutt 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index 707daa90bdba..3b9046da880c 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -10,7 +10,6 @@
   * published by the Free Software Foundation.
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/misc/cbmem_console.c b/drivers/misc/cbmem_console.c
index ba3a599c4a51..8220addd579b 100644
--- a/drivers/misc/cbmem_console.c
+++ b/drivers/misc/cbmem_console.c
@@ -3,8 +3,8 @@
   * Copyright (C) 2011 The ChromiumOS Authors.  All rights reserved.
   */
  
-#include 

  #include 
+#include 
  #include 
  
  void cbmemc_putc(struct stdio_dev *dev, char data)

diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c
index 9c1e6a5e3e70..fabe4964a334 100644
--- a/drivers/misc/cros_ec.c
+++ b/drivers/misc/cros_ec.c
@@ -15,7 +15,6 @@
  
  #define LOG_CATEGORY 

Re: [PATCH] rockchip: rv1108: Remove unneeded local rv1108-cru.h

2024-05-09 Thread Kever Yang



On 2024/5/10 00:42, Fabio Estevam wrote:

After the conversion of RV1108 to OF_UPSTREAM,
include/dt-bindings/clock/rv1108-cru.h is no longer needed because
there is dts/upstream/include/dt-bindings/clock/rv1108-cru.h from
upstream Linux.

Remove the unneeded rv1108-cru.h file.

Reported-by: Jonas Karlman 
Signed-off-by: Fabio Estevam 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
  include/dt-bindings/clock/rv1108-cru.h | 356 -
  1 file changed, 356 deletions(-)
  delete mode 100644 include/dt-bindings/clock/rv1108-cru.h

diff --git a/include/dt-bindings/clock/rv1108-cru.h 
b/include/dt-bindings/clock/rv1108-cru.h
deleted file mode 100644
index 10ed9d140f4b..
--- a/include/dt-bindings/clock/rv1108-cru.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (c) 2017 Rockchip Electronics Co. Ltd.
- * Author: Shawn Lin 
- */
-
-#ifndef _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H
-#define _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H
-
-/* pll id */
-#define PLL_APLL   0
-#define PLL_DPLL   1
-#define PLL_GPLL   2
-#define ARMCLK 3
-
-/* sclk gates (special clocks) */
-#define SCLK_SPI0  65
-#define SCLK_NANDC 67
-#define SCLK_SDMMC 68
-#define SCLK_SDIO  69
-#define SCLK_EMMC  71
-#define SCLK_UART0 72
-#define SCLK_UART1 73
-#define SCLK_UART2 74
-#define SCLK_I2S0  75
-#define SCLK_I2S1  76
-#define SCLK_I2S2  77
-#define SCLK_TIMER078
-#define SCLK_TIMER179
-#define SCLK_SFC   80
-#define SCLK_SDMMC_DRV 81
-#define SCLK_SDIO_DRV  82
-#define SCLK_EMMC_DRV  83
-#define SCLK_SDMMC_SAMPLE  84
-#define SCLK_SDIO_SAMPLE   85
-#define SCLK_EMMC_SAMPLE   86
-#define SCLK_VENC_CORE 87
-#define SCLK_HEVC_CORE 88
-#define SCLK_HEVC_CABAC89
-#define SCLK_PWM0_PMU  90
-#define SCLK_I2C0_PMU  91
-#define SCLK_WIFI  92
-#define SCLK_CIFOUT93
-#define SCLK_MIPI_CSI_OUT  94
-#define SCLK_CIF0  95
-#define SCLK_CIF1  96
-#define SCLK_CIF2  97
-#define SCLK_CIF3  98
-#define SCLK_DSP   99
-#define SCLK_DSP_IOP   100
-#define SCLK_DSP_EPP   101
-#define SCLK_DSP_EDP   102
-#define SCLK_DSP_EDAP  103
-#define SCLK_CVBS_HOST 104
-#define SCLK_HDMI_SFR  105
-#define SCLK_HDMI_CEC  106
-#define SCLK_CRYPTO107
-#define SCLK_SPI   108
-#define SCLK_SARADC109
-#define SCLK_TSADC 110
-#define SCLK_MAC_PRE   111
-#define SCLK_MAC   112
-#define SCLK_MAC_RX113
-#define SCLK_MAC_REF   114
-#define SCLK_MAC_REFOUT115
-#define SCLK_DSP_PFM   116
-#define SCLK_RGA   117
-#define SCLK_I2C1  118
-#define SCLK_I2C2  119
-#define SCLK_I2C3  120
-#define SCLK_PWM   121
-#define SCLK_ISP   122
-#define SCLK_USBPHY123
-#define SCLK_I2S0_SRC  124
-#define SCLK_I2S1_SRC  125
-#define SCLK_I2S2_SRC  126
-#define SCLK_UART0_SRC 127
-#define SCLK_UART1_SRC 128
-#define SCLK_UART2_SRC 129
-#define SCLK_MAC_TX130
-#define SCLK_MACREF131
-#define SCLK_MACREF_OUT132
-
-#define DCLK_VOP_SRC   185
-#define DCLK_HDMIPHY   186
-#define DCLK_VOP   187
-
-/* aclk gates */
-#define ACLK_DMAC  192
-#define ACLK_PRE   193
-#define ACLK_CORE  194
-#define ACLK_ENMCORE   195
-#define ACLK_RKVENC196
-#define ACLK_RKVDEC197
-#define ACLK_VPU   198
-#define ACLK_CIF0  199
-#define ACLK_VIO0  200
-#define ACLK_VIO1  201
-#define ACLK_VOP   202
-#define ACLK_IEP   203
-#define ACLK_RGA   204
-#define ACLK_ISP   205
-#define ACLK_CIF1  206
-#define ACLK_CIF2  207
-#define ACLK_CIF3 

Re: [PATCH 74/81] video: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Anatolij Gustschin 
Cc: Tom Rini 
Cc: Matthias Brugger 
Cc: Peter Robinson 
Cc: Liviu Dudau 
Cc: Stephan Gerhold 
Cc: Linus Walleij 
Cc: Neil Armstrong 
Cc: Stefan Bosch 
Cc: Simon Glass 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Michal Simek 
Cc: Patrick Delaunay 
Cc: Patrice Chotard 
Cc: Jagan Teki 
Cc: Andre Przywara 
Cc: Thierry Reding 
Cc: Svyatoslav Ryhel 
Cc: Johan Jonker 
---
  drivers/video/anx9804.c | 1 -
  drivers/video/atmel_hlcdfb.c| 1 -
  drivers/video/atmel_lcdfb.c | 1 -
  drivers/video/backlight-uclass.c| 1 -
  drivers/video/backlight_gpio.c  | 1 -
  drivers/video/bcm2835.c | 1 -
  drivers/video/bmp.c | 1 -
  drivers/video/bochs.c   | 1 -
  drivers/video/bridge/anx6345.c  | 1 -
  drivers/video/bridge/ps862x.c   | 1 -
  drivers/video/bridge/ptn3460.c  | 1 -
  drivers/video/bridge/ssd2825.c  | 1 -
  drivers/video/bridge/video-bridge-uclass.c  | 1 -
  drivers/video/broadwell_igd.c   | 2 +-
  drivers/video/console_normal.c  | 1 -
  drivers/video/console_rotate.c  | 1 -
  drivers/video/console_truetype.c| 1 -
  drivers/video/coreboot.c| 1 -
  drivers/video/display-uclass.c  | 1 -
  drivers/video/dsi-host-uclass.c | 1 -
  drivers/video/dw_hdmi.c | 3 ++-
  drivers/video/dw_mipi_dsi.c | 1 -
  drivers/video/efi.c | 1 -
  drivers/video/endeavoru-panel.c | 1 -
  drivers/video/exynos/exynos_dp.c| 1 -
  drivers/video/exynos/exynos_dp_lowlevel.c   | 1 -
  drivers/video/exynos/exynos_fb.c| 1 -
  drivers/video/exynos/exynos_mipi_dsi.c  | 1 -
  drivers/video/exynos/exynos_mipi_dsi_common.c   | 1 -
  drivers/video/exynos/exynos_mipi_dsi_lowlevel.c | 1 -
  drivers/video/himax-hx8394.c| 1 -
  drivers/video/hitachi_tx18d42vm_lcd.c   | 1 -
  drivers/video/hx8238d.c | 1 -
  drivers/video/ihs_video_out.c   | 1 -
  drivers/video/imx/ipu_common.c  | 2 +-
  drivers/video/imx/ipu_disp.c| 1 -
  drivers/video/imx/mxc_ipuv3_fb.c| 1 -
  drivers/video/ivybridge_igd.c   | 1 -
  drivers/video/lm3533_backlight.c| 1 -
  drivers/video/logicore_dp_tx.c  | 1 -
  drivers/video/mali_dp.c | 1 -
  drivers/video/mcde_simple.c | 1 -
  drivers/video/meson/meson_canvas.c  | 1 -
  drivers/video/meson/meson_dw_hdmi.c | 1 -
  drivers/video/meson/meson_plane.c   | 1 -
  drivers/video/meson/meson_vclk.c| 1 -
  drivers/video/meson/meson_venc.c| 1 -
  drivers/video/meson/meson_vpu.c | 1 -
  drivers/video/meson/meson_vpu_init.c| 1 -
  drivers/video/mipi_dsi.c| 1 -
  drivers/video/mvebu_lcd.c   | 1 -
  drivers/video/mxsfb.c   | 1 -
  drivers/video/nexell/s5pxx18_dp.c   | 1 -
  drivers/video/nexell/s5pxx18_dp_hdmi.c  | 1 -
  drivers/video/nexell/s5pxx18_dp_lvds.c  | 2 +-
  drivers/video/nexell/s5pxx18_dp_mipi.c  | 1 -
  drivers/video/nexell/s5pxx18_dp_rgb.c   | 2 +-
  drivers/video/nexell/soc/s5pxx18_soc_disptop.h  | 1 +
  drivers/video/nexell_display.c  | 1 -
  drivers/video/omap3_dss.c   | 1 -
  drivers/video/orisetech_otm8009a.c  | 1 -
  drivers/video/panel-uclass.c| 1 -
  drivers/video/pwm_backlight.c   | 1 -
  drivers/video/raydium-rm68200.c | 1 -
  drivers/video/renesas-r61307.c  | 1 -
  drivers/video/renesas-r69328.c  | 1 -
  drivers/video/rockchip/dw_mipi_dsi_rockchip.c   | 1 -
  drivers/video/rockchip/rk3288_hdmi.c| 1 -
  drivers/video/rockchip/rk3288_mipi.c| 1 -
  drivers/video/rockchip/rk3288_vop.c | 1 -
  drivers/video/rockchip/rk3399_hdmi.c| 1 -
  drivers/video/rockchip/rk3399_mipi.c| 1 -
  drivers/video/rockchip/rk3399_vop.c | 1 -
  drivers/video/rockchip/rk_edp.c | 1 -
  drivers/video/rockchip/rk_hdmi.c| 1 -
  drivers/video/rockchip/rk_lvds.c| 1 -
  drivers/video/rockchip/rk_mipi.c| 1 -
  drivers/video/rockchip/rk_vop.c | 1 -
  drivers/video/sandbox_dsi_host.c 

Re: [PATCH 70/81] timer: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Tom Rini 
Cc: Rick Chen 
Cc: Leo 
Cc: Patrice Chotard 
Cc: Eugen Hristev 
Cc: Michal Simek 
Cc: Mario Six 
Cc: Ryder Lee 
Cc: Weijie Gao 
Cc: Chunfeng Yun 
Cc: GSS_MTK_Uboot_upstream 
Cc: Stephan Gerhold 
Cc: Linus Walleij 
Cc: Marek Vasut 
Cc: Patrick Delaunay 
Cc: Simon Glass 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Thierry Reding 
Cc: Svyatoslav Ryhel 
Cc: Sean Anderson 
Cc: Johan Jonker 
Cc: Chanho Park 
Cc: Torsten Duwe 
Cc: Kuan Lim Lee 
Cc: Wei Liang Lim 
Cc: Alex Bee 
---
  drivers/timer/altera_timer.c   | 1 -
  drivers/timer/andes_plmt_timer.c   | 1 -
  drivers/timer/arc_timer.c  | 1 -
  drivers/timer/arm_global_timer.c   | 2 +-
  drivers/timer/arm_twd_timer.c  | 1 -
  drivers/timer/ast_timer.c  | 1 -
  drivers/timer/atmel_pit_timer.c| 1 -
  drivers/timer/atmel_tcb_timer.c| 1 -
  drivers/timer/cadence-ttc.c| 1 -
  drivers/timer/dw-apb-timer.c   | 1 -
  drivers/timer/fttmr010_timer.c | 1 -
  drivers/timer/imx-gpt-timer.c  | 2 +-
  drivers/timer/mchp-pit64b-timer.c  | 1 -
  drivers/timer/mpc83xx_timer.c  | 2 +-
  drivers/timer/mtk_timer.c  | 1 -
  drivers/timer/nomadik-mtu-timer.c  | 1 -
  drivers/timer/npcm-timer.c | 1 -
  drivers/timer/omap-timer.c | 1 -
  drivers/timer/orion-timer.c| 2 +-
  drivers/timer/ostm_timer.c | 1 -
  drivers/timer/riscv_aclint_timer.c | 2 +-
  drivers/timer/riscv_timer.c| 2 +-
  drivers/timer/rockchip_timer.c | 1 -
  drivers/timer/sandbox_timer.c  | 1 -
  drivers/timer/sp804_timer.c| 1 -
  drivers/timer/starfive-timer.c | 1 -
  drivers/timer/stm32_timer.c| 2 +-
  drivers/timer/tegra-timer.c| 1 -
  drivers/timer/timer-uclass.c   | 1 -
  drivers/timer/tsc_timer.c  | 1 -
  drivers/timer/xilinx-timer.c   | 1 -
  31 files changed, 7 insertions(+), 31 deletions(-)

diff --git a/drivers/timer/altera_timer.c b/drivers/timer/altera_timer.c
index 040dc65f48aa..ece246c23d2f 100644
--- a/drivers/timer/altera_timer.c
+++ b/drivers/timer/altera_timer.c
@@ -7,7 +7,6 @@
   * Scott McNutt 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/timer/andes_plmt_timer.c b/drivers/timer/andes_plmt_timer.c
index 42dd4b623176..20baaf61307a 100644
--- a/drivers/timer/andes_plmt_timer.c
+++ b/drivers/timer/andes_plmt_timer.c
@@ -8,7 +8,6 @@
   * associated with timer tick.
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/timer/arc_timer.c b/drivers/timer/arc_timer.c
index 497f8a04155f..413bcc32f01b 100644
--- a/drivers/timer/arc_timer.c
+++ b/drivers/timer/arc_timer.c
@@ -3,7 +3,6 @@
   * Copyright (C) 2016 Synopsys, Inc. All rights reserved.
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/timer/arm_global_timer.c b/drivers/timer/arm_global_timer.c
index 2e50d9fbc580..b8057929f997 100644
--- a/drivers/timer/arm_global_timer.c
+++ b/drivers/timer/arm_global_timer.c
@@ -6,7 +6,7 @@
   * ARM Cortext A9 global timer driver
   */
  
-#include 

+#include 
  #include 
  #include 
  #include 
diff --git a/drivers/timer/arm_twd_timer.c b/drivers/timer/arm_twd_timer.c
index 40ccd1658749..2b2f35911738 100644
--- a/drivers/timer/arm_twd_timer.c
+++ b/drivers/timer/arm_twd_timer.c
@@ -27,7 +27,6 @@
   * Alex Zuepke 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/timer/ast_timer.c b/drivers/timer/ast_timer.c
index 78adc96cc596..6601cab7b165 100644
--- a/drivers/timer/ast_timer.c
+++ b/drivers/timer/ast_timer.c
@@ -3,7 +3,6 @@
   * Copyright 2016 Google Inc.
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/timer/atmel_pit_timer.c b/drivers/timer/atmel_pit_timer.c
index 5cf46f224ab0..0a367a5a7f4a 100644
--- a/drivers/timer/atmel_pit_timer.c
+++ b/drivers/timer/atmel_pit_timer.c
@@ -4,7 +4,6 @@
   *  Wenyou.Yang 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/timer/atmel_tcb_timer.c b/drivers/timer/atmel_tcb_timer.c
index 8c17987c7d74..3a328b2f6c72 100644
--- a/drivers/timer/atmel_tcb_timer.c
+++ b/drivers/timer/atmel_tcb_timer.c
@@ -5,7 +5,6 @@
   * Author: Clément Léger 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
index 2eff45060ad6..3cffb1bb88db 100644
--- a/drivers/timer/cadence-ttc.c
+++ b/drivers/timer/cadence-ttc.c
@@ -3,7 +3,6 @@
   * Copyright (C) 2018 Xilinx, Inc. (Michal Simek)
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/timer/dw-apb-timer.c b/drivers/timer/dw-apb-timer.c
index 0607f751ca70..77ccb98cb8df 100644
--- a/drivers/timer/dw-apb-timer.c
+++ b/drivers/timer/dw-apb-timer.c
@@ -5,7 +5,6 @@
   * Copyright (C) 2018 Marek Vasut 
   */
  

Re: [PATCH 68/81] sysreset: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Tom Rini 
Cc: Michal Simek 
Cc: Mario Six 
Cc: Weijie Gao 
Cc: GSS_MTK_Uboot_upstream 
Cc: Simon Glass 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Rick Chen 
Cc: Leo 
Cc: Marek Vasut 
Cc: Simon Goldschmidt 
Cc: Tien Fong Chee 
Cc: Patrice Chotard 
Cc: Max Filippov 
Cc: Paul Barker 
Cc: Bin Meng 
---
  drivers/sysreset/poweroff_gpio.c  | 1 -
  drivers/sysreset/sysreset-ti-sci.c| 1 -
  drivers/sysreset/sysreset-uclass.c| 1 -
  drivers/sysreset/sysreset_ast.c   | 1 -
  drivers/sysreset/sysreset_at91.c  | 1 -
  drivers/sysreset/sysreset_gpio.c  | 1 -
  drivers/sysreset/sysreset_microblaze.c| 1 -
  drivers/sysreset/sysreset_mpc83xx.c   | 1 -
  drivers/sysreset/sysreset_octeon.c| 1 -
  drivers/sysreset/sysreset_psci.c  | 1 -
  drivers/sysreset/sysreset_resetctl.c  | 1 -
  drivers/sysreset/sysreset_rockchip.c  | 1 -
  drivers/sysreset/sysreset_sandbox.c   | 1 -
  drivers/sysreset/sysreset_sbi.c   | 1 -
  drivers/sysreset/sysreset_socfpga.c   | 1 -
  drivers/sysreset/sysreset_socfpga_soc64.c | 1 -
  drivers/sysreset/sysreset_sti.c   | 1 -
  drivers/sysreset/sysreset_syscon.c| 1 -
  drivers/sysreset/sysreset_watchdog.c  | 1 -
  drivers/sysreset/sysreset_x86.c   | 1 -
  drivers/sysreset/sysreset_xtfpga.c| 2 +-
  21 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/drivers/sysreset/poweroff_gpio.c b/drivers/sysreset/poweroff_gpio.c
index ad04e4b1a85e..d9220024f470 100644
--- a/drivers/sysreset/poweroff_gpio.c
+++ b/drivers/sysreset/poweroff_gpio.c
@@ -11,7 +11,6 @@
   * Copyright (C) 2012 Jamie Lentin
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sysreset/sysreset-ti-sci.c 
b/drivers/sysreset/sysreset-ti-sci.c
index 0de132633a8d..451fc5de7357 100644
--- a/drivers/sysreset/sysreset-ti-sci.c
+++ b/drivers/sysreset/sysreset-ti-sci.c
@@ -6,7 +6,6 @@
   *Andreas Dannenberg 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sysreset/sysreset-uclass.c 
b/drivers/sysreset/sysreset-uclass.c
index 6151b5fe03e4..0abb4042e0f2 100644
--- a/drivers/sysreset/sysreset-uclass.c
+++ b/drivers/sysreset/sysreset-uclass.c
@@ -6,7 +6,6 @@
  
  #define LOG_CATEGORY UCLASS_SYSRESET
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sysreset/sysreset_ast.c b/drivers/sysreset/sysreset_ast.c
index 92fad96871bd..ef09440bbeff 100644
--- a/drivers/sysreset/sysreset_ast.c
+++ b/drivers/sysreset/sysreset_ast.c
@@ -3,7 +3,6 @@
   * (C) Copyright 2016 Google, Inc
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sysreset/sysreset_at91.c b/drivers/sysreset/sysreset_at91.c
index fc85f31ebf01..457042c7aae9 100644
--- a/drivers/sysreset/sysreset_at91.c
+++ b/drivers/sysreset/sysreset_at91.c
@@ -7,7 +7,6 @@
  #include 
  #include 
  #include 
-#include 
  #include 
  #include 
  #include 
diff --git a/drivers/sysreset/sysreset_gpio.c b/drivers/sysreset/sysreset_gpio.c
index de42b5935424..47018844a51a 100644
--- a/drivers/sysreset/sysreset_gpio.c
+++ b/drivers/sysreset/sysreset_gpio.c
@@ -3,7 +3,6 @@
   * Copyright (C) 2018 Xilinx, Inc. - Michal Simek
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sysreset/sysreset_microblaze.c 
b/drivers/sysreset/sysreset_microblaze.c
index 83a7f77ac41f..b81d82f046bd 100644
--- a/drivers/sysreset/sysreset_microblaze.c
+++ b/drivers/sysreset/sysreset_microblaze.c
@@ -3,7 +3,6 @@
   * Copyright (C) 2018 Xilinx, Inc. - Michal Simek
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sysreset/sysreset_mpc83xx.c 
b/drivers/sysreset/sysreset_mpc83xx.c
index ca48328f7b58..dca49299f777 100644
--- a/drivers/sysreset/sysreset_mpc83xx.c
+++ b/drivers/sysreset/sysreset_mpc83xx.c
@@ -4,7 +4,6 @@
   * Mario Six, Guntermann & Drunck GmbH, mario@gdsys.cc
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sysreset/sysreset_octeon.c 
b/drivers/sysreset/sysreset_octeon.c
index ebdea6ab66ed..c16223720e5a 100644
--- a/drivers/sysreset/sysreset_octeon.c
+++ b/drivers/sysreset/sysreset_octeon.c
@@ -3,7 +3,6 @@
   * Copyright (C) 2020 Stefan Roese 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sysreset/sysreset_psci.c b/drivers/sysreset/sysreset_psci.c
index aa09d0b88271..89b4f2dcaec4 100644
--- a/drivers/sysreset/sysreset_psci.c
+++ b/drivers/sysreset/sysreset_psci.c
@@ -3,7 +3,6 @@
   * Copyright (C) 2017 Masahiro Yamada 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sysreset/sysreset_resetctl.c 
b/drivers/sysreset/sysreset_resetctl.c
index 25bd5c9a7ff2..fbe3999b9605 100644
--- a/drivers/sysreset/sysreset_resetctl.c
+++ 

Re: [PATCH 64/81] sound: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Tom Rini 
Cc: Simon Glass 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Thierry Reding 
Cc: Svyatoslav Ryhel 
---
  drivers/sound/broadwell_i2s.c   | 1 -
  drivers/sound/broadwell_sound.c | 1 -
  drivers/sound/codec-uclass.c| 1 -
  drivers/sound/da7219.c  | 1 -
  drivers/sound/hda_codec.c   | 1 -
  drivers/sound/i2s-uclass.c  | 1 -
  drivers/sound/i8254_beep.c  | 1 -
  drivers/sound/ivybridge_sound.c | 1 -
  drivers/sound/max98088.c| 1 -
  drivers/sound/max98090.c| 1 -
  drivers/sound/max98095.c| 1 -
  drivers/sound/max98357a.c   | 1 -
  drivers/sound/maxim_codec.c | 1 -
  drivers/sound/rockchip_i2s.c| 1 -
  drivers/sound/rockchip_sound.c  | 1 -
  drivers/sound/rt5677.c  | 1 -
  drivers/sound/samsung-i2s.c | 2 +-
  drivers/sound/samsung_sound.c   | 1 -
  drivers/sound/sandbox.c | 1 -
  drivers/sound/sound-uclass.c| 1 -
  drivers/sound/sound.c   | 2 +-
  drivers/sound/tegra_ahub.c  | 2 +-
  drivers/sound/tegra_i2s.c   | 1 -
  drivers/sound/tegra_sound.c | 1 -
  drivers/sound/wm8994.c  | 1 -
  25 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/drivers/sound/broadwell_i2s.c b/drivers/sound/broadwell_i2s.c
index 7f754e656761..bc44b5ec7e1f 100644
--- a/drivers/sound/broadwell_i2s.c
+++ b/drivers/sound/broadwell_i2s.c
@@ -9,7 +9,6 @@
  
  #define LOG_CATEGORY UCLASS_I2S
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sound/broadwell_sound.c b/drivers/sound/broadwell_sound.c
index 6e083fe1f696..473f8d8f9771 100644
--- a/drivers/sound/broadwell_sound.c
+++ b/drivers/sound/broadwell_sound.c
@@ -8,7 +8,6 @@
  
  #define LOG_CATEGORY UCLASS_SOUND
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sound/codec-uclass.c b/drivers/sound/codec-uclass.c
index 2cb233bd3060..1c1560619ea5 100644
--- a/drivers/sound/codec-uclass.c
+++ b/drivers/sound/codec-uclass.c
@@ -6,7 +6,6 @@
  
  #define LOG_CATEGORY UCLASS_AUDIO_CODEC
  
-#include 

  #include 
  #include 
  
diff --git a/drivers/sound/da7219.c b/drivers/sound/da7219.c

index c1edef443608..5b9b3f65263f 100644
--- a/drivers/sound/da7219.c
+++ b/drivers/sound/da7219.c
@@ -6,7 +6,6 @@
   * Parts taken from coreboot
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sound/hda_codec.c b/drivers/sound/hda_codec.c
index af6148ef7240..da8bde67de65 100644
--- a/drivers/sound/hda_codec.c
+++ b/drivers/sound/hda_codec.c
@@ -7,7 +7,6 @@
  
  #define LOG_CATEGORY	UCLASS_SOUND
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sound/i2s-uclass.c b/drivers/sound/i2s-uclass.c
index fc4f686b516d..6263c4d70719 100644
--- a/drivers/sound/i2s-uclass.c
+++ b/drivers/sound/i2s-uclass.c
@@ -6,7 +6,6 @@
  
  #define LOG_CATEGORY UCLASS_I2S
  
-#include 

  #include 
  #include 
  
diff --git a/drivers/sound/i8254_beep.c b/drivers/sound/i8254_beep.c

index 5572dc4d265d..7234ad4a07e5 100644
--- a/drivers/sound/i8254_beep.c
+++ b/drivers/sound/i8254_beep.c
@@ -3,7 +3,6 @@
   * Copyright 2018 Google LLC
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sound/ivybridge_sound.c b/drivers/sound/ivybridge_sound.c
index d982219e06de..aeeba1d267ec 100644
--- a/drivers/sound/ivybridge_sound.c
+++ b/drivers/sound/ivybridge_sound.c
@@ -12,7 +12,6 @@
  
  #define LOG_CATEGORY UCLASS_SOUND
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sound/max98088.c b/drivers/sound/max98088.c
index c0463b8e8a62..d9037641ca46 100644
--- a/drivers/sound/max98088.c
+++ b/drivers/sound/max98088.c
@@ -8,7 +8,6 @@
   * following the changes made in max98095.c
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sound/max98090.c b/drivers/sound/max98090.c
index a798762f1ee7..18a3ffa85c8e 100644
--- a/drivers/sound/max98090.c
+++ b/drivers/sound/max98090.c
@@ -5,7 +5,6 @@
   * Copyright 2011 Maxim Integrated Products
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sound/max98095.c b/drivers/sound/max98095.c
index d0f701aaf105..96e772cff21b 100644
--- a/drivers/sound/max98095.c
+++ b/drivers/sound/max98095.c
@@ -7,7 +7,6 @@
   * Modified for U-Boot by R. Chandrasekar (rcse...@samsung.com)
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sound/max98357a.c b/drivers/sound/max98357a.c
index bdf6dc236ec3..da56ffdd6bb4 100644
--- a/drivers/sound/max98357a.c
+++ b/drivers/sound/max98357a.c
@@ -6,7 +6,6 @@
   * Parts taken from coreboot
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/sound/maxim_codec.c b/drivers/sound/maxim_codec.c
index 6553d9590472..98f094c0e9ad 100644
--- a/drivers/sound/maxim_codec.c
+++ b/drivers/sound/maxim_codec.c
@@ -5,7 +5,6 @@
   * 

Re: [PATCH 57/81] reset: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Ryan Chen 
Cc: Chia-Wei Wang 
Cc: Aspeed BMC SW team 
Cc: Joel Stanley 
Cc: Tom Rini 
Cc: Eugeniy Paltsev 
Cc: Ryder Lee 
Cc: Weijie Gao 
Cc: Chunfeng Yun 
Cc: GSS_MTK_Uboot_upstream 
Cc: Neil Armstrong 
Cc: Simon Glass 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Kunihiko Hayashi 
Cc: Dai Okamura 
Cc: Michal Simek 
Cc: Patrice Chotard 
Cc: Patrick Delaunay 
Cc: Thierry Reding 
Cc: Svyatoslav Ryhel 
Cc: Yang Xiwen 
Cc: Sumit Garg 
Cc: Marek Vasut 
Cc: Eugen Hristev 
Cc: John Keeping 
Cc: Etienne Carriere 
Cc: AKASHI Takahiro 
---
  drivers/reset/reset-ast2500.c  | 1 -
  drivers/reset/reset-ast2600.c  | 1 -
  drivers/reset/reset-bcm6345.c  | 1 -
  drivers/reset/reset-dra7.c | 1 -
  drivers/reset/reset-hisilicon.c| 1 -
  drivers/reset/reset-hsdk.c | 1 -
  drivers/reset/reset-imx7.c | 1 -
  drivers/reset/reset-jh7110.c   | 1 -
  drivers/reset/reset-mediatek.c | 1 -
  drivers/reset/reset-meson.c| 1 -
  drivers/reset/reset-mtmips.c   | 1 -
  drivers/reset/reset-raspberrypi.c  | 1 -
  drivers/reset/reset-rockchip.c | 1 -
  drivers/reset/reset-scmi.c | 1 -
  drivers/reset/reset-sifive.c   | 1 -
  drivers/reset/reset-socfpga.c  | 1 -
  drivers/reset/reset-sunxi.c| 1 -
  drivers/reset/reset-syscon.c   | 1 -
  drivers/reset/reset-ti-sci.c   | 1 -
  drivers/reset/reset-uclass.c   | 1 -
  drivers/reset/reset-uniphier.c | 1 -
  drivers/reset/reset-zynqmp.c   | 1 -
  drivers/reset/rst-rk3588.c | 1 -
  drivers/reset/sandbox-reset-test.c | 1 -
  drivers/reset/sandbox-reset.c  | 1 -
  drivers/reset/sti-reset.c  | 1 -
  drivers/reset/stm32-reset.c| 1 -
  drivers/reset/tegra-car-reset.c| 1 -
  drivers/reset/tegra186-reset.c | 1 -
  29 files changed, 29 deletions(-)

diff --git a/drivers/reset/reset-ast2500.c b/drivers/reset/reset-ast2500.c
index d9cecf3a72e8..0ed5396b3e91 100644
--- a/drivers/reset/reset-ast2500.c
+++ b/drivers/reset/reset-ast2500.c
@@ -4,7 +4,6 @@
   * Copyright 2020 ASPEED Technology Inc.
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/reset/reset-ast2600.c b/drivers/reset/reset-ast2600.c
index 1732a450efc0..ec7b9b6625dc 100644
--- a/drivers/reset/reset-ast2600.c
+++ b/drivers/reset/reset-ast2600.c
@@ -3,7 +3,6 @@
   * Copyright 2020 ASPEED Technology Inc.
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/reset/reset-bcm6345.c b/drivers/reset/reset-bcm6345.c
index 5383f59ca375..6f140574216d 100644
--- a/drivers/reset/reset-bcm6345.c
+++ b/drivers/reset/reset-bcm6345.c
@@ -6,7 +6,6 @@
   *Copyright (C) 2012 Jonas Gorski 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/reset/reset-dra7.c b/drivers/reset/reset-dra7.c
index 05101a94f9bc..2f0ec4c042f7 100644
--- a/drivers/reset/reset-dra7.c
+++ b/drivers/reset/reset-dra7.c
@@ -7,7 +7,6 @@
   */
  
  #include 

-#include 
  #include 
  #include 
  #include 
diff --git a/drivers/reset/reset-hisilicon.c b/drivers/reset/reset-hisilicon.c
index 85e02b296b02..aca54cd6701c 100644
--- a/drivers/reset/reset-hisilicon.c
+++ b/drivers/reset/reset-hisilicon.c
@@ -6,7 +6,6 @@
  #include 
  #include 
  #include 
-#include 
  #include 
  #include 
  #include 
diff --git a/drivers/reset/reset-hsdk.c b/drivers/reset/reset-hsdk.c
index 74b1173e8878..747e73b17fcb 100644
--- a/drivers/reset/reset-hsdk.c
+++ b/drivers/reset/reset-hsdk.c
@@ -8,7 +8,6 @@
  
  #include 

  #include 
-#include 
  #include 
  #include 
  #include 
diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c
index a3b3132f2fae..65a352b71fd7 100644
--- a/drivers/reset/reset-imx7.c
+++ b/drivers/reset/reset-imx7.c
@@ -6,7 +6,6 @@
  #include 
  #include 
  #include 
-#include 
  #include 
  #include 
  #include 
diff --git a/drivers/reset/reset-jh7110.c b/drivers/reset/reset-jh7110.c
index d6bdf6bb00c4..adf722d5871a 100644
--- a/drivers/reset/reset-jh7110.c
+++ b/drivers/reset/reset-jh7110.c
@@ -5,7 +5,6 @@
   *
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/reset/reset-mediatek.c b/drivers/reset/reset-mediatek.c
index 97ed221f739a..4b3afab92ea7 100644
--- a/drivers/reset/reset-mediatek.c
+++ b/drivers/reset/reset-mediatek.c
@@ -6,7 +6,6 @@
   *   Weijie Gao 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/reset/reset-meson.c b/drivers/reset/reset-meson.c
index 9d0c8b354f4a..6337cdaaffa2 100644
--- a/drivers/reset/reset-meson.c
+++ b/drivers/reset/reset-meson.c
@@ -6,7 +6,6 @@
   * Author: Neil Armstrong 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/reset/reset-mtmips.c b/drivers/reset/reset-mtmips.c
index 7bb8469823c8..2db6766280f2 100644
--- a/drivers/reset/reset-mtmips.c

Re: [PATCH 54/81] ram: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Ryan Chen 
Cc: Chia-Wei Wang 
Cc: Aspeed BMC SW team 
Cc: Joel Stanley 
Cc: Tom Rini 
Cc: Ryder Lee 
Cc: Weijie Gao 
Cc: Chunfeng Yun 
Cc: GSS_MTK_Uboot_upstream 
Cc: Mario Six 
Cc: Simon Glass 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Patrick Delaunay 
Cc: Patrice Chotard 
Cc: Ralph Siemsen 
Cc: Marek Vasut 
Cc: Leo Yu-Chi Liang 
Cc: Yanhong Wang 
Cc: Andre Przywara 
---
  drivers/ram/aspeed/sdram_ast2500.c  | 2 +-
  drivers/ram/aspeed/sdram_ast2600.c  | 2 +-
  drivers/ram/bmips_ram.c | 1 -
  drivers/ram/cadence/ddr_ctrl.c  | 1 -
  drivers/ram/imxrt_sdram.c   | 1 -
  drivers/ram/k3-am654-ddrss.c| 1 -
  drivers/ram/k3-ddrss/k3-ddrss.c | 1 -
  drivers/ram/mediatek/ddr3-mt7629.c  | 2 +-
  drivers/ram/mpc83xx_sdram.c | 1 -
  drivers/ram/ram-uclass.c| 1 -
  drivers/ram/renesas/rzn1/ddr_async.c| 1 -
  drivers/ram/rockchip/dmc-rk3368.c   | 2 +-
  drivers/ram/rockchip/sdram_common.c | 2 +-
  drivers/ram/rockchip/sdram_pctl_px30.c  | 1 -
  drivers/ram/rockchip/sdram_phy_px30.c   | 1 -
  drivers/ram/rockchip/sdram_px30.c   | 2 +-
  drivers/ram/rockchip/sdram_rk3066.c | 2 +-
  drivers/ram/rockchip/sdram_rk3128.c | 2 +-
  drivers/ram/rockchip/sdram_rk3188.c | 2 +-
  drivers/ram/rockchip/sdram_rk322x.c | 2 +-
  drivers/ram/rockchip/sdram_rk3288.c | 2 +-
  drivers/ram/rockchip/sdram_rk3308.c | 2 +-
  drivers/ram/rockchip/sdram_rk3328.c | 2 +-
  drivers/ram/rockchip/sdram_rk3399.c | 2 +-
  drivers/ram/rockchip/sdram_rk3568.c | 2 +-
  drivers/ram/rockchip/sdram_rk3588.c | 2 +-
  drivers/ram/rockchip/sdram_rv1126.c | 2 +-
  drivers/ram/sandbox_ram.c   | 1 -
  drivers/ram/sifive/sifive_ddr.c | 1 -
  drivers/ram/starfive/ddrcsr_boot.c  | 1 -
  drivers/ram/starfive/ddrphy_start.c | 1 -
  drivers/ram/starfive/ddrphy_train.c | 2 +-
  drivers/ram/starfive/ddrphy_utils.c | 2 +-
  drivers/ram/starfive/starfive_ddr.c | 1 -
  drivers/ram/starfive/starfive_ddr.h | 2 ++
  drivers/ram/stm32_sdram.c   | 1 -
  drivers/ram/stm32mp1/stm32mp1_ddr.c | 1 -
  drivers/ram/stm32mp1/stm32mp1_interactive.c | 1 -
  drivers/ram/stm32mp1/stm32mp1_ram.c | 1 -
  drivers/ram/stm32mp1/stm32mp1_tests.c   | 1 -
  drivers/ram/sunxi/dram_sun20i_d1.c  | 2 +-
  41 files changed, 22 insertions(+), 40 deletions(-)

diff --git a/drivers/ram/aspeed/sdram_ast2500.c 
b/drivers/ram/aspeed/sdram_ast2500.c
index dc466a88e712..0d6ab79f96fc 100644
--- a/drivers/ram/aspeed/sdram_ast2500.c
+++ b/drivers/ram/aspeed/sdram_ast2500.c
@@ -5,7 +5,7 @@
   * Copyright 2016 Google, Inc
   */
  
-#include 

+#include 
  #include 
  #include 
  #include 
diff --git a/drivers/ram/aspeed/sdram_ast2600.c 
b/drivers/ram/aspeed/sdram_ast2600.c
index d463933363ee..55e80fba3dc0 100644
--- a/drivers/ram/aspeed/sdram_ast2600.c
+++ b/drivers/ram/aspeed/sdram_ast2600.c
@@ -2,7 +2,7 @@
  /*
   * Copyright (C) ASPEED Technology Inc.
   */
-#include 
+#include 
  #include 
  #include 
  #include 
diff --git a/drivers/ram/bmips_ram.c b/drivers/ram/bmips_ram.c
index 98045248ecfb..760bebdbba04 100644
--- a/drivers/ram/bmips_ram.c
+++ b/drivers/ram/bmips_ram.c
@@ -7,7 +7,6 @@
   *Copyright (C) 2009 Florian Fainelli 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/ram/cadence/ddr_ctrl.c b/drivers/ram/cadence/ddr_ctrl.c
index 3e5959a84a37..0fa60e766a7e 100644
--- a/drivers/ram/cadence/ddr_ctrl.c
+++ b/drivers/ram/cadence/ddr_ctrl.c
@@ -24,7 +24,6 @@
   * bandwidth allocated to each AXI slave can be set.
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/ram/imxrt_sdram.c b/drivers/ram/imxrt_sdram.c
index 6a15242c20cc..3df106c9b79a 100644
--- a/drivers/ram/imxrt_sdram.c
+++ b/drivers/ram/imxrt_sdram.c
@@ -4,7 +4,6 @@
   * Author(s): Giulio Benetti 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/ram/k3-am654-ddrss.c b/drivers/ram/k3-am654-ddrss.c
index cff8ffc89295..21ff9d761e1b 100644
--- a/drivers/ram/k3-am654-ddrss.c
+++ b/drivers/ram/k3-am654-ddrss.c
@@ -6,7 +6,6 @@
   *Lokesh Vutla 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c
index a5c9b82cf1da..525b6d5b79fc 100644
--- a/drivers/ram/k3-ddrss/k3-ddrss.c
+++ b/drivers/ram/k3-ddrss/k3-ddrss.c
@@ -5,7 +5,6 @@
   * Copyright (C) 2020-2021 Texas Instruments Incorporated - 
https://www.ti.com/
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git 

Re: [PATCH 52/81] power: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Jaehoon Chung 
Cc: Tom Rini 
Cc: Neil Armstrong 
Cc: Ryder Lee 
Cc: Weijie Gao 
Cc: Chunfeng Yun 
Cc: GSS_MTK_Uboot_upstream 
Cc: Michal Simek 
Cc: Stephan Gerhold 
Cc: Linus Walleij 
Cc: Caleb Connolly 
Cc: Sumit Garg 
Cc: Patrick Delaunay 
Cc: Patrice Chotard 
Cc: Peng Fan 
Cc: Stefano Babic 
Cc: Fabio Estevam 
Cc: Marek Vasut 
Cc: Sean Anderson 
Cc: Bryan Brattlof 
Cc: Nishanth Menon 
Cc: Neha Malcom Francis 
Cc: Igor Opaniuk 
Cc: Roger Quadros 
Cc: Apurva Nandan 
Cc: Simon Glass 
Cc: Svyatoslav Ryhel 
Cc: Kever Yang 
Cc: Jonas Karlman 
Cc: Quentin Schulz 
Cc: Bhargav Raviprakash 
Cc: Udit Kumar 
Cc: Dhruva Gole 
Cc: Eugen Hristev 
Cc: Joseph Chen 
Cc: shengfei Xu 
Cc: William Wu 
Cc: AKASHI Takahiro 
Cc: Etienne Carriere 
---
  drivers/power/acpi_pmc/acpi-pmc-uclass.c | 1 -
  drivers/power/acpi_pmc/pmc_emul.c| 1 -
  drivers/power/acpi_pmc/sandbox.c | 1 -
  drivers/power/axp152.c   | 2 +-
  drivers/power/axp209.c   | 2 +-
  drivers/power/axp221.c   | 1 -
  drivers/power/axp305.c   | 1 -
  drivers/power/axp313.c   | 1 -
  drivers/power/axp809.c   | 1 -
  drivers/power/axp818.c   | 1 -
  drivers/power/domain/apple-pmgr.c| 1 -
  drivers/power/domain/bcm6328-power-domain.c  | 1 -
  drivers/power/domain/imx8-power-domain-legacy.c  | 1 -
  drivers/power/domain/imx8-power-domain.c | 1 -
  drivers/power/domain/imx8m-power-domain.c| 1 -
  drivers/power/domain/imx8mp-hsiomix.c| 1 -
  drivers/power/domain/meson-ee-pwrc.c | 1 -
  drivers/power/domain/meson-gx-pwrc-vpu.c | 1 -
  drivers/power/domain/mtk-power-domain.c  | 1 -
  drivers/power/domain/power-domain-uclass.c   | 1 -
  drivers/power/domain/sandbox-power-domain-test.c | 1 -
  drivers/power/domain/sandbox-power-domain.c  | 1 -
  drivers/power/domain/tegra186-power-domain.c | 1 -
  drivers/power/domain/ti-power-domain.c   | 1 -
  drivers/power/domain/ti-sci-power-domain.c   | 1 -
  drivers/power/domain/zynqmp-power-domain.c   | 1 -
  drivers/power/exynos-tmu.c   | 3 ++-
  drivers/power/mt6323.c   | 1 -
  drivers/power/pmic/ab8500.c  | 1 -
  drivers/power/pmic/act8846.c | 1 -
  drivers/power/pmic/as3722.c  | 1 -
  drivers/power/pmic/as3722_gpio.c | 1 -
  drivers/power/pmic/bd71837.c | 1 -
  drivers/power/pmic/da9063.c  | 1 -
  drivers/power/pmic/fan53555.c| 1 -
  drivers/power/pmic/i2c_pmic_emul.c   | 1 -
  drivers/power/pmic/lp873x.c  | 1 -
  drivers/power/pmic/lp87565.c | 1 -
  drivers/power/pmic/max77686.c| 1 -
  drivers/power/pmic/max8997.c | 1 -
  drivers/power/pmic/max8998.c | 1 -
  drivers/power/pmic/mc34708.c | 1 -
  drivers/power/pmic/mp5416.c  | 1 -
  drivers/power/pmic/palmas.c  | 1 -
  drivers/power/pmic/pca9450.c | 1 -
  drivers/power/pmic/pfuze100.c| 1 -
  drivers/power/pmic/pmic-uclass.c | 1 -
  drivers/power/pmic/pmic_hi6553.c | 1 -
  drivers/power/pmic/pmic_ltc3676.c| 1 -
  drivers/power/pmic/pmic_mc34vr500.c  | 1 -
  drivers/power/pmic/pmic_pca9450.c| 1 -
  drivers/power/pmic/pmic_pfuze100.c   | 1 -
  drivers/power/pmic/pmic_pfuze3000.c  | 1 -
  drivers/power/pmic/pmic_qcom.c   | 1 -
  drivers/power/pmic/pmic_tps62362.c   | 1 -
  drivers/power/pmic/pmic_tps65217.c   | 1 -
  drivers/power/pmic/pmic_tps65218.c   | 1 -
  drivers/power/pmic/pmic_tps65910.c   | 1 -
  drivers/power/pmic/pmic_tps65910_dm.c| 1 -
  drivers/power/pmic/rk8xx.c   | 1 -
  drivers/power/pmic/rn5t567.c | 1 -
  drivers/power/pmic/s2mps11.c | 1 -
  drivers/power/pmic/s5m8767.c | 1 -
  drivers/power/pmic/sandbox.c | 1 -
  drivers/power/pmic/stpmic1.c | 1 -
  drivers/power/pmic/tps65090.c| 1 -
  drivers/power/pmic/tps65219.c| 1 -
  drivers/power/pmic/tps65941.c| 1 -
  drivers/power/power_core.c   | 1 -
  drivers/power/power_dialog.c | 2 +-
  drivers/power/power_fsl.c| 2 +-
  

Re: [PATCH 51/81] pinctrl: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Ryan Chen 
Cc: Chia-Wei Wang 
Cc: Aspeed BMC SW team 
Cc: Joel Stanley 
Cc: Tom Rini 
Cc: Matthias Brugger 
Cc: Peter Robinson 
Cc: Ryder Lee 
Cc: Weijie Gao 
Cc: Chunfeng Yun 
Cc: GSS_MTK_Uboot_upstream 
Cc: Neil Armstrong 
Cc: Gregory CLEMENT 
Cc: Lars Povlsen 
Cc: Horatiu Vultur 
Cc: Stefan Roese 
Cc: Stefan Bosch 
Cc: Mark Kettenis 
Cc: Sean Anderson 
Cc: Simon Glass 
Cc: Patrice Chotard 
Cc: Patrick Delaunay 
Cc: Michal Simek 
Cc: Caleb Connolly 
Cc: Sumit Garg 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Thierry Reding 
Cc: Svyatoslav Ryhel 
Cc: Kunihiko Hayashi 
Cc: Dai Okamura 
Cc: Minkyu Kang 
Cc: Sam Protsenko 
Cc: Peng Fan 
Cc: Stefano Babic 
Cc: Matthias Schiffer 
Cc: Quentin Schulz 
Cc: Jonas Karlman 
Cc: Volodymyr Babchuk 
Cc: Robert Marko 
---
  drivers/pinctrl/aspeed/pinctrl_ast2500.c | 1 -
  drivers/pinctrl/aspeed/pinctrl_ast2600.c | 1 -
  drivers/pinctrl/ath79/pinctrl_ar933x.c   | 1 -
  drivers/pinctrl/ath79/pinctrl_qca953x.c  | 1 -
  drivers/pinctrl/broadcom/pinctrl-bcm283x.c   | 1 -
  drivers/pinctrl/broadcom/pinctrl-bcm6838.c   | 1 -
  drivers/pinctrl/exynos/pinctrl-exynos.c  | 1 -
  drivers/pinctrl/exynos/pinctrl-exynos7420.c  | 1 -
  drivers/pinctrl/exynos/pinctrl-exynos78x0.c  | 1 -
  drivers/pinctrl/intel/pinctrl.c  | 1 -
  drivers/pinctrl/intel/pinctrl_apl.c  | 1 -
  drivers/pinctrl/mediatek/pinctrl-mtk-common.c| 1 -
  drivers/pinctrl/meson/pinctrl-meson-a1.c | 1 -
  drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c| 1 -
  drivers/pinctrl/meson/pinctrl-meson-axg.c| 1 -
  drivers/pinctrl/meson/pinctrl-meson-g12a.c   | 1 -
  drivers/pinctrl/meson/pinctrl-meson-gx-pmx.c | 1 -
  drivers/pinctrl/meson/pinctrl-meson-gxbb.c   | 1 -
  drivers/pinctrl/meson/pinctrl-meson-gxl.c| 1 -
  drivers/pinctrl/meson/pinctrl-meson.c| 1 -
  drivers/pinctrl/mscc/mscc-common.c   | 1 -
  drivers/pinctrl/mscc/pinctrl-jr2.c   | 1 -
  drivers/pinctrl/mscc/pinctrl-luton.c | 1 -
  drivers/pinctrl/mscc/pinctrl-ocelot.c| 1 -
  drivers/pinctrl/mscc/pinctrl-serval.c| 1 -
  drivers/pinctrl/mscc/pinctrl-servalt.c   | 1 -
  drivers/pinctrl/mtmips/pinctrl-mt7628.c  | 1 -
  drivers/pinctrl/mtmips/pinctrl-mtmips-common.c   | 1 -
  drivers/pinctrl/mvebu/pinctrl-armada-37xx.c  | 1 -
  drivers/pinctrl/mvebu/pinctrl-armada-38x.c   | 1 -
  drivers/pinctrl/mvebu/pinctrl-mvebu.c| 1 -
  drivers/pinctrl/nexell/pinctrl-nexell.c  | 1 -
  drivers/pinctrl/nexell/pinctrl-s5pxx18.c | 1 -
  drivers/pinctrl/nxp/pinctrl-imx.c| 1 -
  drivers/pinctrl/nxp/pinctrl-imx5.c   | 1 -
  drivers/pinctrl/nxp/pinctrl-imx6.c   | 1 -
  drivers/pinctrl/nxp/pinctrl-imx7.c   | 1 -
  drivers/pinctrl/nxp/pinctrl-imx7ulp.c| 1 -
  drivers/pinctrl/nxp/pinctrl-imx8.c   | 1 -
  drivers/pinctrl/nxp/pinctrl-imx8ulp.c| 1 -
  drivers/pinctrl/nxp/pinctrl-imxrt.c  | 1 -
  drivers/pinctrl/nxp/pinctrl-mxs.c| 1 -
  drivers/pinctrl/nxp/pinctrl-scu.c| 1 -
  drivers/pinctrl/nxp/pinctrl-vf610.c  | 1 -
  drivers/pinctrl/pinctrl-apple.c  | 1 -
  drivers/pinctrl/pinctrl-at91-pio4.c  | 1 -
  drivers/pinctrl/pinctrl-at91.c   | 1 -
  drivers/pinctrl/pinctrl-generic.c| 1 -
  drivers/pinctrl/pinctrl-k210.c   | 1 -
  drivers/pinctrl/pinctrl-qe-io.c  | 1 -
  drivers/pinctrl/pinctrl-sandbox.c| 1 -
  drivers/pinctrl/pinctrl-single.c | 1 -
  drivers/pinctrl/pinctrl-sti.c| 1 -
  drivers/pinctrl/pinctrl-stmfx.c  | 1 -
  drivers/pinctrl/pinctrl-uclass.c | 1 -
  drivers/pinctrl/pinctrl-zynqmp.c | 1 -
  drivers/pinctrl/pinctrl_pic32.c  | 1 -
  drivers/pinctrl/pinctrl_stm32.c  | 1 -
  drivers/pinctrl/qcom/pinctrl-apq8016.c   | 1 -
  drivers/pinctrl/qcom/pinctrl-apq8096.c   | 1 -
  drivers/pinctrl/qcom/pinctrl-ipq4019.c   | 1 -
  drivers/pinctrl/qcom/pinctrl-qcom.c  | 1 -
  drivers/pinctrl/qcom/pinctrl-qcs404.c| 1 -
  drivers/pinctrl/qcom/pinctrl-sdm845.c| 1 -
  drivers/pinctrl/rockchip/pinctrl-px30.c  | 1 -
  drivers/pinctrl/rockchip/pinctrl-rk3036.c| 1 -
  drivers/pinctrl/rockchip/pinctrl-rk3066.c| 1 -
  drivers/pinctrl/rockchip/pinctrl-rk3128.c| 1 -
  drivers/pinctrl/rockchip/pinctrl-rk3188.c| 1 -
  drivers/pinctrl/rockchip/pinctrl-rk322x.c| 1 -
  

Re: [PATCH 50/81] phy: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Jagan Teki 
Cc: Andre Przywara 
Cc: Tom Rini 
Cc: Stefan Roese 
Cc: Neil Armstrong 
Cc: Stephan Gerhold 
Cc: Linus Walleij 
Cc: Mark Kettenis 
Cc: Ryder Lee 
Cc: Weijie Gao 
Cc: Chunfeng Yun 
Cc: GSS_MTK_Uboot_upstream 
Cc: Nobuhiro Iwamatsu 
Cc: Marek Vasut 
Cc: Patrick Delaunay 
Cc: Patrice Chotard 
Cc: Michal Simek 
Cc: Caleb Connolly 
Cc: Sumit Garg 
Cc: Simon Glass 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Kunihiko Hayashi 
Cc: Dai Okamura 
Cc: Sean Anderson 
Cc: Nishanth Menon 
Cc: Matthias Schiffer 
Cc: Stefan Bosch 
Cc: Eugen Hristev 
Cc: Igor Prusov 
Cc: Svyatoslav Ryhel 
Cc: Tim Harvey 
Cc: Fabio Estevam 
Cc: Adam Ford 
Cc: Jonas Karlman 
Cc: Johan Jonker 
Cc: Jon Lin 
Cc: Ren Jianing 
Cc: Frank Wang 
Cc: Siddharth Vadapalli 
Cc: Ravi Gunasekaran 
---
  drivers/phy/allwinner/phy-sun4i-usb.c  | 1 -
  drivers/phy/bcm6318-usbh-phy.c | 1 -
  drivers/phy/bcm6348-usbh-phy.c | 1 -
  drivers/phy/bcm6358-usbh-phy.c | 1 -
  drivers/phy/bcm6368-usbh-phy.c | 1 -
  drivers/phy/cadence/phy-cadence-sierra.c   | 1 -
  drivers/phy/cadence/phy-cadence-torrent.c  | 1 -
  drivers/phy/keystone-usb-phy.c | 1 -
  drivers/phy/marvell/comphy_a3700.c | 1 -
  drivers/phy/marvell/comphy_core.c  | 1 -
  drivers/phy/marvell/comphy_cp110.c | 2 +-
  drivers/phy/marvell/comphy_mux.c   | 1 -
  drivers/phy/meson-axg-mipi-dphy.c  | 1 -
  drivers/phy/meson-axg-mipi-pcie-analog.c   | 1 -
  drivers/phy/meson-g12a-usb2.c  | 1 -
  drivers/phy/meson-g12a-usb3-pcie.c | 1 -
  drivers/phy/meson-gxbb-usb2.c  | 1 -
  drivers/phy/meson-gxl-usb2.c   | 1 -
  drivers/phy/mt76x8-usb-phy.c   | 1 -
  drivers/phy/nop-phy.c  | 1 -
  drivers/phy/omap-usb2-phy.c| 1 -
  drivers/phy/phy-ab8500-usb.c   | 1 -
  drivers/phy/phy-apple-atc.c| 1 -
  drivers/phy/phy-bcm-sr-pcie.c  | 1 -
  drivers/phy/phy-core-mipi-dphy.c   | 2 +-
  drivers/phy/phy-da8xx-usb.c| 2 +-
  drivers/phy/phy-imx8mq-usb.c   | 1 -
  drivers/phy/phy-mtk-tphy.c | 1 -
  drivers/phy/phy-npcm-usb.c | 1 -
  drivers/phy/phy-rcar-gen2.c| 1 -
  drivers/phy/phy-rcar-gen3.c| 1 -
  drivers/phy/phy-stm32-usbphyc.c| 1 -
  drivers/phy/phy-ti-am654.c | 1 -
  drivers/phy/phy-uclass.c   | 1 -
  drivers/phy/phy-zynqmp.c   | 1 -
  drivers/phy/qcom/msm8916-usbh-phy.c| 1 -
  drivers/phy/qcom/phy-qcom-ipq4019-usb.c| 1 -
  drivers/phy/qcom/phy-qcom-usb-hs-28nm.c| 1 -
  drivers/phy/qcom/phy-qcom-usb-ss.c | 1 -
  drivers/phy/renesas/r8a779f0-ether-serdes.c| 1 -
  drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 1 -
  drivers/phy/rockchip/phy-rockchip-pcie.c   | 1 -
  drivers/phy/rockchip/phy-rockchip-snps-pcie3.c | 1 -
  drivers/phy/rockchip/phy-rockchip-typec.c  | 1 -
  drivers/phy/rockchip/phy-rockchip-usbdp.c  | 1 -
  drivers/phy/sandbox-phy.c  | 1 -
  drivers/phy/socionext/phy-uniphier-pcie.c  | 1 -
  drivers/phy/socionext/phy-uniphier-usb3.c  | 1 -
  drivers/phy/sti_usb_phy.c  | 1 -
  drivers/phy/ti-pipe3-phy.c | 1 -
  drivers/phy/ti/phy-j721e-wiz.c | 1 -
  51 files changed, 3 insertions(+), 51 deletions(-)

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c 
b/drivers/phy/allwinner/phy-sun4i-usb.c
index 6624e9134f43..b9306c9a8279 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -10,7 +10,6 @@
   * SPDX-License-Identifier:   GPL-2.0+
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/phy/bcm6318-usbh-phy.c b/drivers/phy/bcm6318-usbh-phy.c
index a2fa446cb1c9..d715541bd4cb 100644
--- a/drivers/phy/bcm6318-usbh-phy.c
+++ b/drivers/phy/bcm6318-usbh-phy.c
@@ -7,7 +7,6 @@
   *Copyright 2013 Florian Fainelli 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/phy/bcm6348-usbh-phy.c b/drivers/phy/bcm6348-usbh-phy.c
index 857fb575ef19..ffb37b634a31 100644
--- a/drivers/phy/bcm6348-usbh-phy.c
+++ b/drivers/phy/bcm6348-usbh-phy.c
@@ -7,7 +7,6 @@
   *Copyright 2013 Florian Fainelli 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git 

Re: [PATCH 48/81] pci: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Stefan Roese 
Cc: Tom Rini 
Cc: Nobuhiro Iwamatsu 
Cc: Marek Vasut 
Cc: Heiko Schocher 
Cc: Simon Glass 
Cc: Mark Kettenis 
Cc: Neil Armstrong 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Masahisa Kojima 
Cc: Ryder Lee 
Cc: Weijie Gao 
Cc: Chunfeng Yun 
Cc: GSS_MTK_Uboot_upstream 
Cc: liuhao 
Cc: shuyiqi 
Cc: Minda Chen 
Cc: Kunihiko Hayashi 
Cc: Dai Okamura 
Cc: Michal Simek 
Cc: Bin Meng 
Cc: Heinrich Schuchardt 
Cc: Moritz Fischer 
Cc: This contributor prefers not to receive mails 
Cc: Sergei Antonov 
Cc: Nikhil M Jain 
Cc: Sam Edwards 
Cc: Jonas Karlman 
Cc: Johan Jonker 
Cc: Michael Trimarchi 
Cc: Jon Lin 
Cc: Eugen Hristev 
Cc: Maksim Kiselev 
Cc: Sumit Garg 
Cc: Peng Fan 
Cc: Ioana Ciornei 
Cc: Mathew McBride 
Cc: Leo Yu-Chi Liang 
Cc: Mason Huo 
Cc: Mayuresh Chitale 
---
  drivers/pci/pci-aardvark.c | 1 -
  drivers/pci/pci-emul-uclass.c  | 1 -
  drivers/pci/pci-rcar-gen2.c| 2 +-
  drivers/pci/pci-rcar-gen3.c| 1 -
  drivers/pci/pci-uclass.c   | 1 -
  drivers/pci/pci_auto.c | 2 +-
  drivers/pci/pci_auto_common.c  | 1 -
  drivers/pci/pci_common.c   | 1 -
  drivers/pci/pci_compat.c   | 1 -
  drivers/pci/pci_ftpci100.c | 1 -
  drivers/pci/pci_mpc85xx.c  | 1 -
  drivers/pci/pci_mvebu.c| 1 -
  drivers/pci/pci_rom.c  | 2 +-
  drivers/pci/pci_sandbox.c  | 1 -
  drivers/pci/pci_sh7751.c   | 2 +-
  drivers/pci/pci_tegra.c| 1 -
  drivers/pci/pci_x86.c  | 1 -
  drivers/pci/pcie_apple.c   | 1 -
  drivers/pci/pcie_brcmstb.c | 1 -
  drivers/pci/pcie_dw_common.c   | 1 -
  drivers/pci/pcie_dw_meson.c| 1 -
  drivers/pci/pcie_dw_mvebu.c| 3 ++-
  drivers/pci/pcie_dw_rockchip.c | 1 -
  drivers/pci/pcie_dw_sifive.c   | 1 -
  drivers/pci/pcie_dw_ti.c   | 1 -
  drivers/pci/pcie_ecam_generic.c| 1 -
  drivers/pci/pcie_ecam_synquacer.c  | 1 -
  drivers/pci/pcie_fsl.c | 2 +-
  drivers/pci/pcie_fsl_fixup.c   | 1 -
  drivers/pci/pcie_imx.c | 1 -
  drivers/pci/pcie_intel_fpga.c  | 1 -
  drivers/pci/pcie_iproc.c   | 1 -
  drivers/pci/pcie_layerscape.c  | 1 -
  drivers/pci/pcie_layerscape_ep.c   | 2 +-
  drivers/pci/pcie_layerscape_fixup.c| 1 -
  drivers/pci/pcie_layerscape_fixup_common.c | 2 +-
  drivers/pci/pcie_layerscape_gen4.c | 2 +-
  drivers/pci/pcie_layerscape_gen4_fixup.c   | 1 -
  drivers/pci/pcie_layerscape_rc.c   | 1 -
  drivers/pci/pcie_mediatek.c| 1 -
  drivers/pci/pcie_phytium.c | 1 -
  drivers/pci/pcie_plda_common.c | 1 -
  drivers/pci/pcie_rockchip.c| 1 -
  drivers/pci/pcie_starfive_jh7110.c | 1 -
  drivers/pci/pcie_uniphier.c| 1 -
  drivers/pci/pcie_xilinx.c  | 1 -
  46 files changed, 10 insertions(+), 46 deletions(-)

diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index af0e55cd2f2c..f5db4bdb7605 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -25,7 +25,6 @@
   *
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c
index a0b8afb87a01..166ee9fcd431 100644
--- a/drivers/pci/pci-emul-uclass.c
+++ b/drivers/pci/pci-emul-uclass.c
@@ -4,7 +4,6 @@
   * Written by Simon Glass 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/pci/pci-rcar-gen2.c b/drivers/pci/pci-rcar-gen2.c
index b81eb3536896..12c31e74087f 100644
--- a/drivers/pci/pci-rcar-gen2.c
+++ b/drivers/pci/pci-rcar-gen2.c
@@ -5,7 +5,7 @@
   * Copyright (C) 2018 Marek Vasut 
   */
  
-#include 

+#include 
  #include 
  #include 
  #include 
diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c
index 1252ef74c581..76878246f1e0 100644
--- a/drivers/pci/pci-rcar-gen3.c
+++ b/drivers/pci/pci-rcar-gen3.c
@@ -15,7 +15,6 @@
   * Author: Phil Edworthy 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 1a48256de036..6571e653049d 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -6,7 +6,6 @@
  
  #define LOG_CATEGORY UCLASS_PCI
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
index 01230360bad2..90f818864457 100644
--- a/drivers/pci/pci_auto.c
+++ b/drivers/pci/pci_auto.c
@@ -8,7 +8,7 @@
   * Copyright (c) 2021  

Re: [PATCH 45/81] net: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:31, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Joe Hershberger 
Cc: Ramon Fried 
Cc: Tom Rini 
Cc: Ryan Chen 
Cc: Chia-Wei Wang 
Cc: Aspeed BMC SW team 
Cc: Joel Stanley 
Cc: Alex Nemirovsky 
Cc: Caleb Connolly 
Cc: Neil Armstrong 
Cc: Sumit Garg 
Cc: Simon Glass 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Robert Marko 
Cc: Luka Kovacic 
Cc: Luka Perkov 
Cc: Gregory CLEMENT 
Cc: Lars Povlsen 
Cc: Horatiu Vultur 
Cc: Ryder Lee 
Cc: Weijie Gao 
Cc: Chunfeng Yun 
Cc: GSS_MTK_Uboot_upstream 
Cc: Michal Simek 
Cc: Radu Pirea 
Cc: Nobuhiro Iwamatsu 
Cc: Marek Vasut 
Cc: Peng Fan 
Cc: Ioana Ciornei 
Cc: Laurentiu Tudor 
Cc: Nate Drude 
Cc: Rasmus Villemoes 
Cc: "Rafał Miłecki" 
Cc: Nishanth Menon 
Cc: Frank de Brabander 
Cc: Leo Yu-Chi Liang 
Cc: Lukasz Tekieli 
Cc: Nicolas Frattaroli 
Cc: Yanhong Wang 
Cc: Jacky Chou 
Cc: Dan Carpenter 
Cc: Eugeniu Rosca 
Cc: Tejas Bhumkar 
Cc: "Sébastien Szymanski" 
Cc: Stefan Herbrechtsmeier 
Cc: Johan Jonker 
Cc: Roger Quadros 
Cc: Siddharth Vadapalli 
Cc: Michael Walle 
Cc: Maxime Ripard 
Cc: Sean Anderson 
Cc: Suman Anna 
Cc: Andreas Dannenberg 
---
  drivers/net/ag7xxx.c  | 1 -
  drivers/net/altera_tse.c  | 1 -
  drivers/net/aspeed_mdio.c | 1 -
  drivers/net/bcm-sf2-eth-gmac.c| 1 -
  drivers/net/bcm-sf2-eth.c | 1 -
  drivers/net/bcm6348-eth.c | 1 -
  drivers/net/bcm6368-eth.c | 1 -
  drivers/net/bnxt/bnxt.c   | 1 -
  drivers/net/calxedaxgmac.c| 1 -
  drivers/net/cortina_ni.c  | 1 -
  drivers/net/dc2114x.c | 1 -
  drivers/net/designware.c  | 1 -
  drivers/net/dm9000x.c | 1 -
  drivers/net/dwc_eth_qos.c | 1 -
  drivers/net/dwc_eth_qos_imx.c | 1 -
  drivers/net/dwc_eth_qos_qcom.c| 1 -
  drivers/net/dwc_eth_qos_rockchip.c| 1 -
  drivers/net/dwc_eth_qos_starfive.c| 1 -
  drivers/net/dwmac_meson8b.c   | 1 -
  drivers/net/dwmac_s700.c  | 1 -
  drivers/net/dwmac_socfpga.c   | 1 -
  drivers/net/e1000.c   | 1 -
  drivers/net/e1000_spi.c   | 2 +-
  drivers/net/eepro100.c| 2 +-
  drivers/net/eth-phy-uclass.c  | 1 -
  drivers/net/ethoc.c   | 1 -
  drivers/net/fec_mxc.c | 1 -
  drivers/net/fm/b4860.c| 2 +-
  drivers/net/fm/dtsec.c| 1 -
  drivers/net/fm/eth.c  | 2 +-
  drivers/net/fm/ls1043.c   | 2 +-
  drivers/net/fm/ls1046.c   | 2 +-
  drivers/net/fm/memac.c| 1 -
  drivers/net/fm/memac_phy.c| 1 -
  drivers/net/fm/p1023.c| 2 +-
  drivers/net/fm/p4080.c| 2 +-
  drivers/net/fm/p5020.c| 2 +-
  drivers/net/fm/p5040.c| 2 +-
  drivers/net/fm/t1024.c| 2 +-
  drivers/net/fm/t1040.c| 2 +-
  drivers/net/fm/t2080.c| 2 +-
  drivers/net/fm/t4240.c| 2 +-
  drivers/net/fm/tgec.c | 1 -
  drivers/net/fm/tgec_phy.c | 1 -
  drivers/net/fsl-mc/mc.c   | 2 +-
  drivers/net/fsl-mc/mc_sys.c   | 1 -
  drivers/net/fsl_enetc.c   | 1 -
  drivers/net/fsl_enetc_mdio.c  | 1 -
  drivers/net/fsl_ls_mdio.c | 1 -
  drivers/net/fsl_mdio.c| 1 -
  drivers/net/ftgmac100.c   | 1 -
  drivers/net/ftmac100.c| 1 -
  drivers/net/gmac_rockchip.c   | 1 -
  drivers/net/higmacv300.c  | 1 -
  drivers/net/ks8851_mll.c  | 1 -
  drivers/net/ldpaa_eth/ldpaa_eth.c | 1 -
  drivers/net/ldpaa_eth/ldpaa_wriop.c   | 1 -
  drivers/net/ldpaa_eth/ls1088a.c   | 2 +-
  drivers/net/ldpaa_eth/ls2080a.c   | 2 +-
  drivers/net/ldpaa_eth/lx2160a.c   | 2 +-
  drivers/net/macb.c| 1 -
  drivers/net/mcffec.c  | 2 +-
  drivers/net/mcfmii.c  | 1 -
  drivers/net/mdio-ipq4019.c| 1 -
  drivers/net/mpc8xx_fec.c  | 1 -
  drivers/net/mscc_eswitch/jr2_switch.c | 1 -
  drivers/net/mscc_eswitch/luton_switch.c   | 1 -
  drivers/net/mscc_eswitch/ocelot_switch.c  | 1 -
  drivers/net/mscc_eswitch/serval_switch.c  | 1 -
  drivers/net/mscc_eswitch/servalt_switch.c | 1 -
  drivers/net/mt7628-eth.c  | 1 -
  drivers/net/mtk_eth.c | 1 -
  drivers/net/mv88e6xxx.c   | 1 -
  drivers/net/mvgbe.c   | 1 -
  drivers/net/mvmdio.c

Re: [PATCH 42/81] mmc: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:30, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Peng Fan 
Cc: Jaehoon Chung 
Cc: Tom Rini 
Cc: Ryan Chen 
Cc: Chia-Wei Wang 
Cc: Aspeed BMC SW team 
Cc: Joel Stanley 
Cc: Matthias Brugger 
Cc: Peter Robinson 
Cc: Thomas Fitzsimmons 
Cc: Alex Nemirovsky 
Cc: Masahisa Kojima 
Cc: Neil Armstrong 
Cc: Simon Glass 
Cc: Caleb Connolly 
Cc: Sumit Garg 
Cc: Ryder Lee 
Cc: Weijie Gao 
Cc: Chunfeng Yun 
Cc: GSS_MTK_Uboot_upstream 
Cc: Tianrui Wei 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Nobuhiro Iwamatsu 
Cc: Marek Vasut 
Cc: Eugeniy Paltsev 
Cc: Patrice Chotard 
Cc: Patrick Delaunay 
Cc: Thierry Reding 
Cc: Svyatoslav Ryhel 
Cc: Kunihiko Hayashi 
Cc: Dai Okamura 
Cc: Stefan Roese 
Cc: Michal Simek 
---
  drivers/mmc/am654_sdhci.c | 1 -
  drivers/mmc/arm_pl180_mmci.c  | 1 -
  drivers/mmc/aspeed_sdhci.c| 1 -
  drivers/mmc/atmel_sdhci.c | 1 -
  drivers/mmc/bcm2835_sdhci.c   | 1 -
  drivers/mmc/bcm2835_sdhost.c  | 1 -
  drivers/mmc/bcmstb_sdhci.c| 1 -
  drivers/mmc/ca_dw_mmc.c   | 1 -
  drivers/mmc/davinci_mmc.c | 1 -
  drivers/mmc/dw_mmc.c  | 1 -
  drivers/mmc/exynos_dw_mmc.c   | 1 -
  drivers/mmc/f_sdh30.c | 1 -
  drivers/mmc/fsl_esdhc.c   | 1 -
  drivers/mmc/fsl_esdhc_imx.c   | 1 -
  drivers/mmc/fsl_esdhc_spl.c   | 2 +-
  drivers/mmc/ftsdc010_mci.c| 1 -
  drivers/mmc/gen_atmel_mci.c   | 2 +-
  drivers/mmc/hi6220_dw_mmc.c   | 1 -
  drivers/mmc/iproc_sdhci.c | 1 -
  drivers/mmc/jz_mmc.c  | 1 -
  drivers/mmc/kona_sdhci.c  | 1 -
  drivers/mmc/meson_gx_mmc.c| 1 -
  drivers/mmc/mmc-pwrseq.c  | 1 -
  drivers/mmc/mmc-uclass.c  | 1 -
  drivers/mmc/mmc.c | 3 ++-
  drivers/mmc/mmc_boot.c| 1 -
  drivers/mmc/mmc_bootdev.c | 1 -
  drivers/mmc/mmc_legacy.c  | 1 -
  drivers/mmc/mmc_spi.c | 1 -
  drivers/mmc/mmc_write.c   | 1 -
  drivers/mmc/msm_sdhci.c   | 1 -
  drivers/mmc/mtk-sd.c  | 1 -
  drivers/mmc/mv_sdhci.c| 1 -
  drivers/mmc/mvebu_mmc.c   | 1 -
  drivers/mmc/mxcmmc.c  | 1 -
  drivers/mmc/mxsmmc.c  | 1 -
  drivers/mmc/nexell_dw_mmc.c   | 1 -
  drivers/mmc/npcm_sdhci.c  | 1 -
  drivers/mmc/omap_hsmmc.c  | 1 -
  drivers/mmc/owl_mmc.c | 1 -
  drivers/mmc/pci_mmc.c | 1 -
  drivers/mmc/piton_mmc.c   | 1 -
  drivers/mmc/rockchip_dw_mmc.c | 1 -
  drivers/mmc/rockchip_sdhci.c  | 1 -
  drivers/mmc/rpmb.c| 1 -
  drivers/mmc/s5p_sdhci.c   | 1 -
  drivers/mmc/sandbox_mmc.c | 1 -
  drivers/mmc/sdhci-adma.c  | 1 -
  drivers/mmc/sdhci-cadence.c   | 1 -
  drivers/mmc/sdhci.c   | 2 +-
  drivers/mmc/sh_mmcif.c| 1 -
  drivers/mmc/snps_dw_mmc.c | 1 -
  drivers/mmc/socfpga_dw_mmc.c  | 1 -
  drivers/mmc/sti_sdhci.c   | 1 -
  drivers/mmc/stm32_sdmmc2.c| 1 -
  drivers/mmc/sunxi_mmc.c   | 1 -
  drivers/mmc/tangier_sdhci.c   | 1 -
  drivers/mmc/tegra_mmc.c   | 1 -
  drivers/mmc/tmio-common.c | 1 -
  drivers/mmc/uniphier-sd.c | 1 -
  drivers/mmc/xenon_sdhci.c | 1 -
  drivers/mmc/zynq_sdhci.c  | 1 -
  62 files changed, 5 insertions(+), 62 deletions(-)

diff --git a/drivers/mmc/am654_sdhci.c b/drivers/mmc/am654_sdhci.c
index ffb461c2f6c1..48fac7a11b48 100644
--- a/drivers/mmc/am654_sdhci.c
+++ b/drivers/mmc/am654_sdhci.c
@@ -6,7 +6,6 @@
   */
  
  #include 

-#include 
  #include 
  #include 
  #include 
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index cecc7ad783d0..f00b0ff0dc95 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -11,7 +11,6 @@
  
  /* #define DEBUG */
  
-#include "common.h"

  #include 
  #include 
  #include 
diff --git a/drivers/mmc/aspeed_sdhci.c b/drivers/mmc/aspeed_sdhci.c
index c9626c6beb8f..87a6f66ebb37 100644
--- a/drivers/mmc/aspeed_sdhci.c
+++ b/drivers/mmc/aspeed_sdhci.c
@@ -4,7 +4,6 @@
   * Eddie James 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/mmc/atmel_sdhci.c b/drivers/mmc/atmel_sdhci.c
index d92bad97b71e..0b265196f025 100644
--- a/drivers/mmc/atmel_sdhci.c
+++ b/drivers/mmc/atmel_sdhci.c
@@ -4,7 +4,6 @@
   *  Wenyou.Yang 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 5e48394fd0fb..598a51d914a9 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -36,7 +36,6 @@
   * Inspired by sdhci-pci.c, by Pierre Ossman
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index 5c23c03d10d7..720127468d37 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -30,7 +30,6 @@
   *  sdhci.c and sdhci-pci.c by Pierre Ossman
   */
  #include 
-#include 
  #include 
  #include 
  #include 
diff --git 

Re: [PATCH 33/81] gpio: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:30, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Tom Rini 
Cc: Matthias Brugger 
Cc: Peter Robinson 
Cc: Alex Nemirovsky 
Cc: Ryan Chen 
Cc: Chia-Wei Wang 
Cc: Aspeed BMC SW team 
Cc: Joel Stanley 
Cc: Nobuhiro Iwamatsu 
Cc: Marek Vasut 
Cc: Kunihiko Hayashi 
Cc: Dai Okamura 
Cc: Michal Simek 
Cc: Eugeniy Paltsev 
Cc: Gregory CLEMENT 
Cc: Lars Povlsen 
Cc: Horatiu Vultur 
Cc: Caleb Connolly 
Cc: Neil Armstrong 
Cc: Sumit Garg 
Cc: Stefan Roese 
Cc: Stephan Gerhold 
Cc: Linus Walleij 
Cc: Stefan Bosch 
Cc: Simon Glass 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Michael Walle 
Cc: Patrick Delaunay 
Cc: Patrice Chotard 
Cc: Thierry Reding 
Cc: Svyatoslav Ryhel 
Cc: Sean Anderson 
Cc: Andre Przywara 
Cc: Qu Wenruo 
Cc: Ilias Apalodimas 
Cc: Heiko Schocher 
Cc: Peng Fan 
Cc: Bin Meng 
Cc: Piotr Wojtaszczyk 
Cc: Jim Liu 
Cc: Nishanth Menon 
Cc: Samuel Holland 
Cc: Sam Edwards 
---
  drivers/gpio/74x164_gpio.c  | 1 -
  drivers/gpio/altera_pio.c   | 1 -
  drivers/gpio/at91_gpio.c| 1 -
  drivers/gpio/atmel_pio4.c   | 1 -
  drivers/gpio/axp_gpio.c | 1 -
  drivers/gpio/bcm2835_gpio.c | 1 -
  drivers/gpio/bcm6345_gpio.c | 1 -
  drivers/gpio/cortina_gpio.c | 1 -
  drivers/gpio/da8xx_gpio.c   | 1 -
  drivers/gpio/ftgpio010.c| 1 -
  drivers/gpio/gpio-aspeed.c  | 1 -
  drivers/gpio/gpio-fxl6408.c | 1 -
  drivers/gpio/gpio-rcar.c| 1 -
  drivers/gpio/gpio-rza1.c| 1 -
  drivers/gpio/gpio-uclass.c  | 1 -
  drivers/gpio/gpio-uniphier.c| 1 -
  drivers/gpio/gpio_slg7xl45106.c | 1 -
  drivers/gpio/hi6220_gpio.c  | 1 -
  drivers/gpio/hsdk-creg-gpio.c   | 1 -
  drivers/gpio/imx_rgpio2p.c  | 1 -
  drivers/gpio/intel_broadwell_gpio.c | 1 -
  drivers/gpio/intel_gpio.c   | 1 -
  drivers/gpio/intel_ich6_gpio.c  | 1 -
  drivers/gpio/iproc_gpio.c   | 1 -
  drivers/gpio/kw_gpio.c  | 1 -
  drivers/gpio/lpc32xx_gpio.c | 1 -
  drivers/gpio/max7320_gpio.c | 1 -
  drivers/gpio/mcp230xx_gpio.c| 1 -
  drivers/gpio/mpc83xx_spisel_boot.c  | 1 -
  drivers/gpio/mpc8xx_gpio.c  | 1 -
  drivers/gpio/mpc8xxx_gpio.c | 1 -
  drivers/gpio/mscc_sgpio.c   | 1 -
  drivers/gpio/msm_gpio.c | 1 -
  drivers/gpio/mt7621_gpio.c  | 1 -
  drivers/gpio/mvebu_gpio.c   | 1 -
  drivers/gpio/mxc_gpio.c | 1 -
  drivers/gpio/mxs_gpio.c | 1 -
  drivers/gpio/nmk_gpio.c | 1 -
  drivers/gpio/npcm_gpio.c| 1 -
  drivers/gpio/nx_gpio.c  | 1 -
  drivers/gpio/omap_gpio.c| 1 -
  drivers/gpio/pca953x.c  | 3 ++-
  drivers/gpio/pca953x_gpio.c | 1 -
  drivers/gpio/pcf8575_gpio.c | 1 -
  drivers/gpio/pic32_gpio.c   | 1 -
  drivers/gpio/qcom_pmic_gpio.c   | 1 -
  drivers/gpio/qe_gpio.c  | 1 -
  drivers/gpio/rk_gpio.c  | 1 -
  drivers/gpio/s5p_gpio.c | 1 -
  drivers/gpio/sandbox.c  | 1 -
  drivers/gpio/sandbox_test.c | 1 -
  drivers/gpio/sh_pfc.c   | 1 -
  drivers/gpio/sifive-gpio.c  | 1 -
  drivers/gpio/sl28cpld-gpio.c| 1 -
  drivers/gpio/stm32_gpio.c   | 1 -
  drivers/gpio/sunxi_gpio.c   | 1 -
  drivers/gpio/tca642x.c  | 2 +-
  drivers/gpio/tegra186_gpio.c| 1 -
  drivers/gpio/tegra_gpio.c   | 1 -
  drivers/gpio/vybrid_gpio.c  | 1 -
  drivers/gpio/xilinx_gpio.c  | 1 -
  drivers/gpio/zynq_gpio.c| 1 -
  drivers/gpio/zynqmp_gpio_modepin.c  | 1 -
  63 files changed, 3 insertions(+), 63 deletions(-)

diff --git a/drivers/gpio/74x164_gpio.c b/drivers/gpio/74x164_gpio.c
index 7a7cfe86114b..331428ccdb9a 100644
--- a/drivers/gpio/74x164_gpio.c
+++ b/drivers/gpio/74x164_gpio.c
@@ -8,7 +8,6 @@
   *
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/gpio/altera_pio.c b/drivers/gpio/altera_pio.c
index edc5a8093b0c..7ba1595e4ae3 100644
--- a/drivers/gpio/altera_pio.c
+++ b/drivers/gpio/altera_pio.c
@@ -4,7 +4,6 @@
   * Copyright (C) 2011  Missing Link Electronics
   * Joachim Foerster 
   */
-#include 
  #include 
  #include 
  #include 
diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c
index f80f4afd24ff..50a698159075 100644
--- a/drivers/gpio/at91_gpio.c
+++ b/drivers/gpio/at91_gpio.c
@@ -8,7 +8,6 @@
   */
  
  #include 

-#include 
  #include 
  #include 
  #include 
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index be1dd752bf76..65d064b46dfb 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -5,7 +5,6 @@
   * Copyright (C) 2015 Atmel Corporation
   * Wenyou.Yang 
   */
-#include 
  #include 
  

Re: [PATCH 19/81] clk: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:30, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Lukasz Majewski 
Cc: Sean Anderson 
Cc: Tom Rini 
Cc: Ryan Chen 
Cc: Chia-Wei Wang 
Cc: Aspeed BMC SW team 
Cc: Joel Stanley 
Cc: Eugeniy Paltsev 
Cc: Simon Glass 
Cc: Michal Simek 
Cc: Liviu Dudau 
Cc: Ryder Lee 
Cc: Weijie Gao 
Cc: Chunfeng Yun 
Cc: GSS_MTK_Uboot_upstream 
Cc: Neil Armstrong 
Cc: Mario Six 
Cc: Stefan Roese 
Cc: Manivannan Sadhasivam 
Cc: Caleb Connolly 
Cc: Sumit Garg 
Cc: Philipp Tomsich 
Cc: Kever Yang 
Cc: Patrick Delaunay 
Cc: Patrice Chotard 
Cc: Jagan Teki 
Cc: Andre Przywara 
Cc: Thierry Reding 
Cc: Svyatoslav Ryhel 
Cc: Kunihiko Hayashi 
Cc: Dai Okamura 
Cc: Eugen Hristev 
Cc: Igor Prusov 
Cc: Stefan Bosch 
Cc: Francois Berder 
Cc: Johan Jonker 
Cc: Minkyu Kang 
Cc: Chanho Park 
Cc: Sam Protsenko 
Cc: Konrad Dybcio 
Cc: Volodymyr Babchuk 
Cc: Torsten Duwe 
Cc: Hal Feng 
Cc: Leo Yu-Chi Liang 
Cc: Xingyu Wu 
Cc: Hoegeun Kwon 
Cc: Vishal Mahaveer 
Cc: Nishanth Menon 
Cc: Bryan Brattlof 
Cc: Hari Nagalla 
Cc: Apurva Nandan 
Cc: Neha Malcom Francis 
Cc: Udit Kumar 
---
  drivers/clk/altera/clk-agilex.c  | 1 -
  drivers/clk/altera/clk-arria10.c | 1 -
  drivers/clk/altera/clk-mem-n5x.c | 1 -
  drivers/clk/altera/clk-n5x.c | 1 -
  drivers/clk/aspeed/clk_ast2500.c | 1 -
  drivers/clk/aspeed/clk_ast2600.c | 1 -
  drivers/clk/at91/clk-generic.c   | 1 -
  drivers/clk/at91/clk-main.c  | 1 -
  drivers/clk/at91/clk-master.c| 1 -
  drivers/clk/at91/clk-peripheral.c| 1 -
  drivers/clk/at91/clk-programmable.c  | 1 -
  drivers/clk/at91/clk-sam9x60-pll.c   | 1 -
  drivers/clk/at91/clk-system.c| 1 -
  drivers/clk/at91/clk-utmi.c  | 1 -
  drivers/clk/at91/compat.c| 2 +-
  drivers/clk/at91/pmc.c   | 1 -
  drivers/clk/at91/sam9x60.c   | 1 -
  drivers/clk/at91/sama7g5.c   | 1 -
  drivers/clk/at91/sckc.c  | 1 -
  drivers/clk/clk-cdce9xx.c| 1 -
  drivers/clk/clk-composite.c  | 1 -
  drivers/clk/clk-divider.c| 1 -
  drivers/clk/clk-fixed-factor.c   | 1 -
  drivers/clk/clk-gate.c   | 1 -
  drivers/clk/clk-hsdk-cgu.c   | 1 -
  drivers/clk/clk-mux.c| 1 -
  drivers/clk/clk-uclass.c | 1 -
  drivers/clk/clk-xlnx-clock-wizard.c  | 1 -
  drivers/clk/clk.c| 1 -
  drivers/clk/clk_bcm6345.c| 1 -
  drivers/clk/clk_boston.c | 1 -
  drivers/clk/clk_fixed_factor.c   | 1 -
  drivers/clk/clk_fixed_rate.c | 1 -
  drivers/clk/clk_k210.c   | 1 -
  drivers/clk/clk_pic32.c  | 1 -
  drivers/clk/clk_sandbox.c| 1 -
  drivers/clk/clk_sandbox_ccf.c| 1 -
  drivers/clk/clk_sandbox_test.c   | 1 -
  drivers/clk/clk_scmi.c   | 1 -
  drivers/clk/clk_versaclock.c | 1 -
  drivers/clk/clk_versal.c | 1 -
  drivers/clk/clk_vexpress_osc.c   | 1 -
  drivers/clk/clk_zynq.c   | 1 -
  drivers/clk/clk_zynqmp.c | 1 -
  drivers/clk/exynos/clk-exynos7420.c  | 1 -
  drivers/clk/ics8n3qv01.c | 1 -
  drivers/clk/imx/clk-composite-8m.c   | 1 -
  drivers/clk/imx/clk-composite-93.c   | 1 -
  drivers/clk/imx/clk-fracn-gppll.c| 1 -
  drivers/clk/imx/clk-gate-93.c| 1 -
  drivers/clk/imx/clk-gate2.c  | 1 -
  drivers/clk/imx/clk-imx6q.c  | 1 -
  drivers/clk/imx/clk-imx8.c   | 1 -
  drivers/clk/imx/clk-imx8mm.c | 1 -
  drivers/clk/imx/clk-imx8mn.c | 1 -
  drivers/clk/imx/clk-imx8mp.c | 1 -
  drivers/clk/imx/clk-imx8mq.c | 1 -
  drivers/clk/imx/clk-imx8qm.c | 1 -
  drivers/clk/imx/clk-imx8qxp.c| 1 -
  drivers/clk/imx/clk-imx93.c  | 1 -
  drivers/clk/imx/clk-imxrt1020.c  | 1 -
  drivers/clk/imx/clk-imxrt1050.c  | 1 -
  drivers/clk/imx/clk-imxrt1170.c  | 1 -
  drivers/clk/imx/clk-pfd.c| 1 -
  drivers/clk/imx/clk-pll14xx.c| 1 -
  drivers/clk/imx/clk-pllv3.c  | 1 -
  drivers/clk/intel/clk_intel.c| 1 -
  drivers/clk/mediatek/clk-mt7622.c| 1 -
  drivers/clk/mediatek/clk-mt7623.c| 1 -
  drivers/clk/mediatek/clk-mt7629.c| 1 -
  drivers/clk/mediatek/clk-mt8183.c| 1 -
  drivers/clk/mediatek/clk-mt8512.c| 1 -
  drivers/clk/mediatek/clk-mt8516.c| 1 -
  drivers/clk/mediatek/clk-mt8518.c| 1 -
  drivers/clk/mediatek/clk-mtk.c   | 1 -
  drivers/clk/meson/a1.c   | 1 -
  drivers/clk/meson/axg-ao.c   | 1 -
  

Re: [PATCH 14/81] block: Remove and add needed includes

2024-05-09 Thread Kever Yang



On 2024/5/2 09:30, Tom Rini wrote:

Remove  from this driver directory and when needed
add missing include files directly.

Signed-off-by: Tom Rini 

Reviewed-by: Kever Yang 

Thanks,
- Kever

---
Cc: Tom Rini 
Cc: Tobias Waldekranz 
Cc: Simon Glass 
Cc: Heinrich Schuchardt 
Cc: Marek Vasut 
Cc: Bin Meng 
Cc: Johan Jonker 
Cc: Kever Yang 
Cc: Dan Carpenter 
Cc: Mattijs Korpershoek 
---
  drivers/block/blk-uclass.c   | 1 -
  drivers/block/blk_legacy.c   | 1 -
  drivers/block/blkcache.c | 1 -
  drivers/block/blkmap.c   | 1 -
  drivers/block/efi-media-uclass.c | 1 -
  drivers/block/efi_blk.c  | 1 -
  drivers/block/host-uclass.c  | 1 -
  drivers/block/host_dev.c | 1 -
  drivers/block/ide.c  | 1 -
  drivers/block/sandbox.c  | 1 -
  drivers/block/sb_efi_media.c | 1 -
  11 files changed, 11 deletions(-)

diff --git a/drivers/block/blk-uclass.c b/drivers/block/blk-uclass.c
index 77066da352a3..512c952f4d7a 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -6,7 +6,6 @@
  
  #define LOG_CATEGORY UCLASS_BLK
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/block/blk_legacy.c b/drivers/block/blk_legacy.c
index 5bf1d0471524..f36932183d1f 100644
--- a/drivers/block/blk_legacy.c
+++ b/drivers/block/blk_legacy.c
@@ -4,7 +4,6 @@
   * Written by Simon Glass 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/block/blkcache.c b/drivers/block/blkcache.c
index 26bcbea43533..0e69160249c7 100644
--- a/drivers/block/blkcache.c
+++ b/drivers/block/blkcache.c
@@ -4,7 +4,6 @@
   * Author: Eric Nelson
   *
   */
-#include 
  #include 
  #include 
  #include 
diff --git a/drivers/block/blkmap.c b/drivers/block/blkmap.c
index 21201409ed4b..34eed1380dca 100644
--- a/drivers/block/blkmap.c
+++ b/drivers/block/blkmap.c
@@ -4,7 +4,6 @@
   * Author: Tobias Waldekranz 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/block/efi-media-uclass.c b/drivers/block/efi-media-uclass.c
index e012f6f2f4c4..dc5e4f59b7f3 100644
--- a/drivers/block/efi-media-uclass.c
+++ b/drivers/block/efi-media-uclass.c
@@ -5,7 +5,6 @@
   * Copyright 2021 Google LLC
   */
  
-#include 

  #include 
  
  UCLASS_DRIVER(efi_media) = {

diff --git a/drivers/block/efi_blk.c b/drivers/block/efi_blk.c
index 917a19f60254..9766cd6f8327 100644
--- a/drivers/block/efi_blk.c
+++ b/drivers/block/efi_blk.c
@@ -8,7 +8,6 @@
   * Copyright 2021 Google LLC
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/block/host-uclass.c b/drivers/block/host-uclass.c
index b3647e3ce335..cf42bd1e07ac 100644
--- a/drivers/block/host-uclass.c
+++ b/drivers/block/host-uclass.c
@@ -9,7 +9,6 @@
  
  #define LOG_CATEGORY UCLASS_HOST
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/block/host_dev.c b/drivers/block/host_dev.c
index 52313435a0cb..b3ff3cd1fab9 100644
--- a/drivers/block/host_dev.c
+++ b/drivers/block/host_dev.c
@@ -9,7 +9,6 @@
  
  #define LOG_CATEGORY UCLASS_HOST
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index c698f9cbd558..b16623d7a3ab 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -6,7 +6,6 @@
  
  #define LOG_CATEGORY UCLASS_IDE
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c
index be4e02cb601a..ec34f1ad8c2e 100644
--- a/drivers/block/sandbox.c
+++ b/drivers/block/sandbox.c
@@ -3,7 +3,6 @@
   * Copyright (C) 2013 Henrik Nordstrom 
   */
  
-#include 

  #include 
  #include 
  #include 
diff --git a/drivers/block/sb_efi_media.c b/drivers/block/sb_efi_media.c
index 52af155a6001..3255db064961 100644
--- a/drivers/block/sb_efi_media.c
+++ b/drivers/block/sb_efi_media.c
@@ -5,7 +5,6 @@
   * Copyright 2021 Google LLC
   */
  
-#include 

  #include 
  
  static const struct udevice_id sandbox_efi_media_ids[] = {


[PATCH 2/2] power: regulator: add AXP717 support

2024-05-09 Thread Andre Przywara
The X-Powers AXP717 is a PMIC with four buck converters and a number
of LDOs, one of which is actually fixed (so not modelled here).

Add the compatible string and the respective regulator ranges to allow
drivers to adjust voltages.

Signed-off-by: Andre Przywara 
---
 drivers/power/pmic/axp.c|  1 +
 drivers/power/regulator/axp_regulator.c | 28 +
 include/axp_pmic.h  |  1 +
 3 files changed, 30 insertions(+)

diff --git a/drivers/power/pmic/axp.c b/drivers/power/pmic/axp.c
index fdf9ff66c29..c300fd2bbc2 100644
--- a/drivers/power/pmic/axp.c
+++ b/drivers/power/pmic/axp.c
@@ -89,6 +89,7 @@ static const struct udevice_id axp_pmic_ids[] = {
{ .compatible = "x-powers,axp221", .data = AXP221_ID },
{ .compatible = "x-powers,axp223", .data = AXP223_ID },
{ .compatible = "x-powers,axp313a", .data = AXP313_ID },
+   { .compatible = "x-powers,axp717", .data = AXP717_ID },
{ .compatible = "x-powers,axp803", .data = AXP803_ID },
{ .compatible = "x-powers,axp806", .data = AXP806_ID },
{ .compatible = "x-powers,axp809", .data = AXP809_ID },
diff --git a/drivers/power/regulator/axp_regulator.c 
b/drivers/power/regulator/axp_regulator.c
index d27e09538e0..75cdbca30f6 100644
--- a/drivers/power/regulator/axp_regulator.c
+++ b/drivers/power/regulator/axp_regulator.c
@@ -189,6 +189,33 @@ static const struct axp_regulator_plat axp313_regulators[] 
= {
{ }
 };
 
+/*
+ * The "dcdc2" regulator has another range, beyond 1.54V up to 3.4V, in
+ * steps of 100mV. We cannot model this easily, but also don't need that,
+ * since it's typically only used for lower voltages anyway, so just ignore it.
+ */
+static const struct axp_regulator_plat axp717_regulators[] = {
+   { "dcdc1", 0x80, BIT(0), 0x83, 0x7f,  500, 1540,  10, 70 },
+   { "dcdc2", 0x80, BIT(1), 0x84, 0x7f,  500, 1540,  10, 70 },
+   { "dcdc3", 0x80, BIT(2), 0x85, 0x7f,  500, 1840,  10, 70 },
+   { "dcdc4", 0x80, BIT(3), 0x86, 0x7f, 1000, 3700, 100, NA },
+   { "aldo1", 0x90, BIT(0), 0x93, 0x1f,  500, 3500, 100, NA },
+   { "aldo2", 0x90, BIT(1), 0x94, 0x1f,  500, 3500, 100, NA },
+   { "aldo3", 0x90, BIT(2), 0x95, 0x1f,  500, 3500, 100, NA },
+   { "aldo4", 0x90, BIT(3), 0x96, 0x1f,  500, 3500, 100, NA },
+   { "bldo1", 0x90, BIT(4), 0x97, 0x1f,  500, 3500, 100, NA },
+   { "bldo2", 0x90, BIT(5), 0x98, 0x1f,  500, 3500, 100, NA },
+   { "bldo3", 0x90, BIT(6), 0x99, 0x1f,  500, 3500, 100, NA },
+   { "bldo4", 0x90, BIT(7), 0x9a, 0x1f,  500, 3500, 100, NA },
+   { "cldo1", 0x91, BIT(0), 0x9b, 0x1f,  500, 3500, 100, NA },
+   { "cldo2", 0x91, BIT(1), 0x9c, 0x1f,  500, 3500, 100, NA },
+   { "cldo3", 0x91, BIT(2), 0x9d, 0x1f,  500, 3500, 100, NA },
+   { "cldo4", 0x91, BIT(3), 0x9e, 0x1f,  500, 3500, 100, NA },
+   {"cpusldo",0x91, BIT(4), 0x9f, 0x1f,  500, 1400,  50, NA },
+   {" boost", 0x19, BIT(4), 0x1e, 0xf0, 4550, 5510,  64, NA },
+   { }
+};
+
 static const struct axp_regulator_plat axp803_regulators[] = {
{ "dcdc1", 0x10, BIT(0), 0x20, 0x1f, 1600, 3400, 100, NA },
{ "dcdc2", 0x10, BIT(1), 0x21, 0x7f,  500, 1300,  10, 70 },
@@ -291,6 +318,7 @@ static const struct axp_regulator_plat *const 
axp_regulators[] = {
[AXP221_ID] = axp22x_regulators,
[AXP223_ID] = axp22x_regulators,
[AXP313_ID] = axp313_regulators,
+   [AXP717_ID] = axp717_regulators,
[AXP803_ID] = axp803_regulators,
[AXP806_ID] = axp806_regulators,
[AXP809_ID] = axp809_regulators,
diff --git a/include/axp_pmic.h b/include/axp_pmic.h
index aabafc8501b..ae62ef0d76d 100644
--- a/include/axp_pmic.h
+++ b/include/axp_pmic.h
@@ -33,6 +33,7 @@ enum {
AXP221_ID,
AXP223_ID,
AXP313_ID,
+   AXP717_ID,
AXP803_ID,
AXP806_ID,
AXP809_ID,
-- 
2.35.8



[PATCH 1/2] power: pmic: sunxi: add AXP717 SPL driver

2024-05-09 Thread Andre Przywara
On boards using the AXP717 PMIC, the DRAM rail is often not setup
correctly at reset time, so we have to program the PMIC very early in
the SPL, before running the DRAM initialisation.

Add a simple AXP717 PMIC driver that knows about the buck converters, so
that we can set the voltage for the DRAM chips and the CPU cores.

Signed-off-by: Andre Przywara 
---
 arch/arm/mach-sunxi/pmic_bus.c |  3 ++
 board/sunxi/board.c|  2 +-
 drivers/power/Kconfig  | 17 +--
 drivers/power/Makefile |  1 +
 drivers/power/axp717.c | 92 ++
 5 files changed, 110 insertions(+), 5 deletions(-)
 create mode 100644 drivers/power/axp717.c

diff --git a/arch/arm/mach-sunxi/pmic_bus.c b/arch/arm/mach-sunxi/pmic_bus.c
index 87df312725c..8e19324c8ac 100644
--- a/arch/arm/mach-sunxi/pmic_bus.c
+++ b/arch/arm/mach-sunxi/pmic_bus.c
@@ -19,6 +19,7 @@
 #define AXP152_I2C_ADDR0x30
 
 #define AXP209_I2C_ADDR0x34
+#define AXP717_I2C_ADDR0x34
 
 #define AXP305_I2C_ADDR0x36
 #define AXP313_I2C_ADDR0x36
@@ -36,6 +37,8 @@ static int pmic_i2c_address(void)
return AXP305_I2C_ADDR;
if (IS_ENABLED(CONFIG_AXP313_POWER))
return AXP313_I2C_ADDR;
+   if (IS_ENABLED(CONFIG_AXP717_POWER))
+   return AXP717_I2C_ADDR;
 
/* Other AXP2xx and AXP8xx variants */
return AXP209_I2C_ADDR;
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 1313b01dcea..2c65f4c93cb 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -563,7 +563,7 @@ void sunxi_board_init(void)
 #if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER || \
defined CONFIG_AXP221_POWER || defined CONFIG_AXP305_POWER || \
defined CONFIG_AXP809_POWER || defined CONFIG_AXP818_POWER || \
-   defined CONFIG_AXP313_POWER
+   defined CONFIG_AXP313_POWER || defined CONFIG_AXP717_POWER
power_failed = axp_init();
 
if (IS_ENABLED(CONFIG_AXP_DISABLE_BOOT_ON_POWERON) && !power_failed) {
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 33b8bc1214d..5556a22cf69 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -109,6 +109,13 @@ config AXP313_POWER
Select this to enable support for the AXP313 PMIC found on some
H616 boards.
 
+config AXP717_POWER
+   bool "axp717 pmic support"
+   select AXP_PMIC_BUS
+   select CMD_POWEROFF
+   ---help---
+   Select this to enable support for the AXP717 PMIC found on some boards.
+
 config AXP809_POWER
bool "axp809 pmic support"
depends on MACH_SUN9I
@@ -151,10 +158,11 @@ config AXP_DCDC1_VOLT
 
 config AXP_DCDC2_VOLT
int "axp pmic dcdc2 voltage"
-   depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || AXP809_POWER 
|| AXP818_POWER || AXP313_POWER
+   depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || AXP809_POWER 
|| AXP818_POWER || AXP313_POWER || AXP717_POWER
default 900 if AXP818_POWER
default 1400 if AXP152_POWER || AXP209_POWER
default 1000 if AXP313_POWER
+   default 1000 if AXP717_POWER
default 1200 if MACH_SUN6I
default 1100 if MACH_SUN8I
default 0 if MACH_SUN9I
@@ -167,11 +175,11 @@ config AXP_DCDC2_VOLT
On A80 boards dcdc2 powers the GPU and can be left off.
On A83T boards dcdc2 is used for VDD-CPUA(cluster 0) and should be 0.9V.
On R40 boards dcdc2 is VDD-CPU and should be 1.1V
-   On boards using the AXP313 it's often VDD-CPU.
+   On boards using the AXP313 or AXP717 it's often VDD-CPU.
 
 config AXP_DCDC3_VOLT
int "axp pmic dcdc3 voltage"
-   depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || AXP809_POWER 
|| AXP818_POWER || AXP313_POWER
+   depends on AXP152_POWER || AXP209_POWER || AXP221_POWER || AXP809_POWER 
|| AXP818_POWER || AXP313_POWER || AXP717_POWER
default 900 if AXP809_POWER || AXP818_POWER
default 1500 if AXP152_POWER
default 1250 if AXP209_POWER
@@ -188,7 +196,8 @@ config AXP_DCDC3_VOLT
On A80 boards dcdc3 is used for VDD-CPUA(cluster 0) and should be 0.9V.
On A83T boards dcdc3 is used for VDD-CPUB(cluster 1) and should be 0.9V.
On R40 boards dcdc3 is VDD-SYS and VDD-GPU and should be 1.1V.
-   On boards using the AXP313 it's often VDD-DRAM and should be 1.1V for 
LPDDR4.
+   On boards using the AXP313 or AXP717 it's often VDD-DRAM and should
+   be 1.1V for LPDDR4.
 
 config AXP_DCDC4_VOLT
int "axp pmic dcdc4 voltage"
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index c7ee4595fc8..41ebb494fff 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_AXP209_POWER)+= axp209.o
 obj-$(CONFIG_AXP221_POWER) += axp221.o
 obj-$(CONFIG_AXP305_POWER) += axp305.o
 obj-$(CONFIG_AXP313_POWER) 

[PATCH 0/2] power: regulator: add AXP717 support

2024-05-09 Thread Andre Przywara
The X-Powers AXP717 is a PMIC chip, controlled via I2C or RSB. It
features four DC/DC converters and a number of linear regulators.
Also it contains some charger and USB-C detection circuitry, though we
don't use that in U-Boot. The PMIC is used on some newer Allwinner
devices, for instance the Anbernic handheld gaming devices.

Add AXP717 support to the DM driven AXP regulator driver, and also an SPL
version, as we need to program the DRAM voltage rail correctly before
attempting to initialise the DRAM controller.

Cheers,
Ander

Andre Przywara (2):
  power: pmic: sunxi: add AXP717 SPL driver
  power: regulator: add AXP717 support

 arch/arm/mach-sunxi/pmic_bus.c  |  3 +
 board/sunxi/board.c |  2 +-
 drivers/power/Kconfig   | 17 +++--
 drivers/power/Makefile  |  1 +
 drivers/power/axp717.c  | 92 +
 drivers/power/pmic/axp.c|  1 +
 drivers/power/regulator/axp_regulator.c | 28 
 include/axp_pmic.h  |  1 +
 8 files changed, 140 insertions(+), 5 deletions(-)
 create mode 100644 drivers/power/axp717.c

-- 
2.35.8



[PATCH] sunxi: spl: h616: fix booting from high MMC offset

2024-05-09 Thread Andre Przywara
The BootROM in the Allwinner H616 tries to load the initial boot code
from sector 16 (8KB) of an SD card or eMMC device, but also looks at
sector 512 (256KB). This helps with GPT formatted cards.
A "high" boot offset is also used on previous SoCs, but it's sector 256
(128KB) there instead.

Extend the existing offset calculation code to consider the different
sector offset when running on an H616 SoC. This allows to load U-Boot
on any H616 device when the SPL is not located at 8KB.

Signed-off-by: Andre Przywara 
---
 arch/arm/mach-sunxi/board.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c
index 0140b07d32a..046e9fbfc67 100644
--- a/arch/arm/mach-sunxi/board.c
+++ b/arch/arm/mach-sunxi/board.c
@@ -333,7 +333,8 @@ uint32_t sunxi_get_spl_size(void)
  * The eGON SPL image can be located at 8KB or at 128KB into an SD card or
  * an eMMC device. The boot source has bit 4 set in the latter case.
  * By adding 120KB to the normal offset when booting from a "high" location
- * we can support both cases.
+ * we can support both cases. The H616 has the alternative location
+ * moved up to 256 KB instead of 128KB, so cater for that, too.
  * Also U-Boot proper is located at least 32KB after the SPL, but will
  * immediately follow the SPL if that is bigger than that.
  */
@@ -349,6 +350,8 @@ unsigned long board_spl_mmc_get_uboot_raw_sector(struct mmc 
*mmc,
case SUNXI_BOOTED_FROM_MMC0_HIGH:
case SUNXI_BOOTED_FROM_MMC2_HIGH:
sector += (128 - 8) * 2;
+   if (IS_ENABLED(CONFIG_MACH_SUN50I_H616))
+   sector += 128 * 2;
break;
}
 
-- 
2.35.8



[PATCH v2] sysreset: psci: drop reliance on SPL support

2024-05-09 Thread Andre Przywara
At the moment enabling CONFIG_SYSRESET_PSCI *selects* SPL_ARM_PSCI_FW,
even though this is a platform design property, so nothing any driver
should enforce. Some platforms load the PSCI runtime (TF-A) only in the
SPL, so PSCI is naturally not available during SPL runtime.

Spit CONFIG_SYSRESET_PSCI up into an SPL and a U-Boot proper version,
and let the former *depend* on SPL_ARM_PSCI_FW.

This allows to enable CONFIG_SYSRESET_PSCI on platforms without SPL PSCI
support.

Signed-off-by: Andre Przywara 
---
changelog v1 ... v2:
- change name of symbol to comply with CONFIG_$(SPL_TPL_)SYSRESET_PSCI

 drivers/sysreset/Kconfig  | 8 +++-
 drivers/sysreset/Makefile | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
index 49c0787b26d..ede9e23eacf 100644
--- a/drivers/sysreset/Kconfig
+++ b/drivers/sysreset/Kconfig
@@ -119,11 +119,17 @@ config SYSRESET_PALMAS
 config SYSRESET_PSCI
bool "Enable support for PSCI System Reset"
depends on ARM_PSCI_FW
-   select SPL_ARM_PSCI_FW if SPL
help
  Enable PSCI SYSTEM_RESET function call.  To use this, PSCI firmware
  must be running on your system.
 
+config SPL_SYSRESET_PSCI
+   bool "Enable support for PSCI System Reset in SPL"
+   depends on SPL_ARM_PSCI_FW
+   help
+ Enable PSCI SYSTEM_RESET function call in the SPL. To use this, PSCI
+ firmware must be running on your system before the SPL.
+
 config SYSRESET_SBI
bool "Enable support for SBI System Reset"
depends on RISCV_SMODE && SBI_V02
diff --git a/drivers/sysreset/Makefile b/drivers/sysreset/Makefile
index e0e732205df..8d992ae0930 100644
--- a/drivers/sysreset/Makefile
+++ b/drivers/sysreset/Makefile
@@ -14,7 +14,7 @@ obj-$(CONFIG_SYSRESET_MPC83XX) += sysreset_mpc83xx.o
 obj-$(CONFIG_SYSRESET_MICROBLAZE) += sysreset_microblaze.o
 obj-$(CONFIG_SYSRESET_OCTEON) += sysreset_octeon.o
 obj-$(CONFIG_$(SPL_TPL_)SYSRESET_PALMAS) += sysreset_palmas.o
-obj-$(CONFIG_SYSRESET_PSCI) += sysreset_psci.o
+obj-$(CONFIG_$(SPL_TPL_)SYSRESET_PSCI) += sysreset_psci.o
 obj-$(CONFIG_SYSRESET_SBI) += sysreset_sbi.o
 obj-$(CONFIG_SYSRESET_SOCFPGA) += sysreset_socfpga.o
 obj-$(CONFIG_SYSRESET_SOCFPGA_SOC64) += sysreset_socfpga_soc64.o
-- 
2.35.8



Re: [PATCH v4 17/19] doc: board: ti: am62px: document OSPI layout

2024-05-09 Thread Tom Rini
On Thu, May 09, 2024 at 11:41:21AM -0500, Jonathan Humphreys wrote:

> Added OSPI flash layout diagram, as well as example commands to flash
> firmware to it.
> 
> Signed-off-by: Jonathan Humphreys 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v4 14/19] doc: board: ti: am62x: document OSPI layout

2024-05-09 Thread Tom Rini
On Thu, May 09, 2024 at 11:41:18AM -0500, Jonathan Humphreys wrote:

> Added OSPI flash layout diagram, as well as example commands to flash
> firmware to it.
> 
> Signed-off-by: Jonathan Humphreys 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v4 07/19] doc: board: ti: j721e: document OSPI layout

2024-05-09 Thread Tom Rini
On Thu, May 09, 2024 at 11:41:11AM -0500, Jonathan Humphreys wrote:

> Updated OSPI flash layout diagram.
> 
> Signed-off-by: Jonathan Humphreys 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v4 04/19] doc: board: ti: am64x: document OSPI layout

2024-05-09 Thread Tom Rini
On Thu, May 09, 2024 at 11:41:08AM -0500, Jonathan Humphreys wrote:

> Added OSPI flash layout diagram, as well as example commands to flash
> firmware to it.
> 
> Signed-off-by: Jonathan Humphreys 

Thanks for reworking things to use SVGs here.

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH 4/4] arm: EFI linker script text section alignment

2024-05-09 Thread Ilias Apalodimas
Hi Raymond,

Try not to post the same patches without the fixes that were asked
[0], at least not without an explanation.

On Thu, 9 May 2024 at 17:38, Raymond Mao  wrote:
>
> Add text section alignment to fix sbsign signing warning
> 'gaps in the section table may result in different checksums'
> which causes a failure of efi_image_verify_diges()
>
> Signed-off-by: Raymond Mao 
> ---
>  arch/arm/lib/elf_aarch64_efi.lds | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/lib/elf_aarch64_efi.lds 
> b/arch/arm/lib/elf_aarch64_efi.lds
> index 5dd98091698..bffd9a0447a 100644
> --- a/arch/arm/lib/elf_aarch64_efi.lds
> +++ b/arch/arm/lib/elf_aarch64_efi.lds
> @@ -28,6 +28,7 @@ SECTIONS
> *(.dynamic);
> . = ALIGN(512);
> }
> +   . = ALIGN(4096);

This is not what you want. There's already an ALIGN a few lines below
and you must include the symbols for _etext and _text_size.
You have to move the rela.* sections after the alignment. IIRC those
were inspired by [1], so you can look for guidance there.
On top of that riscv will need similar fixes (and any other
architecture that uses those)


> .rela.dyn : { *(.rela.dyn) }
> .rela.plt : { *(.rela.plt) }
> .rela.got : { *(.rela.got) }
> --
> 2.25.1
>

[0] 
https://lore.kernel.org/u-boot/cac_iwjk+14l6mei8gqn-mcf-schvhnjj79ne1twlv+kgwzk...@mail.gmail.com/
[1] https://git.code.sf.net/p/gnu-efi/code

/Ilias


Re: [PATCH 2/4] efi_loader: remove redundant hash includes

2024-05-09 Thread Ilias Apalodimas
On Thu, 9 May 2024 at 17:38, Raymond Mao  wrote:
>
> Remove the redundant includes of u-boot/sha1.h, u-boot/sha256.h
> and u-boot/sha512.h
>
> Signed-off-by: Raymond Mao 
> ---
>  lib/efi_loader/efi_signature.c | 1 -
>  lib/efi_loader/efi_tcg2.c  | 3 ---
>  2 files changed, 4 deletions(-)
>
> diff --git a/lib/efi_loader/efi_signature.c b/lib/efi_loader/efi_signature.c
> index f338e732759..184eac8cddb 100644
> --- a/lib/efi_loader/efi_signature.c
> +++ b/lib/efi_loader/efi_signature.c
> @@ -17,7 +17,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>
>  const efi_guid_t efi_guid_sha256 = EFI_CERT_SHA256_GUID;
>  const efi_guid_t efi_guid_cert_rsa2048 = EFI_CERT_RSA2048_GUID;
> diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
> index b07e0099c27..ac056dcfc55 100644
> --- a/lib/efi_loader/efi_tcg2.c
> +++ b/lib/efi_loader/efi_tcg2.c
> @@ -19,9 +19,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
> -#include 
> -#include 
>  #include 
>  #include 
>  #include 
> --
> 2.25.1
>

Reviewed-by: Ilias Apalodimas 


Re: [PATCH v3 3/5] doc: Milk-V Mars CM and Milk-V Mars CM Lite

2024-05-09 Thread E Shattow
Hi,

A couple of nits I missed. Good for PR otherwise.

On Thu, May 9, 2024 at 3:12 AM Heinrich Schuchardt
 wrote:
>
> Provide a man-page describing the usage of U-Boot on
> the Milk-V Mars CM and Milk-V Mars CM Lite boards.
>
> Signed-off-by: Heinrich Schuchardt 
> ---
> v3:
> correct device-tree names
> suggest not to use mac initialize
> refer to XMODEM-1K
> v2:
> refer to tio as tool for booting via UART
> describe how to update serial number
> description updates as suggested by E. Shattow
> ---
>  doc/board/starfive/index.rst  |   1 +
>  doc/board/starfive/milk-v_mars_cm.rst | 193 ++
>  2 files changed, 194 insertions(+)
>  create mode 100644 doc/board/starfive/milk-v_mars_cm.rst
>
> diff --git a/doc/board/starfive/index.rst b/doc/board/starfive/index.rst
> index 2762bf74c11..afa85ad2540 100644
> --- a/doc/board/starfive/index.rst
> +++ b/doc/board/starfive/index.rst
> @@ -7,4 +7,5 @@ StarFive
> :maxdepth: 1
>
> milk-v_mars.rst
> +   milk-v_mars_cm.rst
> visionfive2

File extension is omitted for relative toctree references. See:
https://documatt.com/restructuredtext-reference/element/toctree.html:

"Relative document names are relative to the current document
(containing toctree). Relative document names are those which not
begin with /. For example, transition is transition.rst in the current
folder, or collection/parts is collection/parts.rst, etc."

'milk-v_mars.rst' should also drop the filename extension.

> diff --git a/doc/board/starfive/milk-v_mars_cm.rst 
> b/doc/board/starfive/milk-v_mars_cm.rst
> new file mode 100644
> index 000..68561adadfc
> --- /dev/null
> +++ b/doc/board/starfive/milk-v_mars_cm.rst
> @@ -0,0 +1,193 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +
> +Milk-V Mars CM
> +==
> +
> +U-Boot for the Milk-V Mars CM uses the same U-Boot binaries as the 
> VisionFive 2
> +board. In U-Boot SPL the actual board is detected and the device-tree patched
> +accordingly.
> +
> +The Milk-V Mars CM Lite comes without eMMC and needs a different pin muxing
> +than the Milk-V Mars CM. The availability and size of the eMMC shows up in 
> the
> +serial number displayed by the *mac* command, e.g.
> +MARC-V10-2340-D002E016-0304. The number after the E is the MMC size. 
> U-Boot
> +takes a value of E000 as an indicator for the Lite version. Unfortunately the
> +vendor has not set this value correctly on some Lite boards.
> +
> +Please, use CONFIG_STARFIVE_NO_EMMC=y if EEPROM data indicates eMMC is 
> present
> +on the Milk-V Mars CM Lite. Otherwise you will not be able to read from the
> +SD-card.
> +
> +The serial number can be corrected using the *mac* command:
> +
> +.. code-block::
> +
> +mac read_eeprom
> +mac product_id MARC-V10-2340-D002E000-0304
> +mac write_eeprom
> +
> +.. note::
> +
> +   The *mac initialize* command overwrites the vendor string and the MAC
> +   addresses. This is why it is avoided here.
> +
> +By default the EEPROM is write protected. The write protection may be 
> overcome
> +by connecting the "GND" and "EN" test pads on top of the module.
> +
> +Building
> +
> +
> +1. Add the RISC-V toolchain to your PATH.
> +2. Setup ARCH & cross compilation environment variable:
> +
> +.. code-block:: none
> +
> +   export CROSS_COMPILE=
> +
> +The M-mode software OpenSBI provides the supervisor binary interface (SBI) 
> and
> +is responsible for the switch to S-Mode. It is a prerequisite to build 
> U-Boot.
> +Support for the JH7110 was introduced in OpenSBI 1.2. It is recommended to 
> use
> +a current release.
> +
> +.. code-block:: console
> +
> +   git clone https://github.com/riscv/opensbi.git
> +   cd opensbi
> +   make PLATFORM=generic FW_TEXT_START=0x4000
> +
> +(*FW_TEXT_START* is not needed anymore after OpenSBI patch d4d2582eef7a
> +"firmware: remove FW_TEXT_START" which should appear in OpenSBI 1.5.)
> +
> +Now build the U-Boot SPL and U-Boot proper.
> +
> +.. code-block:: console
> +
> +   cd 
> +   make starfive_visionfive2_defconfig
> +   make 
> OPENSBI=$(opensbi_dir)/build/platform/generic/firmware/fw_dynamic.bin
> +
> +This will generate the U-Boot SPL image (spl/u-boot-spl.bin.normal.out) as 
> well
> +as the FIT image (u-boot.itb) with OpenSBI and U-Boot.
> +
> +Device-tree selection
> +~
> +
> +Depending on the board version U-Boot sets variable $fdtfile to either
> +starfive/jh7110-milkv-mars-cm.dtb (with eMMC storage) or
> +starfive/jh7110-milkv-mars-cm-lite.dtb (without eMMC storage).
> +
> +To overrule this selection the variable can be set manually and saved in the
> +environment
> +
> +::
> +
> +env set fdtfile my_device-tree.dtb
> +env save
> +
> +or the configuration variable CONFIG_DEFAULT_FDT_FILE can be used to set to
> +provide a default value.
> +
> +The variable *$fdtfile* is used in the boot process to automatically load
> +a device-tree provided by 

Re: [PATCH v1] rockchip: rv1126: Migrate to OF_UPSTREAM

2024-05-09 Thread Jonas Karlman
Hi Anand,

On 2024-05-09 18:42, Anand Moon wrote:
> Hi Jonas
> 
> On Thu, 9 May 2024 at 21:38, Jonas Karlman  wrote:
>>
>> Hi,
>>
>> On 2024-05-09 17:26, Anand Moon wrote:
>>> Migrate RV1126 boards that exists in Linux v6.8 to use OF_UPSTREAM.
>>>
>>> Following targets is not migrated to use OF_UPSTREAM:
>>
> 
> Ok, will update the commit message in the future.
> 
>> At first I got a little bit confused about the "not migrated", but see
>> now that these are the boards that is migrated.
>>
>>> - rv1126-edgeble-neu2 : Board is an industrial form factor
>>> IO board.
>>> - sonoff-ihost-rv1126 : Gateway device designed to provide a
>>> Smart Home Hub.
>>>
>>> Cc: Tim Lunn 
>>> Cc: Jagan Teki 
>>> Signed-off-by: Anand Moon 
>>> ---
>>> Tested on neu2 edgable board.
>>> ---
>>>  arch/arm/dts/Makefile   |   3 -
>>>  arch/arm/dts/rv1126-edgeble-neu2-io.dts | 112 -
>>>  arch/arm/dts/rv1126-edgeble-neu2.dtsi   | 345 -
>>>  arch/arm/dts/rv1126-pinctrl.dtsi| 341 -
>>>  arch/arm/dts/rv1126-sonoff-ihost.dts|  29 --
>>>  arch/arm/dts/rv1126-sonoff-ihost.dtsi   | 404 ---
>>>  arch/arm/dts/rv1126.dtsi| 623 
>>>  arch/arm/mach-rockchip/Kconfig  |   1 +
>>>  configs/neu2-io-rv1126_defconfig|   2 +-
>>>  configs/sonoff-ihost-rv1126_defconfig   |   2 +-
>>>  10 files changed, 3 insertions(+), 1859 deletions(-)
>>>  delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2-io.dts
>>>  delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2.dtsi
>>>  delete mode 100644 arch/arm/dts/rv1126-pinctrl.dtsi
>>>  delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dts
>>>  delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dtsi
>>>  delete mode 100644 arch/arm/dts/rv1126.dtsi
>>
>> Following should also be removed:
>> - include/dt-bindings/clock/rockchip,rv1126-cru.h
>> - include/dt-bindings/power/rockchip,rv1126-power.h
>>
>> Side note, following is remaining after the rv1108 migration and should
>> probably also be removed:
>> - include/dt-bindings/clock/rv1108-cru.h
>>
> 
> I will check if any drivers are using this if not I will remove them.
> will address this in V2.

After migration to OF_UPSTREAM any related dt-bindings include must be
removed from include/dt-bindings/ or the upstream include files cannot
be included from dts/upstream/include/dt-bindings/.

Fabio just sent a fix for rv1108-cru.h, thanks!

Please remove the two rv1126 include/dt-bindings/ files in v2.

Regards,
Jonas

> 
>> Regards,
>> Jonas
> 
> Thanks
> -Anand



[PATCH] rockchip: rv1108: Remove unneeded local rv1108-cru.h

2024-05-09 Thread Fabio Estevam
After the conversion of RV1108 to OF_UPSTREAM, 
include/dt-bindings/clock/rv1108-cru.h is no longer needed because
there is dts/upstream/include/dt-bindings/clock/rv1108-cru.h from
upstream Linux.

Remove the unneeded rv1108-cru.h file.

Reported-by: Jonas Karlman 
Signed-off-by: Fabio Estevam 
---
 include/dt-bindings/clock/rv1108-cru.h | 356 -
 1 file changed, 356 deletions(-)
 delete mode 100644 include/dt-bindings/clock/rv1108-cru.h

diff --git a/include/dt-bindings/clock/rv1108-cru.h 
b/include/dt-bindings/clock/rv1108-cru.h
deleted file mode 100644
index 10ed9d140f4b..
--- a/include/dt-bindings/clock/rv1108-cru.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (c) 2017 Rockchip Electronics Co. Ltd.
- * Author: Shawn Lin 
- */
-
-#ifndef _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H
-#define _DT_BINDINGS_CLK_ROCKCHIP_RV1108_H
-
-/* pll id */
-#define PLL_APLL   0
-#define PLL_DPLL   1
-#define PLL_GPLL   2
-#define ARMCLK 3
-
-/* sclk gates (special clocks) */
-#define SCLK_SPI0  65
-#define SCLK_NANDC 67
-#define SCLK_SDMMC 68
-#define SCLK_SDIO  69
-#define SCLK_EMMC  71
-#define SCLK_UART0 72
-#define SCLK_UART1 73
-#define SCLK_UART2 74
-#define SCLK_I2S0  75
-#define SCLK_I2S1  76
-#define SCLK_I2S2  77
-#define SCLK_TIMER078
-#define SCLK_TIMER179
-#define SCLK_SFC   80
-#define SCLK_SDMMC_DRV 81
-#define SCLK_SDIO_DRV  82
-#define SCLK_EMMC_DRV  83
-#define SCLK_SDMMC_SAMPLE  84
-#define SCLK_SDIO_SAMPLE   85
-#define SCLK_EMMC_SAMPLE   86
-#define SCLK_VENC_CORE 87
-#define SCLK_HEVC_CORE 88
-#define SCLK_HEVC_CABAC89
-#define SCLK_PWM0_PMU  90
-#define SCLK_I2C0_PMU  91
-#define SCLK_WIFI  92
-#define SCLK_CIFOUT93
-#define SCLK_MIPI_CSI_OUT  94
-#define SCLK_CIF0  95
-#define SCLK_CIF1  96
-#define SCLK_CIF2  97
-#define SCLK_CIF3  98
-#define SCLK_DSP   99
-#define SCLK_DSP_IOP   100
-#define SCLK_DSP_EPP   101
-#define SCLK_DSP_EDP   102
-#define SCLK_DSP_EDAP  103
-#define SCLK_CVBS_HOST 104
-#define SCLK_HDMI_SFR  105
-#define SCLK_HDMI_CEC  106
-#define SCLK_CRYPTO107
-#define SCLK_SPI   108
-#define SCLK_SARADC109
-#define SCLK_TSADC 110
-#define SCLK_MAC_PRE   111
-#define SCLK_MAC   112
-#define SCLK_MAC_RX113
-#define SCLK_MAC_REF   114
-#define SCLK_MAC_REFOUT115
-#define SCLK_DSP_PFM   116
-#define SCLK_RGA   117
-#define SCLK_I2C1  118
-#define SCLK_I2C2  119
-#define SCLK_I2C3  120
-#define SCLK_PWM   121
-#define SCLK_ISP   122
-#define SCLK_USBPHY123
-#define SCLK_I2S0_SRC  124
-#define SCLK_I2S1_SRC  125
-#define SCLK_I2S2_SRC  126
-#define SCLK_UART0_SRC 127
-#define SCLK_UART1_SRC 128
-#define SCLK_UART2_SRC 129
-#define SCLK_MAC_TX130
-#define SCLK_MACREF131
-#define SCLK_MACREF_OUT132
-
-#define DCLK_VOP_SRC   185
-#define DCLK_HDMIPHY   186
-#define DCLK_VOP   187
-
-/* aclk gates */
-#define ACLK_DMAC  192
-#define ACLK_PRE   193
-#define ACLK_CORE  194
-#define ACLK_ENMCORE   195
-#define ACLK_RKVENC196
-#define ACLK_RKVDEC197
-#define ACLK_VPU   198
-#define ACLK_CIF0  199
-#define ACLK_VIO0  200
-#define ACLK_VIO1  201
-#define ACLK_VOP   202
-#define ACLK_IEP   203
-#define ACLK_RGA   204
-#define ACLK_ISP   205
-#define ACLK_CIF1  206
-#define ACLK_CIF2  207
-#define ACLK_CIF3  208
-#define ACLK_PERI  209
-#define ACLK_GMAC

Re: [PATCH v1] rockchip: rv1126: Migrate to OF_UPSTREAM

2024-05-09 Thread Anand Moon
Hi Jonas

On Thu, 9 May 2024 at 21:38, Jonas Karlman  wrote:
>
> Hi,
>
> On 2024-05-09 17:26, Anand Moon wrote:
> > Migrate RV1126 boards that exists in Linux v6.8 to use OF_UPSTREAM.
> >
> > Following targets is not migrated to use OF_UPSTREAM:
>

Ok, will update the commit message in the future.

> At first I got a little bit confused about the "not migrated", but see
> now that these are the boards that is migrated.
>
> > - rv1126-edgeble-neu2 : Board is an industrial form factor
> > IO board.
> > - sonoff-ihost-rv1126 : Gateway device designed to provide a
> > Smart Home Hub.
> >
> > Cc: Tim Lunn 
> > Cc: Jagan Teki 
> > Signed-off-by: Anand Moon 
> > ---
> > Tested on neu2 edgable board.
> > ---
> >  arch/arm/dts/Makefile   |   3 -
> >  arch/arm/dts/rv1126-edgeble-neu2-io.dts | 112 -
> >  arch/arm/dts/rv1126-edgeble-neu2.dtsi   | 345 -
> >  arch/arm/dts/rv1126-pinctrl.dtsi| 341 -
> >  arch/arm/dts/rv1126-sonoff-ihost.dts|  29 --
> >  arch/arm/dts/rv1126-sonoff-ihost.dtsi   | 404 ---
> >  arch/arm/dts/rv1126.dtsi| 623 
> >  arch/arm/mach-rockchip/Kconfig  |   1 +
> >  configs/neu2-io-rv1126_defconfig|   2 +-
> >  configs/sonoff-ihost-rv1126_defconfig   |   2 +-
> >  10 files changed, 3 insertions(+), 1859 deletions(-)
> >  delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2-io.dts
> >  delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2.dtsi
> >  delete mode 100644 arch/arm/dts/rv1126-pinctrl.dtsi
> >  delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dts
> >  delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dtsi
> >  delete mode 100644 arch/arm/dts/rv1126.dtsi
>
> Following should also be removed:
> - include/dt-bindings/clock/rockchip,rv1126-cru.h
> - include/dt-bindings/power/rockchip,rv1126-power.h
>
> Side note, following is remaining after the rv1108 migration and should
> probably also be removed:
> - include/dt-bindings/clock/rv1108-cru.h
>

I will check if any drivers are using this if not I will remove them.
will address this in V2.

> Regards,
> Jonas

Thanks
-Anand


[PATCH v4 03/19] configs: am64x: Enable EFI capsule update

2024-05-09 Thread Jonathan Humphreys
Enable on disk, raw capsule update.

Signed-off-by: Jonathan Humphreys 
---
 configs/am64x_evm_a53_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig
index e000549d6d0..c9bdd7b54cc 100644
--- a/configs/am64x_evm_a53_defconfig
+++ b/configs/am64x_evm_a53_defconfig
@@ -178,3 +178,5 @@ CONFIG_USB_FUNCTION_MASS_STORAGE=y
 CONFIG_SPL_DFU=y
 CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
 CONFIG_EFI_SET_TIME=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
-- 
2.34.1



[PATCH v4 02/19] board: am64x: Define capsule update firmware info

2024-05-09 Thread Jonathan Humphreys
Define the firmware components updatable via EFI capsule update, including
defining capsule GUIDs for the various firmware components for the AM64x
SK.

Signed-off-by: Jonathan Humphreys 
---
 board/ti/am64x/evm.c| 32 
 include/configs/am64x_evm.h | 24 
 2 files changed, 56 insertions(+)

diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c
index b8de69da06c..c30e9e064ec 100644
--- a/board/ti/am64x/evm.c
+++ b/board/ti/am64x/evm.c
@@ -7,6 +7,7 @@
  *
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -27,6 +28,37 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+struct efi_fw_image fw_images[] = {
+   {
+   .image_type_id = AM64X_SK_TIBOOT3_IMAGE_GUID,
+   .fw_name = u"AM64X_SK_TIBOOT3",
+   .image_index = 1,
+   },
+   {
+   .image_type_id = AM64X_SK_SPL_IMAGE_GUID,
+   .fw_name = u"AM64X_SK_SPL",
+   .image_index = 2,
+   },
+   {
+   .image_type_id = AM64X_SK_UBOOT_IMAGE_GUID,
+   .fw_name = u"AM64X_SK_UBOOT",
+   .image_index = 3,
+   }
+};
+
+struct efi_capsule_update_info update_info = {
+   .dfu_string = "sf 0:0=tiboot3.bin raw 0 10;"
+   "tispl.bin raw 10 20;u-boot.img raw 30 40",
+   .num_images = ARRAY_SIZE(fw_images),
+   .images = fw_images,
+};
+
+void set_dfu_alt_info(char *interface, char *devstr)
+{
+   if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+   env_set("dfu_alt_info", update_info.dfu_string);
+}
+
 int board_init(void)
 {
return 0;
diff --git a/include/configs/am64x_evm.h b/include/configs/am64x_evm.h
index f9f8c7bc2f6..9db83621ea8 100644
--- a/include/configs/am64x_evm.h
+++ b/include/configs/am64x_evm.h
@@ -9,6 +9,30 @@
 #ifndef __CONFIG_AM642_EVM_H
 #define __CONFIG_AM642_EVM_H
 
+/**
+ * define AM64X_SK_TIBOOT3_IMAGE_GUID - firmware GUID for AM64X sk tiboot3.bin
+ * define AM64X_SK_SPL_IMAGE_GUID - firmware GUID for AM64X sk SPL
+ * define AM64X_SK_UBOOT_IMAGE_GUID   - firmware GUID for AM64X sk UBOOT
+ *
+ * These GUIDs are used in capsules updates to identify the corresponding
+ * firmware object.
+ *
+ * Board developers using this as a starting reference should
+ * define their own GUIDs to ensure that firmware repositories (like
+ * LVFS) do not confuse them.
+ */
+#define AM64X_SK_TIBOOT3_IMAGE_GUID \
+   EFI_GUID(0xede0a0d5, 0x9116, 0x4bfb, 0xaa, 0x54, \
+   0x09, 0xe9, 0x7b, 0x5a, 0xfe, 0x1a)
+
+#define AM64X_SK_SPL_IMAGE_GUID \
+   EFI_GUID(0x77678f5c, 0x64d4, 0x4910, 0xad, 0x75, \
+   0x52, 0xc9, 0xd9, 0x5c, 0xdb, 0x1d)
+
+#define AM64X_SK_UBOOT_IMAGE_GUID \
+   EFI_GUID(0xc6ad43a9, 0x7d31, 0x4f5d, 0x83, 0xe9, \
+   0xb8, 0xef, 0xec, 0xae, 0x05, 0xbf)
+
 /* Now for the remaining common defines */
 #include 
 
-- 
2.34.1



[PATCH v4 07/19] doc: board: ti: j721e: document OSPI layout

2024-05-09 Thread Jonathan Humphreys
Updated OSPI flash layout diagram.

Signed-off-by: Jonathan Humphreys 
---
 doc/board/ti/img/ospi_sysfw.svg | 1464 +--
 doc/board/ti/j721e_evm.rst  |   58 +-
 2 files changed, 847 insertions(+), 675 deletions(-)

diff --git a/doc/board/ti/img/ospi_sysfw.svg b/doc/board/ti/img/ospi_sysfw.svg
index 648f6fd03e5..2a2fd3f4863 100644
--- a/doc/board/ti/img/ospi_sysfw.svg
+++ b/doc/board/ti/img/ospi_sysfw.svg
@@ -1,725 +1,897 @@
 
 
 

[PATCH v4 12/19] board: am62x: Define capsule update firmware info

2024-05-09 Thread Jonathan Humphreys
Define the firmware components updatable via EFI capsule update, including
defining capsule GUIDs for the various firmware components for the AM62x
SK.

Signed-off-by: Jonathan Humphreys 
---
 board/ti/am62x/evm.c| 32 
 include/configs/am62x_evm.h | 24 
 2 files changed, 56 insertions(+)

diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c
index b3e8680dfab..72f7c90aca3 100644
--- a/board/ti/am62x/evm.c
+++ b/board/ti/am62x/evm.c
@@ -7,6 +7,7 @@
  *
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -46,6 +47,37 @@ int splash_screen_prepare(void)
 }
 #endif
 
+struct efi_fw_image fw_images[] = {
+   {
+   .image_type_id = AM62X_SK_TIBOOT3_IMAGE_GUID,
+   .fw_name = u"AM62X_SK_TIBOOT3",
+   .image_index = 1,
+   },
+   {
+   .image_type_id = AM62X_SK_SPL_IMAGE_GUID,
+   .fw_name = u"AM62X_SK_SPL",
+   .image_index = 2,
+   },
+   {
+   .image_type_id = AM62X_SK_UBOOT_IMAGE_GUID,
+   .fw_name = u"AM62X_SK_UBOOT",
+   .image_index = 3,
+   }
+};
+
+struct efi_capsule_update_info update_info = {
+   .dfu_string = "sf 0:0=tiboot3.bin raw 0 8;"
+   "tispl.bin raw 8 20;u-boot.img raw 28 40",
+   .num_images = ARRAY_SIZE(fw_images),
+   .images = fw_images,
+};
+
+void set_dfu_alt_info(char *interface, char *devstr)
+{
+   if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+   env_set("dfu_alt_info", update_info.dfu_string);
+}
+
 int board_init(void)
 {
return 0;
diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h
index c8fe59b7531..0d98f14a4bc 100644
--- a/include/configs/am62x_evm.h
+++ b/include/configs/am62x_evm.h
@@ -9,6 +9,30 @@
 #ifndef __CONFIG_AM625_EVM_H
 #define __CONFIG_AM625_EVM_H
 
+/**
+ * define AM62X_SK_TIBOOT3_IMAGE_GUID - firmware GUID for AM62X sk tiboot3.bin
+ * define AM62X_SK_SPL_IMAGE_GUID - firmware GUID for AM62X sk SPL
+ * define AM62X_SK_UBOOT_IMAGE_GUID   - firmware GUID for AM62X sk UBOOT
+ *
+ * These GUIDs are used in capsules updates to identify the corresponding
+ * firmware object.
+ *
+ * Board developers using this as a starting reference should
+ * define their own GUIDs to ensure that firmware repositories (like
+ * LVFS) do not confuse them.
+ */
+#define AM62X_SK_TIBOOT3_IMAGE_GUID \
+   EFI_GUID(0xabcb83d2, 0x9cb6, 0x4351, 0xb8, 0xf1, \
+   0x64, 0x94, 0xbb, 0xe3, 0x70, 0x0a)
+
+#define AM62X_SK_SPL_IMAGE_GUID \
+   EFI_GUID(0xaee355fc, 0xbf97, 0x4264, 0x8c, 0x82, \
+   0x43, 0x72, 0x55, 0xef, 0xdc, 0x1d)
+
+#define AM62X_SK_UBOOT_IMAGE_GUID \
+   EFI_GUID(0x28ab8c6c, 0xfca8, 0x41d3, 0x8e, 0xa1, \
+   0x5f, 0x17, 0x1b, 0x7d, 0x29, 0x29)
+
 /* Now for the remaining common defines */
 #include 
 
-- 
2.34.1



[PATCH v4 04/19] doc: board: ti: am64x: document OSPI layout

2024-05-09 Thread Jonathan Humphreys
Added OSPI flash layout diagram, as well as example commands to flash
firmware to it.

Signed-off-by: Jonathan Humphreys 
---
 doc/board/ti/am64x_evm.rst   |  24 +
 doc/board/ti/img/ospi_sysfw-am64.svg | 802 +++
 2 files changed, 826 insertions(+)
 create mode 100644 doc/board/ti/img/ospi_sysfw-am64.svg

diff --git a/doc/board/ti/am64x_evm.rst b/doc/board/ti/am64x_evm.rst
index 6ae35b3fee3..88997b6a283 100644
--- a/doc/board/ti/am64x_evm.rst
+++ b/doc/board/ti/am64x_evm.rst
@@ -140,6 +140,30 @@ Image formats:
 .. image:: img/nodm_tispl.bin.svg
   :alt: tispl.bin image format
 
+OSPI:
+-
+ROM supports booting from OSPI from offset 0x0.
+
+Flashing images to OSPI:
+
+Below commands can be used to download tiboot3.bin, tispl.bin, and u-boot.img,
+over tftp and then flash those to OSPI at their respective addresses.
+
+.. prompt:: bash =>
+
+  sf probe
+  tftp ${loadaddr} tiboot3.bin
+  sf update $loadaddr 0x0 $filesize
+  tftp ${loadaddr} tispl.bin
+  sf update $loadaddr 0x10 $filesize
+  tftp ${loadaddr} u-boot.img
+  sf update $loadaddr 0x30 $filesize
+
+Flash layout for OSPI:
+
+.. image:: img/ospi_sysfw-am64.svg
+  :alt: OSPI flash partition layout
+
 Switch Setting for Boot Mode
 
 
diff --git a/doc/board/ti/img/ospi_sysfw-am64.svg 
b/doc/board/ti/img/ospi_sysfw-am64.svg
new file mode 100644
index 000..f6244dce596
--- /dev/null
+++ b/doc/board/ti/img/ospi_sysfw-am64.svg
@@ -0,0 +1,802 @@
+
+
+

[PATCH v4 14/19] doc: board: ti: am62x: document OSPI layout

2024-05-09 Thread Jonathan Humphreys
Added OSPI flash layout diagram, as well as example commands to flash
firmware to it.

Signed-off-by: Jonathan Humphreys 
---
 doc/board/ti/am62x_sk.rst|  24 +
 doc/board/ti/img/ospi_sysfw2.svg | 802 +++
 2 files changed, 826 insertions(+)
 create mode 100644 doc/board/ti/img/ospi_sysfw2.svg

diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index b12dc85f06b..3655826a274 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -150,6 +150,30 @@ Image formats:
 .. image:: img/dm_tispl.bin.svg
   :alt: tispl.bin image format
 
+OSPI:
+-
+ROM supports booting from OSPI from offset 0x0.
+
+Flashing images to OSPI:
+
+Below commands can be used to download tiboot3.bin, tispl.bin, and u-boot.img,
+over tftp and then flash those to OSPI at their respective addresses.
+
+.. prompt:: bash =>
+
+  sf probe
+  tftp ${loadaddr} tiboot3.bin
+  sf update $loadaddr 0x0 $filesize
+  tftp ${loadaddr} tispl.bin
+  sf update $loadaddr 0x8 $filesize
+  tftp ${loadaddr} u-boot.img
+  sf update $loadaddr 0x28 $filesize
+
+Flash layout for OSPI:
+
+.. image:: img/ospi_sysfw2.svg
+  :alt: OSPI flash partition layout
+
 A53 SPL DDR Memory Layout
 -
 
diff --git a/doc/board/ti/img/ospi_sysfw2.svg b/doc/board/ti/img/ospi_sysfw2.svg
new file mode 100644
index 000..06711df4117
--- /dev/null
+++ b/doc/board/ti/img/ospi_sysfw2.svg
@@ -0,0 +1,802 @@
+
+
+

[PATCH v4 19/19] configs: beagleboneai64: Enable EFI capsule update

2024-05-09 Thread Jonathan Humphreys
Enable on disk, raw capsule update.

Signed-off-by: Jonathan Humphreys 
---
 configs/j721e_beagleboneai64_a72_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/j721e_beagleboneai64_a72_defconfig 
b/configs/j721e_beagleboneai64_a72_defconfig
index a354876f8c2..ead1d8389c6 100644
--- a/configs/j721e_beagleboneai64_a72_defconfig
+++ b/configs/j721e_beagleboneai64_a72_defconfig
@@ -172,3 +172,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6163
 CONFIG_SPL_DFU=y
 CONFIG_LZO=y
 CONFIG_EFI_SET_TIME=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
-- 
2.34.1



[PATCH v4 06/19] configs: j721e: Enable EFI capsule update

2024-05-09 Thread Jonathan Humphreys
Enable on disk, raw capsule update.

Signed-off-by: Jonathan Humphreys 
---
 configs/j721e_evm_a72_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
index 3d8e9391987..e2c2ad27ef8 100644
--- a/configs/j721e_evm_a72_defconfig
+++ b/configs/j721e_evm_a72_defconfig
@@ -210,3 +210,5 @@ CONFIG_UFS=y
 CONFIG_CADENCE_UFS=y
 CONFIG_TI_J721E_UFS=y
 CONFIG_EFI_SET_TIME=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
-- 
2.34.1



[PATCH v4 01/19] doc: uefi: capsules: Add Capsule Update porting section

2024-05-09 Thread Jonathan Humphreys
Created a capsule update porting section in the documentation that outlines
the steps a board developer must do when porting from an existing reference
board implementation.

In particular, added a big warning that new capsule GUID's need to be
defined.

Signed-off-by: Jonathan Humphreys 
---
 doc/develop/uefi/uefi.rst | 12 
 1 file changed, 12 insertions(+)

diff --git a/doc/develop/uefi/uefi.rst b/doc/develop/uefi/uefi.rst
index 0389b269c01..36ac75278fa 100644
--- a/doc/develop/uefi/uefi.rst
+++ b/doc/develop/uefi/uefi.rst
@@ -631,6 +631,18 @@ where version.dtso looks like::
 The properties of image-type-id and image-index must match the value
 defined in the efi_fw_image array as image_type_id and image_index.
 
+Porting Capsule Updates to new boards
+*
+
+It is important, when using a reference board as a starting point for a custom
+board, that certain steps are taken to properly support Capsule Updates.
+
+Capsule GUIDs need to be unique for each firmware and board. That is, if two
+firmwares are built from the same source but result in different binaries
+because they are built for different boards, they should have different GUIDs.
+Therefore it is important when creating support for a new board, new GUIDs are
+defined in the board's header file.  *DO NOT* reuse capsule GUIDs.
+
 Executing the boot manager
 ~~
 
-- 
2.34.1



[PATCH v4 18/19] board: beagleboneai64: Define capsule update firmware info

2024-05-09 Thread Jonathan Humphreys
Define the firmware components updatable via EFI capsule update, including
defining capsule GUIDs for the various firmware components for the
BeagleBoneAI64.

Note this involved creating BeagleBoneAI64's own beagleboneai64.h board
header file instead of reusing j721e_evm's.

Signed-off-by: Jonathan Humphreys 
---
 board/beagle/beagleboneai64/Kconfig  |  4 +-
 board/beagle/beagleboneai64/beagleboneai64.c | 37 +
 include/configs/beagleboneai64.h | 55 
 3 files changed, 94 insertions(+), 2 deletions(-)
 create mode 100644 include/configs/beagleboneai64.h

diff --git a/board/beagle/beagleboneai64/Kconfig 
b/board/beagle/beagleboneai64/Kconfig
index 7cfccf9baf0..0f21582614d 100644
--- a/board/beagle/beagleboneai64/Kconfig
+++ b/board/beagle/beagleboneai64/Kconfig
@@ -37,7 +37,7 @@ config SYS_VENDOR
default "beagle"
 
 config SYS_CONFIG_NAME
-   default "j721e_evm"
+   default "beagleboneai64"
 
 source "board/ti/common/Kconfig"
 
@@ -52,7 +52,7 @@ config SYS_VENDOR
default "beagle"
 
 config SYS_CONFIG_NAME
-   default "j721e_evm"
+   default "beagleboneai64"
 
 source "board/ti/common/Kconfig"
 
diff --git a/board/beagle/beagleboneai64/beagleboneai64.c 
b/board/beagle/beagleboneai64/beagleboneai64.c
index c5b4ff7df47..882298e1546 100644
--- a/board/beagle/beagleboneai64/beagleboneai64.c
+++ b/board/beagle/beagleboneai64/beagleboneai64.c
@@ -7,6 +7,7 @@
  * Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -14,6 +15,42 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+struct efi_fw_image fw_images[] = {
+   {
+   .image_type_id = BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID,
+   .fw_name = u"BEAGLEBONEAI64_TIBOOT3",
+   .image_index = 1,
+   },
+   {
+   .image_type_id = BEAGLEBONEAI64_SPL_IMAGE_GUID,
+   .fw_name = u"BEAGLEBONEAI64_SPL",
+   .image_index = 2,
+   },
+   {
+   .image_type_id = BEAGLEBONEAI64_UBOOT_IMAGE_GUID,
+   .fw_name = u"BEAGLEBONEAI64_UBOOT",
+   .image_index = 3,
+   },
+   {
+   .image_type_id = BEAGLEBONEAI64_SYSFW_IMAGE_GUID,
+   .fw_name = u"BEAGLEBONEAI64_SYSFW",
+   .image_index = 4,
+   }
+};
+
+struct efi_capsule_update_info update_info = {
+   .dfu_string = "mmc 0=tiboot3.bin raw 0 2000 mmcpart 1;"
+   "tispl.bin fat 0 1;u-boot.img fat 0 1; sysfw.itb fat 0 1",
+   .num_images = ARRAY_SIZE(fw_images),
+   .images = fw_images,
+};
+
+void set_dfu_alt_info(char *interface, char *devstr)
+{
+   if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+   env_set("dfu_alt_info", update_info.dfu_string);
+}
+
 int board_init(void)
 {
return 0;
diff --git a/include/configs/beagleboneai64.h b/include/configs/beagleboneai64.h
new file mode 100644
index 000..85d57248bb6
--- /dev/null
+++ b/include/configs/beagleboneai64.h
@@ -0,0 +1,55 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Configuration header file for BeagleBoneAI64
+ *
+ * https://beagleboard.org/ai-64
+ *
+ * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#ifndef __CONFIG_BEAGLEBONEAI64_H
+#define __CONFIG_BEAGLEBONEAI64_H
+
+/* FLASH Configuration */
+#define CFG_SYS_FLASH_BASE 0x0
+
+/* SPL Loader Configuration */
+#define CFG_SYS_UBOOT_BASE 0x5008
+
+/**
+ * define BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID - firmware GUID for BeagleBoneAI64
+ *tiboot3.bin
+ * define BEAGLEBONEAI64_SPL_IMAGE_GUID - firmware GUID for BeagleBoneAI64
+ *SPL
+ * define BEAGLEBONEAI64_UBOOT_IMAGE_GUID   - firmware GUID for BeagleBoneAI64
+ *UBOOT
+ * define BEAGLEBONEAI64_SYSFW_IMAGE_GUID   - firmware GUID for BeagleBoneAI64
+ *SYSFW
+ *
+ * These GUIDs are used in capsules updates to identify the corresponding
+ * firmware object.
+ *
+ * Board developers using this as a starting reference should
+ * define their own GUIDs to ensure that firmware repositories (like
+ * LVFS) do not confuse them.
+ */
+#define BEAGLEBONEAI64_TIBOOT3_IMAGE_GUID \
+   EFI_GUID(0x772a4810, 0x2194, 0x4923, 0x87, 0x54, \
+   0x01, 0x15, 0x87, 0x0e, 0xf3, 0x67)
+
+#define BEAGLEBONEAI64_SPL_IMAGE_GUID \
+   EFI_GUID(0x83447222, 0x1e26, 0x40cd, 0xa3, 0x95, \
+   0xb7, 0xde, 0x09, 0x57, 0xe8, 0x75)
+
+#define BEAGLEBONEAI64_UBOOT_IMAGE_GUID \
+   EFI_GUID(0x4249ff77, 0xc17d, 0x4eb7, 0xa1, 0xdb, \
+   0x45, 0xaa, 0x98, 0x87, 0xd4, 0x9e)
+
+#define BEAGLEBONEAI64_SYSFW_IMAGE_GUID \
+   EFI_GUID(0xdfc9c683, 0x49b7, 0x46bd, 0xb3, 0xc1, \
+   0x3a, 0x3b, 0x2f, 0xdb, 0x13, 0x5b)
+
+/* Now for the remaining common defines */
+#include 
+

[PATCH v4 08/19] board: beagleplay: Define capsule update firmware info

2024-05-09 Thread Jonathan Humphreys
Define the firmware components updatable via EFI capsule update, including
defining capsule GUIDs for the various firmware components for the
BeaglePlay.

Note this involved creating BeaglePlay's own beagleplay.h board header file
instead of reusing am62_evm's.

Signed-off-by: Jonathan Humphreys 
---
 board/beagle/beagleplay/Kconfig  |  4 +--
 board/beagle/beagleplay/beagleplay.c | 32 ++
 include/configs/beagleplay.h | 41 
 3 files changed, 75 insertions(+), 2 deletions(-)
 create mode 100644 include/configs/beagleplay.h

diff --git a/board/beagle/beagleplay/Kconfig b/board/beagle/beagleplay/Kconfig
index 7dbd833acb4..b0e67dc8ef3 100644
--- a/board/beagle/beagleplay/Kconfig
+++ b/board/beagle/beagleplay/Kconfig
@@ -35,7 +35,7 @@ config SYS_VENDOR
default "beagle"
 
 config SYS_CONFIG_NAME
-   default "am62x_evm"
+   default "beagleplay"
 
 source "board/ti/common/Kconfig"
 
@@ -50,7 +50,7 @@ config SYS_VENDOR
default "beagle"
 
 config SYS_CONFIG_NAME
-   default "am62x_evm"
+   default "beagleplay"
 
 config SPL_LDSCRIPT
default "arch/arm/mach-omap2/u-boot-spl.lds"
diff --git a/board/beagle/beagleplay/beagleplay.c 
b/board/beagle/beagleplay/beagleplay.c
index af36439e2e2..650a95553d6 100644
--- a/board/beagle/beagleplay/beagleplay.c
+++ b/board/beagle/beagleplay/beagleplay.c
@@ -6,6 +6,7 @@
  * Copyright (C) 2022-2023 Robert Nelson, BeagleBoard.org Foundation
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -15,6 +16,37 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+struct efi_fw_image fw_images[] = {
+   {
+   .image_type_id = BEAGLEPLAY_TIBOOT3_IMAGE_GUID,
+   .fw_name = u"BEAGLEPLAY_TIBOOT3",
+   .image_index = 1,
+   },
+   {
+   .image_type_id = BEAGLEPLAY_SPL_IMAGE_GUID,
+   .fw_name = u"BEAGLEPLAY_SPL",
+   .image_index = 2,
+   },
+   {
+   .image_type_id = BEAGLEPLAY_UBOOT_IMAGE_GUID,
+   .fw_name = u"BEAGLEPLAY_UBOOT",
+   .image_index = 3,
+   }
+};
+
+struct efi_capsule_update_info update_info = {
+   .dfu_string = "mmc 0=tiboot3.bin raw 0 2000 mmcpart 1;"
+   "tispl.bin fat 0 1;u-boot.img fat 0 1",
+   .num_images = ARRAY_SIZE(fw_images),
+   .images = fw_images,
+};
+
+void set_dfu_alt_info(char *interface, char *devstr)
+{
+   if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+   env_set("dfu_alt_info", update_info.dfu_string);
+}
+
 int board_init(void)
 {
return 0;
diff --git a/include/configs/beagleplay.h b/include/configs/beagleplay.h
new file mode 100644
index 000..4baeab664af
--- /dev/null
+++ b/include/configs/beagleplay.h
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Configuration header file for BeaglePlay
+ *
+ * https://beagleplay.org/
+ *
+ * Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#ifndef __CONFIG_BEAGLEPLAY_H
+#define __CONFIG_BEAGLEPLAY_H
+
+/**
+ * define BEAGLEPLAY_TIBOOT3_IMAGE_GUID - firmware GUID for BeaglePlay
+ *tiboot3.bin
+ * define BEAGLEPLAY_SPL_IMAGE_GUID - firmware GUID for BeaglePlay SPL
+ * define BEAGLEPLAY_UBOOT_IMAGE_GUID   - firmware GUID for BeaglePlay UBOOT
+ *
+ * These GUIDs are used in capsules updates to identify the corresponding
+ * firmware object.
+ *
+ * Board developers using this as a starting reference should
+ * define their own GUIDs to ensure that firmware repositories (like
+ * LVFS) do not confuse them.
+ */
+#define BEAGLEPLAY_TIBOOT3_IMAGE_GUID \
+   EFI_GUID(0x0e225a09, 0xf720, 0x4d57, 0x91, 0x20, \
+   0xe2, 0x8f, 0x73, 0x7f, 0x5a, 0x5e)
+
+#define BEAGLEPLAY_SPL_IMAGE_GUID \
+   EFI_GUID(0xb2e7cc49, 0x1a5a, 0x4036, 0xae, 0x01, \
+   0x33, 0x87, 0xc3, 0xbe, 0xf6, 0x57)
+
+#define BEAGLEPLAY_UBOOT_IMAGE_GUID \
+   EFI_GUID(0x92c92b11, 0xa7ee, 0x486f, 0xaa, 0xa2, \
+   0x71, 0x3d, 0x84, 0x42, 0x5b, 0x0e)
+
+/* Now for the remaining common defines */
+#include 
+
+#endif /* __CONFIG_BEAGLEPLAY_H */
-- 
2.34.1



[PATCH v4 05/19] board: j721e: Define capsule update firmware info

2024-05-09 Thread Jonathan Humphreys
Define the firmware components updatable via EFI capsule update, including
defining capsule GUIDs for the various firmware components for the
SK-TDA4VM.

Signed-off-by: Jonathan Humphreys 
---
 board/ti/j721e/evm.c| 38 +
 include/configs/j721e_evm.h | 29 
 2 files changed, 67 insertions(+)

diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 539eaf47186..e4fa90e11e9 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -7,6 +7,7 @@
  *
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -32,6 +33,43 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+struct efi_fw_image fw_images[] = {
+   {
+   .image_type_id = J721E_SK_TIBOOT3_IMAGE_GUID,
+   .fw_name = u"J721E_SK_TIBOOT3",
+   .image_index = 1,
+   },
+   {
+   .image_type_id = J721E_SK_SPL_IMAGE_GUID,
+   .fw_name = u"J721E_SK_SPL",
+   .image_index = 2,
+   },
+   {
+   .image_type_id = J721E_SK_UBOOT_IMAGE_GUID,
+   .fw_name = u"J721E_SK_UBOOT",
+   .image_index = 3,
+   },
+   {
+   .image_type_id = J721E_SK_SYSFW_IMAGE_GUID,
+   .fw_name = u"J721E_SK_SYSFW",
+   .image_index = 4,
+   }
+};
+
+struct efi_capsule_update_info update_info = {
+   .dfu_string = "sf 0:0=tiboot3.bin raw 0 8;"
+   "tispl.bin raw 8 20;u-boot.img raw 28 40;"
+   "sysfw.itb raw 6C 10",
+   .num_images = ARRAY_SIZE(fw_images),
+   .images = fw_images,
+};
+
+void set_dfu_alt_info(char *interface, char *devstr)
+{
+   if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+   env_set("dfu_alt_info", update_info.dfu_string);
+}
+
 int board_init(void)
 {
return 0;
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h
index c26438c8684..a5140ea6a11 100644
--- a/include/configs/j721e_evm.h
+++ b/include/configs/j721e_evm.h
@@ -22,6 +22,35 @@
 #define CFG_SYS_UBOOT_BASE 0x5008
 #endif
 
+/**
+ * define J721E_SK_TIBOOT3_IMAGE_GUID - firmware GUID for J721e sk tiboot3.bin
+ * define J721E_SK_SPL_IMAGE_GUID - firmware GUID for J721e sk SPL
+ * define J721E_SK_UBOOT_IMAGE_GUID   - firmware GUID for J721e sk UBOOT
+ * define J721E_SK_SYSFW_IMAGE_GUID   - firmware GUID for J721e sk SYSFW
+ *
+ * These GUIDs are used in capsules updates to identify the corresponding
+ * firmware object.
+ *
+ * Board developers using this as a starting reference should
+ * define their own GUIDs to ensure that firmware repositories (like
+ * LVFS) do not confuse them.
+ */
+#define J721E_SK_TIBOOT3_IMAGE_GUID \
+   EFI_GUID(0xe672b518, 0x7cd7, 0x4014, 0xbd, 0x8d, \
+0x40, 0x72, 0x4d, 0x0a, 0xd4, 0xdc)
+
+#define J721E_SK_SPL_IMAGE_GUID \
+   EFI_GUID(0x86f710ad, 0x10cf, 0x46ea, 0xac, 0x67, \
+0x85, 0x6a, 0xe0, 0x6e, 0xfa, 0xd2)
+
+#define J721E_SK_UBOOT_IMAGE_GUID \
+   EFI_GUID(0x81b58fb0, 0x3b00, 0x4add, 0xa2, 0x0a, \
+0xc1, 0x85, 0xbb, 0xac, 0xa1, 0xed)
+
+#define J721E_SK_SYSFW_IMAGE_GUID \
+   EFI_GUID(0x6fd10680, 0x361b, 0x431f, 0x80, 0xaa, \
+0x89, 0x94, 0x55, 0x81, 0x9e, 0x11)
+
 /* Now for the remaining common defines */
 #include 
 
-- 
2.34.1



[PATCH v4 10/19] configs: beagleplay: Enable EFI capsule update

2024-05-09 Thread Jonathan Humphreys
Enable on disk, raw capsule update.

Signed-off-by: Jonathan Humphreys 
---
 configs/am62x_beagleplay_a53_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/am62x_beagleplay_a53_defconfig 
b/configs/am62x_beagleplay_a53_defconfig
index 933baba9211..ef7d81b5379 100644
--- a/configs/am62x_beagleplay_a53_defconfig
+++ b/configs/am62x_beagleplay_a53_defconfig
@@ -124,3 +124,5 @@ CONFIG_EXT4_WRITE=y
 CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
 CONFIG_LZO=y
 CONFIG_EFI_SET_TIME=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
-- 
2.34.1



[PATCH v4 09/19] configs: beagleplay: Enable DFU for MMC

2024-05-09 Thread Jonathan Humphreys
MMC DFU is required for capsule updates.

Signed-off-by: Jonathan Humphreys 
---
 configs/am62x_beagleplay_a53_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configs/am62x_beagleplay_a53_defconfig 
b/configs/am62x_beagleplay_a53_defconfig
index 4f1be1df593..933baba9211 100644
--- a/configs/am62x_beagleplay_a53_defconfig
+++ b/configs/am62x_beagleplay_a53_defconfig
@@ -70,6 +70,9 @@ CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_CLK_TI_SCI=y
+CONFIG_DFU_MMC=y
+CONFIG_SYS_DFU_DATA_BUF_SIZE=0x4
+CONFIG_SYS_DFU_MAX_FILE_SIZE=0x18
 CONFIG_DMA_CHANNELS=y
 CONFIG_TI_K3_NAVSS_UDMA=y
 CONFIG_TI_SCI_PROTOCOL=y
-- 
2.34.1



[PATCH v4 00/19] EFI: ti: Enable EFI capsule updates

2024-05-09 Thread Jonathan Humphreys
Enable on disk capsule updates, which includes defining the firmware
components (tiboot3, spl, u-boot) and enabling processing of raw capsule
updates.

This is enabled for several TI SoC based platforms: AM64, AM62, AM62p,
BeaglePlay, J7, and BeagleboneAI.

This series also includes enabling seral flash DFU for AM62 and MMC DFU for
beagleplay.

Changes from v1:
- Added sysfw.itb capsule definition to beagleboneai64
- removed extra commas in structure definitions

Changes from v2:
- Added documentation on OSPI flash layouts
- Improved comments for capsule GUIDs definitions
- Defined board unique capsule GUIDs and put definitions in board specific
  files
- Added a Capsule Update porting section to the documentation

Changes from v3:
- Added better commit messages based upon checkpatch warnings.
- Remove conditional inclusion of capsule update firmware info
- Converted OSPI layout diagram to svg format
Link to v3: https://lore.kernel.org/r/20240419205701.163821-1-j-humphr...@ti.com

Jonathan Humphreys (19):
  doc: uefi: capsules: Add Capsule Update porting section
  board: am64x: Define capsule update firmware info
  configs: am64x: Enable EFI capsule update
  doc: board: ti: am64x: document OSPI layout
  board: j721e: Define capsule update firmware info
  configs: j721e: Enable EFI capsule update
  doc: board: ti: j721e: document OSPI layout
  board: beagleplay: Define capsule update firmware info
  configs: beagleplay: Enable DFU for MMC
  configs: beagleplay: Enable EFI capsule update
  configs: am62x: Enable serial flash DFU
  board: am62x: Define capsule update firmware info
  configs: am62x: Enable EFI capsule update
  doc: board: ti: am62x: document OSPI layout
  board: am62px: Define capsule update firmware info
  configs: am62px: Enable EFI capsule update
  doc: board: ti: am62px: document OSPI layout
  board: beagleboneai64: Define capsule update firmware info
  configs: beagleboneai64: Enable EFI capsule update

 board/beagle/beagleboneai64/Kconfig  |4 +-
 board/beagle/beagleboneai64/beagleboneai64.c |   37 +
 board/beagle/beagleplay/Kconfig  |4 +-
 board/beagle/beagleplay/beagleplay.c |   32 +
 board/ti/am62px/evm.c|   32 +
 board/ti/am62x/evm.c |   32 +
 board/ti/am64x/evm.c |   32 +
 board/ti/j721e/evm.c |   38 +
 configs/am62px_evm_a53_defconfig |2 +
 configs/am62x_beagleplay_a53_defconfig   |5 +
 configs/am62x_evm_a53_defconfig  |3 +
 configs/am64x_evm_a53_defconfig  |2 +
 configs/j721e_beagleboneai64_a72_defconfig   |2 +
 configs/j721e_evm_a72_defconfig  |2 +
 doc/board/ti/am62px_sk.rst   |   24 +
 doc/board/ti/am62x_sk.rst|   24 +
 doc/board/ti/am64x_evm.rst   |   24 +
 doc/board/ti/img/ospi_sysfw-am64.svg |  802 ++
 doc/board/ti/img/ospi_sysfw.svg  | 1464 ++
 doc/board/ti/img/ospi_sysfw2.svg |  802 ++
 doc/board/ti/j721e_evm.rst   |   58 +-
 doc/develop/uefi/uefi.rst|   12 +
 include/configs/am62px_evm.h |   24 +
 include/configs/am62x_evm.h  |   24 +
 include/configs/am64x_evm.h  |   24 +
 include/configs/beagleboneai64.h |   55 +
 include/configs/beagleplay.h |   41 +
 include/configs/j721e_evm.h  |   29 +
 28 files changed, 2955 insertions(+), 679 deletions(-)
 create mode 100644 doc/board/ti/img/ospi_sysfw-am64.svg
 create mode 100644 doc/board/ti/img/ospi_sysfw2.svg
 create mode 100644 include/configs/beagleboneai64.h
 create mode 100644 include/configs/beagleplay.h

-- 
2.34.1



[PATCH v4 15/19] board: am62px: Define capsule update firmware info

2024-05-09 Thread Jonathan Humphreys
Define the firmware components updatable via EFI capsule update, including
defining capsule GUIDs for the various firmware components for the AM62px
SK.

Signed-off-by: Jonathan Humphreys 
---
 board/ti/am62px/evm.c| 32 
 include/configs/am62px_evm.h | 24 
 2 files changed, 56 insertions(+)

diff --git a/board/ti/am62px/evm.c b/board/ti/am62px/evm.c
index 97a95ce8cc2..6d0f66e5dc0 100644
--- a/board/ti/am62px/evm.c
+++ b/board/ti/am62px/evm.c
@@ -6,6 +6,7 @@
  *
  */
 
+#include 
 #include 
 #include 
 #include 
@@ -13,6 +14,37 @@
 #include 
 #include 
 
+struct efi_fw_image fw_images[] = {
+   {
+   .image_type_id = AM62PX_SK_TIBOOT3_IMAGE_GUID,
+   .fw_name = u"AM62PX_SK_TIBOOT3",
+   .image_index = 1,
+   },
+   {
+   .image_type_id = AM62PX_SK_SPL_IMAGE_GUID,
+   .fw_name = u"AM62PX_SK_SPL",
+   .image_index = 2,
+   },
+   {
+   .image_type_id = AM62PX_SK_UBOOT_IMAGE_GUID,
+   .fw_name = u"AM62PX_SK_UBOOT",
+   .image_index = 3,
+   }
+};
+
+struct efi_capsule_update_info update_info = {
+   .dfu_string = "sf 0:0=tiboot3.bin raw 0 8;"
+   "tispl.bin raw 8 20;u-boot.img raw 28 40",
+   .num_images = ARRAY_SIZE(fw_images),
+   .images = fw_images,
+};
+
+void set_dfu_alt_info(char *interface, char *devstr)
+{
+   if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+   env_set("dfu_alt_info", update_info.dfu_string);
+}
+
 int board_init(void)
 {
return 0;
diff --git a/include/configs/am62px_evm.h b/include/configs/am62px_evm.h
index 06b12860e21..57a1ba9dc3c 100644
--- a/include/configs/am62px_evm.h
+++ b/include/configs/am62px_evm.h
@@ -8,6 +8,30 @@
 #ifndef __CONFIG_AM62PX_EVM_H
 #define __CONFIG_AM62PX_EVM_H
 
+/**
+ * define AM62PX_SK_TIBOOT3_IMAGE_GUID - firmware GUID for AM62PX sk 
tiboot3.bin
+ * define AM62PX_SK_SPL_IMAGE_GUID - firmware GUID for AM62PX sk SPL
+ * define AM62PX_SK_UBOOT_IMAGE_GUID   - firmware GUID for AM62PX sk UBOOT
+ *
+ * These GUIDs are used in capsules updates to identify the corresponding
+ * firmware object.
+ *
+ * Board developers using this as a starting reference should
+ * define their own GUIDs to ensure that firmware repositories (like
+ * LVFS) do not confuse them.
+ */
+#define AM62PX_SK_TIBOOT3_IMAGE_GUID \
+   EFI_GUID(0xb08471b7, 0xbe2d, 0x4489, 0x87, 0xa1, \
+   0xca, 0xb2, 0x8a, 0x0c, 0xf7, 0x43)
+
+#define AM62PX_SK_SPL_IMAGE_GUID \
+   EFI_GUID(0xd02ed781, 0x6d71, 0x4c1a, 0xa9, 0x99, \
+   0x3c, 0x6a, 0x41, 0xc3, 0x63, 0x24)
+
+#define AM62PX_SK_UBOOT_IMAGE_GUID \
+   EFI_GUID(0x7e6aea51, 0x965c, 0x44ab, 0xb3, 0x88, \
+   0xda, 0xeb, 0x03, 0xb5, 0x4f, 0x66)
+
 /* Now for the remaining common defines */
 #include 
 
-- 
2.34.1



[PATCH v4 17/19] doc: board: ti: am62px: document OSPI layout

2024-05-09 Thread Jonathan Humphreys
Added OSPI flash layout diagram, as well as example commands to flash
firmware to it.

Signed-off-by: Jonathan Humphreys 
---
 doc/board/ti/am62px_sk.rst | 24 
 1 file changed, 24 insertions(+)

diff --git a/doc/board/ti/am62px_sk.rst b/doc/board/ti/am62px_sk.rst
index 1f2982c36f9..c80b5068117 100644
--- a/doc/board/ti/am62px_sk.rst
+++ b/doc/board/ti/am62px_sk.rst
@@ -156,6 +156,30 @@ Image formats:
 .. image:: img/dm_tispl.bin.svg
   :alt: tispl.bin image format
 
+OSPI:
+-
+ROM supports booting from OSPI from offset 0x0.
+
+Flashing images to OSPI:
+
+Below commands can be used to download tiboot3.bin, tispl.bin, and u-boot.img,
+over tftp and then flash those to OSPI at their respective addresses.
+
+.. prompt:: bash =>
+
+  sf probe
+  tftp ${loadaddr} tiboot3.bin
+  sf update $loadaddr 0x0 $filesize
+  tftp ${loadaddr} tispl.bin
+  sf update $loadaddr 0x8 $filesize
+  tftp ${loadaddr} u-boot.img
+  sf update $loadaddr 0x28 $filesize
+
+Flash layout for OSPI:
+
+.. image:: img/ospi_sysfw2.svg
+  :alt: OSPI flash partition layout
+
 A53 SPL DDR Memory Layout
 -
 
-- 
2.34.1



[PATCH v4 11/19] configs: am62x: Enable serial flash DFU

2024-05-09 Thread Jonathan Humphreys
Serial flash DFU is required by capsule updates.

Signed-off-by: Jonathan Humphreys 
---
 configs/am62x_evm_a53_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig
index 6c708dcb052..515f23c2bcc 100644
--- a/configs/am62x_evm_a53_defconfig
+++ b/configs/am62x_evm_a53_defconfig
@@ -68,6 +68,7 @@ CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_CLK=y
 CONFIG_SPL_CLK=y
 CONFIG_CLK_TI_SCI=y
+CONFIG_DFU_SF=y
 CONFIG_DMA_CHANNELS=y
 CONFIG_TI_K3_NAVSS_UDMA=y
 CONFIG_TI_SCI_PROTOCOL=y
-- 
2.34.1



[PATCH v4 13/19] configs: am62x: Enable EFI capsule update

2024-05-09 Thread Jonathan Humphreys
Enable on disk, raw capsule update.

Signed-off-by: Jonathan Humphreys 
---
 configs/am62x_evm_a53_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig
index 515f23c2bcc..1bc219666c1 100644
--- a/configs/am62x_evm_a53_defconfig
+++ b/configs/am62x_evm_a53_defconfig
@@ -112,3 +112,5 @@ CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_TI_SCI=y
 CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
 CONFIG_EFI_SET_TIME=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
-- 
2.34.1



[PATCH v4 16/19] configs: am62px: Enable EFI capsule update

2024-05-09 Thread Jonathan Humphreys
Enable on disk, raw capsule update.

Signed-off-by: Jonathan Humphreys 
---
 configs/am62px_evm_a53_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/am62px_evm_a53_defconfig b/configs/am62px_evm_a53_defconfig
index 9f40c9a0b3c..7494148c88b 100644
--- a/configs/am62px_evm_a53_defconfig
+++ b/configs/am62px_evm_a53_defconfig
@@ -179,3 +179,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6165
 CONFIG_SPL_DFU=y
 CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
 CONFIG_EFI_SET_TIME=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
-- 
2.34.1



Re: [PATCH 3/4] md5: Use typedef for MD5 context

2024-05-09 Thread Ilias Apalodimas
On Thu, 9 May 2024 at 17:38, Raymond Mao  wrote:
>
> Use of typedef is beneficial for porting with other crypto libs
> without changing the API callers.
> Secondly, it is for the code consistency with other digest libs.
> SHA1, SHA256 and SHA512 are all using typedef for their context.
>
> Signed-off-by: Raymond Mao 
> ---
>  drivers/crypto/hash/hash_sw.c |  8 
>  include/u-boot/md5.h  | 10 +-
>  lib/md5.c | 10 +-
>  3 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/crypto/hash/hash_sw.c b/drivers/crypto/hash/hash_sw.c
> index d8065d68ea4..a5033677930 100644
> --- a/drivers/crypto/hash/hash_sw.c
> +++ b/drivers/crypto/hash/hash_sw.c
> @@ -51,17 +51,17 @@ static void hash_finish_crc32(void *ctx, void *obuf)
>  /* MD5 */
>  static void hash_init_md5(void *ctx)
>  {
> -   MD5Init((struct MD5Context *)ctx);
> +   MD5Init((MD5Context *)ctx);
>  }
>
>  static void hash_update_md5(void *ctx, const void *ibuf, uint32_t ilen)
>  {
> -   MD5Update((struct MD5Context *)ctx, ibuf, ilen);
> +   MD5Update((MD5Context *)ctx, ibuf, ilen);
>  }
>
>  static void hash_finish_md5(void *ctx, void *obuf)
>  {
> -   MD5Final(obuf, (struct MD5Context *)ctx);
> +   MD5Final(obuf, (MD5Context *)ctx);
>  }
>
>  /* SHA1 */
> @@ -159,7 +159,7 @@ static struct sw_hash_impl sw_hash_impl[HASH_ALGO_NUM] = {
> .init = hash_init_md5,
> .update = hash_update_md5,
> .finish = hash_finish_md5,
> -   .ctx_alloc_sz = sizeof(struct MD5Context),
> +   .ctx_alloc_sz = sizeof(MD5Context),
> },
>
> [HASH_ALGO_SHA1] = {
> diff --git a/include/u-boot/md5.h b/include/u-boot/md5.h
> index d61364c0ae3..c465925ea8d 100644
> --- a/include/u-boot/md5.h
> +++ b/include/u-boot/md5.h
> @@ -10,18 +10,18 @@
>
>  #define MD5_SUM_LEN16
>
> -struct MD5Context {
> +typedef struct MD5Context {
> __u32 buf[4];
> __u32 bits[2];
> union {
> unsigned char in[64];
> __u32 in32[16];
> };
> -};
> +} MD5Context;
>
> -void MD5Init(struct MD5Context *ctx);
> -void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned 
> len);
> -void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
> +void MD5Init(MD5Context *ctx);
> +void MD5Update(MD5Context *ctx, unsigned char const *buf, unsigned int len);
> +void MD5Final(unsigned char digest[16], MD5Context *ctx);
>
>  /*
>   * Calculate and store in 'output' the MD5 digest of 'len' bytes at
> diff --git a/lib/md5.c b/lib/md5.c
> index faf3f78ab1e..34343cf8e23 100644
> --- a/lib/md5.c
> +++ b/lib/md5.c
> @@ -55,7 +55,7 @@ byteReverse(unsigned char *buf, unsigned longs)
>   * initialization constants.
>   */
>  void
> -MD5Init(struct MD5Context *ctx)
> +MD5Init(MD5Context *ctx)
>  {
> ctx->buf[0] = 0x67452301;
> ctx->buf[1] = 0xefcdab89;
> @@ -71,7 +71,7 @@ MD5Init(struct MD5Context *ctx)
>   * of bytes.
>   */
>  void
> -MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
> +MD5Update(MD5Context *ctx, unsigned char const *buf, unsigned int len)
>  {
> register __u32 t;
>
> @@ -120,7 +120,7 @@ MD5Update(struct MD5Context *ctx, unsigned char const 
> *buf, unsigned len)
>   * 1 0* (64-bit count of bits processed, MSB-first)
>   */
>  void
> -MD5Final(unsigned char digest[16], struct MD5Context *ctx)
> +MD5Final(unsigned char digest[16], MD5Context *ctx)
>  {
> unsigned int count;
> unsigned char *p;
> @@ -269,7 +269,7 @@ MD5Transform(__u32 buf[4], __u32 const in[16])
>  void
>  md5 (unsigned char *input, int len, unsigned char output[16])
>  {
> -   struct MD5Context context;
> +   MD5Context context;
>
> MD5Init();
> MD5Update(, input, len);
> @@ -286,7 +286,7 @@ void
>  md5_wd(const unsigned char *input, unsigned int len, unsigned char 
> output[16],
> unsigned int chunk_sz)
>  {
> -   struct MD5Context context;
> +   MD5Context context;
>  #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
> const unsigned char *end, *curr;
> int chunk;
> --
> 2.25.1
>

Reviewed-by: Ilias Apalodimas 


Re: [PATCH 1/4] image: remove redundant hash includes

2024-05-09 Thread Ilias Apalodimas
On Thu, 9 May 2024 at 17:53, Tom Rini  wrote:
>
> On Thu, May 09, 2024 at 07:37:38AM -0700, Raymond Mao wrote:
>
> > Remove the redundant includes of u-boot/md5.h, u-boot/sha1.h,
> > u-boot/sha256.h and u-boot/sha512.h
> >
> > Signed-off-by: Raymond Mao 
>
> Reviewed-by: Tom Rini 
>
> --
> Tom
Reviewed-by: Ilias Apalodimas 


Re: [PATCH v1] rockchip: rv1126: Migrate to OF_UPSTREAM

2024-05-09 Thread Jonas Karlman
Hi,

On 2024-05-09 17:26, Anand Moon wrote:
> Migrate RV1126 boards that exists in Linux v6.8 to use OF_UPSTREAM.
> 
> Following targets is not migrated to use OF_UPSTREAM:

At first I got a little bit confused about the "not migrated", but see
now that these are the boards that is migrated.

> - rv1126-edgeble-neu2 : Board is an industrial form factor
> IO board.
> - sonoff-ihost-rv1126 : Gateway device designed to provide a
> Smart Home Hub.
> 
> Cc: Tim Lunn 
> Cc: Jagan Teki 
> Signed-off-by: Anand Moon 
> ---
> Tested on neu2 edgable board.
> ---
>  arch/arm/dts/Makefile   |   3 -
>  arch/arm/dts/rv1126-edgeble-neu2-io.dts | 112 -
>  arch/arm/dts/rv1126-edgeble-neu2.dtsi   | 345 -
>  arch/arm/dts/rv1126-pinctrl.dtsi| 341 -
>  arch/arm/dts/rv1126-sonoff-ihost.dts|  29 --
>  arch/arm/dts/rv1126-sonoff-ihost.dtsi   | 404 ---
>  arch/arm/dts/rv1126.dtsi| 623 
>  arch/arm/mach-rockchip/Kconfig  |   1 +
>  configs/neu2-io-rv1126_defconfig|   2 +-
>  configs/sonoff-ihost-rv1126_defconfig   |   2 +-
>  10 files changed, 3 insertions(+), 1859 deletions(-)
>  delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2-io.dts
>  delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2.dtsi
>  delete mode 100644 arch/arm/dts/rv1126-pinctrl.dtsi
>  delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dts
>  delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dtsi
>  delete mode 100644 arch/arm/dts/rv1126.dtsi

Following should also be removed:
- include/dt-bindings/clock/rockchip,rv1126-cru.h
- include/dt-bindings/power/rockchip,rv1126-power.h

Side note, following is remaining after the rv1108 migration and should
probably also be removed:
- include/dt-bindings/clock/rv1108-cru.h

Regards,
Jonas


Re: [PATCH v2 03/28] mbedtls: add mbedtls into the build system

2024-05-09 Thread Tom Rini
On Thu, May 09, 2024 at 11:36:37AM -0400, Raymond Mao wrote:
> Hi Tom,
> 
> On Thu, 9 May 2024 at 11:31, Tom Rini  wrote:
> 
> > On Thu, May 09, 2024 at 11:23:11AM -0400, Raymond Mao wrote:
> > > Hi Tom,
> > >
> > > On Thu, 9 May 2024 at 11:11, Tom Rini  wrote:
> > >
> > > > On Thu, May 09, 2024 at 11:04:07AM -0400, Raymond Mao wrote:
> > > > > Hi Tom,
> > > > >
> > > > > On Tue, 7 May 2024 at 17:16, Tom Rini  wrote:
> > > > >
> > > > > > On Tue, May 07, 2024 at 10:50:45AM -0700, Raymond Mao wrote:
> > > > > >
> > > > > > > Port mbedtls with dummy libc header files.
> > > > > > > Add mbedtls default config header file.
> > > > > > > Optimize mbedtls default config by disabling unused features to
> > > > > > > reduce the target size.
> > > > > > > Add mbedtls kbuild makefile.
> > > > > > > Add Kconfig and mbedtls config submenu.
> > > > > > [snip]
> > > > > > > diff --git a/include/stdio.h b/include/stdio.h
> > > > > > > index 3241e2d493f..874279c60dd 100644
> > > > > > > --- a/include/stdio.h
> > > > > > > +++ b/include/stdio.h
> > > > > > > @@ -3,6 +3,7 @@
> > > > > > >
> > > > > > >  #include 
> > > > > > >  #include 
> > > > > > > +#include 
> > > > > > >
> > > > > > >  /* stdin */
> > > > > > >  int getchar(void);
> > > > > >
> > > > > > Is this really needed? I know our include structure is a bit odd.
> > > > Should
> > > > > > we perhaps look at moving a prototype or two around to be more
> > broadly
> > > > > > compatible?
> > > > > >
> > > > > Then we need to move  prototypes of snprintf, _vprintf, putc_outstr
> > and
> > > > > printf_info from tiny-printf to stdio.h. Is this good for you?
> > > >
> > > > I don't quite follow you but yes, please work it up for review at least
> > > > as I'm not too thrilled with adding  to  after the
> > > > work I did removing  showed some fun around those headers as
> > > > well, and I'd like to sort it out correctly.  Thanks.
> > > >
> > > > When MbedTLS native codes include , they expect to have a
> > > prototype
> > > 'snprintf', that is the reason why I hijacked  as we are not
> > going
> > > to
> > > change MbedTLS native codes.
> > > I mean in v3, I can move 'snprintf' related stuff to  so that we
> > > don't
> > > need to include .
> >
> > Yes, I would suggest doing a branch where you just make that change to
> > stdio.h and see what the build fall out is on -next. I would not be
> > surprised if it requires a bit of work. It's work that needs to be done
> > and is worth doing, but might be... large.
> >
> > Yes, I can do this before posting v3.
> If it affects too much, it would prefer to just keep the 
> though...

No, if it effects too much I'll just have to do a series to move things
around. Which I will do, soon, if needed.

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v2 03/28] mbedtls: add mbedtls into the build system

2024-05-09 Thread Raymond Mao
Hi Tom,

On Thu, 9 May 2024 at 11:31, Tom Rini  wrote:

> On Thu, May 09, 2024 at 11:23:11AM -0400, Raymond Mao wrote:
> > Hi Tom,
> >
> > On Thu, 9 May 2024 at 11:11, Tom Rini  wrote:
> >
> > > On Thu, May 09, 2024 at 11:04:07AM -0400, Raymond Mao wrote:
> > > > Hi Tom,
> > > >
> > > > On Tue, 7 May 2024 at 17:16, Tom Rini  wrote:
> > > >
> > > > > On Tue, May 07, 2024 at 10:50:45AM -0700, Raymond Mao wrote:
> > > > >
> > > > > > Port mbedtls with dummy libc header files.
> > > > > > Add mbedtls default config header file.
> > > > > > Optimize mbedtls default config by disabling unused features to
> > > > > > reduce the target size.
> > > > > > Add mbedtls kbuild makefile.
> > > > > > Add Kconfig and mbedtls config submenu.
> > > > > [snip]
> > > > > > diff --git a/include/stdio.h b/include/stdio.h
> > > > > > index 3241e2d493f..874279c60dd 100644
> > > > > > --- a/include/stdio.h
> > > > > > +++ b/include/stdio.h
> > > > > > @@ -3,6 +3,7 @@
> > > > > >
> > > > > >  #include 
> > > > > >  #include 
> > > > > > +#include 
> > > > > >
> > > > > >  /* stdin */
> > > > > >  int getchar(void);
> > > > >
> > > > > Is this really needed? I know our include structure is a bit odd.
> > > Should
> > > > > we perhaps look at moving a prototype or two around to be more
> broadly
> > > > > compatible?
> > > > >
> > > > Then we need to move  prototypes of snprintf, _vprintf, putc_outstr
> and
> > > > printf_info from tiny-printf to stdio.h. Is this good for you?
> > >
> > > I don't quite follow you but yes, please work it up for review at least
> > > as I'm not too thrilled with adding  to  after the
> > > work I did removing  showed some fun around those headers as
> > > well, and I'd like to sort it out correctly.  Thanks.
> > >
> > > When MbedTLS native codes include , they expect to have a
> > prototype
> > 'snprintf', that is the reason why I hijacked  as we are not
> going
> > to
> > change MbedTLS native codes.
> > I mean in v3, I can move 'snprintf' related stuff to  so that we
> > don't
> > need to include .
>
> Yes, I would suggest doing a branch where you just make that change to
> stdio.h and see what the build fall out is on -next. I would not be
> surprised if it requires a bit of work. It's work that needs to be done
> and is worth doing, but might be... large.
>
> Yes, I can do this before posting v3.
If it affects too much, it would prefer to just keep the 
though...

Regards,
Raymond


Re: [PATCH v2 03/28] mbedtls: add mbedtls into the build system

2024-05-09 Thread Tom Rini
On Thu, May 09, 2024 at 11:23:11AM -0400, Raymond Mao wrote:
> Hi Tom,
> 
> On Thu, 9 May 2024 at 11:11, Tom Rini  wrote:
> 
> > On Thu, May 09, 2024 at 11:04:07AM -0400, Raymond Mao wrote:
> > > Hi Tom,
> > >
> > > On Tue, 7 May 2024 at 17:16, Tom Rini  wrote:
> > >
> > > > On Tue, May 07, 2024 at 10:50:45AM -0700, Raymond Mao wrote:
> > > >
> > > > > Port mbedtls with dummy libc header files.
> > > > > Add mbedtls default config header file.
> > > > > Optimize mbedtls default config by disabling unused features to
> > > > > reduce the target size.
> > > > > Add mbedtls kbuild makefile.
> > > > > Add Kconfig and mbedtls config submenu.
> > > > [snip]
> > > > > diff --git a/include/stdio.h b/include/stdio.h
> > > > > index 3241e2d493f..874279c60dd 100644
> > > > > --- a/include/stdio.h
> > > > > +++ b/include/stdio.h
> > > > > @@ -3,6 +3,7 @@
> > > > >
> > > > >  #include 
> > > > >  #include 
> > > > > +#include 
> > > > >
> > > > >  /* stdin */
> > > > >  int getchar(void);
> > > >
> > > > Is this really needed? I know our include structure is a bit odd.
> > Should
> > > > we perhaps look at moving a prototype or two around to be more broadly
> > > > compatible?
> > > >
> > > Then we need to move  prototypes of snprintf, _vprintf, putc_outstr and
> > > printf_info from tiny-printf to stdio.h. Is this good for you?
> >
> > I don't quite follow you but yes, please work it up for review at least
> > as I'm not too thrilled with adding  to  after the
> > work I did removing  showed some fun around those headers as
> > well, and I'd like to sort it out correctly.  Thanks.
> >
> > When MbedTLS native codes include , they expect to have a
> prototype
> 'snprintf', that is the reason why I hijacked  as we are not going
> to
> change MbedTLS native codes.
> I mean in v3, I can move 'snprintf' related stuff to  so that we
> don't
> need to include .

Yes, I would suggest doing a branch where you just make that change to
stdio.h and see what the build fall out is on -next. I would not be
surprised if it requires a bit of work. It's work that needs to be done
and is worth doing, but might be... large.

-- 
Tom


signature.asc
Description: PGP signature


[PATCH v1] rockchip: rv1126: Migrate to OF_UPSTREAM

2024-05-09 Thread Anand Moon
Migrate RV1126 boards that exists in Linux v6.8 to use OF_UPSTREAM.

Following targets is not migrated to use OF_UPSTREAM:
- rv1126-edgeble-neu2 : Board is an industrial form factor
IO board.
- sonoff-ihost-rv1126 : Gateway device designed to provide a
Smart Home Hub.

Cc: Tim Lunn 
Cc: Jagan Teki 
Signed-off-by: Anand Moon 
---
Tested on neu2 edgable board.
---
 arch/arm/dts/Makefile   |   3 -
 arch/arm/dts/rv1126-edgeble-neu2-io.dts | 112 -
 arch/arm/dts/rv1126-edgeble-neu2.dtsi   | 345 -
 arch/arm/dts/rv1126-pinctrl.dtsi| 341 -
 arch/arm/dts/rv1126-sonoff-ihost.dts|  29 --
 arch/arm/dts/rv1126-sonoff-ihost.dtsi   | 404 ---
 arch/arm/dts/rv1126.dtsi| 623 
 arch/arm/mach-rockchip/Kconfig  |   1 +
 configs/neu2-io-rv1126_defconfig|   2 +-
 configs/sonoff-ihost-rv1126_defconfig   |   2 +-
 10 files changed, 3 insertions(+), 1859 deletions(-)
 delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2-io.dts
 delete mode 100644 arch/arm/dts/rv1126-edgeble-neu2.dtsi
 delete mode 100644 arch/arm/dts/rv1126-pinctrl.dtsi
 delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dts
 delete mode 100644 arch/arm/dts/rv1126-sonoff-ihost.dtsi
 delete mode 100644 arch/arm/dts/rv1126.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 087645f354..79fc100dce 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -97,9 +97,6 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \
rk3368-geekbox.dtb \
rk3368-px5-evb.dtb \
 
-dtb-$(CONFIG_ROCKCHIP_RV1126) += \
-   rv1126-edgeble-neu2-io.dtb
-
 dtb-$(CONFIG_ARCH_S5P4418) += \
s5p4418-nanopi2.dtb
 
diff --git a/arch/arm/dts/rv1126-edgeble-neu2-io.dts 
b/arch/arm/dts/rv1126-edgeble-neu2-io.dts
deleted file mode 100644
index 0c2396b8f8..00
--- a/arch/arm/dts/rv1126-edgeble-neu2-io.dts
+++ /dev/null
@@ -1,112 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
- * Copyright (c) 2022 Edgeble AI Technologies Pvt. Ltd.
- */
-
-/dts-v1/;
-#include "rv1126.dtsi"
-#include "rv1126-edgeble-neu2.dtsi"
-
-/ {
-   model = "Edgeble Neu2 IO Board";
-   compatible = "edgeble,neural-compute-module-2-io",
-"edgeble,neural-compute-module-2", "rockchip,rv1126";
-
-   aliases {
-   serial2 = 
-   };
-
-   chosen {
-   stdout-path = "serial2:150n8";
-   };
-
-   vcc12v_dcin: vcc12v-dcin-regulator {
-   compatible = "regulator-fixed";
-   regulator-name = "vcc12v_dcin";
-   regulator-always-on;
-   regulator-boot-on;
-   regulator-min-microvolt = <1200>;
-   regulator-max-microvolt = <1200>;
-   };
-
-   vcc5v0_sys: vcc5v0-sys-regulator {
-   compatible = "regulator-fixed";
-   regulator-name = "vcc5v0_sys";
-   regulator-always-on;
-   regulator-boot-on;
-   regulator-min-microvolt = <500>;
-   regulator-max-microvolt = <500>;
-   vin-supply = <_dcin>;
-   };
-
-   v3v3_sys: v3v3-sys-regulator {
-   compatible = "regulator-fixed";
-   regulator-name = "v3v3_sys";
-   regulator-always-on;
-   regulator-boot-on;
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   vin-supply = <_sys>;
-   };
-};
-
- {
-   assigned-clocks = < CLK_GMAC_SRC>, < CLK_GMAC_TX_RX>,
- < CLK_GMAC_ETHERNET_OUT>;
-   assigned-clock-parents = < CLK_GMAC_SRC_M1>, < RGMII_MODE_CLK>;
-   assigned-clock-rates = <12500>, <0>, <2500>;
-   clock_in_out = "input";
-   phy-handle = <>;
-   phy-mode = "rgmii";
-   phy-supply = <_3v3>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_miim _bus2 _bus4 
_out_ethernetm1_pins>;
-   tx_delay = <0x2a>;
-   rx_delay = <0x1a>;
-   status = "okay";
-};
-
- {
-   phy: ethernet-phy@0 {
-   compatible = "ethernet-phy-id001c.c916",
-"ethernet-phy-ieee802.3-c22";
-   reg = <0x0>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_phy_rst>;
-   reset-assert-us = <2>;
-   reset-deassert-us = <10>;
-   reset-gpios = < RK_PB6 GPIO_ACTIVE_LOW>;
-   };
-};
-
- {
-   ethernet {
-   eth_phy_rst: eth-phy-rst {
-   rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO _pull_down>;
-   };
-   };
-};
-
- {
-   status = "okay";
-};
-
- {
-   bus-width = <4>;
-   cap-mmc-highspeed;
-   cap-sd-highspeed;
-   card-detect-delay = <200>;
-   pinctrl-names = "default";
-   pinctrl-0 = <_clk _cmd _bus4 _det>;
-  

Re: [PATCH v2 03/28] mbedtls: add mbedtls into the build system

2024-05-09 Thread Raymond Mao
Hi Tom,

On Thu, 9 May 2024 at 11:11, Tom Rini  wrote:

> On Thu, May 09, 2024 at 11:04:07AM -0400, Raymond Mao wrote:
> > Hi Tom,
> >
> > On Tue, 7 May 2024 at 17:16, Tom Rini  wrote:
> >
> > > On Tue, May 07, 2024 at 10:50:45AM -0700, Raymond Mao wrote:
> > >
> > > > Port mbedtls with dummy libc header files.
> > > > Add mbedtls default config header file.
> > > > Optimize mbedtls default config by disabling unused features to
> > > > reduce the target size.
> > > > Add mbedtls kbuild makefile.
> > > > Add Kconfig and mbedtls config submenu.
> > > [snip]
> > > > diff --git a/include/stdio.h b/include/stdio.h
> > > > index 3241e2d493f..874279c60dd 100644
> > > > --- a/include/stdio.h
> > > > +++ b/include/stdio.h
> > > > @@ -3,6 +3,7 @@
> > > >
> > > >  #include 
> > > >  #include 
> > > > +#include 
> > > >
> > > >  /* stdin */
> > > >  int getchar(void);
> > >
> > > Is this really needed? I know our include structure is a bit odd.
> Should
> > > we perhaps look at moving a prototype or two around to be more broadly
> > > compatible?
> > >
> > Then we need to move  prototypes of snprintf, _vprintf, putc_outstr and
> > printf_info from tiny-printf to stdio.h. Is this good for you?
>
> I don't quite follow you but yes, please work it up for review at least
> as I'm not too thrilled with adding  to  after the
> work I did removing  showed some fun around those headers as
> well, and I'd like to sort it out correctly.  Thanks.
>
> When MbedTLS native codes include , they expect to have a
prototype
'snprintf', that is the reason why I hijacked  as we are not going
to
change MbedTLS native codes.
I mean in v3, I can move 'snprintf' related stuff to  so that we
don't
need to include .

Regards,
Raymond


Re: [PATCH v2 07/28] lib: Adapt digest header files to MbedTLS

2024-05-09 Thread Raymond Mao
Hi Ilias,

On Wed, 8 May 2024 at 06:30, Ilias Apalodimas 
wrote:

> On Tue, 7 May 2024 at 20:54, Raymond Mao  wrote:
> >
> > Adapt digest header files to support both original libs and MbedTLS
> > by switching on/off MBEDTLS_LIB_CRYPTO
> >
> > FIXME:
> > `IS_ENABLED` or `CONFIG_IS_ENABLED` is not applicable here, since
> > including  causes undefined reference on schedule()
> > with sandbox build.
> > As  includes  which enables
> > `CONFIG_HW_WATCHDOG` and `CONFIG_WATCHDOG` but no schedule() are
> > defined in sandbox build.
> > `#if defined(CONFIG_MBEDTLS_LIB_CRYPTO)` is a workaround.
> >
> > Signed-off-by: Raymond Mao 
> > ---
> > Changes in v2
> > - Initial patch.
> >
> >  include/u-boot/md5.h| 17 -
> >  include/u-boot/sha1.h   | 21 -
> >  include/u-boot/sha256.h | 20 
> >  include/u-boot/sha512.h | 22 +++---
> >  lib/Makefile|  6 +-
> >  5 files changed, 76 insertions(+), 10 deletions(-)
> >
> [snip]
> > diff --git a/include/u-boot/sha256.h b/include/u-boot/sha256.h
> > index 9aa1251789a..e2b7fdd41c8 100644
> > --- a/include/u-boot/sha256.h
> > +++ b/include/u-boot/sha256.h
> > @@ -1,6 +1,22 @@
> >  #ifndef _SHA256_H
> >  #define _SHA256_H
> >
> > +#if defined(CONFIG_MBEDTLS_LIB_CRYPTO)
> > +/*
> > + * FIXME:
> > + * MbedTLS define the members of "mbedtls_sha256_context" as private,
> > + * but "state" needs to be access by arch/arm/cpu/armv8/sha256_ce_glue.
>
> 'be able to access.'
>
> Isn't the MBEDTLS_ALLOW_PRIVATE_ACCESS considered deprecated?
> I'd prefer if we fix this properly.
>
> If  MBEDTLS_ALLOW_PRIVATE_ACCESS is deprecated, that is another issue
other than the one I marked FIXME here.
Once MBEDTLS_ALLOW_PRIVATE_ACCESS is deprecated, all callers are not
able to access the private members (e.g. 'hash->state').
Currently only arm drivers are using 'hash->state', but I don't have the
background
context about this - why we cannot use the normal hash functions without
knowing
the 'state' like other arches.

Regards,
Raymond


Re: [PATCH v2 03/28] mbedtls: add mbedtls into the build system

2024-05-09 Thread Tom Rini
On Thu, May 09, 2024 at 11:04:07AM -0400, Raymond Mao wrote:
> Hi Tom,
> 
> On Tue, 7 May 2024 at 17:16, Tom Rini  wrote:
> 
> > On Tue, May 07, 2024 at 10:50:45AM -0700, Raymond Mao wrote:
> >
> > > Port mbedtls with dummy libc header files.
> > > Add mbedtls default config header file.
> > > Optimize mbedtls default config by disabling unused features to
> > > reduce the target size.
> > > Add mbedtls kbuild makefile.
> > > Add Kconfig and mbedtls config submenu.
> > [snip]
> > > diff --git a/include/stdio.h b/include/stdio.h
> > > index 3241e2d493f..874279c60dd 100644
> > > --- a/include/stdio.h
> > > +++ b/include/stdio.h
> > > @@ -3,6 +3,7 @@
> > >
> > >  #include 
> > >  #include 
> > > +#include 
> > >
> > >  /* stdin */
> > >  int getchar(void);
> >
> > Is this really needed? I know our include structure is a bit odd. Should
> > we perhaps look at moving a prototype or two around to be more broadly
> > compatible?
> >
> Then we need to move  prototypes of snprintf, _vprintf, putc_outstr and
> printf_info from tiny-printf to stdio.h. Is this good for you?

I don't quite follow you but yes, please work it up for review at least
as I'm not too thrilled with adding  to  after the
work I did removing  showed some fun around those headers as
well, and I'd like to sort it out correctly.  Thanks.

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH v2 2/2] arm: dts: k3-j7200-binman: Add support for HSSE1.0 and HSFS1.0

2024-05-09 Thread Andrew Davis

On 4/25/24 5:06 PM, Neha Malcom Francis wrote:

J7200  has SR1.0 and SR2.0 having three variants of each GP, HS-FS and
HS-SE. Current build does not generate HS-SE SR1.0 and HS-FS SR1.0 so
add support for them.



SR1.0 silicon for J7200 is rare as it was replaced by SR2.0 before
broad-market release (IIRC), but for completeness this is fine to
have supported,

Reviewed-by: Andrew Davis 


Reported-by: Suman Anna 
Reported-by: Aniket Limaye 
Signed-off-by: Neha Malcom Francis 
---
  arch/arm/dts/k3-j7200-binman.dtsi | 95 ++-
  1 file changed, 94 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-j7200-binman.dtsi 
b/arch/arm/dts/k3-j7200-binman.dtsi
index 06db8659876..e8020fec2dc 100644
--- a/arch/arm/dts/k3-j7200-binman.dtsi
+++ b/arch/arm/dts/k3-j7200-binman.dtsi
@@ -1,6 +1,6 @@
  // SPDX-License-Identifier: GPL-2.0
  /*
- * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2022-2024 Texas Instruments Incorporated - https://www.ti.com/
   */
  
  #include "k3-binman.dtsi"

@@ -47,6 +47,52 @@
config = "pm-cfg_j7200.yaml";
  };
  
+ {

+   tiboot3-j7200-hs-evm.bin {
+   filename = "tiboot3-j7200-hs-evm.bin";
+   ti-secure-rom {
+   content = <_boot_spl_sr1>, <_fs_enc_sr1>, 
<_tifs_cfg_sr1>,
+   <_dm_cfg_sr1>, <_inner_cert_sr1>;
+   combined;
+   dm-data;
+   core-opts = <2>;
+   sysfw-inner-cert;
+   keyfile = "custMpk.pem";
+   sw-rev = <1>;
+   content-sbl = <_boot_spl_sr1>;
+   content-sysfw = <_fs_enc_sr1>;
+   content-sysfw-data = <_tifs_cfg_sr1>;
+   content-sysfw-inner-cert = <_inner_cert_sr1>;
+   content-dm-data = <_dm_cfg_sr1>;
+   load = <0x41c0>;
+   load-sysfw = <0x4>;
+   load-sysfw-data = <0x7f000>;
+   load-dm-data = <0x41c8>;
+   };
+   u_boot_spl_sr1: u-boot-spl {
+   no-expanded;
+   };
+   ti_fs_enc_sr1: ti-fs-enc.bin {
+   filename = "ti-sysfw/ti-fs-firmware-j7200-hs-enc.bin";
+   type = "blob-ext";
+   optional;
+   };
+   combined_tifs_cfg_sr1: combined-tifs-cfg.bin {
+   filename = "combined-tifs-cfg.bin";
+   type = "blob-ext";
+   };
+   sysfw_inner_cert_sr1: sysfw-inner-cert {
+   filename = "ti-sysfw/ti-fs-firmware-j7200-hs-cert.bin";
+   type = "blob-ext";
+   optional;
+   };
+   combined_dm_cfg_sr1: combined-dm-cfg.bin {
+   filename = "combined-dm-cfg.bin";
+   type = "blob-ext";
+   };
+   };
+};
+
   {
tiboot3-j7200_sr2-hs-evm.bin {
filename = "tiboot3-j7200_sr2-hs-evm.bin";
@@ -92,6 +138,53 @@
};
  };
  
+ {

+   tiboot3-j7200-hs-fs-evm.bin {
+   filename = "tiboot3-j7200-hs-fs-evm.bin";
+   ti-secure-rom {
+   content = <_boot_spl_fs_sr1>, <_fs_enc_fs_sr1>,
+ <_tifs_cfg_fs_sr1>, 
<_dm_cfg_fs_sr1>,
+ <_inner_cert_fs_sr1>;
+   combined;
+   dm-data;
+   core-opts = <2>;
+   sysfw-inner-cert;
+   keyfile = "custMpk.pem";
+   sw-rev = <1>;
+   content-sbl = <_boot_spl_fs_sr1>;
+   content-sysfw = <_fs_enc_fs_sr1>;
+   content-sysfw-data = <_tifs_cfg_fs_sr1>;
+   content-sysfw-inner-cert = <_inner_cert_fs_sr1>;
+   content-dm-data = <_dm_cfg_fs_sr1>;
+   load = <0x41c0>;
+   load-sysfw = <0x4>;
+   load-sysfw-data = <0x7f000>;
+   load-dm-data = <0x41c8>;
+   };
+   u_boot_spl_fs_sr1: u-boot-spl {
+   no-expanded;
+   };
+   ti_fs_enc_fs_sr1: ti-fs-enc.bin {
+   filename = 
"ti-sysfw/ti-fs-firmware-j7200-hs-fs-enc.bin";
+   type = "blob-ext";
+   optional;
+   };
+   combined_tifs_cfg_fs_sr1: combined-tifs-cfg.bin {
+   filename = "combined-tifs-cfg.bin";
+   type = "blob-ext";
+   };
+   sysfw_inner_cert_fs_sr1: sysfw-inner-cert {
+   filename = 

Re: [PATCH v2 1/2] arm: dts: k3-j721e-binman: Add support for HSFS1.1

2024-05-09 Thread Andrew Davis

On 4/25/24 5:06 PM, Neha Malcom Francis wrote:

J721E has SR1.1 and SR2.0 having three variants of each GP, HS-FS and
HS-SE. Current build does not generate HS-FS SR1.1 so add support for
them.

Reported-by: Suman Anna 
Signed-off-by: Neha Malcom Francis 
---
Changes since v1:
- removed redundant HS-SE SR2.0 generation



Looks good to me now,

Reviewed-by: Andrew Davis 


  arch/arm/dts/k3-j721e-binman.dtsi | 90 ++-
  1 file changed, 89 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-j721e-binman.dtsi 
b/arch/arm/dts/k3-j721e-binman.dtsi
index 75a6e9599b9..1514d897634 100644
--- a/arch/arm/dts/k3-j721e-binman.dtsi
+++ b/arch/arm/dts/k3-j721e-binman.dtsi
@@ -1,6 +1,6 @@
  // SPDX-License-Identifier: GPL-2.0
  /*
- * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2022-2024 Texas Instruments Incorporated - https://www.ti.com/
   */
  
  #include "k3-binman.dtsi"

@@ -129,6 +129,94 @@
};
  };
  
+ {

+   tiboot3-j721e_sr1_1-hs-fs-evm.bin {
+   filename = "tiboot3-j721e_sr1_1-hs-fs-evm.bin";
+   ti-secure-rom {
+   content = <_boot_spl_fs_sr1_1>;
+   core = "public";
+   core-opts = <2>;
+   load = ;
+   keyfile = "custMpk.pem";
+   };
+   u_boot_spl_fs_sr1_1: u-boot-spl {
+   no-expanded;
+   };
+   };
+   sysfw_fs_sr1_1 {
+   filename = "sysfw.bin_fs_sr1_1";
+   ti-fs-cert-fs.bin {
+   filename = 
"ti-sysfw/ti-fs-firmware-j721e_sr1_1-hs-fs-cert.bin";
+   type = "blob-ext";
+   optional;
+   };
+   ti-fs-firmware-j721e-hs-fs-enc.bin {
+   filename = 
"ti-sysfw/ti-fs-firmware-j721e_sr1_1-hs-fs-enc.bin";
+   type = "blob-ext";
+   optional;
+   };
+   };
+   itb_fs_sr1_1 {
+   filename = "sysfw-j721e_sr1_1-hs-fs-evm.itb";
+   fit {
+   description = "SYSFW and Config fragments";
+   #address-cells = <1>;
+   images {
+   sysfw.bin {
+   description = "sysfw";
+   type = "firmware";
+   arch = "arm";
+   compression = "none";
+   blob-ext {
+   filename = "sysfw.bin_fs_sr1_1";
+   };
+   };
+   board-cfg.bin {
+   description = "board-cfg";
+   type = "firmware";
+   arch = "arm";
+   compression = "none";
+   board-cfg {
+   filename = "board-cfg.bin";
+   type = "blob-ext";
+   };
+
+   };
+   pm-cfg.bin {
+   description = "pm-cfg";
+   type = "firmware";
+   arch = "arm";
+   compression = "none";
+   pm-cfg {
+   filename = "pm-cfg.bin";
+   type = "blob-ext";
+   };
+   };
+   rm-cfg.bin {
+   description = "rm-cfg";
+   type = "firmware";
+   arch = "arm";
+   compression = "none";
+   rm-cfg {
+   filename = "rm-cfg.bin";
+   type = "blob-ext";
+   };
+   };
+   sec-cfg.bin {
+   description = "sec-cfg";
+   type = "firmware";
+   arch = "arm";
+   compression = "none";
+   sec-cfg {
+   filename = "sec-cfg.bin";
+   type = "blob-ext";
+   };
+ 

Re: [PATCH v2 03/28] mbedtls: add mbedtls into the build system

2024-05-09 Thread Raymond Mao
Hi Tom,

On Tue, 7 May 2024 at 17:16, Tom Rini  wrote:

> On Tue, May 07, 2024 at 10:50:45AM -0700, Raymond Mao wrote:
>
> > Port mbedtls with dummy libc header files.
> > Add mbedtls default config header file.
> > Optimize mbedtls default config by disabling unused features to
> > reduce the target size.
> > Add mbedtls kbuild makefile.
> > Add Kconfig and mbedtls config submenu.
> [snip]
> > diff --git a/include/stdio.h b/include/stdio.h
> > index 3241e2d493f..874279c60dd 100644
> > --- a/include/stdio.h
> > +++ b/include/stdio.h
> > @@ -3,6 +3,7 @@
> >
> >  #include 
> >  #include 
> > +#include 
> >
> >  /* stdin */
> >  int getchar(void);
>
> Is this really needed? I know our include structure is a bit odd. Should
> we perhaps look at moving a prototype or two around to be more broadly
> compatible?
>
> Then we need to move  prototypes of snprintf, _vprintf, putc_outstr and
printf_info from tiny-printf to stdio.h. Is this good for you?

Regards,
Raymond


Re: [PATCH 3/4] md5: Use typedef for MD5 context

2024-05-09 Thread Tom Rini
On Thu, May 09, 2024 at 07:37:40AM -0700, Raymond Mao wrote:

> Use of typedef is beneficial for porting with other crypto libs
> without changing the API callers.
> Secondly, it is for the code consistency with other digest libs.
> SHA1, SHA256 and SHA512 are all using typedef for their context.
> 
> Signed-off-by: Raymond Mao 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH 2/4] efi_loader: remove redundant hash includes

2024-05-09 Thread Tom Rini
On Thu, May 09, 2024 at 07:37:39AM -0700, Raymond Mao wrote:

> Remove the redundant includes of u-boot/sha1.h, u-boot/sha256.h
> and u-boot/sha512.h
> 
> Signed-off-by: Raymond Mao 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature


Re: [PATCH 1/4] image: remove redundant hash includes

2024-05-09 Thread Tom Rini
On Thu, May 09, 2024 at 07:37:38AM -0700, Raymond Mao wrote:

> Remove the redundant includes of u-boot/md5.h, u-boot/sha1.h,
> u-boot/sha256.h and u-boot/sha512.h
> 
> Signed-off-by: Raymond Mao 

Reviewed-by: Tom Rini 

-- 
Tom


signature.asc
Description: PGP signature


[PATCH 4/4] arm: EFI linker script text section alignment

2024-05-09 Thread Raymond Mao
Add text section alignment to fix sbsign signing warning
'gaps in the section table may result in different checksums'
which causes a failure of efi_image_verify_diges()

Signed-off-by: Raymond Mao 
---
 arch/arm/lib/elf_aarch64_efi.lds | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/lib/elf_aarch64_efi.lds b/arch/arm/lib/elf_aarch64_efi.lds
index 5dd98091698..bffd9a0447a 100644
--- a/arch/arm/lib/elf_aarch64_efi.lds
+++ b/arch/arm/lib/elf_aarch64_efi.lds
@@ -28,6 +28,7 @@ SECTIONS
*(.dynamic);
. = ALIGN(512);
}
+   . = ALIGN(4096);
.rela.dyn : { *(.rela.dyn) }
.rela.plt : { *(.rela.plt) }
.rela.got : { *(.rela.got) }
-- 
2.25.1



[PATCH 3/4] md5: Use typedef for MD5 context

2024-05-09 Thread Raymond Mao
Use of typedef is beneficial for porting with other crypto libs
without changing the API callers.
Secondly, it is for the code consistency with other digest libs.
SHA1, SHA256 and SHA512 are all using typedef for their context.

Signed-off-by: Raymond Mao 
---
 drivers/crypto/hash/hash_sw.c |  8 
 include/u-boot/md5.h  | 10 +-
 lib/md5.c | 10 +-
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/crypto/hash/hash_sw.c b/drivers/crypto/hash/hash_sw.c
index d8065d68ea4..a5033677930 100644
--- a/drivers/crypto/hash/hash_sw.c
+++ b/drivers/crypto/hash/hash_sw.c
@@ -51,17 +51,17 @@ static void hash_finish_crc32(void *ctx, void *obuf)
 /* MD5 */
 static void hash_init_md5(void *ctx)
 {
-   MD5Init((struct MD5Context *)ctx);
+   MD5Init((MD5Context *)ctx);
 }
 
 static void hash_update_md5(void *ctx, const void *ibuf, uint32_t ilen)
 {
-   MD5Update((struct MD5Context *)ctx, ibuf, ilen);
+   MD5Update((MD5Context *)ctx, ibuf, ilen);
 }
 
 static void hash_finish_md5(void *ctx, void *obuf)
 {
-   MD5Final(obuf, (struct MD5Context *)ctx);
+   MD5Final(obuf, (MD5Context *)ctx);
 }
 
 /* SHA1 */
@@ -159,7 +159,7 @@ static struct sw_hash_impl sw_hash_impl[HASH_ALGO_NUM] = {
.init = hash_init_md5,
.update = hash_update_md5,
.finish = hash_finish_md5,
-   .ctx_alloc_sz = sizeof(struct MD5Context),
+   .ctx_alloc_sz = sizeof(MD5Context),
},
 
[HASH_ALGO_SHA1] = {
diff --git a/include/u-boot/md5.h b/include/u-boot/md5.h
index d61364c0ae3..c465925ea8d 100644
--- a/include/u-boot/md5.h
+++ b/include/u-boot/md5.h
@@ -10,18 +10,18 @@
 
 #define MD5_SUM_LEN16
 
-struct MD5Context {
+typedef struct MD5Context {
__u32 buf[4];
__u32 bits[2];
union {
unsigned char in[64];
__u32 in32[16];
};
-};
+} MD5Context;
 
-void MD5Init(struct MD5Context *ctx);
-void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len);
-void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
+void MD5Init(MD5Context *ctx);
+void MD5Update(MD5Context *ctx, unsigned char const *buf, unsigned int len);
+void MD5Final(unsigned char digest[16], MD5Context *ctx);
 
 /*
  * Calculate and store in 'output' the MD5 digest of 'len' bytes at
diff --git a/lib/md5.c b/lib/md5.c
index faf3f78ab1e..34343cf8e23 100644
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -55,7 +55,7 @@ byteReverse(unsigned char *buf, unsigned longs)
  * initialization constants.
  */
 void
-MD5Init(struct MD5Context *ctx)
+MD5Init(MD5Context *ctx)
 {
ctx->buf[0] = 0x67452301;
ctx->buf[1] = 0xefcdab89;
@@ -71,7 +71,7 @@ MD5Init(struct MD5Context *ctx)
  * of bytes.
  */
 void
-MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
+MD5Update(MD5Context *ctx, unsigned char const *buf, unsigned int len)
 {
register __u32 t;
 
@@ -120,7 +120,7 @@ MD5Update(struct MD5Context *ctx, unsigned char const *buf, 
unsigned len)
  * 1 0* (64-bit count of bits processed, MSB-first)
  */
 void
-MD5Final(unsigned char digest[16], struct MD5Context *ctx)
+MD5Final(unsigned char digest[16], MD5Context *ctx)
 {
unsigned int count;
unsigned char *p;
@@ -269,7 +269,7 @@ MD5Transform(__u32 buf[4], __u32 const in[16])
 void
 md5 (unsigned char *input, int len, unsigned char output[16])
 {
-   struct MD5Context context;
+   MD5Context context;
 
MD5Init();
MD5Update(, input, len);
@@ -286,7 +286,7 @@ void
 md5_wd(const unsigned char *input, unsigned int len, unsigned char output[16],
unsigned int chunk_sz)
 {
-   struct MD5Context context;
+   MD5Context context;
 #if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
const unsigned char *end, *curr;
int chunk;
-- 
2.25.1



[PATCH 2/4] efi_loader: remove redundant hash includes

2024-05-09 Thread Raymond Mao
Remove the redundant includes of u-boot/sha1.h, u-boot/sha256.h
and u-boot/sha512.h

Signed-off-by: Raymond Mao 
---
 lib/efi_loader/efi_signature.c | 1 -
 lib/efi_loader/efi_tcg2.c  | 3 ---
 2 files changed, 4 deletions(-)

diff --git a/lib/efi_loader/efi_signature.c b/lib/efi_loader/efi_signature.c
index f338e732759..184eac8cddb 100644
--- a/lib/efi_loader/efi_signature.c
+++ b/lib/efi_loader/efi_signature.c
@@ -17,7 +17,6 @@
 #include 
 #include 
 #include 
-#include 
 
 const efi_guid_t efi_guid_sha256 = EFI_CERT_SHA256_GUID;
 const efi_guid_t efi_guid_cert_rsa2048 = EFI_CERT_RSA2048_GUID;
diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
index b07e0099c27..ac056dcfc55 100644
--- a/lib/efi_loader/efi_tcg2.c
+++ b/lib/efi_loader/efi_tcg2.c
@@ -19,9 +19,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
-- 
2.25.1



[PATCH 1/4] image: remove redundant hash includes

2024-05-09 Thread Raymond Mao
Remove the redundant includes of u-boot/md5.h, u-boot/sha1.h,
u-boot/sha256.h and u-boot/sha512.h

Signed-off-by: Raymond Mao 
---
 boot/image-fit.c | 4 
 boot/image.c | 2 --
 2 files changed, 6 deletions(-)

diff --git a/boot/image-fit.c b/boot/image-fit.c
index 89e377563ce..1efc39f4408 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -38,10 +38,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
 
 /*/
 /* New uImage format routines */
diff --git a/boot/image.c b/boot/image.c
index 073931cd7a3..e57d6eae52d 100644
--- a/boot/image.c
+++ b/boot/image.c
@@ -26,8 +26,6 @@
 #endif
 
 #include 
-#include 
-#include 
 #include 
 #include 
 
-- 
2.25.1



[PATCH 0/4] Clean-up patch set for MbedTLS integration

2024-05-09 Thread Raymond Mao
This patch set is picked from the previously posted serie:
"[RFC] Integrate MbedTLS v3.6 LTS with U-Boot"

They are not directly related to MbedTLS integration, but the
prerequisite for a few clean-up, refactoring and minor fixes.

Raymond Mao (4):
  image: remove redundant hash includes
  efi_loader: remove redundant hash includes
  md5: Use typedef for MD5 context
  arm: EFI linker script text section alignment

 arch/arm/lib/elf_aarch64_efi.lds |  1 +
 boot/image-fit.c |  4 
 boot/image.c |  2 --
 drivers/crypto/hash/hash_sw.c|  8 
 include/u-boot/md5.h | 10 +-
 lib/efi_loader/efi_signature.c   |  1 -
 lib/efi_loader/efi_tcg2.c|  3 ---
 lib/md5.c| 10 +-
 8 files changed, 15 insertions(+), 24 deletions(-)

-- 
2.25.1



[PATCH 2/4] remoteproc: k3-r5: Add support for R5F core on AM62A SoCs

2024-05-09 Thread Hari Nagalla
AM62A has a R5F core in MCU voltage domain.
Extend support for R5F remote proc driver on AM62A with compatible
strings.

Signed-off-by: Hari Nagalla 
---
 drivers/remoteproc/ti_k3_r5f_rproc.c | 29 ++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/ti_k3_r5f_rproc.c 
b/drivers/remoteproc/ti_k3_r5f_rproc.c
index 631e548dcc..35835b2d61 100644
--- a/drivers/remoteproc/ti_k3_r5f_rproc.c
+++ b/drivers/remoteproc/ti_k3_r5f_rproc.c
@@ -40,6 +40,8 @@
 #define PROC_BOOT_CFG_FLAG_GEN_IGN_BOOTVECTOR  0x1000
 /* Available from J7200 SoCs onwards */
 #define PROC_BOOT_CFG_FLAG_R5_MEM_INIT_DIS 0x4000
+#define PROC_BOOT_CFG_FLAG_R5_SINGLE_CORE  0x8000
+
 
 /* R5 TI-SCI Processor Control Flags */
 #define PROC_BOOT_CTRL_FLAG_R5_CORE_HALT   0x0001
@@ -55,6 +57,8 @@
 enum cluster_mode {
CLUSTER_MODE_SPLIT = 0,
CLUSTER_MODE_LOCKSTEP,
+   CLUSTER_MODE_SINGLECPU,
+   CLUSTER_MODE_SINGLECORE,
 };
 
 /**
@@ -65,6 +69,7 @@ enum cluster_mode {
 struct k3_r5f_ip_data {
bool tcm_is_double;
bool tcm_ecc_autoinit;
+   bool is_single_core;
 };
 
 /**
@@ -599,8 +604,10 @@ static int k3_r5f_rproc_configure(struct k3_r5f_core *core)
/* Sanity check for Lockstep mode */
lockstep_permitted = !!(sts &
PROC_BOOT_STATUS_FLAG_R5_LOCKSTEP_PERMITTED);
-   if (cluster->mode && is_primary_core(core) && !lockstep_permitted) {
-   dev_err(core->dev, "LockStep mode not permitted on this 
device\n");
+   if (cluster->mode == CLUSTER_MODE_LOCKSTEP && is_primary_core(core) &&
+   !lockstep_permitted) {
+   dev_err(core->dev, "LockStep mode not permitted on this \
+   device\n");
ret = -EINVAL;
goto out;
}
@@ -615,6 +622,9 @@ static int k3_r5f_rproc_configure(struct k3_r5f_core *core)
clr_cfg |= PROC_BOOT_CFG_FLAG_R5_LOCKSTEP;
}
 
+   if (core->ipdata->is_single_core)
+   set_cfg = PROC_BOOT_CFG_FLAG_R5_SINGLE_CORE;
+
if (core->atcm_enable)
set_cfg |= PROC_BOOT_CFG_FLAG_R5_ATCM_EN;
else
@@ -853,11 +863,19 @@ static int k3_r5f_remove(struct udevice *dev)
 static const struct k3_r5f_ip_data k3_data = {
.tcm_is_double = false,
.tcm_ecc_autoinit = false,
+   .is_single_core = false,
 };
 
 static const struct k3_r5f_ip_data j7200_j721s2_data = {
.tcm_is_double = true,
.tcm_ecc_autoinit = true,
+   .is_single_core = false,
+};
+
+static const struct k3_r5f_ip_data am62_data = {
+   .tcm_is_double = false,
+   .tcm_ecc_autoinit = false,
+   .is_single_core = true,
 };
 
 static const struct udevice_id k3_r5f_rproc_ids[] = {
@@ -865,6 +883,7 @@ static const struct udevice_id k3_r5f_rproc_ids[] = {
{ .compatible = "ti,j721e-r5f", .data = (ulong)_data, },
{ .compatible = "ti,j7200-r5f", .data = (ulong)_j721s2_data, },
{ .compatible = "ti,j721s2-r5f", .data = (ulong)_j721s2_data, },
+   { .compatible = "ti,am62-r5f", .data = (ulong)_data, },
{}
 };
 
@@ -887,6 +906,11 @@ static int k3_r5f_cluster_probe(struct udevice *dev)
cluster->mode = dev_read_u32_default(dev, "ti,cluster-mode",
 CLUSTER_MODE_LOCKSTEP);
 
+   if (device_is_compatible(dev, "ti,am62-r5fss")) {
+   cluster->mode = CLUSTER_MODE_SINGLECORE;
+   return 0;
+   }
+
if (device_get_child_count(dev) != 2) {
dev_err(dev, "Invalid number of R5 cores");
return -EINVAL;
@@ -903,6 +927,7 @@ static const struct udevice_id k3_r5fss_ids[] = {
{ .compatible = "ti,j721e-r5fss"},
{ .compatible = "ti,j7200-r5fss"},
{ .compatible = "ti,j721s2-r5fss"},
+   { .compatible = "ti,am62-r5fss"},
{}
 };
 
-- 
2.34.1



[PATCH 4/4] board: ti: am62ax: Add support for remote proc load

2024-05-09 Thread Hari Nagalla
Add AM62a remote proc firmware names to environment variables for
loading of C7x DSP and R5F processors.

Signed-off-by: Hari Nagalla 
---
 board/ti/am62ax/am62ax.env | 4 
 1 file changed, 4 insertions(+)

diff --git a/board/ti/am62ax/am62ax.env b/board/ti/am62ax/am62ax.env
index 334374abb7..97122fb57b 100644
--- a/board/ti/am62ax/am62ax.env
+++ b/board/ti/am62ax/am62ax.env
@@ -1,5 +1,8 @@
 #include 
 #include 
+#if CONFIG_CMD_REMOTEPROC
+#include 
+#endif
 
 name_kern=Image
 console=ttyS2,115200n8
@@ -27,3 +30,4 @@ get_kern_mmc=load mmc ${bootpart} ${loadaddr}
 get_fit_mmc=load mmc ${bootpart} ${addr_fit}
${bootdir}/${name_fit}
 partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}
+rproc_fw_binaries= 0 /lib/firmware/am62a-mcu-r5f0_0-fw 1 
/lib/firmware/am62a-c71_0-fw
-- 
2.34.1



[PATCH 3/4] configs: am62ax: enable remote proc drivers

2024-05-09 Thread Hari Nagalla
Enable K3-DSP and K3-R5FSS remote proc drivers for am62ax.

Signed-off-by: Hari Nagalla 
---
 configs/am62ax_evm_a53_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig
index c4556f5dd2..6b29a4b9cf 100644
--- a/configs/am62ax_evm_a53_defconfig
+++ b/configs/am62ax_evm_a53_defconfig
@@ -72,6 +72,8 @@ CONFIG_POWER_DOMAIN=y
 CONFIG_TI_SCI_POWER_DOMAIN=y
 CONFIG_K3_SYSTEM_CONTROLLER=y
 CONFIG_REMOTEPROC_TI_K3_ARM64=y
+CONFIG_REMOTEPROC_TI_K3_R5F=y
+CONFIG_REMOTEPROC_TI_K3_DSP=y
 CONFIG_RESET_TI_SCI=y
 CONFIG_DM_SERIAL=y
 CONFIG_SOC_DEVICE=y
@@ -81,3 +83,4 @@ CONFIG_SYSRESET=y
 CONFIG_SPL_SYSRESET=y
 CONFIG_SYSRESET_TI_SCI=y
 CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
+CONFIG_CMD_REMOTEPROC=y
-- 
2.34.1



[PATCH 1/4] remoteproc: k3-dsp: Enable C71x support for AM62A

2024-05-09 Thread Hari Nagalla
AM62A SoC has a single C71x DSP subsystem with analytics engine in
main voltage domain. Extend support to AM62A with compatible strings.

Signed-off-by: Hari Nagalla 
---
 drivers/remoteproc/ti_k3_dsp_rproc.c | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/ti_k3_dsp_rproc.c 
b/drivers/remoteproc/ti_k3_dsp_rproc.c
index e790406324..ed13729c33 100644
--- a/drivers/remoteproc/ti_k3_dsp_rproc.c
+++ b/drivers/remoteproc/ti_k3_dsp_rproc.c
@@ -339,7 +339,8 @@ static int k3_dsp_of_get_memories(struct udevice *dev)
for (i = 0; i < dsp->num_mems; i++) {
/* C71 cores only have a L1P Cache, there are no L1P SRAMs */
if (((device_is_compatible(dev, "ti,j721e-c71-dsp")) ||
-(device_is_compatible(dev, "ti,j721s2-c71-dsp"))) &&
+   (device_is_compatible(dev, "ti,j721s2-c71-dsp")) ||
+   (device_is_compatible(dev, "ti,am62a-c7xv-dsp"))) &&
!strcmp(mem_names[i], "l1pram")) {
dsp->mem[i].bus_addr = FDT_ADDR_T_NONE;
dsp->mem[i].dev_addr = FDT_ADDR_T_NONE;
@@ -347,7 +348,14 @@ static int k3_dsp_of_get_memories(struct udevice *dev)
dsp->mem[i].size = 0;
continue;
}
-
+   if (device_is_compatible(dev, "ti,am62a-c7xv-dsp") &&
+   !strcmp(mem_names[i], "l1dram")) {
+   dsp->mem[i].bus_addr = FDT_ADDR_T_NONE;
+   dsp->mem[i].dev_addr = FDT_ADDR_T_NONE;
+   dsp->mem[i].cpu_addr = NULL;
+   dsp->mem[i].size = 0;
+   continue;
+   }
dsp->mem[i].bus_addr = dev_read_addr_size_name(dev, 
mem_names[i],
  (fdt_addr_t *)>mem[i].size);
if (dsp->mem[i].bus_addr == FDT_ADDR_T_NONE) {
@@ -459,6 +467,7 @@ static const struct udevice_id k3_dsp_ids[] = {
{ .compatible = "ti,j721e-c66-dsp", .data = (ulong)_data, },
{ .compatible = "ti,j721e-c71-dsp", .data = (ulong)_data, },
{ .compatible = "ti,j721s2-c71-dsp", .data = (ulong)_data, },
+   { .compatible = "ti,am62a-c7xv-dsp", .data = (ulong)_data, },
{}
 };
 
-- 
2.34.1



[PATCH 0/4] Add remoteproc driver for AM62a SoC

2024-05-09 Thread Hari Nagalla
This series adds relevant ip data in remoteproc driver for AM62a devices.

Logs: https://paste.sr.ht/~hnagalla/5e20838705c1d688bca81886dad56451b56d3913

Hari Nagalla (4):
  remoteproc: k3-dsp: Enable C71x support for AM62A
  remoteproc: k3-r5: Add support for R5F core on AM62A SoCs
  configs: am62ax: enable remote proc drivers
  board: ti: am62ax: Add support for remote proc load

 board/ti/am62ax/am62ax.env   |  4 
 configs/am62ax_evm_a53_defconfig |  3 +++
 drivers/remoteproc/ti_k3_dsp_rproc.c | 13 +++--
 drivers/remoteproc/ti_k3_r5f_rproc.c | 29 ++--
 4 files changed, 45 insertions(+), 4 deletions(-)

-- 
2.34.1



Re: U-boot script for RPI with boot partition of ext4 type

2024-05-09 Thread Antoni Jankowski
I realised that it's not a good idea to go with an ext4 boot partition with
a RPI, apparently it requires the boot partition to be fat.

Following that I managed to prepare an update and flash it onto the mmc,
however the struggle at the moment is instructing u-boot to use the updated
boot partition - my RPI always boots to the first vfat partition on the
image.
The `boot.scr` script on my boot partitions is as below, moreover the
u-boot environment gets updated adequately, meaning that the BOOT_DEV
variable does change to "mmc 0:2" after an update. This seems to be
completely ignored by u-boot, even when BOOT_DEV was fixed to "mmc 0:2" RPI
booted into the first vfat partition on the image.

boot.scr:

fdt addr ${fdt_addr} && fdt get value bootargs /chosen bootargs
>
> test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
> test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
> test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
> test -n "${BOOT_DEV}" || setenv BOOT_DEV "mmc 0:1"
>
> setenv bootpart
> setenv raucslot
>
> for BOOT_SLOT in "${BOOT_ORDER}"; do
>   if test "x${bootpart}" != "x"; then
> # skip remaining slots
>   elif test "x${BOOT_SLOT}" = "xA"; then
> if itest ${BOOT_A_LEFT} -gt 0; then
>   setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
>   echo "Found valid RAUC slot A"
>   setenv bootpart "/dev/mmcblk0p3"
>   setenv raucslot "A"
>   setenv BOOT_DEV "mmc 0:1"
> fi
>   elif test "x${BOOT_SLOT}" = "xB"; then
> if itest ${BOOT_B_LEFT} -gt 0; then
>   setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
>   echo "Found valid RAUC slot B"
>   setenv bootpart "/dev/mmcblk0p4"
>   setenv raucslot "B"
>   setenv BOOT_DEV "mmc 0:2"
> fi
>   fi
> done
>
> if test -n "${bootpart}"; then
>   setenv bootargs "${bootargs} root=${bootpart} rauc.slot=${raucslot}"
>   saveenv
> else
>   echo "No valid RAUC slot found. Resetting tries to 3"
>   setenv BOOT_A_LEFT 3
>   setenv BOOT_B_LEFT 3
>   saveenv
>   reset
> fi
>
> fatload ${BOOT_DEV} ${kernel_addr_r} @@KERNEL_IMAGETYPE@@
> if test ! -e ${BOOT_DEV} uboot.env; then saveenv; fi;
> @@KERNEL_BOOTCMD@@ ${kernel_addr_r} - ${fdt_addr}
>

Thanks for all the advice,
Antoni



On Mon, May 6, 2024 at 4:29 PM Antoni Jankowski <
antoni.s.jankow...@gmail.com> wrote:

> Hi Jojan,
>
> I did check the u-boot config, CONFIG_CMD_EXT4 was enabled, 
> CONFIG_CMD_EXT4_WRITE
> disabled. I made sure to enable both, replace `fatload` with `ext4laod` and
> recompiled u-boot.
> Sadly the effect is that the board still does not boot. I've ditched one
> of the boot partitions to make things a bit easier to set up, first
> focusing on the boot partition getting recognized by the system.
>
> I've noticed that the ext4 boot partition contains many more files than
> its vfat equivalent. Below I send the *wic ls* output of the /boot
> partition in set to ext4:
>
> debugfs 1.47.0 (5-Feb-2023)
>>   2   40755 (2)  0  01024  6-May-2024 16:03 .
>>   2   40755 (2)  0  01024  6-May-2024 16:03 ..
>>  11   40700 (2)  0  0   12288  6-May-2024 16:03 lost+found
>>  12  100644 (1)   1000   1000   22387200  6-May-2024 16:03 Image
>>  13  100644 (1)   1000   1000   52424  6-May-2024 16:03
>> bcm2711-rpi-4-b.dtb
>>  14  100644 (1)   1000   1000   52556  6-May-2024 16:03
>> bcm2711-rpi-400.dtb
>>  15  100644 (1)   1000   1000   53165  6-May-2024 16:03
>> bcm2711-rpi-cm4.dtb
>>  16  100644 (1)   1000   1000 386  6-May-2024 16:03 boot.scr
>>  17  100644 (1)   1000   1000   52460  6-May-2024 16:03 bootcode.bin
>>  18  100644 (1)   1000   1000 197  6-May-2024 16:03 cmdline.txt
>>  19  100644 (1)   1000   10002214  6-May-2024 16:03 config.txt
>>  20  100644 (1)   1000   10007262  6-May-2024 16:03 fixup.dat
>>  21  100644 (1)   1000   10005399  6-May-2024 16:03 fixup4.dat
>>  22  100644 (1)   1000   10003170  6-May-2024 16:03 fixup4cd.dat
>>  23  100644 (1)   1000   10008379  6-May-2024 16:03 fixup4db.dat
>>  24  100644 (1)   1000   10008379  6-May-2024 16:03 fixup4x.dat
>>  25  100644 (1)   1000   10003170  6-May-2024 16:03 fixup_cd.dat
>>  26  100644 (1)   1000   1000   10228  6-May-2024 16:03 fixup_db.dat
>>  27  100644 (1)   1000   1000   10226  6-May-2024 16:03 fixup_x.dat
>>  28  100644 (1)   1000   1000   589368  6-May-2024 16:03 kernel8.img
>>  29   40755 (2)   1000   10003072  6-May-2024 16:03 overlays
>>  73  100644 (1)   1000   1000   0  6-May-2024 16:03
>> rpi-bootfiles-20220830.stamp
>>  74  100644 (1)   1000   1000   2973536  6-May-2024 16:03 start.elf
>>  75  100644 (1)   1000   1000   2249280  6-May-2024 16:03 start4.elf
>>  76  100644 (1)   1000   1000   803964  6-May-2024 16:03 start4cd.elf
>>  77  100644 (1)   1000   1000   3744808  6-May-2024 16:03 start4db.elf
>>  78  100644 (1)   1000   1000   2996680  6-May-2024 16:03 start4x.elf
>>  79  100644 (1)   1000   1000   803964  

Re: [PATCH] mach-snapdragon: do carveouts for qcs404 only

2024-05-09 Thread Sam Day
'Ello Sumit,

On Wednesday, 8 May 2024 at 4:48 PM, Sumit Garg  wrote:

> 
> 
> On Wed, 8 May 2024 at 18:09, Caleb Connolly caleb.conno...@linaro.org wrote:
> 
> > Hi Sam,
> > 
> > On 08/05/2024 13:40, Sam Day wrote:
> > 
> > > Salutations Sumit,
> > > 
> > > On Wednesday, 8 May 2024 at 11:14 AM, Sumit Garg sumit.g...@linaro.org 
> > > wrote:
> > > 
> > > > Hi Sam,
> > > > 
> > > > On Wed, 8 May 2024 at 00:11, Sam Day m...@samcday.com wrote:
> > > > 
> > > > > The newly introduced carve_out_reserved_memory causes issues when
> > > > > U-Boot is chained from the lk2nd bootloader. lk2nd provides a
> > > > > simple-framebuffer device and marks the framebuffer region as no-map 
> > > > > in
> > > > > the supplied /reserved-memory. Consequently, the simple_video driver
> > > > > triggers a page fault when it tries to write to this region.
> > > > 
> > > > How does the corresponding Linux kernel driver handle this?
> > > 
> > > Firstly: I'm something of a middle-man here. I would consider Caleb the 
> > > authoritative source on the carveouts stuff (since they wrote it) and 
> > > Nikita Travkin the authority on the simplefb handoff (since he originally 
> > > wrote it for lk2nd to hand off to Linux simpledrm and then adapted it to 
> > > work with U-Boot simplefb).
> > > 
> > > I consulted with Nikita on your first question here. He linked me to this 
> > > snippet: 
> > > https://elixir.bootlin.com/linux/v6.9-rc7/source/drivers/gpu/drm/tiny/simpledrm.c#L877
> > > 
> > > > Is the
> > > > framebuffer region required to be mapped as normal memory or device
> > > > type or something else?
> > > 
> > > So I guess based on the link above, it's just mapped as normal uncached 
> > > memory.
> > > 
> > > I tried to do something like this a few days ago in U-Boot, but a) it 
> > > doesn't work and b) I have no idea what I'm doing: 
> > > https://github.com/samcday/u-boot/commit/c100cb3711ddf5b01601691f3e6a9ec890d9a496
> 
> 
> Can you start adding some debug prints as to what might be happening?
> Also, look at my proposal below to hook memory mapping properly for
> drivers.

I got to the bottom of the issue. This commit seems to work:
https://github.com/samcday/u-boot/commit/25bf923c251b56d297d16898210fa36616294415

Calling mmu_set_region_dcache_behaviour alone is insufficient, as it
does not change the "flags" of the page-table entry in the way that
mmu_change_region_attr does. That's why it was triggering an abort
in the previous attempt: __asm_flush_dcache_range was trying to scrub
an entry that was still marked as PTE_TYPE_FAULT I guess :)

> 
> > > After talking with Caleb about this for a bit, they suggested the patch 
> > > you see here as what I guess could be considered a "stopgap" solution 
> > > that hopefully makes it into 2024.07.
> > > 
> > > > Similarly would normal memory type work for
> > > > all other reserved memory regions marked as no-map?
> > > 
> > > I'll let Caleb weigh in here. My understanding is that the other regions 
> > > should be marked as PTE_TYPE_FAULT because otherwise drivers might 
> > > inadvertently speculatively access regions that are very much off-limits, 
> > > such as TZ app regions.
> > 
> > Right, carving out reserved regions and having the driver handle them is
> > theoretically the "correct" thing to do here. But I'm not sure that the
> > additional complexity offers much value from a U-Boot context.
> > 
> > If we can teach the armv8 PT/cache code to handle this better, and teach
> > all the drivers to map their regions on-demand, this would probably help
> > us a lot (especially as right now if you attempt to access dead space
> > between peripherals then you'll hang the bus...). But U-Boot is a ways
> > away from that.
> 
> 
> I am not sure if U-Boot is really that far away although you can say
> the infrastructure is not hooked up for Arm. Have a look into
> map_physmem() and unmap_physmem() utilized by various drivers which
> are actually hooked up on MIPS. So I think the right way to approach
> this feature on Qcom platforms is to start hooking up those APIs on
> mach-snapdragon to begin with via mmu_set_region_dcache_behaviour()
> underneath. We can always go ahead and make it more generic if needed
> on other platforms too.

So I'm happy to explore this further in a separate patch. Such a patch
doesn't seem like something that is suitable for inclusion in 2024.07
at this stage, right?

If not, I'm wondering if there's any chance we can still pull this patch
in as a stopgap measure? As it currently stands, the carveouts call is
the *only* thing preventing msm8916 devices from booting U-Boot when
chained from lk2nd.

-Sam

> 
> -Sumit


[PATCH v2 6/6] arm: dts: k3-j721s2|am68: Migrate to OF_UPSTREAM

2024-05-09 Thread Manorit Chawdhry
Use OF_UPSTREAM to pull Linux DT from dts/ tree

Signed-off-by: Manorit Chawdhry 
---
 arch/arm/dts/Makefile  |4 +-
 arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi |   20 +-
 arch/arm/dts/k3-am68-sk-base-board.dts |  611 ---
 arch/arm/dts/k3-am68-sk-som.dtsi   |  259 ---
 arch/arm/dts/k3-j721s2-binman.dtsi |2 +-
 .../dts/k3-j721s2-common-proc-board-u-boot.dtsi|   18 +-
 arch/arm/dts/k3-j721s2-common-proc-board.dts   |  504 -
 arch/arm/dts/k3-j721s2-main.dtsi   | 1928 
 arch/arm/dts/k3-j721s2-mcu-wakeup.dtsi |  738 
 arch/arm/dts/k3-j721s2-som-p0.dtsi |  361 
 arch/arm/dts/k3-j721s2-thermal.dtsi|  101 -
 arch/arm/dts/k3-j721s2.dtsi|  175 --
 board/ti/j721s2/MAINTAINERS|8 -
 configs/am68_sk_a72_defconfig  |6 +-
 configs/j721s2_evm_a72_defconfig   |5 +-
 15 files changed, 23 insertions(+), 4717 deletions(-)

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index c9f1b25ad647..60660f24d942 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1331,9 +1331,7 @@ dtb-$(CONFIG_SOC_K3_J721E) += 
k3-j721e-common-proc-board.dtb \
  k3-j721e-beagleboneai64.dtb \
  k3-j721e-r5-beagleboneai64.dtb
 
-dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-base-board.dtb\
-  k3-am68-sk-r5-base-board.dtb\
-  k3-j721s2-common-proc-board.dtb\
+dtb-$(CONFIG_SOC_K3_J721S2) += k3-am68-sk-r5-base-board.dtb\
   k3-j721s2-r5-common-proc-board.dtb
 
 dtb-$(CONFIG_SOC_K3_J784S4) += k3-am69-r5-sk.dtb \
diff --git a/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi 
b/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
index dca588485d41..4b8d73a92d6a 100644
--- a/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
+++ b/arch/arm/dts/k3-am68-sk-base-board-u-boot.dtsi
@@ -19,10 +19,14 @@
 
 _mcu_wakeup {
bootph-all;
+};
 
-   chipid@4314 {
-   bootph-all;
-   };
+_conf {
+   bootph-all;
+};
+
+ {
+   bootph-all;
 };
 
 _navss {
@@ -34,14 +38,6 @@
 };
 
 _udmap {
-   reg =   <0x0 0x285c 0x0 0x100>,
-   <0x0 0x284c 0x0 0x4000>,
-   <0x0 0x2a80 0x0 0x4>,
-   <0x0 0x284a 0x0 0x4000>,
-   <0x0 0x2aa0 0x0 0x4>,
-   <0x0 0x2840 0x0 0x2000>;
-   reg-names = "gcfg", "rchan", "rchanrt", "tchan",
-   "tchanrt", "rflow";
bootph-all;
 };
 
@@ -132,7 +128,7 @@
 
 #ifdef CONFIG_TARGET_J721S2_A72_EVM
 
-#define SPL_AM68_SK_DTB "spl/dts/k3-am68-sk-base-board.dtb"
+#define SPL_AM68_SK_DTB "spl/dts/ti/k3-am68-sk-base-board.dtb"
 #define AM68_SK_DTB "u-boot.dtb"
 
 _j721s2_evm_dtb {
diff --git a/arch/arm/dts/k3-am68-sk-base-board.dts 
b/arch/arm/dts/k3-am68-sk-base-board.dts
deleted file mode 100644
index 1e1a82f9d2b8..
--- a/arch/arm/dts/k3-am68-sk-base-board.dts
+++ /dev/null
@@ -1,611 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
- *
- * Base Board: https://www.ti.com/lit/zip/SPRR463
- */
-
-/dts-v1/;
-
-#include "k3-am68-sk-som.dtsi"
-#include 
-#include 
-#include 
-
-#include "k3-serdes.h"
-
-/ {
-   compatible = "ti,am68-sk", "ti,j721s2";
-   model = "Texas Instruments AM68 SK";
-
-   chosen {
-   stdout-path = "serial2:115200n8";
-   };
-
-   aliases {
-   serial0 = _uart0;
-   serial1 = _uart0;
-   serial2 = _uart8;
-   mmc1 = _sdhci1;
-   can0 = _mcan0;
-   can1 = _mcan1;
-   can2 = _mcan6;
-   can3 = _mcan7;
-   };
-
-   vusb_main: regulator-vusb-main5v0 {
-   /* USB MAIN INPUT 5V DC */
-   compatible = "regulator-fixed";
-   regulator-name = "vusb-main5v0";
-   regulator-min-microvolt = <500>;
-   regulator-max-microvolt = <500>;
-   regulator-always-on;
-   regulator-boot-on;
-   };
-
-   vsys_3v3: regulator-vsys3v3 {
-   /* Output of LM5141 */
-   compatible = "regulator-fixed";
-   regulator-name = "vsys_3v3";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   vin-supply = <_main>;
-   regulator-always-on;
-   regulator-boot-on;
-   };
-
-   vdd_mmc1: regulator-sd {
-   /* Output of TPS22918 */
-   compatible = "regulator-fixed";
-   regulator-name = "vdd_mmc1";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-

  1   2   >