Skip to contentSkip to conversation

arm64: dts: ti: Add overlay for AM642-EVM NAND expansion card

PATCH Superseded Roger Quadros 4 participants 15 messages Sep 20, 2023 – Jan 23, 2024

Subsystems (3)

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

cover arm64: dts: ti: Add overlay for AM642-EVM NAND expansion card

Hi,

This series adds overlay for NAND expansion card for AM642-EVM.

cheers,
-roger

Roger Quadros (2):
arm64: dts: ti: Enable support for overlays for relevant boards
arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

 arch/arm64/boot/dts/ti/Makefile               |   9 ++
 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++
 2 files changed, 149 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso

base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
prerequisite-patch-id: 93eee303ffcec92f977eaab80e91fe900d85638e

Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/2 arm64: dts: ti: Enable support for overlays for relevant boards

Enable __symbols__ in board DT files for which we expect overlays to be supported.

---
 arch/arm64/boot/dts/ti/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/ti/Makefile +8 -0
index e7b8e2e7f083..06d6f264f292 100644
@@ -72,8 +72,16 @@ dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm.dtb
 
 # Enable support for device-tree overlays
+DTC_FLAGS_k3-am625-beagleplay += -@
 DTC_FLAGS_k3-am625-sk += -@
 DTC_FLAGS_k3-am62-lp-sk += -@
+DTC_FLAGS_k3-am62a7-sk += -@
+DTC_FLAGS_k3-am642-evm += -@
+DTC_FLAGS_k3-am654-base-board += -@
 DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@
+DTC_FLAGS_k3-am68-sk-base-board += -@
+DTC_FLAGS_k3-am69-sk += -@
 DTC_FLAGS_k3-j721e-common-proc-board += -@
+DTC_FLAGS_k3-j721e-sk += -@
 DTC_FLAGS_k3-j721s2-common-proc-board += -@
+DTC_FLAGS_k3-j784s4-evm += -@
Signature · 1 line
2.34.1
#4 lore raw

PATCH 2/2 arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

In reply to Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
 arch/arm64/boot/dts/ti/Makefile               |   1 +
 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++
 2 files changed, 141 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso
arch/arm64/boot/dts/ti/Makefile +1 -0
index 06d6f264f292..ece74085a6be 100644
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
 
 # Boards with AM64x SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb
arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso new file +140 -0

140 lines not on this page · raw message

Signature · 1 line
2.34.1
maintainer
#2 lore raw

Re: [PATCH 1/2] arm64: dts: ti: Enable support for overlays for relevant boards

In reply to Roger Quadros
Quoted 19 lines · Roger Quadros

Enable __symbols__ in board DT files for which we expect overlays to be supported.

---
 arch/arm64/boot/dts/ti/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/ti/Makefile +1 -0
index e7b8e2e7f083..06d6f264f292 100644
@@ -72,8 +72,16 @@ dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm.dtb
 
 # Enable support for device-tree overlays
+DTC_FLAGS_k3-am625-beagleplay += -@
 DTC_FLAGS_k3-am625-sk += -@
 DTC_FLAGS_k3-am62-lp-sk += -@

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb · line 87

Quoted 10 lines
arch/arm64/boot/dts/ti/Makefile +7 -0
+DTC_FLAGS_k3-am62a7-sk += -@
+DTC_FLAGS_k3-am642-evm += -@
+DTC_FLAGS_k3-am654-base-board += -@
 DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@
+DTC_FLAGS_k3-am68-sk-base-board += -@
+DTC_FLAGS_k3-am69-sk += -@
 DTC_FLAGS_k3-j721e-common-proc-board += -@
+DTC_FLAGS_k3-j721e-sk += -@
 DTC_FLAGS_k3-j721s2-common-proc-board += -@
+DTC_FLAGS_k3-j784s4-evm += -@

is'nt it better to do it in context of the changes introduced?

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
maintainer
#5 lore raw

Re: [PATCH 2/2] arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

In reply to Roger Quadros
Quoted 15 lines · Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
 arch/arm64/boot/dts/ti/Makefile               |   1 +
 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++
 2 files changed, 141 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso
arch/arm64/boot/dts/ti/Makefile +0 -0
index 06d6f264f292..ece74085a6be 100644

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb · line 35

Quoted 7 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
 
 # Boards with AM64x SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb

Also see https://lore.kernel.org/all/[email protected]/

you may not get the dtbo installed when doing make dtbs_install

[...]

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#3 lore raw

Re: [PATCH 1/2] arm64: dts: ti: Enable support for overlays for relevant boards

In reply to Nishanth Menon
Quoted 16 lines · Nishanth Menon
Quoted 15 lines · Roger Quadros

Enable __symbols__ in board DT files for which we expect overlays to be supported.

---
 arch/arm64/boot/dts/ti/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/ti/Makefile +0 -0
index e7b8e2e7f083..06d6f264f292 100644
@@ -72,8 +72,16 @@ dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm.dtb
 
