Skip to content

Commit d60bc14

Browse files
committed
Merge tag 'pwrseq-updates-for-v7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull power sequencing updates from Bartosz Golaszewski: "For this release we have an extension of the pwrseq-pcie-m2 driver with support for PCIe M.2 Key E connectors. The rest of the commits fulfill a supporting role: document the hardware in DT bindings, provide required serdev helpers (this has been provided in an immutable branch to Rob Herring so you may see it in his PR as well) and is followed up by some Kconfig fixes from Arnd. Summary: - add support for the PCIe M.2 Key E connectors in pwrseq-pcie-m2 - describe PCIe M.2 Mechanical Key E connectors in DT bindings - add serdev helpers for looking up devices by OF nodes - minor serdev core rework to enable support for PCIe M.2 Key E connectors" * tag 'pwrseq-updates-for-v7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: power: sequencing: pcie-m2: add SERIAL_DEV_BUS dependency power: sequencing: pcie-m2: enforce PCI and OF dependencies power: sequencing: pcie-m2: Create serdev device for WCN7850 bluetooth power: sequencing: pcie-m2: Add support for PCIe M.2 Key E connectors dt-bindings: connector: Add PCIe M.2 Mechanical Key E connector dt-bindings: serial: Document the graph port serdev: Do not return -ENODEV from of_serdev_register_devices() if external connector is used serdev: Add an API to find the serdev controller associated with the devicetree node serdev: Convert to_serdev_*() helpers to macros and use container_of_const()
2 parents 1334d2a + b4464d8 commit d60bc14

7 files changed

Lines changed: 563 additions & 28 deletions

