Skip to content

Commit d5f7411

Browse files
committed
Merge tag 'gpio-updates-for-v6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio updates from Bartosz Golaszewski: "There are two new drivers and support for more models in existing ones. The generic GPIO API has been reworked and all users converted which allowed us to move the fields specific to the generic GPIO implementation out of the high-level struct gpio_chip into its own structure that wraps the gpio_chip. Other than that, there's nothing too exciting. Mostly minor tweaks and fixes all over the place, some refactoring and some small new features in helper modules. GPIO core: - add support for sparse pin ranges to the glue between GPIO and pinctrl - use a common prefix across all GPIO descriptor flags for improved namespacing New drivers: - add new GPIO driver for the Nuvoton NCT6694 - add new GPIO driver for MAX7360 Driver improvements: - add support for Tegra 256 to the gpio-tegra186 driver - add support for Loongson-2K0300 to the gpio-loongson-64bit driver - refactor the gpio-aggregator module to expose its GPIO forwarder API to other in-kernel users (to enable merging of a new pinctrl driver that uses it) - convert all remaining drivers to using the modernized generic GPIO chip API and remove the old interface - stop displaying global GPIO numbers in debugfs output of controller drivers - extend the gpio-regmap helper with a new config option and improve its support for GPIO interrupts - remove redundant fast_io parameter from regmap configs in GPIO drivers that already use MMIO regmaps which imply it - add support for a new model in gpio-mmio: ixp4xx expansion bus - order includes alphabetically in a few drivers for better readability - use generic device properties where applicable - use devm_mutex_init() where applicable - extend build coverage of drivers by enabling more to be compiled with COMPILE_TEST enabled - allow building gpio-stmpe as a module - use dev_err_probe() where it makes sense in drivers Late driver fixes: - fix setting GPIO direction to output in gpio-mpfs Documentation: - document the usage of software nodes with GPIO chips Device-tree bindings: - Add DT bindings documents for new hardware: Tegra256, MAX7360 - Document a new model in Loongson bindings: LS2K0300 - Document a new model using the generic GPIO binding: IXP4xx - Convert the DT binding for fsl,mxs-pinctrl to YAML - fix the schema ID in the "trivial" GPIO schema - describe GPIO hogs in the generic GPIO binding" * tag 'gpio-updates-for-v6.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (122 commits) gpio: mpfs: fix setting gpio direction to output gpio: generic: move GPIO_GENERIC_ flags to the correct header gpio: generic: rename BGPIOF_ flags to GPIO_GENERIC_ gpio: nomadik: fix the debugfs helper stub MAINTAINERS: Add entry on MAX7360 driver input: misc: Add support for MAX7360 rotary input: keyboard: Add support for MAX7360 keypad gpio: max7360: Add MAX7360 gpio support gpio: regmap: Allow to provide init_valid_mask callback gpio: regmap: Allow to allocate regmap-irq device pwm: max7360: Add MAX7360 PWM support pinctrl: Add MAX7360 pinctrl driver mfd: Add max7360 support dt-bindings: mfd: gpio: Add MAX7360 rtc: Add Nuvoton NCT6694 RTC support hwmon: Add Nuvoton NCT6694 HWMON support watchdog: Add Nuvoton NCT6694 WDT support can: Add Nuvoton NCT6694 CANFD support i2c: Add Nuvoton NCT6694 I2C support gpio: Add Nuvoton NCT6694 GPIO support ...
2 parents c050daf + bc06114 commit d5f7411

File tree

124 files changed

+8575
-1779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+8575
-1779
lines changed

Documentation/devicetree/bindings/gpio/gpio-mmio.yaml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ properties:
2222
- brcm,bcm6345-gpio
2323
- ni,169445-nand-gpio
2424
- wd,mbl-gpio # Western Digital MyBook Live memory-mapped GPIO controller
25+
- intel,ixp4xx-expansion-bus-mmio-gpio
2526

2627
big-endian: true
2728

@@ -89,14 +90,28 @@ properties:
8990
description:
9091
If this property is present, the controller cannot drive the GPIO lines.
9192

93+
if:
94+
properties:
95+
compatible:
96+
contains:
97+
const: intel,ixp4xx-expansion-bus-mmio-gpio
98+
then:
99+
$ref: /schemas/memory-controllers/intel,ixp4xx-expansion-peripheral-props.yaml#
100+
101+
patternProperties:
102+
"^.+-hog(-[0-9]+)?$":
103+
type: object
104+
required:
105+
- gpio-hog
106+
92107
required:
93108
- compatible
94109
- reg
95110
- reg-names
96111
- '#gpio-cells'
97112
- gpio-controller
98113

99-
additionalProperties: false
114+
unevaluatedProperties: false
100115

