1. 12 Oct, 2021 1 commit
    • Samuel Holland's avatar
      sunxi: video: Convert panel I2C to use DM_I2C · 2421497c
      Samuel Holland authored and André Przywara's avatar André Przywara committed
      
      
      Two displays supported by the sunxi display driver (each one used by a
      single board) require initialization over I2C. Both previously used
      i2c_soft; replace this with the i2c-gpio instance that already exists in
      those boards' device trees (sun5i-a13-utoo-p66 and sun6i-a31-colombus).
      
      Since the i2c-gpio nodes are not referenced by any other node in the
      device trees (the device trees have no panel node), the I2C bus is
      selected by its node name.
      
      This panel initialization code was the only i2c_soft user, so the
      i2c_soft GPIO setup code can be removed now as well.
      Reviewed-by: Heiko Schocher's avatarHeiko Schocher <hs@denx.de>
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Signed-off-by: André Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      2421497c
  2. 11 Oct, 2021 3 commits
    • Samuel Holland's avatar
      sunxi: Clean up inclusions of asm/arch/gpio.h · 42508461
      Samuel Holland authored and André Przywara's avatar André Przywara committed
      
      
      As part of migrating to DM_GPIO and DM_PINCTRL, eventually we will
      remove the asm/arch/gpio.h header. In preparation, clean up the various
      files that include it.
      
      Some files did not contain any GPIO code at all, so this header was
      completely unused.
      
      A few files contained only legacy platform-specific GPIO code for
      setting up pin muxes. They were left unchanged, as that code will be
      completely removed by the DM_PINCTRL migration.
      
      The remaining files contain some combination of DM_GPIO and legacy GPIO
      code. For those, switch to including asm/gpio.h (if it wasn't included
      already). Right now, this header provides both sets of functions,
      because ARCH_SUNXI selects GPIO_EXTRA_HEADER. This will still be the
      right header to include once the DM_GPIO migration is complete and
      GPIO_EXTRA_HEADER is no longer needed.
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Reviewed-by: André Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      Signed-off-by: Andre Przywara <andre.przywara@arm...
      42508461
    • Arnaud Ferraris's avatar
      board: sunxi: enable status LED early · 8f872bb3
      Arnaud Ferraris authored and André Przywara's avatar André Przywara committed
      
      
      For some systems, such as the PinePhone, there is no way for the end
      user to make sure the system is indeed booting before the boot script is
      executed, which takes several seconds. Therefore, it can be useful to
      provide early visual feedback as soon as possible.
      
      In order achieve this goal, this patch initializes the status LED (if
      configured) in the SPL.
      Signed-off-by: default avatarArnaud Ferraris <arnaud.ferraris@collabora.com>
      Reviewed-by: default avatarSamuel Holland <samuel@sholland.org>
      Signed-off-by: André Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      8f872bb3
    • Samuel Holland's avatar
      sunxi: Simplify MMC pinmux selection · dda9fa73
      Samuel Holland authored and André Przywara's avatar André Przywara committed
      
      
      Only one board, Yones Toptech BD1078, actually uses a non-default MMC
      pinmux. All other uses of these symbols select the default value or an
      invalid value. To simplify things, remove support for the unused pinmux
      options, and convert the remaining option to a Boolean.
      
      This allows the pinmux to be chosen by the preprocessor, instead of
      having the code parse a string at runtime (for a build-time option!).
      Not only does this reduce code size, but it also allows this Kconfig
      option to be used in a table-driven DM pinctrl driver.
      Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
      Reviewed-by: André Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      Signed-off-by: André Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      dda9fa73
  3. 30 Aug, 2021 1 commit
  4. 31 Jul, 2021 1 commit
  5. 10 Jul, 2021 1 commit
    • André Przywara's avatar
      sunxi: board: Add H616 MMC2 pins · 212224ed
      André Przywara authored
      
      
      We hardcode the pinctrl setting for the MMC controllers in boards.c,
      since we need them also in the SPL, where there is no DT yet.
      
      Add the respective setting for the H616 SoC, to enable eMMC on boards
      with this SoC as well.
      Also to make diagnosing this problem easier, print a warning if a board
      tries to setup MMC2 pins without a respective SoC setting being defined.
      Signed-off-by: André Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      Reviewed-by: Jagan Teki <jagan at amarulasolutions.com>
      Reviewed-by: Jernej Skrabec <jernej.skrabec at siol.net>
      212224ed
  6. 21 Feb, 2021 1 commit
    • Igor Opaniuk's avatar
      dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C/DM_I2C_GPIO · 2147a169
      Igor Opaniuk authored and Heiko Schocher's avatar Heiko Schocher committed
      
      
      Use CONFIG_IS_ENABLED() macro, which provides more convenient
      way to check $(SPL)DM_I2C/$(SPL)DM_I2C_GPIO configs
      for both SPL and U-Boot proper.
      
      CONFIG_IS_ENABLED(DM_I2C) expands to:
      - 1 if CONFIG_SPL_BUILD is undefined and CONFIG_DM_I2C is set to 'y',
      - 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_DM_I2C is set to 'y',
      - 0 otherwise.
      
      All occurences were replaced automatically using these bash cmds:
      $ find . -type f -exec sed -i
           's/ifndef CONFIG_DM_I2C/if !CONFIG_IS_ENABLED(DM_I2C)/g' {} +
      $ find . -type f -exec sed -i
          's/ifdef CONFIG_DM_I2C/if CONFIG_IS_ENABLED(DM_I2C)/g' {} +
      $ find . -type f -exec sed -i
          's/defined(CONFIG_DM_I2C)/CONFIG_IS_ENABLED(DM_I2C)/g' {} +
      $ find . -type f -exec sed -i
          's/ifndef CONFIG_DM_I2C_GPIO/if !CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
      $ find . -type f -exec sed -i
          's/ifdef CONFIG_DM_I2C_GPIO/if CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
      $ find . -type f -exec sed -i
          's/defined(CONFIG_DM_I2C_GPIO)/CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
      Reviewed-by: Heiko Schocher's avatarHeiko Schocher <hs@denx.de>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarIgor Opaniuk <igor.opaniuk@foundries.io>
      Reviewed-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      Reviewed-by: Priyanka Jain's avatarPriyanka Jain <priyanka.jain@nxp.com>
      2147a169
  7. 02 Feb, 2021 1 commit
    • Simon Glass's avatar
      common: Drop asm/global_data.h from common header · 401d1c4f
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      
      Move this out of the common header and include it only where needed.  In
      a number of cases this requires adding "struct udevice;" to avoid adding
      another large header or in other cases replacing / adding missing header
      files that had been pulled in, very indirectly.   Finally, we have a few
      cases where we did not need to include <asm/global_data.h> at all, so
      remove that include.
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: Tom Rini's avatarTom Rini <trini@konsulko.com>
      401d1c4f
  8. 25 Jan, 2021 3 commits
  9. 11 Jan, 2021 3 commits
  10. 17 Nov, 2020 7 commits
  11. 08 Sep, 2020 1 commit
  12. 17 Jul, 2020 1 commit
    • Masahiro Yamada's avatar
      treewide: convert bd_t to struct bd_info by coccinelle · b75d8dc5
      Masahiro Yamada authored and Tom Rini's avatar Tom Rini committed
      The Linux coding style guide (Documentation/process/coding-style.rst)
      clearly says:
      
        It's a **mistake** to use typedef for structures and pointers.
      
      Besides, using typedef for structures is annoying when you try to make
      headers self-contained.
      
      Let's say you have the following function declaration in a header:
      
        void foo(bd_t *bd);
      
      This is not self-contained since bd_t is not defined.
      
      To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h>
      
        #include <asm/u-boot.h>
        void foo(bd_t *bd);
      
      Then, the include direcective pulls in more bloat needlessly.
      
      If you use 'struct bd_info' instead, it is enough to put a forward
      declaration as follows:
      
        struct bd_info;
        void foo(struct bd_info *bd);
      
      Right, typedef'ing bd_t is a mistake.
      
      I used coccinelle to generate this commit.
      
      The semantic patch that makes this change is as follows:
      
        <smpl>
        @@
        typedef bd_t;
        @@
        -bd_t
        +struct bd_info
        </smpl>
      
      Signed-off-by: Masahiro Yamada ...
      b75d8dc5
  13. 19 May, 2020 2 commits
  14. 18 May, 2020 1 commit
  15. 24 Jan, 2020 2 commits
  16. 17 Jan, 2020 2 commits
  17. 02 Dec, 2019 1 commit
  18. 11 Aug, 2019 2 commits
  19. 29 Jan, 2019 1 commit
  20. 18 Jan, 2019 1 commit
  21. 29 Dec, 2018 1 commit
  22. 09 Dec, 2018 1 commit
  23. 07 Dec, 2018 2 commits