Skip to content

Conversation

pamolloy
Copy link
Collaborator

@pamolloy pamolloy commented Jul 7, 2025

The Rev E of the SC598 SoM includes a different GPIO expander and larger SPI flash.

@pamolloy pamolloy force-pushed the staging/gmalysa/support-sc5xx-boards branch from a145424 to b3f4e84 Compare July 9, 2025 12:00
@pamolloy pamolloy force-pushed the staging/philip/support-sc598-rev-e-som branch from 66b3125 to c6a5864 Compare July 9, 2025 12:06
@pamolloy pamolloy changed the base branch from staging/gmalysa/support-sc5xx-boards to adi-u-boot-2025.07.y July 9, 2025 12:06
@pamolloy pamolloy force-pushed the staging/philip/support-sc598-rev-e-som branch 2 times, most recently from 5bd0b5e to d249e10 Compare July 28, 2025 16:49
@pamolloy pamolloy added ADSP and removed ADSP labels Aug 6, 2025
@pamolloy pamolloy added this to ADSP Aug 6, 2025
@pamolloy pamolloy self-assigned this Aug 6, 2025
@pamolloy pamolloy added the enhancement New feature or request label Aug 14, 2025
@UtsavAgarwalADI
Copy link

Nit: The SPL print doesnt seem to be there - which is expected for rev E.

Core:  143 devices, 24 uclasses, devicetree: embed
MMC:   mmc@310C7000: 0
Loading Environment from SPIFlash... SF: Detected is25lp01g with page size 256 Bytes, erase size 4 KiB, total 128 MiB
OK
In:    serial@0x31003000
Out:   serial@0x31003000
Err:   serial@0x31003000
Net:   eth0: eth0
Hit any key to stop autoboot:  0 

Otherwise, seems to be working, tested with mmcboot.

Also, do we want all these commits as part of rev E support?

@pamolloy pamolloy force-pushed the staging/philip/support-sc598-rev-e-som branch from d249e10 to 4937914 Compare August 14, 2025 14:34
@pamolloy
Copy link
Collaborator Author

pamolloy commented Sep 1, 2025

Nit: The SPL print doesnt seem to be there - which is expected for rev E.

I don't think I've ever seen SPL print under normal conditions. When I reset from the U-Boot prompt it does since the GPIO expander is already initialized.

Core:  143 devices, 24 uclasses, devicetree: embed
MMC:   mmc@310C7000: 0
Loading Environment from SPIFlash... SF: Detected is25lp01g with page size 256 Bytes, erase size 4 KiB, total 128 MiB
OK
In:    serial@0x31003000
Out:   serial@0x31003000
Err:   serial@0x31003000
Net:   eth0: eth0
Hit any key to stop autoboot:  0 

Otherwise, seems to be working, tested with mmcboot.

Also, do we want all these commits as part of rev E support?

This is just a development branch (marked as draft), especially since it depends on Greg's series. And also Caleb is working on fixing the polarity as well.

I imagine the solution here of having rev D and rev E dtsi, and then only including rev E in the dts, makes the most sense, but open to other suggestions. Also interested to see what mainline thinks.

pamolloy pushed a commit that referenced this pull request Sep 1, 2025
commit 2e2c2a5 ("arm: qemu: override flash accessors to use virtualizable instructions")
explains why we can't have instructions with multiple output registers
when running under QEMU + KVM and the instruction leads to an exception
to the hypervisor.

USB XHCI is such a case (MMIO) where a ldr w1, [x0], #4 is emitted for
xhci_start() which works fine with QEMU but crashes for QEMU + KVM.

