[PATCH 1/3] arm64: renesas: r8a779g3: Add PCIe firmware environment on Retronix R-Car V4H Sparrow Hawk

Marek Vasut via U-Boot <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <[email protected]>
Add PCIe controller firmware handling environment to Retronix R-Car
V4H Sparrow Hawk. The "renesas_rcar_gen4_load_firmware" script is used
to load PCIe controller firmware from SPI NOR offset 0x300000. The
"flash_pcie_fw_to_qspi_from_mmc" script is used to write the firmware
from SD card to SPI NOR offset 0x300000 .

Signed-off-by: Marek Vasut <[email protected]>
---
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
---
 include/configs/sparrowhawk.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/include/configs/sparrowhawk.h b/include/configs/sparrowhawk.h
index 0524e39229c..731455c9d8e 100644
--- a/include/configs/sparrowhawk.h
+++ b/include/configs/sparrowhawk.h
@@ -11,4 +11,26 @@
 
 #include "rcar-gen4-common.h"
 
+/* Environment setting */
+#undef CFG_EXTRA_ENV_SETTINGS
+#define CFG_EXTRA_ENV_SETTINGS						\
+	"bootm_size=0x10000000\0"					\
+	\
+	"renesas_rcar_gen4_pcie_firmware_sf_offset=0x300000\0"		\
+	"renesas_rcar_gen4_pcie_firmware_sd_path=lib/firmware/rcar_gen4_pcie.bin\0" \
+	"renesas_rcar_gen4_load_firmware="				\
+		"env set renesas_rcar_gen4_load_firmware_addr 0x54000000 && " \
+		"env set renesas_rcar_gen4_load_firmware_size 0x8000 && " \
+		"sf probe && "						\
+		"sf read ${renesas_rcar_gen4_load_firmware_addr} "	\
+			"${renesas_rcar_gen4_pcie_firmware_sf_offset} "	\
+			"${renesas_rcar_gen4_load_firmware_size}\0"	\
+	"flash_pcie_fw_to_qspi_from_mmc="				\
+		"load mmc 0:1 ${loadaddr} "				\
+			"${renesas_rcar_gen4_pcie_firmware_sd_path} && " \
+		"sf probe && "						\
+		"sf update ${loadaddr} "				\
+			"${renesas_rcar_gen4_pcie_firmware_sf_offset} "	\
+			"${filesize}\0"
+
 #endif /* __SPARROWHAWK_H */
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.