needs lib/struct drv/timer drv/usb drv/usb/ehci drv/sunxi/ccu unit drv/sunxi/usb struct PHYRegs { +$10 uint PHY_CTL ; +$20 uint PHY_OTGCTL ; } here# $01c19400 , PHYRegs bindstruct $01c1a000 const OTGREGS $01c1b000 const EHCIREGS EHCIREGS value USBREGS struct USBRegs { +$800 uint HCI_ICR ; +$804 uint HCI_STATUS ; +$810 uint HCI_PHY_CTL ; } addrof USBREGS USBRegs bindstruct \ This logic here is a reconstitution of what u-boot does when booting the \ Pine 64. The PHY_CTL port is *not* documented in the AllWinner user manual, \ so I have no idea how this works. I'm just replicating the steps. : ubootvodoo ( -- ) doto HCI_PHY_CTL 2 invand | doto HCI_ICR $701 or | 0 to PHY_OTGCTL ; : sunxiusb$ ( -- ) doto BUS_CLK_GATING_REG0 $33000000 or | doto BUS_SOFT_RST_REG0 $33000000 or | doto USBPHY_CFG_REG $30303 or | ubootvodoo USBREGS ehci$ 1 to CONFIGFLAG ;