Skip to content
17 changes: 14 additions & 3 deletions Documentation/devicetree/bindings/mux/apple,display-crossbar.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) AND GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/mux/apple,display-crossbar.yaml#
Expand All @@ -11,8 +11,8 @@ maintainers:

description:
Routes display pipelines to the DisplayPort transmitters and inputs
of an Apple Type-C PHY. Each crossbar exposes three mux controls,
selected by the consumer's mux specifier.
of an Apple Type-C PHY. Older layouts expose three mux controls; the T8142/T6050 layout
exposes five. The consumer selects an output using the mux specifier.

allOf:
- $ref: mux-controller.yaml#
Expand All @@ -25,10 +25,21 @@ properties:
- apple,t6000-display-crossbar
- apple,t6020-display-crossbar
- apple,t6041-display-crossbar
- apple,t8142-display-crossbar
- apple,t6050-display-crossbar

reg:
maxItems: 1

power-domains:
minItems: 2
maxItems: 2

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

'#mux-control-cells':
const: 1

Expand Down
235 changes: 235 additions & 0 deletions Documentation/devicetree/bindings/phy/apple,t6050-dp-phy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/phy/apple,t6050-dp-phy.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple T6050 DisplayPort and Type-C combo PHY

maintainers:
- Dj <hey@djdev.me>

description: |
Fixed four-lane DisplayPort PHY for HDMI bridges, or one shared owner of
Type-C USB2, USB3 and DisplayPort alternate mode. DisplayPort supports RBR
through HBR3 without spread-spectrum clocking. The combo provider serializes
controller shutdown, PIPE handoff, orientation and alternate-mode changes.
Register resources, power domains and board tunables come from the producer.

properties:
compatible:
enum:
- apple,t6050-dp-phy
- apple,t6050-combo-phy

reg:
minItems: 6
maxItems: 11

reg-names:
minItems: 6
maxItems: 11

'#phy-cells':
enum: [0, 1]

'#reset-cells':
const: 1

apple,port-index:
$ref: /schemas/types.yaml#/definitions/uint32
enum: [1, 2, 3, 4, 5]
description: Type-C port; the debug port (0) is excluded

apple,guest-port-reserved:
type: boolean
description: The boot producer has excluded this port from host ownership

mode-switch: true
orientation-switch: true

mboxes:
maxItems: 1

port:
$ref: /schemas/graph.yaml#/properties/port

apple,tunable-aus40cmn-shm:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples for the common analog bank

apple,tunable-cio4pll:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples for the CIO PLL bank

apple,tunable-usb2-default:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples for the USB2 PHY bank

apple,tunable-usb2-host:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples for the USB2 host bank

apple,tunable-pipe-default:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples for the PIPE handler

power-domains:
description:
A combo PHY may name the USB controller's domain fourth ("usb"). Its
USB2 PHY and digital banks are in that domain, and the PHY then holds it
while it runs, also on a port with no USB controller bound.
minItems: 3
maxItems: 4

power-domain-names:
minItems: 3
items:
- const: usb-aon
- const: common
- const: wrapper
- const: usb

apple,tunable-axi2af:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples within the named bank

apple,tunable-fabric:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples within the named bank

apple,tunable-common-cfg:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples within the named bank

apple,tunable-lioa:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples within the named bank

apple,tunable-lane0-rx-clock:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples within the named bank

apple,tunable-lane1-rx-clock:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples within the named bank

apple,tunable-lane0-rx-eq:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples within the named bank

apple,tunable-lane1-rx-eq:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples within the named bank

apple,tunable-auspll:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: Offset, mask and value tuples within the named bank

patternProperties:
'^apple,dp-training-table(-rbr|-hbr|-hbr2|-hbr3)?$':
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 16
maxItems: 16
description: Drive presets indexed by voltage swing times four plus pre-emphasis

