* [PATCH v11 0/3] EDAC: nuvoton: Add nuvoton NPCM memory controller driver
@ 2022-05-27 6:11 medadyoung
2022-05-27 6:11 ` [PATCH v11 1/3] dt-bindings: edac: nuvoton: add NPCM memory controller medadyoung
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: medadyoung @ 2022-05-27 6:11 UTC (permalink / raw)
To: rric, james.morse, tony.luck, mchehab, bp, robh+dt, benjaminfair,
yuenn, venture, KWLIU, YSCHU, JJLIU0, KFTING, avifishman70,
tmaimon77, tali.perry1, ctcchien
Cc: linux-edac, linux-kernel, devicetree, openbmc
From: Medad CChien <ctcchien@nuvoton.com>
Support memory controller for Nuvoton NPCM SoC.
Addressed comments from:
- Rob Herring : https://lkml.org/lkml/2022/2/25/1103
- Krzysztof Kozlowski : https://lkml.org/lkml/2022/2/27/63
- Rob Herring : https://lkml.org/lkml/2022/3/2/828
- Krzysztof Kozlowski : https://lkml.org/lkml/2022/3/11/294
- Jonathan Neuschäfer : https://lkml.org/lkml/2022/3/11/1167
- Krzysztof Kozlowski : https://lkml.org/lkml/2022/3/11/293
- Rob Herring : https://lkml.org/lkml/2022/3/11/575
- Krzysztof Kozlowski : https://lkml.org/lkml/2022/3/11/305
- Avi Fishman : https://lkml.org/lkml/2022/3/13/339
- Krzysztof Kozlowski : https://lkml.org/lkml/2022/3/14/93
- Krzysztof Kozlowski : https://lkml.org/lkml/2022/3/14/95
- Krzysztof Kozlowski : https://lkml.org/lkml/2022/3/15/378
- Boris Petkov : https://lkml.org/lkml/2022/3/17/561
- Paul Menzel : https://lkml.org/lkml/2022/4/9/47
- Paul Menzel : https://lkml.org/lkml/2022/4/11/182
- Borislav Petkov : https://lkml.org/lkml/2022/4/8/871
- Paul Menzel : https://lkml.org/lkml/2022/4/9/51
- Paul Menzel : https://lkml.org/lkml/2022/4/9/65
- Rob Herring : https://lkml.org/lkml/2022/4/21/681
- Paul Menzel : https://lkml.org/lkml/2022/5/3/307
- Paul Menzel : https://lkml.org/lkml/2022/5/3/304
- Borislav Petkov : https://lkml.org/lkml/2022/5/3/343
- Paul Menzel https://lkml.org/lkml/2022/5/10/47
- Paul Menzel https://lkml.org/lkml/2022/5/10/127
Changes since version 11:
- Update MAINTAINERS file
Changes since version 10:
- Add one more maintainer.
- Correct indentation in npcm_edac.c.
- Add datasheet information in commit message.
Changes since version 9:
- Add a necessary blank line in Kconfig for EDAC_NPCM.
- Reflow for 75 characters per line in commit message of devicetree file.
- Remove wrong tags in all the commit message.
- Reorder content in commit message of NPCM memory controller driver.
Changes since version 8:
- Add new line character at the end of file of yaml file
Changes since version 7:
- Refactor npcm_edac.c.
- Sort strings in npcm_edac.c.
- Reflow code for 75 characters per line.
- Summarize errors and warnings reported by kernel test robot.
- Shorten name of values to make them become more readable in npcm_edac.c.
- Put spaces between the * and the text in npcm_edac.c.
Changes since version 6:
- Fix warnings in npcm_edac.c.
- Add information reported by kernel test robot <lkp@intel.com>.
Changes since version 5:
- Update commit message for NPCM memory controller driver.
Changes since version 4:
- Update filename in nuvoton,npcm-memory-controller.yaml.
- Add COMPILE_TEST in Kconfig.
- Fix errors in npcm_edac.c.
- Remove unnecessary checking after of_match_device() and of_device_get_match_data().
Changes since version 3:
- Rename npcm-edac.yaml as nuvoton,npcm-memory-controller.yaml.
- Drop 'EDAC' in title of nuvoton,npcm-memory-controller.yaml.
- Update compatible in nuvoton,npcm-memory-controller.yaml.
Changes since version 2:
- Update description and compatible in npcm-edac.yaml.
- Remove address-cells and size-cells in npcm-edac.yaml.
- Reorder the items of examples in npcm-edac.yaml.
- Reorder header file in driver.
Changes since version 1:
- Add nuvoton,npcm750-memory-controller property in NPCM devicetree.
- Add new property in edac binding document.
- Add new driver for nuvoton NPCM memory controller.
Medad CChien (3):
dt-bindings: edac: nuvoton: add NPCM memory controller
ARM: dts: nuvoton: Add memory controller node
EDAC: nuvoton: Add NPCM memory controller driver
.../edac/nuvoton,npcm-memory-controller.yaml | 62 +++++++++++++++++++
MAINTAINERS | 2 +
arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 7 +++
3 files changed, 71 insertions(+)
create mode 100644 Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v11 1/3] dt-bindings: edac: nuvoton: add NPCM memory controller
2022-05-27 6:11 [PATCH v11 0/3] EDAC: nuvoton: Add nuvoton NPCM memory controller driver medadyoung
@ 2022-05-27 6:11 ` medadyoung
2022-05-27 6:11 ` [PATCH v11 2/3] ARM: dts: nuvoton: Add memory controller node medadyoung
2022-05-27 6:11 ` [PATCH v11 3/3] EDAC: nuvoton: Add NPCM memory controller driver medadyoung
2 siblings, 0 replies; 4+ messages in thread
From: medadyoung @ 2022-05-27 6:11 UTC (permalink / raw)
To: rric, james.morse, tony.luck, mchehab, bp, robh+dt, benjaminfair,
yuenn, venture, KWLIU, YSCHU, JJLIU0, KFTING, avifishman70,
tmaimon77, tali.perry1, ctcchien
Cc: linux-edac, linux-kernel, devicetree, openbmc
From: Medad CChien <ctcchien@nuvoton.com>
Document devicetree bindings for the Nuvoton BMC NPCM memory controller.
Signed-off-by: Medad CChien <ctcchien@nuvoton.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
---
.../edac/nuvoton,npcm-memory-controller.yaml | 62 +++++++++++++++++++
MAINTAINERS | 2 +
2 files changed, 64 insertions(+)
create mode 100644 Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml
diff --git a/Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml b/Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml
new file mode 100644
index 000000000000..a5c8d332d1c1
--- /dev/null
+++ b/Documentation/devicetree/bindings/edac/nuvoton,npcm-memory-controller.yaml
@@ -0,0 +1,62 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/edac/nuvoton,npcm-memory-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Nuvoton NPCM Memory Controller
+
+maintainers:
+ - Medad CChien <ctcchien@nuvoton.com>
+ - Stanley Chu <yschu@nuvoton.com>
+
+description: |
+ The Nuvoton BMC SoC supports DDR4 memory with and without ECC (error
+ correction check).
+
+ The memory controller supports single bit error correction, double bit
+ error detection (in-line ECC in which a section (1/8th) of the memory
+ device used to store data is used for ECC storage).
+
+ Note, the bootloader must configure ECC mode for the memory controller.
+
+properties:
+ compatible:
+ enum:
+ - nuvoton,npcm750-memory-controller
+ - nuvoton,npcm845-memory-controller
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ minItems: 1
+ items:
+ - description: uncorrectable error interrupt
+ - description: correctable error interrupt
+
+ interrupt-names:
+ minItems: 1
+ items:
+ - const: ue
+ - const: ce
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ ahb {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ mc: memory-controller@f0824000 {
+ compatible = "nuvoton,npcm750-memory-controller";
+ reg = <0x0 0xf0824000 0x0 0x1000>;
+ interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 4383949ff654..7f832e6ed4e5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2367,12 +2367,14 @@ L: openbmc@lists.ozlabs.org (moderated for non-subscribers)
S: Supported
F: Documentation/devicetree/bindings/*/*/*npcm*
F: Documentation/devicetree/bindings/*/*npcm*
+F: Documentation/devicetree/bindings/*/npcm-memory-controller.yaml
F: arch/arm/boot/dts/nuvoton-npcm*
F: arch/arm/mach-npcm/
F: drivers/*/*npcm*
F: drivers/*/*/*npcm*
F: include/dt-bindings/clock/nuvoton,npcm7xx-clock.h
+
ARM/NUVOTON WPCM450 ARCHITECTURE
M: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
L: openbmc@lists.ozlabs.org (moderated for non-subscribers)
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v11 2/3] ARM: dts: nuvoton: Add memory controller node
2022-05-27 6:11 [PATCH v11 0/3] EDAC: nuvoton: Add nuvoton NPCM memory controller driver medadyoung
2022-05-27 6:11 ` [PATCH v11 1/3] dt-bindings: edac: nuvoton: add NPCM memory controller medadyoung
@ 2022-05-27 6:11 ` medadyoung
2022-05-27 6:11 ` [PATCH v11 3/3] EDAC: nuvoton: Add NPCM memory controller driver medadyoung
2 siblings, 0 replies; 4+ messages in thread
From: medadyoung @ 2022-05-27 6:11 UTC (permalink / raw)
To: rric, james.morse, tony.luck, mchehab, bp, robh+dt, benjaminfair,
yuenn, venture, KWLIU, YSCHU, JJLIU0, KFTING, avifishman70,
tmaimon77, tali.perry1, ctcchien
Cc: linux-edac, linux-kernel, devicetree, openbmc
From: Medad CChien <ctcchien@nuvoton.com>
ECC must be configured in the BootBlock header.
Then, you can read error counts via the EDAC kernel framework.
Signed-off-by: Medad CChien <ctcchien@nuvoton.com>
---
arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi b/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
index 3696980a3da1..ba542b26941e 100644
--- a/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
+++ b/arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi
@@ -106,6 +106,13 @@
interrupt-parent = <&gic>;
ranges;
+ mc: memory-controller@f0824000 {
+ compatible = "nuvoton,npcm750-memory-controller";
+ reg = <0x0 0xf0824000 0x0 0x1000>;
+ interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
+ status = "disabled";
+ };
+
rstc: rstc@f0801000 {
compatible = "nuvoton,npcm750-reset";
reg = <0xf0801000 0x70>;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v11 3/3] EDAC: nuvoton: Add NPCM memory controller driver
2022-05-27 6:11 [PATCH v11 0/3] EDAC: nuvoton: Add nuvoton NPCM memory controller driver medadyoung
2022-05-27 6:11 ` [PATCH v11 1/3] dt-bindings: edac: nuvoton: add NPCM memory controller medadyoung
2022-05-27 6:11 ` [PATCH v11 2/3] ARM: dts: nuvoton: Add memory controller node medadyoung
@ 2022-05-27 6:11 ` medadyoung
2 siblings, 0 replies; 4+ messages in thread
From: medadyoung @ 2022-05-27 6:11 UTC (permalink / raw)
To: rric, james.morse, tony.luck, mchehab, bp, robh+dt, benjaminfair,
yuenn, venture, KWLIU, YSCHU, JJLIU0, KFTING, avifishman70,
tmaimon77, tali.perry1, ctcchien
Cc: linux-edac, linux-kernel, devicetree, openbmc
From: Medad CChien <ctcchien@nuvoton.com>
Add memory controller support for Nuvoton NPCM SoC.
Note:
you can force an ecc event by writing a string to edac sysfs node
and remember to define CONFIG_EDAC_DEBUG to enable this feature
example: force a correctable event on checkcode bit 0
echo "CE checkcode 0" to below path
/sys/devices/system/edac/mc/mc0/forced_ecc_error
Datasheet:
Cadence DDR Controller Register Reference Manual For DDR4 Memories
Chapter 2: Detailed Register Map
Signed-off-by: Medad CChien <ctcchien@nuvoton.com>
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 7f832e6ed4e5..8919fb83f485 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2372,9 +2372,9 @@ F: arch/arm/boot/dts/nuvoton-npcm*
F: arch/arm/mach-npcm/
F: drivers/*/*npcm*
F: drivers/*/*/*npcm*
+F: drivers/edac/npcm_edac.c b/drivers/edac/npcm_edac.c
F: include/dt-bindings/clock/nuvoton,npcm7xx-clock.h
-
ARM/NUVOTON WPCM450 ARCHITECTURE
M: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
L: openbmc@lists.ozlabs.org (moderated for non-subscribers)
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-27 6:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 6:11 [PATCH v11 0/3] EDAC: nuvoton: Add nuvoton NPCM memory controller driver medadyoung
2022-05-27 6:11 ` [PATCH v11 1/3] dt-bindings: edac: nuvoton: add NPCM memory controller medadyoung
2022-05-27 6:11 ` [PATCH v11 2/3] ARM: dts: nuvoton: Add memory controller node medadyoung
2022-05-27 6:11 ` [PATCH v11 3/3] EDAC: nuvoton: Add NPCM memory controller driver medadyoung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).