24 May, 2019

3 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)

    Ye Li
     
  • 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)

    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

    Ye Li
     

25 Feb, 2019

1 commit


01 Feb, 2019

1 commit


29 Jan, 2019

1 commit


16 Jan, 2019

2 commits


09 Jan, 2019

2 commits

  • In order to keep SPL code size below the 32Kb limit,
    put under CONFIG_SPL_BUILD flag all unused code in SPL.
    This is needed for stm32f7xx board which are using SPL.

    Signed-off-by: Patrice Chotard

    Patrice Chotard
     
  • In case "gpio-ranges" property is not present in device tree,
    use default value for gpio_count and gpio_range.
    This fixes an issue on stm32 F7 and H7 boards where "pinmux status -a"
    command didn't return any pin status due to the fact that both stm32 F7
    and H7 board DT doesn't use the gpio-ranges property.

    Fixes: dbf928dd2634a6("gpio: stm32f7: Add gpio bank holes management")

    Signed-off-by: Patrice Chotard

    Patrice Chotard
     

01 Jan, 2019

2 commits


19 Dec, 2018

1 commit

  • The VCore III SoCs such as the Luton but also the Ocelot can remap an SPI
    flash directly in memory. However, for writing in the flash the
    communication has to be done by software.

    Each of the signal used for the SPI are exposed in a single register. In
    order to be able to use the soft-spi driver, the management of this pin
    is done through this simple gpio driver.

    Even if the main purpose of this driver is to be used by soft-spi, it can
    still be used as a normal gpio driver but with limitation: for example
    the first pin can't be used as output.

    Signed-off-by: Gregory CLEMENT
    Reviewed-by: Daniel Schwierzeck

    Gregory CLEMENT
     

07 Dec, 2018

3 commits


29 Nov, 2018

1 commit

  • As a preparation for merging the socfpga gen5 devicetree files
    from Linux, this patch makes the dwapb gpio driver work correctly
    without the 'bank-name' property on the gpio-controller nodes.

    This property is not present in the Linux drivers and thus is not
    present in the Linux devicetrees. It is only used to access pins
    via bank name.

    This fallback is necessary since without it, the driver will
    return an error code which will lead to an error in U-Boot
    startup.

    The bank names will still be added to the default board device
    trees in follow-up patch, but other boards using this driver and
    not including the bank name should also work with the socfpga.dtsi
    without adding the bank-name property.

    Signed-off-by: Simon Goldschmidt

    Simon Goldschmidt
     

18 Nov, 2018

1 commit

  • This patch adds GPIO support for the Mediatek MT7621 SoC, tested on
    MT7688 (Gardena smart-gateway). The driver is loosly based on the
    Linux kernel version.

    Signed-off-by: Stefan Roese
    Cc: Daniel Schwierzeck
    Reviewed-by: Daniel Schwierzeck
    [fixed checkpatch.pl warnings: Prefer 'unsigned int' to bare use of 'unsigned']
    Signed-off-by: Daniel Schwierzeck

    Stefan Roese
     

17 Nov, 2018

2 commits

  • This patch adds gpio get_function ops support.
    This function reports the state of a gpio.

    Signed-off-by: Christophe Kerello
    Reviewed-by: Simon Glass
    Signed-off-by: Patrice Chotard

    Patrice Chotard
     
  • The pca953x_gpio driver uses default value of polarity inversion
    register. For some devices like PCA9557 and MAX7310, their polarity
    inversion register default value is 0xf0. So for high 4 ports, when
    reading their values, the values are inverted as the actual level.

    This patch clears the polarity inversion register to 0 at init, so
    that the port read and write values are aligned.

    Signed-off-by: Ye Li
    Acked-by: Fugang Duan
    Acked-by: Peng Fan
    Signed-off-by: Anatolij Gustschin

    Ye Li
     

15 Nov, 2018

1 commit

  • When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be
    bound before relocation. However due to a bug in the DM core,
    the flag only takes effect when devices are statically declared
    via U_BOOT_DEVICE(). This bug has been fixed recently by commit
    "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in
    lists_bind_fdt()", but with the fix, it has a side effect that
    all existing drivers that declared DM_FLAG_PRE_RELOC flag will
    be bound before relocation now. This may expose potential boot
    failure on some boards due to insufficient memory during the
    pre-relocation stage.

    To mitigate this potential impact, the following changes are
    implemented:

    - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver
    only supports configuration from device tree (OF_CONTROL)
    - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device
    is statically declared via U_BOOT_DEVICE()
    - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for
    drivers that support both statically declared devices and
    configuration from device tree

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

    Bin Meng
     

14 Nov, 2018

1 commit


25 Oct, 2018

1 commit


22 Oct, 2018

1 commit


11 Oct, 2018

2 commits


03 Oct, 2018

1 commit


15 Sep, 2018

3 commits


12 Sep, 2018

4 commits

  • Platforms with limited resources in SPL may enable OF_PLATDATA,
    this limits some of the library functions and cannot extract data
    from the device tree. This patch adds additional wrappers around
    these functions to only allow them when OF_CONTROL is enabled and
    OF_PLATDATA is not.

    Signed-off-by: Adam Ford
    Reviewed-by: Simon Glass

    Adam Ford
     
  • The GPIO bank numbers do not appear in the device tree, so this
    patch makes the gpio name based on the address
    (ie gpio@49054000_31 vs gpio4_31)

    adam

    Signed-off-by: Adam Ford
    Tested-by: Derald D. Woods

    Adam Ford
     
  • With DM and device tree support, let's use the GPIO_ACTIVE_HIGH
    and GPIO_ACTIVE_LOW from the device tree as they are intended.

    Signed-off-by: Adam Ford

    Adam Ford
     
  • The GPIO banks are broken up into two 16-bit registers for each
    bank set. Unfortunately, the math that determines how to shift
    blindly shifted by the number of the gpio. This worked for gpio
    numbers under 32, but higher gpio's are broken. This fixes the
    gpio index, so the bank is passed and the shift amount within
    the register is passed now instead of the gpio number.

    Fixes: 8e51c0f25406("dm: gpio: Add DM compatibility to
    GPIO driver for Davinci")

    Signed-off-by: Adam Ford

    Adam Ford
     

11 Sep, 2018

1 commit

  • Replace clrsetbits on ODR register (2 operations: one read + one write)
    by writing on the correct bit (SET or RESET) of the BSRR register
    (only 1 write operation).

    Moreover this register if safe for simultaneous access by 2 master on
    the bus.

    Signed-off-by: Patrick Delaunay
    Signed-off-by: Patrice Chotard

    Patrice Chotard
     

07 Aug, 2018

5 commits