2019-04-04 14:36:29

by Thor Thayer

[permalink] [raw]
Subject: [RESEND PATCHv3 0/3] Update Stratix10 EDAC Bindings

From: Thor Thayer <[email protected]>

This patch series makes the Stratix10 EDAC Bindings
specific to the Stratix10 ARM64 architecture.

Instead of using the Arria10 (ARM32) EDAC bindings for
Stratix10 (ARM64), create Stratix10 specific EDAC bindings
to capture architecture differences between ARM32 and ARM64.
This requires fixing the previous Stratix10 bindings.
Also add the peripheral bindings for the Stratix10.

V2: Remove Stratix10 compatible check.

V3: Remove patches not related to EDAC bindings so that
this patchset is targeted toward the bindings.
Improve the Stratix10 specific binding description by
adding in descriptions of ARM64 differences.

Resend: Add Reviewed-by and Acked-by from bindings and
socfpga device tree maintainers. I'd like this to go
through the EDAC tree since future patches will have
a dependency on these bindings and device tree.

Thor Thayer (3):
Documentation: dt: edac: Fix Stratix10 IRQ bindings
Documentation: dt: edac: Add Stratix10 Peripheral bindings
arm64: dts: stratix10: Use new Stratix10 EDAC bindings

.../devicetree/bindings/edac/socfpga-eccmgr.txt | 135 +++++++++++++++++++--
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 25 ++--
2 files changed, 138 insertions(+), 22 deletions(-)

--
2.7.4


2019-04-04 14:35:40

by Thor Thayer

[permalink] [raw]
Subject: [RESEND PATCHv3 1/3] Documentation: dt: edac: Fix Stratix10 IRQ bindings

From: Thor Thayer <[email protected]>

Fix Stratix10 ECC bindings to specify only the single
bit error. On Stratix10 double bit errors are handled
as SErrors instead of interrupts.
Indicate the differences between the ARM64 and ARM32
EDAC architecture in the bindings.

Signed-off-by: Thor Thayer <[email protected]>
Acked-by: Rob Herring <[email protected]>
---
v2 No change
v3 Add ARM64 to Stratix10 description for clarity about
differences between Arria10 and Stratix10.
Add Acked-by
---
.../devicetree/bindings/edac/socfpga-eccmgr.txt | 29 ++++++++++++++--------
1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/edac/socfpga-eccmgr.txt b/Documentation/devicetree/bindings/edac/socfpga-eccmgr.txt
index 5626560a6cfd..acb211c098c0 100644
--- a/Documentation/devicetree/bindings/edac/socfpga-eccmgr.txt
+++ b/Documentation/devicetree/bindings/edac/socfpga-eccmgr.txt
@@ -232,37 +232,46 @@ Example:
};
};

-Stratix10 SoCFPGA ECC Manager
+Stratix10 SoCFPGA ECC Manager (ARM64)
The Stratix10 SoC ECC Manager handles the IRQs for each peripheral
-in a shared register similar to the Arria10. However, ECC requires
-access to registers that can only be read from Secure Monitor with
-SMC calls. Therefore the device tree is slightly different.
+in a shared register similar to the Arria10. However, Stratix10 ECC
+requires access to registers that can only be read from Secure Monitor
+with SMC calls. Therefore the device tree is slightly different. Note
+that only 1 interrupt is sent in Stratix10 because the double bit errors
+are treated as SErrors in ARM64 instead of IRQs in ARM32.

Required Properties:
- compatible : Should be "altr,socfpga-s10-ecc-manager"
-- interrupts : Should be single bit error interrupt, then double bit error
- interrupt.
+- altr,sysgr-syscon : phandle to Stratix10 System Manager Block
+ containing the ECC manager registers.
+- interrupts : Should be single bit error interrupt.
- interrupt-controller : boolean indicator that ECC Manager is an interrupt controller
- #interrupt-cells : must be set to 2.
+- #address-cells: must be 1
+- #size-cells: must be 1
+- ranges : standard definition, should translate from local addresses

Subcomponents:

SDRAM ECC
Required Properties:
- compatible : Should be "altr,sdram-edac-s10"
-- interrupts : Should be single bit error interrupt, then double bit error
- interrupt, in this order.
+- interrupts : Should be single bit error interrupt.

Example:

eccmgr {
compatible = "altr,socfpga-s10-ecc-manager";
- interrupts = <0 15 4>, <0 95 4>;
+ altr,sysmgr-syscon = <&sysmgr>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ interrupts = <0 15 4>;
interrupt-controller;
#interrupt-cells = <2>;
+ ranges;

sdramedac {
compatible = "altr,sdram-edac-s10";
- interrupts = <16 4>, <48 4>;
+ interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
};
};
--
2.7.4

2019-04-04 14:35:40

by Thor Thayer

[permalink] [raw]
Subject: [RESEND PATCHv3 3/3] arm64: dts: stratix10: Use new Stratix10 EDAC bindings

From: Thor Thayer <[email protected]>

Use the new Stratix10 binding format for EDAC nodes.

Signed-off-by: Thor Thayer <[email protected]>
Acked-by: Dinh Nguyen <[email protected]>
---
v2-3 No change
Resend adds Acked-by.
---
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 25 ++++++++++++-----------
1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
index e3f5eaa3657d..41109995563c 100644
--- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
+++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi
@@ -531,11 +531,12 @@
};

eccmgr {
- compatible = "altr,socfpga-a10-ecc-manager";
+ compatible = "altr,socfpga-s10-ecc-manager",
+ "altr,socfpga-a10-ecc-manager";
altr,sysmgr-syscon = <&sysmgr>;
#address-cells = <1>;
#size-cells = <1>;
- interrupts = <0 15 4>, <0 95 4>;
+ interrupts = <0 15 4>;
interrupt-controller;
#interrupt-cells = <2>;
ranges;
@@ -543,31 +544,31 @@
sdramedac {
compatible = "altr,sdram-edac-s10";
altr,sdr-syscon = <&sdr>;
- interrupts = <16 4>, <48 4>;
+ interrupts = <16 4>;
};

usb0-ecc@ff8c4000 {
- compatible = "altr,socfpga-usb-ecc";
+ compatible = "altr,socfpga-s10-usb-ecc",
+ "altr,socfpga-usb-ecc";
reg = <0xff8c4000 0x100>;
altr,ecc-parent = <&usb0>;
- interrupts = <2 4>,
- <34 4>;
+ interrupts = <2 4>;
};

emac0-rx-ecc@ff8c0000 {
- compatible = "altr,socfpga-eth-mac-ecc";
+ compatible = "altr,socfpga-s10-eth-mac-ecc",
+ "altr,socfpga-eth-mac-ecc";
reg = <0xff8c0000 0x100>;
altr,ecc-parent = <&gmac0>;
- interrupts = <4 4>,
- <36 4>;
+ interrupts = <4 4>;
};

emac0-tx-ecc@ff8c0400 {
- compatible = "altr,socfpga-eth-mac-ecc";
+ compatible = "altr,socfpga-s10-eth-mac-ecc",
+ "altr,socfpga-eth-mac-ecc";
reg = <0xff8c0400 0x100>;
altr,ecc-parent = <&gmac0>;
- interrupts = <5 4>,
- <37 4>;
+ interrupts = <5 4>;
};

};
--
2.7.4

2019-04-04 14:35:43

by Thor Thayer

[permalink] [raw]
Subject: [RESEND PATCHv3 2/3] Documentation: dt: edac: Add Stratix10 Peripheral bindings

From: Thor Thayer <[email protected]>

Add peripheral bindings for Stratix10 EDAC to capture
the differences between the ARM64 and ARM32 architecture.

Signed-off-by: Thor Thayer <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
---
v2-3 No change.
Resend adds Reviewed-by
---
.../devicetree/bindings/edac/socfpga-eccmgr.txt | 106 +++++++++++++++++++++
1 file changed, 106 insertions(+)

