Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ properties:
- apple,t8132-pmgr
- apple,t8140-pmgr
- apple,t8142-pmgr
- apple,t8152-pmgr
- const: apple,t8103-pmgr
- const: syscon
- const: simple-mfd
Expand Down
32 changes: 31 additions & 1 deletion Documentation/devicetree/bindings/iommu/apple,dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ properties:
- apple,t8103-usb4-dart
- apple,t8110-dart
- apple,t6000-dart
- apple,t8152-dart
- items:
- enum:
- apple,t6000-dart
Expand All @@ -42,11 +43,24 @@ properties:
- const: apple,t8110-dart

reg:
maxItems: 1
minItems: 1
maxItems: 2

interrupts:
maxItems: 1

apple,static-topology:
type: boolean
description: |
apple,t8152-dart only. Do not touch the DART registers at probe. Use a
fixed topology and defer the tunables, parameter read, lock check, reset
and fault handling to the first runtime resume (the first consumer). For
DARTs behind a power or availability gate that firmware controls.

apple,num-streams:
$ref: /schemas/types.yaml#/definitions/uint32
description: Stream count assumed by apple,static-topology (default 16).

clocks:
description:
Reference to the gate clock phandle if required for this IOMMU.
Expand Down Expand Up @@ -115,6 +129,22 @@ properties:
and filtering state without a separate page-table root. Source and
destination must differ, and both must exist on the controller.

allOf:
# Only apple,t8152-dart has a second register region (the shared TLB invalidate doorbell).
- if:
properties:
compatible:
contains:
const: apple,t8152-dart
then:
properties:
reg:
minItems: 2
else:
properties:
reg:
maxItems: 1

required:
- compatible
- reg
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/iommu/apple,sart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ properties:
- apple,t6000-sart
- apple,t8015-sart
- apple,t8103-sart
- apple,t8152-sart

reg:
maxItems: 1
Expand Down
18 changes: 15 additions & 3 deletions Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ properties:
- apple,t8112-nvme-ans2
- apple,t6000-nvme-ans2
- const: apple,nvme-ans2
- const: apple,t8152-nvme-ans2

reg:
minItems: 2
Expand Down Expand Up @@ -125,13 +126,24 @@ allOf:
reg-names:
maxItems: 2

# T8152 has no reset line and no PMGR power domains for the ANS: the ANS is
# a virtual PMGR device there.
- if:
not:
properties:
compatible:
contains:
const: apple,t8152-nvme-ans2
then:
required:
- resets
- power-domains
- power-domain-names

required:
- compatible
- reg
- reg-names
- resets
- power-domains
- power-domain-names
- mboxes
- interrupts
- apple,sart
Expand Down
129 changes: 129 additions & 0 deletions Documentation/devicetree/bindings/phy/apple,t8152-atcphy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/apple,t8152-atcphy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple T8152 Type-C PHY (SuperSpeed and USB4 lanes)

maintainers:
- Joshua Warren <816217+joshuaswarren@users.noreply.github.com>

description: |
The SuperSpeed / USB4 side of one ATC port of the Apple M6 (T8152). The USB2
side of the same port is apple,t8152-usb2-phy. The PHY serves one transport
at a time: USB3 for the dwc3 controller of the port, or CIO (USB4 /
Thunderbolt) for the ACIO controller. Changing the transport shuts the PHY
down and brings it up again.

Firmware supplies the calibration. Every native tunable list of the ADT atc-phy
node that the bring-up applies is passed as apple,tunable-<name>, where <name>
is the ADT list name without the "tunable_" prefix, lower case, with "_"
replaced by "-" (for example tunable_LN0_SMGR_REGS_CIO becomes
apple,tunable-ln0-smgr-regs-cio). Offsets are relative to the register block
the list belongs to (the driver knows the blocks). A list the ADT does not
carry is left out. The two efuse lists apple,tunable-aciophy-cmn-dflt and
apple,tunable-ciopll-core-dflt carry the factory calibration; a PHY without
them is not calibrated.

$defs:
tunable:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
items:
items:
- description: Aligned byte offset within the register block of the list
- description: Bits to clear
- description: Bits to set

properties:
compatible:
const: apple,t8152-atcphy

reg:
items:
- description: PHY core window (ADT atc-phy reg[2], 0x84000 bytes)

reg-names:
items:
- const: core

apple,dwc3:
$ref: /schemas/types.yaml#/definitions/phandle
description: |
The dwc3 node of the port. The PHY uses its "pipe-handler" window (usb-drd
reg[3], the PIPE mux it routes) and the PIPE_PHY_READY word (usb-drd reg[1],
0x10000 above the "dwc3-core" window, inside the node's "dwc3-apple"
window). They are not resources of this node because the dwc3 node already
owns those ranges and the platform bus rejects equal or partly overlapping
ranges.