101116
examples:
102117
- |
@@ -126,3 +141,22 @@ examples:
126141
gpio-controller;
127142
#gpio-cells = <2>;
128143
};
144+
145+
bus@c4000000 {
146+
compatible = "intel,ixp42x-expansion-bus-controller", "syscon";
147+
reg = <0xc4000000 0x30>;
148+
native-endian;
149+
#address-cells = <2>;
150+
#size-cells = <1>;
151+
ranges = <0 0x0 0x50000000 0x01000000>;
152+
dma-ranges = <0 0x0 0x50000000 0x01000000>;
153+
gpio@1,0 {
154+
compatible = "intel,ixp4xx-expansion-bus-mmio-gpio";
155+
gpio-controller;
156+
#gpio-cells = <2>;
157+
big-endian;
158+
reg = <1 0x00000000 0x2>;
159+
reg-names = "dat";
160+
intel,ixp4xx-eb-write-enable = <1>;
161+
};
162+
};

Documentation/devicetree/bindings/gpio/gpio-mxs.yaml

Lines changed: 75 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ description: |
1818
1919
properties:
2020
compatible:
21-
enum:
22-
- fsl,imx23-pinctrl
23-
- fsl,imx28-pinctrl
21+
items:
22+
- enum:
23+
- fsl,imx23-pinctrl
24+
- fsl,imx28-pinctrl
25+
# Over 10 years old devices, driver use simple-bus to probe child gpio
26+
# Devices. Keep it as it to be compatible existed dts files.
27+
- const: simple-bus
2428

2529
'#address-cells':
2630
const: 1
@@ -31,7 +35,65 @@ properties:
3135
maxItems: 1
3236

3337
patternProperties:
34-
"gpio@[0-9]+$":
38+
"^(?!gpio@)[^@]+@[0-9]+$":
39+
type: object
40+
properties:
41+
fsl,pinmux-ids:
42+
$ref: /schemas/types.yaml#/definitions/uint32-array
43+
description: |
44+
An integer array. Each integer in the array specify a pin
45+
with given mux function, with bank, pin and mux packed as below.
46+
47+
[15..12] : bank number
48+
[11..4] : pin number
49+
[3..0] : mux selection
50+
51+
This integer with mux selection packed is used as an entity by both group
52+
and config nodes to identify a pin. The mux selection in the integer takes
53+
effects only on group node, and will get ignored by driver with config node,
54+
since config node is only meant to set up pin configurations.
55+
56+
Valid values for these integers are listed below.
57+
58+
reg:
59+
items:
60+
- description: |
61+
pin group index. NOTE: it is supposed wrong use reg property
62+
here. But it is over 10 years devices. Just keep it as it.
63+
64+
fsl,drive-strength:
65+
$ref: /schemas/types.yaml#/definitions/uint32
66+
enum: [0, 1, 2, 3]
67+
description: |
68+
0: MXS_DRIVE_4mA
69+
1: MXS_DRIVE_8mA
70+
2: MXS_DRIVE_12mA
71+
3: MXS_DRIVE_16mA
72+
73+
fsl,voltage:
74+
$ref: /schemas/types.yaml#/definitions/uint32
75+
enum: [0, 1]
76+
description: |
77+
0: MXS_VOLTAGE_LOW - 1.8 V
78+
1: MXS_VOLTAGE_HIGH - 3.3 V
79+
80+
fsl,pull-up:
81+
$ref: /schemas/types.yaml#/definitions/uint32
82+
enum: [0, 1]
83+
description: |
84+
0: MXS_PULL_DISABLE - Disable the internal pull-up
85+
1: MXS_PULL_ENABLE - Enable the internal pull-up
86+
87+
Note that when enabling the pull-up, the internal pad keeper gets disabled.
88+
Also, some pins doesn't have a pull up, in that case, setting the fsl,pull-up
89+
will only disable the internal pad keeper.
90+
91+
required:
92+
- fsl,pinmux-ids
93+
94+
additionalProperties: false
95+
96+
"^gpio@[0-9]+$":
3597
type: object
3698
properties:
3799
compatible:
@@ -80,7 +142,7 @@ examples:
80142
pinctrl@80018000 {
81143
#address-cells = <1>;
82144
#size-cells = <0>;
83-
compatible = "fsl,imx28-pinctrl";
145+
compatible = "fsl,imx28-pinctrl", "simple-bus";
84146
reg = <0x80018000 0x2000>;
85147
86148
gpio@0 {
@@ -132,4 +194,12 @@ examples:
132194
interrupt-controller;
133195
#interrupt-cells = <2>;
134196
};
197+
198+
lcdif-apx4@5 {
199+
reg = <5>;
200+
fsl,pinmux-ids = <0x1181 0x1191>;
201+
fsl,drive-strength = <0>;
202+
fsl,voltage = <0>;
203+
fsl,pull-up = <0>;
204+
};
135205
};

Documentation/devicetree/bindings/gpio/loongson,ls-gpio.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ properties:
1414
oneOf:
1515
- enum:
1616
- loongson,ls2k-gpio
17+
- loongson,ls2k0300-gpio
1718
- loongson,ls2k0500-gpio0
1819
- loongson,ls2k0500-gpio1
1920
- loongson,ls2k2000-gpio0
@@ -36,7 +37,7 @@ properties:
3637

3738
ngpios:
3839
minimum: 1
39-
maximum: 64
40+
maximum: 128
4041

4142
"#gpio-cells":
4243
const: 2
@@ -49,6 +50,14 @@ properties:
4950
minItems: 1
5051
maxItems: 64
5152

