From patchwork Mon Apr 24 01:15:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Siemsen X-Patchwork-Id: 676489 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp1927401wrs; Sun, 23 Apr 2023 18:37:48 -0700 (PDT) X-Google-Smtp-Source: AKy350bnZ3ezVdMgsMsQth0l5ZEzZRFVEUDPLJcPPXAoIOa/kqLvtNyKX6dQ/fO5Lxu0vmeF+UfY X-Received: by 2002:a05:6a00:1788:b0:63d:3f74:9df7 with SMTP id s8-20020a056a00178800b0063d3f749df7mr17101356pfg.34.1682300268101; Sun, 23 Apr 2023 18:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682300268; cv=none; d=google.com; s=arc-20160816; b=vy+9+fFgYu6r07GZQGKZ42RvdoSHcqrqGoV3dpe+NJf84dP4Zru2ScaIcv2U77DSDU oc0N7PWAq7RMPfP2Sel4UkmVbr29apko357cP/CJKbDQnZ3PsZsmOOTR0V2JxUv6MNOh JJgE3bysXcbqcndbnA6SCUSvwQRrYr9/jl3dAGMHkpnz6zvoCAIW1C/qmo+HbdrQv/ZL zUtpTXKr6CtKp5DCDRJnBWAnm/s6/UPatXcIR7TlrTzxK3PvUAdBXIWYcc4EWNjEu3jX MZ66O+zoqMxiG0QQusvRoJZHaPFOAfEdtfcjbB1tsX/ZuaVQvBfDnk59aFu0DdOWPN3v w7/w== 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=Qz1G8ObPz2qsi+VJ7gZUQIhXG3HMgM+qRQWS7yOG9ew=; b=KGVgPtzBE+2TEu8lMDLrdSqY1Ihlg+qVZucgljmrY9K07+llgltG87LQps90gNKRDn GycdCshxz7Q7lo8tjCqpd9rFgTA3sROSMAv59gYZ7yGFR1qF+DXSEQvJFweaJD6Cat8x M/Ff23ZHybUZi92G8eUBbshV8CR9B87m6TLyJcq0x5xlvdemrecQPcm4b7SZT7kiVF6y 6gWN+uAElTAyBh9tEKblUdWYBplRfNpkokM75FOJxrKjomOjVGb0PQDkTLDxyG67emeJ 68uB8cxY9VsLaaGNGSQ9nH5TBeK0+yKMiTN2aguj6WV7OEADoMdRW/MegXBZXEH4G+1Z z91A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UVwNL/TX"; 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 s8-20020aa78bc8000000b0063c29725444si9921735pfd.347.2023.04.23.18.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:37: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="UVwNL/TX"; 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 83C3C85FE5; Mon, 24 Apr 2023 03:37:42 +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="UVwNL/TX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C62098610E; Mon, 24 Apr 2023 03:15:31 +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-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (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 651D1860D9 for ; Mon, 24 Apr 2023 03:15:27 +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-qt1-x82a.google.com with SMTP id d75a77b69052e-3f0596e2c00so2690891cf.3 for ; Sun, 23 Apr 2023 18:15:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1682298926; x=1684890926; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Qz1G8ObPz2qsi+VJ7gZUQIhXG3HMgM+qRQWS7yOG9ew=; b=UVwNL/TXsLgjw1Y/uFddFyLG1qhISLy9qxx2x/B1awZa4DWsiAUFvCc1zg8NFJqfl0 ACib1+FbJV/2zZe4PcJFSwzgkNOtf5xiZrTpyD6yrCq9oBH4c8HWSWMjDNWJmB8EthOU vSKkxt4/xljvTcXmx98qqermNNBrM1pbduvPArsahl3ljHb0aAR6sew0kEkPaHtFi2qM /OaqjYBik+Ycs+QOKHCFY+7pLVnx8uVFTYXkMaM74OQJzn/2Q4D8WQSdU57w9m0r9t1D ywL8uotX/mQx2Uj3Azfhs6/hT7L3SLJ9B8BwuJUhV5FKVQeb/DnKnuEewd/tJTgJIIg+ 8l/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682298926; x=1684890926; 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=Qz1G8ObPz2qsi+VJ7gZUQIhXG3HMgM+qRQWS7yOG9ew=; b=MPim2zIeMkymPcLD5P+fguo0aLvDM89cPJy5/DBW0l8ChRpD9IzcUFEx0N5tTQ7UPS 4oI6I4Q+oKjUHFbxpdwvWeczXGc0v0YHC8+5Ms5hP4aNKIaSUZejfNYM9uILBuDfkSRB DjYwtm0S71FDHw2Ybqdz4kyLO9tZH9ra0YSRbnucOXbSPK9QgFMuIEsuOAULbwR7X7wS +TKR/29kzsf6393m7nBUkRF3nN7wq55hcb2x2r8sXdLxhQ6bpFcxW8BpbmLja69BvU5F 0LVk+uDEW6CMLpnQFckz6GixDyV2UOiCjqgEasA8c/WfnTezgf6yXyGz5+WCh7OIBrmO 61oQ== X-Gm-Message-State: AAQBX9fDaON2vj6/RjGXZhgXliV6AI8X8WJsCgeBm+XZQd6P7gmb5gnK bUSLCmuFwbQgtsLzXsWTyLHIFsHv2cPHMDeWO9AMCA== X-Received: by 2002:a05:622a:1341:b0:3e4:e6a8:89ed with SMTP id w1-20020a05622a134100b003e4e6a889edmr22156766qtk.62.1682298925743; Sun, 23 Apr 2023 18:15:25 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:15:25 -0700 (PDT) From: Ralph Siemsen To: u-boot@lists.denx.de Cc: Marek Vasut , Ralph Siemsen , Adam Ford , Andrew Davis , Angus Ainslie , Aswath Govindraju , Bryan Brattlof , Chris Packham , Emil Renner Berthing , Fabio Estevam , Hai Pham , Heiko Thiery , Heinrich Schuchardt , Ilias Apalodimas , Jagan Teki , Jianlong Huang , Jim Liu , Kever Yang , Kuan Lim Lee , LUU HOAI , Lukasz Majewski , Marc Kleine-Budde , Marek Vasut , Marek Vasut , Massimo Pegorer , Mattijs Korpershoek , Max Krummenacher , Nishanth Menon , Nobuhiro Iwamatsu , =?utf-8?q?Pali_Roh=C3=A1r?= , Phong Hoang , Roman Kopytin , Safae Ouajih , Sean Anderson , Simon Glass , Steven Lawrance , Sughosh Ganu , Suman Anna , Takeshi Kihara , Tim Harvey , Weijie Gao , Yanhong Wang Subject: [PATCH v5 00/10] Renesas RZ/N1 SoC initial support Date: Sun, 23 Apr 2023 21:15:05 -0400 Message-Id: <20230424011515.1359255-1-ralph.siemsen@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 24 Apr 2023 03:37:40 +0200 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 v5: - rebase to u-boot v2023.04-1037-gb646e1f69f - many small changes in response to reviewer comments - move rzn1 into mach-rmobile (similar to existing rza1) - move board-specific DDR init to board dir 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 R-Car clock drivers clk: renesas: add R906G032 driver pinctrl: renesas: add R906G032 driver ram: cadence: add driver for Cadence EDAC ARM: dts: add devicetree for Renesas RZ/N1 SoC ARM: rmobile: Add 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/cpu/armv7/Kconfig | 5 + arch/arm/dts/r9a06g032-ddr.dtsi | 512 ++++++++ arch/arm/dts/r9a06g032-rzn1-snarc-u-boot.dtsi | 23 + arch/arm/dts/r9a06g032-rzn1-snarc.dts | 92 ++ arch/arm/dts/r9a06g032.dtsi | 477 +++++++ arch/arm/mach-rmobile/Kconfig | 19 + arch/arm/mach-rmobile/Kconfig.rzn1 | 20 + arch/arm/mach-rmobile/cpu_info.c | 8 + board/schneider/rzn1-snarc/Kconfig | 18 + board/schneider/rzn1-snarc/Makefile | 3 + board/schneider/rzn1-snarc/ddr_async.c | 377 ++++++ board/schneider/rzn1-snarc/rzn1.c | 40 + board/schneider/rzn1-snarc/spkgimage.cfg | 26 + boot/image.c | 1 + configs/rzn1_snarc_defconfig | 24 + doc/board/index.rst | 1 + doc/board/renesas/index.rst | 10 + doc/board/renesas/renesas.rst | 45 + doc/board/renesas/rzn1.rst | 77 ++ doc/mkimage.1 | 45 + drivers/clk/renesas/Kconfig | 15 +- drivers/clk/renesas/Makefile | 3 +- drivers/clk/renesas/r9a06g032-clocks.c | 1091 +++++++++++++++++ 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_ctrl.c | 414 +++++++ include/configs/rzn1-snarc.h | 13 + include/dt-bindings/clock/r9a06g032-sysctrl.h | 149 +++ include/dt-bindings/pinctrl/rzn1-pinctrl.h | 141 +++ include/image.h | 1 + include/renesas/ddr_ctrl.h | 175 +++ include/renesas/is43tr16256a_125k_CTL.h | 419 +++++++ .../renesas/jedec_ddr3_2g_x16_1333h_500_cl8.h | 399 ++++++ tools/Makefile | 1 + tools/renesas_spkgimage.c | 338 +++++ tools/renesas_spkgimage.h | 87 ++ 42 files changed, 5471 insertions(+), 2 deletions(-) create mode 100644 arch/arm/dts/r9a06g032-ddr.dtsi 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-rmobile/Kconfig.rzn1 create mode 100644 board/schneider/rzn1-snarc/Kconfig create mode 100644 board/schneider/rzn1-snarc/Makefile create mode 100644 board/schneider/rzn1-snarc/ddr_async.c 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 doc/board/renesas/rzn1.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_ctrl.c 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 include/renesas/ddr_ctrl.h create mode 100644 include/renesas/is43tr16256a_125k_CTL.h create mode 100644 include/renesas/jedec_ddr3_2g_x16_1333h_500_cl8.h create mode 100644 tools/renesas_spkgimage.c create mode 100644 tools/renesas_spkgimage.h