Quoted 17 lines
Quoted 4 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
 # Enable support for device-tree overlays
+DTC_FLAGS_k3-am625-beagleplay += -@
 DTC_FLAGS_k3-am625-sk += -@
 DTC_FLAGS_k3-am62-lp-sk += -@

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb · line 87

Quoted 10 lines
arch/arm64/boot/dts/ti/Makefile +7 -0
+DTC_FLAGS_k3-am62a7-sk += -@
+DTC_FLAGS_k3-am642-evm += -@
+DTC_FLAGS_k3-am654-base-board += -@
 DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@
+DTC_FLAGS_k3-am68-sk-base-board += -@
+DTC_FLAGS_k3-am69-sk += -@
 DTC_FLAGS_k3-j721e-common-proc-board += -@
+DTC_FLAGS_k3-j721e-sk += -@
 DTC_FLAGS_k3-j721s2-common-proc-board += -@
+DTC_FLAGS_k3-j784s4-evm += -@

is'nt it better to do it in context of the changes introduced?

Do you mean I should just add for the particular platform when adding an overlay for that platform?

Signature · 2 lines
cheers,
-roger
#6 lore raw

Re: [PATCH 2/2] arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

In reply to Nishanth Menon
Quoted 26 lines · Nishanth Menon
Quoted 15 lines · Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
 arch/arm64/boot/dts/ti/Makefile               |   1 +
 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++
 2 files changed, 141 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso
arch/arm64/boot/dts/ti/Makefile +0 -0
index 06d6f264f292..ece74085a6be 100644

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb · line 35

Quoted 7 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
 
 # Boards with AM64x SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb

Also see https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

you may not get the dtbo installed when doing make dtbs_install

[...]

$ v8make dtbs_install INSTALL_DTBS_PATH=/tmp
  INSTALL /tmp/ti/k3-am625-beagleplay.dtb
  INSTALL /tmp/ti/k3-am625-phyboard-lyra-rdk.dtb
  INSTALL /tmp/ti/k3-am625-sk.dtb
  INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dahlia.dtb
  INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dev.dtb
  INSTALL /tmp/ti/k3-am625-verdin-nonwifi-yavia.dtb
  INSTALL /tmp/ti/k3-am625-verdin-wifi-dahlia.dtb
  INSTALL /tmp/ti/k3-am625-verdin-wifi-dev.dtb
  INSTALL /tmp/ti/k3-am625-verdin-wifi-yavia.dtb
  INSTALL /tmp/ti/k3-am62-lp-sk.dtb
  INSTALL /tmp/ti/k3-am62x-sk-hdmi-audio.dtbo
  INSTALL /tmp/ti/k3-am62a7-sk.dtb
  INSTALL /tmp/ti/k3-am62p5-sk.dtb
  INSTALL /tmp/ti/k3-am642-evm.dtb
  INSTALL /tmp/ti/k3-am642-evm-nand.dtbo
^^^^
  INSTALL /tmp/ti/k3-am642-phyboard-electra-rdk.dtb
  INSTALL /tmp/ti/k3-am642-sk.dtb

What did I miss?

Signature · 2 lines
cheers,
-roger
maintainer
#7 lore raw

Re: [PATCH 2/2] arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

Quoted 55 lines · Roger Quadros
Quoted 26 lines · Nishanth Menon
Quoted 15 lines · Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
 arch/arm64/boot/dts/ti/Makefile               |   1 +
 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++
 2 files changed, 141 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso
arch/arm64/boot/dts/ti/Makefile +0 -0
index 06d6f264f292..ece74085a6be 100644

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb · line 35

Quoted 7 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
 
 # Boards with AM64x SoC
 dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo
 dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
 dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb

Also see https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

you may not get the dtbo installed when doing make dtbs_install

[...]

$ v8make dtbs_install INSTALL_DTBS_PATH=/tmp
  INSTALL /tmp/ti/k3-am625-beagleplay.dtb
  INSTALL /tmp/ti/k3-am625-phyboard-lyra-rdk.dtb
  INSTALL /tmp/ti/k3-am625-sk.dtb
  INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dahlia.dtb
  INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dev.dtb
  INSTALL /tmp/ti/k3-am625-verdin-nonwifi-yavia.dtb
  INSTALL /tmp/ti/k3-am625-verdin-wifi-dahlia.dtb
  INSTALL /tmp/ti/k3-am625-verdin-wifi-dev.dtb
  INSTALL /tmp/ti/k3-am625-verdin-wifi-yavia.dtb
  INSTALL /tmp/ti/k3-am62-lp-sk.dtb
  INSTALL /tmp/ti/k3-am62x-sk-hdmi-audio.dtbo
  INSTALL /tmp/ti/k3-am62a7-sk.dtb
  INSTALL /tmp/ti/k3-am62p5-sk.dtb
  INSTALL /tmp/ti/k3-am642-evm.dtb
  INSTALL /tmp/ti/k3-am642-evm-nand.dtbo
