Skip to contentSkip to conversation

ARM: dts: at91: sama5d4_xplained: Mark optional AT25DF321A as disabled

PATCH In review Tudor Ambarus 2 participants 3 messages Jun 22, 2021 – Jun 24, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: at91: sama5d4_xplained: Mark optional AT25DF321A as disabled

sama5d4_xplained has an optional on-board serial DataFlash (AT25DF321A), which does not come populated on board by default. Mark it as disabled to avoid the following probe error:
spi-nor spi0.0: unrecognized JEDEC id bytes: 00 00 00 00 00 00

---
 arch/arm/boot/dts/at91-sama5d4_xplained.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/at91-sama5d4_xplained.dts +1 -1
index 0b3ad1b580b8..f397e2a68e5c 100644
@@ -40,7 +40,7 @@ uart0: serial@f8004000 {
 
 			spi0: spi@f8010000 {
 				cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
-				status = "okay";
+				status = "disabled";
 				m25p80@0 {
 					compatible = "atmel,at25df321a";
 					spi-max-frequency = <50000000>;
Signature · 1 line
2.25.1
maintainer
#1 lore raw

Hi Tudor,

Quoted 15 lines · Tudor Ambarus

sama5d4_xplained has an optional on-board serial DataFlash (AT25DF321A), which does not come populated on board by default. Mark it as disabled to avoid the following probe error:
spi-nor spi0.0: unrecognized JEDEC id bytes: 00 00 00 00 00 00

---
  arch/arm/boot/dts/at91-sama5d4_xplained.dts | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/at91-sama5d4_xplained.dts +0 -0
index 0b3ad1b580b8..f397e2a68e5c 100644

arch/arm/boot/dts/at91-sama5d4_xplained.dts uart0: serial@f8004000 { · line 46

Quoted 8 lines
arch/arm/boot/dts/at91-sama5d4_xplained.dts +1 -1
@@ -40,7 +40,7 @@ uart0: serial@f8004000 {
 
  			spi0: spi@f8010000 {
  				cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
-				status = "okay";
+				status = "disabled";
  				m25p80@0 {
  					compatible = "atmel,at25df321a";
  					spi-max-frequency = <50000000>;

What about keeping SPI enabled and just having the status of m25p80 as disabled: honestly, I don't know if it works and if it's desirable, but might be closer to reality.

Tell me what you think.

Regards,
Nicolas

Signature · 1 line
Nicolas Ferre
#2 lore raw
Quoted 28 lines · Nicolas Ferre

Hi Tudor,

Quoted 15 lines · Tudor Ambarus

sama5d4_xplained has an optional on-board serial DataFlash (AT25DF321A), which does not come populated on board by default. Mark it as disabled to avoid the following probe error:
spi-nor spi0.0: unrecognized JEDEC id bytes: 00 00 00 00 00 00

---
  arch/arm/boot/dts/at91-sama5d4_xplained.dts | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/at91-sama5d4_xplained.dts +0 -0
index 0b3ad1b580b8..f397e2a68e5c 100644

arch/arm/boot/dts/at91-sama5d4_xplained.dts uart0: serial@f8004000 { · line 45

Quoted 7 lines
arch/arm/boot/dts/at91-sama5d4_xplained.dts +1 -1
@@ -40,7 +40,7 @@ uart0: serial@f8004000 {
                 spi0: spi@f8010000 {
                   cs-gpios = <&pioC 3 0>, <0>, <0>, <0>;
-                status = "okay";
+                status = "disabled";
                   m25p80@0 {
                       compatible = "atmel,at25df321a";
                       spi-max-frequency = <50000000>;

What about keeping SPI enabled and just having the status of m25p80 as disabled: honestly, I don't know if it works and if it's desirable, but might be closer to reality.

Quoted 1 line

Tell me what you think.

I think it will work, because child status is checked with __of_device_is_available, and the child will be skipped when marked as disabled.

But I feel that spi0 was enabled just because at25df321a was assumed to be populated. Wouldn't it be strange to have spi0 marked as okay, but the only child as disabled? How about removing spi0 node entirely from sama5d4_xplained dts?

Cheers,
ta