Renesas RZ/N1 SoC initial support
Subsystems (7)
v5 cover Renesas RZ/N1 SoC initial support
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
Signature · 1 line
2.25.1
PATCH v5 1/10 ARM: armv7: add non-SPL enable for Cortex SMPEN
Commit 2564fce7eea3 ("sunxi: move Cortex SMPEN setting into start.S") added SPL_ARMV7_SET_CORTEX_SMPEN to enable setting SMP bit. For platforms not using SPL boot, add the corresponding non-SPL config, so that CONFIG_IS_ENABLED(ARMV7_SET_CORTEX_SMPEN) works as expected.
---
This will be used by the following commit that adds RZ/N1 support.
(no changes since v5)
Changes in v5:
- add R-b tag
arch/arm/cpu/armv7/Kconfig | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/cpu/armv7/Kconfig +5 -0
@@ -107,6 +107,11 @@ config ARMV7_LPAE Say Y here to use the long descriptor page table format. This is required if U-Boot runs in HYP mode. +config ARMV7_SET_CORTEX_SMPEN + bool + help + Enable the ARM Cortex ACTLR.SMP enable bit in U-boot. + config SPL_ARMV7_SET_CORTEX_SMPEN bool help
Signature · 1 line
2.25.1
PATCH v5 2/10 clk: renesas: prepare for non R-Car clock drivers
In reply to Ralph SiemsenAdd new CONFIG_CLK_RCAR to control compilation of shared code for R-Car clock drivers (renesas-cpg-mssr.c). Enable this for R-Car Gen2 and 3.
This is necessary so that CONFIG_CLK_RENESAS can be enabled, allowing recursion into the drivers/clk/reneasas directory, without bringing in the R-Car support code. The support code contains platform specific access (TMU_BASE) which is not needed on other Renesas devices such as RZ/N1.
---
(no changes since v5)
Changes in v5:
- add symbol CONFIG_CLK_RCAR and select it for R-Car Gen2/3.
- use this to control compilation of renesas-cpg-mssr.c, rather than CONFIG_CLK_RENESAS which also controls directory recursion.
- update the commit message accordingly
Changes in v3:
- added tags
drivers/clk/renesas/Kconfig | 9 ++++++++- drivers/clk/renesas/Makefile | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-)
drivers/clk/renesas/Kconfig +8 -1
@@ -2,7 +2,12 @@ config CLK_RENESAS bool "Renesas clock drivers" depends on CLK && ARCH_RMOBILE help - Enable support for clock present on Renesas RCar SoCs. + Enable support for clock present on Renesas SoCs. + +config CLK_RCAR + bool "Renesas RCar clock driver support" + help + Enable common code for clocks on Renesas RCar SoCs. config CLK_RCAR_CPG_LIB bool "CPG/MSSR library functions"
@@ -11,6 +16,7 @@ config CLK_RCAR_GEN2 bool "Renesas RCar Gen2 clock driver" def_bool y if RCAR_32 depends on CLK_RENESAS + select CLK_RCAR help Enable this to support the clocks on Renesas RCar Gen2 SoC.
@@ -48,6 +54,7 @@ config CLK_RCAR_GEN3 bool "Renesas RCar Gen3 and Gen4 clock driver" def_bool y if RCAR_64 depends on CLK_RENESAS + select CLK_RCAR select CLK_RCAR_CPG_LIB select DM_RESET help
drivers/clk/renesas/Makefile +1 -1
@@ -1,4 +1,4 @@ -obj-$(CONFIG_CLK_RENESAS) += renesas-cpg-mssr.o +obj-$(CONFIG_CLK_RCAR) += renesas-cpg-mssr.o obj-$(CONFIG_CLK_RCAR_CPG_LIB) += rcar-cpg-lib.o obj-$(CONFIG_CLK_RCAR_GEN2) += clk-rcar-gen2.o obj-$(CONFIG_CLK_R8A774A1) += r8a774a1-cpg-mssr.o
Signature · 1 line
2.25.1
PATCH v5 3/10 clk: renesas: add R906G032 driver
In reply to Ralph SiemsenClock driver for the Renesas RZ/N1 SoC family. This is based on Linux kernel 6.2.y drivers/clk/renesas/r9a06g032-clocks.c as found in commit 02693e11611e ("clk: renesas: r9a06g032: Repair grave increment error"), with the following additional patch series applied:
https://lore.kernel.org/linux-renesas-soc/[email protected]/
Notable difference: this version avoids allocating a 'struct clk' for each clock source, as this is problematic before relocation. Instead, it uses the same approach as existing Renesas R-Car Gen2/3 clock drivers, using a temporary structure filled on-the-fly.
---
Changes in v6:
- add macros for RSTEN register and its bits
Changes in v5:
- eliminate "err" in probe function
Changes in v4:
- commit message now includes hash of Linux upon which this is based as well as the additional patches (clock table cleanups)
- sync changes from review on linux patches, including
- move RB macro higher up and document it, matching Linux driver
- use multiply/divide instead of shifts for computing reg address
- improve comments for clock gate, descriptor structures
Changes in v3:
- convert data table to explicit reg/bit numbers
- drop the unused scon, mirack, mirstat fields
- added some kernel docs to structures
- use enum for type field of struct r9a06g032_clkdesc
- cleanup macros for one assignment per line
- add a macro for top-most clock ID value ~0
- use dev_dbg() instead of debug/print
- minor reformatting, declarations before code, etc
- !foo instead of foo == 0
- IS_ERR / PTR_ERR where appropriate
- implement div_table handling
- remove some #if 0 old test code
drivers/clk/renesas/Kconfig | 6 + drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r9a06g032-clocks.c | 1103 ++++++++++++++++++++++++ 3 files changed, 1110 insertions(+) create mode 100644 drivers/clk/renesas/r9a06g032-clocks.c
drivers/clk/renesas/Kconfig +6 -0
@@ -150,3 +150,9 @@ config CLK_R8A779G0 depends on CLK_RCAR_GEN3 help Enable this to support the clocks on Renesas R8A779G0 SoC. + +config CLK_R9A06G032 + bool "Renesas R9A06G032 clock driver" + depends on CLK_RENESAS + help + Enable this to support the clocks on Renesas R9A06G032 SoC.
drivers/clk/renesas/Makefile +1 -0
@@ -22,3 +22,4 @@ obj-$(CONFIG_CLK_R8A77995) += r8a77995-cpg-mssr.o obj-$(CONFIG_CLK_R8A779A0) += r8a779a0-cpg-mssr.o obj-$(CONFIG_CLK_R8A779F0) += r8a779f0-cpg-mssr.o obj-$(CONFIG_CLK_R8A779G0) += r8a779g0-cpg-mssr.o +obj-$(CONFIG_CLK_R9A06G032) += r9a06g032-clocks.o
drivers/clk/renesas/r9a06g032-clocks.c new file +1103 -0
1,103 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v5 4/10 pinctrl: renesas: add R906G032 driver
In reply to Ralph SiemsenPinctrl/pinconf driver for Renesas RZ/N1 (R906G032) SoC.
This is quite rudimentary right now, and only supports applying a default pin configuration as specified by the device tree.
---
(no changes since v5)
Changes in v5:
- add R-b tag
drivers/pinctrl/Makefile | 1 + drivers/pinctrl/renesas/Kconfig | 7 + drivers/pinctrl/renesas/Makefile | 1 + drivers/pinctrl/renesas/pinctrl-rzn1.c | 379 +++++++++++++++++++++ include/dt-bindings/pinctrl/rzn1-pinctrl.h | 141 ++++++++ 5 files changed, 529 insertions(+) create mode 100644 drivers/pinctrl/renesas/pinctrl-rzn1.c create mode 100644 include/dt-bindings/pinctrl/rzn1-pinctrl.h
drivers/pinctrl/Makefile +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_PINCTRL_INTEL) += intel/ obj-$(CONFIG_ARCH_MTMIPS) += mtmips/ obj-$(CONFIG_ARCH_NPCM) += nuvoton/ obj-$(CONFIG_ARCH_RMOBILE) += renesas/ +obj-$(CONFIG_ARCH_RZN1) += renesas/ obj-$(CONFIG_PINCTRL_SANDBOX) += pinctrl-sandbox.o obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/ obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/
drivers/pinctrl/renesas/Kconfig +7 -0
@@ -139,3 +139,10 @@ config PINCTRL_PFC_R7S72100 Support pin multiplexing control on Renesas RZ/A1 R7S72100 SoCs. endif + +config PINCTRL_RZN1 + bool "Renesas RZ/N1 R906G032 pin control driver" + depends on RZN1 + default y if RZN1 + help + Support pin multiplexing control on Renesas RZ/N1 R906G032 SoCs.
drivers/pinctrl/renesas/Makefile +1 -0
@@ -20,3 +20,4 @@ obj-$(CONFIG_PINCTRL_PFC_R8A779A0) += pfc-r8a779a0.o obj-$(CONFIG_PINCTRL_PFC_R8A779F0) += pfc-r8a779f0.o obj-$(CONFIG_PINCTRL_PFC_R8A779G0) += pfc-r8a779g0.o obj-$(CONFIG_PINCTRL_PFC_R7S72100) += pfc-r7s72100.o +obj-$(CONFIG_PINCTRL_RZN1) += pinctrl-rzn1.o
drivers/pinctrl/renesas/pinctrl-rzn1.c new file +379 -0
379 lines not on this page · raw message
include/dt-bindings/pinctrl/rzn1-pinctrl.h new file +141 -0
141 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v5 5/10 ram: cadence: add driver for Cadence EDAC
In reply to Ralph SiemsenDriver for Cadence EDAC DDR controller, as found in the Renesas RZ/N1.
---
Changes in v6:
- use wait_for_bit macros instead of endless while loop
Changes in v5:
- move board-specific init out of the driver.
Changes in v3:
- assorted small cleanups
- support version 1.0 silicon (previously #if 0...)
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/renesas/ddr_ctrl.h | 175 ++++++++++++++ 6 files changed, 605 insertions(+) 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/renesas/ddr_ctrl.h
drivers/ram/Kconfig +1 -0
@@ -108,6 +108,7 @@ config IMXRT_SDRAM This driver is for the sdram memory interface with the SEMC. source "drivers/ram/aspeed/Kconfig" +source "drivers/ram/cadence/Kconfig" source "drivers/ram/rockchip/Kconfig" source "drivers/ram/sifive/Kconfig" source "drivers/ram/stm32mp1/Kconfig"
drivers/ram/Makefile +2 -0
@@ -24,3 +24,5 @@ ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_STARFIVE_DDR) += starfive/ endif obj-$(CONFIG_ARCH_OCTEON) += octeon/ + +obj-$(CONFIG_CADENCE_DDR_CTRL) += cadence/
drivers/ram/cadence/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if RAM || SPL_RAM + +config CADENCE_DDR_CTRL + bool "Enable Cadence DDR controller" + depends on DM + help + Enable support for Cadence DDR controller, as found on + the Renesas RZ/N1 SoC. This controller has a large number + of registers which need to be programmed, mostly using values + obtained from Denali SOMA files via a TCL script. + +endif
drivers/ram/cadence/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_CADENCE_DDR_CTRL) += ddr_ctrl.o
drivers/ram/cadence/ddr_ctrl.c new file +414 -0
414 lines not on this page · raw message
include/renesas/ddr_ctrl.h new file +175 -0
175 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v5 6/10 ARM: dts: add devicetree for Renesas RZ/N1 SoC
In reply to Ralph SiemsenThis is taken directly from Linux kernel 6.3
(commit 457391b0380335d5e9a5babdec90ac53928b23b4)
---
Changes in v6:
- updated comment to reflact linux 6.3, and add commit hash. (the files themselves have not changed)
Changes in v5:
- r9a06g032.dtsi now identical to linux 6.3-rc7 version
Changes in v3:
- add syscon phandle to ddrctl
- simplify UART compatible strings
arch/arm/dts/r9a06g032.dtsi | 477 ++++++++++++++++++ include/dt-bindings/clock/r9a06g032-sysctrl.h | 149 ++++++ 2 files changed, 626 insertions(+) create mode 100644 arch/arm/dts/r9a06g032.dtsi create mode 100644 include/dt-bindings/clock/r9a06g032-sysctrl.h
arch/arm/dts/r9a06g032.dtsi new file +477 -0
@@ -0,0 +1,477 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Base Device Tree Source for the Renesas RZ/N1D (R9A06G032) + * + * Copyright (C) 2018 Renesas Electronics Europe Limited + * + */ + +#include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/clock/r9a06g032-sysctrl.h> + +/ { + compatible = "renesas,r9a06g032"; + #address-cells = <1>; + #size-cells = <1>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <0>; + clocks = <&sysctrl R9A06G032_CLK_A7MP>; + }; + + cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a7"; + reg = <1>; + clocks = <&sysctrl R9A06G032_CLK_A7MP>; + enable-method = "renesas,r9a06g032-smp"; + cpu-release-addr = <0 0x4000c204>; + }; + }; + + ext_jtag_clk: extjtagclk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + }; + + ext_mclk: extmclk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <40000000>; + }; + + ext_rgmii_ref: extrgmiiref { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + }; + + ext_rtc_clk: extrtcclk { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <0>; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&gic>; + ranges; + + rtc0: rtc@40006000 { + compatible = "renesas,r9a06g032-rtc", "renesas,rzn1-rtc"; + reg = <0x40006000 0x1000>; + interrupts = <GIC_SPI 66 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 67 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 68 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "alarm", "timer", "pps"; + clocks = <&sysctrl R9A06G032_HCLK_RTC>; + clock-names = "hclk"; + power-domains = <&sysctrl>; + status = "disabled"; + }; + + wdt0: watchdog@40008000 { + compatible = "renesas,r9a06g032-wdt", "renesas,rzn1-wdt"; + reg = <0x40008000 0x1000>; + interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>; + clocks = <&sysctrl R9A06G032_CLK_WATCHDOG>; + status = "disabled"; + }; + + wdt1: watchdog@40009000 { + compatible = "renesas,r9a06g032-wdt", "renesas,rzn1-wdt"; + reg = <0x40009000 0x1000>; + interrupts = <GIC_SPI 74 IRQ_TYPE_EDGE_RISING>; + clocks = <&sysctrl R9A06G032_CLK_WATCHDOG>; + status = "disabled"; + }; + + sysctrl: system-controller@4000c000 { + compatible = "renesas,r9a06g032-sysctrl"; + reg = <0x4000c000 0x1000>; + status = "okay"; + #clock-cells = <1>; + #power-domain-cells = <0>; + + clocks = <&ext_mclk>, <&ext_rtc_clk>, + <&ext_jtag_clk>, <&ext_rgmii_ref>; + clock-names = "mclk", "rtc", "jtag", "rgmii_ref_ext"; + #address-cells = <1>; + #size-cells = <1>; + + dmamux: dma-router@a0 { + compatible = "renesas,rzn1-dmamux"; + reg = <0xa0 4>; + #dma-cells = <6>; + dma-requests = <32>; + dma-masters = <&dma0 &dma1>; + }; + }; + + udc: usb@4001e000 { + compatible = "renesas,r9a06g032-usbf", "renesas,rzn1-usbf"; + reg = <0x4001e000 0x2000>; + interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sysctrl R9A06G032_HCLK_USBF>, + <&sysctrl R9A06G032_HCLK_USBPM>; + clock-names = "hclkf", "hclkpm"; + power-domains = <&sysctrl>; + status = "disabled"; + }; + + pci_usb: pci@40030000 { + compatible = "renesas,pci-r9a06g032", "renesas,pci-rzn1"; + device_type = "pci"; + clocks = <&sysctrl R9A06G032_HCLK_USBH>, + <&sysctrl R9A06G032_HCLK_USBPM>, + <&sysctrl R9A06G032_CLK_PCI_USB>; + clock-names = "hclkh", "hclkpm", "pciclk"; + power-domains = <&sysctrl>; + reg = <0x40030000 0xc00>, + <0x40020000 0x1100>; + interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + + bus-range = <0 0>; + #address-cells = <3>; + #size-cells = <2>; + #interrupt-cells = <1>; + ranges = <0x02000000 0 0x40020000 0x40020000 0 0x00010000>; + /* Should map all possible DDR as inbound ranges, but + * the IP only supports a 256MB, 512MB, or 1GB window. + * flags, PCI addr (64-bit), CPU addr, PCI size (64-bit) + */ + dma-ranges = <0x42000000 0 0x80000000 0x80000000 0 0x40000000>; + interrupt-map-mask = <0xf800 0 0 0x7>; + interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH + 0x0800 0 0 1 &gic GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH + 0x1000 0 0 2 &gic GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>; + + usb@1,0 { + reg = <0x800 0 0 0 0>; + phys = <&usbphy>; + phy-names = "usb"; + }; + + usb@2,0 { + reg = <0x1000 0 0 0 0>; + phys = <&usbphy>; + phy-names = "usb"; + }; + }; + + uart0: serial@40060000 { + compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart", "snps,dw-apb-uart"; + reg = <0x40060000 0x400>; + interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&sysctrl R9A06G032_CLK_UART0>, <&sysctrl R9A06G032_HCLK_UART0>; + clock-names = "baudclk", "apb_pclk"; + status = "disabled"; + }; + + uart1: serial@40061000 { + compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart", "snps,dw-apb-uart"; + reg = <0x40061000 0x400>; + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&sysctrl R9A06G032_CLK_UART1>, <&sysctrl R9A06G032_HCLK_UART1>; + clock-names = "baudclk", "apb_pclk"; + status = "disabled"; + }; + + uart2: serial@40062000 { + compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart", "snps,dw-apb-uart"; + reg = <0x40062000 0x400>; + interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&sysctrl R9A06G032_CLK_UART2>, <&sysctrl R9A06G032_HCLK_UART2>; + clock-names = "baudclk", "apb_pclk"; + status = "disabled"; + }; + + uart3: serial@50000000 { + compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart"; + reg = <0x50000000 0x400>; + interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&sysctrl R9A06G032_CLK_UART3>, <&sysctrl R9A06G032_HCLK_UART3>; + clock-names = "baudclk", "apb_pclk"; + dmas = <&dmamux 0 0 0 0 0 1>, <&dmamux 1 0 0 0 1 1>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart4: serial@50001000 { + compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart"; + reg = <0x50001000 0x400>; + interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&sysctrl R9A06G032_CLK_UART4>, <&sysctrl R9A06G032_HCLK_UART4>; + clock-names = "baudclk", "apb_pclk"; + dmas = <&dmamux 2 0 0 0 2 1>, <&dmamux 3 0 0 0 3 1>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart5: serial@50002000 { + compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart"; + reg = <0x50002000 0x400>; + interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&sysctrl R9A06G032_CLK_UART5>, <&sysctrl R9A06G032_HCLK_UART5>; + clock-names = "baudclk", "apb_pclk"; + dmas = <&dmamux 4 0 0 0 4 1>, <&dmamux 5 0 0 0 5 1>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart6: serial@50003000 { + compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart"; + reg = <0x50003000 0x400>; + interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&sysctrl R9A06G032_CLK_UART6>, <&sysctrl R9A06G032_HCLK_UART6>; + clock-names = "baudclk", "apb_pclk"; + dmas = <&dmamux 6 0 0 0 6 1>, <&dmamux 7 0 0 0 7 1>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + uart7: serial@50004000 { + compatible = "renesas,r9a06g032-uart", "renesas,rzn1-uart"; + reg = <0x50004000 0x400>; + interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>; + reg-shift = <2>; + reg-io-width = <4>; + clocks = <&sysctrl R9A06G032_CLK_UART7>, <&sysctrl R9A06G032_HCLK_UART7>; + clock-names = "baudclk", "apb_pclk"; + dmas = <&dmamux 4 0 0 0 20 1>, <&dmamux 5 0 0 0 21 1>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + pinctrl: pinctrl@40067000 { + compatible = "renesas,r9a06g032-pinctrl", "renesas,rzn1-pinctrl"; + reg = <0x40067000 0x1000>, <0x51000000 0x480>; + clocks = <&sysctrl R9A06G032_HCLK_PINCONFIG>; + clock-names = "bus"; + status = "okay"; + }; + + nand_controller: nand-controller@40102000 { + compatible = "renesas,r9a06g032-nandc", "renesas,rzn1-nandc"; + reg = <0x40102000 0x2000>; + interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sysctrl R9A06G032_HCLK_NAND>, <&sysctrl R9A06G032_CLK_NAND>; + clock-names = "hclk", "eclk"; + power-domains = <&sysctrl>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + dma0: dma-controller@40104000 { + compatible = "renesas,r9a06g032-dma", "renesas,rzn1-dma"; + reg = <0x40104000 0x1000>; + interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "hclk"; + clocks = <&sysctrl R9A06G032_HCLK_DMA0>; + dma-channels = <8>; + dma-requests = <16>; + dma-masters = <1>; + #dma-cells = <3>; + block_size = <0xfff>; + data-width = <8>; + }; + + dma1: dma-controller@40105000 { + compatible = "renesas,r9a06g032-dma", "renesas,rzn1-dma"; + reg = <0x40105000 0x1000>; + interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>; + clock-names = "hclk"; + clocks = <&sysctrl R9A06G032_HCLK_DMA1>; + dma-channels = <8>; + dma-requests = <16>; + dma-masters = <1>; + #dma-cells = <3>; + block_size = <0xfff>; + data-width = <8>; + }; + + gmac2: ethernet@44002000 { + compatible = "renesas,r9a06g032-gmac", "renesas,rzn1-gmac", "snps,dwmac"; + reg = <0x44002000 0x2000>; + interrupt-parent = <&gic>; + interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "macirq", "eth_wake_irq", "eth_lpi"; + clocks = <&sysctrl R9A06G032_HCLK_GMAC1>; + clock-names = "stmmaceth"; + power-domains = <&sysctrl>; + snps,multicast-filter-bins = <256>; + snps,perfect-filter-entries = <128>; + tx-fifo-depth = <2048>; + rx-fifo-depth = <4096>; + status = "disabled"; + }; + + eth_miic: eth-miic@44030000 { + compatible = "renesas,r9a06g032-miic", "renesas,rzn1-miic"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x44030000 0x10000>; + clocks = <&sysctrl R9A06G032_CLK_MII_REF>, + <&sysctrl R9A06G032_CLK_RGMII_REF>, + <&sysctrl R9A06G032_CLK_RMII_REF>, + <&sysctrl R9A06G032_HCLK_SWITCH_RG>; + clock-names = "mii_ref", "rgmii_ref", "rmii_ref", "hclk"; + power-domains = <&sysctrl>; + status = "disabled"; + + mii_conv1: mii-conv@1 { + reg = <1>; + status = "disabled"; + }; + + mii_conv2: mii-conv@2 { + reg = <2>; + status = "disabled"; + }; + + mii_conv3: mii-conv@3 { + reg = <3>; + status = "disabled"; + }; + + mii_conv4: mii-conv@4 { + reg = <4>; + status = "disabled"; + }; + + mii_conv5: mii-conv@5 { + reg = <5>; + status = "disabled"; + }; + }; + + switch: switch@44050000 { + compatible = "renesas,r9a06g032-a5psw", "renesas,rzn1-a5psw"; + reg = <0x44050000 0x10000>; + clocks = <&sysctrl R9A06G032_HCLK_SWITCH>, + <&sysctrl R9A06G032_CLK_SWITCH>; + clock-names = "hclk", "clk"; + power-domains = <&sysctrl>; + status = "disabled"; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + switch_port0: port@0 { + reg = <0>; + pcs-handle = <&mii_conv5>; + status = "disabled"; + }; + + switch_port1: port@1 { + reg = <1>; + pcs-handle = <&mii_conv4>; + status = "disabled"; + }; + + switch_port2: port@2 { + reg = <2>; + pcs-handle = <&mii_conv3>; + status = "disabled"; + }; + + switch_port3: port@3 { + reg = <3>; + pcs-handle = <&mii_conv2>; + status = "disabled"; + }; + + switch_port4: port@4 { + reg = <4>; + ethernet = <&gmac2>; + label = "cpu"; + phy-mode = "internal"; + status = "disabled"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; + + gic: interrupt-controller@44101000 { + compatible = "arm,gic-400", "arm,cortex-a7-gic"; + interrupt-controller; + #interrupt-cells = <3>; + reg = <0x44101000 0x1000>, /* Distributer */ + <0x44102000 0x2000>, /* CPU interface */ + <0x44104000 0x2000>, /* Virt interface control */ + <0x44106000 0x2000>; /* Virt CPU interface */ + interrupts = + <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>; + }; + + can0: can@52104000 { + compatible = "renesas,r9a06g032-sja1000","renesas,rzn1-sja1000"; + reg = <0x52104000 0x800>; + reg-io-width = <4>; + interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sysctrl R9A06G032_HCLK_CAN0>; + power-domains = <&sysctrl>; + status = "disabled"; + }; + + can1: can@52105000 { + compatible = "renesas,r9a06g032-sja1000", "renesas,rzn1-sja1000"; + reg = <0x52105000 0x800>; + reg-io-width = <4>; + interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sysctrl R9A06G032_HCLK_CAN1>; + power-domains = <&sysctrl>; + status = "disabled"; + }; + }; + + timer { + compatible = "arm,armv7-timer"; + interrupt-parent = <&gic>; + arm,cpu-registers-not-fw-configured; + always-on; + interrupts = + <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>, + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>; + }; + + usbphy: usb-phy { + #phy-cells = <0>; + compatible = "usb-nop-xceiv"; + status = "disabled"; + }; +};
include/dt-bindings/clock/r9a06g032-sysctrl.h new file +149 -0
149 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v5 7/10 ARM: rmobile: Add support for Renesas RZ/N1 SoC
In reply to Ralph SiemsenThe 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.
---
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
arch/arm/mach-rmobile/Kconfig +19 -0
@@ -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
arch/arm/mach-rmobile/Kconfig.rzn1 new file +20 -0
@@ -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
arch/arm/mach-rmobile/cpu_info.c +8 -2
@@ -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 */
Signature · 1 line
2.25.1
Re: [PATCH v5 07/10] ARM: rmobile: Add support for Renesas RZ/N1 SoC
Quoted 11 lines · Ralph Siemsen
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, LCDAdd basic support for this family, modeled on the existing RZA1.
Signed-off-by Ralph Siemsen <[email protected]>
PATCH v5 8/10 board: schneider: add RZN1 board support
In reply to Ralph SiemsenAdd support for Schneider Electric RZ/N1D and RZ/N1S boards, which are based on the Reneasas RZ/N1 SoC devices.
The intention is to support both boards using a single defconfig, and to handle the differences at runtime.
---
Changes in v6:
- move board-specific DDR init to drivers/ram/renesas/rzn1
- drop call to fdtdec_setup_mem_size_base()
- minor code cleanups
- use wait_for_bit macros instead of endless while loop
- in commit message fix Schneider Electronics -> Electric
Changes in v5:
- put all local DTS changes in r9a06g032-rzn1-snarc.dts
- move board-specific DDR init out of drivers/ram/cadence.
- tables of DDR paramters are now stored in devicetree
- support two different DDR memory types
- use BIT() macro
- obtain RZN1_DDR_BASE from DT
- uncomment error return when syscon fails
- make some functions static
Changes in v4:
- add binman support via r9a06g032-rzn1-snarc-u-boot.dtsi
Changes in v3:
- rename board LCES to rzn1-snarc
- move CONFIG_SYS_NS16550_MEM32 to Kconfig
- define CFG_SYS_INIT_RAM_{ADDR,SIZE}
- removed debug uart settings from defconfig
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 ++++ board/schneider/rzn1-snarc/Kconfig | 18 + board/schneider/rzn1-snarc/Makefile | 3 + board/schneider/rzn1-snarc/rzn1.c | 31 ++ configs/rzn1_snarc_defconfig | 24 + drivers/ram/Makefile | 1 + 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/renesas/is43tr16256a_125k_CTL.h | 419 ++++++++++++++ .../renesas/jedec_ddr3_2g_x16_1333h_500_cl8.h | 399 ++++++++++++++ 14 files changed, 1917 insertions(+) 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 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 configs/rzn1_snarc_defconfig 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/renesas/is43tr16256a_125k_CTL.h create mode 100644 include/renesas/jedec_ddr3_2g_x16_1333h_500_cl8.h
arch/arm/dts/r9a06g032-ddr.dtsi new file +512 -0
@@ -0,0 +1,512 @@ +// SPDX-License-Identifier: GPL-2.0 + + cadence,ctl-000 = < + DENALI_CTL_00_DATA + DENALI_CTL_01_DATA + DENALI_CTL_02_DATA + DENALI_CTL_03_DATA + DENALI_CTL_04_DATA + DENALI_CTL_05_DATA + DENALI_CTL_06_DATA + DENALI_CTL_07_DATA + DENALI_CTL_08_DATA + DENALI_CTL_09_DATA + + DENALI_CTL_10_DATA + DENALI_CTL_11_DATA + DENALI_CTL_12_DATA + DENALI_CTL_13_DATA + DENALI_CTL_14_DATA + DENALI_CTL_15_DATA + DENALI_CTL_16_DATA + DENALI_CTL_17_DATA + DENALI_CTL_18_DATA + DENALI_CTL_19_DATA + + DENALI_CTL_20_DATA + DENALI_CTL_21_DATA + DENALI_CTL_22_DATA + DENALI_CTL_23_DATA + DENALI_CTL_24_DATA + DENALI_CTL_25_DATA + DENALI_CTL_26_DATA + DENALI_CTL_27_DATA + DENALI_CTL_28_DATA + DENALI_CTL_29_DATA + + DENALI_CTL_30_DATA + DENALI_CTL_31_DATA + DENALI_CTL_32_DATA + DENALI_CTL_33_DATA + DENALI_CTL_34_DATA + DENALI_CTL_35_DATA + DENALI_CTL_36_DATA + DENALI_CTL_37_DATA + DENALI_CTL_38_DATA + DENALI_CTL_39_DATA + + DENALI_CTL_40_DATA + DENALI_CTL_41_DATA + DENALI_CTL_42_DATA + DENALI_CTL_43_DATA + DENALI_CTL_44_DATA + DENALI_CTL_45_DATA + DENALI_CTL_46_DATA + DENALI_CTL_47_DATA + DENALI_CTL_48_DATA + DENALI_CTL_49_DATA + + DENALI_CTL_50_DATA + DENALI_CTL_51_DATA + DENALI_CTL_52_DATA + DENALI_CTL_53_DATA + DENALI_CTL_54_DATA + DENALI_CTL_55_DATA + DENALI_CTL_56_DATA + DENALI_CTL_57_DATA + DENALI_CTL_58_DATA + DENALI_CTL_59_DATA + + DENALI_CTL_60_DATA + DENALI_CTL_61_DATA + DENALI_CTL_62_DATA + DENALI_CTL_63_DATA + DENALI_CTL_64_DATA + DENALI_CTL_65_DATA + DENALI_CTL_66_DATA + DENALI_CTL_67_DATA + DENALI_CTL_68_DATA + DENALI_CTL_69_DATA + + DENALI_CTL_70_DATA + DENALI_CTL_71_DATA + DENALI_CTL_72_DATA + DENALI_CTL_73_DATA + DENALI_CTL_74_DATA + DENALI_CTL_75_DATA + DENALI_CTL_76_DATA + DENALI_CTL_77_DATA + DENALI_CTL_78_DATA + DENALI_CTL_79_DATA + + DENALI_CTL_80_DATA + DENALI_CTL_81_DATA + DENALI_CTL_82_DATA + DENALI_CTL_83_DATA + DENALI_CTL_84_DATA + DENALI_CTL_85_DATA + DENALI_CTL_86_DATA + DENALI_CTL_87_DATA + DENALI_CTL_88_DATA + DENALI_CTL_89_DATA + + DENALI_CTL_90_DATA + DENALI_CTL_91_DATA + DENALI_CTL_92_DATA + >; + + cadence,ctl-350 = < + DENALI_CTL_350_DATA + DENALI_CTL_351_DATA + DENALI_CTL_352_DATA + DENALI_CTL_353_DATA + DENALI_CTL_354_DATA + DENALI_CTL_355_DATA + DENALI_CTL_356_DATA + DENALI_CTL_357_DATA + DENALI_CTL_358_DATA + DENALI_CTL_359_DATA + + DENALI_CTL_360_DATA + DENALI_CTL_361_DATA + DENALI_CTL_362_DATA + DENALI_CTL_363_DATA + DENALI_CTL_364_DATA + DENALI_CTL_365_DATA + DENALI_CTL_366_DATA + DENALI_CTL_367_DATA + DENALI_CTL_368_DATA + DENALI_CTL_369_DATA + + DENALI_CTL_370_DATA + DENALI_CTL_371_DATA + DENALI_CTL_372_DATA + DENALI_CTL_373_DATA + DENALI_CTL_374_DATA + >; + +#undef DENALI_CTL_00_DATA +#undef DENALI_CTL_01_DATA +#undef DENALI_CTL_02_DATA +#undef DENALI_CTL_03_DATA +#undef DENALI_CTL_04_DATA +#undef DENALI_CTL_05_DATA +#undef DENALI_CTL_06_DATA +#undef DENALI_CTL_07_DATA +#undef DENALI_CTL_08_DATA +#undef DENALI_CTL_09_DATA +#undef DENALI_CTL_10_DATA +#undef DENALI_CTL_11_DATA +#undef DENALI_CTL_12_DATA +#undef DENALI_CTL_13_DATA +#undef DENALI_CTL_14_DATA +#undef DENALI_CTL_15_DATA +#undef DENALI_CTL_16_DATA +#undef DENALI_CTL_17_DATA +#undef DENALI_CTL_18_DATA +#undef DENALI_CTL_19_DATA +#undef DENALI_CTL_20_DATA +#undef DENALI_CTL_21_DATA +#undef DENALI_CTL_22_DATA +#undef DENALI_CTL_23_DATA +#undef DENALI_CTL_24_DATA +#undef DENALI_CTL_25_DATA +#undef DENALI_CTL_26_DATA +#undef DENALI_CTL_27_DATA +#undef DENALI_CTL_28_DATA +#undef DENALI_CTL_29_DATA +#undef DENALI_CTL_30_DATA +#undef DENALI_CTL_31_DATA +#undef DENALI_CTL_32_DATA +#undef DENALI_CTL_33_DATA +#undef DENALI_CTL_34_DATA +#undef DENALI_CTL_35_DATA +#undef DENALI_CTL_36_DATA +#undef DENALI_CTL_37_DATA +#undef DENALI_CTL_38_DATA +#undef DENALI_CTL_39_DATA +#undef DENALI_CTL_40_DATA +#undef DENALI_CTL_41_DATA +#undef DENALI_CTL_42_DATA +#undef DENALI_CTL_43_DATA +#undef DENALI_CTL_44_DATA +#undef DENALI_CTL_45_DATA +#undef DENALI_CTL_46_DATA +#undef DENALI_CTL_47_DATA +#undef DENALI_CTL_48_DATA +#undef DENALI_CTL_49_DATA +#undef DENALI_CTL_50_DATA +#undef DENALI_CTL_51_DATA +#undef DENALI_CTL_52_DATA +#undef DENALI_CTL_53_DATA +#undef DENALI_CTL_54_DATA +#undef DENALI_CTL_55_DATA +#undef DENALI_CTL_56_DATA +#undef DENALI_CTL_57_DATA +#undef DENALI_CTL_58_DATA +#undef DENALI_CTL_59_DATA +#undef DENALI_CTL_60_DATA +#undef DENALI_CTL_61_DATA +#undef DENALI_CTL_62_DATA +#undef DENALI_CTL_63_DATA +#undef DENALI_CTL_64_DATA +#undef DENALI_CTL_65_DATA +#undef DENALI_CTL_66_DATA +#undef DENALI_CTL_67_DATA +#undef DENALI_CTL_68_DATA +#undef DENALI_CTL_69_DATA +#undef DENALI_CTL_70_DATA +#undef DENALI_CTL_71_DATA +#undef DENALI_CTL_72_DATA +#undef DENALI_CTL_73_DATA +#undef DENALI_CTL_74_DATA +#undef DENALI_CTL_75_DATA +#undef DENALI_CTL_76_DATA +#undef DENALI_CTL_77_DATA +#undef DENALI_CTL_78_DATA +#undef DENALI_CTL_79_DATA +#undef DENALI_CTL_80_DATA +#undef DENALI_CTL_81_DATA +#undef DENALI_CTL_82_DATA +#undef DENALI_CTL_83_DATA +#undef DENALI_CTL_84_DATA +#undef DENALI_CTL_85_DATA +#undef DENALI_CTL_86_DATA +#undef DENALI_CTL_87_DATA +#undef DENALI_CTL_88_DATA +#undef DENALI_CTL_89_DATA +#undef DENALI_CTL_90_DATA +#undef DENALI_CTL_91_DATA +#undef DENALI_CTL_92_DATA +#undef DENALI_CTL_93_DATA +#undef DENALI_CTL_94_DATA +#undef DENALI_CTL_95_DATA +#undef DENALI_CTL_96_DATA +#undef DENALI_CTL_97_DATA +#undef DENALI_CTL_98_DATA +#undef DENALI_CTL_99_DATA +#undef DENALI_CTL_100_DATA +#undef DENALI_CTL_101_DATA +#undef DENALI_CTL_102_DATA +#undef DENALI_CTL_103_DATA +#undef DENALI_CTL_104_DATA +#undef DENALI_CTL_105_DATA +#undef DENALI_CTL_106_DATA +#undef DENALI_CTL_107_DATA +#undef DENALI_CTL_108_DATA +#undef DENALI_CTL_109_DATA +#undef DENALI_CTL_110_DATA +#undef DENALI_CTL_111_DATA +#undef DENALI_CTL_112_DATA +#undef DENALI_CTL_113_DATA +#undef DENALI_CTL_114_DATA +#undef DENALI_CTL_115_DATA +#undef DENALI_CTL_116_DATA +#undef DENALI_CTL_117_DATA +#undef DENALI_CTL_118_DATA +#undef DENALI_CTL_119_DATA +#undef DENALI_CTL_120_DATA +#undef DENALI_CTL_121_DATA +#undef DENALI_CTL_122_DATA +#undef DENALI_CTL_123_DATA +#undef DENALI_CTL_124_DATA +#undef DENALI_CTL_125_DATA +#undef DENALI_CTL_126_DATA +#undef DENALI_CTL_127_DATA +#undef DENALI_CTL_128_DATA +#undef DENALI_CTL_129_DATA +#undef DENALI_CTL_130_DATA +#undef DENALI_CTL_131_DATA +#undef DENALI_CTL_132_DATA +#undef DENALI_CTL_133_DATA +#undef DENALI_CTL_134_DATA +#undef DENALI_CTL_135_DATA +#undef DENALI_CTL_136_DATA +#undef DENALI_CTL_137_DATA +#undef DENALI_CTL_138_DATA +#undef DENALI_CTL_139_DATA +#undef DENALI_CTL_140_DATA +#undef DENALI_CTL_141_DATA +#undef DENALI_CTL_142_DATA +#undef DENALI_CTL_143_DATA +#undef DENALI_CTL_144_DATA +#undef DENALI_CTL_145_DATA +#undef DENALI_CTL_146_DATA +#undef DENALI_CTL_147_DATA +#undef DENALI_CTL_148_DATA +#undef DENALI_CTL_149_DATA +#undef DENALI_CTL_150_DATA +#undef DENALI_CTL_151_DATA +#undef DENALI_CTL_152_DATA +#undef DENALI_CTL_153_DATA +#undef DENALI_CTL_154_DATA +#undef DENALI_CTL_155_DATA +#undef DENALI_CTL_156_DATA +#undef DENALI_CTL_157_DATA +#undef DENALI_CTL_158_DATA +#undef DENALI_CTL_159_DATA +#undef DENALI_CTL_160_DATA +#undef DENALI_CTL_161_DATA +#undef DENALI_CTL_162_DATA +#undef DENALI_CTL_163_DATA +#undef DENALI_CTL_164_DATA +#undef DENALI_CTL_165_DATA +#undef DENALI_CTL_166_DATA +#undef DENALI_CTL_167_DATA +#undef DENALI_CTL_168_DATA +#undef DENALI_CTL_169_DATA +#undef DENALI_CTL_170_DATA +#undef DENALI_CTL_171_DATA +#undef DENALI_CTL_172_DATA +#undef DENALI_CTL_173_DATA +#undef DENALI_CTL_174_DATA +#undef DENALI_CTL_175_DATA +#undef DENALI_CTL_176_DATA +#undef DENALI_CTL_177_DATA +#undef DENALI_CTL_178_DATA +#undef DENALI_CTL_179_DATA +#undef DENALI_CTL_180_DATA +#undef DENALI_CTL_181_DATA +#undef DENALI_CTL_182_DATA +#undef DENALI_CTL_183_DATA +#undef DENALI_CTL_184_DATA +#undef DENALI_CTL_185_DATA +#undef DENALI_CTL_186_DATA +#undef DENALI_CTL_187_DATA +#undef DENALI_CTL_188_DATA +#undef DENALI_CTL_189_DATA +#undef DENALI_CTL_190_DATA +#undef DENALI_CTL_191_DATA +#undef DENALI_CTL_192_DATA +#undef DENALI_CTL_193_DATA +#undef DENALI_CTL_194_DATA +#undef DENALI_CTL_195_DATA +#undef DENALI_CTL_196_DATA +#undef DENALI_CTL_197_DATA +#undef DENALI_CTL_198_DATA +#undef DENALI_CTL_199_DATA +#undef DENALI_CTL_200_DATA +#undef DENALI_CTL_201_DATA +#undef DENALI_CTL_202_DATA +#undef DENALI_CTL_203_DATA +#undef DENALI_CTL_204_DATA +#undef DENALI_CTL_205_DATA +#undef DENALI_CTL_206_DATA +#undef DENALI_CTL_207_DATA +#undef DENALI_CTL_208_DATA +#undef DENALI_CTL_209_DATA +#undef DENALI_CTL_210_DATA +#undef DENALI_CTL_211_DATA +#undef DENALI_CTL_212_DATA +#undef DENALI_CTL_213_DATA +#undef DENALI_CTL_214_DATA +#undef DENALI_CTL_215_DATA +#undef DENALI_CTL_216_DATA +#undef DENALI_CTL_217_DATA +#undef DENALI_CTL_218_DATA +#undef DENALI_CTL_219_DATA +#undef DENALI_CTL_220_DATA +#undef DENALI_CTL_221_DATA +#undef DENALI_CTL_222_DATA +#undef DENALI_CTL_223_DATA +#undef DENALI_CTL_224_DATA +#undef DENALI_CTL_225_DATA +#undef DENALI_CTL_226_DATA +#undef DENALI_CTL_227_DATA +#undef DENALI_CTL_228_DATA +#undef DENALI_CTL_229_DATA +#undef DENALI_CTL_230_DATA +#undef DENALI_CTL_231_DATA +#undef DENALI_CTL_232_DATA +#undef DENALI_CTL_233_DATA +#undef DENALI_CTL_234_DATA +#undef DENALI_CTL_235_DATA +#undef DENALI_CTL_236_DATA +#undef DENALI_CTL_237_DATA +#undef DENALI_CTL_238_DATA +#undef DENALI_CTL_239_DATA +#undef DENALI_CTL_240_DATA +#undef DENALI_CTL_241_DATA +#undef DENALI_CTL_242_DATA +#undef DENALI_CTL_243_DATA +#undef DENALI_CTL_244_DATA +#undef DENALI_CTL_245_DATA +#undef DENALI_CTL_246_DATA +#undef DENALI_CTL_247_DATA +#undef DENALI_CTL_248_DATA +#undef DENALI_CTL_249_DATA +#undef DENALI_CTL_250_DATA +#undef DENALI_CTL_251_DATA +#undef DENALI_CTL_252_DATA +#undef DENALI_CTL_253_DATA +#undef DENALI_CTL_254_DATA +#undef DENALI_CTL_255_DATA +#undef DENALI_CTL_256_DATA +#undef DENALI_CTL_257_DATA +#undef DENALI_CTL_258_DATA +#undef DENALI_CTL_259_DATA +#undef DENALI_CTL_260_DATA +#undef DENALI_CTL_261_DATA +#undef DENALI_CTL_262_DATA +#undef DENALI_CTL_263_DATA +#undef DENALI_CTL_264_DATA +#undef DENALI_CTL_265_DATA +#undef DENALI_CTL_266_DATA +#undef DENALI_CTL_267_DATA +#undef DENALI_CTL_268_DATA +#undef DENALI_CTL_269_DATA +#undef DENALI_CTL_270_DATA +#undef DENALI_CTL_271_DATA +#undef DENALI_CTL_272_DATA +#undef DENALI_CTL_273_DATA +#undef DENALI_CTL_274_DATA +#undef DENALI_CTL_275_DATA +#undef DENALI_CTL_276_DATA +#undef DENALI_CTL_277_DATA +#undef DENALI_CTL_278_DATA +#undef DENALI_CTL_279_DATA +#undef DENALI_CTL_280_DATA +#undef DENALI_CTL_281_DATA +#undef DENALI_CTL_282_DATA +#undef DENALI_CTL_283_DATA +#undef DENALI_CTL_284_DATA +#undef DENALI_CTL_285_DATA +#undef DENALI_CTL_286_DATA +#undef DENALI_CTL_287_DATA +#undef DENALI_CTL_288_DATA +#undef DENALI_CTL_289_DATA +#undef DENALI_CTL_290_DATA +#undef DENALI_CTL_291_DATA +#undef DENALI_CTL_292_DATA +#undef DENALI_CTL_293_DATA +#undef DENALI_CTL_294_DATA +#undef DENALI_CTL_295_DATA +#undef DENALI_CTL_296_DATA +#undef DENALI_CTL_297_DATA +#undef DENALI_CTL_298_DATA +#undef DENALI_CTL_299_DATA +#undef DENALI_CTL_300_DATA +#undef DENALI_CTL_301_DATA +#undef DENALI_CTL_302_DATA +#undef DENALI_CTL_303_DATA +#undef DENALI_CTL_304_DATA +#undef DENALI_CTL_305_DATA +#undef DENALI_CTL_306_DATA +#undef DENALI_CTL_307_DATA +#undef DENALI_CTL_308_DATA +#undef DENALI_CTL_309_DATA +#undef DENALI_CTL_310_DATA +#undef DENALI_CTL_311_DATA +#undef DENALI_CTL_312_DATA +#undef DENALI_CTL_313_DATA +#undef DENALI_CTL_314_DATA +#undef DENALI_CTL_315_DATA +#undef DENALI_CTL_316_DATA +#undef DENALI_CTL_317_DATA +#undef DENALI_CTL_318_DATA +#undef DENALI_CTL_319_DATA +#undef DENALI_CTL_320_DATA +#undef DENALI_CTL_321_DATA +#undef DENALI_CTL_322_DATA +#undef DENALI_CTL_323_DATA +#undef DENALI_CTL_324_DATA +#undef DENALI_CTL_325_DATA +#undef DENALI_CTL_326_DATA +#undef DENALI_CTL_327_DATA +#undef DENALI_CTL_328_DATA +#undef DENALI_CTL_329_DATA +#undef DENALI_CTL_330_DATA +#undef DENALI_CTL_331_DATA +#undef DENALI_CTL_332_DATA +#undef DENALI_CTL_333_DATA +#undef DENALI_CTL_334_DATA +#undef DENALI_CTL_335_DATA +#undef DENALI_CTL_336_DATA +#undef DENALI_CTL_337_DATA +#undef DENALI_CTL_338_DATA +#undef DENALI_CTL_339_DATA +#undef DENALI_CTL_340_DATA +#undef DENALI_CTL_341_DATA +#undef DENALI_CTL_342_DATA +#undef DENALI_CTL_343_DATA +#undef DENALI_CTL_344_DATA +#undef DENALI_CTL_345_DATA +#undef DENALI_CTL_346_DATA +#undef DENALI_CTL_347_DATA +#undef DENALI_CTL_348_DATA +#undef DENALI_CTL_349_DATA +#undef DENALI_CTL_350_DATA +#undef DENALI_CTL_351_DATA +#undef DENALI_CTL_352_DATA +#undef DENALI_CTL_353_DATA +#undef DENALI_CTL_354_DATA +#undef DENALI_CTL_355_DATA +#undef DENALI_CTL_356_DATA +#undef DENALI_CTL_357_DATA +#undef DENALI_CTL_358_DATA +#undef DENALI_CTL_359_DATA +#undef DENALI_CTL_360_DATA +#undef DENALI_CTL_361_DATA +#undef DENALI_CTL_362_DATA +#undef DENALI_CTL_363_DATA +#undef DENALI_CTL_364_DATA +#undef DENALI_CTL_365_DATA +#undef DENALI_CTL_366_DATA +#undef DENALI_CTL_367_DATA +#undef DENALI_CTL_368_DATA +#undef DENALI_CTL_369_DATA +#undef DENALI_CTL_370_DATA +#undef DENALI_CTL_371_DATA +#undef DENALI_CTL_372_DATA +#undef DENALI_CTL_373_DATA +#undef DENALI_CTL_374_DATA
arch/arm/dts/r9a06g032-rzn1-snarc-u-boot.dtsi new file +23 -0
@@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Configuration file for binman + * + * After building u-boot, can generate the SPKG output by running: + * tools/binman/binman build -d arch/arm/dts/r9a06g032-rzn1-snarc.dtb -O <outdir> + */ + +#include <config.h> + +/ { + binman: binman { + }; +}; + +&binman { + mkimage { + filename = "u-boot.bin.spkg"; + args = "-n board/schneider/rzn1-snarc/spkgimage.cfg -T spkgimage -a 0x20040000 -e 0x20040000"; + u-boot { + }; + }; +};
arch/arm/dts/r9a06g032-rzn1-snarc.dts new file +92 -0
92 lines not on this page · raw message
board/schneider/rzn1-snarc/Kconfig new file +18 -0
@@ -0,0 +1,18 @@ +if TARGET_SCHNEIDER_RZN1 + +config TEXT_BASE + default 0x20040000 + +config SYS_MONITOR_LEN + default 524288 + +config SYS_BOARD + default "rzn1-snarc" + +config SYS_VENDOR + default "schneider" + +config SYS_CONFIG_NAME + default "rzn1-snarc" + +endif
board/schneider/rzn1-snarc/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0+ + +obj-y := rzn1.o
board/schneider/rzn1-snarc/rzn1.c new file +31 -0
@@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-2.0+ + +#include <common.h> +#include <dm.h> +#include <ram.h> +#include <asm/global_data.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int board_init (void ) +{ + gd->bd->bi_boot_params = gd->ram_base +0x100 ; + +return 0 ; +} + +int dram_init (void ) +{ +struct udevice *dev; +int err; + +/* +* This will end up calling cadence_ddr_probe(), +* and will also update gd->ram_size. +*/ + err =uclass_get_device (UCLASS_RAM ,0 , &dev); +if (err) +debug ("DRAM init failed: %d\n" , err); + +return err; +}
configs/rzn1_snarc_defconfig new file +24 -0
@@ -0,0 +1,24 @@ +CONFIG_ARM=y +CONFIG_SYS_ARCH_TIMER=y +CONFIG_SYS_THUMB_BUILD=y +CONFIG_ARCH_RMOBILE=y +CONFIG_SYS_MALLOC_LEN=0xb0000 +CONFIG_SYS_MALLOC_F_LEN=0x800 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_DEFAULT_DEVICE_TREE="r9a06g032-rzn1-snarc" +CONFIG_RZN1=y +CONFIG_SYS_LOAD_ADDR=0x80008000 +CONFIG_SYS_MEMTEST_START=0x80000000 +CONFIG_SYS_MEMTEST_END=0x8fffffff +# CONFIG_ARCH_MISC_INIT is not set +# CONFIG_BOARD_EARLY_INIT_F is not set +CONFIG_CMD_MEMTEST=y +CONFIG_SYS_ALT_MEMTEST=y +# CONFIG_SYS_ALT_MEMTEST_BITFLIP is not set +CONFIG_CMD_CLK=y +CONFIG_OF_CONTROL=y +CONFIG_RAM=y +CONFIG_CADENCE_DDR_CTRL=y +CONFIG_SYS_NS16550=y +CONFIG_SYS_NS16550_MEM32=y +# CONFIG_EFI_LOADER is not set
drivers/ram/Makefile +1 -0
@@ -25,4 +25,5 @@ obj-$(CONFIG_SPL_STARFIVE_DDR) += starfive/ endif obj-$(CONFIG_ARCH_OCTEON) += octeon/ +obj-$(CONFIG_ARCH_RMOBILE) += renesas/ obj-$(CONFIG_CADENCE_DDR_CTRL) += cadence/
drivers/ram/renesas/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0+ + +obj-$(CONFIG_RZN1) += rzn1/
drivers/ram/renesas/rzn1/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0+ + +obj-y += ddr_async.o
drivers/ram/renesas/rzn1/ddr_async.c new file +376 -0
376 lines not on this page · raw message
include/configs/rzn1-snarc.h new file +13 -0
@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Configuration settings for the Schneider RZ/N1 board +*/ + +#ifndef __RZN1_SNARC_H +#define __RZN1_SNARC_H + +/* Internal RAM */ +#define CFG_SYS_INIT_RAM_ADDR 0x20000000 +#define CFG_SYS_INIT_RAM_SIZE (1 * 1024 * 1024) + +#endif /* __RZN1_SNARC_H */
include/renesas/is43tr16256a_125k_CTL.h new file +419 -0
419 lines not on this page · raw message
include/renesas/jedec_ddr3_2g_x16_1333h_500_cl8.h new file +399 -0
399 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH v5 08/10] board: schneider: add RZN1 board support
Quoted 7 lines · Ralph Siemsen
Add support for Schneider Electric RZ/N1D and RZ/N1S boards, which are based on the Reneasas RZ/N1 SoC devices.
The intention is to support both boards using a single defconfig, and to handle the differences at runtime.
Signed-off-by Ralph Siemsen <[email protected]>
PATCH v5 9/10 tools: spkgimage: add Renesas SPKG format
In reply to Ralph SiemsenRenesas RZ/N1 devices contain BootROM code that loads a custom SPKG image from QSPI, NAND or USB DFU. Support this format in mkimage tool.
SPKGs can optionally be signed, however creation of signed SPKG is not currently supported.
Example of how to use it:
tools/mkimage -n board/schneider/rzn1-snarc/spkgimage.cfg \ -T spkgimage -a 0x20040000 -e 0x20040000 \ -d u-boot.bin u-boot.bin.spkg
The config file (spkgimage.cfg in this example) contains additional parameters such as NAND ECC settings.
---
(no changes since v5)
Changes in v5:
- use strcspn() instead of open-coded loop for \n removal
- rename source files to include vendor name
- replace static globals with dynamically allocated structure
- update print_header function signature
Changes in v4:
- added tags
- add RZ/N1 board documentation
- added binman support
Changes in v3:
- provide definition of __packed (as done in kwbimage.h)
- explain why a local copy of roundup() is needed
- document spkgimage in doc/mkimage.1
- add range checks when parsing config file values
- add line numbers for reporting errors in config file
- rename SPKG_HEADER_SIGNATURE to SPKG_HEADER_MARKER
- fix segfault when image is padded by less than 4 bytes
- minor style and typo fixes
Changes in v2:
- rewrote the stand-alone spkg_utility to integrate into mkimage
board/schneider/rzn1-snarc/spkgimage.cfg | 26 ++ boot/image.c | 1 + doc/mkimage.1 | 45 +++ include/image.h | 1 + tools/Makefile | 1 + tools/renesas_spkgimage.c | 338 +++++++++++++++++++++++ tools/renesas_spkgimage.h | 87 ++++++ 7 files changed, 499 insertions(+) create mode 100644 board/schneider/rzn1-snarc/spkgimage.cfg create mode 100644 tools/renesas_spkgimage.c create mode 100644 tools/renesas_spkgimage.h
board/schneider/rzn1-snarc/spkgimage.cfg new file +26 -0
@@ -0,0 +1,26 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2022 Schneider Electric +# +# SPKG image header, for booting on RZ/N1 + +# b[35:32] SPKG version +VERSION 1 + +# b[42:41] ECC Block size: 0=256 bytes, 1=512 bytes, 2=1024 bytes +NAND_ECC_BLOCK_SIZE 1 + +# b[45] NAND enable (boolean) +NAND_ECC_ENABLE 1 + +# b[50:48] ECC Scheme: 0=BCH2 1=BCH4 2=BCH8 3=BCH16 4=BCH24 5=BCH32 +NAND_ECC_SCHEME 3 + +# b[63:56] ECC bytes per block +NAND_BYTES_PER_ECC_BLOCK 28 + +# Provide dummy BLp header (boolean) +ADD_DUMMY_BLP 1 + +# Pad the image to a multiple of +PADDING 64K
boot/image.c +1 -0
@@ -181,6 +181,7 @@ static const table_entry_t uimage_type[] = { { IH_TYPE_SUNXI_EGON, "sunxi_egon", "Allwinner eGON Boot Image" }, { IH_TYPE_SUNXI_TOC0, "sunxi_toc0", "Allwinner TOC0 Boot Image" }, { IH_TYPE_FDT_LEGACY, "fdt_legacy", "legacy Image with Flat Device Tree ", }, + { IH_TYPE_RENESAS_SPKG, "spkgimage", "Renesas SPKG Image" }, { -1, "", "", }, };
doc/mkimage.1 +45 -0
51 lines not on this page · raw message
include/image.h +1 -0
@@ -230,6 +230,7 @@ enum image_type_t {IH_TYPE_SUNXI_EGON ,/* Allwinner eGON Boot Image */ IH_TYPE_SUNXI_TOC0 ,/* Allwinner TOC0 Boot Image */ IH_TYPE_FDT_LEGACY ,/* Binary Flat Device Tree Blob in a Legacy Image */ +IH_TYPE_RENESAS_SPKG ,/* Renesas SPKG image */ IH_TYPE_COUNT, /* Number of image types */ };
tools/Makefile +1 -0
@@ -122,6 +122,7 @@ dumpimage-mkimage-objs := aisimage.o \ os_support.o \ pblimage.o \ pbl_crc32.o \ + renesas_spkgimage.o \ vybridimage.o \ stm32image.o \ $(ROCKCHIP_OBS) \
tools/renesas_spkgimage.c new file +338 -0
338 lines not on this page · raw message
tools/renesas_spkgimage.h new file +87 -0
87 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v5 10/10 doc: renesas: add Renesas board docs
In reply to Ralph SiemsenAs a starting point, list all currently supported Renesas boards.
For the RZ/N1 board, add details about booting and flashing.
---
(no changes since v5)
Changes in v5:
- added renesas dir to doc/board/index.rst
- corrections to list of Renesas boards
- move RZ/N1 detail into its own file
- moved binman description ahead of mkimage
doc/board/index.rst | 1 + doc/board/renesas/index.rst | 10 +++++ doc/board/renesas/renesas.rst | 45 ++++++++++++++++++++ doc/board/renesas/rzn1.rst | 77 +++++++++++++++++++++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 doc/board/renesas/index.rst create mode 100644 doc/board/renesas/renesas.rst create mode 100644 doc/board/renesas/rzn1.rst
doc/board/index.rst +1 -0
@@ -33,6 +33,7 @@ Board-specific doc openpiton/index purism/index qualcomm/index + renesas/index rockchip/index samsung/index siemens/index
doc/board/renesas/index.rst new file +10 -0
@@ -0,0 +1,10 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Renesas +======= + +.. toctree:: + :maxdepth: 2 + + renesas + rzn1
doc/board/renesas/renesas.rst new file +45 -0
45 lines not on this page · raw message
doc/board/renesas/rzn1.rst new file +77 -0
77 lines not on this page · raw message
Signature · 1 line
2.25.1