Skip to contentSkip to conversation

arm64: dts: agilex5: add support for debug daughter card

PATCH Applied Adrian Ng Ho Yin 4 participants 6 messages Sep 25 – Oct 2 Device tree bindings

lore
Share & tools
lore
#0 lore raw

v3 cover arm64: dts: agilex5: add support for debug daughter card

The Agilex5 SoCDK supports an optional debug daughter card that requires a dedicated device tree variant due to differences in peripheral connectivity compared to the standard SoCDK configuration.

When the debug daughter card is fitted:
- gpio0 is unrouted and remains disabled; HPS LED is on gpio1 (portb)
- gmac2 is replaced by gmac0 for Ethernet connectivity
- spi0 is connected to a Microchip 25AA128 16 KByte SPI EEPROM

The board compatible (intel,socfpga-agilex5-socdk-debug) is already present in altera.yaml and is not part of this series.

---
changelog:
v2->v3:
- Remap HPS LED to &portb 12 (gpio1): gpio0 is unrouted, so keeping &porta would leave leds-gpio in perpetual probe deferral
- Retain spi0 dmas/dma-names from the SoC DTSI; do not delete them to work around a software/defconfig issue (DT should describe hardware)
- Add microchip,25aa128 to the at25 binding and use "microchip,25aa128", "atmel,at25" for the EEPROM node
- Drop the altera.yaml compatible patch (already accepted/applied)
- Use &usb31 to match the current Agilex5 SoCDK USB topology

v1->v2:
- Use socfpga_agilex5.dtsi as the base include instead of socfpga_agilex5_socdk.dts to follow the convention that .dts files are final compilation units and should not be included by other files
- Replace spidev node (with fake rohm,dh2228fv compatible) with a proper atmel,at25 EEPROM binding describing the actual hardware
- Remove dmas/dma-names from spi0: CONFIG_DW_AXI_DMAC is not enabled in the platform defconfig and retaining them stalls the SPI driver in probe deferral
- Remove incorrect HPS LED GPIO override; the LED mapping is unchanged from the base board
---

Adrian Ng Ho Yin (2):
dt-bindings: eeprom: at25: add Microchip 25AA128
arm64: dts: agilex5: add support for debug daughter card

 .../devicetree/bindings/eeprom/at25.yaml      |   1 +
 arch/arm64/boot/dts/intel/Makefile            |   1 +
 .../dts/intel/socfpga_agilex5_socdk_debug.dts | 121 ++++++++++++++++++
 3 files changed, 123 insertions(+)
 create mode 100644 arch/arm64/boot/dts/intel/socfpga_agilex5_socdk_debug.dts
Signature · 1 line
2.49.GIT
#1 lore raw

PATCH v3 1/2 dt-bindings: eeprom: at25: add Microchip 25AA128

Add the vendor-specific compatible for the Microchip 25AA128 SPI EEPROM. New device trees should pair it with "atmel,at25" rather than using the bare "atmel,at25" fallback alone.

---
 Documentation/devicetree/bindings/eeprom/at25.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/eeprom/at25.yaml +1 -0
index bb78e12b8823..dda69e4d62bf 100644
@@ -32,6 +32,7 @@ properties:
               - fujitsu,mb85rs256
               - fujitsu,mb85rs64
               - microchip,25aa010a
+              - microchip,25aa128
               - microchip,at25160bn
               - microchip,25lc040
               - st,m95m02
Signature · 1 line
2.49.GIT
Acked-by on v3 1/2
#2 lore raw

Re: [PATCH v3 1/2] dt-bindings: eeprom: at25: add Microchip 25AA128

Quoted 8 lines · Adrian Ng Ho Yin

Add the vendor-specific compatible for the Microchip 25AA128 SPI EEPROM. New device trees should pair it with "atmel,at25" rather than using the bare "atmel,at25" fallback alone.

---
 Documentation/devicetree/bindings/eeprom/at25.yaml | 1 +
 1 file changed, 1 insertion(+)

Best regards,
Krzysztof

