Skip to content

Commit

Permalink
Merge tag 'pinctrl-v5.14-1' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/linusw/linux-pinctrl

Pull pin control updates from Linus Walleij:
 "This is the bulk of pin control changes for the v5.14 kernel. Not so
  much going on. No core changes, just drivers.

  The most interesting would be that MIPS Ralink is migrating to pin
  control and we have some bindings but not yet code for the Apple M1
  pin controller.

  New drivers:

   - Last merge window we created a driver for the Ralink RT2880. We are
     now moving the Ralink SoC pin control drivers out of the MIPS
     architecture code and into the pin control subsystem. This concerns
     RT288X, MT7620, RT305X, RT3883 and MT7621.

   - Qualcomm SM6125 SoC pin control driver.

   - Qualcomm spmi-gpio support for PM7325.

   - Qualcomm spmi-mpp also handles PMI8994 (just a compatible string)

   - Mediatek MT8365 SoC pin controller.

   - New device HID for the AMD GPIO controller.

  Improvements:

   - Pin bias config support for a slew of Renesas pin controllers.

   - Incremental improvements and non-urgent bug fixes to the Renesas
     SoC drivers.

   - Implement irq_set_wake on the AMD pin controller so we can wake up
     from external pin events.

  Misc:

   - Devicetree bindings for the Apple M1 pin controller, we will
     probably see a proper driver for this soon as well"

* tag 'pinctrl-v5.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (54 commits)
  pinctrl: ralink: rt305x: add missing include
  pinctrl: stm32: check for IRQ MUX validity during alloc()
  pinctrl: zynqmp: some code cleanups
  drivers: qcom: pinctrl: Add pinctrl driver for sm6125
  dt-bindings: pinctrl: qcom: sm6125: Document SM6125 pinctrl driver
  dt-bindings: pinctrl: mcp23s08: add documentation for reset-gpios
  pinctrl: mcp23s08: Add optional reset GPIO
  pinctrl: mediatek: fix mode encoding
  pinctrl: mcp23s08: Fix missing unlock on error in mcp23s08_irq()
  pinctrl: bcm: Constify static pinmux_ops
  pinctrl: bcm: Constify static pinctrl_ops
  pinctrl: ralink: move RT288X SoC pinmux config into a new 'pinctrl-rt288x.c' file
  pinctrl: ralink: move MT7620 SoC pinmux config into a new 'pinctrl-mt7620.c' file
  pinctrl: ralink: move RT305X SoC pinmux config into a new 'pinctrl-rt305x.c' file
  pinctrl: ralink: move RT3883 SoC pinmux config into a new 'pinctrl-rt3883.c' file
  pinctrl: ralink: move MT7621 SoC pinmux config into a new 'pinctrl-mt7621.c' file
  pinctrl: ralink: move ralink architecture pinmux header into the driver
  pinctrl: single: config: enable the pin's input
  pinctrl: mtk: Fix mt8365 Kconfig dependency
  pinctrl: mcp23s08: fix race condition in irq handler
  ...
  • Loading branch information
torvalds committed Jul 1, 2021
2 parents e04360a + bfa5016 commit a32b344
Show file tree
Hide file tree
Showing 86 changed files with 7,498 additions and 1,020 deletions.
106 changes: 106 additions & 0 deletions Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/apple,pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple GPIO controller

maintainers:
- Mark Kettenis <kettenis@openbsd.org>

description: |
The Apple GPIO controller is a simple combined pin and GPIO
controller present on Apple ARM SoC platforms, including various
iPhone and iPad devices and the "Apple Silicon" Macs.
properties:
compatible:
items:
- const: apple,t8103-pinctrl
- const: apple,pinctrl

reg:
maxItems: 1

clocks:
maxItems: 1

gpio-controller: true

'#gpio-cells':
const: 2

gpio-ranges:
maxItems: 1

interrupts:
description: One interrupt for each of the (up to 7) interrupt
groups supported by the controller sorted by interrupt group
number in ascending order.
minItems: 1
maxItems: 7

interrupt-controller: true

patternProperties:
'-pins$':
type: object
$ref: pinmux-node.yaml#

