mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-20 18:23:08 +00:00
bf7fa7d561
The ARM TrustedFirmware code for the Renesas RZ/G2L SoC family passes a devicetree blob to the bootloader as an argument in the same was previous R-Car Gen3/Gen4 SoCs. This blob contains a compatible string which can be used to identify the particular SoC we are running on. We do this as reading the DEVID & PRR registers from u-boot is not sufficient to differentiate between the R9A07G044L (RZ/G2L) and R9A07G044C (RZ/G2LC) SoCs. An additional read from offset 0x11861178 is needed but this address is in the OTP region which can only be read from the secure world (i.e. TrustedFirmware). So we have to rely on TrustedFirmware to determine the SoC and pass this information to u-boot via an fdt blob. Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
57 lines
1.6 KiB
C
57 lines
1.6 KiB
C
#ifndef __ASM_ARCH_RMOBILE_H
|
|
#define __ASM_ARCH_RMOBILE_H
|
|
|
|
#if defined(CONFIG_ARCH_RMOBILE)
|
|
#if defined(CONFIG_R8A7740)
|
|
#include <asm/arch/r8a7740.h>
|
|
#elif defined(CONFIG_R8A7790)
|
|
#include <asm/arch/r8a7790.h>
|
|
#elif defined(CONFIG_R8A7791)
|
|
#include <asm/arch/r8a7791.h>
|
|
#elif defined(CONFIG_R8A7792)
|
|
#include <asm/arch/r8a7792.h>
|
|
#elif defined(CONFIG_R8A7793)
|
|
#include <asm/arch/r8a7793.h>
|
|
#elif defined(CONFIG_R8A7794)
|
|
#include <asm/arch/r8a7794.h>
|
|
#elif defined(CONFIG_RCAR_GEN3)
|
|
#include <asm/arch/rcar-gen3-base.h>
|
|
#elif defined(CONFIG_RCAR_GEN4)
|
|
#include <asm/arch/rcar-gen4-base.h>
|
|
#elif defined(CONFIG_R7S72100)
|
|
#elif defined(CONFIG_RZG2L)
|
|
#include <asm/arch/rzg2l.h>
|
|
#else
|
|
#error "SOC Name not defined"
|
|
#endif
|
|
#endif /* CONFIG_ARCH_RMOBILE */
|
|
|
|
/* PRR CPU IDs */
|
|
#define RMOBILE_CPU_TYPE_R8A7740 0x40
|
|
#define RMOBILE_CPU_TYPE_R8A7790 0x45
|
|
#define RMOBILE_CPU_TYPE_R8A7791 0x47
|
|
#define RMOBILE_CPU_TYPE_R8A7792 0x4A
|
|
#define RMOBILE_CPU_TYPE_R8A7793 0x4B
|
|
#define RMOBILE_CPU_TYPE_R8A7794 0x4C
|
|
#define RMOBILE_CPU_TYPE_R8A7795 0x4F
|
|
#define RMOBILE_CPU_TYPE_R8A7796 0x52
|
|
#define RMOBILE_CPU_TYPE_R8A77965 0x55
|
|
#define RMOBILE_CPU_TYPE_R8A77970 0x54
|
|
#define RMOBILE_CPU_TYPE_R8A77980 0x56
|
|
#define RMOBILE_CPU_TYPE_R8A77990 0x57
|
|
#define RMOBILE_CPU_TYPE_R8A77995 0x58
|
|
#define RMOBILE_CPU_TYPE_R8A779A0 0x59
|
|
#define RMOBILE_CPU_TYPE_R8A779F0 0x5A
|
|
#define RMOBILE_CPU_TYPE_R8A779G0 0x5C
|
|
#define RMOBILE_CPU_TYPE_R9A07G044L 0x9A070440
|
|
|
|
#ifndef __ASSEMBLY__
|
|
#include <asm/types.h>
|
|
|
|
const u8 *rzg_get_cpu_name(void);
|
|
u32 rmobile_get_cpu_type(void);
|
|
u32 rmobile_get_cpu_rev_integer(void);
|
|
u32 rmobile_get_cpu_rev_fraction(void);
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif /* __ASM_ARCH_RMOBILE_H */
|