#3 lore raw

PATCH v3 2/2 arm64: dts: agilex5: add support for debug daughter card

In reply to Adrian Ng Ho Yin

The debug daughter card replaces gmac2 with gmac0 for Ethernet, leaves gpio0 unrouted (HPS LED on gpio1/portb), and adds a Microchip 25AA128 16 KByte SPI EEPROM on spi0. Retain the SoC dmas/dma-names on spi0 so the DT continues to describe the hardware DMA wiring. Set spi-max-frequency to 500 kHz for board signal-integrity limits.

---
 arch/arm64/boot/dts/intel/Makefile            |   1 +
 .../dts/intel/socfpga_agilex5_socdk_debug.dts | 121 ++++++++++++++++++
 2 files changed, 122 insertions(+)
 create mode 100644 arch/arm64/boot/dts/intel/socfpga_agilex5_socdk_debug.dts
arch/arm64/boot/dts/intel/Makefile +1 -0
index b52cd2330cef..96dcbeed032c 100644
@@ -6,6 +6,7 @@ dtb-$(CONFIG_ARCH_INTEL_SOCFPGA) += socfpga_agilex_n6000.dtb \
 				socfpga_agilex3_socdk.dtb \
 				socfpga_agilex5_socdk.dtb \
 				socfpga_agilex5_socdk_013b.dtb \
+				socfpga_agilex5_socdk_debug.dtb \
 				socfpga_agilex5_socdk_emmc.dtb \
 				socfpga_agilex5_socdk_modular.dtb \
 				socfpga_agilex5_socdk_nand.dtb \
arch/arm64/boot/dts/intel/socfpga_agilex5_socdk_debug.dts new file +121 -0

121 lines not on this page · raw message

Signature · 1 line
2.49.GIT
#4 lore raw
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] dts: undefined label usb31 causes build breakage --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dts: undefined label usb31 causes build breakage
--

commit 9aa710e27c40d1e631b159f030bd4278c2898e97
Author: Adrian Ng Ho Yin <[email protected]>

arm64: dts: agilex5: add support for debug daughter card

This commit adds a new device tree for the Agilex5 SoCDK debug daughter card. It overrides several peripheral nodes including ethernet, SPI, and USB to reflect the updated hardware wiring.

Quoted 5 lines
arch/arm64/boot/dts/intel/socfpga_agilex5_socdk_debug.dts new file +0 -0
new file mode 100644
index 0000000000000..5c36410128cf3

[ ... ]

arch/arm64/boot/dts/intel/socfpga_agilex5_socdk_debug.dts line 117

Quoted 4 lines

+&usb31 {

arch/arm64/boot/dts/intel/socfpga_agilex5_socdk_debug.dts new file +3 -0
+	dr_mode = "host";
+	status = "okay";
+};

[Severity: Low]
Will this compile successfully? It looks like usb31 is an undefined label, which will cause a syntax error (unresolved reference) during device tree compilation.

The base socfpga_agilex5.dtsi defines the USB controller label as usb0. Should this node override reference &usb0 instead to prevent the dtbs build from breaking?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Applied
#5 lore raw

Re: (subset) [PATCH v3 0/2] arm64: dts: agilex5: add support for debug daughter card

In reply to Adrian Ng Ho Yin
Quoted 10 lines · Adrian Ng Ho Yin

The Agilex5 SoCDK supports an optional debug daughter card that requires a dedicated device tree variant due to differences in peripheral connectivity compared to the standard SoCDK configuration.

When the debug daughter card is fitted:
- gpio0 is unrouted and remains disabled; HPS LED is on gpio1 (portb)
- gmac2 is replaced by gmac0 for Ethernet connectivity
- spi0 is connected to a Microchip 25AA128 16 KByte SPI EEPROM

[...]

Applied, thanks!

[2/2] arm64: dts: agilex5: add support for debug daughter card

      commit: 01711d9d08123ba6766b44aeaed3954e068f6fce

Best regards,

Signature · 1 line
Dinh Nguyen <[email protected]>