I took another small step in my quest to get the dwxe driver working on my
orange pi one (Allwinner H3).

After getting syscon to start before dwxe I think I am able to get through
the initializations and my dtb seems to have everything that is needed and
presenting it to the driver.  

I now have discovered a little bug that should be fixed.  The mio clock
divisor definitions are made with a left shift of 20 and then when the
divisors are used in mii read and write they are shifted again.  I altered
the defines to remove the shift:
#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_SHIFT    20
//#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_MASK   (0x7 << 20)
//#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_16     (0 << 20)
//#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_32     (1 << 20)
//#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_64     (2 << 20)
//#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_128    (3 << 20)
#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_MASK     0x7
#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_16       0
#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_32       1
#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_64       2
#define  DWXE_MDIO_CMD_MDC_DIV_RATIO_M_128      3

Reply via email to