EDAC: Add Nuvoton NPCM7xx EDAC driver
Subsystems (3)
PATCH v2 1/2 EDAC: Add Nuvoton NPCM7xx EDAC driver
Add support for the Nuvoton NPCM7xx SoC EDAC driver
NPCM7xx ECC datasheet from nuvoton.israel-Poleg:
"Cadence DDR Controller User’s Manual For DDR3 & DDR4 Memories"
Tested: Forcing an ECC error event
Write a value to the xor_check_bits parameter that will trigger an ECC event once that word is read
For example, to force a single-bit correctable error on bit 0 of the user-word space shown, write 0x75 into that byte of the xor_check_bits parameter and then assert fwc (force write check) bit to 'b1' (mem base: 0xf0824000, xor_check_bits reg addr: 0x178)
$ devmem 0xf0824178 32 0x7501
To force a double-bit un-correctable error for the user-word space, write 0x03 into that byte of the xor_check_bits parameter
$ devmem 0xf0824178 32 0x301
--- MAINTAINERS | 7 + drivers/edac/Kconfig | 7 + drivers/edac/Makefile | 1 + drivers/edac/npcm7xx_edac.c | 424 ++++++++++++++++++++++++++++++++++++ 4 files changed, 439 insertions(+) create mode 100644 drivers/edac/npcm7xx_edac.c
MAINTAINERS +7 -0
@@ -5527,6 +5527,13 @@ L: [email protected] S: Maintained F: drivers/edac/mpc85xx_edac.[ch] +EDAC-NPCM7XX +M: George Hung <[email protected]> +L: [email protected] +S: Maintained +F: drivers/edac/npcm7xx_edac.c +F: Documentation/devicetree/bindings/edac/npcm7xx-sdram-edac.txt + EDAC-PASEMI M: Egor Martovetsky <[email protected]> L: [email protected]
drivers/edac/Kconfig +7 -0
@@ -475,4 +475,11 @@ config EDAC_QCOM For debugging issues having to do with stability and overall system health, you should probably say 'Y' here. +config EDAC_NPCM7XX + tristate "Nuvoton NPCM7xx DDR Memory Controller" + depends on ARCH_NPCM7XX + help + Support for error detection and correction on the + Nuvoton NPCM7xx DDR memory controller. + endif # EDAC
drivers/edac/Makefile +1 -0
@@ -78,3 +78,4 @@ obj-$(CONFIG_EDAC_SYNOPSYS) += synopsys_edac.o obj-$(CONFIG_EDAC_XGENE) += xgene_edac.o obj-$(CONFIG_EDAC_TI) += ti_edac.o obj-$(CONFIG_EDAC_QCOM) += qcom_edac.o +obj-$(CONFIG_EDAC_NPCM7XX) += npcm7xx_edac.o
drivers/edac/npcm7xx_edac.c new file +424 -0
424 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH v2 2/2 EDAC: Add Nuvoton NPCM7xx EDAC driver
Add device tree document for Nuvoton NPCM7xx EDAC
--- .../bindings/edac/npcm7xx-sdram-edac.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Documentation/devicetree/bindings/edac/npcm7xx-sdram-edac.txt
Documentation/devicetree/bindings/edac/npcm7xx-sdram-edac.txt new file +17 -0
@@ -0,0 +1,17 @@ +Nuvoton NPCM7xx SoC EDAC device driver + +The Nuvoton NPCM7xx SoC supports DDR4 memory with/without ECC and the driver +uses the EDAC framework to implement the ECC detection and corrtection. + +Required properties: +- compatible: should be "nuvoton,npcm7xx-sdram-edac" +- reg: Memory controller register set should be <0xf0824000 0x1000> +- interrupts: should be MC interrupt #25 + +Example: + + mc: memory-controller@f0824000 { + compatible = "nuvoton,npcm7xx-sdram-edac"; + reg = <0xf0824000 0x1000>; + interrupts = <0 25 4>; + };
Signature · 1 line
2.21.0