^^^^
  INSTALL /tmp/ti/k3-am642-phyboard-electra-rdk.dtb
  INSTALL /tmp/ti/k3-am642-sk.dtb
Quoted 1 line

What did I miss?

I missed it, actually. See Rob's comment:
https://lore.kernel.org/all/CAL_Jsq+GR3hP6hFvFn2z5aXvSXnh9butD3aKZ-y_XJgx0_YPTw@mail.gmail.com/

Having orphan dtbo is apparently frowned upon

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#8 lore raw

Re: [PATCH 2/2] arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

Quoted 56 lines · Nishanth Menon
Quoted 55 lines · Roger Quadros
Quoted 26 lines · Nishanth Menon
Quoted 15 lines · Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
  arch/arm64/boot/dts/ti/Makefile               |   1 +
  arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++
  2 files changed, 141 insertions(+)

create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso

arch/arm64/boot/dts/ti/Makefile +0 -0
index 06d6f264f292..ece74085a6be 100644

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb · line 35

Quoted 7 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
 
  # Boards with AM64x SoC
  dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo
  dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
  dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
  dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb

Also see https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

you may not get the dtbo installed when doing make dtbs_install

[...]

$ v8make dtbs_install INSTALL_DTBS_PATH=/tmp
   INSTALL /tmp/ti/k3-am625-beagleplay.dtb
   INSTALL /tmp/ti/k3-am625-phyboard-lyra-rdk.dtb
   INSTALL /tmp/ti/k3-am625-sk.dtb
   INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dahlia.dtb
   INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dev.dtb
   INSTALL /tmp/ti/k3-am625-verdin-nonwifi-yavia.dtb
   INSTALL /tmp/ti/k3-am625-verdin-wifi-dahlia.dtb
   INSTALL /tmp/ti/k3-am625-verdin-wifi-dev.dtb
   INSTALL /tmp/ti/k3-am625-verdin-wifi-yavia.dtb
   INSTALL /tmp/ti/k3-am62-lp-sk.dtb
   INSTALL /tmp/ti/k3-am62x-sk-hdmi-audio.dtbo
   INSTALL /tmp/ti/k3-am62a7-sk.dtb
   INSTALL /tmp/ti/k3-am62p5-sk.dtb
   INSTALL /tmp/ti/k3-am642-evm.dtb
   INSTALL /tmp/ti/k3-am642-evm-nand.dtbo
^^^^
   INSTALL /tmp/ti/k3-am642-phyboard-electra-rdk.dtb
   INSTALL /tmp/ti/k3-am642-sk.dtb
Quoted 7 lines
Quoted 1 line

What did I miss?

I missed it, actually. See Rob's comment:
https://lore.kernel.org/all/CAL_Jsq+GR3hP6hFvFn2z5aXvSXnh9butD3aKZ-y_XJgx0_YPTw@mail.gmail.com/

Having orphan dtbo is apparently frowned upon

And if you apply these overlays to the base DTB then it gets symbols added automatically, no need for your patch [1/2] here.

Andrew

#9 lore raw

Re: [PATCH 2/2] arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

Quoted 58 lines · Andrew Davis
Quoted 57 lines · Nishanth Menon
Quoted 55 lines · Roger Quadros
Quoted 25 lines · Nishanth Menon
Quoted 16 lines · Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
  arch/arm64/boot/dts/ti/Makefile               |   1 + arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++

  2 files changed, 141 insertions(+)

  create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso

arch/arm64/boot/dts/ti/Makefile +0 -0
index 06d6f264f292..ece74085a6be 100644
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
     # Boards with AM64x SoC
Quoted 5 lines

  dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb

Also see https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

you may not get the dtbo installed when doing make dtbs_install

[...]

$ v8make dtbs_install INSTALL_DTBS_PATH=/tmp
   INSTALL /tmp/ti/k3-am625-beagleplay.dtb
   INSTALL /tmp/ti/k3-am625-phyboard-lyra-rdk.dtb
   INSTALL /tmp/ti/k3-am625-sk.dtb
   INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dahlia.dtb
   INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dev.dtb
   INSTALL /tmp/ti/k3-am625-verdin-nonwifi-yavia.dtb
   INSTALL /tmp/ti/k3-am625-verdin-wifi-dahlia.dtb
   INSTALL /tmp/ti/k3-am625-verdin-wifi-dev.dtb
   INSTALL /tmp/ti/k3-am625-verdin-wifi-yavia.dtb
   INSTALL /tmp/ti/k3-am62-lp-sk.dtb
   INSTALL /tmp/ti/k3-am62x-sk-hdmi-audio.dtbo
   INSTALL /tmp/ti/k3-am62a7-sk.dtb
   INSTALL /tmp/ti/k3-am62p5-sk.dtb
   INSTALL /tmp/ti/k3-am642-evm.dtb
   INSTALL /tmp/ti/k3-am642-evm-nand.dtbo
