From patchwork Mon Apr 24 01:15:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Siemsen X-Patchwork-Id: 1772505 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=kxGxHmG9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q4S0972hFz23td for ; Mon, 24 Apr 2023 11:16:57 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33CA986124; Mon, 24 Apr 2023 03:15:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="kxGxHmG9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 41A92860D9; Mon, 24 Apr 2023 03:15:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D1F7686119 for ; Mon, 24 Apr 2023 03:15:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ralph.siemsen@linaro.org Received: by mail-qk1-x734.google.com with SMTP id af79cd13be357-74e3de79bf2so248140585a.2 for ; Sun, 23 Apr 2023 18:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682298933; x=1684890933; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jNLEYwwj4cg9YBbJrXD19t6cJZ/ZXDzTcQHYafP6E5E=; b=kxGxHmG9xQVm+W0Yov3KvlJqyfg8FPopN3T4DQlJ2T4FIJo0kSrgT4u6SFYwgD287Q Em1mCmsvoDG18PBOaeKU5pMn2LzwmorNGFHuOHVJ9CqaucTziqwKfoxpSeolRuZ8pXgU kwA9gX+MsNdqSM74Kj11ad0YXIYnLi1nZNSOzDLr8wnf7SG5UKNfCGUvHyyInXRXjxa8 Bgl6PORD7KuU9GYb8E5KwnG6Ch6nQmVcgVUx88lYwfTU3A5KD2GwgH8GjPesG/gllVuM 2XB+kgLFYck1J7v5QlGPTPzQB8/4t+CjX1iK38jIEnol+FJvqpHhUAH/R3qKDtrwzFR1 2GuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682298933; x=1684890933; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jNLEYwwj4cg9YBbJrXD19t6cJZ/ZXDzTcQHYafP6E5E=; b=FEKgP0mb/62LimBnDOWLiJebkjyP1hqpdKbHmBZLB+rw7Zv8Tq9WfesNXWPjGj64fV qC9gGNRMaTQtTMInX0R+R5UZTdIZ3jI2cNDJqnp/hVOGBPLfvIAad2SV2g65JARIEO0p sEOV7PwuBggGvnZ27E5xzUV6taYxGmL9mbfz1YZtGCHiGWHVhbvM8cTXZOJQIkhHnGZU Ew2KopRcTMxEvgFmAcs6q95MhWJ+WBDG6VezoKYWphcaFxc4sO+UClqf1DgwhL3tNX7z e1/iCfdC/zTdpIphzCdPnlNJP3yFWBsG15NniigFtgDFVUcGcqnDRJa4Tbsewc0GawWh 2ObQ== X-Gm-Message-State: AAQBX9eFU33k2xbhSPueD/KdH4RSw0s9l8pGhQrjl+T7vsN1rDJXbHz2 7zXcS9aGqm6dPjzi0grIW5CkWq/tIwO/nFDWLa9miw== X-Google-Smtp-Source: AKy350aQHkNq7+R/+s66hrYPogveFeOxheaUBa6Q2UsCxD3/IWjkOKZ4xOZQ2OxMSyRSiUntanOhBQ== X-Received: by 2002:ac8:588c:0:b0:3ef:3bad:6d22 with SMTP id t12-20020ac8588c000000b003ef3bad6d22mr25423588qta.0.1682298933361; Sun, 23 Apr 2023 18:15:33 -0700 (PDT) Received: from maple.netwinder.org (rfs.netwinder.org. [206.248.184.2]) by smtp.gmail.com with ESMTPSA id z20-20020ac87f94000000b003b635a5d56csm3225447qtj.30.2023.04.23.18.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:15:33 -0700 (PDT) From: Ralph Siemsen To: u-boot@lists.denx.de Cc: Marek Vasut , Ralph Siemsen , Marek Vasut , Nobuhiro Iwamatsu Subject: [PATCH v5 07/10] ARM: rmobile: Add support for Renesas RZ/N1 SoC Date: Sun, 23 Apr 2023 21:15:12 -0400 Message-Id: <20230424011515.1359255-8-ralph.siemsen@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230424011515.1359255-1-ralph.siemsen@linaro.org> References: <20230424011515.1359255-1-ralph.siemsen@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean The RZ/N1 is a family of SoC devices from Renesas, featuring: * ARM Cortex-A7 CPU (single/dual core) and/or Cortex-M3 * Integrated SRAM up to 6MB * Integrated gigabit ethernet switch * Optional DDR2/3 controller * I2C, SPI, UART, NAND, QSPI, SDIO, USB, CAN, RTC, LCD Add basic support for this family, modeled on the existing RZA1. Signed-off-by: Ralph Siemsen --- Changes in v5: - fold mach-rzn1 into mach-rmobile arch/arm/mach-rmobile/Kconfig | 19 +++++++++++++++++++ arch/arm/mach-rmobile/Kconfig.rzn1 | 20 ++++++++++++++++++++ arch/arm/mach-rmobile/cpu_info.c | 8 ++++++++ 3 files changed, 47 insertions(+) create mode 100644 arch/arm/mach-rmobile/Kconfig.rzn1 diff --git a/arch/arm/mach-rmobile/Kconfig b/arch/arm/mach-rmobile/Kconfig index 1ef7d68bdf..3061ccd34c 100644 --- a/arch/arm/mach-rmobile/Kconfig +++ b/arch/arm/mach-rmobile/Kconfig @@ -48,6 +48,24 @@ config RZA1 prompt "Renesas ARM SoCs RZ/A1 (32bit)" select CPU_V7A +config RZN1 + prompt "Renesas ARM SoCs RZ/N1 (32bit)" + select CPU_V7A + select ARMV7_SET_CORTEX_SMPEN if !SPL + select SPL_ARMV7_SET_CORTEX_SMPEN if SPL + select CLK + select CLK_RENESAS + select CLK_R9A06G032 + select DM + select DM_ETH + select DM_SERIAL + select PINCTRL + select PINCONF + select REGMAP + select SYSRESET + select SYSRESET_SYSCON + imply CMD_DM + endchoice config SYS_SOC @@ -56,5 +74,6 @@ config SYS_SOC source "arch/arm/mach-rmobile/Kconfig.32" source "arch/arm/mach-rmobile/Kconfig.64" source "arch/arm/mach-rmobile/Kconfig.rza1" +source "arch/arm/mach-rmobile/Kconfig.rzn1" endif diff --git a/arch/arm/mach-rmobile/Kconfig.rzn1 b/arch/arm/mach-rmobile/Kconfig.rzn1 new file mode 100644 index 0000000000..73138d69f9 --- /dev/null +++ b/arch/arm/mach-rmobile/Kconfig.rzn1 @@ -0,0 +1,20 @@ +if RZN1 + +choice + prompt "Renesas RZ/N1 Board select" + default TARGET_SCHNEIDER_RZN1 + +config TARGET_SCHNEIDER_RZN1 + bool "Schneider RZN1 board" + help + Support the Schneider RZN1D and RZN1S boards, which are based + on the Renesas RZ/N1 SoC. + +endchoice + +config SYS_SOC + default "rzn1" + +source "board/schneider/rzn1-snarc/Kconfig" + +endif diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c index 7e7465a2c8..15be32af31 100644 --- a/arch/arm/mach-rmobile/cpu_info.c +++ b/arch/arm/mach-rmobile/cpu_info.c @@ -31,6 +31,7 @@ void enable_caches(void) #ifdef CONFIG_DISPLAY_CPUINFO #ifndef CONFIG_RZA1 +#ifndef CONFIG_RZN1 __weak const u8 *rzg_get_cpu_name(void) { return 0; @@ -128,6 +129,13 @@ int print_cpuinfo(void) } #else int print_cpuinfo(void) +{ + printf("CPU: Renesas Electronics RZ/N1\n"); + return 0; +} +#endif +#else +int print_cpuinfo(void) { printf("CPU: Renesas Electronics RZ/A1\n"); return 0;