These instructions cannot be emulated by KVM as they do not produce
syndrome information data that KVM can use to infer the destination
register, the faulting address, whether it was a load or store, or
if it's a 32 or 64 bit general-purpose register.
As a result an external abort is injected from QEMU, via ext_dabt_pending
to KVM and we end up throwing an exception that looks like

 U-Boot 2025.07-rc4 (Jun 10 2025 - 12:00:15 +0000)
 [...]
 Register 8001040 NbrPorts 8
 Starting the controller
 "Synchronous Abort" handler, esr 0x96000010, far 0x10100040
 elr: 000000000005b1c8 lr : 000000000005b1ac (reloc)
 elr: 00000000476fc1c8 lr : 00000000476fc1ac
 x0 : 0000000010100040 x1 : 0000000000000001
 x2 : 0000000000000000 x3 : 0000000000003e80
 x4 : 0000000000000000 x5 : 00000000477a5694
 x6 : 0000000000000038 x7 : 000000004666f360
 x8 : 0000000000000000 x9 : 00000000ffffffd8
 x10: 000000000000000d x11: 0000000000000006
 x12: 0000000046560a78 x13: 0000000046560dd0
 x14: 00000000ffffffff x15: 000000004666eed2
 x16: 00000000476ee2f0 x17: 0000000000000000
 x18: 0000000046660dd0 x19: 000000004666f480
 x20: 0000000000000000 x21: 0000000010100040
 x22: 0000000010100000 x23: 0000000000000000
 x24: 0000000000000000 x25: 0000000000000000
 x26: 0000000000000000 x27: 0000000000000000
 x28: 0000000000000000 x29: 000000004666f360

 Code: d5033fbf aa1503e0 5287d003 52800002 (b8004401)
 Resetting CPU ...

There are two problems making this the default.
- It will emit ldr + add or str + add instead of ldr/str(post increment)
  in somne cases
- Some platforms that depend on TPL/SPL grow in size enough so that the
  binary doesn't fit anymore.

So let's add proper I/O accessors add a Kconfig option
to turn it off by default apart from our QEMU builds.

Reported-by: Mikko Rapeli <[email protected]>
Tested-by: Mikko Rapeli <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
@pamolloy pamolloy force-pushed the staging/philip/support-sc598-rev-e-som branch from da5b574 to 4e1abde Compare September 2, 2025 09:49
@pamolloy pamolloy moved this to In Development in ADSP Sep 2, 2025
pamolloy and others added 6 commits September 2, 2025 12:24
The ADP5587 is a simpler version of the ADP5588. The ADP5588 can
configure two pins, C8 and C9, as GPIOs or light sensors. The ADP5587
does not include the light sensors.

Signed-off-by: Philip Molloy <[email protected]>
The same 512Mb ISSI SPI flash appears to be shared between all SC5xx
reference boards. However the new EV-SC598-SOM Rev E includes a 1Gb ISSI
SPI flash. Therefore remove it from sc5xx-som.dtsi so it is not included
by the new SOM.

Remove duplicate `status = "okay";` lines since it already exists under
under &spi2 in sc598-som.dtsi.

Signed-off-by: Philip Molloy <[email protected]>
Rev E replaced the SPI flash and GPIO expander in Rev D

Signed-off-by: Philip Molloy <[email protected]>
Enable eMMC and disable SD card

Signed-off-by: Philip Molloy <[email protected]>
- Remove unnecessary tilde prefix in GPIO name

Fixes: ca4ae32 ("board: adi: Add support for SC598")

Signed-off-by: Philip Molloy <[email protected]>
@pamolloy pamolloy force-pushed the staging/philip/support-sc598-rev-e-som branch from 4e1abde to acfadb2 Compare September 2, 2025 10:26
@pamolloy pamolloy requested a review from a team September 2, 2025 10:30
@pamolloy pamolloy marked this pull request as ready for review September 2, 2025 10:31
@pamolloy
Copy link
Collaborator Author

pamolloy commented Sep 2, 2025

This should now contain the minimum required changes to boot on the Rev E. All of these changes would ideally be included in @gmalysa's series in the future. The one exception might be gpio: adp5588: Add ADP5587 as compatible, which could be sent to the mailing list independently.

@CalebEthridgeADI can you compare this with your changes? I'd like to drop the last commit on this branch that changes the polarity in favor of your changes. Ideally we would merge your changes into adi-u-boot-2025.07.y and then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Development
Development

Successfully merging this pull request may close these issues.

2 participants