^^^^
   INSTALL /tmp/ti/k3-am642-phyboard-electra-rdk.dtb
   INSTALL /tmp/ti/k3-am642-sk.dtb

What did I miss?

Quoted 9 lines
Quoted 5 lines

I missed it, actually. See Rob's comment:
https://lore.kernel.org/all/CAL_Jsq+GR3hP6hFvFn2z5aXvSXnh9butD3aKZ-y_XJgx0_YPTw@mail.gmail.com/

Having orphan dtbo is apparently frowned upon

And if you apply these overlays to the base DTB then it gets symbols added automatically, no need for your patch [1/2] here.

Is this OK?

	k3-am642-evm-nand-dtbs := k3-am642-evm.dtb k3-am642-evm-nand.dtbo
	dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtb

So patch 1 is not required in this case but we have an extra dtb file which is not really required.

I have 2 more issues to point out

1)
With existing examples e.g. J7200 EVM
wouldn't k3-j7200-evm.dtb include the k3-j7200-evm-quad-port-eth-exp.dtbo? Is this what we really want?

likewise for k3-j721e-evm.dtb and k3-am654-gp-evm.dtb

2)
Another issue (unrelated to this change) is the below warning:

	arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #address-cells value
	arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #size-cells value

This is because we use the 'ranges' property in the gpmc0 node and the compiler doesn't know the #address/size-cells of the parent node.

Is there a trick to specify it in the dtso file?

Signature · 2 lines
cheers,
-roger
#10 lore raw

Re: [PATCH 2/2] arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

Quoted 69 lines · Roger Quadros
Quoted 58 lines · Andrew Davis
Quoted 57 lines · Nishanth Menon
Quoted 55 lines · Roger Quadros
Quoted 25 lines · Nishanth Menon
Quoted 15 lines · Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
   arch/arm64/boot/dts/ti/Makefile               |   1 +
   arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++
   2 files changed, 141 insertions(+)

  create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso

arch/arm64/boot/dts/ti/Makefile +0 -0
index 06d6f264f292..ece74085a6be 100644

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb · line 34

Quoted 6 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
     # Boards with AM64x SoC
   dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo
   dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
   dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
   dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb

Also see https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

you may not get the dtbo installed when doing make dtbs_install

[...]

$ v8make dtbs_install INSTALL_DTBS_PATH=/tmp
    INSTALL /tmp/ti/k3-am625-beagleplay.dtb
    INSTALL /tmp/ti/k3-am625-phyboard-lyra-rdk.dtb
    INSTALL /tmp/ti/k3-am625-sk.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dahlia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dev.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-yavia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-dahlia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-dev.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-yavia.dtb
    INSTALL /tmp/ti/k3-am62-lp-sk.dtb
    INSTALL /tmp/ti/k3-am62x-sk-hdmi-audio.dtbo
    INSTALL /tmp/ti/k3-am62a7-sk.dtb
    INSTALL /tmp/ti/k3-am62p5-sk.dtb
    INSTALL /tmp/ti/k3-am642-evm.dtb
    INSTALL /tmp/ti/k3-am642-evm-nand.dtbo
^^^^
    INSTALL /tmp/ti/k3-am642-phyboard-electra-rdk.dtb
    INSTALL /tmp/ti/k3-am642-sk.dtb

What did I miss?

Quoted 9 lines
Quoted 5 lines

I missed it, actually. See Rob's comment:
https://lore.kernel.org/all/CAL_Jsq+GR3hP6hFvFn2z5aXvSXnh9butD3aKZ-y_XJgx0_YPTw@mail.gmail.com/

Having orphan dtbo is apparently frowned upon

And if you apply these overlays to the base DTB then it gets symbols added automatically, no need for your patch [1/2] here.

Quoted 8 lines

Is this OK?

	k3-am642-evm-nand-dtbs := k3-am642-evm.dtb k3-am642-evm-nand.dtbo
	dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtb

So patch 1 is not required in this case but we have an extra dtb file which is not really required.

While I agree we will end up with several pre-overlayed DTB files that are arguably not required as they could be later built/applied, until we find a better way to check at build time these overlays need applied to something as a test.

Quoted 9 lines

I have 2 more issues to point out

1)
With existing examples e.g. J7200 EVM
wouldn't k3-j7200-evm.dtb include the k3-j7200-evm-quad-port-eth-exp.dtbo? Is this what we really want?

likewise for k3-j721e-evm.dtb and k3-am654-gp-evm.dtb

Yes, that is the idea, the base-board.dtb is just the raw main board, but the "EVM" when you buy it comes with the quad-port daughtercard attached. That is what we consider the "EVM" and the DTB names match that.

Quoted 12 lines

2)
Another issue (unrelated to this change) is the below warning:

	arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #address-cells value
	arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #size-cells value

