19 May, 2020

1 commit

  • Current mxc_gpio DM driver allocates the platdata in bind function to
    handle both OF_CONTROL enabled case and disabled case. This implementation
    puts the devfdt_get_addr in bind, which introduces much overhead especially
    in board_f phase.

    Change the driver to a common way for handling the cases by using
    ofdata_to_platdata and using DM framework to allocate platdata.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit b1d08b73756f5090aa33edda98edd239cfca3f4e)

    Ye Li
     

27 Apr, 2020

1 commit

  • For GPIO group which shared by multiple masters, it may set in RDC
    to shared and semaphore required. Before access the GPIO register,
    the GPIO driver must get the RDC semaphore, and release the semaphore
    after the GPIO register access.

    When CONFIG_MXC_RDC is set, the features related to RDC semaphores
    is enabled in mxc_gpio driver.

    Signed-off-by: Ye.Li
    (cherry picked from commit 84d63e2e2ce12f714e88baad8b2325684614a7c1)
    Signed-off-by: Peng Fan

    Conflicts:
    drivers/gpio/mxc_gpio.c

    (cherry picked from commit c9943b9c8a78bb2c9886bfe582e82978387d8dee)
    Signed-off-by: Peng Fan
    (cherry picked from commit faf94726cac8316c4342e19936f1e03ef283ace3)
    (cherry picked from commit 6c0474fe0e4fc543c62b22c05c2702a881f56418)
    (cherry picked from commit 7cd5fec7ce6a9ecfdaa1a9c1aaaa0d0ac18a4f86)
    (cherry picked from commit 74d68c1b9f098c44992d591616372f0ec5ff13dd)
    (cherry picked from commit 208c009aa15453349ee9272d62e2c1cebe14ecab)

    Ye.Li
     

23 Apr, 2020

2 commits

  • Currently the driver gets value from PSR register, but this register
    is only for input mode. For output mode, it always return 0 not the
    value we set for output.

    This patch changes to use DR register, which returns the DR value for
    output mode, and PSR value for input mode.

    Signed-off-by: Ye Li
    (cherry picked from commit 4afc3f90943c6b117f79b66d2cd04e64f437b0c2)
    (cherry picked from commit 8cca3efba0d508b2c267f8a32b302970dd05244d)
    (cherry picked from commit 7980dc9700bdeb610cfa91b4b53abe450c688b9b)

    Ye Li
     
  • Since the i.MX8 GPIO banks are indexed from 0 not 1 on other i.MX platforms,
    so we have to adjust the index accordingly.

    Signed-off-by: Adrian Alonso
    Signed-off-by: Ye Li
    (cherry picked from commit 98aad7e51feb8b5010511d82b39e71d6e68c7ee7)

    Ye Li
     

31 Mar, 2020

3 commits

  • Some SoCs in the mpc83xx family, e.g. mpc8309, have a dedicated spi
    chip select, SPISEL_BOOT, that is used by the boot code to boot from
    flash.

    This chip select will typically be used to select a SPI boot
    flash. The SPISEL_BOOT signal is controlled by a single bit in the
    SPI_CS register.

    Implement a gpio driver for the spi chip select register. This allows a
    spi driver capable of using gpios as chip select, to bind a chip select
    to SPISEL_BOOT.

    It may be a little odd to do this as a GPIO driver, since the signal
    is neither GP or I, but it is quite convenient to present it to the
    spi driver that way. The alternative it to teach mpc8xxx_spi to handle
    the SPISEL_BOOT signal itself (that is how it's done in the linux
    kernel, see commit 69b921acae8a)

    Signed-off-by: Klaus H. Sorensen
    Signed-off-by: Rasmus Villemoes

    Klaus H. Sorensen
     
  • The driver correctly handles reading back the value of an output gpio
    by reading from the shadow register for output, and from gpdat for
    inputs.

    Unfortunately, when setting the value of some gpio, we do a RMW cycle
    on the gpdat register without taking the shadow register into account,
    thus accidentally setting other output gpios (at least those whose
    value cannot be read back) to 0 at the same time.

    When changing a gpio from input to output, we still need to make sure
    it initially has the requested value. So, the procedure is

    - update the shadow register
    - compute the new gpdir register
    - write the bitwise and of the shadow and new gpdir register to gpdat
    - write the new gpdir register

    Signed-off-by: Rasmus Villemoes

    Rasmus Villemoes
     
  • Since some chips don't support reading back the value of output gpios
    from the gpdat register, we should not do a RMW cycle (i.e., the
    clrbits_be32) on the gpdat register when setting a gpio as input, as
    that might accidentally change the value of some other (still
    configured as output) gpio.

    The extra indirection through mpc8xxx_gpio_set_in() does not help
    readability, so just fold the gpdir update into
    mpc8xxx_gpio_direction_input().

    Signed-off-by: Rasmus Villemoes

    Rasmus Villemoes
     

11 Feb, 2020

1 commit


09 Feb, 2020

1 commit

  • Since commit bcee8d6764f9 ("dm: gpio: Allow control of GPIO uclass in SPL")
    CONFIG_DM_74X164 is no longer built for mx7dsabresd_defconfig, as
    this target does not use CONFIG_SPL_GPIO.

    Remove such dependency and let the the 74X164 GPIO driver be built
    again.

    This restores Ethernet functionality on the imx7-sdb board as the
    Ethernet reset PHY comes from a GPIO driven by a 74LV595PW I/O
    expander.

    Fixes: bcee8d6764f9 ("dm: gpio: Allow control of GPIO uclass in SPL")
    Signed-off-by: Fabio Estevam
    Reviewed-by: Tom Rini
    Tested-by: Alifer Moraes

    Fabio Estevam
     

08 Feb, 2020

1 commit


06 Feb, 2020

3 commits

  • At present dm/device.h includes the linux-compatible features. This
    requires including linux/compat.h which in turn includes a lot of headers.
    One of these is malloc.h which we thus end up including in every file in
    U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
    which needs to use the system malloc() in some files.

    Move the compatibility features into a separate header file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present devres.h is included in all files that include dm.h but few
    make use of it. Also this pulls in linux/compat which adds several more
    headers. Drop the automatic inclusion and require files to include devres
    themselves. This provides a good indication of which files use devres.

    Signed-off-by: Simon Glass
    Reviewed-by: Anatolij Gustschin

    Simon Glass
     
  • This function name conflicts with our desire to #define free() to
    something else on sandbox. Since it deals with resources, rename it to
    rfree().

    Signed-off-by: Simon Glass

    Simon Glass
     

05 Feb, 2020

1 commit

  • - Various minor fixes for x86
    - Switch to ACPI mode on Intel edison
    - Support run-time configuration for NS16550 driver
    - Update coreboot and slimbootloader serial drivers to use NS16550
    run-time configuration
    - ICH SPI driver fixes to hardware sequencing erase case
    - Move ITSS from Apollo Lake to a more generic location
    - Intel GPIO driver bug fixes
    - Move to vs2017-win2016 platform build host for Azure pipelines

    Tom Rini
     

04 Feb, 2020

6 commits


23 Jan, 2020

1 commit


15 Jan, 2020

1 commit


15 Dec, 2019

2 commits

  • Add a GPIO driver which uses the pinctrl driver to access the pad
    information. This driver relies on the GPIO nodes being subnodes to the
    pinctrl device.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • At present if CONFIG_SPL_GPIO_SUPPORT is enabled then the GPIO uclass
    is included in SPL/TPL without any control for boards. Some boards may
    want to disable this to reduce code size where GPIOs are not needed in
    SPL or TPL.

    Add a new Kconfig option to permit this. Default it to 'y' so that
    existing boards work correctly.

    Change existing uses of CONFIG_DM_GPIO to CONFIG_IS_ENABLED(DM_GPIO) to
    preserve the current behaviour. Also update the 74x164 GPIO driver since
    it cannot build with SPL.

    This allows us to remove the hacks in config_uncmd_spl.h and
    Makefile.uncmd_spl (eventually those files should be removed).

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     

03 Dec, 2019

1 commit


31 Oct, 2019

1 commit

  • _gpio_direction_output function currently calls gpio_set_value
    with the wrong gpio number. gpio_set_value in the uclass driver
    expects a different gpio number and the _gpio_direction_output
    is currently providing the number specific to the bank.

    Hence fix it by calling the _gpio_set_value function instead.

    Reported-by: Faiz Abbas
    Fixes: 8e51c0f254 ("dm: gpio: Add DM compatibility to GPIO driver for Davinci")
    Signed-off-by: Keerthy

    Keerthy
     

24 Oct, 2019

2 commits


18 Oct, 2019

1 commit

  • This patch adds a DM based driver model for gpio controller present in
    FU540-C000 SoC on HiFive Unleashed A00 board. This SoC has one GPIO
    bank and 16 GPIO lines in total, out of which GPIO0 to GPIO9 and
    GPIO15 are routed to the J1 header on the board.

    This implementation is ported from linux based gpio driver submitted
    for review by Wesley W. Terpstra and/or Atish Patra
    (many thanks !!). The linux driver can be referred
    here [1]

    [1]: https://lkml.org/lkml/2018/10/9/1103

    Signed-off-by: Sagar Shrikant Kadam
    Reviewed-by: Bin Meng

    Sagar Shrikant Kadam
     

10 Oct, 2019

1 commit

  • Xilinx/FPGA changes for v2020.01

    FPGA:
    - Enable fpga loading on Versal
    - Minor fix

    Microblaze:
    - Fix LMB configurations to support initrds
    - Some other cleanups

    Zynq:
    - Minor config/dt changes
    - Add distro boot support for usb1 and mmc1
    - Remove Xilinx private boot commands and use only distro boot

    ZynqMP:
    - Kconfig cleanups, defconfig updates
    - Update some dt files
    - Add firmware driver for talking to PMUFW
    - Extend distro boot support for jtag
    - Add new IDs
    - Add system controller configurations
    - Convert code to talk firmware via mailbox or SMCs

    Versal:
    - Add board_late_init()
    - Add run time DT memory setup
    - Add DFU support
    - Extend distro boot support for jtag and dfu
    - Add clock driver
    - Tune mini configurations

    Xilinx:
    - Improve documentation (boot scripts, dt binding)
    - Enable run time initrd_high calculation
    - Define default SYS_PROMPT
    - Add zynq/zynqmp virtual defconfig

    Drivers:
    - Add Xilinx mailbox driver for talking to firmware
    - Clean zynq_gem for Versal
    - Move ZYNQ_HISPD_BROKEN to Kconfig
    - Wire genphy_init() in phy.c
    - Add Xilinx gii2rgmii bridge
    - Cleanup zynq_sdhci
    - dwc3 fix
    - zynq_gpio fix
    - axi_emac fix

    Others:
    - apalis-tk1 - clean config file

    Tom Rini
     

09 Oct, 2019

1 commit


08 Oct, 2019

4 commits


24 Aug, 2019

1 commit


29 Jul, 2019

1 commit


20 Jul, 2019

1 commit


19 Jul, 2019

1 commit


16 Jul, 2019

1 commit