05 May, 2015

1 commit


04 May, 2015

26 commits

  • Once we add support for the ohci controller the phy-init and phy-power-on
    functions may be called twice (once by the ehci code and once by the ohci
    code) protect them against this.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • The 2/3 usb-phys on the sunxi SoCs are really a single separate functional
    block, and are modelled as such in devicetree. So once we've moved all the
    sunxi usb code to the driver-model then phy_probe will be called once
    for the entire block from the driver-model enumeration code.

    Move to this now as this also avoids problems with phy_probe being called
    multiple times once we introduce ohci support. This also allows us to get rid
    of the sunxi_usb_phy_enabled_count variable as phy_probe now is guaranteed
    to be called only once.

    Since we're effectively rewriting the probe / remove functions, move them
    to the end of the file while we are at it, as that is the most logical place
    for them.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • The usbc.? files now only contain usb-phy related code, rename them to make
    this clear.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • Rename the sunxi_usbc_foo functions to sunxi_usb_phy_bar to make it clear
    that these are usb-phy functions. Also change the verbs & nouns in the suffix
    to match the verbs & nouns used in the Linux kernels generic phy framework.

    This patch purely renames things, it contains no functional changes.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • This is the only function left in sunxi/usbc.c which is not phy related,
    so remove it.

    This is a preparation patch for turning the usbc.c code into a proper
    usb phy driver.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • The sunxi "usbc" code is mostly about phy setup, but currently also sets up
    the host controller clocks, which is something which really belongs in the
    host controller drivers, so move it there.

    This is a preparation patch for moving the sunxi ehci code to the driver
    model and for adding ohci support.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • Now that all sunxi boards are using driver-model for gpio (*), we can remove
    the non driver-model support from the axp gpio code, and the glue to call
    into the axp gpio code from the sunxi_gpio non driver-model code.

    *) For the regular u-boot build, SPL still uses non driver-model gpio for
    now, but the SPL never uses axp gpios support and we were already not building
    axp-gpio support for the SPL.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • All sunxi boards now use the driver-model, so remove the non driver-model
    code.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • Now that we've everything prepared for it remove the DM settings from the
    defconfig(s) and simply always set them for sunxi.

    This makes all sunxi boards allways use the driver model for gpios and
    ethernet, and allows us to move over more bits to the driver-model without
    the need to introduce #ifdef-ery for boards which are not yet using DM.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • u-boot has support for a number of boards for which a dts file still needs
    to be written, add minimal dts files for these boards so that we can switch
    them over to driver-model / fdt.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass

    Hans de Goede
     
  • We need dts files for all boards we support, so bring in a few unmerged ones,
    these will be replaced with the upstream merged versions the next time we
    sync dts files.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • Bring all the sunxi dts files (and update existing ones) from
    mripard/sunxi/dt-for-4.1 (which will be merged into upstream master any
    day now). This is necessary so that we can move all sunxi boards over to
    the driver model.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • Modify the sunxi-emac eth driver to support driver model.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell
    Reviewed-by: Stefan Roese

    Hans de Goede
     
  • netdev.h should not be included in driver-model enabled builds (doing so
    causes compiler warnings about struct eth_driver not being declared), but
    we do use sunxi_gmac_initialize in the driver-model case, so move it out of
    netdev.h .

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • Add driver-model support to the axp_gpio code, note that this needs a small
    tweak to the driver-model version of sunxi_name_to_gpio to deal with the
    vbus detect and enable pins which are not standard numbered gpios.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • Move the axp-gpio code out of the drivers/power/axp*.c code, and into
    a new separate axpi-gpio driver.

    This change drops supports for the gpio3 pin on the axp209, as that requires
    special handling, and no boards are using it.

    Besides cleaning things up by moving the code to a separate driver, as
    a bonus this change also adds support for the (non vusb) gpio pins on the
    axp221 and the gpio pins on the axp152.

    The new axp-gpio driver gets its own Kconfig option, and is only enabled
    on boards which need it. Besides that it only gets enabled in the regular
    u-boot build and not for the SPL as we never need it in the SPL.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • Add support for the axp152 and axp209 PMICs to the pmic register access
    helpers. This is a preparation patch for moving the axp gpio code to a
    separate gpio driver.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • Move the register helpers used to access the registers via p2wi resp.
    rsb bus on the otherwise identical axp221 and axp223 pmics to a separate
    file, so that they can be used by the upcoming standalone axp gpio driver
    too.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • The driver-model gpio functions may return another value then -1 as error,
    make the sunxi usbc properly handle this.

    Signed-off-by: Hans de Goede
    Reviewed-by: Simon Glass
    Acked-by: Ian Campbell

    Hans de Goede
     
  • Enable full support for the A33 SoC including display, otg-usb, etc.

    Signed-off-by: Vishnu Patekar
    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Vishnu Patekar
     
  • Based on Allwinner dram init code from the a33 bsp:
    https://github.com/allwinner-zh/bootloader/blob/master/basic_loader/bsp/bsp_for_a33/init_dram/mctl_hal.c

    Initial u-boot port by Vishnu Patekar, major cleanup / rewrite by
    Hans de Goede.

    Signed-off-by: Vishnu Patekar
    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Vishnu Patekar
     
  • Add support for the new second DRAM PLL found on the A33 SoC.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • This is a preparation patch for adding A33 support, which will have a
    mach name of sun8i-a33.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • sun6i and newer (derived) SoCs such as the sun8i-a23, sun8i-a33 and sun9i
    have a various things in common, like having separate ahb reset control
    registers, the SID living inside the pmic, custom pmic busses, new style
    watchdog, etc.

    This commit introduces a new hidden SUNXI_GEN_SUN6I Kconfig bool which can be
    used to check for these features avoiding the need for an ever growing list
    of "#if defined CONFIG_MACH_SUN?I" conditionals as we add support for more
    "new style" sunxi SoCs.

    Note that this commit changes the behavior of the gmac and hdmi code for
    sun8i and the upcoming sun9i devices. This does not matter as sun8i does
    not have gmac nor hdmi, and sun9i has new hardware-blocks for these so
    the old code will not work there.

    Also this is intentional as if a sun8i / sun9i variant which does use the
    old hwblocks shows up then the GEN_SUN6I code paths will be the right ones
    to use.

    For completeness this also adds a SUNXI_GEN_SUN4I bool for A10/A13/A20.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • We do not use irqs in u-boot so remove the unused irq field, and all the
    #ifdef-ery around the irq initialization.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     
  • There is no reason not to and this make the #ifdef-ery easier to read.

    Signed-off-by: Hans de Goede
    Acked-by: Ian Campbell

    Hans de Goede
     

02 May, 2015

1 commit

  • This is already invoked a few cycles later in monitor mode by
    _secure_monitor (_sunxi_cpu_entry calls _do_nonsec_entry which triggers
    _secure_monitor via smc #0). Drop it here, it serves no purpose.

    CC: Marc Zyngier
    Signed-off-by: Jan Kiszka
    Reviewed-by: Tom Rini
    Reviewed-by: Thierry Reding
    Tested-by: Thierry Reding
    Tested-by: Ian Campbell
    Tested-by: Hans de Goede
    Signed-off-by: Hans de Goede

    Jan Kiszka
     

01 May, 2015

5 commits


30 Apr, 2015

7 commits