mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 14:38:58 +00:00
This commit is contained in:
commit
bc5d11316b
13 changed files with 67 additions and 29 deletions
|
@ -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>;
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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" },
|
||||
{}
|
||||
};
|
||||
|
||||
|
|
|
@ -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" },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue