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
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/dma/apple,admac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ properties:
- const: apple,t8122-admac
- const: apple,t8122-admac
- const: apple,t8140-admac
- const: apple,t8152-admac

reg:
maxItems: 1
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
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
107 changes: 107 additions & 0 deletions Documentation/devicetree/bindings/power/apple,t8152-psd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/apple,t8152-psd.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple T8152 PSD service slot power domain

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

allOf:
- $ref: power-domain.yaml#

description: |
The T8152 (M6) power state director (PSD) gates some blocks, among them the
USB controllers and their DARTs, behind a per-port service slot. Each
slot has a 0x100 byte register window at the PSD base plus (slot << 8) with
the status (0x80), request (0x90), diagnostic (0xa0) and valid (0xbc)
registers. A consumer must power the parent PMGR domains of the block
first, then request state 0 (running) and wait for the acknowledge. This
node models that as a power domain: the PMGR domains are its parents
(power-domains), powering it on writes the request. Power-off requests
state 6 (off).

A "apple,t8152-psd-group" node covers several slots that are brought up
together: one reg window per slot, requested in reg order with the active
state given by apple,psd-states, and put back to state 6 in reverse order.

properties:
compatible:
enum:
- apple,t8152-psd
- apple,t8152-psd-group

reg:
minItems: 1
maxItems: 3

"#power-domain-cells":
const: 0

power-domains:
description:
Parent PMGR power domains, powered before the slot request. Absent when
the block has no PMGR power state.
minItems: 1
maxItems: 4

label:
description: Name of the power domain.

apple,psd-states:
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 1
maxItems: 3
description:
Active PSD state requested for each reg window, in reg order (default
0, running). Each value is 0 to 5.

apple,psd-timeout-ms:
description: Acknowledge timeout in milliseconds (default 1000).

required:
- compatible
- reg
- "#power-domain-cells"

unevaluatedProperties: false

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

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

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

power-controller@1000 {
compatible = "apple,t8152-psd";
reg = <0x0 0x1000 0x0 0x100>;
#power-domain-cells = <0>;
power-domains = <&ps_usb_aon>, <&ps_usb>;
label = "psd_example";
};
};
- |
soc {
#address-cells = <2>;
#size-cells = <2>;

power-controller@2000 {
compatible = "apple,t8152-psd-group";
reg = <0x0 0x2000 0x0 0x100>,
<0x0 0x2100 0x0 0x100>,
<0x0 0x2200 0x0 0x100>;
apple,psd-states = <0 2 2>;
#power-domain-cells = <0>;
label = "psd_group_example";
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ maintainers:

description:
The Always-On Processor provides audio and sensor services through firmware
loaded by the bootloader. The application processor uses a primary mailbox
and a separate setup-port mailbox. Each mailbox consumer has its own DMA
allocation window in the inherited AOP DART mappings.
loaded by the bootloader. On T8140 the application processor uses a primary
mailbox and a separate setup-port mailbox; on T8152 the setup port belongs to
the secure world and only the primary mailbox exists. Each mailbox consumer
has its own DMA allocation window in the inherited AOP DART mappings.

properties:
compatible:
const: apple,t8140-aop
enum:
- apple,t8140-aop
- apple,t8152-aop

reg:
items:
Expand All @@ -30,11 +33,13 @@ properties:
- const: asc

mboxes:
minItems: 1
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
Comment thread
joshuaswarren marked this conversation as resolved.
Resolved
items:
- description: Primary firmware transport
- description: Firmware setup-port transport
- description: Firmware setup-port transport (T8140 only)

mbox-names:
minItems: 1
items:
- const: mbox
- const: setup
Expand All @@ -61,6 +66,24 @@ properties:
type: object
$ref: /schemas/sound/apple,t8140-aop-audio.yaml#

allOf:
- if:
properties:
compatible:
const: apple,t8140-aop
then:
properties:
mboxes:
minItems: 2
mbox-names:
minItems: 2
else:
properties:
mboxes:
maxItems: 1
mbox-names:
maxItems: 1

required:
- compatible
- reg
Expand Down
Loading