From patchwork Fri Nov 27 15:11:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 1407294 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bp.renesas.com Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CjJ5w3y4jz9sRR for ; Sat, 28 Nov 2020 02:12:52 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9C9888274C; Fri, 27 Nov 2020 16:12:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 996D482743; Fri, 27 Nov 2020 16:12:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by phobos.denx.de (Postfix) with ESMTP id 871D582742 for ; Fri, 27 Nov 2020 16:12:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=bp.renesas.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=biju.das.jz@bp.renesas.com X-IronPort-AV: E=Sophos;i="5.78,374,1599490800"; d="scan'208";a="64119589" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 28 Nov 2020 00:12:15 +0900 Received: from localhost.localdomain (unknown [172.29.53.236]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id A0CEE40158F7; Sat, 28 Nov 2020 00:12:11 +0900 (JST) From: Biju Das To: Nobuhiro Iwamatsu , Marek Vasut , Biju Das Cc: Kever Yang , Jagan Teki , Michal Simek , Luka Kovacic , Baruch Siach , Ioana Ciornei , Josip Kelecic , Heiko Stuebner , Parthiban Nallathambi , Fabio Estevam , Lad Prabhakar , u-boot@lists.denx.de, Chris Paterson Subject: [PATCH v7 3/4] arm: rmobile: Add HopeRun HiHope RZ/G2H board support Date: Fri, 27 Nov 2020 15:11:57 +0000 Message-Id: <20201127151158.12230-4-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201127151158.12230-1-biju.das.jz@bp.renesas.com> References: <20201127151158.12230-1-biju.das.jz@bp.renesas.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean The HiHope RZ/G2H board from HopeRun consists of main board (HopeRun HiHope RZ/G2H main board) and sub board(HopeRun HiHope RZ/G2H sub board). The HiHope RZ/G2H sub board sits below the HiHope RZ/G2H main board. DTS files apart from r8a774e1-hihope-rzg2h-u-boot.dts and r8a774e1-u-boot.dtsi have been imported from linux 5.9 commit bbf5c979011a ("Linux 5.9"). This patch adds the required board support to boot HopeRun HiHope RZ/G2H board. Signed-off-by: Biju Das Reviewed-by: Lad Prabhakar --- v6->v7: * No Change. rebased on u-boot-sh/next v6: * New patch --- arch/arm/dts/Makefile | 1 + arch/arm/dts/r8a774e1-hihope-rzg2h-ex.dts | 15 +++++++++++ arch/arm/dts/r8a774e1-hihope-rzg2h-u-boot.dts | 27 +++++++++++++++++++ arch/arm/dts/r8a774e1-hihope-rzg2h.dts | 26 ++++++++++++++++++ arch/arm/dts/r8a774e1-u-boot.dtsi | 25 +++++++++++++++++ arch/arm/mach-rmobile/Kconfig.64 | 1 + board/hoperun/hihope-rzg2/hihope-rzg2.c | 6 ++++- configs/hihope_rzg2_defconfig | 2 +- 8 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/r8a774e1-hihope-rzg2h-ex.dts create mode 100644 arch/arm/dts/r8a774e1-hihope-rzg2h-u-boot.dts create mode 100644 arch/arm/dts/r8a774e1-hihope-rzg2h.dts create mode 100644 arch/arm/dts/r8a774e1-u-boot.dtsi diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index d509f00dc6..1f0d55a982 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -800,6 +800,7 @@ dtb-$(CONFIG_RCAR_GEN3) += \ r8a774a1-beacon-rzg2m-kit.dtb \ r8a774a1-hihope-rzg2m-u-boot.dtb \ r8a774b1-hihope-rzg2n-u-boot.dtb \ + r8a774e1-hihope-rzg2h-u-boot.dtb \ r8a77950-ulcb-u-boot.dtb \ r8a77950-salvator-x-u-boot.dtb \ r8a77960-ulcb-u-boot.dtb \ diff --git a/arch/arm/dts/r8a774e1-hihope-rzg2h-ex.dts b/arch/arm/dts/r8a774e1-hihope-rzg2h-ex.dts new file mode 100644 index 0000000000..265355e0de --- /dev/null +++ b/arch/arm/dts/r8a774e1-hihope-rzg2h-ex.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for the HiHope RZ/G2H sub board + * + * Copyright (C) 2020 Renesas Electronics Corp. + */ + +#include "r8a774e1-hihope-rzg2h.dts" +#include "hihope-rzg2-ex.dtsi" + +/ { + model = "HopeRun HiHope RZ/G2H with sub board"; + compatible = "hoperun,hihope-rzg2-ex", "hoperun,hihope-rzg2h", + "renesas,r8a774e1"; +}; diff --git a/arch/arm/dts/r8a774e1-hihope-rzg2h-u-boot.dts b/arch/arm/dts/r8a774e1-hihope-rzg2h-u-boot.dts new file mode 100644 index 0000000000..03a17bac7e --- /dev/null +++ b/arch/arm/dts/r8a774e1-hihope-rzg2h-u-boot.dts @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source extras for U-Boot for the Hihope RZ/G2H board + * + * Copyright (C) 2020 Renesas Electronics Corp. + */ + +#include "r8a774e1-hihope-rzg2h-ex.dts" +#include "r8a774e1-u-boot.dtsi" + +&gpio3 { + bt_reg_on{ + gpio-hog; + gpios = <13 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "bt-reg-on"; + }; +}; + +&gpio4 { + wlan_reg_on{ + gpio-hog; + gpios = <6 GPIO_ACTIVE_HIGH>; + output-low; + line-name = "wlan-reg-on"; + }; +}; diff --git a/arch/arm/dts/r8a774e1-hihope-rzg2h.dts b/arch/arm/dts/r8a774e1-hihope-rzg2h.dts new file mode 100644 index 0000000000..cdbe527e93 --- /dev/null +++ b/arch/arm/dts/r8a774e1-hihope-rzg2h.dts @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for the HiHope RZ/G2H main board + * + * Copyright (C) 2020 Renesas Electronics Corp. + */ + +/dts-v1/; +#include "r8a774e1.dtsi" +#include "hihope-rev4.dtsi" + +/ { + model = "HopeRun HiHope RZ/G2H main board based on r8a774e1"; + compatible = "hoperun,hihope-rzg2h", "renesas,r8a774e1"; + + memory@48000000 { + device_type = "memory"; + /* first 128MB is reserved for secure area. */ + reg = <0x0 0x48000000 0x0 0x78000000>; + }; + + memory@500000000 { + device_type = "memory"; + reg = <0x5 0x00000000 0x0 0x80000000>; + }; +}; diff --git a/arch/arm/dts/r8a774e1-u-boot.dtsi b/arch/arm/dts/r8a774e1-u-boot.dtsi new file mode 100644 index 0000000000..30c38dcfba --- /dev/null +++ b/arch/arm/dts/r8a774e1-u-boot.dtsi @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source extras for U-Boot on RZ/G2 R8A774E1 SoC + * + * Copyright (C) 2020 Renesas Electronics Corp. + */ + +#include "r8a779x-u-boot.dtsi" + +&extalr_clk { + u-boot,dm-pre-reloc; +}; + +/delete-node/ &can0; +/delete-node/ &can1; +/delete-node/ &canfd; +/delete-node/ &du; +/delete-node/ &hdmi0; +/delete-node/ &rcar_sound; +/delete-node/ &sdhi2; +/delete-node/ &sound_card; + +/ { + /delete-node/ hdmi0-out; +}; diff --git a/arch/arm/mach-rmobile/Kconfig.64 b/arch/arm/mach-rmobile/Kconfig.64 index 18153a809e..56c522596a 100644 --- a/arch/arm/mach-rmobile/Kconfig.64 +++ b/arch/arm/mach-rmobile/Kconfig.64 @@ -95,6 +95,7 @@ config TARGET_HIHOPE_RZG2 bool "HiHope RZ/G2 board" imply R8A774A1 imply R8A774B1 + imply R8A774E1 imply SYS_MALLOC_F imply MULTI_DTB_FIT imply MULTI_DTB_FIT_USER_DEFINED_AREA diff --git a/board/hoperun/hihope-rzg2/hihope-rzg2.c b/board/hoperun/hihope-rzg2/hihope-rzg2.c index 66854bcadc..cb3dcf8db2 100644 --- a/board/hoperun/hihope-rzg2/hihope-rzg2.c +++ b/board/hoperun/hihope-rzg2/hihope-rzg2.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * board/hoperun/hihope-rzg2/hihope-rzg2.c - * This file is HiHope RZ/G2[MN] board support. + * This file is HiHope RZ/G2[HMN] board support. * * Copyright (C) 2020 Renesas Electronics Corporation */ @@ -90,6 +90,10 @@ int board_fit_config_name_match(const char *name) !strcmp(name, "r8a774b1-hihope-rzg2n-u-boot")) return 0; + if (soc_id == SOC_ID_R8A774E1 && + !strcmp(name, "r8a774e1-hihope-rzg2h-u-boot")) + return 0; + return -1; } #endif diff --git a/configs/hihope_rzg2_defconfig b/configs/hihope_rzg2_defconfig index b89bff3584..70a3d43fd9 100644 --- a/configs/hihope_rzg2_defconfig +++ b/configs/hihope_rzg2_defconfig @@ -36,7 +36,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_CONTROL=y -CONFIG_OF_LIST="r8a774a1-hihope-rzg2m-u-boot r8a774b1-hihope-rzg2n-u-boot" +CONFIG_OF_LIST="r8a774a1-hihope-rzg2m-u-boot r8a774b1-hihope-rzg2n-u-boot r8a774e1-hihope-rzg2h-u-boot" CONFIG_MULTI_DTB_FIT_LZO=y CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA=y CONFIG_ENV_OVERWRITE=y