aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/renesas_rpc_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/renesas_rpc_spi.c')
-rw-r--r--drivers/spi/renesas_rpc_spi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/renesas_rpc_spi.c b/drivers/spi/renesas_rpc_spi.c
index 07ff2d2..af1b368 100644
--- a/drivers/spi/renesas_rpc_spi.c
+++ b/drivers/spi/renesas_rpc_spi.c
@@ -140,6 +140,7 @@
#define PRC_PHYCNT_EXDS BIT(21)
#define RPC_PHYCNT_OCT BIT(20)
#define RPC_PHYCNT_STRTIM(v) (((v) & 0x7) << 15)
+#define RPC_PHYCNT_STRTIM2(v) ((((v) & 0x7) << 15) | (((v) & 0x8) << 24))
#define RPC_PHYCNT_WBUF2 BIT(4)
#define RPC_PHYCNT_WBUF BIT(2)
#define RPC_PHYCNT_MEM(v) (((v) & 0x3) << 0)
@@ -212,9 +213,13 @@ static u32 rpc_spi_get_strobe_delay(void)
* 0: On H3 ES1.x (not supported in mainline U-Boot)
* 6: On M3 ES1.x
* 7: On other R-Car Gen3
+ * 15: On R-Car Gen4
*/
if (cpu_type == RMOBILE_CPU_TYPE_R8A7796 && rmobile_get_cpu_rev_integer() == 1)
return RPC_PHYCNT_STRTIM(6);
+ else if (cpu_type == RMOBILE_CPU_TYPE_R8A779F0 ||
+ cpu_type == RMOBILE_CPU_TYPE_R8A779G0)
+ return RPC_PHYCNT_STRTIM2(15);
else
#endif
return RPC_PHYCNT_STRTIM(7);