1. 19 Mar, 2021 1 commit
  2. 17 Aug, 2020 1 commit
    • Andre Przywara's avatar
      plat/allwinner: Only enable DRIVEVBUS if really needed · 93fa305c
      Andre Przywara authored
      
      
      The DRIVEVBUS power rail of the AXP803 PMIC is mostly used to supply
      the USB bus power on micro USB sockets, when used in host mode. As this
      is a dynamic operation, and mostly we want micro USB sockets to act in
      client mode initially, BL31 should not actually enable this power line.
      However, on some boards DRIVEVBUS is used to supply power to normal
      USB-A sockets. Failing to activate this line there results in
      non-functional USB in U-Boot on those boards.
      
      For that reason we were enabling DRIVEVBUS so far, as it did not seem to
      cause any harm to the other boards. However it turns out that on the
      Pinephone (and other systems with a battery), actually enabling DRIVEVBUS
      unconditionally causes serious problems (reboot loop).
      
      To accommodate both use cases, without reverting to a build time option,
      check the default OTG configuration in the devicetree. For boards with
      USB-A sockets this is set to "host", on boards with micro-B sockets to
      "otg". Depending on this setting, we either enable DRIVEVBUS or leave it
      alone.
      
      This fixes TF-A on the Pinephone and potentially other battery powered
      devices.
      
      Change-Id: Iec0e07f218b2b4393bf4e05c3386261f8ed19e9f
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      93fa305c
  3. 14 Dec, 2019 2 commits
    • Samuel Holland's avatar
      allwinner: Convert AXP803 regulator setup code into a driver · 0bc752c9
      Samuel Holland authored
      
      
      Previously, the A64/H5 and H6 platforms' PMIC setup code was entirely
      independent. However, some H6 boards also need early regulator setup.
      
      Most of the register interface and all of the device tree traversal code
      can be reused between the AXP803 and AXP805. The main difference is the
      hardware bus interface, so that part is left to the platforms. The
      remainder is moved into a driver.
      
      I factored out the bits that were obviously specific to the AXP803;
      additional changes for compatibility with other PMICs can be made as
      needed.
      
      The only functional change is that rsb_init() now checks the PMIC's chip
      ID register against the expected value. This was already being done in
      the H6 version of the code.
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Change-Id: Icdcf9edd6565f78cccc503922405129ac27e08a2
      0bc752c9
    • Samuel Holland's avatar
      drivers: allwinner: axp: Add AXP805 support · f6d9c4ca
      Samuel Holland authored
      
      
      This adds the new regulator list, as well as changes to make the switch
      (equivalent to DC1SW on the AXP803) work on both PMICs.
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Change-Id: I9a1eac8ddfc54b27096c10a8eebdd51aaf9b8311
      f6d9c4ca