From 1a192f1622c8cdf74ab19011c6a5328b72cfc0b3 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Fri, 17 Dec 2021 13:47:59 -0600 Subject: [PATCH 1/2] arm: rmobile: rzg2_beacon: Migrate reset to SYSRESET_PSCI Instead of a custom cpu_reset function, use the sysreset_psci instead to reduce redundant code clutter. Signed-off-by: Adam Ford --- board/beacon/beacon-rzg2m/beacon-rzg2m.c | 10 ---------- configs/rzg2_beacon_defconfig | 2 ++ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/board/beacon/beacon-rzg2m/beacon-rzg2m.c b/board/beacon/beacon-rzg2m/beacon-rzg2m.c index df6044a429..4b41c6fdaa 100644 --- a/board/beacon/beacon-rzg2m/beacon-rzg2m.c +++ b/board/beacon/beacon-rzg2m/beacon-rzg2m.c @@ -6,7 +6,6 @@ #include #include #include -#include DECLARE_GLOBAL_DATA_PTR; @@ -18,15 +17,6 @@ int board_init(void) return 0; } -#define RST_BASE 0xE6160000 -#define RST_CA57RESCNT (RST_BASE + 0x40) -#define RST_CODE 0xA5A5000F - -void reset_cpu(void) -{ - writel(RST_CODE, RST_CA57RESCNT); -} - #if IS_ENABLED(CONFIG_MULTI_DTB_FIT) int board_fit_config_name_match(const char *name) { diff --git a/configs/rzg2_beacon_defconfig b/configs/rzg2_beacon_defconfig index e1af7b4815..1ae12b1de6 100644 --- a/configs/rzg2_beacon_defconfig +++ b/configs/rzg2_beacon_defconfig @@ -72,6 +72,8 @@ CONFIG_SCIF_CONSOLE=y CONFIG_SPI=y CONFIG_DM_SPI=y CONFIG_RENESAS_RPC_SPI=y +CONFIG_SYSRESET=y +CONFIG_SYSRESET_PSCI=y CONFIG_USB=y CONFIG_USB_XHCI_HCD=y CONFIG_USB_EHCI_HCD=y From 16f4d36c7b8b6aeb0374485acb91afee795ccfc9 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Tue, 11 Jan 2022 07:21:06 -0600 Subject: [PATCH 2/2] arm: dts: rz-g2-beacon-u-boot: Enable pinmux for QSPI When booting from QSPI, the boot ROM appears to mux the QSPI pins, but it's not guaranteed to be setup when booting from eMMC. Fix this by explicitly configuring the pinmux. Signed-off-by: Adam Ford --- arch/arm/dts/rz-g2-beacon-u-boot.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/dts/rz-g2-beacon-u-boot.dtsi b/arch/arm/dts/rz-g2-beacon-u-boot.dtsi index ef0b96a71e..4d17854918 100644 --- a/arch/arm/dts/rz-g2-beacon-u-boot.dtsi +++ b/arch/arm/dts/rz-g2-beacon-u-boot.dtsi @@ -33,12 +33,21 @@ u-boot,dm-pre-reloc; }; +&pfc { + qspi_pins: qspi { + groups = "qspi_ctrl", "qspi_data4"; + function = "qspi"; + }; +}; + &prr { u-boot,dm-pre-reloc; }; &rpc { compatible = "renesas,rcar-gen3-rpc"; + pinctrl-0 = <&qspi_pins>; + pinctrl-names = "default"; num-cs = <1>; spi-max-frequency = <40000000>; #address-cells = <1>;