19 May, 2020

1 commit

  • iMX7 and iMX8M pinctrl drivers uses a uninitilized global variable
    for driver data. This variable will put to BSS section by compiler.
    When the driver is called before u-boot relocation, writting to
    the variable will cause u-boot DTB corrupted since the BSS section
    is not initialized that time.

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

    Ye Li
     

27 Apr, 2020

1 commit


23 Apr, 2020

1 commit

  • The CONFIG_DEVRES is not a necessary config for pinctrl. We decouple the
    dependence from the kconfig. So the DEVRES is not default enabled.

    When using USB gadget driver like CDNS3 or DWC3, without enabling gadget DM
    driver, the calling to devm_kzalloc will cause crash if CONFIG_DEVRES is set.

    Signed-off-by: Ye Li
    (cherry picked from commit baeed1c2a36c07126e35a3cdb34f4f392e88c939)

    Ye Li
     

14 Feb, 2020

1 commit


11 Feb, 2020

1 commit


07 Feb, 2020

1 commit


06 Feb, 2020

2 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
     

04 Feb, 2020

1 commit


16 Jan, 2020

3 commits


15 Jan, 2020

1 commit


09 Jan, 2020

1 commit


08 Jan, 2020

1 commit


15 Dec, 2019

3 commits

  • Add a driver for the Apollo Lake pinctrl. This mostly makes use of the
    common Intel pinctrl support.

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

    Simon Glass
     
  • Recent Intel SoCs share a pinctrl mechanism with many common elements. Add
    an implementation of this core functionality, allowing SoC-specific
    drivers to avoid adding common code.

    As well as a pinctrl driver this provides a GPIO driver based on the same
    code.

    Once other SoCs use this driver we may consider moving more properties to
    the device tree (e.g. the community info and pad definitions).

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

    Simon Glass
     
  • At present these options cannot be enabled for SPL/TPL, but this can be
    useful in some cases. Add Kconfig options to allow it.

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

    Simon Glass
     

06 Dec, 2019

1 commit

  • An iomux register contains 8 pins, each of which is represented
    by 2 bits, but the register offset is 0x8.

    For example, GRF_GPIO0A_IOMUX offset is 0x0, but GRF_GPIO0B_IOMUX
    offset is 0x8, the offset 0x4 is reserved.

    So add a type IOMUX_8WIDTH_2BIT to calculate offset.

    Signed-off-by: David Wu
    Reviewed-by: Kever Yang

    David Wu
     

03 Dec, 2019

1 commit


24 Nov, 2019

2 commits

  • U-Boot support on Raspberry Pi 4 relies on the device-tree
    provided by the firmware. The blob does not contain the
    U-Boot specific pre-loc-rel properties. The result is, that
    the U-Boot banner is not printed.

    We fix this by setting the DM_FLAG_PRE_RELOC flag in the driver,
    if we rely on a device-tree provided by the firmware.

    Reported-by: Heinrich Schuchardt
    Signed-off-by: Matthias Brugger

    Matthias Brugger
     
  • The Raspberry Pi 4 upstream kernel device tree instroduces
    a new compatible for the pinctroller. Add this to the driver
    so that we can boot with the upstream kernel DT.

    Signed-off-by: Matthias Brugger

    Matthias Brugger
     

18 Nov, 2019

1 commit


17 Nov, 2019

1 commit


14 Nov, 2019

1 commit


05 Nov, 2019

1 commit


25 Oct, 2019

1 commit


21 Oct, 2019

