Skip to content

Add Realtek Otto GPIO support

Sander Vanheule linux-devicetree linux-gpio lkml 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 2 repliesIn review
  2. v52 patches 1 replySuperseded
  3. v42 patches 6 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 patches1 replySuperseded
v22 patches8 repliesSuperseded
v12 patches3 repliesSuperseded

Changes in v6 from the cover letter

- Use devm_gpiochip_add_data()
- Code style for reading ngpios, header order
- Add Andy's Reviewed-by tag

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: gpio: Binding for Realtek Otto GPIODocumentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml+78 -00 replies
2/2gpio: Add Realtek Otto GPIO supportdrivers/gpio/Kconfig drivers/gpio/Makefile drivers/gpio/gpio-realtek-otto.c+339 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchLinus WalleijRob HerringAndy Shevchenko
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/2] Add Realtek Otto GPIO support

Add support for the GPIO controller employed by Realtek in multiple series of MIPS SoCs. These include the supported RTL838x and RTL839x. The register layout also matches the one found in the GPIO controller of other (Lexra-based) SoCs such as RTL8196E, RTL8197D, and RTL8197F.

For the platform name 'otto', I am not aware of any official resources as to what hardware this specifically applies to. However, in all of the GPL archives we've received, from vendors using compatible SoCs in their design, the platform under the MIPS architecture is referred to by this name.

The GPIO ports have been tested on a Zyxel GS1900-8 (RTL8380), and Zyxel GS1900-48 (RTL8393). Furthermore, the GPIO ports and interrupt controller have been tested on a Netgear GS110TPPv1 (RTL8381).

Changes in v6:
- Use devm_gpiochip_add_data()
- Code style for reading ngpios, header order
- Add Andy's Reviewed-by tag

Changes in v5:
- Edited code comments
- Fold functions that were used only once or twice (ISR/IMR accessors)
- Drop trivial functions for line to port/pin calculations
- Use gpio_irq_chip->init_hw() to initialise IRQ registers
- Invert GPIO_INTERRUPTS flag to GPIO_INTERRUPTS_DISABLED
- Support building as module
- Add Rob's Reviewed-by tag

Changes in v4:
- Fix pointer notation style
- Drop unused read_u16_reg() function
- Drop 'inline' specifier from functions

Changes in v3:
- Remove OF dependencies in driver probe
- Don't accept IRQ_TYPE_NONE as a valid interrupt type
- Remove (now unused) dev property from control structure
- Use u8/u16 port registers, instead of raw u32 registers
- Use 'line' name for gpiochip, 'port' and 'pin' names for hardware
- Renamed DT bindings file
- Dropped fallback-only DT compatible
- Various code style clean-ups

Changes in v2:
- Clarify structure and usage of IMR registers
- Added Linus' Reviewed-by tags

Sander Vanheule (2):
dt-bindings: gpio: Binding for Realtek Otto GPIO
gpio: Add Realtek Otto GPIO support

 .../bindings/gpio/realtek,otto-gpio.yaml      |  78 +++++
 drivers/gpio/Kconfig                          |  13 +
 drivers/gpio/Makefile                         |   1 +
 drivers/gpio/gpio-realtek-otto.c              | 325 ++++++++++++++++++
 4 files changed, 417 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
 create mode 100644 drivers/gpio/gpio-realtek-otto.c
Signature · 1 line
2.30.2