Skip to content

Add gpio/pinconf support to Broadcom Cygnus SoC

Ray Jui linux-arm-kernel linux-devicetree linux-gpio lkml 14 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 posting 2/28 patches 11 repliesApplied
  2. v5 posting 2/28 patches 18 repliesSuperseded
  3. v9 Latest4 patches 4 repliesIn review
Earlier versions · 11
VersionPostedPatchesRepliesStatus
v84 patches2 repliesSuperseded
v4 posting 2/24 patches3 repliesSuperseded
v74 patches2 repliesSuperseded
v3 posting 2/24 patches4 repliesSuperseded
v6 posting 1/23 patches8 repliesSuperseded
v5 posting 1/23 patches17 repliesSuperseded
v4 posting 1/25 patches2 repliesSuperseded
v2 posting 2/20 of 5 patches1 replySuperseded
v3 posting 1/25 patches2 repliesSuperseded
v2 posting 1/25 patches3 repliesSuperseded
v15 patches9 repliesSuperseded

Changes in v9 from the cover letter

- Add code in function 'cygnus_gpio_pinmux_add_range' to free pinmux node resource by calling of_node_put
- Drop .suppress_bind_attrs = true, since this is already done in platform_driver_probe

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4pinctrl: Cygnus: define Broadcom Cygnus GPIO/PINCONF bindingDocumentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt+102 -00 replies
2/4pinctrl: cygnus: add gpio/pinconf driverdrivers/pinctrl/bcm/Kconfig drivers/pinctrl/bcm/Makefile drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c+931 -03 replies
3/4ARM: dts: enable GPIO for Broadcom Cygnusarch/arm/boot/dts/bcm-cygnus.dtsi+33 -00 replies
4/4ARM: dts: cygnus: enable GPIO based hook detectionarch/arm/boot/dts/bcm911360_entphn.dts+13 -00 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchScott BrandenDmitry Torokhov
SeriesT-b
1/4R-b
2/4R-b
3/4R-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v9 thread

Cover letter [PATCH v9 0/4] Add gpio/pinconf support to Broadcom Cygnus SoC

This patchset contains the initial GPIO/PINCONF support for the Broadcom Cygnus SoC.

Cygnus has 3 GPIO controllers: 1) the ASIU GPIO; 2) the chipCommonG GPIO; and 3) the ALWAYS-ON GPIO. All 3 types of GPIO controllers are supported by the this driver.

All 3 Cygnus GPIO controllers support basic PINCONF functions such as bias pull up, pull down, and drive strength configurations, when these pins are muxed to GPIO.

Pins from the ASIU GPIO can be individually muxed to GPIO function, through interaction with the Cygnus IOMUX controller.

Note this patchset has a dependency on the other patchset "Add pinctrl support to Broadcom Cygnus SoC" that is also under review

Changes from v8:
- Add code in function 'cygnus_gpio_pinmux_add_range' to free pinmux node resource by calling of_node_put
- Drop .suppress_bind_attrs = true, since this is already done in platform_driver_probe

Changes from v7:
- Use 'bool' instead of 'int' for flag that indicates pinmux support in the driver
- Call put_device to drop reference to the pinmux dev after call to of_find_device_by_node
- Replace kasprintf with devm_kasprintf and remove memory deallocation logic in the driver
- Set suppress_bind_attrs to true for the driver

Changes from v6:
- Move the driver from drivers/gpio/* to drivers/pinctrl/* since this driver supports both GPIO and some basic PINCONF features
- Support PINCONF features through standard DT subnodes properties including "bias-disable", "bias-pull-up", "bias-pull-down", and "drive-strength", by creating local PINCONF controller
- Add support to allow individual ASIU GPIO pins to be muxed as GPIO, through interactions with the Cygnus IOMUX driver
- Convert the driver to use standard GPIOCHIP_IRQ APIs. This helps to reduce customized code in the driver
- Other miscellaneous imrpovements in the driver
- Enable GPIO based phone hook detection support for BCM911360 phone factor board

Changes from v5:
- Get rid of DT property "linux,gpio-base". Use dynamic allocation for GPIO base number

Changes from v4:
- Use DT property "linux,gpio-base" to define GPIO base number
- factorize common code to improve code readability and reduce code size
- remove "bcm_" prefix on function and struct names
- improve debugging prints
- default GPIO_BCM_CYGNUS to y in Kconfig (it still depends on ARCH_BCM_CYGNUS). This way we do not need to select it from the arch/arm/mach-bcm/Kconfig
- Get rid of redundant MAINTAINER entry for this driver. It will be maintained by Broadcom iProc/Cygnus maintainers
- Update device tree document based on driver changes

Changes from v3:
- Fix dt property tpyo
- Fix incorrect GPIO compatible ID in device tree binding document example

Changes from v2:
- Consolidate different compatible IDs into "brcm,cygnus-gpio"
- Get rid of redundant "no-interrupt" property

Changes from v1:
- Get rid of inline qualifier
- Get rid of redundant check in the ISR
- Other minor fixes to imrove code readability

Ray Jui (4):
pinctrl: Cygnus: define Broadcom Cygnus GPIO/PINCONF binding
pinctrl: cygnus: add gpio/pinconf driver
ARM: dts: enable GPIO for Broadcom Cygnus
ARM: dts: cygnus: enable GPIO based hook detection

 .../bindings/pinctrl/brcm,cygnus-gpio.txt          |  102 +++
 arch/arm/boot/dts/bcm-cygnus.dtsi                  |   33 +
 arch/arm/boot/dts/bcm911360_entphn.dts             |   13 +
 drivers/pinctrl/bcm/Kconfig                        |   22 +
 drivers/pinctrl/bcm/Makefile                       |    1 +
 drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c          |  908 ++++++++++++++++++++
 6 files changed, 1079 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,cygnus-gpio.txt
 create mode 100644 drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
Signature · 1 line
1.7.9.5