diff --git a/Documentation/devicetree/bindings/clock/apple,pmgr-clocks.yaml b/Documentation/devicetree/bindings/clock/apple,pmgr-clocks.yaml new file mode 100644 index 0000000000000..f444cba5644d4 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/apple,pmgr-clocks.yaml @@ -0,0 +1,104 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/apple,pmgr-clocks.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple PMGR peripheral clock selectors + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Peripheral input clocks managed by the SoC power manager. The clock + specifier is the SoC clock selector from the hardware description. It is + separate from a PMGR device/power-gate ID. Rates may change with performance + state and must not be represented as fixed clocks sampled at one boot. + The provider remains disabled until a generation-specific clock driver + can resolve selectors and coordinate ownership with firmware. + +select: + properties: + compatible: + contains: + enum: + - apple,t6041-pmgr-clocks + - apple,t8140-pmgr-clocks + - apple,t6032-pmgr-clocks + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-pmgr-clocks + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-pmgr-clocks + - const: apple,pmgr-clocks + + '#clock-cells': + const: 1 + + required: + - compatible + - '#clock-cells' + + additionalProperties: false + else: + properties: + compatible: + items: + - enum: + - apple,t6041-pmgr-clocks + - apple,t8140-pmgr-clocks + - const: apple,pmgr-clocks + + reg: + description: PMGR control apertures in hardware-description order. + minItems: 44 + maxItems: 63 + + '#clock-cells': + const: 1 + + apple,pmgr: + $ref: /schemas/types.yaml#/definitions/phandle + description: Primary PMGR syscon. Additional control banks are described by reg. + + required: + - reg + - compatible + - '#clock-cells' + - apple,pmgr + + allOf: + - if: + properties: + compatible: + contains: + const: apple,t6041-pmgr-clocks + then: + properties: + reg: + minItems: 63 + maxItems: 63 + - if: + properties: + compatible: + contains: + const: apple,t8140-pmgr-clocks + then: + properties: + reg: + minItems: 44 + maxItems: 44 + + additionalProperties: false diff --git a/Documentation/devicetree/bindings/crypto/apple,aes.yaml b/Documentation/devicetree/bindings/crypto/apple,aes.yaml new file mode 100644 index 0000000000000..bc662a3825386 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/apple,aes.yaml @@ -0,0 +1,102 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/apple,aes.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple AES engine + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + AES hardware attached to the SIO DART. The register banks are the + engine, shared control and auxiliary control windows, in that order. + +select: + properties: + compatible: + contains: + enum: + - apple,t6041-aes + - apple,t8140-aes + - apple,t6032-aes + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-aes + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-aes + - const: apple,aes + + reg: + minItems: 2 + maxItems: 2 + + interrupts: + minItems: 1 + maxItems: 1 + + power-domains: + minItems: 1 + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + - power-domains + - iommus + + additionalProperties: false + else: + properties: + compatible: + oneOf: + - items: + - const: apple,t6041-aes + - const: apple,aes + - items: + - const: apple,t8140-aes + - const: apple,aes + + reg: + minItems: 3 + maxItems: 3 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 1 + maxItems: 1 + + power-domains: + minItems: 1 + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + - power-domains + - iommus + + additionalProperties: false diff --git a/Documentation/devicetree/bindings/display/apple,dpin.yaml b/Documentation/devicetree/bindings/display/apple,dpin.yaml new file mode 100644 index 0000000000000..b7499fe96c2f3 --- /dev/null +++ b/Documentation/devicetree/bindings/display/apple,dpin.yaml @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/apple,dpin.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple DisplayPort tunnel ingress + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + DisplayPort ingress registers and interrupt for a USB4 display tunnel. + +select: + properties: + compatible: + contains: + enum: + - apple,t6041-dpin + - apple,t6032-dpin + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-dpin + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-dpin + - const: apple,dpin + + reg: + minItems: 1 + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + + additionalProperties: false + else: + properties: + compatible: + oneOf: + - items: + - const: apple,t6041-dpin + - const: apple,dpin + + reg: + minItems: 1 + maxItems: 1 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + + additionalProperties: false diff --git a/Documentation/devicetree/bindings/dma/apple,pcie-piodma.yaml b/Documentation/devicetree/bindings/dma/apple,pcie-piodma.yaml new file mode 100644 index 0000000000000..aa744b612f4ca --- /dev/null +++ b/Documentation/devicetree/bindings/dma/apple,pcie-piodma.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/apple,pcie-piodma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple PCIe PIODMA engine + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + PCIe auxiliary DMA register banks and completion interrupt. The stream + is distinct from the PCIe endpoint streams in the same DART. + +select: + properties: + compatible: + contains: + enum: + - apple,t6041-pcie-piodma + - apple,t6032-pcie-piodma + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-pcie-piodma + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-pcie-piodma + - const: apple,pcie-piodma + + reg: + minItems: 3 + maxItems: 3 + + interrupts: + minItems: 1 + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + + additionalProperties: false + else: + properties: + compatible: + oneOf: + - items: + - const: apple,t6041-pcie-piodma + - const: apple,pcie-piodma + + reg: + minItems: 3 + maxItems: 3 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 1 + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + - iommus + + additionalProperties: false diff --git a/Documentation/devicetree/bindings/dma/apple,pciec-piodma.yaml b/Documentation/devicetree/bindings/dma/apple,pciec-piodma.yaml new file mode 100644 index 0000000000000..9a17b3c741d71 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/apple,pciec-piodma.yaml @@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/apple,pciec-piodma.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple PCIe tunnel PIODMA engine + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + PCIe tunnel auxiliary DMA register banks and completion interrupt. Its + stream is distinct from the tunnel endpoint streams in the same DART. + +select: + properties: + compatible: + contains: + enum: + - apple,t6041-pciec-piodma + - apple,t6032-pciec-piodma + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-pciec-piodma + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-pciec-piodma + - const: apple,pciec-piodma + + reg: + minItems: 4 + maxItems: 4 + + interrupts: + minItems: 1 + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + + additionalProperties: false + else: + properties: + compatible: + oneOf: + - items: + - const: apple,t6041-pciec-piodma + - const: apple,pciec-piodma + + reg: + minItems: 4 + maxItems: 4 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 1 + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + - iommus + + additionalProperties: false diff --git a/Documentation/devicetree/bindings/iommu/apple,dapf.yaml b/Documentation/devicetree/bindings/iommu/apple,dapf.yaml new file mode 100644 index 0000000000000..0a5d3370657e6 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/apple,dapf.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/apple,dapf.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple T6032 DMA address protection filter + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Hardware resources of the T6032 DMA address protection filter. The package contains two + peripheral dies. Register banks follow hardware resource order. The block + remains disabled until its ownership and lifecycle are supported; firmware + data and tuning are supplied separately by the boot firmware. + +select: + properties: + compatible: + contains: + const: apple,t6032-dapf + required: + - compatible + +properties: + compatible: + items: + - const: apple,t6032-dapf + - const: apple,dapf + + reg: + minItems: 1 + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/iommu/apple,dart-smmu.yaml b/Documentation/devicetree/bindings/iommu/apple,dart-smmu.yaml new file mode 100644 index 0000000000000..4be66e50321d2 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/apple,dart-smmu.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iommu/apple,dart-smmu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple T6032 system MMU companion + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Hardware resources of the T6032 system MMU companion. The package contains two + peripheral dies. Register banks follow hardware resource order. The block + remains disabled until its ownership and lifecycle are supported; firmware + data and tuning are supplied separately by the boot firmware. + +select: + properties: + compatible: + contains: + const: apple,t6032-dart-smmu + required: + - compatible + +properties: + compatible: + items: + - const: apple,t6032-dart-smmu + - const: apple,dart-smmu + + reg: + minItems: 1 + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/media/apple,jpeg.yaml b/Documentation/devicetree/bindings/media/apple,jpeg.yaml index 056e1d33c00fd..187a62490470e 100644 --- a/Documentation/devicetree/bindings/media/apple,jpeg.yaml +++ b/Documentation/devicetree/bindings/media/apple,jpeg.yaml @@ -19,61 +19,118 @@ description: | the engine's 32-bit buffer pointer registers. T8140 engines take 64-bit buffer addresses and use their DART's full window. -properties: - compatible: - enum: - - apple,t6041-jpeg - - apple,t8140-jpeg - - reg: - maxItems: 1 - - interrupts: - maxItems: 1 - - iommus: - maxItems: 1 - - power-domains: - minItems: 1 - items: - - description: The engine's power domain - - description: Performance request held while the engine works - - power-domain-names: - minItems: 1 - items: - - const: core - - const: perf - - apple,dma-range: - $ref: /schemas/types.yaml#/definitions/uint64-array - items: - - const: 0x10000000000 - - const: 0x100000000 - description: Device-visible DMA window, as a 64-bit base and size. - Only for engines with 32-bit buffer pointers. - -required: - - compatible - - reg - - interrupts - - iommus - - power-domains +select: + properties: + compatible: + contains: + enum: + - apple,t6041-jpeg + - apple,t8140-jpeg + - apple,t6032-jpeg + required: + - compatible allOf: - if: properties: compatible: - const: apple,t6041-jpeg + contains: + enum: + - apple,t6032-jpeg + required: + - compatible then: + properties: + compatible: + items: + - const: apple,t6032-jpeg + - const: apple,jpeg + + reg: + minItems: 1 + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 1 + + power-domains: + minItems: 1 + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 1 + + clocks: + minItems: 2 + maxItems: 2 + required: - - apple,dma-range + - compatible + - reg + - interrupts + - power-domains + - iommus + - clocks + + additionalProperties: false else: properties: - apple,dma-range: false + compatible: + enum: + - apple,t6041-jpeg + - apple,t8140-jpeg + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + iommus: + maxItems: 1 + + power-domains: + minItems: 1 + items: + - description: The engine's power domain + - description: Performance request held while the engine works + + power-domain-names: + minItems: 1 + items: + - const: core + - const: perf + + apple,dma-range: + $ref: /schemas/types.yaml#/definitions/uint64-array + items: + - const: 0x10000000000 + - const: 0x100000000 + description: Device-visible DMA window, as a 64-bit base and size. + Only for engines with 32-bit buffer pointers. -additionalProperties: false + required: + - compatible + - reg + - interrupts + - iommus + - power-domains + + allOf: + - if: + properties: + compatible: + const: apple,t6041-jpeg + then: + required: + - apple,dma-range + else: + properties: + apple,dma-range: false + + additionalProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/media/apple,prores.yaml b/Documentation/devicetree/bindings/media/apple,prores.yaml index 07afac17ef2ee..7e98633eade6c 100644 --- a/Documentation/devicetree/bindings/media/apple,prores.yaml +++ b/Documentation/devicetree/bindings/media/apple,prores.yaml @@ -14,51 +14,102 @@ description: | descriptors in a DMA ring; the engine signals completion with an interrupt. It has no firmware. Its power domain also resets it. -properties: - compatible: - const: apple,t8140-prores - - reg: - items: - - description: Engine registers - - description: Wrapper registers - - reg-names: - items: - - const: core - - const: wrapper - - interrupts: - minItems: 1 - maxItems: 2 - - iommus: - maxItems: 1 - - power-domains: - minItems: 1 - items: - - description: The engine's power domain - - description: Performance request held while the engine works - - power-domain-names: - minItems: 1 - items: - - const: core - - const: perf - - resets: - maxItems: 1 - -required: - - compatible - - reg - - reg-names - - interrupts - - iommus - - power-domains - -additionalProperties: false +select: + properties: + compatible: + contains: + enum: + - apple,t8140-prores + - apple,t6032-prores + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-prores + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-prores + - const: apple,prores + + reg: + minItems: 2 + maxItems: 3 + + interrupts: + minItems: 1 + maxItems: 1 + + power-domains: + minItems: 1 + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 2 + + required: + - compatible + - reg + - interrupts + - power-domains + - iommus + + additionalProperties: false + else: + properties: + compatible: + const: apple,t8140-prores + + reg: + items: + - description: Engine registers + - description: Wrapper registers + + reg-names: + items: + - const: core + - const: wrapper + + interrupts: + minItems: 1 + maxItems: 2 + + iommus: + maxItems: 1 + + power-domains: + minItems: 1 + items: + - description: The engine's power domain + - description: Performance request held while the engine works + + power-domain-names: + minItems: 1 + items: + - const: core + - const: perf + + resets: + maxItems: 1 + + required: + - compatible + - reg + - reg-names + - interrupts + - iommus + - power-domains + + additionalProperties: false examples: - | diff --git a/Documentation/devicetree/bindings/media/apple,scaler.yaml b/Documentation/devicetree/bindings/media/apple,scaler.yaml new file mode 100644 index 0000000000000..2fb7a05f1b6f5 --- /dev/null +++ b/Documentation/devicetree/bindings/media/apple,scaler.yaml @@ -0,0 +1,117 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/apple,scaler.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple image scaler + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + The image scaler and its companion DMA registers. The two DART streams + carry image data and PIODMA transfers. Firmware performance votes are + not fixed clock rates and are not encoded as clock-frequency values. + +select: + properties: + compatible: + contains: + enum: + - apple,t6041-scaler + - apple,t8140-scaler + - apple,t6032-scaler + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-scaler + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-scaler + - const: apple,scaler + + reg: + minItems: 4 + maxItems: 4 + + interrupts: + minItems: 2 + maxItems: 2 + + power-domains: + minItems: 2 + maxItems: 2 + + iommus: + minItems: 2 + maxItems: 2 + + clocks: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + - power-domains + - iommus + - clocks + + additionalProperties: false + else: + properties: + compatible: + oneOf: + - items: + - const: apple,t6041-scaler + - const: apple,scaler + - items: + - const: apple,t8140-scaler + - const: apple,scaler + + reg: + minItems: 4 + maxItems: 4 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 2 + maxItems: 2 + + power-domains: + minItems: 2 + maxItems: 2 + + iommus: + minItems: 2 + maxItems: 2 + + clocks: + minItems: 1 + maxItems: 1 + + resets: + maxItems: 1 + + required: + - compatible + - reg + - interrupts + - power-domains + - resets + - iommus + - clocks + + additionalProperties: false diff --git a/Documentation/devicetree/bindings/media/apple,t8140-ave.yaml b/Documentation/devicetree/bindings/media/apple,t8140-ave.yaml index dadb98b19f822..1d383d1ee0bc4 100644 --- a/Documentation/devicetree/bindings/media/apple,t8140-ave.yaml +++ b/Documentation/devicetree/bindings/media/apple,t8140-ave.yaml @@ -14,67 +14,121 @@ description: | preloaded by the bootloader. Its two DART instances translate the same stream. The bootloader supplies two reserved firmware regions and their IOVA mappings. -properties: - compatible: - enum: - - apple,t6000-ave - - apple,t6041-ave - - apple,t8112-ave - - apple,t8140-ave - - reg: - items: - - description: Codec registers - - description: Mailbox registers - - description: Coprocessor registers - - reg-names: - items: - - const: codec - - const: mailbox - - const: coproc - - interrupts: - items: - - description: Mailbox, raised when the firmware posts to a host ring - - description: Codec interrupt handled by the firmware - - description: Codec interrupt handled by the firmware - - description: Codec interrupt handled by the firmware - - description: Codec interrupt handled by the firmware - - power-domains: - minItems: 5 - maxItems: 6 - - power-domain-names: - minItems: 5 - items: - - const: dma - - const: pipe4 - - const: pipe5 - - const: me0 - - const: me1 - - const: perf - description: | - A performance floor the encoder needs to run at full speed, held - while the encoder is powered (for example the SoC rail floor of a - PMC). - - iommus: - maxItems: 2 - - memory-region: - items: - - description: Preloaded firmware text - - description: Preloaded firmware data - -required: - - compatible - - reg - - reg-names - - interrupts - - power-domains - - power-domain-names - - iommus - -additionalProperties: false +select: + properties: + compatible: + contains: + enum: + - apple,t6000-ave + - apple,t6041-ave + - apple,t8112-ave + - apple,t8140-ave + - apple,t6032-ave + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-ave + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-ave + - const: apple,ave + + reg: + minItems: 5 + maxItems: 5 + + interrupts: + minItems: 5 + maxItems: 5 + + power-domains: + minItems: 5 + maxItems: 6 + + iommus: + minItems: 2 + maxItems: 2 + + required: + - compatible + - reg + - interrupts + - power-domains + - iommus + + additionalProperties: false + else: + properties: + compatible: + enum: + - apple,t6000-ave + - apple,t6041-ave + - apple,t8112-ave + - apple,t8140-ave + + reg: + items: + - description: Codec registers + - description: Mailbox registers + - description: Coprocessor registers + + reg-names: + items: + - const: codec + - const: mailbox + - const: coproc + + interrupts: + items: + - description: Mailbox, raised when the firmware posts to a host ring + - description: Codec interrupt handled by the firmware + - description: Codec interrupt handled by the firmware + - description: Codec interrupt handled by the firmware + - description: Codec interrupt handled by the firmware + + power-domains: + minItems: 5 + maxItems: 6 + + power-domain-names: + minItems: 5 + items: + - const: dma + - const: pipe4 + - const: pipe5 + - const: me0 + - const: me1 + - const: perf + description: | + A performance floor the encoder needs to run at full speed, held + while the encoder is powered (for example the SoC rail floor of a + PMC). + + iommus: + maxItems: 2 + + memory-region: + items: + - description: Preloaded firmware text + - description: Preloaded firmware data + + required: + - compatible + - reg + - reg-names + - interrupts + - power-domains + - power-domain-names + - iommus + + additionalProperties: false diff --git a/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml b/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml index 1a0de74a885de..ee89abed63fb5 100644 --- a/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml +++ b/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml @@ -21,6 +21,7 @@ properties: - apple,t8122-fpwm - apple,t8142-fpwm - apple,t8132-fpwm + - apple,t8140-fpwm - apple,t6000-fpwm - apple,t6020-fpwm - apple,t6030-fpwm diff --git a/Documentation/devicetree/bindings/soc/apple/apple,aon-ptd.yaml b/Documentation/devicetree/bindings/soc/apple/apple,aon-ptd.yaml new file mode 100644 index 0000000000000..ab250e561ea8a --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,aon-ptd.yaml @@ -0,0 +1,99 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,aon-ptd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple always-on power telemetry interrupt router + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Always-on power telemetry register banks and upstream interrupts. The + firmware owns the telemetry data and interrupt routing at boot. + +select: + properties: + compatible: + contains: + enum: + - apple,t6041-aon-ptd + - apple,t8140-aon-ptd + - apple,t6032-aon-ptd + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-aon-ptd + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-aon-ptd + - const: apple,aon-ptd + + reg: + minItems: 4 + maxItems: 4 + + interrupts: + minItems: 32 + maxItems: 32 + + interrupt-controller: true + '#address-cells': + const: 0 + '#interrupt-cells': + const: 1 + + required: + - compatible + - reg + - interrupts + + additionalProperties: false + else: + properties: + compatible: + oneOf: + - items: + - const: apple,t6041-aon-ptd + - const: apple,aon-ptd + - items: + - const: apple,t8140-aon-ptd + - const: apple,aon-ptd + + reg: + minItems: 4 + maxItems: 4 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 32 + maxItems: 32 + + interrupt-controller: true + + '#interrupt-cells': + description: Firmware telemetry source identifier, plus flags on T8140. + enum: [1, 2] + + '#address-cells': + const: 0 + + required: + - compatible + - reg + - interrupts + - interrupt-controller + - '#interrupt-cells' + + additionalProperties: false diff --git a/Documentation/devicetree/bindings/soc/apple/apple,dwi.yaml b/Documentation/devicetree/bindings/soc/apple/apple,dwi.yaml new file mode 100644 index 0000000000000..ab9d1332c3fd6 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,dwi.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,dwi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple DWI controller + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + DWI hardware register window and interrupt. Register programming and + firmware ownership must be qualified before enabling the controller. + +select: + properties: + compatible: + contains: + enum: + - apple,t6041-dwi + - apple,t8140-dwi + - apple,t6032-dwi + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-dwi + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-dwi + - const: apple,dwi + + reg: + minItems: 1 + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 1 + + power-domains: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + - power-domains + + additionalProperties: false + else: + properties: + compatible: + oneOf: + - items: + - const: apple,t6041-dwi + - const: apple,dwi + - items: + - const: apple,t8140-dwi + - const: apple,dwi + + reg: + minItems: 1 + maxItems: 1 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 1 + maxItems: 1 + + power-domains: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + - power-domains + + additionalProperties: false diff --git a/Documentation/devicetree/bindings/soc/apple/apple,rsm.yaml b/Documentation/devicetree/bindings/soc/apple/apple,rsm.yaml new file mode 100644 index 0000000000000..fac18ff1ed761 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,rsm.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,rsm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple remote service manager + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Remote service manager register banks, interrupt and DART stream. + +select: + properties: + compatible: + contains: + enum: + - apple,t8140-rsm + - apple,t6032-rsm + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-rsm + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-rsm + - const: apple,rsm + + reg: + minItems: 2 + maxItems: 2 + + interrupts: + minItems: 1 + maxItems: 1 + + power-domains: + minItems: 1 + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + - power-domains + - iommus + + additionalProperties: false + else: + properties: + compatible: + oneOf: + - items: + - const: apple,t8140-rsm + - const: apple,rsm + + reg: + minItems: 2 + maxItems: 2 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 1 + maxItems: 1 + + iommus: + minItems: 1 + maxItems: 1 + + required: + - compatible + - reg + - interrupts + - iommus + + additionalProperties: false diff --git a/Documentation/devicetree/bindings/soc/apple/apple,t8140-mcc.yaml b/Documentation/devicetree/bindings/soc/apple/apple,t8140-mcc.yaml index 63767db0cea1a..a90abe9cdef61 100644 --- a/Documentation/devicetree/bindings/soc/apple/apple,t8140-mcc.yaml +++ b/Documentation/devicetree/bindings/soc/apple/apple,t8140-mcc.yaml @@ -15,36 +15,74 @@ description: two apertures with two planes each and a multicast cache-enable register; its enabled cache is retained until a dirty-data drain is qualified. -properties: - compatible: - oneOf: - - enum: +select: + properties: + compatible: + contains: + enum: - apple,t8132-mcc - apple,t8140-mcc - - items: - - const: apple,t6041-mcc - - const: apple,t8140-mcc - - reg: - description: Per-plane blocks on T8140, or the two multicast apertures on T8132. - minItems: 1 - maxItems: 32 - - nonposted-mmio: true - - apple,boot-dma-devices: - $ref: /schemas/types.yaml#/definitions/phandle-array - items: - maxItems: 1 - description: - Devices that take over DMA the bootloader left running. Cache allocation - is enabled only once each of them is bound to its driver. - -required: - - compatible - - reg - -additionalProperties: false + - apple,t6041-mcc + - apple,t6032-mcc + required: + - compatible + +allOf: + - if: + properties: + compatible: + contains: + enum: + - apple,t6032-mcc + required: + - compatible + then: + properties: + compatible: + items: + - const: apple,t6032-mcc + - const: apple,mcc + + reg: + minItems: 20 + maxItems: 20 + + required: + - compatible + - reg + + additionalProperties: false + else: + properties: + compatible: + oneOf: + - enum: + - apple,t8132-mcc + - apple,t8140-mcc + - items: + - const: apple,t6041-mcc + - const: apple,t8140-mcc + + reg: + description: Per-plane blocks on T8140, or the two multicast apertures on T8132. + minItems: 1 + maxItems: 32 + + nonposted-mmio: true + + apple,boot-dma-devices: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + maxItems: 1 + description: + Devices that take over DMA the bootloader left running. Cache allocation + is enabled only once each of them is bound to its driver. + + required: + - compatible + - reg + + additionalProperties: false examples: - | diff --git a/arch/arm64/boot/dts/apple/t6032-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6032-peripherals.dtsi new file mode 100644 index 0000000000000..648e5abf92a71 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6032-peripherals.dtsi @@ -0,0 +1,861 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* Unclaimed resources of both T6032 dies. */ + +&die0 { + ultra_dart_rsm0: iommu@2a033c000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0xa033c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_scaler00: iommu@407200000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x4 0x07200000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_scaler10: iommu@3c7200000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x3 0xc7200000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_apr00: iommu@2c5028000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0xc5028000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_apr01: iommu@2c502c000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0xc502c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_apr10: iommu@287008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0x87008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_jpeg00: iommu@2cf004000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0xcf004000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_jpeg10: iommu@2cf00c000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0xcf00c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_ave00: iommu@285030000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0x85030000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_ave01: iommu@285040000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0x85040000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_ave02: iommu@285020000 { + compatible = "apple,t6032-dart-smmu", "apple,dart-smmu"; + reg = <0x2 0x85020000 0x0 0x4000>; + status = "disabled"; + }; + + ultra_dart_ave03: filter@285044000 { + compatible = "apple,t6032-dapf", "apple,dapf"; + reg = <0x2 0x85044000 0x0 0x4000>; + status = "disabled"; + }; + + ultra_dart_ave10: iommu@3c5030000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x3 0xc5030000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_ave11: iommu@3c5040000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x3 0xc5040000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_ave12: iommu@3c5020000 { + compatible = "apple,t6032-dart-smmu", "apple,dart-smmu"; + reg = <0x3 0xc5020000 0x0 0x4000>; + status = "disabled"; + }; + + ultra_dart_ave13: filter@3c5044000 { + compatible = "apple,t6032-dapf", "apple,dapf"; + reg = <0x3 0xc5044000 0x0 0x4000>; + status = "disabled"; + }; + + ultra_dart_apciec00: iommu@721008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x7 0x21008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_apciec10: iommu@b21008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0xb 0x21008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_apciec20: iommu@f21008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0xf 0x21008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_apciec30: iommu@1321008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x13 0x21008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_apcie0_piodma: dma-controller@594010000 { + compatible = "apple,t6032-pcie-piodma", "apple,pcie-piodma"; + reg = <0x5 0x94010000 0x0 0x4000>, + <0x5 0x94014000 0x0 0x4000>, + <0x5 0x94018000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&pcie0_dart_0 15>; + status = "disabled"; + }; + + ultra_apcie1_piodma: dma-controller@595010000 { + compatible = "apple,t6032-pcie-piodma", "apple,pcie-piodma"; + reg = <0x5 0x95010000 0x0 0x4000>, + <0x5 0x95014000 0x0 0x4000>, + <0x5 0x95018000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&pcie0_dart_1 15>; + status = "disabled"; + }; + + ultra_apcie2_piodma: dma-controller@596010000 { + compatible = "apple,t6032-pcie-piodma", "apple,pcie-piodma"; + reg = <0x5 0x96010000 0x0 0x4000>, + <0x5 0x96014000 0x0 0x4000>, + <0x5 0x96018000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_apcie3_piodma: dma-controller@597010000 { + compatible = "apple,t6032-pcie-piodma", "apple,pcie-piodma"; + reg = <0x5 0x97010000 0x0 0x4000>, + <0x5 0x97014000 0x0 0x4000>, + <0x5 0x97018000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_apciec0_piodma: dma-controller@722000000 { + compatible = "apple,t6032-pciec-piodma", "apple,pciec-piodma"; + reg = <0x7 0x22000000 0x0 0x4000>, + <0x7 0x22004000 0x0 0x4000>, + <0x7 0x22008000 0x0 0x4000>, + <0x7 0x20008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&ultra_dart_apciec00 15>; + status = "disabled"; + }; + + ultra_apciec1_piodma: dma-controller@b22000000 { + compatible = "apple,t6032-pciec-piodma", "apple,pciec-piodma"; + reg = <0xb 0x22000000 0x0 0x4000>, + <0xb 0x22004000 0x0 0x4000>, + <0xb 0x22008000 0x0 0x4000>, + <0xb 0x20008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&ultra_dart_apciec10 15>; + status = "disabled"; + }; + + ultra_apciec2_piodma: dma-controller@f22000000 { + compatible = "apple,t6032-pciec-piodma", "apple,pciec-piodma"; + reg = <0xf 0x22000000 0x0 0x4000>, + <0xf 0x22004000 0x0 0x4000>, + <0xf 0x22008000 0x0 0x4000>, + <0xf 0x20008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&ultra_dart_apciec20 15>; + status = "disabled"; + }; + + ultra_apciec3_piodma: dma-controller@1322000000 { + compatible = "apple,t6032-pciec-piodma", "apple,pciec-piodma"; + reg = <0x13 0x22000000 0x0 0x4000>, + <0x13 0x22004000 0x0 0x4000>, + <0x13 0x22008000 0x0 0x4000>, + <0x13 0x20008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&ultra_dart_apciec30 15>; + status = "disabled"; + }; + + ultra_atc0_dpin0: displayport@701e50000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0x7 0x01e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_atc0_dpin1: displayport@701e58000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0x7 0x01e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_atc1_dpin0: displayport@b01e50000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0xb 0x01e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_atc1_dpin1: displayport@b01e58000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0xb 0x01e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_atc2_dpin0: displayport@f01e50000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0xf 0x01e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_atc2_dpin1: displayport@f01e58000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0xf 0x01e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_atc3_dpin0: displayport@1301e50000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0x13 0x01e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_atc3_dpin1: displayport@1301e58000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0x13 0x01e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_dwi: dwi@2929b0000 { + compatible = "apple,t6032-dwi", "apple,dwi"; + reg = <0x2 0x929b0000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_dwi>; + status = "disabled"; + }; + + ultra_aes: crypto@39100c000 { + compatible = "apple,t6032-aes", "apple,aes"; + reg = <0x3 0x9100c000 0x0 0x4000>, + <0x2 0xa02a0000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_aes>; + iommus = <&sio_dart 1>; + status = "disabled"; + }; + + ultra_aon_ptd: interrupt-controller@2a4dc0000 { + compatible = "apple,t6032-aon-ptd", "apple,aon-ptd"; + reg = <0x2 0xa4dc0000 0x0 0x4000>, + <0x2 0xa4dd0000 0x0 0x4000>, + <0x2 0xa4dd8000 0x0 0x4000>, + <0x2 0xa4de0000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + interrupt-controller; + #interrupt-cells = <1>; + #address-cells = <0>; + status = "disabled"; + }; + + ultra_rsm: rsm@2a0325000 { + compatible = "apple,t6032-rsm", "apple,rsm"; + reg = <0x2 0xa0325000 0x0 0x4000>, + <0x2 0xa03c0000 0x0 0x4>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_debug_gated>; + iommus = <&ultra_dart_rsm0 0>; + status = "disabled"; + }; + + ultra_scaler0: scaler@407000000 { + compatible = "apple,t6032-scaler", "apple,scaler"; + reg = <0x4 0x07000000 0x0 0x30000>, + <0x4 0x07210000 0x0 0x4000>, + <0x4 0x07204000 0x0 0x4000>, + <0x4 0x06000000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = , + ; + power-domains = <&ps_msr0>, <&ps_msr0_ase_core>; + iommus = <&ultra_dart_scaler00 0>, <&ultra_dart_scaler00 1>; + clocks = <&ultra_clocks 414>; + status = "disabled"; + }; + + ultra_scaler1: scaler@3c7000000 { + compatible = "apple,t6032-scaler", "apple,scaler"; + reg = <0x3 0xc7000000 0x0 0x30000>, + <0x3 0xc7210000 0x0 0x4000>, + <0x3 0xc7204000 0x0 0x4000>, + <0x3 0xc6000000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = , + ; + power-domains = <&ps_msr1>, <&ps_msr1_ase_core>; + iommus = <&ultra_dart_scaler10 0>, <&ultra_dart_scaler10 1>; + clocks = <&ultra_clocks 415>; + status = "disabled"; + }; + + ultra_apr0: video-codec@2c5000000 { + compatible = "apple,t6032-prores", "apple,prores"; + reg = <0x2 0xc5000000 0x0 0x4000>, + <0x2 0xc4000000 0x0 0x1000000>, + <0x2 0xc5078000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_scodec>; + iommus = <&ultra_dart_apr00 1>, <&ultra_dart_apr01 1>; + status = "disabled"; + }; + + ultra_apr1: video-codec@287000000 { + compatible = "apple,t6032-prores", "apple,prores"; + reg = <0x2 0x87000000 0x0 0x4000>, + <0x2 0x86000000 0x0 0x1000000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_prores>; + iommus = <&ultra_dart_apr10 0>; + status = "disabled"; + }; + + ultra_jpeg0: jpeg@2cf000000 { + compatible = "apple,t6032-jpeg", "apple,jpeg"; + reg = <0x2 0xcf000000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_jpg>; + iommus = <&ultra_dart_jpeg00 0>; + clocks = <&ultra_clocks 350>, <&ultra_clocks 351>; + status = "disabled"; + }; + + ultra_jpeg1: jpeg@2cf008000 { + compatible = "apple,t6032-jpeg", "apple,jpeg"; + reg = <0x2 0xcf008000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_jpg>; + iommus = <&ultra_dart_jpeg10 0>; + clocks = <&ultra_clocks 350>, <&ultra_clocks 351>; + status = "disabled"; + }; + + ultra_ave0: video-encoder@285100000 { + compatible = "apple,t6032-ave", "apple,ave"; + reg = <0x2 0x85100000 0x0 0x45c000>, + <0x2 0x85800000 0x0 0x800000>, + <0x2 0x85050000 0x0 0x4000>, + <0x2 0x92800430 0x0 0x20c>, + <0x2 0x84000000 0x0 0x1000000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + ; + power-domains = <&ps_venc0_sys>, <&ps_venc0_pipe4>, <&ps_venc0_pipe5>, <&ps_venc0_me0>, <&ps_venc0_me1>, <&ps_venc0_dma>; + iommus = <&ultra_dart_ave00 0>, <&ultra_dart_ave01 0>; + status = "disabled"; + }; + + ultra_ave1: video-encoder@3c5100000 { + compatible = "apple,t6032-ave", "apple,ave"; + reg = <0x3 0xc5100000 0x0 0x45c000>, + <0x3 0xc5800000 0x0 0x800000>, + <0x3 0xc5050000 0x0 0x4000>, + <0x2 0x92280510 0x0 0x7b14>, + <0x3 0xc4000000 0x0 0x1000000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + ; + power-domains = <&ps_venc1_pipe4>, <&ps_venc1_pipe5>, <&ps_venc1_me0>, <&ps_venc1_me1>, <&ps_venc1_dma>; + iommus = <&ultra_dart_ave10 0>, <&ultra_dart_ave11 0>; + status = "disabled"; + }; + +}; + +&die1 { + ultra_dart_scaler20: iommu@407200000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x4 0x07200000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_scaler30: iommu@3c7200000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x3 0xc7200000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_apr20: iommu@2c5028000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0xc5028000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_apr21: iommu@2c502c000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0xc502c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_apr30: iommu@287008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0x87008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_jpeg20: iommu@2cf004000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0xcf004000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_jpeg30: iommu@2cf00c000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0xcf00c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_ave20: iommu@285030000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0x85030000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_ave21: iommu@285040000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x2 0x85040000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_ave22: iommu@285020000 { + compatible = "apple,t6032-dart-smmu", "apple,dart-smmu"; + reg = <0x2 0x85020000 0x0 0x4000>; + status = "disabled"; + }; + + ultra_dart_ave23: filter@285044000 { + compatible = "apple,t6032-dapf", "apple,dapf"; + reg = <0x2 0x85044000 0x0 0x4000>; + status = "disabled"; + }; + + ultra_dart_ave30: iommu@3c5030000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x3 0xc5030000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_ave31: iommu@3c5040000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x3 0xc5040000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_ave32: iommu@3c5020000 { + compatible = "apple,t6032-dart-smmu", "apple,dart-smmu"; + reg = <0x3 0xc5020000 0x0 0x4000>; + status = "disabled"; + }; + + ultra_dart_ave33: filter@3c5044000 { + compatible = "apple,t6032-dapf", "apple,dapf"; + reg = <0x3 0xc5044000 0x0 0x4000>; + status = "disabled"; + }; + + ultra_dart_apciec40: iommu@721008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0x7 0x21008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_dart_apciec50: iommu@b21008000 { + compatible = "apple,t6031-dart", "apple,t8110-dart"; + reg = <0xb 0x21008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + #iommu-cells = <1>; + status = "disabled"; + }; + + ultra_apciec4_piodma: dma-controller@722000000 { + compatible = "apple,t6032-pciec-piodma", "apple,pciec-piodma"; + reg = <0x7 0x22000000 0x0 0x4000>, + <0x7 0x22004000 0x0 0x4000>, + <0x7 0x22008000 0x0 0x4000>, + <0x7 0x20008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&ultra_dart_apciec40 15>; + status = "disabled"; + }; + + ultra_apciec5_piodma: dma-controller@b22000000 { + compatible = "apple,t6032-pciec-piodma", "apple,pciec-piodma"; + reg = <0xb 0x22000000 0x0 0x4000>, + <0xb 0x22004000 0x0 0x4000>, + <0xb 0x22008000 0x0 0x4000>, + <0xb 0x20008000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&ultra_dart_apciec50 15>; + status = "disabled"; + }; + + ultra_atc4_dpin0: displayport@701e50000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0x7 0x01e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_atc4_dpin1: displayport@701e58000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0x7 0x01e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_atc5_dpin0: displayport@b01e50000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0xb 0x01e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_atc5_dpin1: displayport@b01e58000 { + compatible = "apple,t6032-dpin", "apple,dpin"; + reg = <0xb 0x01e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + ultra_scaler2: scaler@407000000 { + compatible = "apple,t6032-scaler", "apple,scaler"; + reg = <0x4 0x07000000 0x0 0x30000>, + <0x4 0x07210000 0x0 0x4000>, + <0x4 0x07204000 0x0 0x4000>, + <0x4 0x06000000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = , + ; + power-domains = <&ps_msr0_die1>, <&ps_msr0_ase_core_die1>; + iommus = <&ultra_dart_scaler20 0>, <&ultra_dart_scaler20 1>; + clocks = <&ultra_clocks 268435870>; + status = "disabled"; + }; + + ultra_scaler3: scaler@3c7000000 { + compatible = "apple,t6032-scaler", "apple,scaler"; + reg = <0x3 0xc7000000 0x0 0x30000>, + <0x3 0xc7210000 0x0 0x4000>, + <0x3 0xc7204000 0x0 0x4000>, + <0x3 0xc6000000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = , + ; + power-domains = <&ps_msr1_die1>, <&ps_msr1_ase_core_die1>; + iommus = <&ultra_dart_scaler30 0>, <&ultra_dart_scaler30 1>; + clocks = <&ultra_clocks 268435871>; + status = "disabled"; + }; + + ultra_apr2: video-codec@2c5000000 { + compatible = "apple,t6032-prores", "apple,prores"; + reg = <0x2 0xc5000000 0x0 0x4000>, + <0x2 0xc4000000 0x0 0x1000000>, + <0x2 0xc5078000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_scodec_die1>; + iommus = <&ultra_dart_apr20 1>, <&ultra_dart_apr21 1>; + status = "disabled"; + }; + + ultra_apr3: video-codec@287000000 { + compatible = "apple,t6032-prores", "apple,prores"; + reg = <0x2 0x87000000 0x0 0x4000>, + <0x2 0x86000000 0x0 0x1000000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_prores_die1>; + iommus = <&ultra_dart_apr30 0>; + status = "disabled"; + }; + + ultra_jpeg2: jpeg@2cf000000 { + compatible = "apple,t6032-jpeg", "apple,jpeg"; + reg = <0x2 0xcf000000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_jpg_die1>; + iommus = <&ultra_dart_jpeg20 0>; + clocks = <&ultra_clocks 268435806>, <&ultra_clocks 268435807>; + status = "disabled"; + }; + + ultra_jpeg3: jpeg@2cf008000 { + compatible = "apple,t6032-jpeg", "apple,jpeg"; + reg = <0x2 0xcf008000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_jpg_die1>; + iommus = <&ultra_dart_jpeg30 0>; + clocks = <&ultra_clocks 268435806>, <&ultra_clocks 268435807>; + status = "disabled"; + }; + + ultra_ave2: video-encoder@285100000 { + compatible = "apple,t6032-ave", "apple,ave"; + reg = <0x2 0x85100000 0x0 0x45c000>, + <0x2 0x85800000 0x0 0x800000>, + <0x2 0x85050000 0x0 0x4000>, + <0x2 0x92800430 0x0 0x20c>, + <0x2 0x84000000 0x0 0x1000000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + ; + power-domains = <&ps_venc0_sys_die1>, <&ps_venc0_pipe4_die1>, <&ps_venc0_pipe5_die1>, <&ps_venc0_me0_die1>, <&ps_venc0_me1_die1>, <&ps_venc0_dma_die1>; + iommus = <&ultra_dart_ave20 0>, <&ultra_dart_ave21 0>; + status = "disabled"; + }; + + ultra_ave3: video-encoder@3c5100000 { + compatible = "apple,t6032-ave", "apple,ave"; + reg = <0x3 0xc5100000 0x0 0x45c000>, + <0x3 0xc5800000 0x0 0x800000>, + <0x3 0xc5050000 0x0 0x4000>, + <0x2 0x92280510 0x0 0x7b14>, + <0x3 0xc4000000 0x0 0x1000000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + ; + power-domains = <&ps_venc1_pipe4_die1>, <&ps_venc1_pipe5_die1>, <&ps_venc1_me0_die1>, <&ps_venc1_me1_die1>, <&ps_venc1_dma_die1>; + iommus = <&ultra_dart_ave30 0>, <&ultra_dart_ave31 0>; + status = "disabled"; + }; + +}; + +/ { + ultra_mcc: memory-controller@2903c0000 { + compatible = "apple,t6032-mcc", "apple,mcc"; + reg = <0x2 0x903c0000 0x0 0x20000>, + <0x2 0x904d0000 0x0 0x149c>, + <0x2 0x92818000 0x0 0x4000>, + <0x22 0x92818000 0x0 0x4000>, + <0x2 0x20000000 0x0 0x2000000>, + <0x2 0x22000000 0x0 0x2000000>, + <0x2 0x24000000 0x0 0x2000000>, + <0x2 0x26000000 0x0 0x2000000>, + <0x2 0x28000000 0x0 0x2000000>, + <0x2 0x2a000000 0x0 0x2000000>, + <0x2 0x2c000000 0x0 0x2000000>, + <0x2 0x2e000000 0x0 0x2000000>, + <0x22 0x20000000 0x0 0x2000000>, + <0x22 0x22000000 0x0 0x2000000>, + <0x22 0x24000000 0x0 0x2000000>, + <0x22 0x26000000 0x0 0x2000000>, + <0x22 0x28000000 0x0 0x2000000>, + <0x22 0x2a000000 0x0 0x2000000>, + <0x22 0x2c000000 0x0 0x2000000>, + <0x22 0x2e000000 0x0 0x2000000>; + status = "disabled"; + }; + +}; + +/ { + ultra_clocks: clocks { + compatible = "apple,t6032-pmgr-clocks", "apple,pmgr-clocks"; + #clock-cells = <1>; + status = "disabled"; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6032.dtsi b/arch/arm64/boot/dts/apple/t6032.dtsi index 469cd8cbff72a..4b72abc681a48 100644 --- a/arch/arm64/boot/dts/apple/t6032.dtsi +++ b/arch/arm64/boot/dts/apple/t6032.dtsi @@ -463,3 +463,5 @@ &ps_afr_d2d_1_die1 { status = "okay"; }; + +#include "t6032-peripherals.dtsi" diff --git a/arch/arm64/boot/dts/apple/t6041-j616c.dts b/arch/arm64/boot/dts/apple/t6041-j616c.dts index f39dc4d278a10..713cc25859f86 100644 --- a/arch/arm64/boot/dts/apple/t6041-j616c.dts +++ b/arch/arm64/boot/dts/apple/t6041-j616c.dts @@ -912,6 +912,18 @@ memory-region = <&aop_mmio_pmgr>; }; +#include "hwmon-fan-dual.dtsi" + +&smc_hwmon { + fan-F0Ac { + apple,fan-manual-control; + }; + + fan-F1Ac { + apple,fan-manual-control; + }; +}; + #include "t604x-extdisp.dtsi" /delete-node/ &atcphy0_xbar; diff --git a/arch/arm64/boot/dts/apple/t8140-j700.dts b/arch/arm64/boot/dts/apple/t8140-j700.dts index 80dbb11d873ec..dde5e89cb0135 100644 --- a/arch/arm64/boot/dts/apple/t8140-j700.dts +++ b/arch/arm64/boot/dts/apple/t8140-j700.dts @@ -88,16 +88,21 @@ * cores do several times more work per watt, so all-core loads keep * them at full speed and trim the P cores instead. * - * The SMC refreshes these readings about once a second and the die - * settles within that time, so the loop carries a full sample of delay, - * and the power a core draws per energy-model watt varies about 2.7x - * between integer and floating-point work. The governor derives its - * gains from sustainable-power and the switch-on to control gap; 1.5 W - * over 37 C gives 40/81/8 mW per C, which held the clock within one - * P-state on both kinds of load (higher gains oscillate on the heavy - * one). 1.5 W lies inside the sustainable range measured at ~93 C: - * 1.1 W for floating-point and 2.5 W for integer loads. The switch-on - * trip sits above the idle temperature with schedutil (48-53 C), so the + * The SMC refreshes these readings about once a second, far slower + * than the die moves, so these zones are the slow outer loop. The + * fast loop is the PMP's: it runs a PI controller on its own die + * sensors every few milliseconds and its effort caps each cluster + * through cpufreq (apple,fast-die-effort), as on macOS. Under a + * sustained all-core load macOS holds the hottest SMC die reading at + * 105 C with the CPUs drawing 4.1-4.3 W, so the control trip is 105 C + * and sustainable-power is 4.2 W. The governor derives its gains from + * that and the switch-on to control gap (91/183/18 mW per C). Measured + * on 300 s of stress-ng on every CPU, against the earlier 95 C and + * 1.5 W: 9.4% more work, P cluster 3121 instead of 2476 MHz, CPUs + * 3.8 instead of 2.5 W, hottest die mean 102.8 C, p99 106.0 C, max + * 106.1 C, against the 110 C critical trip. The P clock dithers + * between adjacent states (2916-3336 MHz). The switch-on trip sits + * above the idle temperature with schedutil (48-53 C), so the * controller, and with it any integral wind-up, resets whenever the * machine rests. * @@ -117,7 +122,7 @@ polling-delay-passive = <500>; polling-delay = <500>; thermal-sensors = <&smc_hwmon 0>; /* Te05 */ - sustainable-power = <1500>; + sustainable-power = <4200>; trips { cpu_e0_alert: trip-alert { @@ -127,7 +132,7 @@ }; cpu_e0_control: trip-control { - temperature = <95000>; + temperature = <105000>; hysteresis = <2000>; type = "passive"; }; @@ -164,7 +169,7 @@ polling-delay-passive = <500>; polling-delay = <500>; thermal-sensors = <&smc_hwmon 1>; /* Te0S */ - sustainable-power = <1500>; + sustainable-power = <4200>; trips { cpu_e1_alert: trip-alert { @@ -174,7 +179,7 @@ }; cpu_e1_control: trip-control { - temperature = <95000>; + temperature = <105000>; hysteresis = <2000>; type = "passive"; }; @@ -211,7 +216,7 @@ polling-delay-passive = <500>; polling-delay = <500>; thermal-sensors = <&smc_hwmon 2>; /* Tp01 */ - sustainable-power = <1500>; + sustainable-power = <4200>; trips { cpu_p0_alert: trip-alert { @@ -221,7 +226,7 @@ }; cpu_p0_control: trip-control { - temperature = <95000>; + temperature = <105000>; hysteresis = <2000>; type = "passive"; }; @@ -258,7 +263,7 @@ polling-delay-passive = <500>; polling-delay = <500>; thermal-sensors = <&smc_hwmon 3>; /* Tp05 */ - sustainable-power = <1500>; + sustainable-power = <4200>; trips { cpu_p1_alert: trip-alert { @@ -268,7 +273,7 @@ }; cpu_p1_control: trip-control { - temperature = <95000>; + temperature = <105000>; hysteresis = <2000>; type = "passive"; }; @@ -305,7 +310,7 @@ polling-delay-passive = <500>; polling-delay = <500>; thermal-sensors = <&smc_hwmon 4>; /* Tp09 */ - sustainable-power = <1500>; + sustainable-power = <4200>; trips { cpu_p2_alert: trip-alert { @@ -315,7 +320,7 @@ }; cpu_p2_control: trip-control { - temperature = <95000>; + temperature = <105000>; hysteresis = <2000>; type = "passive"; }; @@ -352,7 +357,7 @@ polling-delay-passive = <500>; polling-delay = <500>; thermal-sensors = <&smc_hwmon 5>; /* Tp0D */ - sustainable-power = <1500>; + sustainable-power = <4200>; trips { cpu_p3_alert: trip-alert { @@ -362,7 +367,7 @@ }; cpu_p3_control: trip-control { - temperature = <95000>; + temperature = <105000>; hysteresis = <2000>; type = "passive"; }; diff --git a/arch/arm64/boot/dts/apple/t8140.dtsi b/arch/arm64/boot/dts/apple/t8140.dtsi index b27ca1ee8b05c..157ac016325fe 100644 --- a/arch/arm64/boot/dts/apple/t8140.dtsi +++ b/arch/arm64/boot/dts/apple/t8140.dtsi @@ -954,6 +954,34 @@ status = "disabled"; }; + /* Only a proxy for the external SPMI controller sits here. */ + nub_spmi1: spmi@308614000 { + compatible = "apple,t8140-spmi", "apple,t8103-spmi"; + reg = <0x3 0x08614000 0x0 0x100>; + #address-cells = <2>; + #size-cells = <0>; + #interrupt-cells = <2>; + interrupt-controller; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_nub_spmi1>; + status = "disabled"; + }; + + /* The AOP's SPMI bus (NFC controller). */ + aop_spmi0: spmi@310914000 { + compatible = "apple,t8140-spmi", "apple,t8103-spmi"; + reg = <0x3 0x10914000 0x0 0x100>; + #address-cells = <2>; + #size-cells = <0>; + #interrupt-cells = <2>; + interrupt-controller; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_aop_spmi0>; + status = "disabled"; + }; + smc: smc@30c600000 { compatible = "apple,t8140-smc", "apple,t8103-smc"; reg = <0x3 0x0c600000 0x0 0x4000>, @@ -1589,6 +1617,29 @@ status = "disabled"; }; + /* No devices on this bus on the J700. */ + spi3: spi@38510c000 { + compatible = "apple,t8140-spi", "apple,t8103-spi"; + reg = <0x3 0x8510c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + clocks = <&clkref>; + power-domains = <&ps_spi3>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + /* Fast PWM. The J700 has no keyboard backlight or other consumer. */ + fpwm0: pwm@385040000 { + compatible = "apple,t8140-fpwm", "apple,s5l-fpwm"; + reg = <0x3 0x85040000 0x0 0x4000>; + power-domains = <&ps_fpwm0>; + clocks = <&clkref>; + #pwm-cells = <2>; + status = "disabled"; + }; + serial0: serial@30812c000 { compatible = "apple,dockchannel-uart"; reg = <0x3 0x0812c000 0x0 0x4000>,