From patchwork Wed Mar 8 20:26:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Siemsen X-Patchwork-Id: 660469 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp536378wrb; Wed, 8 Mar 2023 13:00:38 -0800 (PST) X-Google-Smtp-Source: AK7set+F4xSN9cIPCrhUmOZhx+gbm/wfoRsRzTnAOcDHC59xV3M8TVxggZdSZV+NSLh381e2sMoZ X-Received: by 2002:a9d:1988:0:b0:694:7da5:d04e with SMTP id k8-20020a9d1988000000b006947da5d04emr1813066otk.19.1678309238732; Wed, 08 Mar 2023 13:00:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678309238; cv=none; d=google.com; s=arc-20160816; b=ylcnxP+x1q+wvIrEInGWtIr86UTwqeuzYAJMb2vIS/d2+IhhUEkkBoAbilisP+snhq S8LaiZ2zO2AuRVVpbv+O6UwB5381RrZ3VQH1jVKHBrexJgIpdiUp15kTS6+j9YKAplQn QvAvracIsLF2j2DlkSVnd+e71ppFmRS2ALLhp/F+FK0LBEitOMCtYLKlzR3oFvhIviqX X+9RFmCJW5pE4O8bMC5GiDMi4mWkVWWnK8L5cX+2bC3xOZY2fL7FoE2fVa46TnRbABl6 Icz6bwfRSf58t1eJI0N0RYRoiqvEHJt7VxfNfwWeHvNLRUjRa/vQ0ksSpLA/gF7j36hc UCNA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=QUm0Yv987rtn2SJz5jjSIkmbL0k8/pea1Sfg5eAqLQw=; b=rmruZt96ESXzShKpQ8PlbFbRra4o7DPgB9qhr1j1Ix1xysOI43jDpzMilT1O3QiXot eW5Sk0sDfY0dzzgRJuDGbNyWyun6EZGbGX9A9L+FzeIjECgOOL2E2M/HOVMNPnlG9rLt xJGDIrUSd40pA4RO1FNwOuCsygFxHA2/tfid6e0Twq72/bPi+44v8rKVEAi8rZHMzPSS 7SGkBcviA1LQcMjLVwz4jOUm9hOrOxUSsAs7/ElIJCEVgv6RtqofCqN+9nHoJfrvv9tq DHtr6jejJ89qtViI1hOvIH87jIR0NjkkvfCy44thT5Yu9WyBC91GCalE6o2BLLsFGb9y hT9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=htBlUvNu; 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 f11-20020a9d7b4b000000b00686a8f60fb9si15609876oto.212.2023.03.08.13.00.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 13:00:38 -0800 (PST) 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=htBlUvNu; 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 482DD85EA5; Wed, 8 Mar 2023 22:00:26 +0100 (CET) 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="htBlUvNu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1116685E8F; Wed, 8 Mar 2023 21:27:10 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) (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 26B1E85D80 for ; Wed, 8 Mar 2023 21:27:04 +0100 (CET) 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-qt1-x830.google.com with SMTP id w23so19500017qtn.6 for ; Wed, 08 Mar 2023 12:27:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678307223; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QUm0Yv987rtn2SJz5jjSIkmbL0k8/pea1Sfg5eAqLQw=; b=htBlUvNulu+Hv6fW+30e4JsSyKV/Azdq+i1X0lKqK+1p8CLUGtbbTzWMzul8d3zC7A Z8B0r3mILV3a2thw5gKMvts66NrNMzbHdcwA2Yi3Oo5lfnrXYH5NCCeETk8OV8nItVPB 1xNefVDxOijcNc5C6LtJpy9RevdVAhFvqvVs0VLd5iFxj9s05zjNT8ADtzt+BaxK7shy Ct4HVG1rJN2O/wydbtTfeOZWtnfyqscZh8e2BGGg/KygBF6QpAn1H+4KQLTQ5TOQX6Gg pUex/RptKLuAh0LPK2pg7ZcW8LLyvr7TzCZ68ldzbC++YyeQ8L9Ot2iLdUfwAdaeC9/u NCJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678307223; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QUm0Yv987rtn2SJz5jjSIkmbL0k8/pea1Sfg5eAqLQw=; b=yITlRAo1+6ji/G4gTg+qUIRFndsjxEvrDXCDEDXptImdAAvXjeyoNUHrPAiBn+INPK o5c3Q3ug1I27a2aNzUxOunpdGMd5m6T5w+p7f9IRA451Z9JqRXM6SbxmXTBypEMRAOfo ddYq5++3661rE/o4zLwCqxOvtwbAWyqOvs89t+7CcSG2DX/Sy97PHYOYt9EroaTpo7gO I5yQITawnOjNBU3BTCPl0p1dx5vsSy00XM/4cw5KJd+BOxykXVkEHQzN9IBUDN8ivo7H D+EZRiy5cxzVtPCt/8wryaF3me6Q7rvSFaqVyQpwTTWr9vSeb/2gfdHO8gFgU4XWIzz2 bNfg== X-Gm-Message-State: AO0yUKUKoXjmQ6aoOGNcZJNsn68G+EGzj3oyJ1mX/usPJmSCWv5n4YEB IkAEN+VeQCGPCJR9dKunF0mnum42jMNzM893e29fhw== X-Received: by 2002:ac8:4904:0:b0:3bd:15d4:ff65 with SMTP id e4-20020ac84904000000b003bd15d4ff65mr22672965qtq.40.1678307222918; Wed, 08 Mar 2023 12:27:02 -0800 (PST) Received: from maple.netwinder.org (rfs.netwinder.org. [206.248.184.2]) by smtp.gmail.com with ESMTPSA id m2-20020ac84442000000b003b86b088755sm12144203qtn.15.2023.03.08.12.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 12:27:02 -0800 (PST) From: Ralph Siemsen To: u-boot@lists.denx.de Cc: Marek Vasut , Ralph Siemsen , Andre Przywara , Andrew Davis , Ashok Reddy Soma , Aswath Govindraju , Bharat Gooty , Bryan Brattlof , Chris Packham , Damien Le Moal , Gowtham Tammana , Hai Pham , Heiko Thiery , Heinrich Schuchardt , Jagan Teki , Jim Liu , =?utf-8?b?SsOpcsO0bWUgQ2FycmV0ZXJv?= , Kever Yang , Leo Yu-Chi Liang , Lukasz Majewski , Marc Kleine-Budde , Marek Vasut , Massimo Pegorer , Max Krummenacher , Michal Simek , Niklas Cassel , Nishanth Menon , =?utf-8?q?Pali_Roh=C3=A1r?= , Philippe Reynes , Rayagonda Kokatanur , Samuel Holland , Sean Anderson , Simon Glass , Steven Lawrance , Sughosh Ganu , Suman Anna , Vignesh Raghavendra , Weijie Gao Subject: [PATCH v4 00/10] Renesas RZ/N1 SoC initial support Date: Wed, 8 Mar 2023 15:26:43 -0500 Message-Id: <20230308202653.1926303-1-ralph.siemsen@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 08 Mar 2023 22:00:24 +0100 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 [1], featuring ARM Cortex-A7 and/or Cortex-M3 CPU, industrial ethernet protocols, integrated Ethernet switch, and numerous peripherals. This is a first step in upstreaming support for the RZ/N1 family. Currently it contains just enough to boot to the u-boot prompt. Additional patches will follow to support flash, SD, USB, Ethernet, etc. This work is based on a vendor-supplied u-boot 2017.01 tree [2], which supports several eval boards, none of which I have access to. Instead development has been done on a Schneider RZN1 board, which is fairly similar to the Renesas RZ/N1D-DB Demo board. [1] https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-mpus/rzn1 [2] https://github.com/renesas-rz/rzn1_u-boot/tree/rzn1-stable Changes in v4: - rebase to u-boot v2023.04-rc3 - remove RFC prefix - cc entire series to Marek by request - clock tables synced with linux (pending patches) - documentation and comment improvements Changes in v3: - many tweaks to clock driver based on reviewer feedback - rebased to u-boot v2023.04-rc2 - reviewer suggestions added to spkgimage.c - many small cleanups, checkpatch, FIXMEs resolved Changes in v2: - rewrote the stand-alone spkg_utility to integrate into mkimage Ralph Siemsen (10): ARM: armv7: add non-SPL enable for Cortex SMPEN clk: renesas: prepare for non-RCAR clock drivers clk: renesas: add R906G032 driver pinctrl: renesas: add R906G032 driver ram: cadence: add driver for Cadence EDAC dts: basic devicetree for Renesas RZ/N1 SoC ARM: rzn1: basic support for Renesas RZ/N1 SoC board: schneider: add RZN1 board support tools: spkgimage: add Renesas SPKG format doc: renesas: add Renesas board docs arch/arm/Kconfig | 17 + arch/arm/Makefile | 1 + arch/arm/cpu/armv7/Kconfig | 5 + arch/arm/dts/r9a06g032-rzn1-snarc-u-boot.dtsi | 23 + arch/arm/dts/r9a06g032-rzn1-snarc.dts | 51 + arch/arm/dts/r9a06g032.dtsi | 226 ++++ arch/arm/mach-rzn1/Kconfig | 32 + arch/arm/mach-rzn1/Makefile | 3 + arch/arm/mach-rzn1/cpu_info.c | 19 + board/schneider/rzn1-snarc/Kconfig | 18 + board/schneider/rzn1-snarc/Makefile | 3 + board/schneider/rzn1-snarc/ddr_timing.c | 140 +++ .../jedec_ddr3_2g_x16_1333h_500_cl8.h | 399 ++++++ board/schneider/rzn1-snarc/rzn1.c | 39 + board/schneider/rzn1-snarc/spkgimage.cfg | 26 + boot/image.c | 1 + configs/rzn1_snarc_defconfig | 21 + doc/board/renesas/index.rst | 9 + doc/board/renesas/renesas.rst | 115 ++ doc/mkimage.1 | 45 + drivers/clk/renesas/Kconfig | 8 +- drivers/clk/renesas/Makefile | 6 +- drivers/clk/renesas/r9a06g032-clocks.c | 1096 +++++++++++++++++ drivers/pinctrl/Makefile | 1 + drivers/pinctrl/renesas/Kconfig | 7 + drivers/pinctrl/renesas/Makefile | 1 + drivers/pinctrl/renesas/pinctrl-rzn1.c | 379 ++++++ drivers/ram/Kconfig | 1 + drivers/ram/Makefile | 2 + drivers/ram/cadence/Kconfig | 12 + drivers/ram/cadence/Makefile | 1 + drivers/ram/cadence/ddr_async.c | 311 +++++ drivers/ram/cadence/ddr_ctrl.c | 414 +++++++ drivers/ram/cadence/ddr_ctrl.h | 175 +++ include/configs/rzn1-snarc.h | 17 + include/dt-bindings/clock/r9a06g032-sysctrl.h | 148 +++ include/dt-bindings/pinctrl/rzn1-pinctrl.h | 141 +++ include/image.h | 1 + tools/Makefile | 1 + tools/spkgimage.c | 330 +++++ tools/spkgimage.h | 87 ++ 41 files changed, 4328 insertions(+), 4 deletions(-) create mode 100644 arch/arm/dts/r9a06g032-rzn1-snarc-u-boot.dtsi create mode 100644 arch/arm/dts/r9a06g032-rzn1-snarc.dts create mode 100644 arch/arm/dts/r9a06g032.dtsi create mode 100644 arch/arm/mach-rzn1/Kconfig create mode 100644 arch/arm/mach-rzn1/Makefile create mode 100644 arch/arm/mach-rzn1/cpu_info.c create mode 100644 board/schneider/rzn1-snarc/Kconfig create mode 100644 board/schneider/rzn1-snarc/Makefile create mode 100644 board/schneider/rzn1-snarc/ddr_timing.c create mode 100644 board/schneider/rzn1-snarc/jedec_ddr3_2g_x16_1333h_500_cl8.h create mode 100644 board/schneider/rzn1-snarc/rzn1.c create mode 100644 board/schneider/rzn1-snarc/spkgimage.cfg create mode 100644 configs/rzn1_snarc_defconfig create mode 100644 doc/board/renesas/index.rst create mode 100644 doc/board/renesas/renesas.rst create mode 100644 drivers/clk/renesas/r9a06g032-clocks.c create mode 100644 drivers/pinctrl/renesas/pinctrl-rzn1.c create mode 100644 drivers/ram/cadence/Kconfig create mode 100644 drivers/ram/cadence/Makefile create mode 100644 drivers/ram/cadence/ddr_async.c create mode 100644 drivers/ram/cadence/ddr_ctrl.c create mode 100644 drivers/ram/cadence/ddr_ctrl.h create mode 100644 include/configs/rzn1-snarc.h create mode 100644 include/dt-bindings/clock/r9a06g032-sysctrl.h create mode 100644 include/dt-bindings/pinctrl/rzn1-pinctrl.h create mode 100644 tools/spkgimage.c create mode 100644 tools/spkgimage.h