[U-Boot] [PATCH] ARM: dts: am437x-idk: Fix QSPI compatible string

Unlike Linux kernel, U-Boot depends on "spi-flash" compatible to probe m25p80 spi-nor devices. Hence, add "spi-flash" compatible string to m25p80 node. Without this patch, flash device DT data is not parsed and QSPI operates in unsupported mode leading to data corruption.
Signed-off-by: Vignesh R vigneshr@ti.com --- arch/arm/dts/am437x-idk-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/dts/am437x-idk-evm.dts b/arch/arm/dts/am437x-idk-evm.dts index 478f0a62cb1c..e45464716549 100644 --- a/arch/arm/dts/am437x-idk-evm.dts +++ b/arch/arm/dts/am437x-idk-evm.dts @@ -341,7 +341,7 @@
spi-max-frequency = <48000000>; m25p80@0 { - compatible = "mx66l51235l"; + compatible = "mx66l51235l", "spi-flash"; spi-max-frequency = <48000000>; reg = <0>; spi-cpol;

On Thu, Oct 13, 2016 at 3:53 PM, Vignesh R vigneshr@ti.com wrote:
Unlike Linux kernel, U-Boot depends on "spi-flash" compatible to probe m25p80 spi-nor devices. Hence, add "spi-flash" compatible string to m25p80 node. Without this patch, flash device DT data is not parsed and QSPI operates in unsupported mode leading to data corruption.
Signed-off-by: Vignesh R vigneshr@ti.com
Applied to u-boot-spi/master
thanks!

On Thu, Oct 13, 2016 at 05:45:52PM +0530, Jagan Teki wrote:
On Thu, Oct 13, 2016 at 3:53 PM, Vignesh R vigneshr@ti.com wrote:
Unlike Linux kernel, U-Boot depends on "spi-flash" compatible to probe m25p80 spi-nor devices. Hence, add "spi-flash" compatible string to m25p80 node. Without this patch, flash device DT data is not parsed and QSPI operates in unsupported mode leading to data corruption.
Signed-off-by: Vignesh R vigneshr@ti.com
Applied to u-boot-spi/master
... I don't like that we need a non u-boot prefixed string here for the binding to work as that will lead to harder re-syncs later on the dt files. Why aren't we matching on the existing part? Thanks!

On Thu, Oct 13, 2016 at 6:24 PM, Tom Rini trini@konsulko.com wrote:
On Thu, Oct 13, 2016 at 05:45:52PM +0530, Jagan Teki wrote:
On Thu, Oct 13, 2016 at 3:53 PM, Vignesh R vigneshr@ti.com wrote:
Unlike Linux kernel, U-Boot depends on "spi-flash" compatible to probe m25p80 spi-nor devices. Hence, add "spi-flash" compatible string to m25p80 node. Without this patch, flash device DT data is not parsed and QSPI operates in unsupported mode leading to data corruption.
Signed-off-by: Vignesh R vigneshr@ti.com
Applied to u-boot-spi/master
... I don't like that we need a non u-boot prefixed string here for the binding to work as that will lead to harder re-syncs later on the dt files. Why aren't we matching on the existing part? Thanks!
Most of these compatibles from Linux, and we're unable to support as of now. and moment we moved to spi-nor the we will maintain the compatible of all these like Linux.
Too speed-up, can you please look at the last approach was submitted on [1]
[1] [PATCH RFC v8 00/16] SPI-NOR/MTD addition
thanks!

Hi Jagan,
On Thursday 13 October 2016 06:24 PM, Tom Rini wrote:
On Thu, Oct 13, 2016 at 05:45:52PM +0530, Jagan Teki wrote:
On Thu, Oct 13, 2016 at 3:53 PM, Vignesh R vigneshr@ti.com wrote:
Unlike Linux kernel, U-Boot depends on "spi-flash" compatible to probe m25p80 spi-nor devices. Hence, add "spi-flash" compatible string to m25p80 node. Without this patch, flash device DT data is not parsed and QSPI operates in unsupported mode leading to data corruption.
Signed-off-by: Vignesh R vigneshr@ti.com
Applied to u-boot-spi/master
... I don't like that we need a non u-boot prefixed string here for the binding to work as that will lead to harder re-syncs later on the dt files. Why aren't we matching on the existing part? Thanks!
I don't see this patch in u-boot master yet. If this patch was dropped due to Tom's comment above, then could you suggest how to address the issue?

On Mon, Nov 21, 2016 at 10:07 AM, Vignesh R vigneshr@ti.com wrote:
Hi Jagan,
On Thursday 13 October 2016 06:24 PM, Tom Rini wrote:
On Thu, Oct 13, 2016 at 05:45:52PM +0530, Jagan Teki wrote:
On Thu, Oct 13, 2016 at 3:53 PM, Vignesh R vigneshr@ti.com wrote:
Unlike Linux kernel, U-Boot depends on "spi-flash" compatible to probe m25p80 spi-nor devices. Hence, add "spi-flash" compatible string to m25p80 node. Without this patch, flash device DT data is not parsed and QSPI operates in unsupported mode leading to data corruption.
Signed-off-by: Vignesh R vigneshr@ti.com
Applied to u-boot-spi/master
... I don't like that we need a non u-boot prefixed string here for the binding to work as that will lead to harder re-syncs later on the dt files. Why aren't we matching on the existing part? Thanks!
I don't see this patch in u-boot master yet. If this patch was dropped due to Tom's comment above, then could you suggest how to address the issue?
Some how missed this, but do you still unable to probe the flash w/o "spi-flash"? I think there is a device_probe when !device_active(dev) that will detect the flash chip. Please try once.
thanks!

On Monday 21 November 2016 11:33 PM, Jagan Teki wrote:
On Mon, Nov 21, 2016 at 10:07 AM, Vignesh R vigneshr@ti.com wrote:
Hi Jagan,
On Thursday 13 October 2016 06:24 PM, Tom Rini wrote:
On Thu, Oct 13, 2016 at 05:45:52PM +0530, Jagan Teki wrote:
On Thu, Oct 13, 2016 at 3:53 PM, Vignesh R vigneshr@ti.com wrote:
Unlike Linux kernel, U-Boot depends on "spi-flash" compatible to probe m25p80 spi-nor devices. Hence, add "spi-flash" compatible string to m25p80 node. Without this patch, flash device DT data is not parsed and QSPI operates in unsupported mode leading to data corruption.
Signed-off-by: Vignesh R vigneshr@ti.com
Applied to u-boot-spi/master
... I don't like that we need a non u-boot prefixed string here for the binding to work as that will lead to harder re-syncs later on the dt files. Why aren't we matching on the existing part? Thanks!
I don't see this patch in u-boot master yet. If this patch was dropped due to Tom's comment above, then could you suggest how to address the issue?
Some how missed this, but do you still unable to probe the flash w/o "spi-flash"? I think there is a device_probe when !device_active(dev) that will detect the flash chip. Please try once.
Yes, the flash is detected. But the device is not bound due to missing "spi-flash" compatible and hence DT properties of flash node are not available to the driver. So, the QSPI controller tries to operate in mode 0 instead of mode 3 and default frequency instead of 48MHz as specified by spi-max-frequency property leading to failure of flashing operations.

On Tuesday 22 November 2016 01:35 PM, Vignesh R wrote:
On Monday 21 November 2016 11:33 PM, Jagan Teki wrote:
On Mon, Nov 21, 2016 at 10:07 AM, Vignesh R vigneshr@ti.com wrote:
Hi Jagan,
On Thursday 13 October 2016 06:24 PM, Tom Rini wrote:
On Thu, Oct 13, 2016 at 05:45:52PM +0530, Jagan Teki wrote:
On Thu, Oct 13, 2016 at 3:53 PM, Vignesh R vigneshr@ti.com wrote:
Unlike Linux kernel, U-Boot depends on "spi-flash" compatible to probe m25p80 spi-nor devices. Hence, add "spi-flash" compatible string to m25p80 node. Without this patch, flash device DT data is not parsed and QSPI operates in unsupported mode leading to data corruption.
Signed-off-by: Vignesh R vigneshr@ti.com
Applied to u-boot-spi/master
... I don't like that we need a non u-boot prefixed string here for the binding to work as that will lead to harder re-syncs later on the dt files. Why aren't we matching on the existing part? Thanks!
I don't see this patch in u-boot master yet. If this patch was dropped due to Tom's comment above, then could you suggest how to address the issue?
Some how missed this, but do you still unable to probe the flash w/o "spi-flash"? I think there is a device_probe when !device_active(dev) that will detect the flash chip. Please try once.
Yes, the flash is detected. But the device is not bound due to missing "spi-flash" compatible and hence DT properties of flash node are not available to the driver. So, the QSPI controller tries to operate in mode 0 instead of mode 3 and default frequency instead of 48MHz as specified by spi-max-frequency property leading to failure of flashing operations.
In case its not clear from above explanation, this patch is still _needed_ in order for DT properties to be picked up. Without this QSPI write operations fail on am437x. Can this patch be picked up for this rc?

On Mon, Nov 28, 2016 at 3:04 PM, Vignesh R vigneshr@ti.com wrote:
On Tuesday 22 November 2016 01:35 PM, Vignesh R wrote:
On Monday 21 November 2016 11:33 PM, Jagan Teki wrote:
On Mon, Nov 21, 2016 at 10:07 AM, Vignesh R vigneshr@ti.com wrote:
Hi Jagan,
On Thursday 13 October 2016 06:24 PM, Tom Rini wrote:
On Thu, Oct 13, 2016 at 05:45:52PM +0530, Jagan Teki wrote:
On Thu, Oct 13, 2016 at 3:53 PM, Vignesh R vigneshr@ti.com wrote: > Unlike Linux kernel, U-Boot depends on "spi-flash" compatible to probe > m25p80 spi-nor devices. Hence, add "spi-flash" compatible string to > m25p80 node. Without this patch, flash device DT data is not parsed and > QSPI operates in unsupported mode leading to data corruption. > > Signed-off-by: Vignesh R vigneshr@ti.com
Applied to u-boot-spi/master
... I don't like that we need a non u-boot prefixed string here for the binding to work as that will lead to harder re-syncs later on the dt files. Why aren't we matching on the existing part? Thanks!
I don't see this patch in u-boot master yet. If this patch was dropped due to Tom's comment above, then could you suggest how to address the issue?
Some how missed this, but do you still unable to probe the flash w/o "spi-flash"? I think there is a device_probe when !device_active(dev) that will detect the flash chip. Please try once.
Yes, the flash is detected. But the device is not bound due to missing "spi-flash" compatible and hence DT properties of flash node are not available to the driver. So, the QSPI controller tries to operate in mode 0 instead of mode 3 and default frequency instead of 48MHz as specified by spi-max-frequency property leading to failure of flashing operations.
In case its not clear from above explanation, this patch is still _needed_ in order for DT properties to be picked up. Without this QSPI write operations fail on am437x. Can this patch be picked up for this rc?
Will pick.
thanks!
participants (3)
-
Jagan Teki
-
Tom Rini
-
Vignesh R