From patchwork Sat May 13 13:57:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 762008 X-Patchwork-Delegate: iwamatsu@nigauri.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wQ7wf42jjz9s7r for ; Sun, 14 May 2017 00:08:18 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NWM+YKR4"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id 3E261C2204B; Sat, 13 May 2017 14:05:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 6B3CBC22141; Sat, 13 May 2017 13:59:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A48B5C220A5; Sat, 13 May 2017 13:59:39 +0000 (UTC) Received: from mail-oi0-f68.google.com (mail-oi0-f68.google.com [209.85.218.68]) by lists.denx.de (Postfix) with ESMTPS id ADAFAC220C3 for ; Sat, 13 May 2017 13:58:47 +0000 (UTC) Received: by mail-oi0-f68.google.com with SMTP id w138so12744054oiw.3 for ; Sat, 13 May 2017 06:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lQq2TznPP3y8cGRN5XEnB2FWk7QhYZjoUsvFmU6gip4=; b=NWM+YKR4UDfqHpdzmW6kY0eIQRVZTIqyVSyxeisBpMSOhnFe9Slj/4RWDGtMnELofR b+g+xzoV7CI0gMONJkb6HJgn1e3imYHhQAYRzLPRx4WOtlxjX5u76lmFD89uRD7BjJNz rSyd5c40SubEz3yk4JoRbk5jqUrABki+DoDX0Oo4dqRYiSQ4KTYy2A/WjzeWdAlnTjhb c2BwArC9FT3GS659KPLD/O8p0bkyTGjx5SrK4V2jjB8JAMuZw/yj5LKy5qgGMUBOalx0 g9Rr6zA4PrxJ6LH33rr48cFfPJ4psuwYaohM05cYSOuMcC25Z9PYMlPkeRQVl8GTJdz5 Fs8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lQq2TznPP3y8cGRN5XEnB2FWk7QhYZjoUsvFmU6gip4=; b=URlJBmht9JYpVnxeK+IJK1vQtqwGHczVacuhdWnKUQMjS1fVpgZBp0zUqtQgWtNolj LwuvoyhOTUY4jU+wmRP3SBqfeS0u9a+EsoAu4jeXFwXrxkTGF3Gr9RJqEK/xjzOBnk9K EkLFAR9/VG5Lz5iZKNfDEOJXUl4LpUH/6TCfcu0Zz4PqxXIQFidCZUQ5UAPeOgIudjo/ rYgAzfVoSAPk9B2Gar5sSW+ENovJRXIXgz09Iar8EYxmVkui1PR0zsdFqquxWNfUzBSr 4LDCs4lOPSSABapkz9qQZxuQEKNIK3GrcflYooHpy/zKdQgPyY0vGjmqzyJI5OG8bnQA FHRw== X-Gm-Message-State: AODbwcAJMqU8ZSw2mHLRNN739jvogjuPYq28JgR6v5HkFiolVO6cZwtD IG0LOIfuoqXL/g== X-Received: by 10.202.204.12 with SMTP id c12mr4456996oig.162.1494683926605; Sat, 13 May 2017 06:58:46 -0700 (PDT) Received: from kurokawa.lan ([195.140.253.167]) by smtp.gmail.com with ESMTPSA id r203sm2946858oif.15.2017.05.13.06.58.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 May 2017 06:58:46 -0700 (PDT) From: Marek Vasut X-Google-Original-From: Marek Vasut To: u-boot@lists.denx.de Date: Sat, 13 May 2017 15:57:53 +0200 Message-Id: <20170513135753.8478-23-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170513135753.8478-1-marek.vasut+renesas@gmail.com> References: <20170513135753.8478-1-marek.vasut+renesas@gmail.com> Cc: Hiroyuki Yokoyama , Marek Vasut Subject: [U-Boot] [PATCH 23/23] ARM: rmobile: salvator-x: Add R8A7796 support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add minor ifdeffery and default board config for the Salvator-XS board with R8A7796 M3 SoC. Signed-off-by: Marek Vasut Cc: Hiroyuki Yokoyama Cc: Nobuhiro Iwamatsu --- board/renesas/salvator-x/MAINTAINERS | 1 + board/renesas/salvator-x/salvator-x.c | 28 ++++++++++++++++++++++++++-- configs/r8a7796_salvator-x_defconfig | 31 +++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 configs/r8a7796_salvator-x_defconfig diff --git a/board/renesas/salvator-x/MAINTAINERS b/board/renesas/salvator-x/MAINTAINERS index 33c105d0cc..f7b98fb097 100644 --- a/board/renesas/salvator-x/MAINTAINERS +++ b/board/renesas/salvator-x/MAINTAINERS @@ -4,3 +4,4 @@ S: Maintained F: board/renesas/salvator-x/ F: include/configs/salvator-x.h F: configs/r8a7795_salvator-x_defconfig +F: configs/r8a7796_salvator-x_defconfig diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c index 14385d7361..6270de4e40 100644 --- a/board/renesas/salvator-x/salvator-x.c +++ b/board/renesas/salvator-x/salvator-x.c @@ -1,6 +1,6 @@ /* * board/renesas/salvator-x/salvator-x.c - * This file is Salvator-X board support. + * This file is Salvator-X/Salvator-XS board support. * * Copyright (C) 2015-2017 Renesas Electronics Corporation * Copyright (C) 2015 Nobuhiro Iwamatsu @@ -98,14 +98,20 @@ int board_init(void) gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000; /* Init PFC controller */ +#if defined(CONFIG_R8A7795) r8a7795_pinmux_init(); +#elif defined(CONFIG_R8A7796) + r8a7796_pinmux_init(); +#endif +#if defined(CONFIG_R8A7795) /* GSX: force power and clock supply */ writel(0x0000001F, SYSC_PWRONCR2); while (readl(SYSC_PWRSR2) != 0x000003E0) mdelay(20); mstp_clrbits_le32(MSTPSR1, SMSTPCR1, GSX_MSTP112); +#endif /* USB1 pull-up */ setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN); @@ -134,6 +140,7 @@ int board_init(void) /* IPSR3 */ gpio_request(GPIO_FN_AVB_AVTP_CAPTURE_B, NULL); +#if defined(CONFIG_R8A7795) /* USB2_OVC */ gpio_request(GPIO_GP_6_15, NULL); gpio_direction_input(GPIO_GP_6_15); @@ -142,7 +149,7 @@ int board_init(void) gpio_request(GPIO_GP_6_14, NULL); gpio_direction_output(GPIO_GP_6_14, 1); gpio_set_value(GPIO_GP_6_14, 1); - +#endif /* AVB_PHY_RST */ gpio_request(GPIO_GP_2_10, NULL); gpio_direction_output(GPIO_GP_2_10, 0); @@ -200,7 +207,13 @@ int board_mmc_init(bd_t *bis) gpio_request(GPIO_GFN_SD2_DAT2, NULL); gpio_request(GPIO_GFN_SD2_DAT3, NULL); gpio_request(GPIO_GFN_SD2_CLK, NULL); +#if defined(CONFIG_R8A7795) gpio_request(GPIO_GFN_SD2_CMD, NULL); +#elif defined(CONFIG_R8A7796) + gpio_request(GPIO_FN_SD2_CMD, NULL); +#else +#error Only R8A7795 and R87796 is supported +#endif gpio_request(GPIO_GP_5_3, NULL); gpio_request(GPIO_GP_5_9, NULL); gpio_direction_output(GPIO_GP_5_3, 0); /* 1: 3.3V, 0: 1.8V */ @@ -211,6 +224,7 @@ int board_mmc_init(bd_t *bis) if (ret) return ret; +#if defined(CONFIG_R8A7795) /* SDHI3 */ gpio_request(GPIO_GFN_SD3_DAT0, NULL); /* GP_4_9 */ gpio_request(GPIO_GFN_SD3_DAT1, NULL); /* GP_4_10 */ @@ -218,6 +232,16 @@ int board_mmc_init(bd_t *bis) gpio_request(GPIO_GFN_SD3_DAT3, NULL); /* GP_4_12 */ gpio_request(GPIO_GFN_SD3_CLK, NULL); /* GP_4_7 */ gpio_request(GPIO_GFN_SD3_CMD, NULL); /* GP_4_8 */ +#elif defined(CONFIG_R8A7796) + gpio_request(GPIO_FN_SD3_DAT0, NULL); /* GP_4_9 */ + gpio_request(GPIO_FN_SD3_DAT1, NULL); /* GP_4_10 */ + gpio_request(GPIO_FN_SD3_DAT2, NULL); /* GP_4_11 */ + gpio_request(GPIO_FN_SD3_DAT3, NULL); /* GP_4_12 */ + gpio_request(GPIO_FN_SD3_CLK, NULL); /* GP_4_7 */ + gpio_request(GPIO_FN_SD3_CMD, NULL); /* GP_4_8 */ +#else +#error Only R8A7795 and R87796 is supported +#endif /* IPSR10 */ gpio_request(GPIO_FN_SD3_CD, NULL); gpio_request(GPIO_FN_SD3_WP, NULL); diff --git a/configs/r8a7796_salvator-x_defconfig b/configs/r8a7796_salvator-x_defconfig new file mode 100644 index 0000000000..d6f1840eab --- /dev/null +++ b/configs/r8a7796_salvator-x_defconfig @@ -0,0 +1,31 @@ +CONFIG_ARM=y +CONFIG_ARCH_RMOBILE=y +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_RCAR_GEN3=y +CONFIG_TARGET_SALVATOR_X=y +CONFIG_DEFAULT_FDT_FILE=r8a7796-salvator-x.dtb +CONFIG_VERSION_VARIABLE=y +CONFIG_CMD_BOOTZ=y +CONFIG_CMD_FDT=y +CONFIG_R8A7796=y +CONFIG_SH_SDHI=y +# CONFIG_CMD_IMLS is not set +CONFIG_CMD_EDITENV=y +CONFIG_CMD_SAVEENV=y +CONFIG_CMD_NET=y +CONFIG_CMD_NFS=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_USB=y +CONFIG_USB=y +CONFIG_USB_HOST=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_STORAGE=y +CONFIG_USB_EHCI_RCAR_GEN3=y +CONFIG_DOS_PARTITION=y +CONFIG_MMC=y +CONFIG_GENERIC_MMC=y +CONFIG_OF_LIBFDT=y +CONFIG_DM_ETH=y +CONFIG_RENESAS_RAVB=y