From patchwork Fri May 12 20: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: 681216 Delivered-To: patch@linaro.org Received: by 2002:a5d:4a41:0:0:0:0:0 with SMTP id v1csp4141642wrs; Fri, 12 May 2023 13:17:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5P0dFKYa8tlVmlVsdlszWZePYz5jfsHt0Az5IAdG0vMzr6/kDK6sDtfgVcmBE5SyBOy5bC X-Received: by 2002:a17:903:41ca:b0:1aa:d545:462e with SMTP id u10-20020a17090341ca00b001aad545462emr35539396ple.13.1683922677124; Fri, 12 May 2023 13:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683922677; cv=none; d=google.com; s=arc-20160816; b=mLHXg5umD0aWSASG3LmV600zt3kTkrIO1FBWJ6sjnkaUF5UKwx6DJAy/KtaiUnxK+W hsL/SlBk7fHjdEbmR9WzRkCzI7uSxjiQeEYEo8fICfjmrZm7ycTrQp+XB7R6XsNQeZq1 K0gWuzprU7WtSIBP7gFd5gKX56GdaHGYv93gG9RHQczTB/FI3XzSF81DoLGdBbFTFjO7 xwV3+haGM2aLgmZml//wbG2nx6NZAlKAkRJVr66qQiULx071cKWDhK7DZdUk9CzKpSI/ +61hDezRGeELzBoQHQ4cDzxYR8y+Lb1a8wZBK4GHtqj3ZSuPP7by3L3d0QoOsmxZGoN2 WO3g== 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=TLVfbPEIVt3AOyy10+VnrBXA0jBG7cfPVAZF/6cxdJY=; b=L74AqgI7/q95P0bVFoxNqOpQgRmptsXqEo4X0/4Cq2z4LQJ12BfJNRPJvsFWIs9R04 y9mQ7DnHEC8fxGWvSXjoYrEZOFgRA3GaYGOv73JkMljwEPsc19x4S1xGm7DN0sq3ltRZ BnczpVYQWewcznVAtgOaxd7u3BURb3H8hUnkCMoYvmY/eFLItPqUHw+tqzNIKzjDfAE2 Ub6HAwX1GY9pKDC2+/Jh4rhFecL+FdmtGhWt6z5aokUX/vGjcbh0ah6VQvqRnDKo2Zhw KGaC09yH+Fs1TOBTbru+X5+KgKeYGeHrzzgrPUpuS12wdJzz1OVKm2G7rvWAbFAnccqR LRFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IRZiODAW; 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 p4-20020a170902eac400b001a6dba52e52si9948478pld.390.2023.05.12.13.17.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 13:17:57 -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=IRZiODAW; 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 A520D863DB; Fri, 12 May 2023 22:16:30 +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="IRZiODAW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4880D8633D; Fri, 12 May 2023 22:15:37 +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-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (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 67DC18631D for ; Fri, 12 May 2023 22:15:31 +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-xf35.google.com with SMTP id 6a1803df08f44-62135cf0adcso26038186d6.1 for ; Fri, 12 May 2023 13:15:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683922530; x=1686514530; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TLVfbPEIVt3AOyy10+VnrBXA0jBG7cfPVAZF/6cxdJY=; b=IRZiODAW0W9Xth7N8YMHM3AfPBaO6hBuf5Zr0U+sLxqQFTX/wf1XT5Q+iys1eLDK+7 tLvLD1zLU5Bc79jSKIBc89c0ml0tKSk2W/Brrep0hEwwtV3uC0VZFMR1HMehvLYV8QsV b1CPf9ZKgCgqoidn87TKVeYXPHH4HfkY/DV1+F5aim6Ho3jq3R4k4rnYAlYZ/5RpxIeT QqPKd0oNH5RCNBoE32BhSMp7Ij5QovXoU7ZdiJKBd6B5/PM4H65YpZ8pYGH/VmpbzkAn z1ZFd20TZtD0TKgmrhj2aQFYfJ1J65EevY7WRsMr1cq7aMbhmcUy5MhFNKLk1rYZdb3U FXnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683922530; x=1686514530; 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=TLVfbPEIVt3AOyy10+VnrBXA0jBG7cfPVAZF/6cxdJY=; b=JA0nDhjDlUSd3CWOdtKoK+tyQ1RzZEoRnf+naEmqBhSDRvt9RUF9mZLWH9ODqjG/fY DJBS7ysos2nvmwJSHaA1aXFy1r700R7sqX8U4qoXQ89ZS9nMkY+FzjeDJ6Fl0gUIrD3l Gk3kunrnhbbH7H6y7u24B4Ob1WBSBoDSKNnNZo522FMI2ufjZH0C4IpsteoCJY5kxgsp LWgw3uChXHYskMUUIcy9PIHJPUJ+XVTrzhajHXM8v5aEnVxst26go32k29ail6Rubs3f SOdK9awenITFvZnJnC5WdjlZ2xmzqxEt234lK2m/mL09DNf/XO9AIP3DIPVXJvSW9clR VrYQ== X-Gm-Message-State: AC+VfDz5A7YBGccmlq34Ae+OPL/1fJVzFdVbVPBDqHJVom7uEEcPynOg 9XeRlVYdbFZkOaJkkdsvR396id6RBoEw3h6mrY+Ffg== X-Received: by 2002:a05:6214:c21:b0:616:4b40:5ea9 with SMTP id a1-20020a0562140c2100b006164b405ea9mr38702000qvd.40.1683922529834; Fri, 12 May 2023 13:15:29 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 13:15:29 -0700 (PDT) From: Ralph Siemsen To: u-boot@lists.denx.de Cc: Marek Vasut , Ralph Siemsen , Adam Ford , Andrew Davis , Angus Ainslie , Bryan Brattlof , Chris Packham , Emil Renner Berthing , Fabio Estevam , Gowtham Tammana , Hai Pham , Heiko Thiery , Heinrich Schuchardt , 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 , Nobuhiro Iwamatsu , =?utf-8?q?Pali_Roh=C3=A1r?= , Phong Hoang , Roman Kopytin , Safae Ouajih , Sean Anderson , Sebastian Krzyszkowiak , 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: Fri, 12 May 2023 16:15:12 -0400 Message-Id: <20230512201522.2295937-1-ralph.siemsen@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 12 May 2023 22:16:28 +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 v6: - rebase to u-boot v2023.07-rc2 - add R-b tags 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 | 10 +- board/schneider/rzn1-snarc/Kconfig | 18 + board/schneider/rzn1-snarc/Makefile | 3 + board/schneider/rzn1-snarc/rzn1.c | 31 + 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 | 1103 +++++++++++++++++ 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 | 3 + drivers/ram/cadence/Kconfig | 12 + drivers/ram/cadence/Makefile | 1 + drivers/ram/cadence/ddr_ctrl.c | 414 +++++++ drivers/ram/renesas/Makefile | 3 + drivers/ram/renesas/rzn1/Makefile | 3 + drivers/ram/renesas/rzn1/ddr_async.c | 376 ++++++ 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 ++ 44 files changed, 5480 insertions(+), 4 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/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 drivers/ram/renesas/Makefile create mode 100644 drivers/ram/renesas/rzn1/Makefile create mode 100644 drivers/ram/renesas/rzn1/ddr_async.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