'#phy-cells':
const: 1
description: |
0 selects the USB3 PHY (dwc3-apple, set_mode(HOST) routes the PIPE and
brings the PHY up), 1 the CIO PHY (thunderbolt_apple, power_on/power_off).

power-domains:
minItems: 2
maxItems: 2
description:
The USB AON domain (ps_atc*_usb_aon) and the ATC USB domain
(psd_atc*_usb) of the port, in this order.

power-domain-names:
items:
- const: usb-aon
- const: usb

orientation-switch:
type: boolean
description: Register a Type-C orientation switch (the connector node points at it).

apple,cio-lanes:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 2, 3]
default: 3
description: Lane mask of the CIO bring-up, bit 0 lane 0 and bit 1 lane 1.

patternProperties:
'^apple,tunable-[a-z0-9-]+$':
$ref: '#/$defs/tunable'

required:
- compatible
- reg
- reg-names
- apple,dwc3
- '#phy-cells'

additionalProperties: false

examples:
- |
soc {
#address-cells = <2>;
#size-cells = <2>;

ps_atc2_usb_aon: power-controller-aon {
#power-domain-cells = <0>;
};

psd_atc2_usb: power-controller-usb {
#power-domain-cells = <0>;
};

usbdrd2: usb@382430000 {
reg = <0x3 0x82430000 0x0 0xcd00>;
};

phy@383000000 {
compatible = "apple,t8152-atcphy";
reg = <0x3 0x83000000 0x0 0x84000>;
reg-names = "core";
apple,dwc3 = <&usbdrd2>;
#phy-cells = <1>;
power-domains = <&ps_atc2_usb_aon>, <&psd_atc2_usb>;
power-domain-names = "usb-aon", "usb";
orientation-switch;
};
};
79 changes: 79 additions & 0 deletions Documentation/devicetree/bindings/phy/apple,t8152-usb2-phy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/apple,t8152-usb2-phy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple T8152 USB2 PHY

maintainers:
- Joshua Warren <816217+joshuaswarren@users.noreply.github.com>

description: |
The USB2 and eUSB2 register banks support a fixed host or fixed peripheral
connection independently of the ATC USB3 and USB4 lanes. Firmware supplies
device-specific calibration. Both independent USB power domains must stay
active while the PHY runs.

$defs:
tunable:
$ref: /schemas/types.yaml#/definitions/uint32-matrix
description: |
Register offset, clear mask, and set value triples for the usb2 bank.
The bootloader supplies these at boot; they are not part of the board file.
items:
items:
- description: Aligned byte offset within the usb2 register bank
- description: Bits to clear
- description: Bits to set

properties:
compatible:
const: apple,t8152-usb2-phy

reg:
items:
- description: USB2 PHY register bank
- description: eUSB2 PHY register bank

reg-names:
items:
- const: usb2
- const: eusb2

'#phy-cells':
const: 0

power-domains:
items:
- description: USB always-on domain
- description: USB controller domain

power-domain-names:
items:
- const: usb-aon
- const: usb

apple,tunable-usb2phy-dflt:
$ref: '#/$defs/tunable'
description: Default calibration, applied before the role calibration.

apple,tunable-usb2phy-host:
$ref: '#/$defs/tunable'
description: Host calibration, applied before the PHY leaves reset.

apple,tunable-usb2phy-dev:
$ref: '#/$defs/tunable'
description: |
Device-mode calibration, applied before the PHY leaves reset in peripheral
mode.

required:
- compatible
- reg
- reg-names
- '#phy-cells'
- power-domains
- power-domain-names

additionalProperties: false
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ properties:
- apple,t8122-pinctrl
- apple,t8132-pinctrl
- apple,t8140-pinctrl
- apple,t8152-pinctrl
- const: apple,t8103-pinctrl
- items:
# Do not add additional SoC to this list.
Expand Down Expand Up @@ -91,6 +92,11 @@ patternProperties:

additionalProperties: false

'^.+-hog(-[0-9]+)?$':
type: object
required:
- gpio-hog

allOf:
- $ref: pinctrl.yaml#

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ properties:
- apple,t8132-pmgr-pwrstate
- apple,t8140-pmgr-pwrstate
- apple,t8142-pmgr-pwrstate
- apple,t8152-pmgr-pwrstate
- const: apple,t8103-pmgr-pwrstate

reg:
Expand Down
Loading
Loading