sximmc(4) add support for a64 emmc

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

sximmc(4) add support for a64 emmc

Markus Hennecke
This patch adds support for emmc on my sopine+baseboard, dmesg added

I am still struggeling with putting u-boot on the emmc. I have exactly one
u-boot version that boots from emmc but after starting the efi bootloader
it does not see any disks and falls back to tftp boot which is not (yet)
working. If I boot the same version from sdcard the process works. The
version of the working u-boot is 2018.03, the newer ones from
sysutils/u-boot won't boot to the command line but keep resetting after
printing the u-boot SPL banner.

Index: sximmc.c
RCS file: /cvs/src/sys/dev/fdt/sximmc.c,v
retrieving revision 1.4
diff -u -p -r1.4 sximmc.c
--- sximmc.c 27 May 2018 18:03:22 -0000 1.4
+++ sximmc.c 17 Jun 2018 06:28:08 -0000
@@ -298,6 +298,7 @@ sximmc_match(struct device *parent, void
     OF_is_compatible(faa->fa_node, "allwinner,sun5i-a13-mmc") ||
     OF_is_compatible(faa->fa_node, "allwinner,sun7i-a20-mmc") ||
     OF_is_compatible(faa->fa_node, "allwinner,sun9i-a80-mmc") ||
+    OF_is_compatible(faa->fa_node, "allwinner,sun50i-a64-emmc") ||
     OF_is_compatible(faa->fa_node, "allwinner,sun50i-a64-mmc"));
@@ -306,7 +307,8 @@ sximmc_idma_setup(struct sximmc_softc *s
  int error;
- if (OF_is_compatible(sc->sc_node, "allwinner,sun4i-a10-mmc")) {
+ if (OF_is_compatible(sc->sc_node, "allwinner,sun4i-a10-mmc") ||
+    OF_is_compatible(sc->sc_node, "allwinner,sun50i-a64-emmc")) {
  sc->sc_idma_xferlen = 0x2000;
  } else {
  sc->sc_idma_xferlen = 0x10000;

OpenBSD 6.3-current (GENERIC.MP) #2: Sat Jun 16 21:33:54 CEST 2018
    [hidden email]:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem  = 2021216256 (1927MB)
avail mem = 1909899264 (1821MB)
mainbus0 at root: SoPine with baseboard
cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4
efi0 at mainbus0: UEFI 2.7
efi0: Das U-Boot rev 0x0
psci0 at mainbus0: PSCI 0.2
agtimer0 at mainbus0: tick rate 24000 KHz
simplebus0 at mainbus0: "soc"
syscon0 at simplebus0: "syscon"
sxiccmu0 at simplebus0
sxipio0 at simplebus0: 103 pins
ampintc0 at simplebus0 nirq 224, ncpu 4 ipi: 0, 1: "interrupt-controller"
sxiccmu1 at simplebus0
sxipio1 at simplebus0: 13 pins
sxirsb0 at simplebus0
axppmic0 at sxirsb0 addr 0x3a3: AXP803
sximmc0 at simplebus0
sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma
sximmc1 at simplebus0
sdmmc1 at sximmc1: 8-bit, sd high-speed, mmc high-speed, dma
ehci0 at simplebus0
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1
ehci1 at simplebus0
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1
com0 at simplebus0: ns16550, no working fifo
com0: console
dwxe0 at simplebus0: address 02:ba:40:76:cf:7e
rgephy0 at dwxe0 phy 1: RTL8169S/8110S/8211 PHY, rev. 5
sxirtc0 at simplebus0
gpio0 at sxipio0: 32 pins
gpio1 at sxipio0: 32 pins
gpio2 at sxipio0: 32 pins
gpio3 at sxipio0: 32 pins
gpio4 at sxipio0: 32 pins
gpio5 at sxipio0: 32 pins
gpio6 at sxipio0: 32 pins
gpio7 at sxipio0: 32 pins
gpio8 at sxipio1: 32 pins
cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4
cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4
cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4
scsibus0 at sdmmc0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SD/MMC, USD, 0010> SCSI2 0/direct removable
sd0: 3839MB, 512 bytes/sector, 7862272 sectors
scsibus1 at sdmmc1: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: <Sandisk, SEM64G, 0000> SCSI2 0/direct removable
sd1: 59640MB, 512 bytes/sector, 122142720 sectors
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd1a (dab9482894d9ac1d.a) swap on sd1b dump on sd1b