Skip to content

pinctrl: lpc18xx: support pint setup

Joachim Eastwood linux-gpio 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 5 repliesIn review
  2. v12 of 3 patches 6 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3pinctrl: core: create nolock version of pinctrl_find_gpio_range_from_pindrivers/pinctrl/core.c drivers/pinctrl/core.h+27 -121 reply
2/3pinctrl: lpc18xx: add nxp,gpio-pin-interrupt propertydrivers/pinctrl/pinctrl-lpc18xx.c+137 -61 reply
3/3pinctrl: lpc1850-scu: document nxp,gpio-pin-interruptDocumentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt+14 -01 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchRob Herring
1/3
2/3
3/3A-b

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

Read the v2 thread

Cover letter [PATCH v2 0/3] pinctrl: lpc18xx: support pint setup

Some background here:
The LPC1850 has no less than 3 GPIO interrupt blocks. One of these blocks is called 'gpio pin interrupt' or just PINT. LPC1850 PINT can handle up to 8 interrupts and these have a one-to-one relationship with the main interrupt controller (NVIC).

Selecting which GPIOs that are associated with PINT irq lines is done in pinctrl hw block (SCU). The pinctrl device usually deals with the pin namespace but PINT selecction is done in the GPIO namespace. Fortunatly there is a function that can translate from the pin namespace to the GPIO namespace.

Selection is done in DT with the "nxp,gpio-pin-interrupt" property. Example usage;

&pinctrl {
	gpio_joystick_1_cfg {
		pins =  "p9_0";
		function = "gpio";
		nxp,gpio-pin-interrupt = <0>;
		input-enable;
		bias-disable;
	};
};

The reason for not doing this irq line selection on the fly in the irqchip driver is that the registers lie in the SCU hw block not in the PINT block and DT gives you more control since you can select a specific irq lines easily.

The irq chip driver is ready but will posted separately.

Joachim Eastwood (3):
pinctrl: core: create nolock version of pinctrl_find_gpio_range_from_pin
pinctrl: lpc18xx: add nxp,gpio-pin-interrupt property
pinctrl: lpc1850-scu: document nxp,gpio-pin-interrupt

 .../bindings/pinctrl/nxp,lpc1850-scu.txt           |  14 ++
 drivers/pinctrl/core.c                             |  35 +++--
 drivers/pinctrl/core.h                             |   4 +
 drivers/pinctrl/pinctrl-lpc18xx.c                  | 143 ++++++++++++++++++++-
 4 files changed, 178 insertions(+), 18 deletions(-)
Signature · 1 line
1.8.0