File tree

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/connector/pcie-m2-e-connector.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: PCIe M.2 Mechanical Key E Connector
8+
9+
maintainers:
10+
- Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
11+
12+
description:
13+
A PCIe M.2 E connector node represents a physical PCIe M.2 Mechanical Key E
14+
connector. Mechanical Key E connectors are used to connect Wireless
15+
Connectivity devices including combinations of Wi-Fi, BT, NFC to the host
16+
machine over interfaces like PCIe/SDIO, USB/UART+PCM, and I2C.
17+
18+
properties:
19+
compatible:
20+
const: pcie-m2-e-connector
21+
22+
vpcie3v3-supply:
23+
description: A phandle to the regulator for 3.3v supply.
24+
25+
vpcie1v8-supply:
26+
description: A phandle to the regulator for VIO 1.8v supply.
27+
28+
i2c-parent:
29+
$ref: /schemas/types.yaml#/definitions/phandle
30+
description: I2C interface
31+
32+
clocks:
33+
description: 32.768 KHz Suspend Clock (SUSCLK) input from the host system to
34+
the M.2 card. Refer, PCI Express M.2 Specification r4.0, sec 3.1.12.1 for
35+
more details.
36+
maxItems: 1
37+
38+
w-disable1-gpios:
39+
description: GPIO output to W_DISABLE1# signal. This signal is used by the
40+
host system to disable WiFi radio in the M.2 card. Refer, PCI Express M.2
41+
Specification r4.0, sec 3.1.12.3 for more details.
42+
maxItems: 1
43+
44+
w-disable2-gpios:
45+
description: GPIO output to W_DISABLE2# signal. This signal is used by the
46+
host system to disable BT radio in the M.2 card. Refer, PCI Express M.2
47+
Specification r4.0, sec 3.1.12.3 for more details.
48+
maxItems: 1
49+
50+
viocfg-gpios:
51+
description: GPIO input to IO voltage configuration (VIO_CFG) signal. The
52+
card drives this signal to indicate to the host system whether the card
53+
supports an independent IO voltage domain for sideband signals. Refer,
54+
PCI Express M.2 Specification r4.0, sec 3.1.15.1 for more details.
55+
maxItems: 1
56+
57+
uart-wake-gpios:
58+
description: GPIO input to UART_WAKE# signal. The card asserts this signal
59+
to wake the host system and initiate UART interface communication. Refer,
60+
PCI Express M.2 Specification r4.0, sec 3.1.8.1 for more details.
61+
maxItems: 1
62+
63+
sdio-wake-gpios:
64+
description: GPIO input to SDIO_WAKE# signal. The card asserts this signal
65+
to wake the host system and initiate SDIO interface communication. Refer,
66+
PCI Express M.2 Specification r4.0, sec 3.1.7 for more details.
67+
maxItems: 1
68+
69+
sdio-reset-gpios:
70+
description: GPIO output to SDIO_RESET# signal. This signal is used by the
71+
host system to reset SDIO interface of the M.2 card. Refer, PCI Express
72+
M.2 Specification r4.0, sec 3.1.7 for more details.
73+
maxItems: 1
74+
75+
vendor-porta-gpios:
76+
description: GPIO for the first vendor specific signal (VENDOR_PORTA). This
77+
signal's functionality is defined by the card manufacturer and may be
78+
used for proprietary features. Refer the card vendor's documentation for
79+
details.
80+
maxItems: 1
81+
82+
vendor-portb-gpios:
83+
description: GPIO for the second vendor specific signal (VENDOR_PORTB). This
84+
signal's functionality is defined by the card manufacturer and may be
85+
used for proprietary features. Refer the card vendor's documentation for
86+
details.
87+
maxItems: 1
88+
89+
vendor-portc-gpios:
90+
description: GPIO for the third vendor specific signal (VENDOR_PORTC). This
91+
signal's functionality is defined by the card manufacturer and may be
92+
used for proprietary features. Refer the card vendor's documentation for
93+
details.
94+
maxItems: 1
95+
96+
ports:
97+
$ref: /schemas/graph.yaml#/properties/ports
98+
description: OF graph bindings modeling the interfaces exposed on the
99+
connector. Since a single connector can have multiple interfaces, every
100+
interface has an assigned OF graph port number as described below.
101+
102+
properties:
103+
port@0:
104+
$ref: /schemas/graph.yaml#/properties/port
105+
description: PCIe interface for Wi-Fi
106+
107+
port@1:
108+
$ref: /schemas/graph.yaml#/properties/port
109+
description: SDIO interface for Wi-Fi
110+
111+
port@2:
112+
$ref: /schemas/graph.yaml#/properties/port
113+
description: USB 2.0 interface for BT
114+
115+
port@3:
116+
$ref: /schemas/graph.yaml#/properties/port
117+
description: UART interface for BT
118+
119+
port@4:
120+
$ref: /schemas/graph.yaml#/properties/port
121+
description: PCM/I2S interface
122+
123+
anyOf:
124+
- anyOf:
125+
- required:
126+
- port@0
127+
- required:
128+
- port@1
129+
- anyOf:
130+
- required:
131+
- port@2
132+
- required:
133+
- port@3
134+
135+
required:
136+
- compatible
137+
- vpcie3v3-supply
138+
139+
additionalProperties: false
140+
141+
examples:
142+
# PCI M.2 Key E connector for Wi-Fi/BT with PCIe/UART interfaces
143+
- |
144+
#include <dt-bindings/gpio/gpio.h>
145+
146+
connector {
147+
compatible = "pcie-m2-e-connector";
148+
vpcie3v3-supply = <&vreg_wcn_3p3>;
149+
vpcie1v8-supply = <&vreg_l15b_1p8>;
150+
i2c-parent = <&i2c0>;
151+
w-disable1-gpios = <&tlmm 115 GPIO_ACTIVE_LOW>;
152+
w-disable2-gpios = <&tlmm 116 GPIO_ACTIVE_LOW>;
153+
viocfg-gpios = <&tlmm 117 GPIO_ACTIVE_HIGH>;
154+
uart-wake-gpios = <&tlmm 118 GPIO_ACTIVE_LOW>;
155+
sdio-wake-gpios = <&tlmm 119 GPIO_ACTIVE_LOW>;
156+
sdio-reset-gpios = <&tlmm 120 GPIO_ACTIVE_LOW>;
157+
158+
ports {
159+
#address-cells = <1>;
160+
#size-cells = <0>;
161+
162+
port@0 {
163+
reg = <0>;
164+
#address-cells = <1>;
165+
#size-cells = <0>;
166+
167+
endpoint@0 {
168+
reg = <0>;
169+
remote-endpoint = <&pcie4_port0_ep>;
170+
};
171+
};
172+
173+
port@3 {
174+
reg = <3>;
175+
#address-cells = <1>;
176+
#size-cells = <0>;
177+
178+
endpoint@0 {
179+
reg = <0>;
180+
remote-endpoint = <&uart14_ep>;
181+
};
182+
};
183+
};
184+
};

Documentation/devicetree/bindings/serial/serial.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ properties:
8787
description:
8888
TX FIFO threshold configuration (in bytes).
8989

90+
port:
91+
$ref: /schemas/graph.yaml#/properties/port
92+
9093
patternProperties:
9194
"^(bluetooth|bluetooth-gnss|embedded-controller|gnss|gps|mcu|onewire)$":
9295
if:

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21064,6 +21064,7 @@ PCIE M.2 POWER SEQUENCING
2106421064
M: Manivannan Sadhasivam <mani@kernel.org>
2106521065
L: linux-pci@vger.kernel.org
2106621066
S: Maintained
21067+
F: Documentation/devicetree/bindings/connector/pcie-m2-e-connector.yaml
2106721068
F: Documentation/devicetree/bindings/connector/pcie-m2-m-connector.yaml
2106821069
F: drivers/power/sequencing/pwrseq-pcie-m2.c
2106921070

drivers/power/sequencing/Kconfig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ config POWER_SEQUENCING_TH1520_GPU
3737

3838
config POWER_SEQUENCING_PCIE_M2
3939
tristate "PCIe M.2 connector power sequencing driver"
40-
depends on OF || COMPILE_TEST
40+
depends on OF
41+
depends on PCI
42+
depends on SERIAL_DEV_BUS
43+
select OF_DYNAMIC
4144
help
4245
Say Y here to enable the power sequencing driver for PCIe M.2
4346
connectors. This driver handles the power sequencing for the M.2

0 commit comments

Comments
 (0)