53+
"#interrupt-cells":
54+
const: 2
55+
56+
interrupt-controller: true
57+
58+
resets:
59+
maxItems: 1
60+
5261
required:
5362
- compatible
5463
- reg
@@ -58,6 +67,23 @@ required:
5867
- gpio-ranges
5968
- interrupts
6069

70+
allOf:
71+
- if:
72+
properties:
73+
compatible:
74+
contains:
75+
const: loongson,ls2k0300-gpio
76+
then:
77+
required:
78+
- "#interrupt-cells"
79+
- interrupt-controller
80+
- resets
81+
else:
82+
properties:
83+
"#interrupts-cells": false
84+
interrupt-controller: false
85+
resets: false
86+
6187
additionalProperties: false
6288

6389
examples:

Documentation/devicetree/bindings/gpio/maxim,max31910.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ examples:
9595
#gpio-cells = <2>;
9696
9797
maxim,modesel-gpios = <&gpio2 23>;
98-
maxim,fault-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
99-
maxim,db0-gpios = <&gpio2 25>;
100-
maxim,db1-gpios = <&gpio2 26>;
98+
maxim,fault-gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
99+
maxim,db0-gpios = <&gpio2 25>;
100+
maxim,db1-gpios = <&gpio2 26>;
101101
102102
spi-max-frequency = <25000000>;
103103
};
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/gpio/maxim,max7360-gpio.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Maxim MAX7360 GPIO controller
8+
9+
maintainers:
10+
- Kamel Bouhara <kamel.bouhara@bootlin.com>
11+
- Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
12+
13+
description: |
14+
Maxim MAX7360 GPIO controller, in MAX7360 chipset
15+
https://www.analog.com/en/products/max7360.html
16+
17+
The device provides two series of GPIOs, referred here as GPIOs and GPOs.
18+
19+
PORT0 to PORT7 pins can be used as GPIOs, with support for interrupts and
20+
constant-current mode. These pins will also be used by the rotary encoder and
21+
PWM functionalities.
22+
23+
COL2 to COL7 pins can be used as GPOs, there is no input capability. COL pins
24+
will be partitioned, with the first pins being affected to the keypad
25+
functionality and the last ones as GPOs.
26+
27+
properties:
28+
compatible:
29+
enum:
30+
- maxim,max7360-gpio
31+
- maxim,max7360-gpo
32+
33+
gpio-controller: true
34+
35+
"#gpio-cells":
36+
const: 2
37+
38+
interrupt-controller: true
39+
40+
"#interrupt-cells":
41+
const: 2
42+
43+
maxim,constant-current-disable:
44+
$ref: /schemas/types.yaml#/definitions/uint32
45+
description:
46+
Bit field, each bit disables constant-current output of the associated
47+
GPIO, starting from the least significant bit for the first GPIO.
48+
maximum: 0xff
49+
50+
required:
51+
- compatible
52+
- gpio-controller
53+
54+
allOf:
55+
- if:
56+
properties:
57+
compatible:
58+
contains:
59+
enum:
60+
- maxim,max7360-gpio
61+
ngpios: false
62+
then:
63+
required:
64+
- interrupt-controller
65+
else:
66+
properties:
67+
interrupt-controller: false
68+
maxim,constant-current-disable: false
69+
70+
additionalProperties: false
71+
72+
examples:
73+
- |
74+
gpio {
75+
compatible = "maxim,max7360-gpio";
76+
77+
gpio-controller;
78+
#gpio-cells = <2>;
79+
maxim,constant-current-disable = <0x06>;
80+
81+
interrupt-controller;
82+
#interrupt-cells = <2>;
83+
};

Documentation/devicetree/bindings/gpio/nvidia,tegra186-gpio.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ properties:
8585
- nvidia,tegra194-gpio-aon
8686
- nvidia,tegra234-gpio
8787
- nvidia,tegra234-gpio-aon
88+
- nvidia,tegra256-gpio
8889

8990
reg-names:
9091
items:
@@ -155,6 +156,7 @@ allOf:
155156
- nvidia,tegra186-gpio
156157
- nvidia,tegra194-gpio
157158
- nvidia,tegra234-gpio
159+
- nvidia,tegra256-gpio
158160
then:
159161
properties:
160162
interrupts:

Documentation/devicetree/bindings/gpio/spacemit,k1-gpio.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ examples:
8080
gpio@d4019000 {
8181
compatible = "spacemit,k1-gpio";
8282
reg = <0xd4019000 0x800>;
83-
clocks =<&ccu 9>, <&ccu 61>;
83+
clocks = <&ccu 9>, <&ccu 61>;
8484
clock-names = "core", "bus";
8585
gpio-controller;
8686
#gpio-cells = <3>;

Documentation/devicetree/bindings/gpio/trivial-gpio.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22
%YAML 1.2
33
---
4-
$id: http://devicetree.org/schemas/trivial-gpio.yaml#
4+
$id: http://devicetree.org/schemas/gpio/trivial-gpio.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

77
title: Trivial 2-cell GPIO controllers

0 commit comments

Comments
 (0)