This is because we use the 'ranges' property in the gpmc0 node and the compiler doesn't know the #address/size-cells of the parent node.

Is there a trick to specify it in the dtso file?

Hmm, seems like a tricky one. Do you really need to do the ranges here? Could you use the default ranges; for gpmc0? Then do the range translation down inside the nand node to keep the partition addresses sane.

Andrew

#11 lore raw

Re: [PATCH 2/2] arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

Quoted 108 lines · Andrew Davis
Quoted 69 lines · Roger Quadros
Quoted 58 lines · Andrew Davis
Quoted 57 lines · Nishanth Menon
Quoted 55 lines · Roger Quadros
Quoted 25 lines · Nishanth Menon
Quoted 16 lines · Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
   arch/arm64/boot/dts/ti/Makefile               |   1 + arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++

   2 files changed, 141 insertions(+)

   create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso

arch/arm64/boot/dts/ti/Makefile +0 -0
index 06d6f264f292..ece74085a6be 100644
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
      # Boards with AM64x SoC
Quoted 5 lines

   dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb

Also see https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

you may not get the dtbo installed when doing make dtbs_install

[...]

$ v8make dtbs_install INSTALL_DTBS_PATH=/tmp
    INSTALL /tmp/ti/k3-am625-beagleplay.dtb
    INSTALL /tmp/ti/k3-am625-phyboard-lyra-rdk.dtb
    INSTALL /tmp/ti/k3-am625-sk.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dahlia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dev.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-yavia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-dahlia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-dev.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-yavia.dtb
    INSTALL /tmp/ti/k3-am62-lp-sk.dtb
    INSTALL /tmp/ti/k3-am62x-sk-hdmi-audio.dtbo
    INSTALL /tmp/ti/k3-am62a7-sk.dtb
    INSTALL /tmp/ti/k3-am62p5-sk.dtb
    INSTALL /tmp/ti/k3-am642-evm.dtb
    INSTALL /tmp/ti/k3-am642-evm-nand.dtbo
^^^^
    INSTALL /tmp/ti/k3-am642-phyboard-electra-rdk.dtb
    INSTALL /tmp/ti/k3-am642-sk.dtb

What did I miss?

Quoted 9 lines
Quoted 5 lines

I missed it, actually. See Rob's comment:
https://lore.kernel.org/all/CAL_Jsq+GR3hP6hFvFn2z5aXvSXnh9butD3aKZ-y_XJgx0_YPTw@mail.gmail.com/

Having orphan dtbo is apparently frowned upon

And if you apply these overlays to the base DTB then it gets symbols added automatically, no need for your patch [1/2] here.

Quoted 8 lines

Is this OK?

    k3-am642-evm-nand-dtbs := k3-am642-evm.dtb k3-am642-evm-nand.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtb

So patch 1 is not required in this case but we have an extra dtb file which is not really required.

While I agree we will end up with several pre-overlayed DTB files that are arguably not required as they could be later built/applied, until we find a better way to check at build time these overlays need applied to something as a test.

Quoted 9 lines

I have 2 more issues to point out

1)
With existing examples e.g. J7200 EVM
wouldn't  k3-j7200-evm.dtb include the k3-j7200-evm-quad-port-eth-exp.dtbo? Is this what we really want?

likewise for k3-j721e-evm.dtb and k3-am654-gp-evm.dtb

Yes, that is the idea, the base-board.dtb is just the raw main board, but the "EVM" when you buy it comes with the quad-port daughtercard attached. That is what we consider the "EVM" and the DTB names match that.

Quoted 10 lines

2)
Another issue (unrelated to this change) is the below warning:

    arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #address-cells value arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #size-cells value

This is because we use the 'ranges' property in the gpmc0 node and the compiler doesn't know the #address/size-cells of the parent node.

Quoted 6 lines
Quoted 2 lines

Is there a trick to specify it in the dtso file?

Hmm, seems like a tricky one. Do you really need to do the ranges here? Could you use the default ranges; for gpmc0? Then do the range translation down inside the nand node to keep the partition addresses sane.

GPMC has separate address spaces per chip select.

From Documentation/devicetree/bindings/memory-controllers/ti,gpmc.yaml
ranges:
minItems: 1
description: |
Must be set up to reflect the memory layout with four integer values for each chip-select line in use, <cs-number> 0 <physical address of mapping> <size>

The ranges location in the device tree overlay is correct. The overlay is meaningless without the base tree.

The correct solution would be to fix dtc so it doesn't print this warning for DT overlays.

i.e.

