dts: socfpga: Add trigger-address property to QSPI device
Rush
PATCH v2 6/8 dts: socfpga: Add trigger-address property to QSPI device
Add the 'cdns,trigger-address' property to the cadence QSPI device node for Altera SoC devices.
---
Changed in v2:
- renamed trigger-base to trigger-address
arch/arm/dts/socfpga.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/dts/socfpga.dtsi +1 -0
@@ -646,6 +646,7 @@ num-cs = <4>; fifo-depth = <128>; sram-size = <128>; + trigger-address = <0x00000000>; bus-num = <2>; status = "disabled"; };
Signature · 1 line
2.11.0
PATCH v2 6/8 dts: socfpga: Add trigger-address property to QSPI device
Hi Jason,
Quoted 16 lines · Jason A.
Add the 'cdns,trigger-address' property to the cadence QSPI device node for Altera SoC devices.
Signed-off-by Jason A. Rush <[email protected]>---
Changed in v2:
- renamed trigger-base to trigger-addressarch/arm/dts/socfpga.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm/dts/socfpga.dtsi +0
-0
arch/arm/dts/socfpga.dtsi line 649
Quoted 4 lines
arch/arm/dts/socfpga.dtsi +1
-0@@ -646,6 +646,7 @@ num-cs = <4>; fifo-depth = <128>; sram-size = <128>; + trigger-address = <0x00000000>;
According to the documentation I see, the indaddrtrig on SoCFPGA is at offset of 0x1C.
Dinh
Rush
PATCH v2 6/8 dts: socfpga: Add trigger-address property to QSPI device
Quoted 14 lines · Dinh Nguyen
Hi Jason,
Quoted 11 lines · Jason A.
Add the 'cdns,trigger-address' property to the cadence QSPI device node for Altera SoC devices.
Signed-off-by Jason A. Rush <[email protected]>---
Changed in v2:
- renamed trigger-base to trigger-addressarch/arm/dts/socfpga.dtsi | 1 + 1 file changed, 1 insertion(+)
Quoted 13 lines
arch/arm/dts/socfpga.dtsi line 649
Quoted 9 lines
arch/arm/dts/socfpga.dtsi +1
-0@@ -646,6 +646,7 @@ num-cs = <4>; fifo-depth = <128>; sram-size = <128>; + trigger-address = <0x00000000>;According to the documentation I see, the indaddrtrig on SoCFPGA is at offset of
0x1C.
Yes, the indaddrtrig register is at offset 0x1C, but the 'trigger-address' property is the value written to that address.
In older versions of U-Boot (where the CQSPI worked) the value was Written into the indaddrtrig register with the following code:
((u32)plat->ahbbase & CQSPI_INDIRECTTRIGGER_ADDR_MASK)
ahbbase is 0xffa00000 and the mask is 0xFFFFF, which resulted in writing a 0x0 into the indaddrtrig register.
Later changes to the CQSPI code removed that mask, so the indaddrtrig register was programmed with 0xffa00000 which resulted in the CPU resetting whenever a read/write was performed.
You can see this same change has been incorporated into the 4.10 kernel:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/socfpga.dtsi?id=refs/tags/v4.10#n727
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/mtd/spi-nor/cadence-quadspi.c?id=refs/tags/v4.10#n1054
--
Regards,
Jason
PATCH v2 6/8 dts: socfpga: Add trigger-address property to QSPI device
Quoted 40 lines · Jason A.
Quoted 14 lines · Dinh Nguyen
Hi Jason,
Quoted 11 lines · Jason A.
Add the 'cdns,trigger-address' property to the cadence QSPI device node for Altera SoC devices.
Signed-off-by Jason A. Rush <[email protected]>---
Changed in v2:
- renamed trigger-base to trigger-addressarch/arm/dts/socfpga.dtsi | 1 + 1 file changed, 1 insertion(+)Quoted 13 lines
arch/arm/dts/socfpga.dtsi line 649
Quoted 9 lines
arch/arm/dts/socfpga.dtsi +1
-0@@ -646,6 +646,7 @@ num-cs = <4>; fifo-depth = <128>; sram-size = <128>; + trigger-address = <0x00000000>;According to the documentation I see, the indaddrtrig on SoCFPGA is at offset of
0x1C.Yes, the indaddrtrig register is at offset
0x1C, but the 'trigger-address' property is the value written to that address.In older versions of U-Boot (where the CQSPI worked) the value was Written into the indaddrtrig register with the following code:
((u32)plat->ahbbase &
CQSPI_INDIRECTTRIGGER_ADDR_MASK)ahbbase is
0xffa00000and the mask is0xFFFFF, which resulted in writing a0x0into the indaddrtrig register.
Quoted 8 lines
Later changes to the CQSPI code removed that mask, so the indaddrtrig register was programmed with
0xffa00000which resulted in the CPU resetting whenever a read/write was performed.You can see this same change has been incorporated into the 4.10 kernel:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/socfpga.dtsi?id=refs/tags/v4.10#n727
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/mtd/spi-nor/cadence-quadspi.c?id=refs/tags/v4.10#n1054
Ah ok. Thanks for the explanation, and sorry for the noise.
Dinh