ARM: renesas: Add R8A779F0 S4 Spider board code

Add board code for R8A779F0 S4 Spider board.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Synchronize configuration symbols which are now switched to Kconfig
        Mallocate gd->bd->bi_boot_params, i.e. drop the assignment
	Sort headers, use clrbits_le32(), use BIT macros where appropriate
	Use CONFIG_SYS_CLK_FREQ for counter frequency instead of custom macro]
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 0fdc818..3e378e8 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1047,7 +1047,8 @@
 	r8a77995-draak-u-boot.dtb
 
 dtb-$(CONFIG_RCAR_GEN4) += \
-	r8a779a0-falcon-u-boot.dtb
+	r8a779a0-falcon-u-boot.dtb \
+	r8a779f0-spider-u-boot.dtb
 
 ifdef CONFIG_RCAR_64
 DTC_FLAGS += -R 4 -p 0x1000
diff --git a/arch/arm/dts/r8a779f0-spider-u-boot.dts b/arch/arm/dts/r8a779f0-spider-u-boot.dts
new file mode 100644
index 0000000..26fc8bc
--- /dev/null
+++ b/arch/arm/dts/r8a779f0-spider-u-boot.dts
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source extras for U-Boot for the Spider board
+ *
+ * Copyright (C) 2021 Renesas Electronics Corp.
+ */
+
+#include "r8a779f0-spider.dts"
+#include "r8a779f0-u-boot.dtsi"
+
+/ {
+	aliases {
+		spi0 = &rpc;
+	};
+};
+
+&pfc {
+	qspi0_pins: qspi0 {
+		groups = "qspi0_ctrl", "qspi0_data4";
+		function = "qspi0";
+	};
+};
+
+&rpc {
+	pinctrl-0 = <&qspi0_pins>;
+	pinctrl-names = "default";
+
+	#address-cells = <1>;
+	#size-cells = <0>;
+	spi-max-frequency = <40000000>;
+	status = "okay";
+
+	spi-flash@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "s25fs512s", "jedec,spi-nor";
+		reg = <0>;
+		spi-tx-bus-width = <1>;
+		spi-rx-bus-width = <1>;
+		spi-max-frequency = <40000000>;
+	};
+};
diff --git a/arch/arm/mach-rmobile/Kconfig.rcar4 b/arch/arm/mach-rmobile/Kconfig.rcar4
index ad9fc3a..2627916 100644
--- a/arch/arm/mach-rmobile/Kconfig.rcar4
+++ b/arch/arm/mach-rmobile/Kconfig.rcar4
@@ -26,8 +26,15 @@
 	help
           Support for Renesas R-Car Gen3 Falcon platform
 
+config TARGET_SPIDER
+	bool "Spider board"
+	imply R8A779F0
+	help
+	  Support for Renesas R-Car Gen4 Spider platform
+
 endchoice
 
 source "board/renesas/falcon/Kconfig"
+source "board/renesas/spider/Kconfig"
 
 endif