MVEBU A38x Regulator

Pali Rohár pali at kernel.org
Mon Jul 25 21:13:04 CEST 2022


On Sunday 24 July 2022 11:27:00 Pali Rohár wrote:
> On Wednesday 20 July 2022 15:47:55 Tony Dinh wrote:
> > Hi Pali/Marek,
> > 
> > I'm writing u-boot for the Synology DS116 (Armada 385, dual core, 1.8
> > Ghz). I could not seem to get the DM Regulator to power up the SATA
> > port on this board. I'm using Stefan ./board/Marvell/db-88f6820-gp as
> > the starting point, and using the latest DTS
> > 
> > https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/armada-385-synology-ds116.dts
> > 
> > I noticed that the Linux kernel boot log (booted with stock Marvell
> > u-boot) shows "supply ahci not found" error. But I can power up the
> > SATA drive in stock u-boot by poking GPIO 15 (SATA power enable). And
> > it works fine with this combination: stock u-boot, kernel 5.18.6.
> > 
> > [    2.861061] usb_phy_generic usb3_0_phy: dummy supplies not allowed
> > for exclusive requests
> > [    2.870173] usb_phy_generic usb3_1_phy: dummy supplies not allowed
> > for exclusive requests
> > [    2.879296] ahci-mvebu f10a8000.sata: supply ahci not found, using
> > dummy regulator
> > [    2.887704] ahci-mvebu f10a8000.sata: supply phy not found, using
> > dummy regulator
> > [    2.896101] ahci-mvebu f10a8000.sata: masking port_map 0x3 -> 0x1
> > [    2.902951] ahci-mvebu f10a8000.sata: AHCI 0001.0000 32 slots 2
> > ports 6 Gbps 0x1 impl platform mode
> > [    2.912750] ahci-mvebu f10a8000.sata: flags: 64bit ncq sntf led
> > only pmp fbs pio slum part sxs
> > [    2.923184] scsi host0: ahci-mvebu
> > [    2.927693] scsi host1: ahci-mvebu
> > [    2.931935] ata1: SATA max UDMA/133 mmio [mem
> > 0xf10a8000-0xf10a9fff] port 0x100 irq 50
> > [    2.940610] ata2: DUMMY
> > 
> > My questions: does DM regulator +  DM GPIO work for Armada 38x u-boot?
> > and is the error "ahci-mvebu f10a8000.sata: supply ahci, using dummy
> > regulator" a real error? I've googled this and came across some past
> > related posts from you (Pali and Marek), but it is not apparent what
> > was the solution.
> 
> I'm really not sure if DM regulator and DM GPIO is working in U-Boot for
> Armada 38x. Lot of Armada boards touch pinctrl/gpio registers directory
> to configure GPIOs, instead of using DM GPIO API.

DM GPIO for A38x is semi-broken. It requires DM pinctrl A38x driver,
which is not in U-Boot yet. I implemented it and sent to ML:
https://patchwork.ozlabs.org/project/uboot/list/?series=311133&state=*

With this change U-Boot 'gpio' command is working fine on Turris Omnia
(A385 board).

It is possible that on other mvebu boards are gpios already working fine
without new driver. It depends on initial MPP configuration. Above new
pinctrl driver ensures that gpio subsystem set particular pin to GPIO
mode (if it is not by default initialized to gpio) prior using it.

> Stefan, any idea?
> 
> > If you are interested in seeing more info while I'm at my new u-boot
> > prompt (kwboot with the SPL kwb), I can post that followup.
> > 
> > Thanks,
> > Tony


More information about the U-Boot mailing list