properties:
pinmux:
description:
Values are constructed from pin number and alternate function
configuration number using the APPLE_PINMUX() helper macro
defined in include/dt-bindings/pinctrl/apple.h.

required:
- pinmux

additionalProperties: false

required:
- compatible
- reg
- gpio-controller
- '#gpio-cells'
- gpio-ranges

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/pinctrl/apple.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
pinctrl: pinctrl@23c100000 {
compatible = "apple,t8103-pinctrl", "apple,pinctrl";
reg = <0x2 0x3c100000 0x0 0x100000>;
clocks = <&gpio_clk>;
gpio-controller;
#gpio-cells = <2>;
gpio-ranges = <&pinctrl 0 0 212>;
interrupt-controller;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 16 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 17 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 18 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 19 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 20 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 21 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 22 IRQ_TYPE_LEVEL_HIGH>;
pcie_pins: pcie-pins {
pinmux = <APPLE_PINMUX(150, 1)>,
<APPLE_PINMUX(151, 1)>,
<APPLE_PINMUX(32, 1)>;
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ patternProperties:
PWM9, RGMII1, RGMII2, RGMII3, RGMII4, RMII1, RMII2, RMII3, RMII4,
RXD1, RXD2, RXD3, RXD4, SALT1, SALT10, SALT11, SALT12, SALT13, SALT14,
SALT15, SALT16, SALT2, SALT3, SALT4, SALT5, SALT6, SALT7, SALT8,
SALT9, SD1, SD2, SGPM1, SGPS1, SIOONCTRL, SIOPBI, SIOPBO, SIOPWREQ,
SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1ABR, SPI1CS1, SPI1WP, SPI2,
SALT9, SD1, SD2, SGPM1, SGPM2, SGPS1, SGPS2, SIOONCTRL, SIOPBI, SIOPBO,
SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1ABR, SPI1CS1, SPI1WP, SPI2,
SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11, TACH12, TACH13, TACH14,
TACH15, TACH2, TACH3, TACH4, TACH5, TACH6, TACH7, TACH8, TACH9, THRU0,
THRU1, THRU2, THRU3, TXD1, TXD2, TXD3, TXD4, UART10, UART11, UART12,
Expand All @@ -74,9 +74,9 @@ patternProperties:
RXD1, RXD2, RXD3, RXD4, SALT1, SALT10G0, SALT10G1, SALT11G0, SALT11G1,
SALT12G0, SALT12G1, SALT13G0, SALT13G1, SALT14G0, SALT14G1, SALT15G0,
SALT15G1, SALT16G0, SALT16G1, SALT2, SALT3, SALT4, SALT5, SALT6,
SALT7, SALT8, SALT9G0, SALT9G1, SD1, SD2, SD3, SGPM1, SGPS1, SIOONCTRL,
SIOPBI, SIOPBO, SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1ABR,
SPI1CS1, SPI1WP, SPI2, SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11,
SALT7, SALT8, SALT9G0, SALT9G1, SD1, SD2, SD3, SGPM1, SGPM2, SGPS1, SGPS2,
SIOONCTRL, SIOPBI, SIOPBO, SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1,
SPI1ABR, SPI1CS1, SPI1WP, SPI2, SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11,
TACH12, TACH13, TACH14, TACH15, TACH2, TACH3, TACH4, TACH5, TACH6,
TACH7, TACH8, TACH9, THRU0, THRU1, THRU2, THRU3, TXD1, TXD2, TXD3,
TXD4, UART10, UART11, UART12G0, UART12G1, UART13G0, UART13G1, UART6,
Expand Down
55 changes: 0 additions & 55 deletions Documentation/devicetree/bindings/pinctrl/brcm,bcm4708-pinmux.txt

This file was deleted.

94 changes: 94 additions & 0 deletions Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/pinctrl/brcm,ns-pinmux.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom Northstar pins mux controller

maintainers:
- Rafał Miłecki <rafal@milecki.pl>

description:
Some of Northstar SoCs's pins can be used for various purposes thanks to the
mux controller. This binding allows describing mux controller and listing
available functions. They can be referenced later by other bindings to let
system configure controller correctly.

A list of pins varies across chipsets so few bindings are available.

Node of the pinmux must be nested in the CRU (Central Resource Unit) "syscon"
node.

properties:
compatible:
enum:
- brcm,bcm4708-pinmux
- brcm,bcm4709-pinmux
- brcm,bcm53012-pinmux

offset:
description: offset of pin registers in the CRU block
maxItems: 1
$ref: /schemas/types.yaml#/definitions/uint32-array

patternProperties:
'-pins$':
type: object
description: pin node
$ref: pinmux-node.yaml#

properties:
function:
enum: [ spi, i2c, pwm, uart1, mdio, uart2, sdio ]
groups:
minItems: 1
maxItems: 4
items:
enum: [ spi_grp, i2c_grp, pwm0_grp, pwm1_grp, pwm2_grp, pwm3_grp,
uart1_grp, mdio_grp, uart2_grp, sdio_pwr_grp, sdio_1p8v_grp ]

required:
- function
- groups

additionalProperties: false

allOf:
- if:
properties:
compatible:
contains:
const: brcm,bcm4708-pinmux
then:
patternProperties:
'-pins$':
properties:
function:
enum: [ spi, i2c, pwm, uart1 ]
groups:
items:
enum: [ spi_grp, i2c_grp, pwm0_grp, pwm1_grp, pwm2_grp, pwm3_grp,
uart1_grp ]

required:
- offset

additionalProperties: false

examples:
- |
cru@1800c100 {
compatible = "syscon", "simple-mfd";
reg = <0x1800c100 0x1a4>;
pinctrl {
compatible = "brcm,bcm4708-pinmux";
offset = <0xc0>;
spi-pins {
function = "spi";
groups = "spi_grp";
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Optional properties:
- interrupt-controller: Marks the device node as a interrupt controller.
- drive-open-drain: Sets the ODR flag in the IOCON register. This configures
the IRQ output as open drain active low.
- reset-gpios: Corresponds to the active-low RESET# pin for the chip

Optional device specific properties:
- microchip,irq-mirror: Sets the mirror flag in the IOCON register. Devices
Expand Down Expand Up @@ -135,6 +136,7 @@ gpio21: gpio@21 {
microchip,irq-mirror;
pinctrl-names = "default";
pinctrl-0 = <&i2cgpio0irq>, <&gpio21pullups>;
reset-gpios = <&gpio6 15 GPIO_ACTIVE_LOW>;

gpio21pullups: pinmux {
pins = "gpio0", "gpio1", "gpio2", "gpio3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Required properties:
"mediatek,mt8135-pinctrl", compatible with mt8135 pinctrl.
"mediatek,mt8167-pinctrl", compatible with mt8167 pinctrl.
"mediatek,mt8173-pinctrl", compatible with mt8173 pinctrl.
"mediatek,mt8365-pinctrl", compatible with mt8365 pinctrl.
"mediatek,mt8516-pinctrl", compatible with mt8516 pinctrl.
- pins-are-numbered: Specify the subnodes are using numbered pinmux to
specify pins.
Expand Down
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ PMIC's from Qualcomm.
"qcom,pm8350b-gpio"
"qcom,pm8350c-gpio"
"qcom,pmk8350-gpio"
"qcom,pm7325-gpio"
"qcom,pmr735a-gpio"
"qcom,pmr735b-gpio"
"qcom,pm6150-gpio"
Expand Down Expand Up @@ -120,6 +121,7 @@ to specify in a pin configuration subnode:
gpio1-gpio8 for pm8350b
gpio1-gpio9 for pm8350c
gpio1-gpio4 for pmk8350
gpio1-gpio10 for pm7325
gpio1-gpio4 for pmr735a
gpio1-gpio4 for pmr735b
gpio1-gpio10 for pm6150
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ of PMIC's from Qualcomm.
"qcom,pmi8950-mpp",
"qcom,pm8994-mpp",
"qcom,pma8084-mpp",
"qcom,pmi8994-mpp",

And must contain either "qcom,spmi-mpp" or "qcom,ssbi-mpp"
if the device is on an spmi bus or an ssbi bus respectively.
Expand Down
Loading

0 comments on commit a32b344

Please sign in to comment.