scripts/dtc/checks.c +3 -0
index 9f31d2607182..dcb0a6f6f3fb 100644
@@ -1203,6 +1203,9 @@ static void check_avoid_default_addr_size(struct check *c, struct dt_info *dti,
        if (!reg && !ranges)
                return;
 
+       if (streq(node->name, "__overlay__"))
+               return;
+
        if (node->parent->addr_cells == -1)
                FAIL(c, dti, node, "Relying on default #address-cells value");
 
Signature · 2 lines
cheers,
-roger
#12 lore raw

Re: [PATCH 2/2] arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

Quoted 128 lines · Roger Quadros
Quoted 108 lines · Andrew Davis
Quoted 69 lines · Roger Quadros
Quoted 58 lines · Andrew Davis
Quoted 57 lines · Nishanth Menon
Quoted 55 lines · Roger Quadros
Quoted 25 lines · Nishanth Menon
Quoted 15 lines · Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
    arch/arm64/boot/dts/ti/Makefile               |   1 +
    arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++
    2 files changed, 141 insertions(+)

   create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso

arch/arm64/boot/dts/ti/Makefile +0 -0
index 06d6f264f292..ece74085a6be 100644

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb · line 34

Quoted 6 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
      # Boards with AM64x SoC
    dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo
    dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
    dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
    dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb

Also see https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

you may not get the dtbo installed when doing make dtbs_install

[...]

$ v8make dtbs_install INSTALL_DTBS_PATH=/tmp
     INSTALL /tmp/ti/k3-am625-beagleplay.dtb
     INSTALL /tmp/ti/k3-am625-phyboard-lyra-rdk.dtb
     INSTALL /tmp/ti/k3-am625-sk.dtb
     INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dahlia.dtb
     INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dev.dtb
     INSTALL /tmp/ti/k3-am625-verdin-nonwifi-yavia.dtb
     INSTALL /tmp/ti/k3-am625-verdin-wifi-dahlia.dtb
     INSTALL /tmp/ti/k3-am625-verdin-wifi-dev.dtb
     INSTALL /tmp/ti/k3-am625-verdin-wifi-yavia.dtb
     INSTALL /tmp/ti/k3-am62-lp-sk.dtb
     INSTALL /tmp/ti/k3-am62x-sk-hdmi-audio.dtbo
     INSTALL /tmp/ti/k3-am62a7-sk.dtb
     INSTALL /tmp/ti/k3-am62p5-sk.dtb
     INSTALL /tmp/ti/k3-am642-evm.dtb
     INSTALL /tmp/ti/k3-am642-evm-nand.dtbo
^^^^
     INSTALL /tmp/ti/k3-am642-phyboard-electra-rdk.dtb
     INSTALL /tmp/ti/k3-am642-sk.dtb

What did I miss?

Quoted 9 lines
Quoted 5 lines

I missed it, actually. See Rob's comment:
https://lore.kernel.org/all/CAL_Jsq+GR3hP6hFvFn2z5aXvSXnh9butD3aKZ-y_XJgx0_YPTw@mail.gmail.com/

Having orphan dtbo is apparently frowned upon

And if you apply these overlays to the base DTB then it gets symbols added automatically, no need for your patch [1/2] here.

Quoted 8 lines

Is this OK?

    k3-am642-evm-nand-dtbs := k3-am642-evm.dtb k3-am642-evm-nand.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtb

So patch 1 is not required in this case but we have an extra dtb file which is not really required.

While I agree we will end up with several pre-overlayed DTB files that are arguably not required as they could be later built/applied, until we find a better way to check at build time these overlays need applied to something as a test.

Quoted 9 lines

I have 2 more issues to point out

1)
With existing examples e.g. J7200 EVM
wouldn't  k3-j7200-evm.dtb include the k3-j7200-evm-quad-port-eth-exp.dtbo? Is this what we really want?

likewise for k3-j721e-evm.dtb and k3-am654-gp-evm.dtb

Yes, that is the idea, the base-board.dtb is just the raw main board, but the "EVM" when you buy it comes with the quad-port daughtercard attached. That is what we consider the "EVM" and the DTB names match that.

Quoted 10 lines

2)
Another issue (unrelated to this change) is the below warning:

    arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #address-cells value arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #size-cells value

This is because we use the 'ranges' property in the gpmc0 node and the compiler doesn't know the #address/size-cells of the parent node.

Quoted 6 lines
Quoted 2 lines

Is there a trick to specify it in the dtso file?

Hmm, seems like a tricky one. Do you really need to do the ranges here? Could you use the default ranges; for gpmc0? Then do the range translation down inside the nand node to keep the partition addresses sane.

GPMC has separate address spaces per chip select.

From Documentation/devicetree/bindings/memory-controllers/ti,gpmc.yaml
ranges:
minItems: 1
description: |
Must be set up to reflect the memory layout with four integer values for each chip-select line in use, <cs-number> 0 <physical address of mapping> <size>

Quoted 6 lines

The ranges location in the device tree overlay is correct. The overlay is meaningless without the base tree.

The correct solution would be to fix dtc so it doesn't print this warning for DT overlays.

This may be too much and we would miss valid cases for this warning.

Maybe that is okay here, but we would need to add a warning/check when applying overlays for mismatch sizes, right now that seems to be missing.

