01 Feb, 2019

3 commits


31 Jan, 2019

16 commits


30 Jan, 2019

14 commits

  • Enable DM_MMC for all Allwinner SoCs, this will eventually
    enable BLK.

    Also removed DM_MMC enablement in few parts of sunxi
    configurations.

    Signed-off-by: Jagan Teki
    Reviewed-by: Andre Przywara
    Signed-off-by: Andre Przywara

    Jagan Teki
     
  • Like other Allwinner A64 boards, pinebook also need altering
    auto-numbering of mmc2 to mmc1 which is available in common
    sunxi dsti file, sunxi-u-boot.dtsi

    Pinebook has a separate sun50i-a64-pinebook-u-boot.dtsi which
    takes more precedence for u-boot.dtsi inclusion and it eventually
    failed to include the sunxi-u-boot.dtsi.

    So, this patch add support to include the sunxi-u-boot.dtsi in the
    sun50i-a64-pinebook-u-boot.dtsi

    Signed-off-by: Jagan Teki
    Tested-by: Vasily Khoruzhick # Pinebook

    Jagan Teki
     
  • Environment and fastboot mmc devices are configured based on the number
    of mmc slots defined on particular board configs, MMC_SUNXI_SLOT_EXTRA.

    If MMC_SUNXI_SLOT_EXTRA is more than 1, the default env and fastboot
    mmc devices is mmc1 by assuming mmc0 is SD and mmc1 is emmc device.

    But with DM_MMC the mmc devices are numbered as per the dts node
    enablement. If there is a chance of having enabling all mmc nodes
    in dts say mmc0, mmc1, mmc2 then the default env and fastboot devices
    will failed to assign proper emmc device since mmc2 is emmc in most
    of the Allwinner platforms.

    So, we need to alter the auto-numbering by aliasing mmc2 to mmc1 since
    aliases take precedence over auto-numbering.

    If the dts enables mmc0, mmc1, mmc2, then all the nodes will probe
    sequentially and auto-numbered as it is. but when aliases mmc1 with mmc2
    the resulting number should be that mmc0 is till mmc0, mmc2 become mmc1
    and mmc2 become mmc1

    Without aliases of mmc1 = &mmc2;
    -------------------------------
    MMC: mmc@1c0f000: 0, mmc@1c10000: 1, mmc@1c11000: 2

    With aliases of mmc1 = &mmc2;
    ----------------------------
    MMC: Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000'
    mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
    Loading Environment from FAT... OK

    Some platforms like A20 has mmc0...mmc3, but there is no usecases now
    for enabling all mmc controllers in any of A20 board dts files.

    Signed-off-by: Jagan Teki

    Jagan Teki
     
  • Some Allwinner clock devices have parent clocks and reset gates itself,
    which need to be activated for them to work.

    Add some code to just assert all resets and enable all clocks given.
    This should enable the A80 MMC config clock, which requires both to be
    activated. The full CCU devices typically don't require resets, and have
    just fixed clocks as their parents. Since we treat both as optional and
    enabling fixed clocks is a NOP, this works for all cases, without the need
    to differentiate between those clock types.

    Signed-off-by: Andre Przywara
    Acked-by: Jagan Teki

    Andre Przywara
     
  • For 2019.04

    Tom Rini
     
  • If a board DT describes a cd-gpios property, but also marks the storage
    as non-removable, we must ignore the GPIO (as Linux does).

    Teach the DM_MMC part of the Allwinner MMC driver about the
    non-removable DT property, to fix DM_MMC access on the SoPine and
    Pine64-LTS board.

    Signed-off-by: Andre Przywara
    Acked-by: Jagan Teki

    Andre Przywara
     
  • Enabling DM_MMC skips the call to mmc_pinmux_setup() in board.c, as this
    is supposed to be handled by the MMC driver, using DT information.

    However we don't have a pinctrl driver yet, but would still like to keep
    the working pinmux setup for our MMC devices. So bring this particular
    call back to the DM_MMC code flow.

    When booting from either SD card or eMMC, the SPL does the setup for us,
    but when booting from SPI or USB we must not skip this part.

    Fixes, boot via FEL or SPI flash, where the SPL won't setup the pinmux

    Signed-off-by: Andre Przywara
    Acked-by: Jagan Teki
    [jagan: add Fix details on commit message]
    Signed-off-by: Jagan Teki

    Andre Przywara
     
  • Now that we have the gate clocks and the reset gates in our new
    Allwinner clock driver, let's make use of them in the MMC driver, when
    DM_MMC is defined.
    We treat the reset device as optional now, as the older SoCs don't
    implement it.

    Signed-off-by: Andre Przywara
    Reviewed-by: Jagan Teki

    Andre Przywara
     
  • A80 gates clock already be part of CLK framework, so just
    add mod_clk offset with A80 compatible string.

    Cc: Rask Ingemann Lambertsen
    Cc: Jaehoon Chung
    Signed-off-by: Jagan Teki
    Reviewed-by: Andre Przywara

    Jagan Teki
     
  • Unlike other Allwinner SoC's, H6 uses a different MMC mod clock offset.
    Connect that with the respective compatible string.

    Signed-off-by: Jagan Teki
    Reviewed-by: Andre Przywara
    Signed-off-by: Andre Przywara

    Jagan Teki
     
  • Add MMC compatible strings for A83T, A64, H5.

    Signed-off-by: Jagan Teki
    Reviewed-by: Andre Przywara
    Signed-off-by: Andre Przywara

    Jagan Teki
     
  • The A80 handles resets and clock gates for the MMC devices differently,
    outside of the CCU IP block. Consequently we have a separate clock
    device with a separate binding for that.

    Implement that with the respective clock gates and resets to allow the
    A80 taking part in the DM_MMC game.

    Signed-off-by: Andre Przywara
    [jagan: fix a80 mmc clock config compatible]
    Signed-off-by: Jagan Teki
    Reviewed-by: Jagan Teki

    Andre Przywara
     
  • Add the MMC clock gates and reset bits for all the Allwinner SoCs.
    This allows them to be used by the MMC driver.

    We don't advertise the mod clock yet, as this is still handled by the
    MMC driver.

    Signed-off-by: Andre Przywara
    [jagan: add V3S, A80 gates/resets]
    Signed-off-by: Jagan Teki
    Reviewed-by: Jagan Teki

    Andre Przywara
     
  • Enable USB host controllers for Amarula A64-Relic board,
    the respective nodes are already present in DTS.

    Signed-off-by: Jagan Teki

    Jagan Teki
     

29 Jan, 2019

7 commits