aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini2022-09-03 14:55:24 -0400
committerTom Rini2022-09-03 14:55:24 -0400
commitbc5d11316be3cdf09c6d854070c67ec0952528ee (patch)
treec3e40423cf6d320032e341f48557be5548d5e51c
parentd4593139c575d80eb0034dbef082c17debf25887 (diff)
parent68083b897b57309c29039b27d2580e4eb9c6e455 (diff)
Merge https://source.denx.de/u-boot/custodians/u-boot-sh
-rw-r--r--arch/arm/dts/r7s72100-gr-peach-u-boot.dts4
-rw-r--r--arch/arm/dts/r8a774c0-u-boot.dtsi4
-rw-r--r--arch/arm/dts/r8a77950-u-boot.dtsi4
-rw-r--r--arch/arm/dts/r8a77960-u-boot.dtsi4
-rw-r--r--arch/arm/dts/r8a77965-u-boot.dtsi4
-rw-r--r--arch/arm/dts/r8a77970-u-boot.dtsi4
-rw-r--r--arch/arm/dts/r8a77980-u-boot.dtsi4
-rw-r--r--arch/arm/dts/r8a77990-u-boot.dtsi4
-rw-r--r--arch/arm/dts/r8a77995-u-boot.dtsi4
-rw-r--r--arch/arm/dts/r8a779a0-u-boot.dtsi2
-rw-r--r--board/renesas/rcar-common/common.c46
-rw-r--r--drivers/mtd/renesas_rpc_hf.c3
-rw-r--r--drivers/spi/renesas_rpc_spi.c9
13 files changed, 67 insertions, 29 deletions
diff --git a/arch/arm/dts/r7s72100-gr-peach-u-boot.dts b/arch/arm/dts/r7s72100-gr-peach-u-boot.dts
index f48121a9a81..5b176a9acd7 100644
--- a/arch/arm/dts/r7s72100-gr-peach-u-boot.dts
+++ b/arch/arm/dts/r7s72100-gr-peach-u-boot.dts
@@ -46,8 +46,8 @@
};
- rpc: rpc@ee200000 {
- compatible = "renesas,rpc-r7s72100", "renesas,rpc";
+ rpc: spi@ee200000 {
+ compatible = "renesas,r7s72100-rpc-if";
reg = <0x3fefa000 0x100>, <0x18000000 0x08000000>;
bank-width = <2>;
num-cs = <1>;
diff --git a/arch/arm/dts/r8a774c0-u-boot.dtsi b/arch/arm/dts/r8a774c0-u-boot.dtsi
index af1c86171b6..d29610676ca 100644
--- a/arch/arm/dts/r8a774c0-u-boot.dtsi
+++ b/arch/arm/dts/r8a774c0-u-boot.dtsi
@@ -10,8 +10,8 @@
/ {
soc {
- rpc: rpc@ee200000 {
- compatible = "renesas,rcar-gen3-rpc", "renesas,rpc-r8a774c0";
+ rpc: spi@ee200000 {
+ compatible = "renesas,r8a774c0-rpc-if", "renesas,rcar-gen3-rpc-if";
reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0x04000000>;
clocks = <&cpg CPG_MOD 917>;
bank-width = <2>;
diff --git a/arch/arm/dts/r8a77950-u-boot.dtsi b/arch/arm/dts/r8a77950-u-boot.dtsi
index 5a116514646..2306c7bab84 100644
--- a/arch/arm/dts/r8a77950-u-boot.dtsi
+++ b/arch/arm/dts/r8a77950-u-boot.dtsi
@@ -13,8 +13,8 @@
/ {
soc {
- rpc: rpc@ee200000 {
- compatible = "renesas,rpc-r8a7795", "renesas,rpc";
+ rpc: spi@ee200000 {
+ compatible = "renesas,r8a7795-rpc-if", "renesas,rcar-gen3-rpc-if";
reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0>;
clocks = <&cpg CPG_MOD 917>;
bank-width = <2>;
diff --git a/arch/arm/dts/r8a77960-u-boot.dtsi b/arch/arm/dts/r8a77960-u-boot.dtsi
index f1cae1c3593..f64e5a416b0 100644
--- a/arch/arm/dts/r8a77960-u-boot.dtsi
+++ b/arch/arm/dts/r8a77960-u-boot.dtsi
@@ -13,8 +13,8 @@
/ {
soc {
- rpc: rpc@ee200000 {
- compatible = "renesas,rpc-r8a7796", "renesas,rpc";
+ rpc: spi@ee200000 {
+ compatible = "renesas,r8a7796-rpc-if", "renesas,rcar-gen3-rpc-if";
reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0>;
clocks = <&cpg CPG_MOD 917>;
bank-width = <2>;
diff --git a/arch/arm/dts/r8a77965-u-boot.dtsi b/arch/arm/dts/r8a77965-u-boot.dtsi
index 9cc6f205375..c4abcc5a9b7 100644
--- a/arch/arm/dts/r8a77965-u-boot.dtsi
+++ b/arch/arm/dts/r8a77965-u-boot.dtsi
@@ -13,8 +13,8 @@
/ {
soc {
- rpc: rpc@ee200000 {
- compatible = "renesas,rpc-r8a77965", "renesas,rpc";
+ rpc: spi@ee200000 {
+ compatible = "renesas,r8a77965-rpc-if", "renesas,rcar-gen3-rpc-if";
reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0>;
clocks = <&cpg CPG_MOD 917>;
bank-width = <2>;
diff --git a/arch/arm/dts/r8a77970-u-boot.dtsi b/arch/arm/dts/r8a77970-u-boot.dtsi
index ac3c6be4adb..614caa9e9c2 100644
--- a/arch/arm/dts/r8a77970-u-boot.dtsi
+++ b/arch/arm/dts/r8a77970-u-boot.dtsi
@@ -13,8 +13,8 @@
/ {
soc {
- rpc: rpc@ee200000 {
- compatible = "renesas,rpc-r8a77970", "renesas,rpc";
+ rpc: spi@ee200000 {
+ compatible = "renesas,r8a77970-rpc-if", "renesas,rcar-gen3-rpc-if";
reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0>;
clocks = <&cpg CPG_MOD 917>;
bank-width = <2>;
diff --git a/arch/arm/dts/r8a77980-u-boot.dtsi b/arch/arm/dts/r8a77980-u-boot.dtsi
index 365d40ac49b..54f01c926dc 100644
--- a/arch/arm/dts/r8a77980-u-boot.dtsi
+++ b/arch/arm/dts/r8a77980-u-boot.dtsi
@@ -13,8 +13,8 @@
/ {
soc {
- rpc: rpc@ee200000 {
- compatible = "renesas,rpc-r8a77980", "renesas,rpc";
+ rpc: spi@ee200000 {
+ compatible = "renesas,r8a77980-rpc-if", "renesas,rcar-gen3-rpc-if";
reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0>;
clocks = <&cpg CPG_MOD 917>;
bank-width = <2>;
diff --git a/arch/arm/dts/r8a77990-u-boot.dtsi b/arch/arm/dts/r8a77990-u-boot.dtsi
index 6655abe8752..50bbbe18647 100644
--- a/arch/arm/dts/r8a77990-u-boot.dtsi
+++ b/arch/arm/dts/r8a77990-u-boot.dtsi
@@ -9,8 +9,8 @@
/ {
soc {
- rpc: rpc@ee200000 {
- compatible = "renesas,rpc-r8a77990", "renesas,rpc";
+ rpc: spi@ee200000 {
+ compatible = "renesas,r8a77990-rpc-if", "renesas,rcar-gen3-rpc-if";
reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0>;
clocks = <&cpg CPG_MOD 917>;
bank-width = <2>;
diff --git a/arch/arm/dts/r8a77995-u-boot.dtsi b/arch/arm/dts/r8a77995-u-boot.dtsi
index 0917a80f096..347b59ac42c 100644
--- a/arch/arm/dts/r8a77995-u-boot.dtsi
+++ b/arch/arm/dts/r8a77995-u-boot.dtsi
@@ -9,8 +9,8 @@
/ {
soc {
- rpc: rpc@ee200000 {
- compatible = "renesas,rpc-r8a77995", "renesas,rpc";
+ rpc: spi@ee200000 {
+ compatible = "renesas,r8a77995-rpc-if", "renesas,rcar-gen3-rpc-if";
reg = <0 0xee200000 0 0x100>, <0 0x08000000 0 0>;
clocks = <&cpg CPG_MOD 917>;
bank-width = <2>;
diff --git a/arch/arm/dts/r8a779a0-u-boot.dtsi b/arch/arm/dts/r8a779a0-u-boot.dtsi
index 83dbe3f20ef..9f2772a9485 100644
--- a/arch/arm/dts/r8a779a0-u-boot.dtsi
+++ b/arch/arm/dts/r8a779a0-u-boot.dtsi
@@ -10,7 +10,7 @@
/ {
soc {
rpc: spi@ee200000 {
- compatible = "renesas,rpc-r8a779a0", "renesas,rcar-gen3-rpc";
+ compatible = "renesas,r8a779a0-rpc-if", "renesas,rcar-gen3-rpc-if";
reg = <0 0xee200000 0 0x200>, <0 0x08000000 0 0x04000000>;
clocks = <&cpg CPG_MOD 629>;
bank-width = <2>;
diff --git a/board/renesas/rcar-common/common.c b/board/renesas/rcar-common/common.c
index 0352d341e75..daa1beb14f8 100644
--- a/board/renesas/rcar-common/common.c
+++ b/board/renesas/rcar-common/common.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <dm.h>
+#include <fdt_support.h>
#include <init.h>
#include <asm/global_data.h>
#include <dm/uclass-internal.h>
@@ -19,9 +20,11 @@
DECLARE_GLOBAL_DATA_PTR;
-/* If the firmware passed a device tree use it for U-Boot DRAM setup. */
+/* If the firmware passed a device tree use it for e.g. U-Boot DRAM setup. */
extern u64 rcar_atf_boot_args[];
+#define FDT_RPC_PATH "/soc/spi@ee200000"
+
int fdtdec_board_setup(const void *fdt_blob)
{
void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
@@ -81,7 +84,7 @@ static int is_mem_overlap(void *blob, int first_mem_node, int curr_mem_node)
return 0;
}
-int ft_board_setup(void *blob, struct bd_info *bd)
+static void scrub_duplicate_memory(void *blob)
{
/*
* Scrub duplicate /memory@* node entries here. Some R-Car DTs might
@@ -119,6 +122,45 @@ int ft_board_setup(void *blob, struct bd_info *bd)
first_mem_node = 0;
mem = 0;
}
+}
+
+static void update_rpc_status(void *blob)
+{
+ void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
+ int offset, enabled;
+
+ /*
+ * Check if the DT fragment received from TF-A had its RPC-IF device node
+ * enabled.
+ */
+ if (fdt_magic(atf_fdt_blob) != FDT_MAGIC)
+ return;
+
+ offset = fdt_path_offset(atf_fdt_blob, FDT_RPC_PATH);
+ if (offset < 0)
+ return;
+
+ enabled = fdtdec_get_is_enabled(atf_fdt_blob, offset);
+ if (!enabled)
+ return;
+
+ /*
+ * Find the RPC-IF device node, and enable it if it has a flash subnode.
+ */
+ offset = fdt_path_offset(blob, FDT_RPC_PATH);
+ if (offset < 0)
+ return;
+
+ if (fdt_subnode_offset(blob, offset, "flash") < 0)
+ return;
+
+ fdt_status_okay(blob, offset);
+}
+
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+ scrub_duplicate_memory(blob);
+ update_rpc_status(blob);
return 0;
}
diff --git a/drivers/mtd/renesas_rpc_hf.c b/drivers/mtd/renesas_rpc_hf.c
index 2c61ce7b6e6..aca7a6cdd25 100644
--- a/drivers/mtd/renesas_rpc_hf.c
+++ b/drivers/mtd/renesas_rpc_hf.c
@@ -388,7 +388,8 @@ static int rpc_hf_probe(struct udevice *dev)
}
static const struct udevice_id rpc_hf_ids[] = {
- { .compatible = "renesas,rpc" },
+ { .compatible = "renesas,r7s72100-rpc-if" },
+ { .compatible = "renesas,rcar-gen3-rpc-if" },
{}
};
diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c
index 26b6aa85c92..cb2b8fb64de 100644
--- a/drivers/spi/renesas_rpc_spi.c
+++ b/drivers/spi/renesas_rpc_spi.c
@@ -449,13 +449,8 @@ static const struct dm_spi_ops rpc_spi_ops = {
};
static const struct udevice_id rpc_spi_ids[] = {
- { .compatible = "renesas,rpc-r7s72100" },
- { .compatible = "renesas,rpc-r8a7795" },
- { .compatible = "renesas,rpc-r8a7796" },
- { .compatible = "renesas,rpc-r8a77965" },
- { .compatible = "renesas,rpc-r8a77970" },
- { .compatible = "renesas,rpc-r8a77995" },
- { .compatible = "renesas,rcar-gen3-rpc" },
+ { .compatible = "renesas,r7s72100-rpc-if" },
+ { .compatible = "renesas,rcar-gen3-rpc-if" },
{ }
};