required:
- compatible
- reg
- reg-names
- '#phy-cells'
- power-domains
- power-domain-names
- apple,tunable-axi2af
- apple,tunable-fabric
- apple,tunable-common-cfg
- apple,tunable-lioa
- apple,tunable-lane0-rx-clock
- apple,tunable-lane1-rx-clock
- apple,tunable-lane0-rx-eq
- apple,tunable-lane1-rx-eq
- apple,tunable-auspll

allOf:
- if:
properties:
compatible:
const: apple,t6050-combo-phy
then:
properties:
'#phy-cells':
const: 1
reg:
minItems: 11
maxItems: 11
reg-names:
items:
- const: core
- const: usb2phy
- const: usb2-digital
- const: reset
- const: fabric
- const: axi2af
- const: lioa
- const: common-cfg
- const: usb-control
- const: firmware-data
- const: pipehandler
required:
- '#reset-cells'
- apple,port-index
- apple,guest-port-reserved
- mode-switch
- orientation-switch
- mboxes
- apple,tunable-aus40cmn-shm
- apple,tunable-cio4pll
- apple,tunable-usb2-default
- apple,tunable-usb2-host
- apple,tunable-pipe-default
else:
properties:
'#phy-cells':
const: 0
power-domains:
maxItems: 3
power-domain-names:
maxItems: 3
if:
required:
- mode-switch
then:
properties:
reg:
minItems: 8
maxItems: 8
reg-names:
items:
- const: core
- const: reset
- const: fabric
- const: axi2af
- const: lioa
- const: common-cfg
- const: usb-control
- const: firmware-data
required:
- orientation-switch
- mboxes
- apple,tunable-aus40cmn-shm
- apple,tunable-cio4pll
else:
properties:
reg:
minItems: 6
maxItems: 6
reg-names:
items:
- const: core
- const: reset
- const: fabric
- const: axi2af
- const: lioa
- const: common-cfg

additionalProperties: false
40 changes: 38 additions & 2 deletions Documentation/devicetree/bindings/usb/apple,dwc3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,23 @@ allOf:
then:
required:
- power-domains
- if:
properties:
compatible:
contains:
const: apple,t6050-dwc3
then:
properties:
reg:
minItems: 3
reg-names:
minItems: 3
else:
properties:
reg:
maxItems: 3
reg-names:
maxItems: 3

$defs:
apple,tunable:
Expand All @@ -37,7 +54,7 @@ $defs:
- description: Bits to be set after applying the mask
description: >
Controller table from the device's Apple device tree, applied after
every core reset (T6040).
every core reset (T6040, T6050).

properties:
compatible:
Expand All @@ -47,6 +64,7 @@ properties:
- apple,t6000-dwc3
- apple,t6020-dwc3
- apple,t6040-dwc3
- apple,t6050-dwc3
- apple,t8112-dwc3
- apple,t8140-dwc3
- apple,t8142-dwc3
Expand All @@ -59,14 +77,18 @@ properties:
items:
- description: Core DWC3 region
- description: Apple-specific DWC3 region
- description: Controller configuration block (T6040)
- description: Controller configuration block (T6040, T6050)
- description: Bulk fabric block (T6050)
- description: AUSBC debug block (T6050)

reg-names:
minItems: 2
items:
- const: dwc3-core
- const: dwc3-apple
- const: drd-cfg
- const: drd-bulk
- const: drd-ausbc

interrupts:
maxItems: 1
Expand Down Expand Up @@ -100,6 +122,20 @@ properties:
$ref: "#/$defs/apple,tunable"
description: Tunables applied to the link registers of the Apple region.

apple,tunable-cio:
$ref: "#/$defs/apple,tunable"
description:
Tunables applied to the CIO registers of the Apple region, from offset
0x20 of that region, after the driver's fixed CIO values.

apple,tunable-bulk:
$ref: "#/$defs/apple,tunable"
description: Tunables applied to the drd-bulk region.

apple,tunable-ausbc:
$ref: "#/$defs/apple,tunable"
description: Tunables applied to the drd-ausbc region.

required:
- compatible
- reg
Expand Down
Loading