Andrew

Quoted 17 lines

i.e.

scripts/dtc/checks.c +3 -0
index 9f31d2607182..dcb0a6f6f3fb 100644
@@ -1203,6 +1203,9 @@ static void check_avoid_default_addr_size(struct check *c, struct dt_info *dti,
         if (!reg && !ranges)
                 return;
 
+       if (streq(node->name, "__overlay__"))
+               return;
+
         if (node->parent->addr_cells == -1)
                 FAIL(c, dti, node, "Relying on default #address-cells value");
 
#13 lore raw

Re: [PATCH 2/2] arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

In reply to Roger Quadros
Quoted 129 lines · Roger Quadros
Quoted 108 lines · Andrew Davis
Quoted 69 lines · Roger Quadros
Quoted 58 lines · Andrew Davis
Quoted 57 lines · Nishanth Menon
Quoted 55 lines · Roger Quadros
Quoted 25 lines · Nishanth Menon
Quoted 15 lines · Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
   arch/arm64/boot/dts/ti/Makefile               |   1 +
   arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++
   2 files changed, 141 insertions(+)

create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso

arch/arm64/boot/dts/ti/Makefile +0 -0
index 06d6f264f292..ece74085a6be 100644

arch/arm64/boot/dts/ti/Makefile dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb · line 34

Quoted 6 lines
arch/arm64/boot/dts/ti/Makefile +1 -0
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
     # Boards with AM64x SoC
   dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb
+dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo
   dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb
   dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb
   dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb

Also see https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

you may not get the dtbo installed when doing make dtbs_install

[...]

$ v8make dtbs_install INSTALL_DTBS_PATH=/tmp
    INSTALL /tmp/ti/k3-am625-beagleplay.dtb
    INSTALL /tmp/ti/k3-am625-phyboard-lyra-rdk.dtb
    INSTALL /tmp/ti/k3-am625-sk.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dahlia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dev.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-yavia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-dahlia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-dev.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-yavia.dtb
    INSTALL /tmp/ti/k3-am62-lp-sk.dtb
    INSTALL /tmp/ti/k3-am62x-sk-hdmi-audio.dtbo
    INSTALL /tmp/ti/k3-am62a7-sk.dtb
    INSTALL /tmp/ti/k3-am62p5-sk.dtb
    INSTALL /tmp/ti/k3-am642-evm.dtb
    INSTALL /tmp/ti/k3-am642-evm-nand.dtbo
^^^^
    INSTALL /tmp/ti/k3-am642-phyboard-electra-rdk.dtb
    INSTALL /tmp/ti/k3-am642-sk.dtb

What did I miss?

Quoted 9 lines
Quoted 5 lines

I missed it, actually. See Rob's comment:
https://lore.kernel.org/all/CAL_Jsq+GR3hP6hFvFn2z5aXvSXnh9butD3aKZ-y_XJgx0_YPTw@mail.gmail.com/

Having orphan dtbo is apparently frowned upon

And if you apply these overlays to the base DTB then it gets symbols added automatically, no need for your patch [1/2] here.

Quoted 8 lines

Is this OK?

    k3-am642-evm-nand-dtbs := k3-am642-evm.dtb k3-am642-evm-nand.dtbo
    dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtb

So patch 1 is not required in this case but we have an extra dtb file which is not really required.

While I agree we will end up with several pre-overlayed DTB files that are arguably not required as they could be later built/applied, until we find a better way to check at build time these overlays need applied to something as a test.

Quoted 9 lines

I have 2 more issues to point out

1)
With existing examples e.g. J7200 EVM
wouldn't k3-j7200-evm.dtb include the k3-j7200-evm-quad-port-eth-exp.dtbo? Is this what we really want?

likewise for k3-j721e-evm.dtb and k3-am654-gp-evm.dtb

Yes, that is the idea, the base-board.dtb is just the raw main board, but the "EVM" when you buy it comes with the quad-port daughtercard attached. That is what we consider the "EVM" and the DTB names match that.

Quoted 10 lines

2)
Another issue (unrelated to this change) is the below warning:

    arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #address-cells value
    arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #size-cells value

This is because we use the 'ranges' property in the gpmc0 node and the compiler doesn't know the #address/size-cells of the parent node.

Quoted 6 lines
Quoted 2 lines

Is there a trick to specify it in the dtso file?

Hmm, seems like a tricky one. Do you really need to do the ranges here? Could you use the default ranges; for gpmc0? Then do the range translation down inside the nand node to keep the partition addresses sane.

GPMC has separate address spaces per chip select.

From Documentation/devicetree/bindings/memory-controllers/ti,gpmc.yaml
ranges:
minItems: 1
description: |
Must be set up to reflect the memory layout with four integer values for each chip-select line in use, <cs-number> 0 <physical address of mapping> <size>

Quoted 5 lines

The ranges location in the device tree overlay is correct. The overlay is meaningless without the base tree.

