arm: dts: k3-j721s2*: Enable OSPI1 with 32-bit address mappings for R5 SPL
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 14 lines · Udit
Thanks Anurag
Quoted 10 lines · Anurag Dutta
The R5 SPL requires 32-bit address mappings for OSPI1(QSPI) access. Override the OSPI1 node with appropriate 32-bit register ranges to enable proper address translation on the 32-bit R5 core, while preserving 64-bit mappings for A72 cores. While at it, remove the disabled status override for ospi1 node to support booting from qspi.
Signed-off-by Anurag Dutta <[email protected]>---
Test logs : https://gist.github.com/anuragdutta731/b65f63f22c69317d714b65a201438cbc
Quoted 6 lines
Could you check, for below error in logs
jedec_spi_norflash@0: Software reset enable failed: -524If this needs some parameter tuning in QSPI node or something to look at driver itself.
Hi Udit
This warning seems to be expected. In file : drivers/mtd/spi/spi-nor-core.c, In function spi_nor_soft_reset(), we can see that spi_nor_setup_op() is being invoked with SNOR_PROTO_8_8_8_DTR as default. However, ours being QSPI(1 1 4) it fails to enable software reset for qspi. This can be confirmed from ospi nor logs :
https://gist.github.com/anuragdutta731/cc30688b596ee063178e6c47947146c0
We do not see the jedec_spi_nor flash@0: Software reset enable failed: -524 warning.
Also, the spi_nor_soft_reset() description clearly mentions that :
The soft reset is executed in Octal DTR mode.
Regards
Anurag
Quoted 34 lines
Quoted 34 lines
arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi| 4 ---- arch/arm/dts/k3-j721s2-r5.dtsi | 5 +++++2 files changed, 5 insertions(+), 4 deletions(-)arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi +0
-3@@ -107,10 +107,6 @@ }; }; -&ospi1 { - status = "disabled"; -}; - &usbss0 { bootph-all; };arch/arm/dts/k3-j721s2-r5.dtsi +4
-0@@ -90,6 +90,11 @@ <0x0 0x50000000 0x0 0x8000000>; }; +&ospi1 { + reg = <0x0 0x47050000 0x0 0x100>, + <0x0 0x58000000 0x0 0x8000000>; +}; + &fss { /* fss node has 64 bit address regions mapped to it and since the ospi * nodes is being override, override the fss node ranges as well
Kumar, Udit
Reviewed-byQuoted 29 lines · Anurag
Quoted 14 lines · Udit
Thanks Anurag
Quoted 10 lines · Anurag Dutta
The R5 SPL requires 32-bit address mappings for OSPI1(QSPI) access. Override the OSPI1 node with appropriate 32-bit register ranges to enable proper address translation on the 32-bit R5 core, while preserving 64-bit mappings for A72 cores. While at it, remove the disabled status override for ospi1 node to support booting from qspi.
Signed-off-by Anurag Dutta <[email protected]>---
Test logs : https://gist.github.com/anuragdutta731/b65f63f22c69317d714b65a201438cbcQuoted 6 lines
Could you check, for below error in logs
jedec_spi_norflash@0: Software reset enable failed: -524If this needs some parameter tuning in QSPI node or something to look at driver itself.
Hi Udit
This warning seems to be expected. In file :drivers/mtd/spi/spi-nor-core.c, In functionspi_nor_soft_reset(), we can see thatspi_nor_setup_op()is being invoked withSNOR_PROTO_8_8_8_DTRas default. However, ours being QSPI(1 1 4) it fails to enable software reset for qspi. This can be confirmed from ospi nor logs :
https://gist.github.com/anuragdutta731/cc30688b596ee063178e6c47947146c0
Quoted 3 lines
We do not see the
jedec_spi_norflash@0: Software reset enable failed:
-524 warning.
Fair, then please fix driver not to call this reset, in case of QSPI.
For this patch
Quoted 40 lines
Also, the
spi_nor_soft_reset()description clearly mentions that :
The soft reset is executed in Octal DTR mode.Regards
AnuragQuoted 34 lines
Quoted 34 lines
arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi| 4 ---- arch/arm/dts/k3-j721s2-r5.dtsi | 5 +++++2 files changed, 5 insertions(+), 4 deletions(-)arch/arm/dts/k3-j721s2-common-proc-board-u-boot.dtsi +0
-3@@ -107,10 +107,6 @@ }; }; -&ospi1 { - status = "disabled"; -}; - &usbss0 { bootph-all; };arch/arm/dts/k3-j721s2-r5.dtsi +4
-0@@ -90,6 +90,11 @@ <0x0 0x50000000 0x0 0x8000000>; }; +&ospi1 { + reg = <0x0 0x47050000 0x0 0x100>, + <0x0 0x58000000 0x0 0x8000000>; +}; + &fss { /* fss node has 64 bit address regions mapped to it and since the ospi * nodes is being override, override the fss node ranges as well