From patchwork Sat May 13 01:36:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Siemsen X-Patchwork-Id: 681592 Delivered-To: patch@linaro.org Received: by 2002:adf:fd8f:0:0:0:0:0 with SMTP id d15csp62628wrr; Fri, 12 May 2023 18:38:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ49LlKWRS3AzqvTBdzdukAQraXxO23u3S0B8HnaJ5uDFmh56RwbAb0dwF2qggTFi2dRRgi0 X-Received: by 2002:a17:902:d502:b0:1ac:7aa1:c7bf with SMTP id b2-20020a170902d50200b001ac7aa1c7bfmr22995100plg.60.1683941932845; Fri, 12 May 2023 18:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683941932; cv=none; d=google.com; s=arc-20160816; b=NcRZaLboUkB+w/D1WHKKTf54o/9y+cEjOneFVDek8oeFbZ9F+XCdGKb/kSfqRpTaQU kj9teb2gi06ljZ5gH6HdgUr5UOw4+m00Qa80ThHFzPBpfgcEsx5auNOULIgXWm6sGZ/o nqruNoqH+DTk5HpXqQh4pRScLyk2gCP01clWA7Q6rCYTxYCgGlvqhOnsjYlu4LhhUm5G l/KVdf0vVM8CnWmKootY9xqtQ4EX/aB3T4I6fbD43Fi+X0dsMQCo0oQ3ne/wOX+cYwFi 7elqVKTmeBR6rvge8arkZME3kqnRCVqf+2HTqKCKvWt/Bfj8FY/tZXSljg/bN2GWMPOK E0Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zl9WCrwamdf3IiVWz0m9cUBZ8esyBTZFarkC1AWPMzE=; b=gaY8IN7MHxv1KdpDFwVYCPcKWohTXWWDblf2JIXnFAYVcdeMSCXu4hVdfB4n5xomuv Yepdbv6PDhGkMc6sQYraxvbDPLv5BTYnU8vxAMSXrT2TIVrLpKTa+QSKQcwEAUnLuRCC vCmDG3AsLm83jr0S/YUaNhBqhkLmHCFdktl2SUz1B/O07zthlD2s4lmqlLKEAS5Bgxlc zc9XhYEKP0a22eGVnsDSc/nOvOZ6T4RkdNCNYnil4RROBDko2tEtEMeIwmtFrf/pssRQ pAEI8cVCeXVemPQjw6+NzLQynBqt//ghzlxo+3q+aMm++tbuIK7wCCuEPljje9pKTkZ2 J+Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fBMilSx1; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id p27-20020a63951b000000b00530b6949dcdsi146946pgd.218.2023.05.12.18.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 18:38:52 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fBMilSx1; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8044D86376; Sat, 13 May 2023 03:37:29 +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="fBMilSx1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 95A7286207; Sat, 13 May 2023 03:37:19 +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-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) (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 8D9408622F for ; Sat, 13 May 2023 03:37:12 +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-qv1-xf33.google.com with SMTP id 6a1803df08f44-5ed99ebe076so92940896d6.2 for ; Fri, 12 May 2023 18:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683941831; x=1686533831; 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=zl9WCrwamdf3IiVWz0m9cUBZ8esyBTZFarkC1AWPMzE=; b=fBMilSx1ZeztlyGCklZGeepNN63Z0j+aCex7/drtEGUr/gRWSL4gRV+lbKpRPuaPSi N4uuGaIV5VVsdWTohWirQ64rciwz3oPCyeRynUxndC3hX5ugY0phJgBX2esioAEXmAGc houClRqpjv7orGUF1jMMT3w+xmFS1f0Y3q0kZFfhRfpMXCOJyfml3hA/mdbxsgmFI/K1 R6VqTn1/ktfsB03Ibsnz8gXkzpERiQR71te22dViuSq3rnxDHiCED6ZGGsQQjpzT8UlQ eq6mgU0Ve/EOXLhzk4mM2PPEUzwkIwpts/0glKDoub3N52cTRP/1c5mp8Y0YCB5W9B9e 5L9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683941831; x=1686533831; 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=zl9WCrwamdf3IiVWz0m9cUBZ8esyBTZFarkC1AWPMzE=; b=av95Kg5dFWElGt1Hv3P7L2WilZWjdmbAt2bw9fZsw8+7PkBXcqwGzYgKR2OFEYWb25 khQgIHlu2cNfE5hPSzHKtFmtC0kFGIMv7RyxQp4WT8hlMramrbXtalOwFm0KN59Dgz9/ r6eSKGLcF/TdHPez4wUy8hjIo2Qjq6rTEiUc94EZ8CRK1IEjIzryoNqGFXN2BWHJBwB6 FB6OTBO0Dy1TG6MrHcHOZyVz4GsUR1EE8xiTkwLPT7sHG1meDcJrAP7j7TNn7ApnrXhj Xp/OfN8GmGc39MSXqbp9vGAycCOkZpzxyk/FZsaPLcyWZ/VDn7eyfCn2Xt4ra2hkua3q BrEA== X-Gm-Message-State: AC+VfDytikGU/mNzMNacSFT8+ck2ATZvOKXTO/0aWmXL3M3ATjPzj3XQ aR3uke5e+qk3hh5ThJSrm2ZqP44qTksSDZK9n5Pgwg== X-Received: by 2002:a05:6214:c86:b0:621:26de:2ca6 with SMTP id r6-20020a0562140c8600b0062126de2ca6mr27890932qvr.35.1683941831379; Fri, 12 May 2023 18:37:11 -0700 (PDT) Received: from maple.netwinder.org (rfs.netwinder.org. [206.248.184.2]) by smtp.gmail.com with ESMTPSA id fi19-20020a0562141a5300b0061b608dc4c1sm3379399qvb.94.2023.05.12.18.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 18:37:11 -0700 (PDT) From: Ralph Siemsen To: u-boot@lists.denx.de Cc: Marek Vasut , Ralph Siemsen , Marek Vasut , Nobuhiro Iwamatsu Subject: [PATCH v7 07/10] ARM: rmobile: Add support for Renesas RZ/N1 SoC Date: Fri, 12 May 2023 21:36:55 -0400 Message-Id: <20230513013658.2330651-8-ralph.siemsen@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230513013658.2330651-1-ralph.siemsen@linaro.org> References: <20230513013658.2330651-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 Reviewed-by: Marek Vasut --- (no changes since v6) Changes in v6: - make the #ifdef a bit clearer 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 | 10 ++++++++-- 3 files changed, 47 insertions(+), 2 deletions(-) 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..71a856ea87 100644 --- a/arch/arm/mach-rmobile/cpu_info.c +++ b/arch/arm/mach-rmobile/cpu_info.c @@ -30,7 +30,7 @@ void enable_caches(void) #endif #ifdef CONFIG_DISPLAY_CPUINFO -#ifndef CONFIG_RZA1 +#if !defined(CONFIG_RZA1) && !defined(CONFIG_RZN1) __weak const u8 *rzg_get_cpu_name(void) { return 0; @@ -126,11 +126,17 @@ int print_cpuinfo(void) return 0; } -#else +#elif defined(CONFIG_RZA1) int print_cpuinfo(void) { printf("CPU: Renesas Electronics RZ/A1\n"); return 0; } +#else /* CONFIG_RZN1 */ +int print_cpuinfo(void) +{ + printf("CPU: Renesas Electronics RZ/N1\n"); + return 0; +} #endif #endif /* CONFIG_DISPLAY_CPUINFO */