The correct solution would be to fix dtc so it doesn't print this warning for DT overlays.

https://www.spinics.net/lists/devicetree-compiler/msg04036.html

#14 lore raw

Re: [PATCH 2/2] arm64: dts: ti: am642-evm: Add overlay for NAND expansion card

In reply to Andrew Davis

Hi,

Quoted 108 lines · Andrew Davis
Quoted 69 lines · Roger Quadros
Quoted 58 lines · Andrew Davis
Quoted 57 lines · Nishanth Menon
Quoted 55 lines · Roger Quadros
Quoted 25 lines · Nishanth Menon
Quoted 16 lines · Roger Quadros

The NAND expansion card plugs in over the HSE (High Speed Expansion) connector. Add support for it.

---
   arch/arm64/boot/dts/ti/Makefile               |   1 + arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso | 140 ++++++++++++++++++

   2 files changed, 141 insertions(+)

   create mode 100644 arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso

arch/arm64/boot/dts/ti/Makefile +0 -0
index 06d6f264f292..ece74085a6be 100644
@@ -29,6 +29,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb
      # Boards with AM64x SoC
Quoted 5 lines

   dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-tqma64xxl-mbax4xxl.dtb

Also see https://lore.kernel.org/all/[email protected]/

Quoted 4 lines

you may not get the dtbo installed when doing make dtbs_install

[...]

$ v8make dtbs_install INSTALL_DTBS_PATH=/tmp
    INSTALL /tmp/ti/k3-am625-beagleplay.dtb
    INSTALL /tmp/ti/k3-am625-phyboard-lyra-rdk.dtb
    INSTALL /tmp/ti/k3-am625-sk.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dahlia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-dev.dtb
    INSTALL /tmp/ti/k3-am625-verdin-nonwifi-yavia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-dahlia.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-dev.dtb
    INSTALL /tmp/ti/k3-am625-verdin-wifi-yavia.dtb
    INSTALL /tmp/ti/k3-am62-lp-sk.dtb
    INSTALL /tmp/ti/k3-am62x-sk-hdmi-audio.dtbo
    INSTALL /tmp/ti/k3-am62a7-sk.dtb
    INSTALL /tmp/ti/k3-am62p5-sk.dtb
    INSTALL /tmp/ti/k3-am642-evm.dtb
    INSTALL /tmp/ti/k3-am642-evm-nand.dtbo
^^^^
    INSTALL /tmp/ti/k3-am642-phyboard-electra-rdk.dtb
    INSTALL /tmp/ti/k3-am642-sk.dtb

What did I miss?

Quoted 9 lines
Quoted 5 lines

I missed it, actually. See Rob's comment:
https://lore.kernel.org/all/CAL_Jsq+GR3hP6hFvFn2z5aXvSXnh9butD3aKZ-y_XJgx0_YPTw@mail.gmail.com/

Having orphan dtbo is apparently frowned upon

And if you apply these overlays to the base DTB then it gets symbols added automatically, no need for your patch [1/2] here.

Quoted 8 lines

Is this OK?

    k3-am642-evm-nand-dtbs := k3-am642-evm.dtb k3-am642-evm-nand.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am642-evm-nand.dtb

So patch 1 is not required in this case but we have an extra dtb file which is not really required.

While I agree we will end up with several pre-overlayed DTB files that are arguably not required as they could be later built/applied, until we find a better way to check at build time these overlays need applied to something as a test.

Quoted 9 lines

I have 2 more issues to point out

1)
With existing examples e.g. J7200 EVM
wouldn't  k3-j7200-evm.dtb include the k3-j7200-evm-quad-port-eth-exp.dtbo? Is this what we really want?

likewise for k3-j721e-evm.dtb and k3-am654-gp-evm.dtb

Yes, that is the idea, the base-board.dtb is just the raw main board, but the "EVM" when you buy it comes with the quad-port daughtercard attached. That is what we consider the "EVM" and the DTB names match that.

Quoted 10 lines

2)
Another issue (unrelated to this change) is the below warning:

    arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #address-cells value arch/arm64/boot/dts/ti/k3-am642-evm-nand.dtso:65.8-140.3: Warning (avoid_default_addr_size): /fragment@3/__overlay__: Relying on default #size-cells value

This is because we use the 'ranges' property in the gpmc0 node and the compiler doesn't know the #address/size-cells of the parent node.

Quoted 6 lines
Quoted 2 lines

Is there a trick to specify it in the dtso file?

Hmm, seems like a tricky one. Do you really need to do the ranges here? Could you use the default ranges; for gpmc0? Then do the range translation down inside the nand node to keep the partition addresses sane.

I think we need to go down this route.

Your suggestion about using ranges in gpmc0 node in the EVM DT file is fine I guess as for this board there is no other use case for GPMC. So it should be OK to reserve Chip Select0 address space at k3-am642-evm.dts

Signature · 2 lines
cheers,
-roger