From patchwork Fri May 12 20:15:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Siemsen X-Patchwork-Id: 681211 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp4141252wrs; Fri, 12 May 2023 13:16:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Z1nSHxR5wCGEZfUqbL1Bp95VjUWiVjV0XfKXwZ8Cf/pdsfxZVMcap7N+AbPGL7PJMd5UJ X-Received: by 2002:a05:6a20:938f:b0:101:8142:8fe3 with SMTP id x15-20020a056a20938f00b0010181428fe3mr16040252pzh.36.1683922608985; Fri, 12 May 2023 13:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683922608; cv=none; d=google.com; s=arc-20160816; b=AI9GuJlUEaERDo5PUPLqbSkGB+787N6sH5DR0BRMtUYFAyPcfjJkQCXPkWYAruvJO1 afdcoo3FukjTAP3gKG0v+tQkivGjymOld+UvLpBRMVkQbLQWg8QHLKWAngRwayKzJDCg VBnFp7QOrZW2uC/Vh/j8pGdPUqNCfXcMCLvsceT4PVSVsM1OAYNbYgUjR3Px7UBtIbW8 JlKHAlHqKaP7cbt5LQ/gq1KdvV8nOv2Z8UgXB14+3K5bsXiQ1dm2tNZKfC9raldb8+OB +DWsyPXK2IAFPlq/0sgyglj4JLfbQkxYZobE12QJzP+P4RkOh7abhpvHuN4fWpGzUWou 5HaQ== 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=BArU8EMvVHL1yRlXH6El78GJwZmgbrOVO0PRFaTXo2Q=; b=Z4z+D2YJjCtjaGv40Mv7/sSYbA03/pccqnoTX4YwS0qKI83wCVFtzIXmMtKfJD7buf B/NCIQ+03YcVMv9pqj6aOBHiaCtrMsXKjqy0P6XrsWtr+V7y8n9YIBFUrsX53DlpH3E4 Xx7jjawNqt4FzH6RFun9oQRPu2R9/zUHfic9hSZwIhvYDJKN9QkRChJLVL4ep/YNW+ah WNFYL6QhUAoLJdEEiwbf+6Xp1L4CenM60dzXayLckryetz5kAnHlyX5e0uKtowARrKbO gAOgdytywGoqVRKxNwIFQY6jI73JEhmtAXQd6/9lsnJN7f9s1RE/N5MAj9UpxIaRwZ7g V9WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tcXfbXLI; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id 142-20020a630094000000b0053063a32dacsi6583531pga.826.2023.05.12.13.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 13:16:48 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tcXfbXLI; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 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 167AE8638D; Fri, 12 May 2023 22: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="tcXfbXLI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0D0C186342; Fri, 12 May 2023 22: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-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (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 9689786376 for ; Fri, 12 May 2023 22:15:40 +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-x732.google.com with SMTP id af79cd13be357-757731a32ecso382951285a.0 for ; Fri, 12 May 2023 13:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683922539; x=1686514539; 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=BArU8EMvVHL1yRlXH6El78GJwZmgbrOVO0PRFaTXo2Q=; b=tcXfbXLIaJAw6GuqDfLm6mU/XnJyNqm0zfWoP06arUqSrPN9nh7t2oFAUUqyS7QDbh NjLxJYN3VT4hWQ0PvXkY3ffNcmMcX1m6FEBxVoBTnqKAmcrcJEKgQhk9DPNQXwuTFk3Y gmJbRC/+TBoHCvh4khrHmA5LuQRNiBlSkLck+NcsHvqKsogxxb6G07zd7LPy9Q1EYB6Y EPoOyAOI7bk1kQyXULntLTgGWv2NjmdJRMfutIEFf5KfPXYXPgtHSnwzW3CzHaS+iAuA nFuwcZ+ij7SM8pD1d/4qO6ubjOA+zbxUy/lHVL2KIj2clX+YwrjB7pfHDSjlFVnmVV2S fhJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683922539; x=1686514539; 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=BArU8EMvVHL1yRlXH6El78GJwZmgbrOVO0PRFaTXo2Q=; b=L/QWeqtiXYqGFAO7k0JE/2+cZYKFdUPLPQYEPVezob4CeFDuhiBZdwIjbUePps5Ab6 rWLuXdb20IJcR+nU2eTW5RtbJnlsZZwl0zqZFeoiuqMth484ubmV+146O2owlet6Jfo4 S3R5Sg5vQ4QeiwrHWs2qhPjJEOBLhqi9AygTdKBDjorRhUheSVcel26cJBwEoJOB1rf6 10k+nzCoeZqxyfdbrqEkDsQw+FjuYy1yYABoYuR2M3z1jnB3QbrhPiqFYvgmWkx6SUzr 1D5lyW2poVCKCr56wIjqXEoHHs6HKTV9mu+a1BPPc8FgIdEr7UFnvhMNtZ+d4gFvLQDb Fp0Q== X-Gm-Message-State: AC+VfDyjFM6Du+AUyeAfU+mJjK0y9hOzEDnwxbQuG5ebWQnGupBEMyPr nWfIcxESQyOdH3ZDLhk4nG1dVPaCPTQN5pcXLgGZFg== X-Received: by 2002:ad4:5aa1:0:b0:61b:5d38:b736 with SMTP id u1-20020ad45aa1000000b0061b5d38b736mr42239178qvg.35.1683922539370; Fri, 12 May 2023 13:15:39 -0700 (PDT) Received: from maple.netwinder.org (rfs.netwinder.org. [206.248.184.2]) by smtp.gmail.com with ESMTPSA id mi4-20020a056214558400b005ef6557834fsm3183223qvb.62.2023.05.12.13.15.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 13:15:39 -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: Fri, 12 May 2023 16:15:19 -0400 Message-Id: <20230512201522.2295937-8-ralph.siemsen@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230512201522.2295937-1-ralph.siemsen@linaro.org> References: <20230512201522.2295937-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 --- 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 */