diff --git a/Documentation/devicetree/bindings/edac/socfpga-eccmgr.txt b/Documentation/devicetree/bindings/edac/socfpga-eccmgr.txt
index acb211c098c0..8f52206cfd2a 100644
--- a/Documentation/devicetree/bindings/edac/socfpga-eccmgr.txt
+++ b/Documentation/devicetree/bindings/edac/socfpga-eccmgr.txt
@@ -258,6 +258,49 @@ Required Properties:
- compatible : Should be "altr,sdram-edac-s10"
- interrupts : Should be single bit error interrupt.

+On-Chip RAM ECC
+Required Properties:
+- compatible : Should be "altr,socfpga-s10-ocram-ecc"
+- reg : Address and size for ECC block registers.
+- altr,ecc-parent : phandle to parent OCRAM node.
+- interrupts : Should be single bit error interrupt.
+
+Ethernet FIFO ECC
+Required Properties:
+- compatible : Should be "altr,socfpga-s10-eth-mac-ecc"
+- reg : Address and size for ECC block registers.
+- altr,ecc-parent : phandle to parent Ethernet node.
+- interrupts : Should be single bit error interrupt.
+
+NAND FIFO ECC
+Required Properties:
+- compatible : Should be "altr,socfpga-s10-nand-ecc"
+- reg : Address and size for ECC block registers.
+- altr,ecc-parent : phandle to parent NAND node.
+- interrupts : Should be single bit error interrupt.
+
+DMA FIFO ECC
+Required Properties:
+- compatible : Should be "altr,socfpga-s10-dma-ecc"
+- reg : Address and size for ECC block registers.
+- altr,ecc-parent : phandle to parent DMA node.
+- interrupts : Should be single bit error interrupt.
+
+USB FIFO ECC
+Required Properties:
+- compatible : Should be "altr,socfpga-s10-usb-ecc"
+- reg : Address and size for ECC block registers.
+- altr,ecc-parent : phandle to parent USB node.
+- interrupts : Should be single bit error interrupt.
+
+SDMMC FIFO ECC
+Required Properties:
+- compatible : Should be "altr,socfpga-s10-sdmmc-ecc"
+- reg : Address and size for ECC block registers.
+- altr,ecc-parent : phandle to parent SD/MMC node.
+- interrupts : Should be single bit error interrupt for port A
+ and then single bit error interrupt for port B.
+
Example:

eccmgr {
@@ -274,4 +317,67 @@ Example:
compatible = "altr,sdram-edac-s10";
interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
};
+
+ ocram-ecc@ff8cc000 {
+ compatible = "altr,socfpga-s10-ocram-ecc";
+ reg = <ff8cc000 0x100>;
+ altr,ecc-parent = <&ocram>;
+ interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ emac0-rx-ecc@ff8c0000 {
+ compatible = "altr,socfpga-s10-eth-mac-ecc";
+ reg = <0xff8c0000 0x100>;
+ altr,ecc-parent = <&gmac0>;
+ interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ emac0-tx-ecc@ff8c0400 {
+ compatible = "altr,socfpga-s10-eth-mac-ecc";
+ reg = <0xff8c0400 0x100>;
+ altr,ecc-parent = <&gmac0>;
+ interrupts = <5 IRQ_TYPE_LEVEL_HIGH>'
+ };
+
+ nand-buf-ecc@ff8c8000 {
+ compatible = "altr,socfpga-s10-nand-ecc";
+ reg = <0xff8c8000 0x100>;
+ altr,ecc-parent = <&nand>;
+ interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ nand-rd-ecc@ff8c8400 {
+ compatible = "altr,socfpga-s10-nand-ecc";
+ reg = <0xff8c8400 0x100>;
+ altr,ecc-parent = <&nand>;
+ interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ nand-wr-ecc@ff8c8800 {
+ compatible = "altr,socfpga-s10-nand-ecc";
+ reg = <0xff8c8800 0x100>;
+ altr,ecc-parent = <&nand>;
+ interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ dma-ecc@ff8c9000 {
+ compatible = "altr,socfpga-s10-dma-ecc";
+ reg = <0xff8c9000 0x100>;
+ altr,ecc-parent = <&pdma>;
+ interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
+
+ usb0-ecc@ff8c4000 {
+ compatible = "altr,socfpga-s10-usb-ecc";
+ reg = <0xff8c4000 0x100>;
+ altr,ecc-parent = <&usb0>;
+ interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
+ };
+
+ sdmmc-ecc@ff8c8c00 {
+ compatible = "altr,socfpga-s10-sdmmc-ecc";
+ reg = <0xff8c8c00 0x100>;
+ altr,ecc-parent = <&mmc>;
+ interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
+ <15 IRQ_TYPE_LEVEL_HIGH>;
+ };
};
--
2.7.4

2019-04-09 19:11:08

by Thor Thayer

[permalink] [raw]
Subject: Re: [RESEND PATCHv3 0/3] Update Stratix10 EDAC Bindings

Hi Boris,

On 4/4/19 9:36 AM, [email protected] wrote:
> From: Thor Thayer <[email protected]>
>
> This patch series makes the Stratix10 EDAC Bindings
> specific to the Stratix10 ARM64 architecture.
>
> Instead of using the Arria10 (ARM32) EDAC bindings for
> Stratix10 (ARM64), create Stratix10 specific EDAC bindings
> to capture architecture differences between ARM32 and ARM64.
> This requires fixing the previous Stratix10 bindings.
> Also add the peripheral bindings for the Stratix10.
>
> V2: Remove Stratix10 compatible check.
>
> V3: Remove patches not related to EDAC bindings so that
> this patchset is targeted toward the bindings.
> Improve the Stratix10 specific binding description by
> adding in descriptions of ARM64 differences.
>
> Resend: Add Reviewed-by and Acked-by from bindings and
> socfpga device tree maintainers. I'd like this to go
> through the EDAC tree since future patches will have
> a dependency on these bindings and device tree.
>
> Thor Thayer (3):
> Documentation: dt: edac: Fix Stratix10 IRQ bindings
> Documentation: dt: edac: Add Stratix10 Peripheral bindings
> arm64: dts: stratix10: Use new Stratix10 EDAC bindings
>
> .../devicetree/bindings/edac/socfpga-eccmgr.txt | 135 +++++++++++++++++++--
> arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 25 ++--
> 2 files changed, 138 insertions(+), 22 deletions(-)
>

If possible, I'd like this series to go through the EDAC tree since
future patches will follow this format.

Regards,

Thor

2019-04-09 20:14:28

by Borislav Petkov

[permalink] [raw]
Subject: Re: [RESEND PATCHv3 0/3] Update Stratix10 EDAC Bindings

On Tue, Apr 09, 2019 at 02:11:58PM -0500, Thor Thayer wrote:
> If possible, I'd like this series to go through the EDAC tree since future
> patches will follow this format.

You know how that works - I need ACKs.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

2019-04-09 22:30:56

by Thor Thayer

[permalink] [raw]
Subject: Re: [RESEND PATCHv3 0/3] Update Stratix10 EDAC Bindings

Hi Boris,

On 4/9/19 3:13 PM, Borislav Petkov wrote:
> On Tue, Apr 09, 2019 at 02:11:58PM -0500, Thor Thayer wrote:
>> If possible, I'd like this series to go through the EDAC tree since future
>> patches will follow this format.
>
> You know how that works - I need ACKs.
>

I have ACKs on patches 1 & 3. Patch 2 has a Reviewed-by from Rob Herring
which was sufficient in the past.

Here are the links to the original ACKs and Reviewed-by.

Patch 1: https://patchwork.codeaurora.org/patch/737155/
Patch 2: https://patchwork.codeaurora.org/patch/757205/
Patch 3: https://patchwork.codeaurora.org/patch/757207/

2019-04-10 19:13:24

by Borislav Petkov

[permalink] [raw]
Subject: Re: [RESEND PATCHv3 0/3] Update Stratix10 EDAC Bindings

On Tue, Apr 09, 2019 at 05:32:07PM -0500, Thor Thayer wrote:
> I have ACKs on patches 1 & 3. Patch 2 has a Reviewed-by from Rob Herring
> which was sufficient in the past.

Sorry about that - I missed those because I looked only at the diffstat
and decided this series is not for me :)

Anyway, all three applied now.

Thx.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.