2 commits

  • Correct the name of the define used CONFIG_IS_ENABLED which is
    not aligned with Kconfig name: CONFIG_$(SPL_)PINCONF_RECURSIVE.

    The recursive calls is conditional only for UCLASS_PINCONFIG
    "pinconfig" driver.
    It is always needed to call pinctrl_post_bind for UCLASS_PINCTRL
    "pinctrl", the test CONFIG_IS_ENABLED(PINCONF_RECURSIVE) need to
    be removed for this driver.

    This correct a regression introduced because the same patch is
    applied twice times in u-boot-dm branch:
    - commit e878b53a79d1 ("dm: pinctrl: introduce PINCONF_RECURSIVE
    option")
    - commit c20851b3d850 ("dm: pinctrl: introduce PINCONF_RECURSIVE
    option")

    Signed-off-by: Patrick Delaunay

    Patrick Delaunay
     
  • Remove the duplicated configs introduced when the same patch is
    applied twice times:
    - commit e878b53a79d1 ("dm: pinctrl: introduce PINCONF_RECURSIVE
    option")
    - commit c20851b3d850 ("dm: pinctrl: introduce PINCONF_RECURSIVE
    option")

    Signed-off-by: Patrick Delaunay

    Patrick Delaunay
     

15 Oct, 2019

3 commits

  • In the Linux pinctrl binding, the pin configuration nodes don't need to
    be direct children of the pin controller device (may be grandchildren for
    example). This behavior is managed with the pinconfig u-class which
    recursively bind all the sub-node of the pin controller.

    But for some binding (when pin configuration is only children of pin
    controller) that is not necessary. U-Boot can save memory and reduce
    the number of pinconf instance when this feature is deactivated
    (for arch stm32mp for example for SPL).

    This patch allows to control this feature with a new option
    CONFIG_PINCONF_RECURSIVE when it is possible for each individual
    pin controller device.

    Signed-off-by: Patrick Delaunay
    Reviewed-by: Simon Glass
    Fixed CONFIG_IF_ENABLED() condition, added __maybe_unused:
    Signed-off-by: Simon Glass

    Patrick Delaunay
     
  • Skip not associated gpio phandle let register the other gpios on a group.
    We need anyway to send out a warning to the user to fix their uboot-board.dtsi.
    Thhe handle id can be found inside the decompiled dtb

    dtc -I dtb -O dts -o devicetree.dts spl/u-boot-spl.dtb

    Signed-off-by: Michael Trimarchi
    Reviewed-by: Simon Glass

    Michael Trimarchi
     
  • In the Linux pinctrl binding, the pin configuration nodes don't need to
    be direct children of the pin controller device (may be grandchildren for
    example). This behavior is managed with the pinconfig u-class which
    recursively bind all the sub-node of the pin controller.

    But for some binding (when pin configuration is only children of pin
    controller) that is not necessary. U-Boot can save memory and reduce
    the number of pinconf instance when this feature is deactivated
    (for arch stm32mp for example for SPL).

    This patch allows to control this feature with a new option
    CONFIG_PINCONF_RECURSIVE when it is possible for each individual
    pin controller device.

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

    Patrick Delaunay
     

08 Oct, 2019

2 commits

  • For NXP SoCs we have to set pinmux configuration ASAP (ideally
    before relocation) to get serial console working. Without this we miss
    almost the half of output (U-boot version, CPU defails, Reset cause,
    DRAM details etc.).

    To achieve this we need to force appropriate pinctrl drivers to get
    probed before relocation.

    Fixes: cd69e8ef9b ("colibri-imx6ull: migrate pinctrl and regulators to dtb/dm")
    Signed-off-by: Igor Opaniuk
    Reviewed-by: Fabio Estevam
    Reviewed-by: Lukasz Majewski
    Reviewed-by: Oleksandr Suvorov

    Igor Opaniuk
     
  • fdtdec_get_addr_size could not parse addr/size correctly is
    using address-cells 2 and size-cells 2 on an ARM32 SoC.
    So switch to use devfdt_get_addr_size_index.

    Signed-off-by: Peng Fan

    Peng Fan
     

05 Sep, 2019

1 commit


27 Aug, 2019

2 commits

  • Alignment with kernel driver.

    According to the following tab (coming from STMFX datasheet), updates
    have to done in stmfx_pinctrl_conf_set function:

    -"type" has to be set when "bias" is configured as "pull-up or pull-down"
    -PIN_CONFIG_DRIVE_PUSH_PULL should only be used when gpio is configured as
    output. There is so no need to check direction.

    DIR | TYPE | PUPD | MFX GPIO configuration
    ----|------|------|---------------------------------------------------
    1 | 1 | 1 | OUTPUT open drain with internal pull-up resistor
    ----|------|------|---------------------------------------------------
    1 | 1 | 0 | OUTPUT open drain with internal pull-down resistor
    ----|------|------|---------------------------------------------------
    1 | 0 | 0/1 | OUTPUT push pull no pull
    ----|------|------|---------------------------------------------------
    0 | 1 | 1 | INPUT with internal pull-up resistor
    ----|------|------|---------------------------------------------------
    0 | 1 | 0 | INPUT with internal pull-down resistor
    ----|------|------|---------------------------------------------------
    0 | 0 | 1 | INPUT floating
    ----|------|------|---------------------------------------------------
    0 | 0 | 0 | analog (GPIO not used, default setting)

    Signed-off-by: Patrick Delaunay

    Patrick Delaunay
     
  • Reorder include files

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

    Patrice Chotard
     

10 Aug, 2019

1 commit


31 Jul, 2019

1 commit


29 Jul, 2019

1 commit

  • Fix the following warning when CONFIG_PINCONF=n:

    drivers/pinctrl/mediatek/pinctrl-mtk-common.c:35:36:
    warning: ‘mtk_drive’ defined but not used [-Wunused-const-variable=]
    static const struct mtk_drive_desc mtk_drive[] = {
    ^~~~~~~~~

    Signed-off-by: Fabien Parent

    Fabien Parent