diff --git a/.github/workflows/dt-checks.yml b/.github/workflows/dt-checks.yml new file mode 100644 index 0000000000000..3b33a441be9d9 --- /dev/null +++ b/.github/workflows/dt-checks.yml @@ -0,0 +1,77 @@ +name: Device tree checks + +# Every Apple device tree is validated against its dt-schema bindings (CHECK_DTBS) at the +# base and at the head of the change; a warning the base does not have fails the job, and +# every binding the change adds or edits must pass dt_binding_check. This keeps the +# "describe every device" work from regressing while the existing warnings are burnt down. + +on: + pull_request: + branches: [integration/aurora, aurora-wip] + paths: + - 'arch/arm64/boot/dts/apple/**' + - 'Documentation/devicetree/bindings/**' + - 'include/dt-bindings/**' + - 'scripts/dtc/**' + - '.github/workflows/dt-checks.yml' + push: + branches: [integration/aurora] + paths: + - 'arch/arm64/boot/dts/apple/**' + - 'Documentation/devicetree/bindings/**' + - 'include/dt-bindings/**' + - 'scripts/dtc/**' + - '.github/workflows/dt-checks.yml' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: dt-checks-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + CLANG_VERSION: '18' + +jobs: + dt-checks: + runs-on: ubuntu-24.04 + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + filter: tree:0 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install the tools + run: | + sudo apt-get update -q + sudo apt-get install -y -q flex bison bc libyaml-dev clang-$CLANG_VERSION lld-$CLANG_VERSION llvm-$CLANG_VERSION + echo "/usr/lib/llvm-$CLANG_VERSION/bin" >> "$GITHUB_PATH" + pip install --quiet dtschema yamllint + + - name: CHECK_DTBS and dt_binding_check, base vs head + env: + EVENT: ${{ github.event_name }} + BEFORE: ${{ github.event.before }} + run: | + head=$(git rev-parse HEAD) + # A pull request is checked out as its merge into the CURRENT base branch tip, which is + # HEAD^1 (pull_request.base.sha can be the stale tip from when the PR was opened). + if [ "$EVENT" = pull_request ]; then base=$(git rev-parse HEAD^1); else base=$BEFORE; fi + if [ -z "$base" ] || ! git cat-file -e "$base^{commit}" 2>/dev/null; then base=$(git rev-parse HEAD~1); fi + scripts/dtc/apple-dt-check.sh "$base" "$head" "$RUNNER_TEMP/dt" + + - name: Keep the warning lists + if: always() + uses: actions/upload-artifact@v4 + with: + name: dt-check-warnings + path: | + ${{ runner.temp }}/dt/*.warn + if-no-files-found: ignore diff --git a/Documentation/devicetree/bindings/arm/apple.yaml b/Documentation/devicetree/bindings/arm/apple.yaml index f0061e05acbef..19972afe6eb3d 100644 --- a/Documentation/devicetree/bindings/arm/apple.yaml +++ b/Documentation/devicetree/bindings/arm/apple.yaml @@ -357,8 +357,8 @@ properties: - apple,j604 # MacBook Pro (14-inch, M4, 2024) - apple,j623 # iMac (24-inch, 2x USB-C, M4, 2024) - apple,j624 # iMac (24-inch, 4x USB-C, M4, 2024) - - apple,j713 # MacBook Air (13-inch, M3, 2025) - - apple,j715 # MacBook Air (15-inch, M3, 2025) + - apple,j713 # MacBook Air (13-inch, M4, 2025) + - apple,j715 # MacBook Air (15-inch, M4, 2025) - apple,j773g # Mac mini (M4, 2024) - const: apple,t8132 - const: apple,arm-platform 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..71e74f7d59a83 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/apple,pmgr-clocks.yaml @@ -0,0 +1,68 @@ +# 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. + +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..1b55625851940 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/apple,aes.yaml @@ -0,0 +1,47 @@ +# 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. + +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: + maxItems: 1 + + power-domains: + maxItems: 1 + + iommus: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - power-domains + - iommus + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/display/apple,display-secure-proxy.yaml b/Documentation/devicetree/bindings/display/apple,display-secure-proxy.yaml new file mode 100644 index 0000000000000..417d16344e07b --- /dev/null +++ b/Documentation/devicetree/bindings/display/apple,display-secure-proxy.yaml @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/apple,display-secure-proxy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple secure display proxy apertures + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Secure display proxy register apertures. They are distinct from the + non-secure display engine and remain owned by firmware. + +properties: + compatible: + oneOf: + - items: + - const: apple,t8140-display-secure-proxy + - const: apple,display-secure-proxy + + reg: + minItems: 3 + maxItems: 3 + description: Register apertures in hardware-description order. + +required: + - compatible + - reg + +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..340d078c054d1 --- /dev/null +++ b/Documentation/devicetree/bindings/display/apple,dpin.yaml @@ -0,0 +1,34 @@ +# 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. + +properties: + compatible: + oneOf: + - items: + - const: apple,t6041-dpin + - const: apple,dpin + + reg: + maxItems: 1 + description: Register apertures in hardware-description order. + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/display/bridge/parade,dp855.yaml b/Documentation/devicetree/bindings/display/bridge/parade,dp855.yaml new file mode 100644 index 0000000000000..846fcecfb86d3 --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/parade,dp855.yaml @@ -0,0 +1,44 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/bridge/parade,dp855.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Parade DP855 panel timing controller + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Panel timing controller controlled through SPI. The controller also + mediates access to panel management devices. Its downstream address + transport must be established before exposing those clients on a host + bus; the SPI chip select is not their downstream device address. + +allOf: + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + const: parade,dp855 + + reg: + maxItems: 1 + + i2c: + type: object + $ref: /schemas/i2c/i2c-controller.yaml# + description: Downstream panel management bus mediated by the timing controller. + + patternProperties: + '^temperature-sensor@7[0-2]$': + type: object + $ref: /schemas/trivial-devices.yaml# + + unevaluatedProperties: false + +required: + - compatible + - reg + +unevaluatedProperties: false diff --git a/Documentation/devicetree/bindings/dma/apple,admac-secure.yaml b/Documentation/devicetree/bindings/dma/apple,admac-secure.yaml new file mode 100644 index 0000000000000..bb8ee4570b6bd --- /dev/null +++ b/Documentation/devicetree/bindings/dma/apple,admac-secure.yaml @@ -0,0 +1,56 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/apple,admac-secure.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple secure audio DMA controller + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + The secure LEAP audio DMA controller's direct hardware aperture. It is + distinct from the AP-accessible channel proxy. Its register aperture is + not safe for the AP to access until firmware transfers ownership. The + node remains disabled and must not select the ordinary ADMAC driver. + Linux logical channel IDs alternate TX and RX; the ADT slot count is + per direction. + +allOf: + - $ref: dma-controller.yaml# + +properties: + compatible: + items: + - const: apple,t8140-admac-secure + - const: apple,admac-secure + + reg: + maxItems: 1 + + '#dma-cells': + const: 1 + + dma-channels: + const: 18 + + interrupts: + maxItems: 1 + + iommus: + maxItems: 1 + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - '#dma-cells' + - dma-channels + - interrupts + - iommus + - power-domains + +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..530b4f7402804 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/apple,pcie-piodma.yaml @@ -0,0 +1,40 @@ +# 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. + +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: + maxItems: 1 + + iommus: + 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..7381a24bba808 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/apple,pciec-piodma.yaml @@ -0,0 +1,40 @@ +# 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. + +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: + maxItems: 1 + + iommus: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - iommus + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/dma/apple,sio.yaml b/Documentation/devicetree/bindings/dma/apple,sio.yaml index 2498a7adaf410..5a6e7e84cd469 100644 --- a/Documentation/devicetree/bindings/dma/apple,sio.yaml +++ b/Documentation/devicetree/bindings/dma/apple,sio.yaml @@ -18,6 +18,20 @@ maintainers: allOf: - $ref: dma-controller.yaml# + - if: + properties: + compatible: + contains: + const: apple,t8140-sio + then: + properties: + reg: + minItems: 3 + maxItems: 3 + else: + properties: + reg: + maxItems: 1 properties: compatible: @@ -29,12 +43,22 @@ properties: - apple,t6030-sio - apple,t8103-sio - apple,t8112-sio + - apple,t8140-sio - const: apple,sio - description: T6041 firmware requires a generation-specific backend. const: apple,t6041-sio reg: - maxItems: 1 + minItems: 1 + maxItems: 3 + description: | + Coprocessor control registers. T8140 also publishes an auxiliary ASC + window and the remaining ASC registers after the mailbox window. + The mailbox registers are described by the mailbox provider. + + clocks: + minItems: 1 + maxItems: 3 '#dma-cells': const: 1 diff --git a/Documentation/devicetree/bindings/edac/apple,soc-error-handler.yaml b/Documentation/devicetree/bindings/edac/apple,soc-error-handler.yaml index 71053bd3841a5..157b0f836b1e3 100644 --- a/Documentation/devicetree/bindings/edac/apple,soc-error-handler.yaml +++ b/Documentation/devicetree/bindings/edac/apple,soc-error-handler.yaml @@ -35,10 +35,13 @@ properties: maxItems: 89 reg: - minItems: 25 + minItems: 10 maxItems: 25 description: | - T6041 per-source NI0 through NI6 status apertures, in interrupt order. + T6041 uses the qualified per-source NI status apertures in interrupt + order. T8140 publishes its native error/event register banks in + hardware-description order; their presence does not establish safe + AP access and the instances remain disabled until qualified. required: - compatible @@ -55,6 +58,9 @@ allOf: interrupts: minItems: 89 maxItems: 89 + reg: + minItems: 25 + maxItems: 25 required: - reg - if: @@ -67,6 +73,9 @@ allOf: interrupts: minItems: 26 maxItems: 26 + reg: + minItems: 17 + maxItems: 17 - if: properties: compatible: @@ -87,6 +96,9 @@ allOf: interrupts: minItems: 9 maxItems: 9 + reg: + minItems: 10 + maxItems: 10 additionalProperties: false diff --git a/Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml b/Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml index b4063a9dd1248..b5159611f73c4 100644 --- a/Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/apple,smc-gpio.yaml @@ -23,6 +23,18 @@ properties: '#gpio-cells': const: 2 + apple,output-templates: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 2 + maxItems: 128 + description: Pairs of GPIO number and native four-byte output template. + + apple,pcio-templates: + $ref: /schemas/types.yaml#/definitions/uint32-array + minItems: 3 + maxItems: 192 + description: Triples of GPIO number and native pcIO low/high word templates. + required: - compatible - gpio-controller diff --git a/Documentation/devicetree/bindings/mailbox/apple,secure-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/apple,secure-mailbox.yaml new file mode 100644 index 0000000000000..d9a92eefd1356 --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/apple,secure-mailbox.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/apple,secure-mailbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple secure coprocessor mailbox aperture + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Secure coprocessor proxy mailbox aperture and its transport interrupts. + This description does not authorize access to secure-world registers. + +properties: + compatible: + oneOf: + - items: + - const: apple,t8140-secure-mailbox + - const: apple,secure-mailbox + + reg: + maxItems: 1 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 2 + maxItems: 2 + + iommus: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - iommus + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/media/apple,isp-secure-proxy.yaml b/Documentation/devicetree/bindings/media/apple,isp-secure-proxy.yaml new file mode 100644 index 0000000000000..cb90bbe4b4251 --- /dev/null +++ b/Documentation/devicetree/bindings/media/apple,isp-secure-proxy.yaml @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/apple,isp-secure-proxy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple secure image processor proxy apertures + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Secure image processor proxy register apertures. They are distinct from + the non-secure image processor and remain owned by firmware. + +properties: + compatible: + oneOf: + - items: + - const: apple,t8140-isp-secure-proxy + - const: apple,isp-secure-proxy + + reg: + minItems: 3 + maxItems: 3 + description: Register apertures in hardware-description order. + +required: + - compatible + - reg + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/media/apple,prores.yaml b/Documentation/devicetree/bindings/media/apple,prores.yaml index 07afac17ef2ee..4124c331a9f8c 100644 --- a/Documentation/devicetree/bindings/media/apple,prores.yaml +++ b/Documentation/devicetree/bindings/media/apple,prores.yaml @@ -16,17 +16,23 @@ description: | properties: compatible: - const: apple,t8140-prores + oneOf: + - const: apple,t8140-prores + - items: + - const: apple,t6041-prores + - const: apple,prores reg: - items: - - description: Engine registers - - description: Wrapper registers + minItems: 2 + maxItems: 3 + description: Engine, wrapper and (on T6041) auxiliary register windows. reg-names: + minItems: 2 items: - const: core - const: wrapper + - const: aux interrupts: minItems: 1 @@ -58,6 +64,31 @@ required: - iommus - power-domains +allOf: + - if: + properties: + compatible: + contains: + const: apple,t6041-prores + then: + properties: + reg: + minItems: 3 + maxItems: 3 + reg-names: + minItems: 3 + maxItems: 3 + interrupts: + maxItems: 1 + required: + - resets + else: + properties: + reg: + maxItems: 2 + reg-names: + maxItems: 2 + 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..b5f2f5b0e50eb --- /dev/null +++ b/Documentation/devicetree/bindings/media/apple,scaler.yaml @@ -0,0 +1,59 @@ +# 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. + +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: + maxItems: 1 + + resets: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - power-domains + - resets + - iommus + - clocks + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/misc/apple,display-pcon.yaml b/Documentation/devicetree/bindings/misc/apple,display-pcon.yaml new file mode 100644 index 0000000000000..095b4bfd67ee8 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/apple,display-pcon.yaml @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/apple,display-pcon.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple display protocol converter control + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Display protocol converter control endpoint on the panel control bus. + Firmware retains control of the display path at boot. + +properties: + compatible: + items: + - const: apple,t6041-display-pcon + - const: apple,display-pcon + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/misc/apple,radio-pmu.yaml b/Documentation/devicetree/bindings/misc/apple,radio-pmu.yaml new file mode 100644 index 0000000000000..934fd143ec834 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/apple,radio-pmu.yaml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/apple,radio-pmu.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple radio power management follower + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + SPMI radio power-management follower. The firmware controls its power + policy; this node only describes its address on the SPMI bus. + +properties: + compatible: + items: + - enum: + - apple,t6041-radio-pmu + - const: apple,radio-pmu + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/misc/apple,sd-card-control.yaml b/Documentation/devicetree/bindings/misc/apple,sd-card-control.yaml new file mode 100644 index 0000000000000..7671d72d9b306 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/apple,sd-card-control.yaml @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/apple,sd-card-control.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple SD card sideband control + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Sideband control device on the SD reader control bus. The PCIe card + reader is a separate device; this endpoint does not replace it. + +properties: + compatible: + items: + - const: apple,t6041-sd-card-control + - const: apple,sd-card-control + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/misc/apple,spmi-all-ace.yaml b/Documentation/devicetree/bindings/misc/apple,spmi-all-ace.yaml new file mode 100644 index 0000000000000..00b7caba3bfff --- /dev/null +++ b/Documentation/devicetree/bindings/misc/apple,spmi-all-ace.yaml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/apple,spmi-all-ace.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple SPMI Type-C control companion + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + SPMI companion endpoint alongside the Type-C port controllers. It + remains firmware-owned and is distinct from the per-port HPM followers. + +properties: + compatible: + items: + - enum: + - apple,t8140-spmi-all-ace + - const: apple,spmi-all-ace + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/misc/apple,xspmi-proxy.yaml b/Documentation/devicetree/bindings/misc/apple,xspmi-proxy.yaml new file mode 100644 index 0000000000000..d6ec66464ea3d --- /dev/null +++ b/Documentation/devicetree/bindings/misc/apple,xspmi-proxy.yaml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/apple,xspmi-proxy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple external SPMI proxy follower + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + External SPMI proxy endpoint on the NUB SPMI bus. Firmware owns the + proxy transport until a host driver establishes an access contract. + +properties: + compatible: + items: + - enum: + - apple,t8140-xspmi-proxy + - const: apple,xspmi-proxy + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/net/nfc/apple,stockholm-nci.yaml b/Documentation/devicetree/bindings/net/nfc/apple,stockholm-nci.yaml new file mode 100644 index 0000000000000..316c7b99e59e4 --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/apple,stockholm-nci.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nfc/apple,stockholm-nci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple Stockholm NFC controller and Secure Element over SPMI + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Stockholm is an NCI NFC controller with an embedded Secure Element, + connected to the SoC as a follower on a dedicated SPMI bus. NCI packets + are written to and read from non-incrementing FIFO registers of the + follower. The follower raises host-wake, data-ready and error interrupts + through the SPMI controller, and an enable line (VEN) selects between + operation and the controller's deepest power state. + +properties: + compatible: + const: apple,stockholm-nci + + reg: + maxItems: 1 + + interrupts: + items: + - description: host wake request from the controller + - description: NCI packet ready in the receive FIFO + - description: transport error + + interrupt-names: + items: + - const: host-wake + - const: data-ready + - const: error + + enable-gpios: + maxItems: 1 + description: VEN, the controller's enable line; low is its deepest power state. + +required: + - compatible + - reg + - interrupts + - interrupt-names + - enable-gpios + +additionalProperties: false + +examples: + - | + #include + #include + #include + + spmi { + #address-cells = <2>; + #size-cells = <0>; + + nfc@9 { + compatible = "apple,stockholm-nci"; + reg = <9 SPMI_USID>; + interrupts = <229 IRQ_TYPE_EDGE_RISING>, + <230 IRQ_TYPE_EDGE_RISING>, + <227 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "host-wake", "data-ready", "error"; + enable-gpios = <&smc_gpio 14 GPIO_ACTIVE_HIGH>; + }; + }; diff --git a/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml index 1a1051584e8fa..bd28dc14068e1 100644 --- a/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml +++ b/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml @@ -29,6 +29,9 @@ properties: reg: maxItems: 1 + battery-monitor: + $ref: /schemas/power/supply/apple,battery-monitor.yaml# + rtc: $ref: /schemas/rtc/apple,j700-pmu-rtc.yaml# diff --git a/Documentation/devicetree/bindings/phy/apple,t6040-atcphy.yaml b/Documentation/devicetree/bindings/phy/apple,t6040-atcphy.yaml index 04c8907584946..f62c71901541f 100644 --- a/Documentation/devicetree/bindings/phy/apple,t6040-atcphy.yaml +++ b/Documentation/devicetree/bindings/phy/apple,t6040-atcphy.yaml @@ -109,6 +109,10 @@ properties: Link to the SuperSpeed lanes of the Type-C connector. Absent on a fixed DisplayPort PHY. + ports: + $ref: /schemas/graph.yaml#/properties/ports + description: USB and DisplayPort lane connections to the Type-C connector. + apple,tunable-axi2af: $ref: "#/$defs/apple,tunable" description: Tunables applied to the axi2af region. diff --git a/Documentation/devicetree/bindings/power/supply/apple,battery-monitor.yaml b/Documentation/devicetree/bindings/power/supply/apple,battery-monitor.yaml new file mode 100644 index 0000000000000..32385b877710b --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/apple,battery-monitor.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/apple,battery-monitor.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple PMU battery monitor + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Battery-monitor function. T6041 uses a separate SPMI follower and + telemetry-router source identifiers; T8140 is a function of the primary + PMIC and signals through the SPMI interrupt controller. The monitor does + not transfer ownership of PMIC control or battery policy to the host. + +properties: + compatible: + items: + - enum: + - apple,t6041-battery-monitor + - apple,t8140-battery-monitor + - const: apple,battery-monitor + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 2 + +required: + - compatible + - interrupts + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml index 75ac2a08f2576..e1a606f86bce1 100644 --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml @@ -28,6 +28,9 @@ properties: - samsung,exynos5433-uart - samsung,exynos850-uart - samsung,exynos8895-uart + - items: + - const: apple,t8140-uart + - const: apple,s5l-uart - items: - enum: - samsung,exynos2200-uart 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..13dec59b733fc --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,aon-ptd.yaml @@ -0,0 +1,51 @@ +# 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. + +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,aop2.yaml b/Documentation/devicetree/bindings/soc/apple/apple,aop2.yaml new file mode 100644 index 0000000000000..54e5b2d87d875 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,aop2.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,aop2.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple secondary always-on processor + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Secondary always-on processor register banks and transport interrupts. + The processor uses a distinct stream in the primary AOP DART. + +properties: + compatible: + oneOf: + - items: + - const: apple,t8140-aop2 + - const: apple,aop2 + + reg: + minItems: 3 + maxItems: 3 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 4 + maxItems: 4 + + power-domains: + maxItems: 1 + + iommus: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - power-domains + - iommus + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/soc/apple/apple,cpu-debug.yaml b/Documentation/devicetree/bindings/soc/apple/apple,cpu-debug.yaml new file mode 100644 index 0000000000000..da180b772ad2d --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,cpu-debug.yaml @@ -0,0 +1,36 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,cpu-debug.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple processor debug interface + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Processor debug register apertures. Access ownership must be established + before a debugger accesses this block. + +properties: + compatible: + oneOf: + - items: + - const: apple,t6041-cpu-debug + - const: apple,cpu-debug + + reg: + minItems: 2 + maxItems: 2 + description: Register apertures in hardware-description order. + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/soc/apple/apple,debug-dock.yaml b/Documentation/devicetree/bindings/soc/apple/apple,debug-dock.yaml new file mode 100644 index 0000000000000..ec730e0b96211 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,debug-dock.yaml @@ -0,0 +1,34 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,debug-dock.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple debug dock connection detector + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Debug dock connection detector register and interrupt resources. + +properties: + compatible: + oneOf: + - items: + - const: apple,t8140-debug-dock + - const: apple,debug-dock + + reg: + maxItems: 1 + + interrupts: + minItems: 2 + maxItems: 2 + +required: + - compatible + - reg + - interrupts + +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..e067b3f3665b9 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,dwi.yaml @@ -0,0 +1,42 @@ +# 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. + +properties: + compatible: + oneOf: + - items: + - const: apple,t6041-dwi + - const: apple,dwi + - items: + - const: apple,t8140-dwi + - const: apple,dwi + + reg: + maxItems: 1 + description: Register apertures in hardware-description order. + + interrupts: + maxItems: 1 + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - power-domains + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/soc/apple/apple,eic.yaml b/Documentation/devicetree/bindings/soc/apple/apple,eic.yaml new file mode 100644 index 0000000000000..4d916ffa1d51c --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,eic.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,eic.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple secure peripheral controller + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Secure peripheral controller register apertures. These are absolute + secure-side aliases published separately from the ordinary AP devices. + The firmware retains ownership; an AP driver must establish an access + contract before touching these resources. + +properties: + compatible: + items: + - const: apple,t8140-eic + - const: apple,eic + + reg: + minItems: 6 + maxItems: 6 + + reg-names: + items: + - const: ps + - const: wd-isp + - const: gpio + - const: fpwm + - const: gltb + - const: wd-e + +required: + - compatible + - reg + - reg-names + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/soc/apple/apple,esm.yaml b/Documentation/devicetree/bindings/soc/apple/apple,esm.yaml new file mode 100644 index 0000000000000..0565bb2dfdf95 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,esm.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,esm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple secure SEP manager transport + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Secure SEP manager transport register aperture and interrupts. This is + separate from the ordinary SEP mailbox and has no qualified AP client. + +properties: + compatible: + oneOf: + - items: + - const: apple,t8140-esm + - const: apple,esm + + reg: + maxItems: 1 + description: Register apertures in hardware-description order. + + interrupts: + minItems: 2 + maxItems: 2 + + iommus: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - iommus + +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..15e3e504b06ba --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,rsm.yaml @@ -0,0 +1,39 @@ +# 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. + +properties: + compatible: + oneOf: + - items: + - const: apple,t8140-rsm + - const: apple,rsm + + reg: + minItems: 2 + maxItems: 2 + description: Register apertures in hardware-description order. + + interrupts: + maxItems: 1 + + iommus: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - iommus + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/soc/apple/apple,xspmi-controller.yaml b/Documentation/devicetree/bindings/soc/apple/apple,xspmi-controller.yaml new file mode 100644 index 0000000000000..23de22e476d5d --- /dev/null +++ b/Documentation/devicetree/bindings/soc/apple/apple,xspmi-controller.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,xspmi-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple external SPMI controller endpoint + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + External SPMI controller queue aperture, published separately from the + non-secure bus and its SPMI proxy follower. The queue aperture is owned + by secure firmware; the response vector is local to this transport and + is not an AIC interrupt number. + +properties: + compatible: + items: + - enum: + - apple,t8140-xspmi-controller + - const: apple,xspmi-controller + + reg: + maxItems: 1 + + apple,response-vector: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Local response vector of the firmware transport. + +required: + - compatible + - reg + - apple,response-vector + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/sound/apple,macaudio.yaml b/Documentation/devicetree/bindings/sound/apple,macaudio.yaml index a68638153d7c2..95e560146eae7 100644 --- a/Documentation/devicetree/bindings/sound/apple,macaudio.yaml +++ b/Documentation/devicetree/bindings/sound/apple,macaudio.yaml @@ -42,6 +42,8 @@ properties: - apple,j713-macaudio-jack - apple,j813-macaudio - apple,j873-macaudio + - apple,j715-macaudio + - apple,j715-macaudio-jack - const: apple,macaudio - description: Machines that share the speaker and jack layout of an earlier diff --git a/Documentation/devicetree/bindings/sound/apple,t6000-dpaudio.yaml b/Documentation/devicetree/bindings/sound/apple,t6000-dpaudio.yaml new file mode 100644 index 0000000000000..7c409d4ea2c72 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/apple,t6000-dpaudio.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/apple,t6000-dpaudio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple T6000 and T6020 DisplayPort audio + +maintainers: + - Ryan Murray + +description: | + Each display coprocessor (DCP) provides a DisplayPort/HDMI audio service. + Samples are fed to it by SIO DMA; the host does not access the register + window of the interface. The graph connects this interface to port 0 of + the display processor that owns the audio service. + +select: + properties: + compatible: + contains: + enum: + - apple,t6000-dpaudio + - apple,t6020-dpaudio + required: + - compatible + +properties: + compatible: + items: + - enum: + - apple,t6000-dpaudio + - apple,t6020-dpaudio + - const: apple,dpaudio + + reg: + maxItems: 1 + + dmas: + maxItems: 1 + + dma-names: + const: tx + + power-domains: + maxItems: 1 + + ports: + $ref: /schemas/graph.yaml#/properties/ports + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: Connection to the display processor's audio service. + required: + - port@0 + +required: + - compatible + - reg + - dmas + - dma-names + - power-domains + +additionalProperties: false + +examples: + - | + soc { + #address-cells = <2>; + #size-cells = <2>; + + audio-controller@39b500000 { + compatible = "apple,t6000-dpaudio", "apple,dpaudio"; + reg = <0x3 0x9b500000 0x0 0x4000>; + dmas = <&sio 0x64>; + dma-names = "tx"; + power-domains = <&ps_dpa0>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + endpoint { + remote-endpoint = <&dcp_audio>; + }; + }; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/timer/apple,aic-timebase.yaml b/Documentation/devicetree/bindings/timer/apple,aic-timebase.yaml new file mode 100644 index 0000000000000..19a606988c907 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/apple,aic-timebase.yaml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/timer/apple,aic-timebase.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple AIC timebase + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + The timebase register aperture associated with the interrupt controller. + +properties: + compatible: + oneOf: + - items: + - const: apple,t6041-aic-timebase + - const: apple,aic-timebase + + reg: + maxItems: 1 + description: Register apertures in hardware-description order. + +required: + - compatible + - reg + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/timer/apple,secure-timebase.yaml b/Documentation/devicetree/bindings/timer/apple,secure-timebase.yaml new file mode 100644 index 0000000000000..e2f3489775fbd --- /dev/null +++ b/Documentation/devicetree/bindings/timer/apple,secure-timebase.yaml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/timer/apple,secure-timebase.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple secure audio timebase aperture + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Secure audio timebase register aperture, owned by firmware at boot. + +properties: + compatible: + oneOf: + - items: + - const: apple,t8140-secure-timebase + - const: apple,secure-timebase + + reg: + maxItems: 1 + description: Register apertures in hardware-description order. + +required: + - compatible + - reg + +additionalProperties: false diff --git a/Documentation/devicetree/bindings/watchdog/apple,secure-watchdog.yaml b/Documentation/devicetree/bindings/watchdog/apple,secure-watchdog.yaml new file mode 100644 index 0000000000000..706d1ed52ef64 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/apple,secure-watchdog.yaml @@ -0,0 +1,30 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/apple,secure-watchdog.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple secure hibernation watchdog aperture + +maintainers: + - Ryan Murray <81541646+RyanTheTide@users.noreply.github.com> + +description: | + Secure hibernation watchdog register aperture, owned by firmware at boot. + +properties: + compatible: + oneOf: + - items: + - const: apple,t8140-secure-watchdog + - const: apple,secure-watchdog + + reg: + maxItems: 1 + description: Register apertures in hardware-description order. + +required: + - compatible + - reg + +additionalProperties: false diff --git a/MAINTAINERS b/MAINTAINERS index 94db75cad4059..78e5d506eff3a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2734,6 +2734,7 @@ F: Documentation/devicetree/bindings/leds/backlight/apple,dwi-bl.yaml F: Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml F: Documentation/devicetree/bindings/mfd/apple,smc.yaml F: Documentation/devicetree/bindings/net/bluetooth/brcm,bcm4377-bluetooth.yaml +F: Documentation/devicetree/bindings/net/nfc/apple,stockholm-nci.yaml F: Documentation/devicetree/bindings/npu/apple,ane.yaml F: Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml F: Documentation/devicetree/bindings/nvmem/apple,efuses.yaml @@ -2777,6 +2778,8 @@ F: drivers/iommu/apple-dart.c F: drivers/iommu/io-pgtable-dart.c F: drivers/irqchip/irq-apple-aic.c F: drivers/mfd/macsmc*.c +F: drivers/nfc/.kunitconfig +F: drivers/nfc/apple-stockholm*.c F: drivers/nvme/host/apple.c F: drivers/nvmem/apple-efuses.c F: drivers/nvmem/apple-spmi-nvmem.c @@ -2791,6 +2794,7 @@ F: tools/asahi/apple-pwm-pm-tests.py F: drivers/reset/reset-apple-cio.c F: drivers/rtc/rtc-macsmc.c F: drivers/soc/apple/* +F: drivers/soc/apple/clpc.kunitconfig F: tools/asahi/pmp-bootargs-tests.rs F: drivers/spi/spi-apple-test.c F: drivers/spi/spi-apple.c diff --git a/arch/arm64/boot/dts/apple/t600x-die0.dtsi b/arch/arm64/boot/dts/apple/t600x-die0.dtsi index 8357258058339..8ccbc3e45971f 100644 --- a/arch/arm64/boot/dts/apple/t600x-die0.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-die0.dtsi @@ -561,7 +561,6 @@ dmas = <&sio 0x64>; dma-names = "tx"; power-domains = <&ps_dpa0>; - reset-domains = <&ps_dpa0>; status = "disabled"; ports { diff --git a/arch/arm64/boot/dts/apple/t600x-dieX.dtsi b/arch/arm64/boot/dts/apple/t600x-dieX.dtsi index 0b0da1a4b066b..31223f4612c7d 100644 --- a/arch/arm64/boot/dts/apple/t600x-dieX.dtsi +++ b/arch/arm64/boot/dts/apple/t600x-dieX.dtsi @@ -381,7 +381,6 @@ dmas = <&DIE_NODE(sio) 0x66>; dma-names = "tx"; power-domains = <&DIE_NODE(ps_dpa1)>; - reset-domains = <&DIE_NODE(ps_dpa1)>; status = "disabled"; ports { @@ -402,7 +401,6 @@ dmas = <&DIE_NODE(sio) 0x68>; dma-names = "tx"; power-domains = <&DIE_NODE(ps_dpa2)>; - reset-domains = <&DIE_NODE(ps_dpa2)>; status = "disabled"; ports { @@ -426,7 +424,6 @@ dmas = <&DIE_NODE(sio) 0x6a>; dma-names = "tx"; power-domains = <&DIE_NODE(ps_dpa3)>; - reset-domains = <&DIE_NODE(ps_dpa3)>; status = "disabled"; ports { @@ -447,7 +444,6 @@ dmas = <&DIE_NODE(sio) 0x6c>; dma-names = "tx"; power-domains = <&DIE_NODE(ps_dpa4)>; - reset-domains = <&DIE_NODE(ps_dpa4)>; status = "disabled"; ports { diff --git a/arch/arm64/boot/dts/apple/t602x-die0.dtsi b/arch/arm64/boot/dts/apple/t602x-die0.dtsi index 6001004903632..bc5388b0b40ff 100644 --- a/arch/arm64/boot/dts/apple/t602x-die0.dtsi +++ b/arch/arm64/boot/dts/apple/t602x-die0.dtsi @@ -67,7 +67,7 @@ }; nco: clock-controller@28e03c000 { - compatible = "apple,t6020-nco", "apple,t8103-nco", "apple,nco"; + compatible = "apple,t6020-nco", "apple,t8103-nco"; reg = <0x2 0x8e03c000 0x0 0x14000>; clocks = <&nco_clkref>; #clock-cells = <1>; @@ -307,7 +307,7 @@ }; nub_spmi0: spmi@29e114000 { - compatible = "apple,t6020-spmi", "apple,t8103-spmi", "apple,spmi"; + compatible = "apple,t6020-spmi", "apple,t8103-spmi"; reg = <0x2 0x9e114000 0x0 0x100>; #address-cells = <2>; #size-cells = <0>; @@ -364,7 +364,7 @@ }; wdt: watchdog@29e2c4000 { - compatible = "apple,t6020-wdt", "apple,t8103-wdt", "apple,wdt"; + compatible = "apple,t6020-wdt", "apple,t8103-wdt"; reg = <0x2 0x9e2c4000 0x0 0x4000>; clocks = <&clkref>; interrupt-parent = <&aic>; @@ -385,7 +385,7 @@ }; smc: smc@2a2400000 { - compatible = "apple,t6020-smc", "apple,t8103-smc", "apple,smc"; + compatible = "apple,t6020-smc", "apple,t8103-smc"; reg = <0x2 0xa2400000 0x0 0x4000>, <0x2 0xa3e00000 0x0 0x100000>; reg-names = "smc", "sram"; @@ -417,7 +417,7 @@ }; pinctrl_smc: pinctrl@2a2820000 { - compatible = "apple,t6020-pinctrl", "apple,t8103-pinctrl", "apple,pinctrl"; + compatible = "apple,t6020-pinctrl", "apple,t8103-pinctrl"; reg = <0x2 0xa2820000 0x0 0x4000>; gpio-controller; @@ -461,7 +461,7 @@ }; aop_admac: dma-controller@2a6980000 { - compatible = "apple,t6020-admac", "apple,admac"; + compatible = "apple,t6020-admac", "apple,t8103-admac"; reg = <0x2 0xa6980000 0x0 0x34000>; #dma-cells = <1>; dma-channels = <16>; @@ -755,7 +755,7 @@ }; i2c0: i2c@39b040000 { - compatible = "apple,t6020-i2c", "apple,t8103-i2c", "apple,i2c"; + compatible = "apple,t6020-i2c", "apple,t8103-i2c"; reg = <0x3 0x9b040000 0x0 0x4000>; clocks = <&clkref>; interrupt-parent = <&aic>; @@ -768,7 +768,7 @@ }; i2c1: i2c@39b044000 { - compatible = "apple,t6020-i2c", "apple,t8103-i2c", "apple,i2c"; + compatible = "apple,t6020-i2c", "apple,t8103-i2c"; reg = <0x3 0x9b044000 0x0 0x4000>; clocks = <&clkref>; interrupt-parent = <&aic>; @@ -782,7 +782,7 @@ }; i2c2: i2c@39b048000 { - compatible = "apple,t6020-i2c", "apple,t8103-i2c", "apple,i2c"; + compatible = "apple,t6020-i2c", "apple,t8103-i2c"; reg = <0x3 0x9b048000 0x0 0x4000>; clocks = <&clkref>; interrupt-parent = <&aic>; @@ -796,7 +796,7 @@ }; i2c3: i2c@39b04c000 { - compatible = "apple,t6020-i2c", "apple,t8103-i2c", "apple,i2c"; + compatible = "apple,t6020-i2c", "apple,t8103-i2c"; reg = <0x3 0x9b04c000 0x0 0x4000>; clocks = <&clkref>; interrupt-parent = <&aic>; @@ -810,7 +810,7 @@ }; i2c4: i2c@39b050000 { - compatible = "apple,t6020-i2c", "apple,t8103-i2c", "apple,i2c"; + compatible = "apple,t6020-i2c", "apple,t8103-i2c"; reg = <0x3 0x9b050000 0x0 0x4000>; clocks = <&clkref>; interrupt-parent = <&aic>; @@ -824,7 +824,7 @@ }; i2c5: i2c@39b054000 { - compatible = "apple,t6020-i2c", "apple,t8103-i2c", "apple,i2c"; + compatible = "apple,t6020-i2c", "apple,t8103-i2c"; reg = <0x3 0x9b054000 0x0 0x4000>; clocks = <&clkref>; interrupt-parent = <&aic>; @@ -838,7 +838,7 @@ }; i2c6: i2c@39b054000 { - compatible = "apple,t6020-i2c", "apple,t8103-i2c", "apple,i2c"; + compatible = "apple,t6020-i2c", "apple,t8103-i2c"; reg = <0x3 0x9b054000 0x0 0x4000>; clocks = <&clkref>; interrupt-parent = <&aic>; @@ -852,7 +852,7 @@ }; i2c7: i2c@39b054000 { - compatible = "apple,t6020-i2c", "apple,t8103-i2c", "apple,i2c"; + compatible = "apple,t6020-i2c", "apple,t8103-i2c"; reg = <0x3 0x9b054000 0x0 0x4000>; clocks = <&clkref>; interrupt-parent = <&aic>; @@ -866,7 +866,7 @@ }; i2c8: i2c@39b054000 { - compatible = "apple,t6020-i2c", "apple,t8103-i2c", "apple,i2c"; + compatible = "apple,t6020-i2c", "apple,t8103-i2c"; reg = <0x3 0x9b054000 0x0 0x4000>; clocks = <&clkref>; interrupt-parent = <&aic>; @@ -880,7 +880,7 @@ }; spi1: spi@39b104000 { - compatible = "apple,t6020-spi", "apple,t8103-spi", "apple,spi"; + compatible = "apple,t6020-spi", "apple,t8103-spi"; reg = <0x3 0x9b104000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; @@ -894,7 +894,7 @@ }; spi2: spi@39b108000 { - compatible = "apple,t6020-spi", "apple,t8103-spi", "apple,spi"; + compatible = "apple,t6020-spi", "apple,t8103-spi"; reg = <0x3 0x9b108000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; @@ -916,7 +916,7 @@ }; spi4: spi@39b110000 { - compatible = "apple,t6020-spi", "apple,t8103-spi", "apple,spi"; + compatible = "apple,t6020-spi", "apple,t8103-spi"; reg = <0x3 0x9b110000 0x0 0x4000>; interrupt-parent = <&aic>; interrupts = ; @@ -946,7 +946,7 @@ }; admac: dma-controller@39b400000 { - compatible = "apple,t6020-admac", "apple,t8103-admac", "apple,admac"; + compatible = "apple,t6020-admac", "apple,t8103-admac"; reg = <0x3 0x9b400000 0x0 0x34000>; #dma-cells = <1>; dma-channels = <16>; @@ -965,7 +965,6 @@ dmas = <&sio 0x64>; dma-names = "tx"; power-domains = <&ps_dpa0>; - reset-domains = <&ps_dpa0>; status = "disabled"; ports { @@ -981,7 +980,7 @@ }; mca: mca@39b600000 { - compatible = "apple,t6020-mca", "apple,t8103-mca", "apple,mca"; + compatible = "apple,t6020-mca", "apple,t8103-mca"; reg = <0x3 0x9b600000 0x0 0x10000>, <0x3 0x9b500000 0x0 0x20000>; clocks = <&nco 0>, <&nco 1>, <&nco 2>, <&nco 3>; diff --git a/arch/arm64/boot/dts/apple/t602x-dieX.dtsi b/arch/arm64/boot/dts/apple/t602x-dieX.dtsi index cb4907704b057..7a088fa931990 100644 --- a/arch/arm64/boot/dts/apple/t602x-dieX.dtsi +++ b/arch/arm64/boot/dts/apple/t602x-dieX.dtsi @@ -160,7 +160,7 @@ }; DIE_NODE(pinctrl_nub): pinctrl@29e1f0000 { - compatible = "apple,t6020-pinctrl", "apple,t8103-pinctrl", "apple,pinctrl"; + compatible = "apple,t6020-pinctrl", "apple,t8103-pinctrl"; reg = <0x2 0x9e1f0000 0x0 0x4000>; power-domains = <&DIE_NODE(ps_nub_gpio)>; @@ -189,7 +189,7 @@ }; DIE_NODE(pinctrl_aop): pinctrl@2a6820000 { - compatible = "apple,t6020-pinctrl", "apple,t8103-pinctrl", "apple,pinctrl"; + compatible = "apple,t6020-pinctrl", "apple,t8103-pinctrl"; reg = <0x2 0xa6820000 0x0 0x4000>; gpio-controller; @@ -315,7 +315,7 @@ }; DIE_NODE(pinctrl_ap): pinctrl@39b028000 { - compatible = "apple,t6020-pinctrl", "apple,t8103-pinctrl", "apple,pinctrl"; + compatible = "apple,t6020-pinctrl", "apple,t8103-pinctrl"; reg = <0x3 0x9b028000 0x0 0x4000>; interrupt-parent = <&aic>; @@ -371,7 +371,6 @@ dmas = <&DIE_NODE(sio) 0x66>; dma-names = "tx"; power-domains = <&DIE_NODE(ps_dpa1)>; - reset-domains = <&DIE_NODE(ps_dpa1)>; status = "disabled"; ports { @@ -392,7 +391,6 @@ dmas = <&DIE_NODE(sio) 0x68>; dma-names = "tx"; power-domains = <&DIE_NODE(ps_dpa2)>; - reset-domains = <&DIE_NODE(ps_dpa2)>; status = "disabled"; ports { @@ -416,7 +414,6 @@ dmas = <&DIE_NODE(sio) 0x6a>; dma-names = "tx"; power-domains = <&DIE_NODE(ps_dpa3)>; - reset-domains = <&DIE_NODE(ps_dpa3)>; status = "disabled"; ports { @@ -437,7 +434,6 @@ dmas = <&DIE_NODE(sio) 0x6c>; dma-names = "tx"; power-domains = <&DIE_NODE(ps_dpa4)>; - reset-domains = <&DIE_NODE(ps_dpa4)>; status = "disabled"; ports { diff --git a/arch/arm64/boot/dts/apple/t602x-nvme.dtsi b/arch/arm64/boot/dts/apple/t602x-nvme.dtsi index 3ca48ed070473..d1f4267a6cd20 100644 --- a/arch/arm64/boot/dts/apple/t602x-nvme.dtsi +++ b/arch/arm64/boot/dts/apple/t602x-nvme.dtsi @@ -27,7 +27,7 @@ }; DIE_NODE(nvme): nvme@34bcc0000 { - compatible = "apple,t6020-nvme-ans2", "apple,t8103-nvme-ans2", "apple,nvme-ans2"; + compatible = "apple,t6020-nvme-ans2", "apple,t8103-nvme-ans2"; reg = <0x3 0x4bcc0000 0x0 0x40000>, <0x3 0x47400000 0x0 0x4000>; reg-names = "nvme", "ans"; interrupt-parent = <&aic>; diff --git a/arch/arm64/boot/dts/apple/t602x-pmgr.dtsi b/arch/arm64/boot/dts/apple/t602x-pmgr.dtsi index fffd0ad79b9bb..81afb5ae0c9f9 100644 --- a/arch/arm64/boot/dts/apple/t602x-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t602x-pmgr.dtsi @@ -7,7 +7,7 @@ &DIE_NODE(pmgr) { DIE_NODE(ps_afi): power-controller@100 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x100 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -16,7 +16,7 @@ }; DIE_NODE(ps_aic): power-controller@108 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x108 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -25,7 +25,7 @@ }; DIE_NODE(ps_dwi): power-controller@110 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x110 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -33,7 +33,7 @@ }; DIE_NODE(ps_pms): power-controller@118 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x118 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -42,7 +42,7 @@ }; DIE_NODE(ps_gpio): power-controller@120 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x120 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -51,7 +51,7 @@ }; DIE_NODE(ps_soc_dpe): power-controller@128 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x128 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -60,7 +60,7 @@ }; DIE_NODE(ps_pms_c1ppt): power-controller@130 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x130 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -69,7 +69,7 @@ }; DIE_NODE(ps_pmgr_soc_ocla): power-controller@138 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x138 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -78,7 +78,7 @@ }; DIE_NODE(ps_amcc0): power-controller@168 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x168 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -87,7 +87,7 @@ }; DIE_NODE(ps_amcc2): power-controller@170 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x170 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -96,7 +96,7 @@ }; DIE_NODE(ps_dcs_00): power-controller@178 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x178 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -105,7 +105,7 @@ }; DIE_NODE(ps_dcs_01): power-controller@180 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x180 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -114,7 +114,7 @@ }; DIE_NODE(ps_dcs_02): power-controller@188 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x188 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -123,7 +123,7 @@ }; DIE_NODE(ps_dcs_03): power-controller@190 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x190 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -132,7 +132,7 @@ }; DIE_NODE(ps_dcs_08): power-controller@198 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x198 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -141,7 +141,7 @@ }; DIE_NODE(ps_dcs_09): power-controller@1a0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1a0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -150,7 +150,7 @@ }; DIE_NODE(ps_dcs_10): power-controller@1a8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1a8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -159,7 +159,7 @@ }; DIE_NODE(ps_dcs_11): power-controller@1b0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1b0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -168,7 +168,7 @@ }; DIE_NODE(ps_afnc1_ioa): power-controller@1b8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1b8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -178,7 +178,7 @@ }; DIE_NODE(ps_afc): power-controller@1d0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1d0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -187,7 +187,7 @@ }; DIE_NODE(ps_afnc0_ioa): power-controller@1e8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1e8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -197,7 +197,7 @@ }; DIE_NODE(ps_afnc1_ls): power-controller@1f0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1f0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -207,7 +207,7 @@ }; DIE_NODE(ps_afnc0_ls): power-controller@1f8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1f8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -217,7 +217,7 @@ }; DIE_NODE(ps_afnc1_lw0): power-controller@200 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x200 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -227,7 +227,7 @@ }; DIE_NODE(ps_afnc1_lw1): power-controller@208 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x208 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -237,7 +237,7 @@ }; DIE_NODE(ps_afnc1_lw2): power-controller@210 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x210 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -247,7 +247,7 @@ }; DIE_NODE(ps_afnc0_lw0): power-controller@218 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x218 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -257,7 +257,7 @@ }; DIE_NODE(ps_scodec): power-controller@220 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x220 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -266,7 +266,7 @@ }; DIE_NODE(ps_atc0_common): power-controller@228 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x228 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -275,7 +275,7 @@ }; DIE_NODE(ps_atc1_common): power-controller@230 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x230 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -284,7 +284,7 @@ }; DIE_NODE(ps_atc2_common): power-controller@238 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x238 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -293,7 +293,7 @@ }; DIE_NODE(ps_atc3_common): power-controller@240 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x240 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -302,7 +302,7 @@ }; DIE_NODE(ps_dispext1_sys): power-controller@248 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x248 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -311,7 +311,7 @@ }; DIE_NODE(ps_pms_bridge): power-controller@250 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x250 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -321,7 +321,7 @@ }; DIE_NODE(ps_dispext0_sys): power-controller@258 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x258 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -330,7 +330,7 @@ }; DIE_NODE(ps_ane_sys): power-controller@260 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x260 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -339,7 +339,7 @@ }; DIE_NODE(ps_avd_sys): power-controller@268 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x268 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -348,7 +348,7 @@ }; DIE_NODE(ps_atc0_cio): power-controller@270 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x270 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -357,7 +357,7 @@ }; DIE_NODE(ps_atc0_pcie): power-controller@278 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x278 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -369,7 +369,7 @@ }; DIE_NODE(ps_atc1_cio): power-controller@280 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x280 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -378,7 +378,7 @@ }; DIE_NODE(ps_atc1_pcie): power-controller@288 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x288 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -390,7 +390,7 @@ }; DIE_NODE(ps_atc2_cio): power-controller@290 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x290 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -399,7 +399,7 @@ }; DIE_NODE(ps_atc2_pcie): power-controller@298 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x298 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -411,7 +411,7 @@ }; DIE_NODE(ps_atc3_cio): power-controller@2a0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2a0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -420,7 +420,7 @@ }; DIE_NODE(ps_atc3_pcie): power-controller@2a8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2a8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -432,7 +432,7 @@ }; DIE_NODE(ps_dispext1_fe): power-controller@2b0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2b0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -441,7 +441,7 @@ }; DIE_NODE(ps_dispext1_cpu0): power-controller@2b8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2b8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -451,7 +451,7 @@ }; DIE_NODE(ps_dispext0_fe): power-controller@2c0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2c0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -461,7 +461,7 @@ /* PMP is only present on die 0 of the M2 Ultra */ DIE_NODE(ps_pmp): power-controller@2c8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2c8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -470,7 +470,7 @@ }; DIE_NODE(ps_pms_sram): power-controller@2d0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2d0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -479,7 +479,7 @@ }; DIE_NODE(ps_dispext0_cpu0): power-controller@2d8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2d8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -489,7 +489,7 @@ }; DIE_NODE(ps_ane_cpu): power-controller@2e0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2e0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -498,7 +498,7 @@ }; DIE_NODE(ps_atc0_cio_pcie): power-controller@2e8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2e8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -507,7 +507,7 @@ }; DIE_NODE(ps_atc0_cio_usb): power-controller@2f0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2f0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -516,7 +516,7 @@ }; DIE_NODE(ps_atc1_cio_pcie): power-controller@2f8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2f8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -525,7 +525,7 @@ }; DIE_NODE(ps_atc1_cio_usb): power-controller@300 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x300 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -534,7 +534,7 @@ }; DIE_NODE(ps_atc2_cio_pcie): power-controller@308 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x308 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -543,7 +543,7 @@ }; DIE_NODE(ps_atc2_cio_usb): power-controller@310 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x310 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -552,7 +552,7 @@ }; DIE_NODE(ps_atc3_cio_pcie): power-controller@318 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x318 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -561,7 +561,7 @@ }; DIE_NODE(ps_atc3_cio_usb): power-controller@320 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x320 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -570,7 +570,7 @@ }; DIE_NODE(ps_trace_fab): power-controller@390 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x390 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -578,7 +578,7 @@ }; DIE_NODE(ps_ane_sys_mpm): power-controller@4000 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4000 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -587,7 +587,7 @@ }; DIE_NODE(ps_ane_td): power-controller@4008 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4008 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -596,7 +596,7 @@ }; DIE_NODE(ps_ane_base): power-controller@4010 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4010 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -605,7 +605,7 @@ }; DIE_NODE(ps_ane_set1): power-controller@4018 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4018 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -614,7 +614,7 @@ }; DIE_NODE(ps_ane_set2): power-controller@4020 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4020 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -623,7 +623,7 @@ }; DIE_NODE(ps_ane_set3): power-controller@4028 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4028 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -632,7 +632,7 @@ }; DIE_NODE(ps_ane_set4): power-controller@4030 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4030 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -643,7 +643,7 @@ &DIE_NODE(pmgr_south) { DIE_NODE(ps_amcc4): power-controller@100 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x100 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -652,7 +652,7 @@ }; DIE_NODE(ps_amcc5): power-controller@108 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x108 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -661,7 +661,7 @@ }; DIE_NODE(ps_amcc6): power-controller@110 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x110 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -670,7 +670,7 @@ }; DIE_NODE(ps_amcc7): power-controller@118 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x118 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -679,7 +679,7 @@ }; DIE_NODE(ps_dcs_16): power-controller@120 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x120 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -688,7 +688,7 @@ }; DIE_NODE(ps_dcs_17): power-controller@128 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x128 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -697,7 +697,7 @@ }; DIE_NODE(ps_dcs_18): power-controller@130 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x130 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -706,7 +706,7 @@ }; DIE_NODE(ps_dcs_19): power-controller@138 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x138 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -715,7 +715,7 @@ }; DIE_NODE(ps_dcs_20): power-controller@140 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x140 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -724,7 +724,7 @@ }; DIE_NODE(ps_dcs_21): power-controller@148 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x148 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -733,7 +733,7 @@ }; DIE_NODE(ps_dcs_22): power-controller@150 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x150 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -742,7 +742,7 @@ }; DIE_NODE(ps_dcs_23): power-controller@158 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x158 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -751,7 +751,7 @@ }; DIE_NODE(ps_dcs_24): power-controller@160 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x160 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -760,7 +760,7 @@ }; DIE_NODE(ps_dcs_25): power-controller@168 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x168 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -769,7 +769,7 @@ }; DIE_NODE(ps_dcs_26): power-controller@170 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x170 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -778,7 +778,7 @@ }; DIE_NODE(ps_dcs_27): power-controller@178 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x178 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -787,7 +787,7 @@ }; DIE_NODE(ps_dcs_28): power-controller@180 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x180 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -796,7 +796,7 @@ }; DIE_NODE(ps_dcs_29): power-controller@188 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x188 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -805,7 +805,7 @@ }; DIE_NODE(ps_dcs_30): power-controller@190 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x190 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -814,7 +814,7 @@ }; DIE_NODE(ps_dcs_31): power-controller@198 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x198 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -823,7 +823,7 @@ }; DIE_NODE(ps_afnc4_ioa): power-controller@1a0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1a0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -833,7 +833,7 @@ }; DIE_NODE(ps_afnc4_ls): power-controller@1a8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1a8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -843,7 +843,7 @@ }; DIE_NODE(ps_afnc4_lw0): power-controller@1b0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1b0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -853,7 +853,7 @@ }; DIE_NODE(ps_afnc5_ioa): power-controller@1b8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1b8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -863,7 +863,7 @@ }; DIE_NODE(ps_afnc5_ls): power-controller@1c0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1c0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -873,7 +873,7 @@ }; DIE_NODE(ps_afnc5_lw0): power-controller@1c8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1c8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -883,7 +883,7 @@ }; DIE_NODE(ps_dispext2_sys): power-controller@1d0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1d0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -891,7 +891,7 @@ }; DIE_NODE(ps_msr1): power-controller@1d8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1d8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -899,7 +899,7 @@ }; DIE_NODE(ps_dispext2_fe): power-controller@1e0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1e0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -908,7 +908,7 @@ }; DIE_NODE(ps_dispext2_cpu0): power-controller@1e8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1e8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -918,7 +918,7 @@ }; DIE_NODE(ps_msr1_ase_core): power-controller@1f0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1f0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -927,7 +927,7 @@ }; DIE_NODE(ps_dispext3_sys): power-controller@220 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x220 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -935,7 +935,7 @@ }; DIE_NODE(ps_venc1_sys): power-controller@228 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x228 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -943,7 +943,7 @@ }; DIE_NODE(ps_dispext3_fe): power-controller@230 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x230 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -952,7 +952,7 @@ }; DIE_NODE(ps_dispext3_cpu0): power-controller@238 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x238 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -962,7 +962,7 @@ }; DIE_NODE(ps_venc1_dma): power-controller@4000 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4000 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -971,7 +971,7 @@ }; DIE_NODE(ps_venc1_pipe4): power-controller@4008 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4008 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -980,7 +980,7 @@ }; DIE_NODE(ps_venc1_pipe5): power-controller@4010 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4010 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -989,7 +989,7 @@ }; DIE_NODE(ps_venc1_me0): power-controller@4018 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4018 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -998,7 +998,7 @@ }; DIE_NODE(ps_venc1_me1): power-controller@4020 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4020 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1009,7 +1009,7 @@ &DIE_NODE(pmgr_east) { DIE_NODE(ps_clvr_spmi0): power-controller@100 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x100 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1018,7 +1018,7 @@ }; DIE_NODE(ps_clvr_spmi1): power-controller@108 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x108 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1027,7 +1027,7 @@ }; DIE_NODE(ps_clvr_spmi2): power-controller@110 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x110 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1036,7 +1036,7 @@ }; DIE_NODE(ps_clvr_spmi3): power-controller@118 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x118 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1045,7 +1045,7 @@ }; DIE_NODE(ps_clvr_spmi4): power-controller@120 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x120 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1054,7 +1054,7 @@ }; DIE_NODE(ps_ispsens0): power-controller@128 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x128 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1062,7 +1062,7 @@ }; DIE_NODE(ps_ispsens1): power-controller@130 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x130 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1070,7 +1070,7 @@ }; DIE_NODE(ps_ispsens2): power-controller@138 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x138 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1078,7 +1078,7 @@ }; DIE_NODE(ps_ispsens3): power-controller@140 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x140 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1086,7 +1086,7 @@ }; DIE_NODE(ps_afnc6_ioa): power-controller@148 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x148 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1096,7 +1096,7 @@ }; DIE_NODE(ps_afnc6_ls): power-controller@150 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x150 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1106,7 +1106,7 @@ }; DIE_NODE(ps_afnc6_lw0): power-controller@158 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x158 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1116,7 +1116,7 @@ }; DIE_NODE(ps_afnc2_ioa): power-controller@160 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x160 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1126,7 +1126,7 @@ }; DIE_NODE(ps_afnc2_ls): power-controller@168 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x168 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1136,7 +1136,7 @@ }; DIE_NODE(ps_afnc2_lw0): power-controller@170 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x170 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1146,7 +1146,7 @@ }; DIE_NODE(ps_afnc2_lw1): power-controller@178 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x178 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1156,7 +1156,7 @@ }; DIE_NODE(ps_afnc3_ioa): power-controller@180 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x180 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1166,7 +1166,7 @@ }; DIE_NODE(ps_afnc3_ls): power-controller@188 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x188 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1176,7 +1176,7 @@ }; DIE_NODE(ps_afnc3_lw0): power-controller@190 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x190 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1186,7 +1186,7 @@ }; DIE_NODE(ps_apcie_gp): power-controller@198 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x198 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1195,7 +1195,7 @@ }; DIE_NODE(ps_apcie_st): power-controller@1a0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1a0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1204,7 +1204,7 @@ }; DIE_NODE(ps_ans2): power-controller@1a8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1a8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1213,7 +1213,7 @@ }; DIE_NODE(ps_disp0_sys): power-controller@1b0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1b0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1222,7 +1222,7 @@ }; DIE_NODE(ps_jpg): power-controller@1b8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1b8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1231,7 +1231,7 @@ }; DIE_NODE(ps_sio): power-controller@1c0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1c0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1240,7 +1240,7 @@ }; DIE_NODE(ps_isp_sys): power-controller@1c8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1c8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1250,7 +1250,7 @@ }; DIE_NODE(ps_disp0_fe): power-controller@1d0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1d0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1259,7 +1259,7 @@ }; DIE_NODE(ps_disp0_cpu0): power-controller@1d8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1d8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1269,7 +1269,7 @@ }; DIE_NODE(ps_sio_cpu): power-controller@1e0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1e0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1278,7 +1278,7 @@ }; DIE_NODE(ps_fpwm0): power-controller@1e8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1e8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1287,7 +1287,7 @@ }; DIE_NODE(ps_fpwm1): power-controller@1f0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1f0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1296,7 +1296,7 @@ }; DIE_NODE(ps_fpwm2): power-controller@1f8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x1f8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1305,7 +1305,7 @@ }; DIE_NODE(ps_i2c0): power-controller@200 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x200 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1314,7 +1314,7 @@ }; DIE_NODE(ps_i2c1): power-controller@208 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x208 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1323,7 +1323,7 @@ }; DIE_NODE(ps_i2c2): power-controller@210 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x210 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1332,7 +1332,7 @@ }; DIE_NODE(ps_i2c3): power-controller@218 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x218 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1341,7 +1341,7 @@ }; DIE_NODE(ps_i2c4): power-controller@220 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x220 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1350,7 +1350,7 @@ }; DIE_NODE(ps_i2c5): power-controller@228 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x228 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1359,7 +1359,7 @@ }; DIE_NODE(ps_i2c6): power-controller@230 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x230 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1368,7 +1368,7 @@ }; DIE_NODE(ps_i2c7): power-controller@238 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x238 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1377,7 +1377,7 @@ }; DIE_NODE(ps_i2c8): power-controller@240 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x240 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1386,7 +1386,7 @@ }; DIE_NODE(ps_spi_p): power-controller@248 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x248 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1395,7 +1395,7 @@ }; DIE_NODE(ps_sio_spmi0): power-controller@250 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x250 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1404,7 +1404,7 @@ }; DIE_NODE(ps_sio_spmi1): power-controller@258 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x258 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1413,7 +1413,7 @@ }; DIE_NODE(ps_sio_spmi2): power-controller@260 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x260 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1422,7 +1422,7 @@ }; DIE_NODE(ps_uart_p): power-controller@268 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x268 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1431,7 +1431,7 @@ }; DIE_NODE(ps_audio_p): power-controller@270 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x270 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1440,7 +1440,7 @@ }; DIE_NODE(ps_sio_adma): power-controller@278 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x278 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1449,7 +1449,7 @@ }; DIE_NODE(ps_aes): power-controller@280 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x280 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1459,7 +1459,7 @@ }; DIE_NODE(ps_dptx_phy_ps): power-controller@288 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x288 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1468,7 +1468,7 @@ }; DIE_NODE(ps_spi0): power-controller@2d8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2d8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1477,7 +1477,7 @@ }; DIE_NODE(ps_spi1): power-controller@2e0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2e0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1486,7 +1486,7 @@ }; DIE_NODE(ps_spi2): power-controller@2e8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2e8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1495,7 +1495,7 @@ }; DIE_NODE(ps_spi3): power-controller@2f0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2f0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1504,7 +1504,7 @@ }; DIE_NODE(ps_spi4): power-controller@2f8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x2f8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1513,7 +1513,7 @@ }; DIE_NODE(ps_spi5): power-controller@300 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x300 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1522,7 +1522,7 @@ }; DIE_NODE(ps_uart_n): power-controller@308 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x308 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1531,7 +1531,7 @@ }; DIE_NODE(ps_uart0): power-controller@310 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x310 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1540,7 +1540,7 @@ }; DIE_NODE(ps_amcc1): power-controller@318 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x318 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1549,7 +1549,7 @@ }; DIE_NODE(ps_amcc3): power-controller@320 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x320 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1558,7 +1558,7 @@ }; DIE_NODE(ps_dcs_04): power-controller@328 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x328 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1567,7 +1567,7 @@ }; DIE_NODE(ps_dcs_05): power-controller@330 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x330 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1576,7 +1576,7 @@ }; DIE_NODE(ps_dcs_06): power-controller@338 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x338 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1585,7 +1585,7 @@ }; DIE_NODE(ps_dcs_07): power-controller@340 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x340 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1594,7 +1594,7 @@ }; DIE_NODE(ps_dcs_12): power-controller@348 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x348 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1603,7 +1603,7 @@ }; DIE_NODE(ps_dcs_13): power-controller@350 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x350 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1612,7 +1612,7 @@ }; DIE_NODE(ps_dcs_14): power-controller@358 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x358 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1621,7 +1621,7 @@ }; DIE_NODE(ps_dcs_15): power-controller@360 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x360 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1630,7 +1630,7 @@ }; DIE_NODE(ps_uart1): power-controller@368 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x368 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1639,7 +1639,7 @@ }; DIE_NODE(ps_uart2): power-controller@370 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x370 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1648,7 +1648,7 @@ }; DIE_NODE(ps_uart3): power-controller@378 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x378 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1657,7 +1657,7 @@ }; DIE_NODE(ps_uart4): power-controller@380 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x380 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1666,7 +1666,7 @@ }; DIE_NODE(ps_uart5): power-controller@388 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x388 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1675,7 +1675,7 @@ }; DIE_NODE(ps_uart6): power-controller@390 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x390 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1684,7 +1684,7 @@ }; DIE_NODE(ps_mca0): power-controller@398 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x398 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1694,7 +1694,7 @@ }; DIE_NODE(ps_mca1): power-controller@3a0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3a0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1704,7 +1704,7 @@ }; DIE_NODE(ps_mca2): power-controller@3a8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3a8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1714,7 +1714,7 @@ }; DIE_NODE(ps_mca3): power-controller@3b0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3b0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1724,7 +1724,7 @@ }; DIE_NODE(ps_dpa0): power-controller@3b8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3b8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1733,7 +1733,7 @@ }; DIE_NODE(ps_dpa1): power-controller@3c0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3c0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1742,7 +1742,7 @@ }; DIE_NODE(ps_dpa2): power-controller@3c8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3c8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1751,7 +1751,7 @@ }; DIE_NODE(ps_dpa3): power-controller@3d0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3d0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1760,7 +1760,7 @@ }; DIE_NODE(ps_msr0): power-controller@3d8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3d8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1768,7 +1768,7 @@ }; DIE_NODE(ps_venc_sys): power-controller@3e0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3e0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1776,7 +1776,7 @@ }; DIE_NODE(ps_dpa4): power-controller@3e8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3e8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1785,7 +1785,7 @@ }; DIE_NODE(ps_msr0_ase_core): power-controller@3f0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3f0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1794,7 +1794,7 @@ }; DIE_NODE(ps_apcie_gpshr_sys): power-controller@3f8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x3f8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1803,7 +1803,7 @@ }; DIE_NODE(ps_apcie_st_sys): power-controller@408 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x408 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1812,7 +1812,7 @@ }; DIE_NODE(ps_apcie_st1_sys): power-controller@410 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x410 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1821,7 +1821,7 @@ }; DIE_NODE(ps_apcie_gp_sys): power-controller@418 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x418 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1831,7 +1831,7 @@ }; DIE_NODE(ps_apcie_ge_sys): power-controller@420 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x420 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1840,7 +1840,7 @@ }; DIE_NODE(ps_apcie_phy_sw): power-controller@428 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x428 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1849,7 +1849,7 @@ }; DIE_NODE(ps_sep): power-controller@c00 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xc00 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1866,7 +1866,7 @@ * have to enable/disable everything in the per-model DTs. */ DIE_NODE(ps_isp_cpu): power-controller@4000 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4000 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1876,7 +1876,7 @@ }; DIE_NODE(ps_isp_fe): power-controller@4008 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4008 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1885,7 +1885,7 @@ }; DIE_NODE(ps_dprx): power-controller@4010 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4010 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1894,7 +1894,7 @@ }; DIE_NODE(ps_isp_vis): power-controller@4018 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4018 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1903,7 +1903,7 @@ }; DIE_NODE(ps_isp_be): power-controller@4020 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4020 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1912,7 +1912,7 @@ }; DIE_NODE(ps_isp_raw): power-controller@4028 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4028 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1921,7 +1921,7 @@ }; DIE_NODE(ps_isp_clr): power-controller@4030 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x4030 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1930,7 +1930,7 @@ }; DIE_NODE(ps_venc_dma): power-controller@8000 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x8000 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1939,7 +1939,7 @@ }; DIE_NODE(ps_venc_pipe4): power-controller@8008 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x8008 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1948,7 +1948,7 @@ }; DIE_NODE(ps_venc_pipe5): power-controller@8010 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x8010 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1957,7 +1957,7 @@ }; DIE_NODE(ps_venc_me0): power-controller@8018 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x8018 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1966,7 +1966,7 @@ }; DIE_NODE(ps_venc_me1): power-controller@8020 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x8020 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1975,7 +1975,7 @@ }; DIE_NODE(ps_prores): power-controller@c000 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xc000 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1986,7 +1986,7 @@ &DIE_NODE(pmgr_mini) { DIE_NODE(ps_debug): power-controller@58 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x58 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -1995,7 +1995,7 @@ }; DIE_NODE(ps_nub_spmi0): power-controller@60 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x60 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2004,7 +2004,7 @@ }; DIE_NODE(ps_nub_spmi1): power-controller@68 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x68 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2013,7 +2013,7 @@ }; DIE_NODE(ps_nub_aon): power-controller@70 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x70 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2022,7 +2022,7 @@ }; DIE_NODE(ps_msg): power-controller@78 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x78 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2031,7 +2031,7 @@ }; DIE_NODE(ps_nub_gpio): power-controller@80 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x80 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2040,7 +2040,7 @@ }; DIE_NODE(ps_nub_fabric): power-controller@88 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x88 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2049,7 +2049,7 @@ }; DIE_NODE(ps_atc0_usb_aon): power-controller@90 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x90 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2058,7 +2058,7 @@ }; DIE_NODE(ps_atc1_usb_aon): power-controller@98 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x98 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2067,7 +2067,7 @@ }; DIE_NODE(ps_atc2_usb_aon): power-controller@a0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xa0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2076,7 +2076,7 @@ }; DIE_NODE(ps_atc3_usb_aon): power-controller@a8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xa8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2085,7 +2085,7 @@ }; DIE_NODE(ps_mtp_fabric): power-controller@b0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xb0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2096,7 +2096,7 @@ }; DIE_NODE(ps_nub_sram): power-controller@b8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xb8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2105,7 +2105,7 @@ }; DIE_NODE(ps_debug_switch): power-controller@c0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xc0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2114,7 +2114,7 @@ }; DIE_NODE(ps_atc0_usb): power-controller@c8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xc8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2123,7 +2123,7 @@ }; DIE_NODE(ps_atc1_usb): power-controller@d0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xd0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2132,7 +2132,7 @@ }; DIE_NODE(ps_atc2_usb): power-controller@d8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xd8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2141,7 +2141,7 @@ }; DIE_NODE(ps_atc3_usb): power-controller@e0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xe0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2152,7 +2152,7 @@ #if 0 /* MTP stuff is self-managed */ DIE_NODE(ps_mtp_gpio): power-controller@e8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xe8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2162,7 +2162,7 @@ }; DIE_NODE(ps_mtp_base): power-controller@f0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xf0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2172,7 +2172,7 @@ }; DIE_NODE(ps_mtp_periph): power-controller@f8 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0xf8 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2182,7 +2182,7 @@ }; DIE_NODE(ps_mtp_spi0): power-controller@100 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x100 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2192,7 +2192,7 @@ }; DIE_NODE(ps_mtp_i2cm0): power-controller@108 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x108 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2202,7 +2202,7 @@ }; DIE_NODE(ps_mtp_uart0): power-controller@110 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x110 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2212,7 +2212,7 @@ }; DIE_NODE(ps_mtp_cpu): power-controller@118 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x118 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2222,7 +2222,7 @@ }; DIE_NODE(ps_mtp_scm_fabric): power-controller@120 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x120 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2232,7 +2232,7 @@ }; DIE_NODE(ps_mtp_sram): power-controller@128 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x128 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2242,7 +2242,7 @@ }; DIE_NODE(ps_mtp_dma): power-controller@130 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x130 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2255,7 +2255,7 @@ &DIE_NODE(pmgr_gfx) { DIE_NODE(ps_gpx): power-controller@0 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x0 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2265,7 +2265,7 @@ }; DIE_NODE(ps_afr): power-controller@100 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x100 4>; #power-domain-cells = <0>; #reset-cells = <0>; @@ -2275,7 +2275,7 @@ }; DIE_NODE(ps_gfx): power-controller@108 { - compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate", "apple,pmgr-pwrstate"; + compatible = "apple,t6020-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; reg = <0x108 4>; #power-domain-cells = <0>; #reset-cells = <0>; diff --git a/arch/arm64/boot/dts/apple/t6040-j616s.dts b/arch/arm64/boot/dts/apple/t6040-j616s.dts index 087a1e96316e8..32f589aa2971f 100644 --- a/arch/arm64/boot/dts/apple/t6040-j616s.dts +++ b/arch/arm64/boot/dts/apple/t6040-j616s.dts @@ -26,6 +26,30 @@ brcm,board-type = "apple,hostomel"; }; +&smc { + smc_gpio_low: gpio-low { + compatible = "apple,smc-low-gpio"; + gpio-controller; + #gpio-cells = <2>; + apple,output-templates = <0xe 0x00800000>; + }; +}; + +&aop_spmi0 { + status = "okay"; + + stockholm: nfc@9 { + compatible = "apple,stockholm-nci"; + reg = <9 SPMI_USID>; + interrupt-parent = <&aop_spmi0>; + interrupts = <229 IRQ_TYPE_EDGE_RISING>, + <230 IRQ_TYPE_EDGE_RISING>, + <227 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "host-wake", "data-ready", "error"; + enable-gpios = <&smc_gpio_low 0xe GPIO_ACTIVE_HIGH>; + }; +}; + &panel { compatible = "apple,panel-j616", "apple,panel-mini-led", "apple,panel"; width-mm = <345>; @@ -80,3 +104,52 @@ &jpeg1 { status = "okay"; }; + + +&i2c4 { + sd_card_control: card-control@20 { + compatible = "apple,t6041-sd-card-control", "apple,sd-card-control"; + reg = <0x20>; + status = "disabled"; + }; +}; + +&i2c8 { + display_pcon: display-converter@8 { + compatible = "apple,t6041-display-pcon", "apple,display-pcon"; + reg = <0x8>; + status = "disabled"; + }; +}; + +&spi4 { + tcon: panel-controller@0 { + compatible = "parade,dp855"; + reg = <0>; + status = "disabled"; + + /* ADT display-temp-sens1..3 are downstream of the TCON. */ + i2c { + #address-cells = <1>; + #size-cells = <0>; + + temperature-sensor@70 { + compatible = "ti,tmp103"; + reg = <0x70>; + status = "disabled"; + }; + + temperature-sensor@71 { + compatible = "ti,tmp103"; + reg = <0x71>; + status = "disabled"; + }; + + temperature-sensor@72 { + compatible = "ti,tmp103"; + reg = <0x72>; + status = "disabled"; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi b/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi new file mode 100644 index 0000000000000..3cddc40aac79a --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6040-peripherals.dtsi @@ -0,0 +1,351 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT +/* + * Structural hardware resources from the board's saved Apple Device Tree. + * Keep unqualified blocks disabled: describing them does not transfer + * ownership from firmware or make their registers safe to access. + */ + +/ { + soc: soc { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + nonposted-mmio; + }; +}; + +&soc { + /* ADT /arm-io/dwi. */ + dwi: dwi@5029b0000 { + compatible = "apple,t6041-dwi", "apple,dwi"; + reg = <0x5 0x029b0000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_dwi>; + status = "disabled"; + }; + + /* ADT /arm-io/aes. */ + aes: crypto@42900c000 { + compatible = "apple,t6041-aes", "apple,aes"; + reg = <0x4 0x2900c000 0x0 0x4000>, + <0x5 0x08340000 0x0 0x8000>, + <0x5 0x08090000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_aes>; + iommus = <&sio_dart 1>; + status = "disabled"; + }; + + /* ADT /arm-io/aon-ptd. */ + aon_ptd: aon-ptd@50cdc0000 { + compatible = "apple,t6041-aon-ptd", "apple,aon-ptd"; + reg = <0x5 0x0cdc0000 0x0 0x4000>, + <0x5 0x0cdd0000 0x0 0x4000>, + <0x5 0x0cdd8000 0x0 0x4000>, + <0x5 0x0cde0000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + status = "disabled"; + }; + + /* ADT /arm-io/scaler0. */ + scaler0: scaler@521000000 { + compatible = "apple,t6041-scaler", "apple,scaler"; + reg = <0x5 0x21000000 0x0 0x38000>, + <0x5 0x21210000 0x0 0x4000>, + <0x5 0x21204000 0x0 0x4000>, + <0x5 0x20000000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = , + ; + power-domains = <&ps_msr0>, + <&ps_msr0_ase_core>; + iommus = <&scaler0_dart 0>, + <&scaler0_dart 1>; + clocks = <&peripheral_clocks 417>; + resets = <&ps_msr0>; + status = "disabled"; + }; + + /* ADT /arm-io/aic-timebase. */ + aic_timebase: aic-timebase@502580000 { + compatible = "apple,t6041-aic-timebase", "apple,aic-timebase"; + reg = <0x5 0x02580000 0x0 0x1000>; + status = "disabled"; + }; + + /* ADT /arm-io/dbgCPU. */ + cpu_debug: cpu-debug@508700000 { + compatible = "apple,t6041-cpu-debug", "apple,cpu-debug"; + reg = <0x5 0x08700000 0x0 0x28000>, + <0x5 0x085c0000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/apcie0-piodma. */ + apcie0_piodma: dma@410030000 { + compatible = "apple,t6041-pcie-piodma", "apple,pcie-piodma"; + reg = <0x4 0x10030000 0x0 0x4000>, + <0x4 0x10034000 0x0 0x4000>, + <0x4 0x10038000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&pcie_dart 17>; + status = "disabled"; + }; + + /* ADT /arm-io/apcie1-piodma. */ + apcie1_piodma: dma@411030000 { + compatible = "apple,t6041-pcie-piodma", "apple,pcie-piodma"; + reg = <0x4 0x11030000 0x0 0x4000>, + <0x4 0x11034000 0x0 0x4000>, + <0x4 0x11038000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apcie1_dart 17>; + status = "disabled"; + }; + + /* ADT /arm-io/apciec0-piodma. */ + apciec0_piodma: dma@384068000 { + compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; + reg = <0x3 0x84068000 0x0 0x4000>, + <0x3 0x8406c000 0x0 0x4000>, + <0x3 0x84070000 0x0 0x4000>, + <0x3 0x8403c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apciec0_dart 254>; + status = "disabled"; + }; + + /* ADT /arm-io/apciec1-piodma. */ + apciec1_piodma: dma@38c068000 { + compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; + reg = <0x3 0x8c068000 0x0 0x4000>, + <0x3 0x8c06c000 0x0 0x4000>, + <0x3 0x8c070000 0x0 0x4000>, + <0x3 0x8c03c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apciec1_dart 254>; + status = "disabled"; + }; + + /* ADT /arm-io/apciec2-piodma. */ + apciec2_piodma: dma@394068000 { + compatible = "apple,t6041-pciec-piodma", "apple,pciec-piodma"; + reg = <0x3 0x94068000 0x0 0x4000>, + <0x3 0x9406c000 0x0 0x4000>, + <0x3 0x94070000 0x0 0x4000>, + <0x3 0x9403c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&apciec2_dart 254>; + status = "disabled"; + }; + + /* ADT /arm-io/apr0. */ + apr0: video-codec@301000000 { + compatible = "apple,t6041-prores", "apple,prores"; + reg = <0x3 0x01000000 0x0 0x4000>, + <0x3 0x00000000 0x0 0x1000000>, + <0x3 0x010c0000 0x0 0x4000>; + reg-names = "core", "wrapper", "aux"; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_scodec>; + iommus = <&apr0_dart 1>; + resets = <&ps_scodec>; + status = "disabled"; + }; + + /* ADT /arm-io/atc0-dpin0. */ + atc0_dpin0: dpin@381e50000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x81e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/atc0-dpin1. */ + atc0_dpin1: dpin@381e58000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x81e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/atc1-dpin0. */ + atc1_dpin0: dpin@389e50000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x89e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/atc1-dpin1. */ + atc1_dpin1: dpin@389e58000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x89e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/atc2-dpin0. */ + atc2_dpin0: dpin@391e50000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x91e50000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + /* ADT /arm-io/atc2-dpin1. */ + atc2_dpin1: dpin@391e58000 { + compatible = "apple,t6041-dpin", "apple,dpin"; + reg = <0x3 0x91e58000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + + + + /* Clock IDs are SoC hardware selectors, not ADT phandles. */ + peripheral_clocks: clock-controller@502800000 { + compatible = "apple,t6041-pmgr-clocks", "apple,pmgr-clocks"; + /* ADT /arm-io/pmgr register banks, in hardware-description order. */ + reg = <0x5 0x02800000 0x0 0x1e0000>, + <0x5 0x08300000 0x0 0x80000>, + <0x5 0x02280000 0x0 0x100000>, + <0x5 0x00000000 0x0 0x80000>, + <0x5 0x08200000 0x0 0x80000>, + <0x5 0x08004000 0x0 0x1000>, + <0x2 0x10e20000 0x0 0x2000>, + <0x2 0x10050000 0x0 0xef1000>, + <0x2 0x10e40000 0x0 0x9000>, + <0x2 0x10e50000 0x0 0xe81000>, + <0x2 0x10e70000 0x0 0x1000>, + <0x2 0x10050000 0x0 0x10000>, + <0x2 0x10150000 0x0 0x10000>, + <0x2 0x10250000 0x0 0x10000>, + <0x2 0x10350000 0x0 0x10000>, + <0x2 0x11e20000 0x0 0x2000>, + <0x2 0x11050000 0x0 0xef1000>, + <0x2 0x11e40000 0x0 0xb000>, + <0x2 0x11e50000 0x0 0xe81000>, + <0x2 0x11e70000 0x0 0x1000>, + <0x2 0x11050000 0x0 0x10000>, + <0x2 0x11150000 0x0 0x10000>, + <0x2 0x11250000 0x0 0x10000>, + <0x2 0x11350000 0x0 0x10000>, + <0x2 0x11450000 0x0 0x10000>, + <0x2 0x11550000 0x0 0x10000>, + <0x2 0x12e20000 0x0 0x2000>, + <0x2 0x12050000 0x0 0xef1000>, + <0x2 0x12e40000 0x0 0xb000>, + <0x2 0x12e50000 0x0 0xe81000>, + <0x2 0x12e70000 0x0 0x1000>, + <0x2 0x12050000 0x0 0x10000>, + <0x2 0x12150000 0x0 0x10000>, + <0x2 0x12250000 0x0 0x10000>, + <0x2 0x12350000 0x0 0x10000>, + <0x2 0x12450000 0x0 0x10000>, + <0x2 0x12550000 0x0 0x10000>, + <0x5 0x02800000 0x0 0x18000>, + <0x5 0x0282c000 0x0 0x4000>, + <0x5 0x02850000 0x0 0x4000>, + <0x5 0x02880000 0x0 0x1c000>, + <0x5 0x02900000 0x0 0x24000>, + <0x5 0x028f0000 0x0 0x4000>, + <0x5 0x028e0000 0x0 0x4000>, + <0x5 0x02820000 0x0 0x4000>, + <0x5 0x08330000 0x0 0x10000>, + <0x5 0x08374000 0x0 0x4000>, + <0x5 0x08360000 0x0 0x4000>, + <0x5 0x00200000 0x0 0x8000>, + <0x5 0x00400000 0x0 0x34000>, + <0x5 0x003c0000 0x0 0x30000>, + <0x5 0x08800000 0x0 0xa8000>, + <0x4 0x85878000 0x0 0x4000>, + <0x2 0x88eb0000 0x0 0x4000>, + <0x2 0x88e80000 0x0 0x30000>, + <0x5 0x08900000 0x0 0x18000>, + <0x5 0x00210000 0x0 0x8000>, + <0x5 0x0020c000 0x0 0x4000>, + <0x5 0x08004000 0x0 0x1000>, + <0x5 0x0007a000 0x0 0x4000>, + <0x5 0x04000000 0x0 0x1000000>, + <0x2 0x88e1c000 0x0 0x4000>, + <0x5 0x022a0000 0x0 0x4000>; + #clock-cells = <1>; + apple,pmgr = <&pmgr>; + status = "disabled"; + }; +}; + +&aon_ptd { + interrupt-controller; + #interrupt-cells = <1>; + #address-cells = <0>; +}; + +&nub_spmi0 { + battery_monitor: battery-monitor@b { + compatible = "apple,t6041-battery-monitor", "apple,battery-monitor"; + reg = <0xb SPMI_USID>; + interrupt-parent = <&aon_ptd>; + interrupts = <0x62746d30>, <0x62746d31>; + status = "disabled"; + }; +}; + +&aop_spmi0 { + radio_pmu: pmic@e { + compatible = "apple,t6041-radio-pmu", "apple,radio-pmu"; + reg = <0xe SPMI_USID>; + status = "disabled"; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6040.dtsi b/arch/arm64/boot/dts/apple/t6040.dtsi index 38dc7888509fd..c901f331bc03e 100644 --- a/arch/arm64/boot/dts/apple/t6040.dtsi +++ b/arch/arm64/boot/dts/apple/t6040.dtsi @@ -6,6 +6,7 @@ */ #include "t604x.dtsi" +#include "t6040-peripherals.dtsi" /* The M4 Pro has five cores in each P cluster. */ /delete-node/ &cpu_p05; diff --git a/arch/arm64/boot/dts/apple/t604x.dtsi b/arch/arm64/boot/dts/apple/t604x.dtsi index 93a595a057f24..091adfdfda6df 100644 --- a/arch/arm64/boot/dts/apple/t604x.dtsi +++ b/arch/arm64/boot/dts/apple/t604x.dtsi @@ -2386,7 +2386,10 @@ reg = <0x5 0x10914000 0x0 0x100>; #address-cells = <2>; #size-cells = <0>; - /* Shared with AOP firmware; no AP bus ownership handoff yet. */ + #interrupt-cells = <2>; + interrupt-controller; + interrupt-parent = <&aic>; + interrupts = ; status = "disabled"; }; diff --git a/arch/arm64/boot/dts/apple/t8103-j456.dts b/arch/arm64/boot/dts/apple/t8103-j456.dts index 740d6783d36c4..ca3499abc17a1 100644 --- a/arch/arm64/boot/dts/apple/t8103-j456.dts +++ b/arch/arm64/boot/dts/apple/t8103-j456.dts @@ -19,6 +19,7 @@ aliases { ethernet0 = ðernet0; + sep = &sep; }; }; diff --git a/arch/arm64/boot/dts/apple/t8103-j457.dts b/arch/arm64/boot/dts/apple/t8103-j457.dts index 5b0505e97d843..5933913088bca 100644 --- a/arch/arm64/boot/dts/apple/t8103-j457.dts +++ b/arch/arm64/boot/dts/apple/t8103-j457.dts @@ -19,6 +19,7 @@ aliases { ethernet0 = ðernet0; + sep = &sep; }; }; diff --git a/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi b/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi new file mode 100644 index 0000000000000..f510a2be2ead4 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi @@ -0,0 +1,652 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple MacBook Air (13-inch and 15-inch, M4, 2025) + * + * The parts the J713 and J715 share. Their ADTs differ in the panel, the + * speakers, the radio's firmware island and the ATC PHY trims; the J715 + * overrides the last two, and each board adds its own panel, speakers and + * firmware names. + * + * Copyright The Asahi Linux Contributors + */ + +#include "t8132-j713-pmgr.dtsi" +#include +#include +#include +#include + +/ { + aliases { + sep = &sep; + ans = &nvme; + ans-mbox = &ans_mbox; + atcphy0 = &atcphy0; + atcphy1 = &atcphy1; + bluetooth0 = &bluetooth0; + keyboard = &keyboard; + nvram = &nvram; + pmu-primary = &pmic1; + pmp = &pmp; + sart-ans = &sart; + spmi-primary = &nub_spmi; + wifi0 = &wifi0; + }; + + chosen { + linux-enablement-mac,disk-boot; + linux-enablement-mac,dapf-handoff = "/arm-io/aop", "/arm-io/mtp", + "/arm-io/pmp"; + linux-enablement-mac,dapf-power-on-handoff = "/arm-io/pmp"; + }; + + led-controller { + compatible = "pwm-leds"; + led-0 { + pwms = <&fpwm1 0 40000>; + label = "kbd_backlight"; + function = LED_FUNCTION_KBD_BACKLIGHT; + color = ; + max-brightness = <255>; + default-state = "keep"; + }; + }; + + reserved-memory { + /* + * iBoot loads the ISP firmware outside the kernel's memory, at + * addresses that move with the boot firmware. The boot loader + * fills these placeholders from the ADT's isp segment-ranges: reg, + * and iommu-addresses where the firmware runs them, from + * 0x100_0000_0000 on. The driver checks that the coprocessor's + * reset vector is this text before it starts the firmware. + */ + isp_fw_text: isp-firmware-text { }; + + isp_fw_data: isp-firmware-data { }; + + /* the firmware's 20 MiB main memory, the driver allocates above it */ + isp_heap: isp-heap { + iommu-addresses = <&isp 0x100 0x0 0x0 0x1400000>; + }; + }; + + /* + * The boot NOR runs from a PMU rail that is on whenever the SoC is + * and that no OS switches. The ADT gives the flash no supply. + */ + nor_flash_vcc: regulator-nor-flash-vcc { + compatible = "regulator-fixed"; + regulator-name = "nor-flash-vcc"; + regulator-always-on; + }; +}; + +/* + * The boot loader enables the ISP and its DARTs once it has filled the + * firmware placeholders and set apple,platform-id, the ADT isp node's + * sensor-type (neither ADT has a cam-connections-scheme). + */ +&isp { + memory-region = <&isp_fw_text>, <&isp_fw_data>, <&isp_heap>; + memory-region-names = "text", "data", "heap"; + + /* The front camera, an IMX958: configuration 5, as on the J616s. */ + sensor-presets { + /* 1920x1080 */ + preset0 { + apple,config-index = <5>; + apple,input-size = <1920 2160>; + apple,output-size = <1920 1080>; + apple,crop = <0 0 1920 1080>; + }; + /* 1280x720 */ + preset1 { + apple,config-index = <5>; + apple,input-size = <1920 2160>; + apple,output-size = <1280 720>; + apple,crop = <0 0 1280 720>; + }; + }; +}; + +/* + * m1n1 programs the AOP DART's DAPF and reserves the firmware segments and + * the DAPF windows in memory-region when /chosen asks for the AOP's handoff, + * or disables the AOP. + */ +&aop { + status = "okay"; +}; + +&aop_audio { + /* + * The microphones on LEAP; the speakers and their sense on base-ns TX0 + * and RX0 (the J616s stream: six playback and twelve sense slots; the + * J713's four amps take the first four and eight, the J715's six all + * of them), the jack on TX2 and RX2. + */ + dmas = <&admac0 1>, <&admac1 0>, <&admac1 1>, <&admac1 4>, <&admac1 5>; + dma-names = "dma", "spkr", "sense", "cout", "cin"; +}; + +/* + * The CS42L84 headphone codec (ADT /arm-io/i2c1/audio-codec-output at 0x4b). + * Its reset line is nub GPIO 17, driven high to run the codec; its interrupt + * is AP GPIO 98, level low. The AOP firmware runs the jack's stream. + */ +&i2c1 { + status = "okay"; + + jack_codec: codec@4b { + compatible = "cirrus,cs42l84"; + reg = <0x4b>; + reset-gpios = <&pinctrl_nub 17 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <0>; + interrupts-extended = <&pinctrl_ap 98 IRQ_TYPE_LEVEL_LOW>; + sound-name-prefix = "Jack"; + }; +}; + +&aop_dart { + status = "okay"; +}; + +&aop_mbox { + status = "okay"; + /* A periodic report need not wake the system. */ + apple,hold-rx-in-sleep; +}; + +&admac0 { + status = "okay"; +}; + +&admac1 { + status = "okay"; +}; + +/* Enable DVFS only with the board thermal owner. */ +&cpufreq_e { + status = "okay"; +}; + +&cpufreq_p { + status = "okay"; +}; + +&cpuidle { + status = "okay"; +}; + +&qspi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + vcc-supply = <&nor_flash_vcc>; + spi-rx-bus-width = <1>; + spi-tx-bus-width = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + nvram: partition@700000 { + label = "nvram"; + /* ADT /arm-io/qspi/spinor/anvram, flash-relative. */ + reg = <0x700000 0x100000>; + }; + }; + }; +}; + +/* + * m1n1 performs the T8132 controller and PHY initialization. Linux adopts + * the trained link and owns DART stream 16, RID-to-SID routing and MSI. + * + * The DART fault interrupt is taken from the ADT, independently of + * the PCIe port and MSI interrupts. + */ +&nub_spmi_a0 { + status = "okay"; + hpm1: usb-pd@a { + compatible = "apple,t8132-sn201202x", "apple,sn201202x"; + reg = <0xa SPMI_USID>; + interrupts = <37 IRQ_TYPE_EDGE_RISING>, + <43 IRQ_TYPE_EDGE_RISING>, + <45 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "irq", "sleep", "wake"; + wakeup-source; + + typec1: connector { + compatible = "usb-c-connector"; + label = "USB-C MagSafe-adjacent"; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + typec1_connector_hs: endpoint { + remote-endpoint = <&dwc3_1_hs>; + }; + }; + + port@1 { + reg = <1>; + typec1_connector_ss: endpoint { + remote-endpoint = <&atcphy1_typec_lanes>; + }; + }; + }; + }; + }; + hpm0: usb-pd@c { + compatible = "apple,t8132-sn201202x", "apple,sn201202x"; + reg = <0xc SPMI_USID>; + interrupts = <11 IRQ_TYPE_EDGE_RISING>, + <17 IRQ_TYPE_EDGE_RISING>, + <19 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "irq", "sleep", "wake"; + wakeup-source; + + typec0: connector { + compatible = "usb-c-connector"; + label = "USB-C native client"; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + typec0_connector_hs: endpoint { + remote-endpoint = <&dwc3_0_hs>; + }; + }; + + port@1 { + reg = <1>; + typec0_connector_ss: endpoint { + remote-endpoint = <&atcphy0_typec_lanes>; + }; + }; + }; + }; + }; +}; + +&pmp_dart { + status = "okay"; +}; + +&pmp_report { + status = "okay"; +}; + +&pmp_mbox { + status = "okay"; +}; + +&atcphy0 { + status = "okay"; + /* Leave the display crossbar at core + 0x4c000 to its own driver. */ + reg = <0x4 0x02a90000 0x0 0x4000>, + <0x4 0x02a84000 0x0 0x4000>, + <0x4 0x03000000 0x0 0x24000>, + <0x4 0x00000000 0x0 0x8000>, + <0x4 0x00020000 0x0 0x4000>, + <0x4 0x03044000 0x0 0x4000>, + <0x4 0x03050000 0x0 0x4000>; + reg-names = "usb2phy", "pipehandler", "core", "axi2af", "lioa", + "fabric", "common-config"; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + atcphy0_typec_lanes: endpoint { + remote-endpoint = <&typec0_connector_ss>; + }; + }; + }; +}; + +&dwc3_0_dart_0 { + status = "okay"; +}; + +&dwc3_0_dart_1 { + status = "okay"; +}; + +&dwc3_0 { + status = "okay"; + dr_mode = "host"; + maximum-speed = "super-speed"; + phys = <&atcphy0 PHY_TYPE_USB2>, <&atcphy0 PHY_TYPE_USB3>; + phy-names = "usb2-phy", "usb3-phy"; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dwc3_0_hs: endpoint { + remote-endpoint = <&typec0_connector_hs>; + }; + }; + }; +}; + +&atcphy1 { + status = "okay"; + /* Leave the display crossbar at core + 0x4c000 to its own driver. */ + reg = <0x4 0x0aa90000 0x0 0x4000>, + <0x4 0x0aa84000 0x0 0x4000>, + <0x4 0x0b000000 0x0 0x24000>, + <0x4 0x08000000 0x0 0x8000>, + <0x4 0x08020000 0x0 0x4000>, + <0x4 0x0b044000 0x0 0x4000>, + <0x4 0x0b050000 0x0 0x4000>; + reg-names = "usb2phy", "pipehandler", "core", "axi2af", "lioa", + "fabric", "common-config"; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + atcphy1_typec_lanes: endpoint { + remote-endpoint = <&typec1_connector_ss>; + }; + }; + }; +}; + +&dwc3_1_dart_0 { + status = "okay"; +}; + +&dwc3_1_dart_1 { + status = "okay"; +}; + +&dwc3_1 { + status = "okay"; + dr_mode = "host"; + maximum-speed = "super-speed"; + phys = <&atcphy1 PHY_TYPE_USB2>, <&atcphy1 PHY_TYPE_USB3>; + phy-names = "usb2-phy", "usb3-phy"; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + dwc3_1_hs: endpoint { + remote-endpoint = <&typec1_connector_hs>; + }; + }; + }; +}; + +&dart_apcie0 { + status = "okay"; + apple,managed-sids = <1 2>; + apple,dma-range = <0x100 0x00100000 0x0 0x3fe00000>; +}; + +/* The radio's board-type is its firmware island: the J713's here. */ +&pcie0 { + status = "okay"; + apple,managed-sids = <1 2>; + iommu-map = <0x100 &dart_apcie0 1 2>; + iommu-map-mask = <0xffff>; + pci@0,0 { + pwren-gpios = <&smc_gpio 0x13 GPIO_ACTIVE_HIGH>; + reset-gpios = <&pinctrl_ap 163 GPIO_ACTIVE_LOW>; + bluetooth0: bluetooth@0,1 { + compatible = "pci14e4,5f72"; + reg = <0x10100 0x0 0x0 0x0 0x0>; + brcm,board-type = "apple,garden"; + /* Per-machine address and calibration supplied by m1n1. */ + local-bd-address = [00 00 00 00 00 00]; + }; + wifi0: wifi@0,0 { + compatible = "pci14e4,4434"; + reg = <0x10000 0x0 0x0 0x0 0x0>; + brcm,board-type = "apple,garden"; + local-mac-address = [00 00 00 00 00 00]; + apple,antenna-sku = "XX"; + }; + }; +}; + +&fpwm1 { + status = "okay"; +}; + +&mcc { + status = "okay"; + apple,boot-dma-devices = <&pmp>; +}; + +&pmc { + status = "okay"; + apple,static-voters = <3>; +}; + +/* + * The PMC enables of an external pipe are set once the pipe's SYS state is + * on, and before its FE state powers on. + */ +&ps_dispext0_fe { + power-domains = <&ps_dispext0_sys>, <&pmc_dispext0>; +}; + +&ps_dispext1_fe { + power-domains = <&ps_dispext1_sys>, <&pmc_dispext1>; +}; + +&smc { + status = "okay"; + + hwmon { + compatible = "apple,smc-hwmon"; + + current-ID0R { + apple,key-id = "ID0R"; + label = "AC Input Current"; + }; + + /* Panel and backlight supply; tracks brightness, idles when blanked. */ + current-Ib8f { + apple,key-id = "Ib8f"; + label = "Display Supply Current"; + }; + + power-PDTR { + apple,key-id = "PDTR"; + label = "AC Input Power"; + }; + + power-PMVC { + apple,key-id = "PMVC"; + label = "3.8 V Rail Power"; + }; + + power-PSTR { + apple,key-id = "PSTR"; + label = "Total System Power"; + }; + + temperature-TB0T { + apple,key-id = "TB0T"; + label = "Battery Hotspot"; + }; + + temperature-TCHP { + apple,key-id = "TCHP"; + label = "Charge Regulator Temp"; + }; + + temperature-TH0x { + apple,key-id = "TH0x"; + label = "NAND Flash Temperature"; + }; + + temperature-TW0P { + apple,key-id = "TW0P"; + label = "WiFi/BT Module Temp"; + }; + + voltage-SBAV { + apple,key-id = "SBAV"; + label = "Battery Voltage"; + }; + + voltage-VD0R { + apple,key-id = "VD0R"; + label = "Charger Input Voltage"; + }; + }; + + rtc { + compatible = "apple,smc-rtc"; + nvmem-cells = <&rtc_offset>; + nvmem-cell-names = "rtc_offset"; + }; + + reboot { + compatible = "apple,t8132-smc-reboot", "apple,smc-reboot"; + nvmem-cells = <&shutdown_flag>, <&boot_stage>, + <&boot_error_count>, <&panic_count>; + nvmem-cell-names = "shutdown_flag", "boot_stage", + "boot_error_count", "panic_count"; + }; +}; + +&smc_mbox { + status = "okay"; +}; + +&nub_spmi { + status = "okay"; + + pmic1: pmic@0 { + compatible = "apple,abbey-pmic", "apple,spmi-nvmem"; + reg = <0x0 SPMI_USID>; /* To be filled by loader */ + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + rtc_offset: rtc-offset@2100 { + reg = <0x2100 0x6>; + }; + + boot_stage: boot-stage@f801 { + reg = <0xf801 0x1>; + }; + + boot_error_count: boot-error-count@f802,0 { + reg = <0xf802 0x1>; + bits = <0 4>; + }; + + panic_count: panic-count@f802,4 { + reg = <0xf802 0x1>; + bits = <4 4>; + }; + + shutdown_flag: shutdown-flag@f80f,3 { + reg = <0xf80f 0x1>; + bits = <3 1>; + }; + }; + }; +}; + +&mtp { + status = "okay"; +}; + +&mtp_mbox { + status = "okay"; +}; + +&mtp_dart { + status = "okay"; +}; + +&mtp_dockchannel { + status = "okay"; +}; + +&mtp_hid { + apple,afe-reset-gpios = <&smc_gpio 28 GPIO_ACTIVE_LOW>; + apple,stm-reset-gpios = <&smc_gpio 29 GPIO_ACTIVE_LOW>; + + multi-touch { + apple,power-method = <2>; + }; + + keyboard: keyboard { + hid-country-code = <0>; + apple,keyboard-layout-id = <0>; + }; + + stm { + }; +}; + +/* + * These blocks are initialized and retained by iBoot/DCP. Linux does not yet + * own the T8132 display power sequence, and the GPIO block must remain live + * for inherited firmware and input state. + */ +/* + * Mesa fingerprint sensor on spi2 (ADT /arm-io/spi2/mesa): power on + * NUB GPIO 28, active high; data-ready on AP GPIO 199. Native chip select only. + */ +&sep_mbox { + status = "okay"; +}; + +&spi2 { + status = "okay"; +}; + +&mesa { + status = "okay"; + enable-gpios = <&pinctrl_nub 28 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <199 IRQ_TYPE_EDGE_RISING>; + spi-cs-setup-delay-ns = <20>; + spi-cs-hold-delay-ns = <20>; +}; + +&framebuffer0 { + /delete-property/ power-domains; + panel = <&fb_panel>; +}; + +#include "t8132-j713-gpu.dtsi" +#include "t8132-j713-display.dtsi" +#include "t8132-j713-dcpext.dtsi" +#include "t8132-j713-atcphy-tunables.dtsi" +#include "t8132-j713-usb4.dtsi" +#include "t8132-j713-usb4-tunables.dtsi" +#include "t8132-j713-pciec-tunables.dtsi" diff --git a/arch/arm64/boot/dts/apple/t8132-j713.dts b/arch/arm64/boot/dts/apple/t8132-j713.dts index eda4f52c23f93..eaa579f9efd1e 100644 --- a/arch/arm64/boot/dts/apple/t8132-j713.dts +++ b/arch/arm64/boot/dts/apple/t8132-j713.dts @@ -11,33 +11,13 @@ #include "t8132.dtsi" #include "t8132-jxxx.dtsi" -#include "t8132-j713-pmgr.dtsi" #include -#include -#include -#include / { compatible = "apple,j713", "apple,t8132", "apple,arm-platform"; model = "Apple MacBook Air (13-inch, M4, 2025)"; chassis-type = "laptop"; - aliases { - sep = &sep; - ans = &nvme; - ans-mbox = &ans_mbox; - atcphy0 = &atcphy0; - atcphy1 = &atcphy1; - bluetooth0 = &bluetooth0; - keyboard = &keyboard; - nvram = &nvram; - pmu-primary = &pmic1; - pmp = &pmp; - sart-ans = &sart; - spmi-primary = &nub_spmi; - wifi0 = &wifi0; - }; - /* * The speaker amps' shared shutdown line (SDZ, AP GPIO 15, the ADT * function-reset; low = shutdown). One fixed regulator, the SDZ supply @@ -107,102 +87,17 @@ }; }; }; - - chosen { - linux-enablement-mac,disk-boot; - linux-enablement-mac,dapf-handoff = "/arm-io/aop", "/arm-io/mtp", - "/arm-io/pmp"; - linux-enablement-mac,dapf-power-on-handoff = "/arm-io/pmp"; - }; - - led-controller { - compatible = "pwm-leds"; - led-0 { - pwms = <&fpwm1 0 40000>; - label = "kbd_backlight"; - function = LED_FUNCTION_KBD_BACKLIGHT; - color = ; - max-brightness = <255>; - default-state = "keep"; - }; - }; - - reserved-memory { - /* - * iBoot loads the ISP firmware outside the kernel's memory, at - * addresses that move with the boot firmware. The boot loader - * fills these placeholders from the ADT's isp segment-ranges: reg, - * and iommu-addresses where the firmware runs them, from - * 0x100_0000_0000 on. The driver checks that the coprocessor's - * reset vector is this text before it starts the firmware. - */ - isp_fw_text: isp-firmware-text { }; - - isp_fw_data: isp-firmware-data { }; - - /* the firmware's 20 MiB main memory, the driver allocates above it */ - isp_heap: isp-heap { - iommu-addresses = <&isp 0x100 0x0 0x0 0x1400000>; - }; - }; - - /* - * The boot NOR runs from a PMU rail that is on whenever the SoC is - * and that no OS switches. The ADT gives the flash no supply. - */ - nor_flash_vcc: regulator-nor-flash-vcc { - compatible = "regulator-fixed"; - regulator-name = "nor-flash-vcc"; - regulator-always-on; - }; }; -/* - * The boot loader enables the ISP and its DARTs once it has filled the - * firmware placeholders and set apple,platform-id, the ADT isp node's - * sensor-type (the J713 ADT has no cam-connections-scheme). - */ -&isp { - memory-region = <&isp_fw_text>, <&isp_fw_data>, <&isp_heap>; - memory-region-names = "text", "data", "heap"; - - /* The front camera, an IMX958: configuration 5, as on the J616s. */ - sensor-presets { - /* 1920x1080 */ - preset0 { - apple,config-index = <5>; - apple,input-size = <1920 2160>; - apple,output-size = <1920 1080>; - apple,crop = <0 0 1920 1080>; - }; - /* 1280x720 */ - preset1 { - apple,config-index = <5>; - apple,input-size = <1920 2160>; - apple,output-size = <1280 720>; - apple,crop = <0 0 1280 720>; - }; +&mtp_hid { + multi-touch { + firmware-name = "apple/tpmtfw-j713.bin"; }; }; -/* - * m1n1 programs the AOP DART's DAPF and reserves the firmware segments and - * the DAPF windows in memory-region when /chosen asks for the AOP's handoff, - * or disables the AOP. - */ -&aop { - status = "okay"; -}; +#include "t8132-j713-j715.dtsi" &aop_audio { - /* - * The microphones on LEAP; the speakers and their sense on base-ns TX0 - * and RX0 (the J616s stream: six playback and twelve sense slots, of - * which the four amps take the first four and eight), the jack on TX2 - * and RX2. - */ - dmas = <&admac0 1>, <&admac1 0>, <&admac1 1>, <&admac1 4>, <&admac1 5>; - dma-names = "dma", "spkr", "sense", "cout", "cin"; apple,chassis-name = "J713"; apple,machine-kind = "MacBook Air"; }; @@ -271,513 +166,7 @@ }; }; -/* - * The CS42L84 headphone codec (ADT /arm-io/i2c1/audio-codec-output at 0x4b). - * Its reset line is nub GPIO 17, driven high to run the codec; its interrupt - * is AP GPIO 98, level low. The AOP firmware runs the jack's stream. - */ -&i2c1 { - status = "okay"; - - jack_codec: codec@4b { - compatible = "cirrus,cs42l84"; - reg = <0x4b>; - reset-gpios = <&pinctrl_nub 17 GPIO_ACTIVE_HIGH>; - #sound-dai-cells = <0>; - interrupts-extended = <&pinctrl_ap 98 IRQ_TYPE_LEVEL_LOW>; - sound-name-prefix = "Jack"; - }; -}; - -&aop_dart { - status = "okay"; -}; - -&aop_mbox { - status = "okay"; - /* A periodic report need not wake the system. */ - apple,hold-rx-in-sleep; -}; - -&admac0 { - status = "okay"; -}; - -&admac1 { - status = "okay"; -}; - -/* Enable DVFS only with the J713 board thermal owner. */ -&cpufreq_e { - status = "okay"; -}; - -&cpufreq_p { - status = "okay"; -}; - -&cpuidle { - status = "okay"; -}; - -&qspi { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - vcc-supply = <&nor_flash_vcc>; - spi-rx-bus-width = <1>; - spi-tx-bus-width = <1>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - nvram: partition@700000 { - label = "nvram"; - /* J713 ADT /arm-io/qspi/spinor/anvram, flash-relative. */ - reg = <0x700000 0x100000>; - }; - }; - }; -}; - -/* - * m1n1 performs the T8132 controller and PHY initialization. Linux adopts - * the trained link and owns DART stream 16, RID-to-SID routing and MSI. - * - * The DART fault interrupt is taken from the J713 ADT, independently of - * the PCIe port and MSI interrupts. - */ -&nub_spmi_a0 { - status = "okay"; - hpm1: usb-pd@a { - compatible = "apple,t8132-sn201202x", "apple,sn201202x"; - reg = <0xa SPMI_USID>; - interrupts = <37 IRQ_TYPE_EDGE_RISING>, - <43 IRQ_TYPE_EDGE_RISING>, - <45 IRQ_TYPE_EDGE_RISING>; - interrupt-names = "irq", "sleep", "wake"; - wakeup-source; - - typec1: connector { - compatible = "usb-c-connector"; - label = "USB-C MagSafe-adjacent"; - power-role = "dual"; - data-role = "dual"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - typec1_connector_hs: endpoint { - remote-endpoint = <&dwc3_1_hs>; - }; - }; - - port@1 { - reg = <1>; - typec1_connector_ss: endpoint { - remote-endpoint = <&atcphy1_typec_lanes>; - }; - }; - }; - }; - }; - hpm0: usb-pd@c { - compatible = "apple,t8132-sn201202x", "apple,sn201202x"; - reg = <0xc SPMI_USID>; - interrupts = <11 IRQ_TYPE_EDGE_RISING>, - <17 IRQ_TYPE_EDGE_RISING>, - <19 IRQ_TYPE_EDGE_RISING>; - interrupt-names = "irq", "sleep", "wake"; - wakeup-source; - - typec0: connector { - compatible = "usb-c-connector"; - label = "USB-C native client"; - power-role = "dual"; - data-role = "dual"; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - typec0_connector_hs: endpoint { - remote-endpoint = <&dwc3_0_hs>; - }; - }; - - port@1 { - reg = <1>; - typec0_connector_ss: endpoint { - remote-endpoint = <&atcphy0_typec_lanes>; - }; - }; - }; - }; - }; -}; - -&pmp_dart { - status = "okay"; -}; - -&pmp_report { - status = "okay"; -}; - -&pmp_mbox { - status = "okay"; -}; - -&atcphy0 { - status = "okay"; - /* Leave the display crossbar at core + 0x4c000 to its own driver. */ - reg = <0x4 0x02a90000 0x0 0x4000>, - <0x4 0x02a84000 0x0 0x4000>, - <0x4 0x03000000 0x0 0x24000>, - <0x4 0x00000000 0x0 0x8000>, - <0x4 0x00020000 0x0 0x4000>, - <0x4 0x03044000 0x0 0x4000>, - <0x4 0x03050000 0x0 0x4000>; - reg-names = "usb2phy", "pipehandler", "core", "axi2af", "lioa", - "fabric", "common-config"; - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - atcphy0_typec_lanes: endpoint { - remote-endpoint = <&typec0_connector_ss>; - }; - }; - }; -}; - -&dwc3_0_dart_0 { - status = "okay"; -}; - -&dwc3_0_dart_1 { - status = "okay"; -}; - -&dwc3_0 { - status = "okay"; - dr_mode = "host"; - maximum-speed = "super-speed"; - phys = <&atcphy0 PHY_TYPE_USB2>, <&atcphy0 PHY_TYPE_USB3>; - phy-names = "usb2-phy", "usb3-phy"; - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - dwc3_0_hs: endpoint { - remote-endpoint = <&typec0_connector_hs>; - }; - }; - }; -}; - -&atcphy1 { - status = "okay"; - /* Leave the display crossbar at core + 0x4c000 to its own driver. */ - reg = <0x4 0x0aa90000 0x0 0x4000>, - <0x4 0x0aa84000 0x0 0x4000>, - <0x4 0x0b000000 0x0 0x24000>, - <0x4 0x08000000 0x0 0x8000>, - <0x4 0x08020000 0x0 0x4000>, - <0x4 0x0b044000 0x0 0x4000>, - <0x4 0x0b050000 0x0 0x4000>; - reg-names = "usb2phy", "pipehandler", "core", "axi2af", "lioa", - "fabric", "common-config"; - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - atcphy1_typec_lanes: endpoint { - remote-endpoint = <&typec1_connector_ss>; - }; - }; - }; -}; - -&dwc3_1_dart_0 { - status = "okay"; -}; - -&dwc3_1_dart_1 { - status = "okay"; -}; - -&dwc3_1 { - status = "okay"; - dr_mode = "host"; - maximum-speed = "super-speed"; - phys = <&atcphy1 PHY_TYPE_USB2>, <&atcphy1 PHY_TYPE_USB3>; - phy-names = "usb2-phy", "usb3-phy"; - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - dwc3_1_hs: endpoint { - remote-endpoint = <&typec1_connector_hs>; - }; - }; - }; -}; - -&dart_apcie0 { - status = "okay"; - apple,managed-sids = <1 2>; - apple,dma-range = <0x100 0x00100000 0x0 0x3fe00000>; -}; - -&pcie0 { - status = "okay"; - apple,managed-sids = <1 2>; - iommu-map = <0x100 &dart_apcie0 1 2>; - iommu-map-mask = <0xffff>; - pci@0,0 { - pwren-gpios = <&smc_gpio 0x13 GPIO_ACTIVE_HIGH>; - reset-gpios = <&pinctrl_ap 163 GPIO_ACTIVE_LOW>; - bluetooth0: bluetooth@0,1 { - compatible = "pci14e4,5f72"; - reg = <0x10100 0x0 0x0 0x0 0x0>; - brcm,board-type = "apple,garden"; - /* Per-machine address and calibration supplied by m1n1. */ - local-bd-address = [00 00 00 00 00 00]; - }; - wifi0: wifi@0,0 { - compatible = "pci14e4,4434"; - reg = <0x10000 0x0 0x0 0x0 0x0>; - brcm,board-type = "apple,garden"; - local-mac-address = [00 00 00 00 00 00]; - apple,antenna-sku = "XX"; - }; - }; -}; - - -&fpwm1 { - status = "okay"; -}; - -&mcc { - status = "okay"; - apple,boot-dma-devices = <&pmp>; -}; - -&pmc { - status = "okay"; - apple,static-voters = <3>; -}; - -/* - * The PMC enables of an external pipe are set once the pipe's SYS state is - * on, and before its FE state powers on. - */ -&ps_dispext0_fe { - power-domains = <&ps_dispext0_sys>, <&pmc_dispext0>; -}; - -&ps_dispext1_fe { - power-domains = <&ps_dispext1_sys>, <&pmc_dispext1>; -}; - -&smc { - status = "okay"; - - hwmon { - compatible = "apple,smc-hwmon"; - - current-ID0R { - apple,key-id = "ID0R"; - label = "AC Input Current"; - }; - - /* Panel and backlight supply; tracks brightness, idles when blanked. */ - current-Ib8f { - apple,key-id = "Ib8f"; - label = "Display Supply Current"; - }; - - power-PDTR { - apple,key-id = "PDTR"; - label = "AC Input Power"; - }; - - power-PMVC { - apple,key-id = "PMVC"; - label = "3.8 V Rail Power"; - }; - - power-PSTR { - apple,key-id = "PSTR"; - label = "Total System Power"; - }; - - temperature-TB0T { - apple,key-id = "TB0T"; - label = "Battery Hotspot"; - }; - - temperature-TCHP { - apple,key-id = "TCHP"; - label = "Charge Regulator Temp"; - }; - - temperature-TH0x { - apple,key-id = "TH0x"; - label = "NAND Flash Temperature"; - }; - - temperature-TW0P { - apple,key-id = "TW0P"; - label = "WiFi/BT Module Temp"; - }; - - voltage-SBAV { - apple,key-id = "SBAV"; - label = "Battery Voltage"; - }; - - voltage-VD0R { - apple,key-id = "VD0R"; - label = "Charger Input Voltage"; - }; - }; - - rtc { - compatible = "apple,smc-rtc"; - nvmem-cells = <&rtc_offset>; - nvmem-cell-names = "rtc_offset"; - }; - - reboot { - compatible = "apple,t8132-smc-reboot", "apple,smc-reboot"; - nvmem-cells = <&shutdown_flag>, <&boot_stage>, - <&boot_error_count>, <&panic_count>; - nvmem-cell-names = "shutdown_flag", "boot_stage", - "boot_error_count", "panic_count"; - }; -}; - -&smc_mbox { - status = "okay"; -}; - -&nub_spmi { - status = "okay"; - - pmic1: pmic@0 { - compatible = "apple,abbey-pmic", "apple,spmi-nvmem"; - reg = <0x0 SPMI_USID>; /* To be filled by loader */ - - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - #size-cells = <1>; - - rtc_offset: rtc-offset@2100 { - reg = <0x2100 0x6>; - }; - - boot_stage: boot-stage@f801 { - reg = <0xf801 0x1>; - }; - - boot_error_count: boot-error-count@f802,0 { - reg = <0xf802 0x1>; - bits = <0 4>; - }; - - panic_count: panic-count@f802,4 { - reg = <0xf802 0x1>; - bits = <4 4>; - }; - - shutdown_flag: shutdown-flag@f80f,3 { - reg = <0xf80f 0x1>; - bits = <3 1>; - }; - }; - }; -}; - -&mtp { - status = "okay"; -}; - -&mtp_mbox { - status = "okay"; -}; - -&mtp_dart { - status = "okay"; -}; - -&mtp_dockchannel { - status = "okay"; -}; - -&mtp_hid { - apple,afe-reset-gpios = <&smc_gpio 28 GPIO_ACTIVE_LOW>; - apple,stm-reset-gpios = <&smc_gpio 29 GPIO_ACTIVE_LOW>; - - multi-touch { - firmware-name = "apple/tpmtfw-j713.bin"; - apple,power-method = <2>; - }; - - keyboard: keyboard { - hid-country-code = <0>; - apple,keyboard-layout-id = <0>; - }; - - stm { - }; -}; - -/* - * These blocks are initialized and retained by iBoot/DCP. Linux does not yet - * own the T8132 display power sequence, and the GPIO block must remain live - * for inherited firmware and input state. - */ -/* - * Mesa fingerprint sensor on spi2 (J713 ADT /arm-io/spi2/mesa): power on - * NUB GPIO 28, active high; data-ready on AP GPIO 199. Native chip select only. - */ -&sep_mbox { - status = "okay"; -}; - -&spi2 { - status = "okay"; -}; - &mesa { - status = "okay"; - enable-gpios = <&pinctrl_nub 28 GPIO_ACTIVE_HIGH>; - interrupt-parent = <&pinctrl_ap>; - interrupts = <199 IRQ_TYPE_EDGE_RISING>; - spi-cs-setup-delay-ns = <20>; - spi-cs-hold-delay-ns = <20>; /* * Per-device factory data from this Mac's own iBoot system container: * the calibration, and the signed root key the nonce session loads. @@ -785,11 +174,6 @@ firmware-name = "apple/mesacal-j713.bin", "apple/msrk-j713.bin"; }; -&framebuffer0 { - /delete-property/ power-domains; - panel = <&fb_panel>; -}; - / { /* * Physical size of the firmware framebuffer's 2560x1600 area below the @@ -801,10 +185,3 @@ status = "disabled"; }; }; -#include "t8132-j713-gpu.dtsi" -#include "t8132-j713-display.dtsi" -#include "t8132-j713-dcpext.dtsi" -#include "t8132-j713-atcphy-tunables.dtsi" -#include "t8132-j713-usb4.dtsi" -#include "t8132-j713-usb4-tunables.dtsi" -#include "t8132-j713-pciec-tunables.dtsi" diff --git a/arch/arm64/boot/dts/apple/t8132-j715.dts b/arch/arm64/boot/dts/apple/t8132-j715.dts index 1a387d273e8ff..6662e95eebf95 100644 --- a/arch/arm64/boot/dts/apple/t8132-j715.dts +++ b/arch/arm64/boot/dts/apple/t8132-j715.dts @@ -4,6 +4,9 @@ * * target-type: J715 * + * The J713 board with a 15.3" panel and six speaker amps. Its ADT matches + * the J713's elsewhere, apart from the radio island and the ATC PHY trims. + * * Copyright The Asahi Linux Contributors */ @@ -11,26 +14,277 @@ #include "t8132.dtsi" #include "t8132-jxxx.dtsi" -#include +#include / { compatible = "apple,j715", "apple,t8132", "apple,arm-platform"; model = "Apple MacBook Air (15-inch, M4, 2025)"; chassis-type = "laptop"; - led-controller { - compatible = "pwm-leds"; - led-0 { - pwms = <&fpwm1 0 40000>; - label = "kbd_backlight"; - function = LED_FUNCTION_KBD_BACKLIGHT; - color = ; - max-brightness = <255>; - default-state = "keep"; + /* + * The speaker amps' shared shutdown line (SDZ, AP GPIO 15, the ADT + * function-reset; low = shutdown). One fixed regulator, the SDZ supply + * of all six, so one amp's fault takes the whole group down. + */ + speaker_sdz: regulator-sn012776-sdz { + compatible = "regulator-fixed"; + regulator-name = "sn012776-sdz"; + gpios = <&pinctrl_ap 15 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + /* + * The AOP firmware runs the stream (MCA cluster 0, one serializer for + * the six amps); macaudio's J715 variant links the AOP audio + * component's speaker back-end (DAI 3) to them. The codecs are listed in + * the ADT provider order, so each gets its native playback slot (LW1 0, + * RW1 1, LT 2, RT 3, LW2 4, RW2 5). The idle masks are the ADT + * amp-tx-zd-config rows 0 and 1 over the 24 sense byte slots: the left + * woofer drives zeros in the right amps' sense slots, the right woofer + * in the left amps'. + */ + sound: sound { + compatible = "apple,j715-macaudio", "apple,macaudio"; + model = "MacBook Air J715"; + #address-cells = <1>; + #size-cells = <0>; + + dai-link@0 { + reg = <0>; + link-name = "Speakers"; + dai-tdm-idle-mode-0 = "zero"; + dai-tdm-idle-mode-1 = "zero"; + dai-tdm-slot-tx-idle-mask-0 = <0xf0f0f0>; + dai-tdm-slot-tx-idle-mask-1 = <0x0f0f0f>; + + cpu { + sound-dai = <&aop_audio 3>; + }; + + codec { + sound-dai = <&speaker_left_woof1>, <&speaker_right_woof1>, + <&speaker_left_tweet>, <&speaker_right_tweet>, + <&speaker_left_woof2>, <&speaker_right_woof2>; + }; + }; + }; + + /* + * The headphone jack: the AOP audio component's jack back-end (DAI 4) + * to the CS42L84, as a card of its own. + */ + sound_jack: sound-jack { + compatible = "apple,j715-macaudio-jack", "apple,macaudio"; + model = "MacBook Air J715 Jack"; + #address-cells = <1>; + #size-cells = <0>; + + dai-link@0 { + reg = <0>; + link-name = "Headphone Jack"; + + cpu { + sound-dai = <&aop_audio 4>; + }; + + codec { + sound-dai = <&jack_codec>; + }; }; }; }; -&fpwm1 { +&mtp_hid { + multi-touch { + firmware-name = "apple/tpmtfw-j715.bin"; + }; +}; + +#include "t8132-j713-j715.dtsi" + +/* The radio module's firmware island, from the ADT's module-instance. */ +&wifi0 { + brcm,board-type = "apple,kos"; +}; + +&bluetooth0 { + brcm,board-type = "apple,kos"; +}; + +&aop_audio { + apple,chassis-name = "J715"; + apple,machine-kind = "MacBook Air"; +}; + +/* + * The six SN012776 speaker amps, held in hardware shutdown until the sound + * card enables them (ADT /arm-io/i2c3/audio-speaker at 0x38 and its + * speaker1..5): one interrupt line on AP GPIO 14, level low; sense slots + * from speaker-config (amp i at RX bytes 4i and 4i + 2, order LW1 RW1 LT RT + * LW2 RW2). Every amp joins the SDZ fail-closed group. + */ +&i2c3 { status = "okay"; + + speaker_left_woof1: codec@38 { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x38>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + apple,deferred-shutdown; + #sound-dai-cells = <0>; + sound-name-prefix = "Left Woofer 1"; + interrupts-extended = <&pinctrl_ap 14 IRQ_TYPE_LEVEL_LOW>; + ti,imon-slot-no = <0>; + ti,vmon-slot-no = <2>; + }; + + speaker_left_tweet: codec@39 { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x39>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + apple,deferred-shutdown; + #sound-dai-cells = <0>; + sound-name-prefix = "Left Tweeter"; + interrupts-extended = <&pinctrl_ap 14 IRQ_TYPE_LEVEL_LOW>; + ti,imon-slot-no = <8>; + ti,vmon-slot-no = <10>; + }; + + speaker_left_woof2: codec@3a { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x3a>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + apple,deferred-shutdown; + #sound-dai-cells = <0>; + sound-name-prefix = "Left Woofer 2"; + interrupts-extended = <&pinctrl_ap 14 IRQ_TYPE_LEVEL_LOW>; + ti,imon-slot-no = <16>; + ti,vmon-slot-no = <18>; + }; + + speaker_right_woof1: codec@3b { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x3b>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + apple,deferred-shutdown; + #sound-dai-cells = <0>; + sound-name-prefix = "Right Woofer 1"; + interrupts-extended = <&pinctrl_ap 14 IRQ_TYPE_LEVEL_LOW>; + ti,imon-slot-no = <4>; + ti,vmon-slot-no = <6>; + }; + + speaker_right_tweet: codec@3c { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x3c>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + apple,deferred-shutdown; + #sound-dai-cells = <0>; + sound-name-prefix = "Right Tweeter"; + interrupts-extended = <&pinctrl_ap 14 IRQ_TYPE_LEVEL_LOW>; + ti,imon-slot-no = <12>; + ti,vmon-slot-no = <14>; + }; + + speaker_right_woof2: codec@3d { + compatible = "ti,sn012776", "ti,tas2764"; + reg = <0x3d>; + SDZ-supply = <&speaker_sdz>; + apple,sdz-group-fail-closed; + apple,deferred-shutdown; + #sound-dai-cells = <0>; + sound-name-prefix = "Right Woofer 2"; + interrupts-extended = <&pinctrl_ap 14 IRQ_TYPE_LEVEL_LOW>; + ti,imon-slot-no = <20>; + ti,vmon-slot-no = <22>; + }; +}; + +&mesa { + /* + * Per-device factory data from this Mac's own iBoot system container: + * the calibration, and the signed root key the nonce session loads. + */ + firmware-name = "apple/mesacal-j715.bin", "apple/msrk-j715.bin"; +}; + +/* + * The ATC PHY calibration where the J715 ADT differs from the J713 tree: + * PLL and common-block trims, which also differ between machines and + * between the two PHYs. + */ +&atcphy0 { + apple,tunable-cio-common = + <0x800 0x3f0000 0x230000>, + <0x2224 0xc00 0x800>, + <0x2230 0x1f 0xf>, + <0x2240 0x18007f 0x39>, + <0x22b0 0x8700000 0x300000>, + <0x22e8 0x60001 0x40001>, + <0x2338 0xf800000 0x7800000>, + <0x2a00 0x888 0x888>, + <0x2a08 0x1f0000 0x30000>, + <0x2a24 0xc00 0x800>, + <0x2a28 0xf00 0xb00>, + <0x2a30 0x1f 0xf>, + <0x2a4c 0x7ffe00 0x63ba00>, + <0x2ab0 0x700000 0x300000>, + <0x2ae8 0x60000 0x20000>, + <0x2b00 0xfff 0xd8>, + <0x2894 0x100 0x100>, + <0x28a0 0x1ff 0x114>, + <0x1030 0x8000 0x8000>, + <0x4000 0xf00700 0xb00000>, + <0x10c 0x40000 0x0>; +}; + +&atcphy1 { + apple,tunable-cio-common = + <0x800 0x3f0000 0x230000>, + <0x2224 0xc00 0x800>, + <0x2230 0x1f 0xf>, + <0x2240 0x18007f 0x39>, + <0x22b0 0x8700000 0x300000>, + <0x22e8 0x60001 0x40001>, + <0x2338 0xf800000 0x7800000>, + <0x2a00 0x888 0x888>, + <0x2a08 0x1f0000 0x30000>, + <0x2a24 0xc00 0x800>, + <0x2a28 0xf00 0xb00>, + <0x2a30 0x1f 0xf>, + <0x2a4c 0x7ffe00 0x22ba00>, + <0x2ab0 0x700000 0x300000>, + <0x2ae8 0x60000 0x20000>, + <0x2b00 0xfff 0xd8>, + <0x2894 0x100 0x100>, + <0x28a0 0x1ff 0x114>, + <0x1030 0x8000 0x8000>, + <0x4000 0xf00700 0xb00000>, + <0x10c 0x40000 0x0>; + apple,tunable-cio-post = + <0xa04 0x7c 0x50>, + <0x260c 0x3ff 0x200>; +}; + +/* The full 2880x1864 panel including the notch rows, 224 ppi. */ +&dcp { + apple,panel-width-mm = <327>; + apple,panel-height-mm = <211>; +}; + +/ { + /* + * Physical size of the firmware framebuffer's 2880x1800 area below the + * notch (15.3" panel, 224 ppi), so simpledrm reports the real DPI. + */ + fb_panel: panel { + width-mm = <327>; + height-mm = <204>; + status = "disabled"; + }; }; diff --git a/arch/arm64/boot/dts/apple/t8140-j700.dts b/arch/arm64/boot/dts/apple/t8140-j700.dts index dde5e89cb0135..5841470c3c28d 100644 --- a/arch/arm64/boot/dts/apple/t8140-j700.dts +++ b/arch/arm64/boot/dts/apple/t8140-j700.dts @@ -691,6 +691,25 @@ status = "okay"; }; +&smc_gpio { + apple,pcio-templates = <10 0x800000 0xa0000>; +}; + +&aop_spmi0 { + status = "okay"; + + stockholm: nfc@9 { + compatible = "apple,stockholm-nci"; + reg = <9 SPMI_USID>; + interrupt-parent = <&aop_spmi0>; + interrupts = <229 IRQ_TYPE_EDGE_RISING>, + <230 IRQ_TYPE_EDGE_RISING>, + <227 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "host-wake", "data-ready", "error"; + enable-gpios = <&smc_gpio 10 GPIO_ACTIVE_HIGH>; + }; +}; + &smc_hwmon { apple,thermal-pressure-key = "mTPL"; diff --git a/arch/arm64/boot/dts/apple/t8140-peripherals.dtsi b/arch/arm64/boot/dts/apple/t8140-peripherals.dtsi new file mode 100644 index 0000000000000..5198e90c72d52 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t8140-peripherals.dtsi @@ -0,0 +1,574 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT +/* + * Structural hardware resources from the board's saved Apple Device Tree. + * Keep unqualified blocks disabled: describing them does not transfer + * ownership from firmware or make their registers safe to access. + */ + +&soc { + error-handler@220000000 { + compatible = "apple,t8140-error-handler", "apple,soc-error-handler"; + /* ADT /arm-io/error-handler banks; firmware/AP access is unqualified. */ + reg = <0x2 0x20000000 0x0 0x2f000000>, + <0x2 0x80d00000 0x0 0x40000>, + <0x2 0x80900000 0x0 0x8000>, + <0x3 0x00000000 0x0 0x70000>, + <0x3 0x00728000 0x0 0x4000>, + <0x3 0x082dc000 0x0 0x18000>, + <0x3 0x003d0000 0x0 0x4000>, + <0x3 0x00768000 0x0 0x4000>, + <0x3 0x02000000 0x0 0x1000000>, + <0x2 0x4f000000 0x0 0x4000>, + <0x2 0x50000000 0x0 0x4000>, + <0x2 0x51000000 0x0 0x4000>, + <0x2 0x52000000 0x0 0x4000>, + <0x2 0x5f000000 0x0 0x4000>, + <0x2 0x6f000000 0x0 0x4000>, + <0x2 0x5300a000 0x0 0x9a4>, + <0x2 0x54000000 0x0 0x20000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + /* Not yet qualified on the J700. */ + status = "disabled"; + }; + event-log-handler@300700000 { + compatible = "apple,t8140-event-log", "apple,soc-event-log"; + /* ADT /arm-io/event-log-handler banks; firmware/AP access is unqualified. */ + reg = <0x3 0x00700000 0x0 0xcc000>, + <0x3 0x08280000 0x0 0x80000>, + <0x3 0x00000000 0x0 0x70000>, + <0x3 0x08200000 0x0 0x7c000>, + <0x3 0x0028c000 0x0 0x4000>, + <0x3 0x00280000 0x0 0x8000>, + <0x4 0x01878000 0x0 0x4000>, + <0x4 0x01868000 0x0 0x8000>, + <0x3 0x02800000 0x0 0xbc000>, + <0x3 0x02900000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + , + , + ; + /* Not yet qualified on the J700. */ + status = "disabled"; + }; + + /* ADT /arm-io/dwi. */ + dwi: dwi@300200000 { + compatible = "apple,t8140-dwi", "apple,dwi"; + reg = <0x3 0x00200000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_dwi>; + status = "disabled"; + }; + + /* ADT /arm-io/aes. */ + aes: crypto@38500c000 { + compatible = "apple,t8140-aes", "apple,aes"; + reg = <0x3 0x8500c000 0x0 0x4000>, + <0x3 0x082dc000 0x0 0x8000>, + <0x3 0x08078000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_aes>; + iommus = <&sio_dart 1>; + status = "disabled"; + }; + + /* ADT /arm-io/aon-ptd. */ + aon_ptd: aon-ptd@30c840000 { + compatible = "apple,t8140-aon-ptd", "apple,aon-ptd"; + reg = <0x3 0x0c840000 0x0 0x4000>, + <0x3 0x0c850000 0x0 0x4000>, + <0x3 0x0c858000 0x0 0x4000>, + <0x3 0x0c860000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + , + ; + status = "disabled"; + }; + + /* ADT /arm-io/scaler0. */ + scaler0: scaler@291000000 { + compatible = "apple,t8140-scaler", "apple,scaler"; + reg = <0x2 0x91000000 0x0 0x38000>, + <0x2 0x91210000 0x0 0x4000>, + <0x2 0x91204000 0x0 0x4000>, + <0x2 0x90000000 0x0 0x8000>; + interrupt-parent = <&aic>; + interrupts = , + ; + power-domains = <&ps_msr>, + <&ps_msr_ase_core>; + iommus = <&scaler0_dart 0>, + <&scaler0_dart 1>; + clocks = <&peripheral_clocks 374>; + resets = <&ps_msr>; + status = "disabled"; + }; + + /* ADT /arm-io/aop2. */ + aop2: coprocessor@311600000 { + compatible = "apple,t8140-aop2", "apple,aop2"; + reg = <0x3 0x11600000 0x0 0x88000>, + <0x3 0x11050000 0x0 0x4000>, + <0x3 0x1162c000 0x0 0x3c008>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + power-domains = <&ps_aop2_cpu>; + iommus = <&aop_dart 16>; + status = "disabled"; + }; + + /* ADT /arm-io/aop2-exclave-mailbox. */ + aop2_secure_mbox: mailbox@35167c000 { + compatible = "apple,t8140-secure-mailbox", "apple,secure-mailbox"; + reg = <0x3 0x5167c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + ; + iommus = <&aop_dart 17>; + status = "disabled"; + }; + + /* ADT /arm-io/esm. */ + esm: coprocessor@4d267c000 { + compatible = "apple,t8140-esm", "apple,esm"; + reg = <0x4 0xd267c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + ; + iommus = <&sep_dart 2>; + status = "disabled"; + }; + + /* ADT /arm-io/rsm. */ + rsm: rsm@309825000 { + compatible = "apple,t8140-rsm", "apple,rsm"; + reg = <0x3 0x09825000 0x0 0x4000>, + <0x3 0x098c0000 0x0 0x4>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&rsm_dart 0>; + status = "disabled"; + }; + + /* ADT /arm-io/admac-leap-s; the existing AP proxy is separate. */ + admac_leap_secure: dma-controller@313200000 { + compatible = "apple,t8140-admac-secure", "apple,admac-secure"; + reg = <0x3 0x13200000 0x0 0x34000>; + #dma-cells = <1>; + dma-channels = <18>; + interrupt-parent = <&aic>; + interrupts = ; + iommus = <&aop_dart 11>; + power-domains = <&ps_audio_leap_s_a>; + status = "disabled"; + }; + + + /* ADT /arm-io/dcp-exclave-mailbox. */ + dcp_secure_mbox: mailbox@452e7c000 { + compatible = "apple,t8140-secure-mailbox", "apple,secure-mailbox"; + reg = <0x4 0x52e7c000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + ; + iommus = <&dcp_dart 24>; + status = "disabled"; + }; + + /* ADT /arm-io/exdisplaypipe-s-proxy. */ + display_secure_proxy: display-secure-proxy@450000000 { + compatible = "apple,t8140-display-secure-proxy", "apple,display-secure-proxy"; + reg = <0x4 0x50000000 0x0 0xafc000>, + <0x4 0x51000000 0x0 0xafc000>, + <0x4 0x523b0000 0x0 0x8000>; + status = "disabled"; + }; + + /* ADT /arm-io/isp-exclave-s-proxy. */ + isp_secure_proxy: isp-secure-proxy@361800000 { + compatible = "apple,t8140-isp-secure-proxy", "apple,isp-secure-proxy"; + reg = <0x3 0x61800000 0x0 0x480000>, + <0x3 0x628ac000 0x0 0x4000>, + <0x3 0x62780000 0x0 0x10000>; + status = "disabled"; + }; + + /* ADT /arm-io/siri-exclave-timebase. */ + siri_timebase: secure-timebase@3482a8000 { + compatible = "apple,t8140-secure-timebase", "apple,secure-timebase"; + reg = <0x3 0x482a8000 0x0 0x4000>; + status = "disabled"; + }; + + /* ADT /arm-io/hib-exclave-watchdog. */ + hib_watchdog: secure-watchdog@3482b0000 { + compatible = "apple,t8140-secure-watchdog", "apple,secure-watchdog"; + reg = <0x3 0x482b0000 0x0 0x4000>; + status = "disabled"; + }; + + /* Clock IDs are SoC hardware selectors, not ADT phandles. */ + peripheral_clocks: clock-controller@300700000 { + compatible = "apple,t8140-pmgr-clocks", "apple,pmgr-clocks"; + /* ADT /arm-io/pmgr register banks, in hardware-description order. */ + reg = <0x3 0x00700000 0x0 0xcc000>, + <0x3 0x08280000 0x0 0x80000>, + <0x3 0x00000000 0x0 0x78000>, + <0x3 0x08200000 0x0 0x7c000>, + <0x3 0x08004000 0x0 0x1000>, + <0x2 0x10e20000 0x0 0x2000>, + <0x2 0x10050000 0x0 0xef1000>, + <0x2 0x10e40000 0x0 0x9000>, + <0x2 0x10e50000 0x0 0xe81000>, + <0x2 0x10e70000 0x0 0x1000>, + <0x2 0x10050000 0x0 0x10000>, + <0x2 0x10150000 0x0 0x10000>, + <0x2 0x10250000 0x0 0x10000>, + <0x2 0x10350000 0x0 0x10000>, + <0x2 0x11e20000 0x0 0x2000>, + <0x2 0x11050000 0x0 0xef1000>, + <0x2 0x11e40000 0x0 0xb000>, + <0x2 0x11e50000 0x0 0xe81000>, + <0x2 0x11e70000 0x0 0x1000>, + <0x2 0x11050000 0x0 0x10000>, + <0x2 0x11150000 0x0 0x10000>, + <0x3 0x00700000 0x0 0x18000>, + <0x3 0x00724000 0x0 0x4000>, + <0x3 0x00728000 0x0 0x4000>, + <0x3 0x00730000 0x0 0x14000>, + <0x3 0x00760000 0x0 0x4000>, + <0x3 0x00764000 0x0 0x4000>, + <0x3 0x00768000 0x0 0x4000>, + <0x3 0x00780000 0x0 0x4000>, + <0x3 0x082b8000 0x0 0x10000>, + <0x3 0x082c8000 0x0 0x4000>, + <0x3 0x082d0000 0x0 0x8000>, + <0x3 0x00208000 0x0 0x8000>, + <0x3 0x00280000 0x0 0x80000>, + <0x3 0x003c0000 0x0 0x30000>, + <0x3 0x08100000 0x0 0xa8000>, + <0x4 0x01878000 0x0 0x4000>, + <0x3 0x00780000 0x0 0x4000>, + <0x4 0x0195c000 0x0 0x4000>, + <0x4 0x01960000 0x0 0x4000>, + <0x4 0x01974000 0x0 0x4000>, + <0x2 0x11000000 0x0 0xff4000>, + <0x4 0x80e1c000 0x0 0x4000>, + <0x3 0x02000000 0x0 0x1000000>; + #clock-cells = <1>; + apple,pmgr = <&pmgr>; + status = "disabled"; + }; + + /* ADT /arm-io/aop-gpio; coprocessor/firmware ownership unqualified. */ + pinctrl_aop: pinctrl@310824000 { + compatible = "apple,t8140-pinctrl", "apple,t8103-pinctrl"; + reg = <0x3 0x10824000 0x0 0x4000>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_aop 0 0 57>; + apple,npins = <57>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + ; + power-domains = <&ps_aop_gpio>; + status = "disabled"; + }; + + /* ADT /arm-io/nub-gpio; coprocessor/firmware ownership unqualified. */ + pinctrl_nub: pinctrl@3081f0000 { + compatible = "apple,t8140-pinctrl", "apple,t8103-pinctrl"; + reg = <0x3 0x081f0000 0x0 0x4000>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_nub 0 0 30>; + apple,npins = <30>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + ; + power-domains = <&ps_nub_gpio>; + status = "disabled"; + }; + + /* ADT /arm-io/smc-gpio; coprocessor/firmware ownership unqualified. */ + pinctrl_smc: pinctrl@30c820000 { + compatible = "apple,t8140-pinctrl", "apple,t8103-pinctrl"; + reg = <0x3 0x0c820000 0x0 0x4000>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_smc 0 0 6>; + apple,npins = <6>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + ; + status = "disabled"; + }; + + /* ADT /arm-io/mtp-gpio; coprocessor/firmware ownership unqualified. */ + pinctrl_mtp: pinctrl@314838000 { + compatible = "apple,t8140-pinctrl", "apple,t8103-pinctrl"; + reg = <0x3 0x14838000 0x0 0x4000>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl_mtp 0 0 10>; + apple,npins = <10>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + ; + status = "disabled"; + }; + + /* ADT /arm-io/dart-sio. */ + sio_dart: iommu@385060000 { + compatible = "apple,t8140-dart", "apple,t8110-dart"; + reg = <0x3 0x85060000 0x0 0x20000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_sio_cpu>; + status = "disabled"; + }; + + /* ADT /arm-io/dart-scaler. */ + scaler0_dart: iommu@291260000 { + compatible = "apple,t8140-dart", "apple,t8110-dart"; + reg = <0x2 0x91260000 0x0 0x20000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_msr>; + status = "disabled"; + }; + + /* ADT /arm-io/dart-rsm. */ + rsm_dart: iommu@3099a0000 { + compatible = "apple,t8140-dart", "apple,t8110-dart"; + reg = <0x3 0x099a0000 0x0 0xc000>; + #iommu-cells = <1>; + interrupt-parent = <&aic>; + interrupts = ; + status = "disabled"; + }; + + uart0: serial@385200000 { + compatible = "apple,t8140-uart", "apple,s5l-uart"; + reg = <0x3 0x85200000 0x0 0x4000>; + reg-io-width = <4>; + interrupt-parent = <&aic>; + interrupts = ; + clocks = <&peripheral_clocks 401>, <&peripheral_clocks 4>; + clock-names = "uart", "clk_uart_baud0"; + power-domains = <&ps_uart0>; + status = "disabled"; + }; + + uart4: serial@385210000 { + compatible = "apple,t8140-uart", "apple,s5l-uart"; + reg = <0x3 0x85210000 0x0 0x4000>; + reg-io-width = <4>; + interrupt-parent = <&aic>; + interrupts = ; + clocks = <&peripheral_clocks 401>, <&peripheral_clocks 4>; + clock-names = "uart", "clk_uart_baud0"; + power-domains = <&ps_uart4>; + status = "disabled"; + }; + + uart5: serial@385214000 { + compatible = "apple,t8140-uart", "apple,s5l-uart"; + reg = <0x3 0x85214000 0x0 0x4000>; + reg-io-width = <4>; + interrupt-parent = <&aic>; + interrupts = ; + clocks = <&peripheral_clocks 401>, <&peripheral_clocks 4>; + clock-names = "uart", "clk_uart_baud0"; + power-domains = <&ps_uart5>; + status = "disabled"; + }; + + sio: dma-controller@385e00000 { + compatible = "apple,t8140-sio", "apple,sio"; + /* Split the ASC bank around the separately owned mailbox window. */ + reg = <0x3 0x85e00000 0x0 0x8000>, + <0x3 0x85850000 0x0 0x4000>, + <0x3 0x85e0c000 0x0 0x7c000>; + #dma-cells = <1>; + dma-channels = <128>; + mboxes = <&sio_mbox>; + iommus = <&sio_dart 0>; + power-domains = <&ps_sio_cpu>; + clocks = <&peripheral_clocks 393>, <&peripheral_clocks 391>, <&peripheral_clocks 392>; + status = "disabled"; + }; + + sio_mbox: mailbox@385e08000 { + compatible = "apple,t8140-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x3 0x85e08000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + power-domains = <&ps_sio_cpu>; + status = "disabled"; + }; + + /* ADT /dock-connect; no qualified host transport/ownership contract. */ + debug_dock: debug-dock@3082d8008 { + compatible = "apple,t8140-debug-dock", "apple,debug-dock"; + reg = <0x3 0x082d8008 0x0 0x4>; + interrupt-parent = <&aic>; + interrupts = , + ; + status = "disabled"; + }; + + /* ADT /arm-io/eic named MMIO apertures are absolute addresses. */ + eic: secure-controller@340700000 { + compatible = "apple,t8140-eic", "apple,eic"; + reg = <0x3 0x40700000 0x0 0x18000>, + <0x3 0x63b50000 0x0 0x8000>, + <0x3 0x5a000000 0x0 0x4000>, + <0x3 0xc5040000 0x0 0xc000>, + <0x3 0x482a8000 0x0 0x4000>, + <0x3 0x482b0000 0x0 0x4000>; + reg-names = "ps", "wd-isp", "gpio", "fpwm", "gltb", "wd-e"; + status = "disabled"; + }; + + xspmi_controller: spmi-proxy-controller@348614000 { + compatible = "apple,t8140-xspmi-controller", "apple,xspmi-controller"; + reg = <0x3 0x48614000 0x0 0x4000>; + apple,response-vector = <256>; + status = "disabled"; + }; +}; + +&aon_ptd { + interrupt-controller; + #interrupt-cells = <2>; + #address-cells = <0>; +}; + +&{/soc/spmi@308714000/pmic@e} { + battery_monitor: battery-monitor { + compatible = "apple,t8140-battery-monitor", "apple,battery-monitor"; + interrupt-parent = <&nub_spmi0>; + interrupts = <12 IRQ_TYPE_EDGE_RISING>; + status = "disabled"; + }; +}; + +&nub_spmi1 { + xspmi_proxy: proxy@d { + compatible = "apple,t8140-xspmi-proxy", "apple,xspmi-proxy"; + reg = <0xd SPMI_USID>; + status = "disabled"; + }; +}; + +&nub_spmi_a0 { + spmi_all_ace: controller@e { + compatible = "apple,t8140-spmi-all-ace", "apple,spmi-all-ace"; + reg = <0xe SPMI_USID>; + status = "disabled"; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t8140-pmgr.dtsi b/arch/arm64/boot/dts/apple/t8140-pmgr.dtsi index 0a479f7e8e8e5..a2be4fc980916 100644 --- a/arch/arm64/boot/dts/apple/t8140-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t8140-pmgr.dtsi @@ -1498,3 +1498,79 @@ }; }; + +/* CPU power states are described but remain owned by CPU power management. */ +&pmgr { + + ps_ecpu_0: power-controller@0 { + compatible = "apple,t8140-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x0 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "ecpu_0"; + status = "disabled"; + }; + + ps_ecpu_1: power-controller@8 { + compatible = "apple,t8140-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "ecpu_1"; + status = "disabled"; + }; + + ps_ecpu_2: power-controller@10 { + compatible = "apple,t8140-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x10 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "ecpu_2"; + status = "disabled"; + }; + + ps_ecpu_3: power-controller@18 { + compatible = "apple,t8140-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x18 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "ecpu_3"; + status = "disabled"; + }; + + ps_pcpu_0: power-controller@30 { + compatible = "apple,t8140-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x30 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "pcpu_0"; + status = "disabled"; + }; + + ps_pcpu_1: power-controller@38 { + compatible = "apple,t8140-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x38 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "pcpu_1"; + status = "disabled"; + }; + + ps_ecpm: power-controller@50 { + compatible = "apple,t8140-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x50 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "ecpm"; + status = "disabled"; + }; + + ps_pcpm: power-controller@58 { + compatible = "apple,t8140-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x58 4>; + #power-domain-cells = <0>; + #reset-cells = <0>; + label = "pcpm"; + status = "disabled"; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t8140.dtsi b/arch/arm64/boot/dts/apple/t8140.dtsi index 157ac016325fe..dbe9bd0d4e59c 100644 --- a/arch/arm64/boot/dts/apple/t8140.dtsi +++ b/arch/arm64/boot/dts/apple/t8140.dtsi @@ -470,54 +470,6 @@ }; }; - error-handler { - compatible = "apple,t8140-error-handler", "apple,soc-error-handler"; - interrupt-parent = <&aic>; - interrupts = , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - , - ; - /* Not yet qualified on the J700. */ - status = "disabled"; - }; - - event-log-handler { - compatible = "apple,t8140-event-log", "apple,soc-event-log"; - interrupt-parent = <&aic>; - interrupts = , - , - , - , - , - , - , - , - ; - /* Not yet qualified on the J700. */ - status = "disabled"; - }; soc: soc { compatible = "simple-bus"; @@ -1816,7 +1768,8 @@ admac_base_ns: dma-controller@313800000 { compatible = "apple,t8140-admac"; reg = <0x3 0x13800000 0x0 0x34000>; - dma-channels = <13>; + /* ADT has 13 slots per direction; Linux IDs alternate TX/RX. */ + dma-channels = <26>; interrupts-extended = <&aic AIC_IRQ 449 IRQ_TYPE_LEVEL_HIGH>, <0>, <0>, <0>; #dma-cells = <1>; @@ -1836,7 +1789,8 @@ admac_leap_ns: dma-controller@313300000 { compatible = "apple,t8140-admac"; reg = <0x3 0x13300000 0x0 0x34000>; - dma-channels = <9>; + /* ADT has 9 slots per direction, including loopback RX4. */ + dma-channels = <18>; interrupts-extended = <&aic AIC_IRQ 452 IRQ_TYPE_LEVEL_HIGH>, <0>, <0>, <0>; #dma-cells = <1>; @@ -2050,6 +2004,7 @@ }; #include "t8140-pmgr.dtsi" +#include "t8140-peripherals.dtsi" /* * DRAM interface class: width and maximum rate are inferred from topology diff --git a/arch/arm64/configs/asahi.config b/arch/arm64/configs/asahi.config index 2689839863cf7..d95c2bda2773c 100644 --- a/arch/arm64/configs/asahi.config +++ b/arch/arm64/configs/asahi.config @@ -41,6 +41,8 @@ CONFIG_SPI_APPLE_QSPI=m CONFIG_SPMI_APPLE=y CONFIG_PINCTRL_APPLE_GPIO=m CONFIG_GPIO_MACSMC=m +CONFIG_NFC=m +CONFIG_NFC_APPLE_STOCKHOLM=m CONFIG_POWER_RESET_MACSMC=m CONFIG_MACSMC_POWER=m CONFIG_SENSORS_MACSMC_HWMON=m diff --git a/drivers/accel/ane/ane_fw_cold.c b/drivers/accel/ane/ane_fw_cold.c index acfc4cc5aac8c..5ea7e8fc865b8 100644 --- a/drivers/accel/ane/ane_fw_cold.c +++ b/drivers/accel/ane/ane_fw_cold.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include "ane_fw_cold.h" @@ -62,6 +63,7 @@ struct ane_fw_backend { struct ane_fw_transport transport; /* Programs and their ABI 3 node, after the program stage. */ struct ane_h16_session session; + struct apple_clpc_ane *clpc; struct ane_fw_surface pool, ipc, heap; /* * For the cold boot after system sleep: the private TEXT/DATA copies, @@ -1519,10 +1521,18 @@ static void ane_fw_program_sync(void *ctx, const struct ane_fw_surface *s, bool dma_sync_single_for_cpu(b->memory, s->handle, s->size, DMA_BIDIRECTIONAL); } +static void ane_fw_program_busy(void *ctx, bool busy) +{ + struct ane_fw_backend *b = ctx; + + apple_clpc_ane_set_active(b->clpc, busy); +} + static const struct ane_h16_session_ops ane_fw_session_ops = { .map = ane_fw_program_map, .log = ane_fw_program_log, .sync = ane_fw_program_sync, + .busy = ane_fw_program_busy, }; /* @@ -1577,6 +1587,13 @@ static void ane_fw_debugfs(struct ane_fw_backend *b) dput(root); } +/* + * How long dynamic power gating stays off after the last EXECUTE, as on + * H16: toggling it around every request costs the H17 engine about 70 us + * (gate open plus gate close) of each back-to-back EXECUTE. + */ +#define ANE_FW_GATE_HOLD_NS (2 * NSEC_PER_MSEC) + static int ane_fw_program_stage(struct ane_fw_backend *b) { int ret; @@ -1586,9 +1603,16 @@ static int ane_fw_program_stage(struct ane_fw_backend *b) ANE_FW_TIMEOUT_NS); if (ret) return ret; - ret = ane_h16_accel_register(&b->pdev->dev, &b->session); + ret = apple_clpc_ane_get(&b->pdev->dev, &b->clpc); if (ret) return ret; + b->session.gate_hold_ns = ANE_FW_GATE_HOLD_NS; + ret = ane_h16_accel_register(&b->pdev->dev, &b->session); + if (ret) { + apple_clpc_ane_put(b->clpc); + b->clpc = NULL; + return ret; + } ane_fw_debugfs(b); dev_info(&b->pdev->dev, "ANE program: session and ABI 3 node ready\n"); return 0; @@ -1767,6 +1791,7 @@ static void ane_fw_observer_free(struct ane_fw_backend *b) iounmap(b->pmgr); if (b->gate) iounmap(b->gate); + apple_clpc_ane_put(b->clpc); put_device(&b->pdev->dev); kfree(b); } diff --git a/drivers/accel/ane/ane_fw_cold_test.c b/drivers/accel/ane/ane_fw_cold_test.c index 5b1f526299508..d05cb3569f3e2 100644 --- a/drivers/accel/ane/ane_fw_cold_test.c +++ b/drivers/accel/ane/ane_fw_cold_test.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only OR MIT #include #include +#include #include "ane_fw_cold.h" #include "ane_fw_sleep.h" @@ -337,7 +338,25 @@ static void ane_cold_rvbar_test(struct kunit *test) KUNIT_EXPECT_EQ(test, ane_fw_rvbar_check(0x20000000001ULL, text), ANE_FW_RVBAR_FOREIGN); } +/* The boot/transport configs intentionally leave the floor driver disabled. */ +static void ane_cold_no_clpc_test(struct kunit *test) +{ +#if !IS_REACHABLE(CONFIG_APPLE_CLPC) + struct apple_clpc_ane *ane = NULL; + struct device dev = {}; + + KUNIT_EXPECT_EQ(test, apple_clpc_ane_get(&dev, &ane), 0); + KUNIT_EXPECT_PTR_EQ(test, ane, NULL); + apple_clpc_ane_set_active(ane, true); + apple_clpc_ane_set_active(ane, false); + apple_clpc_ane_put(ane); +#else + kunit_skip(test, "CLPC enabled; absence is covered by the CLPC suite"); +#endif +} + static struct kunit_case ane_cold_cases[] = { + KUNIT_CASE(ane_cold_no_clpc_test), KUNIT_CASE(ane_cold_restartable_test), KUNIT_CASE(ane_cold_rvbar_test), KUNIT_CASE(ane_cold_sleep_test), diff --git a/drivers/accel/ane/ane_h16_boot_data.h b/drivers/accel/ane/ane_h16_boot_data.h index 0dd4b1ea91b82..e11a02c6a417d 100644 --- a/drivers/accel/ane/ane_h16_boot_data.h +++ b/drivers/accel/ane/ane_h16_boot_data.h @@ -329,6 +329,20 @@ static const struct ane_h16_preload_rule ane_h16_preload_25f84 = { }, }; +/* The 25G83 layout as iBoot leaves it on a J616C with 32 GPU cores. */ +static const struct ane_h16_preload_rule ane_h16_preload_25g83_j616c = { + .cells = ane_h16_patchbay_25g83, + .cell_count = ARRAY_SIZE(ane_h16_patchbay_25g83), + .zero_start = 0x1bc00, + .zero_end = 0x1c2a0, + .digest = { + 0xf6, 0xee, 0x81, 0x1d, 0x12, 0x55, 0xba, 0x09, + 0x99, 0x4e, 0x0f, 0xb4, 0x14, 0x66, 0x82, 0xe4, + 0xc7, 0xd5, 0x55, 0xe6, 0xca, 0x4c, 0xe5, 0x04, + 0x16, 0x6b, 0x39, 0xaf, 0x51, 0xa7, 0xc4, 0xcf, + }, +}; + /* Every supported H16 firmware build, matched against the live preload. */ static const struct ane_h16_profile ane_h16_profiles[] __maybe_unused = { { @@ -341,6 +355,11 @@ static const struct ane_h16_profile ane_h16_profiles[] __maybe_unused = { .preload = &ane_h16_preload_25g83, .build = &ane_h16_build_26a428, }, + { + .identity = "H16 26.6.2 25G83 J616C", + .preload = &ane_h16_preload_25g83_j616c, + .build = &ane_h16_build_26a428, + }, { .identity = "H16 26.5.2 25F84", .preload = &ane_h16_preload_25f84, diff --git a/drivers/base/core.c b/drivers/base/core.c index 967d9d32ee0ae..48e03974f41d6 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -1082,8 +1082,9 @@ static void device_links_missing_supplier(struct device *dev) if (link->supplier->links.status == DL_DEV_DRIVER_BOUND) { WRITE_ONCE(link->status, DL_STATE_AVAILABLE); } else { - dev_err(dev, "devices misses supplier %s\n", dev_name(link->supplier)); - WARN_ON(!device_link_test(link, DL_FLAG_SYNC_STATE_ONLY)); + WARN(!device_link_test(link, DL_FLAG_SYNC_STATE_ONLY), + "%s: supplier %s missing\n", dev_name(dev), + dev_name(link->supplier)); WRITE_ONCE(link->status, DL_STATE_DORMANT); } } diff --git a/drivers/bluetooth/btcentauri.c b/drivers/bluetooth/btcentauri.c index 5830c8b2285e4..5e229464bf047 100644 --- a/drivers/bluetooth/btcentauri.c +++ b/drivers/bluetooth/btcentauri.c @@ -786,7 +786,7 @@ static int cen_hci_send(struct hci_dev *hdev, struct sk_buff *skb) ret = -ENOBUFS; else { skb_queue_tail(queue, skb); - mod_delayed_work(system_wq, &bt->poll, 0); + mod_delayed_work(system_percpu_wq, &bt->poll, 0); } mutex_unlock(&bt->lock); if (!ret) diff --git a/drivers/gpio/gpio-macsmc.c b/drivers/gpio/gpio-macsmc.c index b9500afad3ce4..af7504a861bb7 100644 --- a/drivers/gpio/gpio-macsmc.c +++ b/drivers/gpio/gpio-macsmc.c @@ -15,6 +15,7 @@ #include #include #include +#include #define MAX_GPIO 64 @@ -35,10 +36,10 @@ #define MACSMC_J700_RADIO_REG_ON_HI 0x80000 /* - * J713 /amfm/function-reg_on is pKW4("gP13", 0x00800000). The firmware - * function preserves the template's upper 16 bits and inserts the level - * into its low 16 bits. This does not establish generic CMD_OUTPUT semantics, - * a pin-mode command, or a readback operation for this line. + * On the J713 and J715, /amfm/function-reg_on is pKW4("gP13", 0x00800000). + * The firmware function preserves the template's upper 16 bits and inserts + * the level into its low 16 bits. This does not establish generic CMD_OUTPUT + * semantics, a pin-mode command, or a readback operation for this line. */ #define MACSMC_J713_RADIO_REG_ON_GPIO 0x13 #define MACSMC_J713_RADIO_REG_ON_TEMPLATE 0x00800000 @@ -106,6 +107,11 @@ struct macsmc_gpio { bool j700_pcio; DECLARE_BITMAP(j700_pcio_level, MAX_GPIO); + DECLARE_BITMAP(pcio_template_valid, MAX_GPIO); + u32 pcio_template_lo[MAX_GPIO]; + u32 pcio_template_hi[MAX_GPIO]; + DECLARE_BITMAP(output_template_valid, MAX_GPIO); + u32 output_template[MAX_GPIO]; bool j713; struct mutex j713_reg_on_lock; @@ -118,7 +124,14 @@ static bool macsmc_gpio_is_j700_pcio(struct macsmc_gpio *smcgp, { return smcgp->j700_pcio && (offset == MACSMC_J700_AFE_RESET_GPIO || - offset == MACSMC_J700_RADIO_REG_ON_GPIO); + offset == MACSMC_J700_RADIO_REG_ON_GPIO || + test_bit(offset, smcgp->pcio_template_valid)); +} + +static bool macsmc_gpio_has_output_template(struct macsmc_gpio *smcgp, + unsigned int offset) +{ + return test_bit(offset, smcgp->output_template_valid); } static bool macsmc_gpio_is_j713_reg_on(struct macsmc_gpio *smcgp, @@ -199,7 +212,8 @@ static int macsmc_gpio_get_direction(struct gpio_chip *gc, unsigned int offset) int ret; if (macsmc_gpio_is_j700_pcio(smcgp, offset) || - macsmc_gpio_is_j713_reg_on(smcgp, offset)) + macsmc_gpio_is_j713_reg_on(smcgp, offset) || + macsmc_gpio_has_output_template(smcgp, offset)) return GPIO_LINE_DIRECTION_OUT; /* First try reading the explicit pin mode register */ @@ -230,6 +244,15 @@ static int macsmc_gpio_get(struct gpio_chip *gc, unsigned int offset) return ret; } + /* Query the SMC output latch; CMD_OUTPUT does not change the line. */ + if (macsmc_gpio_has_output_template(smcgp, offset)) { + ret = apple_smc_rw_u32(smcgp->smc, key, CMD_OUTPUT, &val); + if (ret < 0) + return ret; + + return !!val; + } + /* pcIO cannot be read back; report the last level written. */ if (macsmc_gpio_is_j700_pcio(smcgp, offset)) return test_bit(offset, smcgp->j700_pcio_level); @@ -271,6 +294,17 @@ static int macsmc_gpio_set(struct gpio_chip *gc, unsigned int offset, int value) return ret; } + if (macsmc_gpio_has_output_template(smcgp, offset)) { + ret = apple_smc_write_u32(smcgp->smc, key, + smcgp->output_template[offset] | + !!value); + if (ret < 0) + dev_err_ratelimited(smcgp->dev, + "templated GPIO %u set to %u failed: %d\n", + offset, !!value, ret); + return ret; + } + if (macsmc_gpio_is_j700_pcio(smcgp, offset)) { u32 lo, hi; u64 payload; @@ -278,6 +312,9 @@ static int macsmc_gpio_set(struct gpio_chip *gc, unsigned int offset, int value) if (offset == MACSMC_J700_RADIO_REG_ON_GPIO) { lo = MACSMC_J700_RADIO_REG_ON_LO; hi = MACSMC_J700_RADIO_REG_ON_HI; + } else if (test_bit(offset, smcgp->pcio_template_valid)) { + lo = smcgp->pcio_template_lo[offset]; + hi = smcgp->pcio_template_hi[offset]; } else { lo = MACSMC_J700_AFE_RESET_LO; hi = MACSMC_J700_AFE_RESET_HI; @@ -317,7 +354,10 @@ static int macsmc_gpio_init_valid_mask(struct gpio_chip *gc, if (smcgp->j700_pcio) { set_bit(MACSMC_J700_AFE_RESET_GPIO, valid_mask); set_bit(MACSMC_J700_RADIO_REG_ON_GPIO, valid_mask); + bitmap_or(valid_mask, valid_mask, smcgp->pcio_template_valid, + ngpios); } + bitmap_or(valid_mask, valid_mask, smcgp->output_template_valid, ngpios); for (i = 0; i < count; i++) { int ret, gpio_nr; @@ -346,6 +386,54 @@ struct macsmc_gpio_of_match_data { smc_key base_key; }; +static int macsmc_gpio_parse_templates(struct macsmc_gpio *smcgp) +{ + struct device *dev = smcgp->dev; + u32 *values; + int count, i, ret; + + count = device_property_count_u32(dev, "apple,output-templates"); + if (count > 0) { + if (count % 2) + return -EINVAL; + values = devm_kcalloc(dev, count, sizeof(*values), GFP_KERNEL); + if (!values) + return -ENOMEM; + ret = device_property_read_u32_array(dev, "apple,output-templates", + values, count); + if (ret) + return ret; + for (i = 0; i < count; i += 2) { + if (values[i] >= MAX_GPIO) + return -EINVAL; + smcgp->output_template[values[i]] = values[i + 1]; + set_bit(values[i], smcgp->output_template_valid); + } + } + + count = device_property_count_u32(dev, "apple,pcio-templates"); + if (count > 0) { + if (count % 3) + return -EINVAL; + values = devm_kcalloc(dev, count, sizeof(*values), GFP_KERNEL); + if (!values) + return -ENOMEM; + ret = device_property_read_u32_array(dev, "apple,pcio-templates", + values, count); + if (ret) + return ret; + for (i = 0; i < count; i += 3) { + if (values[i] >= MAX_GPIO) + return -EINVAL; + smcgp->pcio_template_lo[values[i]] = values[i + 1]; + smcgp->pcio_template_hi[values[i]] = values[i + 2]; + set_bit(values[i], smcgp->pcio_template_valid); + } + } + + return 0; +} + static int macsmc_gpio_probe(struct platform_device *pdev) { struct macsmc_gpio *smcgp; @@ -363,8 +451,12 @@ static int macsmc_gpio_probe(struct platform_device *pdev) smcgp->base_key = data ? data->base_key : _SMC_KEY("gP\0\0"); smcgp->j700_pcio = of_machine_is_compatible("apple,j700") && device_is_compatible(&pdev->dev, "apple,smc-gpio"); - smcgp->j713 = of_machine_is_compatible("apple,j713"); + smcgp->j713 = apple_t8132_air(); mutex_init(&smcgp->j713_reg_on_lock); + ret = macsmc_gpio_parse_templates(smcgp); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "invalid GPIO command templates\n"); smcgp->first_index = macsmc_gpio_find_first_gpio_index(smcgp); if (smcgp->first_index < 0) diff --git a/drivers/gpu/drm/apple/dcp-m4-profile.h b/drivers/gpu/drm/apple/dcp-m4-profile.h index 4cbed603d3166..8703744e1c484 100644 --- a/drivers/gpu/drm/apple/dcp-m4-profile.h +++ b/drivers/gpu/drm/apple/dcp-m4-profile.h @@ -7,6 +7,7 @@ /* Firmware 26.6.2 internal-panel ABI, qualified for the T8132/J713 handoff. */ struct dcp_m4_profile { const char *name; + const char *machine; /* machine compatible */ u32 panel_width, panel_height; u32 boot_stride; /* D101: inherited framebuffer stride */ u32 swap_size; /* A407 input */ @@ -22,10 +23,22 @@ struct dcp_m4_profile { u16 open_method; /* first client open */ u32 brightness_max, brightness_default; u32 width_mm, height_mm; + /* + * The qualified preferred timing, horizontal then vertical: Active, + * Total, FrontPorch, SyncWidth, BackPorch, PreciseSyncRate, + * SyncPolarity, PixelRepetition. NULL: none, so the panel is not + * adopted. + */ + const u32 (*timing)[8]; +}; + +static const u32 dcp_m4_timing_j713[2][8] = { + { 2560, 2640, 8, 32, 40, 6877358, 1, 0 }, + { 1664, 1749, 33, 8, 44, 3932166, 1, 0 }, }; static const struct dcp_m4_profile dcp_m4_profile_j713 = { - .name = "J713", + .name = "J713", .machine = "apple,j713", .panel_width = 2560, .panel_height = 1664, .boot_stride = 10240, .swap_size = 0x1bd8, .swap_surface = 0x588, .swap_dva = 0xe38, .swap_nullable = 0x1bcb, .swap_tail = 0x1bd6, .swap_nits = 0x35e, @@ -34,9 +47,31 @@ static const struct dcp_m4_profile dcp_m4_profile_j713 = { .done_method = 590, .done_size = 0x730, .open_method = 457, .brightness_max = 500, .brightness_default = 120, .width_mm = 0, .height_mm = 0, + .timing = dcp_m4_timing_j713, +}; + +/* + * The J715: the same firmware ABI with a 2880x1864 panel. Its timing is + * not in the ADT and has not been read from a J715 DCP yet. + */ +static const struct dcp_m4_profile dcp_m4_profile_j715 = { + .name = "J715", .machine = "apple,j715", + .panel_width = 2880, .panel_height = 1864, .boot_stride = 11520, + .swap_size = 0x1bd8, .swap_surface = 0x588, .swap_dva = 0xe38, + .swap_nullable = 0x1bcb, .swap_tail = 0x1bd6, .swap_nits = 0x35e, + .swap_intent = 0x17c, + .disabled_color = 0xff000000, + .done_method = 590, .done_size = 0x730, .open_method = 457, + .brightness_max = 500, .brightness_default = 120, + .width_mm = 0, .height_mm = 0, +}; + +static const struct dcp_m4_profile *const dcp_m4_profiles[] = { + &dcp_m4_profile_j713, + &dcp_m4_profile_j715, }; -/* This generation backend admits one qualified internal-panel ABI. */ -static const struct dcp_m4_profile *const dcp_m4_pf = &dcp_m4_profile_j713; +/* The machine's profile, set before the first DCP session starts. */ +extern const struct dcp_m4_profile *dcp_m4_pf; #endif diff --git a/drivers/gpu/drm/apple/dcp-m4-timing.h b/drivers/gpu/drm/apple/dcp-m4-timing.h index e85908b659a77..b8eabc880c7be 100644 --- a/drivers/gpu/drm/apple/dcp-m4-timing.h +++ b/drivers/gpu/drm/apple/dcp-m4-timing.h @@ -12,7 +12,7 @@ #define DCP_M4_TIMING_TOKENS 2048 -/* The first qualified J713 physical mode, not a generic panel-mode fallback. */ +/* The profile's qualified physical mode, not a generic panel-mode fallback. */ struct dcp_m4_timing { u32 id, color_id; u32 hdisplay, hsync_start, hsync_end, htotal; @@ -148,12 +148,11 @@ static inline int dcp_m4_timing_axis(const struct dcp_m4_timing_parser *p, "Active", "Total", "FrontPorch", "SyncWidth", "BackPorch", "PreciseSyncRate", "SyncPolarity", "PixelRepetition", }; - static const u32 values[2][8] = { - { 2560, 2640, 8, 32, 40, 6877358, 1, 0 }, - { 1664, 1749, 33, 8, 44, 3932166, 1, 0 }, - }; + const u32 (*values)[8] = dcp_m4_pf->timing; int axis = dcp_m4_timing_field(p, mode, name, 1); + if (!values) + return -ENODEV; if (axis < 0) return axis; for (unsigned int i = 0; i < 8; i++) @@ -171,7 +170,10 @@ static inline int dcp_m4_parse_timing(const void *data, size_t size, struct dcp_ }; static const u32 color_values[] = { 1, 8, 0, 0, 0, 16, 0 }; int ret = -EINVAL, colors, color; + const u32 *h, *v; + if (!dcp_m4_pf->timing) + return -ENODEV; if (!data || !out || size < 4 || size > (1U << 20) || get_unaligned_le32(data) != 0xd3) return -EINVAL; p = kzalloc(sizeof(*p), GFP_KERNEL); @@ -207,12 +209,16 @@ static inline int dcp_m4_parse_timing(const void *data, size_t size, struct dcp_ for (unsigned int i = 0; i < 7; i++) if (!dcp_m4_timing_equals(p, color, color_fields[i], 4, color_values[i])) goto done; + h = dcp_m4_pf->timing[0]; + v = dcp_m4_pf->timing[1]; *out = (struct dcp_m4_timing) { .id = 2, .color_id = 1, - .hdisplay = 2560, .hsync_start = 2568, .hsync_end = 2600, .htotal = 2640, - .vdisplay = 1664, .vsync_start = 1697, .vsync_end = 1705, .vtotal = 1749, - .clock_khz = ((2640ULL * 1749 * 3932166 >> 16) + 500) / 1000, - .refresh_16_16 = 3932166, + .hdisplay = h[0], .hsync_start = h[0] + h[2], + .hsync_end = h[0] + h[2] + h[3], .htotal = h[1], + .vdisplay = v[0], .vsync_start = v[0] + v[2], + .vsync_end = v[0] + v[2] + v[3], .vtotal = v[1], + .clock_khz = (((u64)h[1] * v[1] * v[5] >> 16) + 500) / 1000, + .refresh_16_16 = v[5], }; ret = 0; done: diff --git a/drivers/gpu/drm/apple/iomfb_m4.c b/drivers/gpu/drm/apple/iomfb_m4.c index 3e639595accda..2ffde863b8fac 100644 --- a/drivers/gpu/drm/apple/iomfb_m4.c +++ b/drivers/gpu/drm/apple/iomfb_m4.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR MIT /* - * Apple DCP firmware 26.6.2 (T8132/J713). + * Apple DCP firmware 26.6.2 (T8132/J713, J715). * * The appledrm component and KMS paths own this controller. This backend owns * only its generation-specific EP37 RPC ABI and retained firmware session. @@ -56,6 +56,16 @@ #include "parser.h" #include "t8132_ext_drm.h" +const struct dcp_m4_profile *dcp_m4_pf = &dcp_m4_profile_j713; + +static const struct dcp_m4_profile *dcp_m4_machine_profile(void) +{ + for (unsigned int i = 0; i < ARRAY_SIZE(dcp_m4_profiles); i++) + if (of_machine_is_compatible(dcp_m4_profiles[i]->machine)) + return dcp_m4_profiles[i]; + return NULL; +} + static unsigned int idle_cache_ms = 1000; static int idle_cache_ms_set(const char *val, const struct kernel_param *kp) @@ -2528,6 +2538,7 @@ int iomfb_m4_init(struct apple_dcp *owner) struct device *dev = owner->dev; struct iomfb_m4 *dcp; struct resource *res; + const struct dcp_m4_profile *pf = dcp_m4_machine_profile(); const char *uuid; u32 ready = 0; int ret; @@ -2538,13 +2549,17 @@ int iomfb_m4_init(struct apple_dcp *owner) (of_property_read_u32(dev->of_node, "apple,t8132-dcpext-firmware-ready", &ready) || ready != 1)) return dev_err_probe(dev, -ENODEV, "external DCP not handed over\n"); - if (!of_machine_is_compatible("apple,j713") || + if (!pf || (!external && !of_device_is_compatible(dev->of_node, "apple,t8132-dcp")) || !iomfb_m4_firmware_property(dev->of_node, "apple,firmware-version") || !iomfb_m4_firmware_property(dev->of_node, "apple,firmware-compat") || of_property_read_string(dev->of_node, "apple,firmware-uuid", &uuid) || strcmp(uuid, "81BAF476-679D-3CC0-8C6A-E6B6FA659D5E")) return dev_err_probe(dev, -ENODEV, "unqualified firmware 26.6.2 handoff\n"); + /* Refuse before any message, so the boot framebuffer stays. */ + if (!external && !pf->timing) + return dev_err_probe(dev, -ENODEV, "no qualified %s panel timing\n", pf->name); + dcp_m4_pf = pf; ret = dcp_m4_dart_check(dev); if (ret) return dev_err_probe(dev, ret, "inherited SID23 domain not qualified\n"); diff --git a/drivers/gpu/drm/apple/t8132_ext_drm.c b/drivers/gpu/drm/apple/t8132_ext_drm.c index f6cc2f7767190..e41adac648874 100644 --- a/drivers/gpu/drm/apple/t8132_ext_drm.c +++ b/drivers/gpu/drm/apple/t8132_ext_drm.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -527,7 +528,7 @@ static void t8132_ext_crtc_flush(struct drm_crtc *crtc, struct drm_atomic_commit if (READ_ONCE(out->dying)) t8132_ext_send_event(out); else - mod_delayed_work(system_wq, &out->flip_work, + mod_delayed_work(system_percpu_wq, &out->flip_work, ret >= 0 ? 0 : msecs_to_jiffies(16)); } } @@ -1089,7 +1090,7 @@ int t8132_ext_drm_init(struct drm_device *drm) bool mine, reg; int ret = 0; - if (!of_machine_is_compatible("apple,j713")) + if (!apple_t8132_air()) return 0; /* Sleep handling for the outputs of one DRM device only. */ mutex_lock(&t8132_ext_reg_lock); diff --git a/drivers/iommu/apple-dart-dcp-format.h b/drivers/iommu/apple-dart-dcp-format.h index 124f20977afd7..b47db0f65e29b 100644 --- a/drivers/iommu/apple-dart-dcp-format.h +++ b/drivers/iommu/apple-dart-dcp-format.h @@ -157,7 +157,9 @@ static inline int dcp_adt_value(struct dcp_adt_tables *out, if (kind == 1 && !strcmp(name, "target-type")) { bit = 1; - if (length != 5 || memcmp(value, "J713", 5)) + /* The M4 Airs share the retained display handoff. */ + if (length != 5 || + (memcmp(value, "J713", 5) && memcmp(value, "J715", 5))) return -ENODEV; } else if (kind == 3 && !strcmp(name, "compatible")) { bit = 2; diff --git a/drivers/iommu/apple-dart.c b/drivers/iommu/apple-dart.c index 1234b4a771e7a..2d332ea3abff9 100644 --- a/drivers/iommu/apple-dart.c +++ b/drivers/iommu/apple-dart.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -3493,7 +3494,7 @@ static int apple_dart_def_domain_type(struct device *dev) */ if (cfg->stream_maps[0].dart->tunneled) return IOMMU_DOMAIN_DMA; - if (dev_is_pci(dev) && of_machine_is_compatible("apple,j713") && + if (dev_is_pci(dev) && apple_t8132_air() && cfg->supports_bypass && !cfg->locked) return IOMMU_DOMAIN_IDENTITY; if (!cfg->supports_bypass) @@ -4111,24 +4112,24 @@ static int apple_dart_probe(struct platform_device *pdev) bool j713_display, j713_dcpext, j713_dispext, j713_radio; /* - * The J713 internal display DARTs are live: DCP firmware (SID23) and - * the scanout/PIODMA frontend (SID0/SID16) keep using them. Leave both - * untouched until userspace, with its watchdog armed, opts in. + * The J713/J715 internal display DARTs are live: DCP firmware (SID23) + * and the scanout/PIODMA frontend (SID0/SID16) keep using them. Leave + * both untouched until userspace, with its watchdog armed, opts in. */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - j713_display = res && !tunneled && of_machine_is_compatible("apple,j713") && + j713_display = res && !tunneled && apple_t8132_air() && of_device_is_compatible(dev->of_node, "apple,t8132-dart") && (res->start == 0x30a300000ULL || res->start == 0x30a340000ULL); /* The external DCP firmware DARTs (SID23) of dcpext0 and dcpext1. */ - j713_dcpext = res && !tunneled && of_machine_is_compatible("apple,j713") && + j713_dcpext = res && !tunneled && apple_t8132_air() && of_device_is_compatible(dev->of_node, "apple,t8132-dart") && (res->start == 0x286340000ULL || res->start == 0x48a340000ULL); /* The external display DARTs (SID0/SID16) of dispext0 and dispext1. */ - j713_dispext = res && !tunneled && of_machine_is_compatible("apple,j713") && + j713_dispext = res && !tunneled && apple_t8132_air() && of_device_is_compatible(dev->of_node, "apple,t8132-dart") && (res->start == 0x286300000ULL || res->start == 0x48a300000ULL); - /* The J713 radio DART's fault interrupt is not described by its loader. */ - j713_radio = res && !tunneled && of_machine_is_compatible("apple,j713") && + /* The radio DART's fault interrupt is not described by the loader. */ + j713_radio = res && !tunneled && apple_t8132_air() && of_machine_is_compatible("apple,t8132") && of_device_is_compatible(dev->of_node, "apple,t8132-dart") && res->start == 0x490000000ULL; @@ -4531,8 +4532,7 @@ static int apple_dart_probe(struct platform_device *pdev) of_node_put(iommu); of_node_put(mtp); } - if (of_machine_is_compatible("apple,j713") && - of_machine_is_compatible("apple,t8132") && + if (apple_t8132_air() && of_machine_is_compatible("apple,t8132") && res->start == 0x394800000ULL && dart->hw->type == DART_T8110 && !dart->locked && !tunneled && dart->supports_bypass && apple_dart_streams_bypassed(dart)) { diff --git a/drivers/media/platform/apple/avd/avd-av1.c b/drivers/media/platform/apple/avd/avd-av1.c index d5d3207deaa0b..8ea584fbcbe4c 100644 --- a/drivers/media/platform/apple/avd/avd-av1.c +++ b/drivers/media/platform/apple/avd/avd-av1.c @@ -1396,10 +1396,39 @@ static void update_dec_buf_info(struct avd_decoded_buffer *buf, buf->av1.ref_frame_idx[i] = frame->ref_frame_idx[i]; } +/* The engine fetches each tile from these: bad values make it read wild addresses. */ +static int avd_av1_check_tiles(struct avd_ctx *ctx, struct avd_av1_run *run, + unsigned int entries) +{ + unsigned int tiles = run->frame->tile_info.tile_cols * + run->frame->tile_info.tile_rows; + unsigned int t; + size_t payload; + + if (entries < tiles) { + dev_err_ratelimited(ctx->dev->dev, "AV1: %u tiles but %u tile entries\n", + tiles, entries); + return -EINVAL; + } + if (!tiles) + return 0; + payload = vb2_get_plane_payload(&run->base.bufs.src->vb2_buf, 0); + for (t = 0; t < tiles; t++) { + const struct v4l2_ctrl_av1_tile_group_entry *e = &run->tile_group[t]; + + if ((u64)e->tile_offset + e->tile_size > payload) { + dev_err_ratelimited(ctx->dev->dev, "AV1: tile %u at %u+%u past %zu bytes\n", + t, e->tile_offset, e->tile_size, payload); + return -EINVAL; + } + } + return 0; +} + static int avd_av1_run_preamble(struct avd_ctx *ctx, struct avd_av1_run *run) { struct v4l2_ctrl *ctrl; - int dst_len, tlb_len; + int dst_len, ret, tlb_len; avd_run_preamble(ctx, &run->base); @@ -1436,6 +1465,9 @@ static int avd_av1_run_preamble(struct avd_ctx *ctx, struct avd_av1_run *run) if (WARN_ON(!ctrl)) return -EINVAL; run->tile_group = ctrl->p_cur.p; + ret = avd_av1_check_tiles(ctx, run, ctrl->elems); + if (ret) + return ret; ctrl = v4l2_ctrl_find(&ctx->ctrl_hdl, V4L2_CID_STATELESS_AV1_FILM_GRAIN); diff --git a/drivers/media/platform/apple/avd/avd-drv.c b/drivers/media/platform/apple/avd/avd-drv.c index 2cba04cd6f443..b6e071493a9ae 100644 --- a/drivers/media/platform/apple/avd/avd-drv.c +++ b/drivers/media/platform/apple/avd/avd-drv.c @@ -548,7 +548,7 @@ static const struct avd_variant avd_t6041_variant = { .submit_offset = 0x40, .submit_queue_max_offset = 0x44, .submit_queue_status_offset = 0x7c, - .quirks = AVD_QUIRK_HEVC_V5_HEADER, + .quirks = AVD_QUIRK_HEVC_V5_HEADER | AVD_QUIRK_NO_RECOVERY_RESET, }; /* diff --git a/drivers/media/platform/apple/avd/avd-pm.c b/drivers/media/platform/apple/avd/avd-pm.c index 01b9069e113ab..d6b45ba78e844 100644 --- a/drivers/media/platform/apple/avd/avd-pm.c +++ b/drivers/media/platform/apple/avd/avd-pm.c @@ -336,6 +336,15 @@ int avd_pm_recover(struct avd_dev *avd) ret = avd_pm_park(avd); if (ret) return ret; + /* + * On the J616C the machine hangs right after this reset, while the + * decoder's DART domain is restored. The cause is not known yet, so + * stay parked: players fall back to software. + */ + if (avd->variant && avd->variant->quirks & AVD_QUIRK_NO_RECOVERY_RESET) { + dev_err(avd->dev, "recover: staying parked, no reset on this SoC\n"); + return -EIO; + } dev_warn(avd->dev, "recover: reset\n"); ret = reset_control_reset(avd->rstc); if (ret) { diff --git a/drivers/media/platform/apple/avd/avd.h b/drivers/media/platform/apple/avd/avd.h index 1313a07e00389..d187639ddedf3 100644 --- a/drivers/media/platform/apple/avd/avd.h +++ b/drivers/media/platform/apple/avd/avd.h @@ -43,6 +43,8 @@ #define AVD_QUIRK_V5_QUEUE_PACING BIT(3) /* H.264 co-located motion vectors take 128 bytes per macroblock, not 64. */ #define AVD_QUIRK_H264_MV_128 BIT(4) +/* A reset after a timeout hangs the machine: stay parked and retire the decoder */ +#define AVD_QUIRK_NO_RECOVERY_RESET BIT(5) #define VP_SLOT_NONE 255 #define INST_FIFO_SLOT_NONE 255 diff --git a/drivers/media/platform/apple/avd/tests/av1-test.py b/drivers/media/platform/apple/avd/tests/av1-test.py index 661eb982f30a5..b073c8929fe69 100644 --- a/drivers/media/platform/apple/avd/tests/av1-test.py +++ b/drivers/media/platform/apple/avd/tests/av1-test.py @@ -73,9 +73,11 @@ static bool vp_feature=true; static bool avd_qfw_has_vp_done(const struct avd_dev *d){return d->queued&&vp_feature;} static void *vb2_plane_vaddr(struct vb2_buffer *b,int p){(void)p;return b->cpu;} +/* The tests' single tile entry lies inside the first MiB of the bitstream buffer. */ +static unsigned long vb2_get_plane_payload(struct vb2_buffer *b,unsigned int p){(void)b;(void)p;return 1UL<<20;} static struct vb2_v4l2_buffer *current_src,*current_dst; static struct vb2_v4l2_buffer *v4l2_m2m_next_src_buf(void *m){(void)m;return current_src;} -struct v4l2_ctrl {unsigned int id; union {void *p;} p_cur;}; +struct v4l2_ctrl {unsigned int id; unsigned int elems; union {void *p;} p_cur;}; struct v4l2_ctrl_ref {struct v4l2_ctrl_ref *next; struct v4l2_ctrl *ctrl; bool p_req_valid; union {void *p;} p_req;}; struct v4l2_ctrl_handler {struct v4l2_ctrl_ref *ctrl_refs;}; #define list_for_each_entry(ref,head,node) for((ref)=*(head);(ref);(ref)=(ref)->next) @@ -90,7 +92,7 @@ static struct v4l2_ctrl_handler *v4l2_ctrl_request_hdl_find(void *req,void *h){(void)h;assert(req==&request_hdl);request_gets++;return &request_hdl;} static void v4l2_ctrl_request_hdl_put(struct v4l2_ctrl_handler *h){assert(h==&request_hdl);request_puts++;} static struct v4l2_ctrl *v4l2_ctrl_find(void *h,u32 id){ - (void)h;controls[0].p_cur.p=&seq;controls[1].p_cur.p=¶ms;controls[2].p_cur.p=&tile;controls[3].p_cur.p=&grain; + (void)h;controls[0].p_cur.p=&seq;controls[1].p_cur.p=¶ms;controls[2].p_cur.p=&tile;controls[2].elems=1;controls[3].p_cur.p=&grain; if(id==V4L2_CID_STATELESS_AV1_SEQUENCE)return &controls[0]; if(id==V4L2_CID_STATELESS_AV1_FRAME)return &controls[1]; if(id==V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY)return &controls[2]; diff --git a/drivers/nfc/.kunitconfig b/drivers/nfc/.kunitconfig new file mode 100644 index 0000000000000..970a8fbf55db4 --- /dev/null +++ b/drivers/nfc/.kunitconfig @@ -0,0 +1,9 @@ +CONFIG_KUNIT=y +CONFIG_NET=y +CONFIG_ARCH_APPLE=y +CONFIG_OF=y +CONFIG_GPIOLIB=y +CONFIG_SPMI=y +CONFIG_NFC=y +CONFIG_NFC_APPLE_STOCKHOLM=y +CONFIG_NFC_APPLE_STOCKHOLM_KUNIT_TEST=y diff --git a/drivers/nfc/Kconfig b/drivers/nfc/Kconfig index 288c6f1c69792..1594e97234866 100644 --- a/drivers/nfc/Kconfig +++ b/drivers/nfc/Kconfig @@ -60,6 +60,30 @@ config NFC_VIRTUAL_NCI If unsure, say N. +config NFC_APPLE_STOCKHOLM + tristate "Apple Stockholm NFC controller and Secure Element" + depends on SPMI && GPIOLIB && OF + depends on ARCH_APPLE || COMPILE_TEST + help + This enables the driver for the Apple Stockholm NFC controller with + embedded Secure Element found on Apple silicon Macs, connected over + SPMI. The Mac parts have no NFC radio interfaces, so no NFC device + is registered: the driver reads the controller identity once and + keeps the controller powered off. + + Say M here to compile this driver as a module named apple-stockholm. + +config NFC_APPLE_STOCKHOLM_KUNIT_TEST + bool "KUnit tests for the Apple Stockholm driver" if !KUNIT_ALL_TESTS + depends on NFC_APPLE_STOCKHOLM && KUNIT + depends on KUNIT=y || NFC_APPLE_STOCKHOLM=m + default KUNIT_ALL_TESTS + help + Tests for the parsing of the NCI identity responses, built into the + apple-stockholm driver. + + If unsure, say N. + source "drivers/nfc/fdp/Kconfig" source "drivers/nfc/pn544/Kconfig" source "drivers/nfc/pn533/Kconfig" diff --git a/drivers/nfc/Makefile b/drivers/nfc/Makefile index 7b1bfde1d971a..dafe12aae6922 100644 --- a/drivers/nfc/Makefile +++ b/drivers/nfc/Makefile @@ -18,3 +18,4 @@ obj-$(CONFIG_NFC_NXP_NCI) += nxp-nci/ obj-$(CONFIG_NFC_S3FWRN5) += s3fwrn5/ obj-$(CONFIG_NFC_ST95HF) += st95hf/ obj-$(CONFIG_NFC_VIRTUAL_NCI) += virtual_ncidev.o +obj-$(CONFIG_NFC_APPLE_STOCKHOLM) += apple-stockholm.o diff --git a/drivers/nfc/apple-stockholm-test.c b/drivers/nfc/apple-stockholm-test.c new file mode 100644 index 0000000000000..3e0c9644f9668 --- /dev/null +++ b/drivers/nfc/apple-stockholm-test.c @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * KUnit tests for the Apple Stockholm NCI identity parsing + * + * The responses are the ones the J616s and the J700 controllers returned. + * + * Copyright The Aurora Silicon Contributors + */ + +#include + +static const u8 stockholm_test_reset_rsp[] = { 0x00, 0x10, 0x01 }; + +static const u8 stockholm_test_init_j616s[] = { + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, + 0xff, 0x02, 0x00, 0x04, 0x60, 0x01, 0x01, 0x41, +}; + +static const u8 stockholm_test_init_j700[] = { + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x00, + 0xff, 0x02, 0x00, 0x04, 0x60, 0x01, 0x01, 0x37, +}; + +/* A reader-class response: frame and ISO-DEP RF interfaces. */ +static const u8 stockholm_test_init_rf[] = { + 0x00, 0x03, 0x1e, 0x03, 0x00, 0x02, 0x01, 0x02, 0x01, 0x00, + 0x02, 0xff, 0x00, 0x01, 0x04, 0x11, 0x22, 0x33, 0x44, +}; + +static void stockholm_test_reset(struct kunit *test) +{ + struct stockholm_ident id = {}; + int ret; + + ret = stockholm_parse_reset_rsp(stockholm_test_reset_rsp, + sizeof(stockholm_test_reset_rsp), &id); + KUNIT_ASSERT_EQ(test, ret, 0); + KUNIT_EXPECT_EQ(test, id.nci_version, 0x10); +} + +static void stockholm_test_reset_errors(struct kunit *test) +{ + static const u8 failed[] = { 0x03, 0x10, 0x01 }; + static const u8 nci2[] = { 0x00 }; + struct stockholm_ident id = {}; + + KUNIT_EXPECT_EQ(test, stockholm_parse_reset_rsp(failed, sizeof(failed), &id), + -EIO); + KUNIT_EXPECT_EQ(test, stockholm_parse_reset_rsp(nci2, sizeof(nci2), &id), + -EOPNOTSUPP); + KUNIT_EXPECT_EQ(test, stockholm_parse_reset_rsp(nci2, 0, &id), -EIO); +} + +static void stockholm_test_init_macs(struct kunit *test) +{ + struct stockholm_ident id = {}; + int ret; + + ret = stockholm_parse_init_rsp(stockholm_test_init_j616s, + sizeof(stockholm_test_init_j616s), &id); + KUNIT_ASSERT_EQ(test, ret, 0); + KUNIT_EXPECT_EQ(test, id.rf_interfaces, 0); + KUNIT_EXPECT_EQ(test, id.manufacturer, 0x04); + KUNIT_EXPECT_EQ(test, id.firmware, 0x41010160); + + ret = stockholm_parse_init_rsp(stockholm_test_init_j700, + sizeof(stockholm_test_init_j700), &id); + KUNIT_ASSERT_EQ(test, ret, 0); + KUNIT_EXPECT_EQ(test, id.rf_interfaces, 0); + KUNIT_EXPECT_EQ(test, id.firmware, 0x37010160); +} + +static void stockholm_test_init_rf_list(struct kunit *test) +{ + struct stockholm_ident id = {}; + int ret; + + ret = stockholm_parse_init_rsp(stockholm_test_init_rf, + sizeof(stockholm_test_init_rf), &id); + KUNIT_ASSERT_EQ(test, ret, 0); + KUNIT_EXPECT_EQ(test, id.rf_interfaces, 2); + KUNIT_EXPECT_EQ(test, id.manufacturer, 0x04); + KUNIT_EXPECT_EQ(test, id.firmware, 0x44332211); +} + +static void stockholm_test_init_errors(struct kunit *test) +{ + u8 rsp[sizeof(stockholm_test_init_j616s)]; + struct stockholm_ident id = {}; + int len, ret; + + /* Every truncation, down to an empty payload, is rejected. */ + for (len = 0; len < (int)sizeof(stockholm_test_init_j616s); len++) { + ret = stockholm_parse_init_rsp(stockholm_test_init_j616s, len, &id); + KUNIT_EXPECT_EQ(test, ret, -EIO); + } + + memcpy(rsp, stockholm_test_init_j616s, sizeof(rsp)); + rsp[0] = 0x03; + KUNIT_EXPECT_EQ(test, stockholm_parse_init_rsp(rsp, sizeof(rsp), &id), -EIO); + + /* An RF interface count that runs past the payload. */ + memcpy(rsp, stockholm_test_init_j616s, sizeof(rsp)); + rsp[STOCKHOLM_INIT_RSP_RF_COUNT] = 0xff; + KUNIT_EXPECT_EQ(test, stockholm_parse_init_rsp(rsp, sizeof(rsp), &id), -EIO); +} + +static struct kunit_case stockholm_test_cases[] = { + KUNIT_CASE(stockholm_test_reset), + KUNIT_CASE(stockholm_test_reset_errors), + KUNIT_CASE(stockholm_test_init_macs), + KUNIT_CASE(stockholm_test_init_rf_list), + KUNIT_CASE(stockholm_test_init_errors), + {} +}; + +static struct kunit_suite stockholm_test_suite = { + .name = "apple-stockholm", + .test_cases = stockholm_test_cases, +}; + +kunit_test_suite(stockholm_test_suite); diff --git a/drivers/nfc/apple-stockholm.c b/drivers/nfc/apple-stockholm.c new file mode 100644 index 0000000000000..d4810655bfc81 --- /dev/null +++ b/drivers/nfc/apple-stockholm.c @@ -0,0 +1,464 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Apple Stockholm NFC controller and embedded Secure Element over SPMI + * + * Stockholm is an NCI controller with an embedded Secure Element. On the + * Macs it sits on its own SPMI bus and is enabled through an SMC GPIO (VEN). + * The Mac parts report no RF interfaces and no listen-mode routing in + * CORE_INIT, so there is no NFC reader to offer the NFC core: the controller + * only fronts the Secure Element. This driver checks that the follower is + * present, reads the controller identity once and then holds the controller + * in its deepest power state (VEN low) for the life of the system. + * + * Copyright The Aurora Silicon Contributors + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define STOCKHOLM_FIFO_CHUNK 8 +#define STOCKHOLM_NCI_TIMEOUT_MS 500 + +#define STOCKHOLM_ERROR_STATUS0_REG 0x4 +#define STOCKHOLM_ERROR_STATUS1_REG 0x7 +#define STOCKHOLM_ERROR_STATUS2_REG 0x8 + +/* NCI 1.x CORE_INIT_RSP: status, 4 feature bytes, RF interface count. */ +#define STOCKHOLM_INIT_RSP_RF_COUNT 5 +/* After the RF list: connections, routing (2), control size, large (2). */ +#define STOCKHOLM_INIT_RSP_TAIL 6 +#define STOCKHOLM_INIT_RSP_MANUF_LEN 5 + +/* Transport parameters of one controller model. */ +struct stockholm_model { + u16 tx_reg; /* non-incrementing NCI transmit FIFO */ + u16 rx_reg; /* non-incrementing NCI receive FIFO */ + u16 id_reg; /* follower ID, side-effect-free read */ + u16 irq_reg; /* follower IRQ base, side-effect-free read */ + u16 standby_reg; /* follower virtual command register */ + u8 follower_id; /* expected value of id_reg */ + u8 irq_base; /* expected value of irq_reg */ + u8 standby_off; + u32 startup_delay_us; +}; + +static const struct stockholm_model stockholm_model96 = { + .tx_reg = 0x1000, + .rx_reg = 0x80, + .id_reg = 0x100, + .irq_reg = 0x105, + .standby_reg = 0x0, + .follower_id = 0x19, + .irq_base = 0xe0, + .standby_off = 0x14, + .startup_delay_us = 10000, +}; + +struct stockholm { + struct spmi_device *sdev; + const struct stockholm_model *model; + struct gpio_desc *enable_gpio; + int data_irq; + int error_irq; + + /* Serialises FIFO access and the awaited-response state below. */ + struct mutex io_lock; + struct completion rx_done; + bool rx_waiting; + u8 rx_hdr[2]; /* awaited packet: MT/GID and OID bytes */ + u8 rx_len; + u8 rx_payload[NCI_MAX_PAYLOAD_SIZE]; + u8 pkt[NCI_CTRL_HDR_SIZE + NCI_MAX_PAYLOAD_SIZE]; +}; + +static int stockholm_fifo_read(struct stockholm *st, u8 *buf, size_t len) +{ + size_t chunk; + int ret; + + while (len) { + chunk = min_t(size_t, len, STOCKHOLM_FIFO_CHUNK); + ret = spmi_ext_register_readl(st->sdev, st->model->rx_reg, buf, + chunk); + if (ret) + return ret; + buf += chunk; + len -= chunk; + } + + return 0; +} + +static int stockholm_fifo_write(struct stockholm *st, const u8 *buf, size_t len) +{ + size_t chunk; + int ret; + + while (len) { + chunk = min_t(size_t, len, STOCKHOLM_FIFO_CHUNK); + ret = spmi_ext_register_writel(st->sdev, st->model->tx_reg, + buf, chunk); + if (ret) + return ret; + buf += chunk; + len -= chunk; + } + + return 0; +} + +static int stockholm_standby_off(struct stockholm *st) +{ + u8 value = st->model->standby_off; + + return spmi_ext_register_writel(st->sdev, st->model->standby_reg, + &value, 1); +} + +static int stockholm_power_on(struct stockholm *st) +{ + u32 delay = st->model->startup_delay_us; + int ret; + + ret = gpiod_direction_output(st->enable_gpio, 1); + if (ret) + return ret; + + usleep_range(delay, delay + delay / 10); + ret = stockholm_standby_off(st); + if (ret) + dev_dbg(&st->sdev->dev, "standby exit failed: %d\n", ret); + + return 0; +} + +static int stockholm_park(struct stockholm *st) +{ + int ret; + + ret = stockholm_standby_off(st); + if (ret) + dev_dbg(&st->sdev->dev, "standby disable failed: %d\n", ret); + + return gpiod_direction_output(st->enable_gpio, 0); +} + +static irqreturn_t stockholm_data_irq(int irq, void *data) +{ + struct stockholm *st = data; + u8 *hdr = st->pkt; + u8 plen = 0; + int ret; + + mutex_lock(&st->io_lock); + ret = stockholm_fifo_read(st, hdr, NCI_CTRL_HDR_SIZE); + if (!ret) { + plen = nci_plen(hdr); + ret = stockholm_fifo_read(st, hdr + NCI_CTRL_HDR_SIZE, plen); + } + if (ret) { + mutex_unlock(&st->io_lock); + dev_err_ratelimited(&st->sdev->dev, "NCI receive failed: %d\n", + ret); + return IRQ_HANDLED; + } + + /* Ignore the packet boundary flag; match MT, GID and OID. */ + if (st->rx_waiting && (hdr[0] & 0xef) == st->rx_hdr[0] && + (hdr[1] & 0x3f) == st->rx_hdr[1]) { + memcpy(st->rx_payload, hdr + NCI_CTRL_HDR_SIZE, plen); + st->rx_len = plen; + st->rx_waiting = false; + complete(&st->rx_done); + } else { + dev_dbg(&st->sdev->dev, "dropped NCI packet %02x %02x len %u\n", + hdr[0], hdr[1], plen); + } + mutex_unlock(&st->io_lock); + + return IRQ_HANDLED; +} + +static irqreturn_t stockholm_error_irq(int irq, void *data) +{ + struct stockholm *st = data; + u8 status[3]; + int ret; + + mutex_lock(&st->io_lock); + ret = spmi_ext_register_readl(st->sdev, STOCKHOLM_ERROR_STATUS0_REG, + &status[0], 1); + if (!ret) + ret = spmi_ext_register_readl(st->sdev, + STOCKHOLM_ERROR_STATUS1_REG, + &status[1], 1); + if (!ret) + ret = spmi_ext_register_readl(st->sdev, + STOCKHOLM_ERROR_STATUS2_REG, + &status[2], 1); + mutex_unlock(&st->io_lock); + + if (ret) + dev_err_ratelimited(&st->sdev->dev, + "transport error, status read failed: %d\n", + ret); + else + dev_err_ratelimited(&st->sdev->dev, + "transport error, status %02x/%02x/%02x\n", + status[0], status[1], status[2]); + + return IRQ_HANDLED; +} + +/* + * Send one NCI control command and wait for its response. Returns the + * response payload length; the payload is left in st->rx_payload. + */ +static int stockholm_nci_cmd(struct stockholm *st, u16 opcode, + const u8 *payload, u8 plen) +{ + u8 cmd[NCI_CTRL_HDR_SIZE + 2] = {}; + unsigned long left; + int ret; + + if (plen > sizeof(cmd) - NCI_CTRL_HDR_SIZE) + return -EINVAL; + + cmd[0] = nci_opcode_gid(opcode); + nci_mt_set(cmd, NCI_MT_CMD_PKT); + cmd[1] = nci_opcode_oid(opcode); + cmd[2] = plen; + if (plen) + memcpy(cmd + NCI_CTRL_HDR_SIZE, payload, plen); + + mutex_lock(&st->io_lock); + reinit_completion(&st->rx_done); + st->rx_hdr[0] = (NCI_MT_RSP_PKT << 5) | nci_opcode_gid(opcode); + st->rx_hdr[1] = nci_opcode_oid(opcode); + st->rx_waiting = true; + ret = stockholm_fifo_write(st, cmd, NCI_CTRL_HDR_SIZE + plen); + if (ret) + st->rx_waiting = false; + mutex_unlock(&st->io_lock); + if (ret) + return ret; + + left = msecs_to_jiffies(STOCKHOLM_NCI_TIMEOUT_MS); + left = wait_for_completion_timeout(&st->rx_done, left); + + mutex_lock(&st->io_lock); + if (!left && st->rx_waiting) { + st->rx_waiting = false; + ret = -ETIMEDOUT; + } else { + ret = st->rx_len; + } + mutex_unlock(&st->io_lock); + + return ret; +} + +/* What CORE_RESET and CORE_INIT report about the controller. */ +struct stockholm_ident { + u8 nci_version; + u8 manufacturer; + u8 rf_interfaces; + u32 firmware; +}; + +/* NCI 1.x CORE_RESET_RSP payload: status, NCI version, configuration status. */ +static int stockholm_parse_reset_rsp(const u8 *rsp, int len, + struct stockholm_ident *id) +{ + if (len < 1 || rsp[0] != NCI_STATUS_OK) + return -EIO; + /* NCI 2.x answers with the status only and reports in a notification. */ + if (len != 3) + return -EOPNOTSUPP; + + id->nci_version = rsp[1]; + return 0; +} + +/* + * NCI 1.x CORE_INIT_RSP payload: status, features (4), RF interface count and + * list, logical connections, routing table size (2), control payload size, + * large parameter size (2), manufacturer ID, manufacturer data (4). + */ +static int stockholm_parse_init_rsp(const u8 *rsp, int len, + struct stockholm_ident *id) +{ + unsigned int tail; + + if (len <= STOCKHOLM_INIT_RSP_RF_COUNT || rsp[0] != NCI_STATUS_OK) + return -EIO; + + id->rf_interfaces = rsp[STOCKHOLM_INIT_RSP_RF_COUNT]; + tail = STOCKHOLM_INIT_RSP_RF_COUNT + 1 + id->rf_interfaces + + STOCKHOLM_INIT_RSP_TAIL; + if (len < tail + STOCKHOLM_INIT_RSP_MANUF_LEN) + return -EIO; + + id->manufacturer = rsp[tail]; + id->firmware = get_unaligned_le32(&rsp[tail + 1]); + return 0; +} + +/* CORE_RESET and CORE_INIT, then log what the controller reports. */ +static int stockholm_identify(struct stockholm *st) +{ + u8 reset_type = NCI_RESET_TYPE_RESET_CONFIG; + struct stockholm_ident id = {}; + int len, ret; + + len = stockholm_nci_cmd(st, NCI_OP_CORE_RESET_CMD, &reset_type, 1); + if (len < 0) + return len; + ret = stockholm_parse_reset_rsp(st->rx_payload, len, &id); + if (ret) + return ret; + + len = stockholm_nci_cmd(st, NCI_OP_CORE_INIT_CMD, NULL, 0); + if (len < 0) + return len; + ret = stockholm_parse_init_rsp(st->rx_payload, len, &id); + if (ret) + return ret; + + dev_info(&st->sdev->dev, + "NCI %u.%u controller, manufacturer %#04x, firmware %08x, %u RF interfaces; parked off\n", + id.nci_version >> 4, id.nci_version & 0xf, id.manufacturer, + id.firmware, id.rf_interfaces); + + return 0; +} + +static int stockholm_check_follower(struct stockholm *st) +{ + struct device *dev = &st->sdev->dev; + u8 value; + int ret; + + ret = spmi_ext_register_readl(st->sdev, st->model->id_reg, &value, 1); + if (ret) + return dev_err_probe(dev, ret, "failed to read follower ID\n"); + if (value != st->model->follower_id) + return dev_err_probe(dev, -ENODEV, + "unexpected follower ID %#04x\n", value); + + ret = spmi_ext_register_readl(st->sdev, st->model->irq_reg, &value, 1); + if (ret) + return dev_err_probe(dev, ret, "failed to read IRQ base\n"); + if (value != st->model->irq_base) + return dev_err_probe(dev, -ENODEV, + "unexpected IRQ base %#04x\n", value); + + return 0; +} + +static int stockholm_request_irq(struct stockholm *st, const char *name, + irq_handler_t thread_fn) +{ + struct device *dev = &st->sdev->dev; + int irq, ret; + + irq = fwnode_irq_get_byname(dev_fwnode(dev), name); + if (irq < 0) + return dev_err_probe(dev, irq, "no %s interrupt\n", name); + + ret = devm_request_threaded_irq(dev, irq, NULL, thread_fn, + IRQF_ONESHOT | IRQF_NO_AUTOEN, + dev_name(dev), st); + if (ret) + return dev_err_probe(dev, ret, "failed to request %s IRQ\n", + name); + + return irq; +} + +static int stockholm_probe(struct spmi_device *sdev) +{ + struct device *dev = &sdev->dev; + struct stockholm *st; + int ret, err; + + st = devm_kzalloc(dev, sizeof(*st), GFP_KERNEL); + if (!st) + return -ENOMEM; + + st->sdev = sdev; + st->model = device_get_match_data(dev); + if (!st->model) + return -ENODEV; + mutex_init(&st->io_lock); + init_completion(&st->rx_done); + + st->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_ASIS); + if (IS_ERR(st->enable_gpio)) + return dev_err_probe(dev, PTR_ERR(st->enable_gpio), + "failed to get VEN GPIO\n"); + + st->data_irq = stockholm_request_irq(st, "data-ready", + stockholm_data_irq); + if (st->data_irq < 0) + return st->data_irq; + st->error_irq = stockholm_request_irq(st, "error", + stockholm_error_irq); + if (st->error_irq < 0) + return st->error_irq; + + ret = stockholm_power_on(st); + if (ret) + return dev_err_probe(dev, ret, "failed to raise VEN\n"); + + ret = stockholm_check_follower(st); + if (!ret) { + enable_irq(st->error_irq); + enable_irq(st->data_irq); + err = stockholm_identify(st); + disable_irq(st->data_irq); + disable_irq(st->error_irq); + if (err) + dev_warn(dev, "identity read failed (%d); parked off\n", + err); + } + + err = stockholm_park(st); + if (err) + return dev_err_probe(dev, err, "failed to park VEN low\n"); + + return ret; +} + +static const struct of_device_id stockholm_of_match[] = { + { .compatible = "apple,stockholm-nci", .data = &stockholm_model96 }, + {} +}; +MODULE_DEVICE_TABLE(of, stockholm_of_match); + +static struct spmi_driver stockholm_driver = { + .probe = stockholm_probe, + .driver = { + .name = "apple-stockholm", + .of_match_table = stockholm_of_match, + }, +}; +module_spmi_driver(stockholm_driver); + +#if IS_ENABLED(CONFIG_NFC_APPLE_STOCKHOLM_KUNIT_TEST) +#include "apple-stockholm-test.c" +#endif + +MODULE_AUTHOR("Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>"); +MODULE_DESCRIPTION("Apple Stockholm NFC controller and Secure Element (power and identity)"); +MODULE_LICENSE("GPL"); diff --git a/drivers/pci/controller/pcie-apple.c b/drivers/pci/controller/pcie-apple.c index 01e0813480566..8de8cc90524e9 100644 --- a/drivers/pci/controller/pcie-apple.c +++ b/drivers/pci/controller/pcie-apple.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -3120,7 +3121,7 @@ static int apple_pcie_probe(struct platform_device *pdev) int count = of_property_count_u32_elems(dev->of_node, "apple,managed-sids"); if (!of_device_is_compatible(dev->of_node, "apple,t8132-pcie") || - !of_machine_is_compatible("apple,j713") || count <= 0 || count > 15) + !apple_t8132_air() || count <= 0 || count > 15) return -EINVAL; ret = of_property_read_u32_array(dev->of_node, "apple,managed-sids", ids, count); if (!ret && (count != 2 || ids[0] != 1 || ids[1] != 2)) diff --git a/drivers/pmdomain/apple/pmgr-pwrstate.c b/drivers/pmdomain/apple/pmgr-pwrstate.c index 59ebf701f8db0..2367cc8c339d6 100644 --- a/drivers/pmdomain/apple/pmgr-pwrstate.c +++ b/drivers/pmdomain/apple/pmgr-pwrstate.c @@ -20,6 +20,7 @@ #include #include #include +#include #define APPLE_PMGR_RESET BIT(31) #define APPLE_PMGR_AUTO_ENABLE BIT(28) @@ -531,13 +532,13 @@ static int apple_pmgr_ps_probe(struct platform_device *pdev) t8132 = of_device_is_compatible(node, "apple,t8132-pmgr-pwrstate"); /* - * The original J713 loader tree exposes domains Linux cannot access. - * The early compatibility adapter supplies the board's explicit status - * and ownership before population; fail closed if it was not enabled. - * Other T8132 boards keep their own domain descriptions and behaviour. + * The original J713 loader tree, which the J715 shares, exposes domains + * Linux cannot access. The early compatibility adapter supplies the + * board's explicit status and ownership before population; fail closed + * if it was not enabled. Other T8132 boards keep their own domain + * descriptions and behaviour. */ - if (t8132 && of_machine_is_compatible("apple,j713") && - !of_property_present(node, "status")) + if (t8132 && apple_t8132_air() && !of_property_present(node, "status")) return dev_err_probe(dev, -ENODEV, "missing J713 power-domain policy\n"); tvm = of_parse_phandle(node, "power-domains", 0); diff --git a/drivers/pmdomain/apple/pmp-report.c b/drivers/pmdomain/apple/pmp-report.c index 2429a5637c2a9..d3b5350fc50e1 100644 --- a/drivers/pmdomain/apple/pmp-report.c +++ b/drivers/pmdomain/apple/pmp-report.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -486,7 +487,7 @@ int apple_pmp_report_wait_supplier_ready(struct device *supplier, unsigned int t struct platform_device *pdev; struct apple_pmp_report *rep; u64 status; - bool t8132 = of_machine_is_compatible("apple,j713") && + bool t8132 = apple_t8132_air() && of_device_is_compatible(supplier->of_node, "apple,t8132-pmp-v2"); int ret; diff --git a/drivers/soc/apple/clpc.c b/drivers/soc/apple/clpc.c index c7b29f0e6a49b..fa94e1d522937 100644 --- a/drivers/soc/apple/clpc.c +++ b/drivers/soc/apple/clpc.c @@ -3,9 +3,9 @@ * Apple SoC host performance controller (CLPC) floors * * On macOS the CLPC raises the floor of the memory controller (DCS) and the - * SoC fabric while the CPU clusters or the GPU are busy, through its own + * SoC fabric while CPU clusters, the GPU or the ANE are busy, through its own * voter agent in the PMC. This driver keeps that agent's floor in step with - * Linux CPU load: + * Linux demand: * * - every sampling period, each cpufreq policy reports how busy its * busiest CPU was and how fast the policy runs relative to its maximum; @@ -38,6 +38,7 @@ #include #include #include +#include #include #define APPLE_CLPC_MAX_CLUSTERS 8 @@ -78,6 +79,7 @@ enum apple_clpc_rail { * @pmp_agent, limits the DCS, see apple_clpc_gpu_limited() * @gpu_dense: submissions per sampling period that make light GPU work * dense, see apple_clpc_gpu_dense(); 0 for none + * @ane: state of each rail while ANE work is in flight; all zero disables input * @gpu_input: the GPU driver reports its work in flight through * apple_clpc_gpu_get(); while there is some, both rails go to the top * of @map @@ -93,6 +95,7 @@ struct apple_clpc_hw { unsigned int pmp_agent; unsigned int gpu_dense; bool gpu_input; + u8 ane[APPLE_CLPC_RAILS]; }; struct apple_clpc_cluster { @@ -119,6 +122,18 @@ struct apple_clpc_gpu { struct delayed_work *wake; }; +/* One ANE publisher, with storage surviving provider removal. */ +struct apple_clpc_ane { + struct kref ref; + /* Protects activity, event metadata and wake across provider removal. */ + spinlock_t lock; + bool active; + bool pending; + u64 updated_ns; + u64 sequence; + struct delayed_work *wake; +}; + struct apple_clpc { struct device *dev; struct device *pmc; @@ -144,6 +159,8 @@ struct apple_clpc { struct dentry *debugfs; struct regmap *gpu_pmgr; struct apple_clpc_gpu *gpu; + struct apple_clpc_ane *ane; + unsigned int ane_states[APPLE_CLPC_RAILS]; u32 last_floor; u32 last_reason; u64 last_vote_ns; @@ -283,6 +300,118 @@ static void apple_clpc_gpu_owner_put(void *data) kref_put(&gpu->ref, apple_clpc_gpu_free); } +static void apple_clpc_ane_free(struct kref *ref) +{ + kfree(container_of(ref, struct apple_clpc_ane, ref)); +} + +void apple_clpc_ane_set_active(struct apple_clpc_ane *ane, bool active) +{ + unsigned long flags; + + if (!ane) + return; + spin_lock_irqsave(&ane->lock, flags); + if (active && !ane->active) { + /* Preserve even an EXECUTE shorter than the first queued sample. */ + ane->pending = true; + if (ane->wake) + mod_delayed_work(system_freezable_power_efficient_wq, ane->wake, 0); + } + ane->active = active; + ane->updated_ns = ktime_get_mono_fast_ns(); + ane->sequence++; + spin_unlock_irqrestore(&ane->lock, flags); +} +EXPORT_SYMBOL_GPL(apple_clpc_ane_set_active); + +void apple_clpc_ane_put(struct apple_clpc_ane *ane) +{ + if (ane) { + apple_clpc_ane_set_active(ane, false); + kref_put(&ane->ref, apple_clpc_ane_free); + } +} +EXPORT_SYMBOL_GPL(apple_clpc_ane_put); + +int apple_clpc_ane_get(struct device *dev, struct apple_clpc_ane **out) +{ + struct device_node *np; + struct platform_device *provider; + struct apple_clpc *clpc; + + *out = NULL; + if (!dev->of_node) + return 0; + np = of_parse_phandle(dev->of_node, "apple,clpc", 0); + if (!np && !of_find_property(dev->of_node, "apple,clpc", NULL)) + np = of_find_compatible_node(NULL, NULL, "apple,t8140-clpc"); + if (!np) + return 0; + if (!of_device_is_compatible(np, "apple,t8140-clpc")) { + of_node_put(np); + return 0; + } + provider = of_find_device_by_node(np); + of_node_put(np); + if (!provider) + return 0; + /* + * Optional input: never defer ANE startup for an absent CLPC driver. + * No device link is needed: the independent reference protects late + * publications and puts after the provider has withdrawn its work. + */ + mutex_lock(&apple_clpc_clients_lock); + clpc = dev_get_drvdata(&provider->dev); + if (device_is_bound(&provider->dev) && clpc && clpc->ane && + refcount_read(&clpc->ane->ref.refcount) == 1) { + kref_get(&clpc->ane->ref); + *out = clpc->ane; + } + mutex_unlock(&apple_clpc_clients_lock); + put_device(&provider->dev); + return 0; +} +EXPORT_SYMBOL_GPL(apple_clpc_ane_get); + +static void apple_clpc_ane_owner_put(void *data) +{ + struct apple_clpc_ane *ane = data; + + kref_put(&ane->ref, apple_clpc_ane_free); +} + +static void apple_clpc_ane_detach(struct apple_clpc_ane *ane) +{ + unsigned long flags; + + if (!ane) + return; + spin_lock_irqsave(&ane->lock, flags); + ane->wake = NULL; + spin_unlock_irqrestore(&ane->lock, flags); +} + +/* Called under sample_lock, like the CPU and GPU demand inputs. */ +static bool apple_clpc_ane_input_demand(struct apple_clpc *clpc, unsigned int *demand) +{ + struct apple_clpc_ane *ane = clpc->ane; + unsigned long flags; + unsigned int rail; + bool active; + + if (!ane) + return false; + spin_lock_irqsave(&ane->lock, flags); + active = ane->active || ane->pending; + ane->pending = false; + spin_unlock_irqrestore(&ane->lock, flags); + if (active) + for (rail = 0; rail < APPLE_CLPC_RAILS; rail++) + demand[rail] = max(demand[rail], clpc->ane_states[rail]); + return active; +} + /* cpufreq policies can appear after probe; pick up new ones as they do. */ static void apple_clpc_find_clusters(struct apple_clpc *clpc) { @@ -569,6 +698,8 @@ static void apple_clpc_sample(struct apple_clpc *clpc) reason |= 1; if (apple_clpc_gpu_input_demand(clpc->hw, clpc->gpu, demand)) reason |= 2; + if (apple_clpc_ane_input_demand(clpc, demand)) + reason |= 32; if (clpc->gpu_pmgr) { /* Both run every sample: each tracks state across samples. */ bool late = time_after(now, clpc->gpu_sampled + @@ -647,7 +778,7 @@ static int apple_clpc_status_show(struct seq_file *s, void *unused) clpc->hw->rail[rail]), clpc->hw->map[rail][0], clpc->hw->map[rail][1], clpc->hw->map[rail][2], clpc->hw->map[rail][3]); - seq_printf(s, "last_vote: %#x reason_bits %#x sampled_ns %llu (cpu=1 host_gpu=2 streaming_gpu=4 dense_gpu=8 hold=16)\n", + seq_printf(s, "last_vote: %#x reason_bits %#x sampled_ns %llu (cpu=1 host_gpu=2 streaming_gpu=4 dense_gpu=8 hold=16 ane=32)\n", READ_ONCE(clpc->last_floor), READ_ONCE(clpc->last_reason), READ_ONCE(clpc->last_vote_ns)); if (clpc->gpu) { @@ -657,6 +788,20 @@ static int apple_clpc_status_show(struct seq_file *s, void *unused) seq_printf(s, "host_gpu: active %u request_ns %llu sequence %llu\n", active, updated, sequence); } + if (clpc->ane) { + struct apple_clpc_ane *ane = clpc->ane; + unsigned long flags; + u64 updated, sequence; + bool active; + + spin_lock_irqsave(&ane->lock, flags); + active = ane->active; + updated = ane->updated_ns; + sequence = ane->sequence; + spin_unlock_irqrestore(&ane->lock, flags); + seq_printf(s, "ane: active %u request_ns %llu sequence %llu\n", + active, updated, sequence); + } seq_printf(s, "samples: %lu update errors: %lu\n", clpc->samples, clpc->update_errors); if (clpc->gpu_pmgr) { @@ -684,6 +829,63 @@ static int apple_clpc_status_show(struct seq_file *s, void *unused) } DEFINE_SHOW_ATTRIBUTE(apple_clpc_status); +static int apple_clpc_ane_states_show(struct seq_file *s, void *unused) +{ + struct apple_clpc *clpc = s->private; + + guard(mutex)(&clpc->sample_lock); + seq_printf(s, "%u %u\n", clpc->ane_states[APPLE_CLPC_DCS], + clpc->ane_states[APPLE_CLPC_SOC]); + return 0; +} + +static int apple_clpc_ane_states_open(struct inode *inode, struct file *file) +{ + return single_open(file, apple_clpc_ane_states_show, inode->i_private); +} + +/* The top measured CPU/GPU states bound the rail's supported range. */ +static void apple_clpc_ane_states_set(struct apple_clpc *clpc, const int *states) +{ + unsigned int rail, top; + + for (rail = 0; rail < APPLE_CLPC_RAILS; rail++) { + top = max(clpc->hw->map[rail][APPLE_CLPC_LEVELS - 1], clpc->hw->gpu[rail]); + clpc->ane_states[rail] = clamp(states[rail], 0, (int)top); + } +} + +static ssize_t apple_clpc_ane_states_write(struct file *file, const char __user *buf, + size_t count, loff_t *ppos) +{ + struct apple_clpc *clpc = ((struct seq_file *)file->private_data)->private; + char text[48], extra; + int states[APPLE_CLPC_RAILS]; + + if (!count || count >= sizeof(text)) + return -EINVAL; + if (copy_from_user(text, buf, count)) + return -EFAULT; + text[count] = '\0'; + if (sscanf(text, "%d %d %c", &states[APPLE_CLPC_DCS], + &states[APPLE_CLPC_SOC], &extra) != 2) + return -EINVAL; + guard(mutex)(&clpc->sample_lock); + apple_clpc_ane_states_set(clpc, states); + if (!READ_ONCE(clpc->stopped)) + mod_delayed_work(system_freezable_power_efficient_wq, &clpc->work, 0); + return count; +} + +static const struct file_operations apple_clpc_ane_states_fops = { + .owner = THIS_MODULE, + .open = apple_clpc_ane_states_open, + .read = seq_read, + .write = apple_clpc_ane_states_write, + .llseek = seq_lseek, + .release = single_release, +}; + static void apple_clpc_free_clusters(struct apple_clpc *clpc) { unsigned int i; @@ -728,8 +930,9 @@ static void apple_clpc_stop(void *data) clpc->gpu->wake = NULL; spin_unlock_irqrestore(&clpc->gpu->lock, flags); } - apple_clpc_halt(clpc); + apple_clpc_ane_detach(clpc->ane); debugfs_remove_recursive(clpc->debugfs); + apple_clpc_halt(clpc); apple_clpc_free_clusters(clpc); } @@ -763,6 +966,18 @@ static int apple_clpc_probe(struct platform_device *pdev) if (ret) return ret; } + if (clpc->hw->ane[APPLE_CLPC_DCS] || clpc->hw->ane[APPLE_CLPC_SOC]) { + clpc->ane = kzalloc_obj(*clpc->ane); + if (!clpc->ane) + return -ENOMEM; + kref_init(&clpc->ane->ref); + spin_lock_init(&clpc->ane->lock); + ret = devm_add_action_or_reset(dev, apple_clpc_ane_owner_put, clpc->ane); + if (ret) + return ret; + for (rail = 0; rail < APPLE_CLPC_RAILS; rail++) + clpc->ane_states[rail] = clpc->hw->ane[rail]; + } /* The property is optional: without it, CPU demand alone sets the floors. */ if (clpc->hw->gpu_demand) gpu = of_parse_phandle(dev->of_node, "apple,gpu-power-state", 0); @@ -827,10 +1042,17 @@ static int apple_clpc_probe(struct platform_device *pdev) if (clpc->gpu && !clpc->hw->gpu_demand) clpc->gpu->wake = &clpc->work; + if (clpc->ane) + clpc->ane->wake = &clpc->work; + clpc->debugfs = debugfs_create_dir(dev_name(dev), NULL); debugfs_create_file("status", 0400, clpc->debugfs, clpc, &apple_clpc_status_fops); + if (clpc->ane) + debugfs_create_file("ane_states", 0600, clpc->debugfs, clpc, + &apple_clpc_ane_states_fops); + ret = devm_add_action_or_reset(dev, apple_clpc_stop, clpc); if (ret) return ret; @@ -926,6 +1148,12 @@ static const struct apple_clpc_hw apple_clpc_hw_t8140 = { .pmp_backoff = true, .pmp_agent = 0, .gpu_dense = 2, + /* + * Measured ANE demand (Neo, MobileNetV1): DCS 4 alone takes an + * EXECUTE from 2.3-2.5 to 1.8 ms, DCS 4 with fabric 3 (the GPU's + * streaming floor) to 1.25-1.31 ms. + */ + .ane = { [APPLE_CLPC_DCS] = 4, [APPLE_CLPC_SOC] = 3 }, }; /* @@ -1126,7 +1354,123 @@ static void apple_clpc_t8132_gpu_input_test(struct kunit *test) apple_clpc_gpu_put(gpu); } +static void apple_clpc_ane_demand_hold_test(struct kunit *test) +{ + struct apple_clpc_ane ane = {}; + struct apple_clpc_vote vote = {}; + struct apple_clpc *clpc = kunit_kzalloc(test, sizeof(*clpc), GFP_KERNEL); + unsigned int demand[APPLE_CLPC_RAILS] = {}; + unsigned long now = 100, hold = msecs_to_jiffies(APPLE_CLPC_HOLD_MS); + + KUNIT_ASSERT_NOT_NULL(test, clpc); + spin_lock_init(&ane.lock); + clpc->ane = &ane; + clpc->hw = &apple_clpc_hw_t8140; + clpc->ane_states[APPLE_CLPC_DCS] = clpc->hw->ane[APPLE_CLPC_DCS]; + clpc->ane_states[APPLE_CLPC_SOC] = clpc->hw->ane[APPLE_CLPC_SOC]; + KUNIT_EXPECT_FALSE(test, apple_clpc_ane_input_demand(clpc, demand)); + apple_clpc_ane_set_active(&ane, true); + KUNIT_EXPECT_TRUE(test, apple_clpc_ane_input_demand(clpc, demand)); + KUNIT_EXPECT_EQ(test, demand[APPLE_CLPC_DCS], 4u); + KUNIT_EXPECT_EQ(test, demand[APPLE_CLPC_SOC], 3u); + KUNIT_EXPECT_EQ(test, apple_clpc_vote(&vote, demand[APPLE_CLPC_DCS], now), 4u); + /* Demand continues across samples, without another publication. */ + now += hold; + KUNIT_EXPECT_TRUE(test, apple_clpc_ane_input_demand(clpc, demand)); + KUNIT_EXPECT_EQ(test, apple_clpc_vote(&vote, demand[APPLE_CLPC_DCS], now), 4u); + apple_clpc_ane_set_active(&ane, false); + memset(demand, 0, sizeof(demand)); + KUNIT_EXPECT_FALSE(test, apple_clpc_ane_input_demand(clpc, demand)); + KUNIT_EXPECT_EQ(test, apple_clpc_vote(&vote, demand[APPLE_CLPC_DCS], + now + hold - 1), 4u); + KUNIT_EXPECT_EQ(test, apple_clpc_vote(&vote, demand[APPLE_CLPC_DCS], + now + hold), 0u); + /* A request completing before the worker runs still earns the hold. */ + apple_clpc_ane_set_active(&ane, true); + apple_clpc_ane_set_active(&ane, false); + KUNIT_EXPECT_TRUE(test, apple_clpc_ane_input_demand(clpc, demand)); + KUNIT_EXPECT_EQ(test, demand[APPLE_CLPC_DCS], 4u); + KUNIT_EXPECT_FALSE(test, apple_clpc_ane_input_demand(clpc, demand)); + KUNIT_EXPECT_GT(test, ane.updated_ns, 0ull); + KUNIT_EXPECT_EQ(test, ane.sequence, 4ull); +} + +static void apple_clpc_ane_states_test(struct kunit *test) +{ + struct apple_clpc *clpc = kunit_kzalloc(test, sizeof(*clpc), GFP_KERNEL); + struct apple_clpc_ane ane = {}; + unsigned int demand[APPLE_CLPC_RAILS] = { 5, 2 }; + int states[APPLE_CLPC_RAILS] = { 4, 3 }; + + KUNIT_ASSERT_NOT_NULL(test, clpc); + clpc->hw = &apple_clpc_hw_t8140; + clpc->ane = &ane; + spin_lock_init(&ane.lock); + apple_clpc_ane_states_set(clpc, states); + apple_clpc_ane_set_active(&ane, true); + KUNIT_EXPECT_TRUE(test, apple_clpc_ane_input_demand(clpc, demand)); + /* ANE cannot lower a concurrent CPU/GPU request. */ + KUNIT_EXPECT_EQ(test, demand[APPLE_CLPC_DCS], 5u); + KUNIT_EXPECT_EQ(test, demand[APPLE_CLPC_SOC], 3u); + states[APPLE_CLPC_DCS] = -1; + states[APPLE_CLPC_SOC] = 100; + apple_clpc_ane_states_set(clpc, states); + KUNIT_EXPECT_EQ(test, clpc->ane_states[APPLE_CLPC_DCS], 0u); + KUNIT_EXPECT_EQ(test, clpc->ane_states[APPLE_CLPC_SOC], 3u); +} + +static void apple_clpc_ane_no_provider_test(struct kunit *test) +{ + struct apple_clpc *clpc = kunit_kzalloc(test, sizeof(*clpc), GFP_KERNEL); + struct apple_clpc_ane *ane = NULL; + unsigned int demand[APPLE_CLPC_RAILS] = {}; + struct device dev = {}; + + KUNIT_ASSERT_NOT_NULL(test, clpc); + KUNIT_EXPECT_EQ(test, apple_clpc_ane_get(&dev, &ane), 0); + KUNIT_EXPECT_PTR_EQ(test, ane, NULL); + apple_clpc_ane_set_active(ane, true); + apple_clpc_ane_set_active(ane, false); + apple_clpc_ane_put(ane); + KUNIT_EXPECT_FALSE(test, apple_clpc_ane_input_demand(clpc, demand)); + KUNIT_EXPECT_EQ(test, demand[APPLE_CLPC_DCS], 0u); + KUNIT_EXPECT_EQ(test, demand[APPLE_CLPC_SOC], 0u); + KUNIT_EXPECT_EQ(test, apple_clpc_hw_t6040.ane[APPLE_CLPC_DCS], 0); + KUNIT_EXPECT_EQ(test, apple_clpc_hw_t8132.ane[APPLE_CLPC_DCS], 0); + KUNIT_EXPECT_EQ(test, apple_clpc_hw_t8142.ane[APPLE_CLPC_DCS], 0); +} + +static void apple_clpc_ane_wake_removal_test(struct kunit *test) +{ + struct apple_clpc_ane *ane = kzalloc_obj(*ane); + struct apple_clpc_wake_test wake; + + KUNIT_ASSERT_NOT_NULL(test, ane); + kref_init(&ane->ref); + spin_lock_init(&ane->lock); + INIT_DELAYED_WORK(&wake.work, apple_clpc_wake_complete); + init_completion(&wake.done); + ane->wake = &wake.work; + kref_get(&ane->ref); + apple_clpc_ane_set_active(ane, true); + KUNIT_EXPECT_NE(test, wait_for_completion_timeout(&wake.done, HZ), 0ul); + /* Actual removal ordering: detach, drain, drop the provider reference. */ + apple_clpc_ane_detach(ane); + cancel_delayed_work_sync(&wake.work); + apple_clpc_ane_owner_put(ane); + reinit_completion(&wake.done); + apple_clpc_ane_set_active(ane, false); + apple_clpc_ane_set_active(ane, true); + KUNIT_EXPECT_FALSE(test, delayed_work_pending(&wake.work)); + KUNIT_EXPECT_FALSE(test, completion_done(&wake.done)); + apple_clpc_ane_put(ane); +} + static struct kunit_case apple_clpc_cases[] = { + KUNIT_CASE(apple_clpc_ane_demand_hold_test), + KUNIT_CASE(apple_clpc_ane_states_test), + KUNIT_CASE(apple_clpc_ane_no_provider_test), + KUNIT_CASE(apple_clpc_ane_wake_removal_test), KUNIT_CASE(apple_clpc_t8132_gpu_input_test), KUNIT_CASE(apple_clpc_gpu_dense_test), KUNIT_CASE(apple_clpc_gpu_cold_wake_test), diff --git a/drivers/soc/apple/clpc.kunitconfig b/drivers/soc/apple/clpc.kunitconfig new file mode 100644 index 0000000000000..b0e9a85d0905b --- /dev/null +++ b/drivers/soc/apple/clpc.kunitconfig @@ -0,0 +1,11 @@ +CONFIG_KUNIT=y +CONFIG_COMPILE_TEST=y +CONFIG_OF=y +CONFIG_PM=y +CONFIG_CPU_FREQ=y +CONFIG_APPLE_PMC=y +CONFIG_APPLE_CLPC=y +CONFIG_KASAN=y +CONFIG_KASAN_GENERIC=y +CONFIG_UBSAN=y +CONFIG_UBSAN_BOUNDS=y diff --git a/drivers/soc/apple/display-gate.c b/drivers/soc/apple/display-gate.c index 81f0c022ed947..94828093b3154 100644 --- a/drivers/soc/apple/display-gate.c +++ b/drivers/soc/apple/display-gate.c @@ -107,6 +107,7 @@ #include #include #include +#include #include #include #include @@ -3068,9 +3069,9 @@ static void __init gate_t6041_max_run(void) } /* - * J713: the dcpext Type-C routes are disabled in the device tree, as on - * J613, because a USB-C port controller waits for the mode switch of every - * available route. Enable them only for a dcpext the boot loader handed + * J713 and J715: the dcpext Type-C routes are disabled in the device tree, + * as on J613, because a USB-C port controller waits for the mode switch of + * every available route. Enable them only for a dcpext the boot loader handed * over (apple,t8132-dcpext-firmware-ready = 1). A handed-over dcpext that is * not adopted then disables them again, see dcp_platform_probe_t8132_ext(). * Only the device tree changes here; no register is touched. @@ -3114,7 +3115,7 @@ static int __init apple_display_gate(void) { int i; - if (of_machine_is_compatible("apple,j713")) { + if (apple_t8132_air()) { gate_j713_dcpext_routes(); return 0; } diff --git a/drivers/soc/apple/pmp-telemetry.c b/drivers/soc/apple/pmp-telemetry.c index fb9c1605e874d..4ef51355328fe 100644 --- a/drivers/soc/apple/pmp-telemetry.c +++ b/drivers/soc/apple/pmp-telemetry.c @@ -15,11 +15,11 @@ #include #include #include +#include bool apple_pmp_telemetry_retained_board(void) { - return of_machine_is_compatible("apple,j713") && - of_machine_is_compatible("apple,t8132"); + return apple_t8132_air() && of_machine_is_compatible("apple,t8132"); } static LIST_HEAD(apple_pmp_telemetry_list); diff --git a/drivers/soc/apple/profile.rs b/drivers/soc/apple/profile.rs index b7a7a40b328d6..a662fa9289fdf 100644 --- a/drivers/soc/apple/profile.rs +++ b/drivers/soc/apple/profile.rs @@ -468,9 +468,9 @@ pub(crate) const T6041: PlatformProfile = PlatformProfile { /// calibration is an FSC2 image. So it takes J700's SPI mode 2 and nonce /// session; its device tree names its signed root key. J713 on OS firmware /// 26.6.2 provisions its keybag, enrols, matches and restores the enrolment -/// after a reboot. +/// after a reboot. The J715 ADT describes the same sensor, wiring and SEP. pub(crate) const T8132: PlatformProfile = PlatformProfile { - name: "T8132/J713", + name: "T8132/J713/J715", sensor: SensorProfile { controller_base: 0x3_ad10_8000, mode: SpiMode::Mode2, @@ -663,8 +663,8 @@ fn select( if has(b"apple,t6041") && has(b"apple,j616c") { return Ok(&T6041); } - // Only J713: the other T8132 Macs are unread. - if has(b"apple,t8132") && has(b"apple,j713") { + // Only the M4 MacBook Airs: the other T8132 Macs are unread. + if has(b"apple,t8132") && (has(b"apple,j713") || has(b"apple,j715")) { return Ok(&T8132); } Err(ENODEV) @@ -731,8 +731,10 @@ mod tests { } #[test] - fn t8132_selection_is_limited_to_j713() { + fn t8132_selection_is_limited_to_the_m4_airs() { assert_eq!(picked(&[b"apple,j713", b"apple,t8132"]), Some(T8132.name)); + assert_eq!(picked(&[b"apple,j715", b"apple,t8132"]), Some(T8132.name)); + assert_eq!(picked(&[b"apple,j604", b"apple,t8132"]), None); assert_eq!(picked(&[b"apple,t8132"]), None); assert_eq!(picked(&[b"apple,j613", b"apple,t8132"]), None); assert_eq!(picked(&[b"apple,j713", b"apple,t8122"]), None); diff --git a/drivers/soc/apple/rtkit-helper.c b/drivers/soc/apple/rtkit-helper.c index cbb4be1ebfbaf..2442635f7500d 100644 --- a/drivers/soc/apple/rtkit-helper.c +++ b/drivers/soc/apple/rtkit-helper.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -275,15 +276,14 @@ static int apple_rtkit_helper_probe(struct platform_device *pdev) count = apple_rtkit_helper_inherit_buffers(helper, buffers); if (count < 0) return dev_err_probe(dev, count, "Invalid inherited RTKit buffers\n"); - if ((of_machine_is_compatible("apple,j713") && + if ((apple_t8132_air() && of_device_is_compatible(dev->of_node, "apple,t8132-mtp")) || (of_machine_is_compatible("apple,j614s") && of_device_is_compatible(dev->of_node, "apple,t6041-mtp"))) helper->preserved = true; } - if (!live && of_machine_is_compatible("apple,j713") && - of_machine_is_compatible("apple,t8132")) { + if (!live && apple_t8132_air() && of_machine_is_compatible("apple,t8132")) { struct property *prop; u32 inherited; int len; diff --git a/drivers/soc/apple/t8132-platform-handoff.c b/drivers/soc/apple/t8132-platform-handoff.c index 302c41d4964a1..35140c5404506 100644 --- a/drivers/soc/apple/t8132-platform-handoff.c +++ b/drivers/soc/apple/t8132-platform-handoff.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only OR MIT -/* Supply missing platform descriptions for the original J713 loader ABI. +/* Supply missing platform descriptions for the original J713 loader ABI, + * which the J715 shares. * Keep the shared m1n1 payload usable by the stable kernel. Hardware control * remains in the ordinary MCC, PMC and CLPC drivers, with one DTS data source. * J713 PMGR ownership/status also comes from its board DTS, before any domain @@ -9,6 +10,7 @@ #include #include #include +#include #include extern const u8 __dtb_t8132_platform_data_begin[]; @@ -215,8 +217,7 @@ static int __init t8132_platform_handoff(void) unsigned int added = 0, changed = 0; int root, node, ret; - if (!of_machine_is_compatible("apple,j713") || - !of_machine_is_compatible("apple,t8132")) + if (!apple_t8132_air() || !of_machine_is_compatible("apple,t8132")) return 0; if (fdt_check_header(data)) return -EINVAL; diff --git a/drivers/soc/apple/t8132-platform-test.c b/drivers/soc/apple/t8132-platform-test.c index a5cdf1e467f39..cea42199a28c0 100644 --- a/drivers/soc/apple/t8132-platform-test.c +++ b/drivers/soc/apple/t8132-platform-test.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only OR MIT #include #include +#include static void t8132_test_legacy_descriptions(struct kunit *test) { @@ -14,8 +15,8 @@ static void t8132_test_legacy_descriptions(struct kunit *test) u32 reg[8], agent; const char *status; - if (!of_machine_is_compatible("apple,j713")) { - kunit_skip(test, "requires the J713 legacy-loader fixture"); + if (!apple_t8132_air()) { + kunit_skip(test, "requires the J713/J715 legacy-loader fixture"); return; } mcc = of_find_compatible_node(NULL, NULL, "apple,t8132-mcc"); diff --git a/drivers/spi/spi-apple-qspi.c b/drivers/spi/spi-apple-qspi.c index 11fb1d5553105..e51cb94f12979 100644 --- a/drivers/spi/spi-apple-qspi.c +++ b/drivers/spi/spi-apple-qspi.c @@ -124,6 +124,9 @@ static const struct apple_qspi_board apple_qspi_boards[] = { 0x700000, 0x100000, APPLE_QSPI_JEDEC_W25Q64, 0 }, { "apple,t8132-qspi", "apple,j713", 0x3ad118000ULL, 0x700000, 0x100000, APPLE_QSPI_JEDEC_W25Q64, 0 }, + /* The J715 ADT has the J713's nvram; its NOR part is assumed the same. */ + { "apple,t8132-qspi", "apple,j715", 0x3ad118000ULL, + 0x700000, 0x100000, APPLE_QSPI_JEDEC_W25Q64, 0 }, /* Macronix is the ID macOS reports; a J616s also reads W25Q64 on the bus. */ { "apple,t6041-qspi", "apple,j616s", 0x429118000ULL, 0x700000, 0x100000, APPLE_QSPI_JEDEC_MX_2B27, 0, diff --git a/drivers/thermal/apple-pmp-thermal.c b/drivers/thermal/apple-pmp-thermal.c index 203ea9f5608bd..41ca922045ae2 100644 --- a/drivers/thermal/apple-pmp-thermal.c +++ b/drivers/thermal/apple-pmp-thermal.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -739,8 +740,8 @@ static int apple_pmp_thermal_probe(struct platform_device *pdev) { const struct apple_pmp_sensor_data *sensors = dev_get_platdata(&pdev->dev); - /* Only this board's sensor topology and operating policy are qualified. */ - if (!of_machine_is_compatible("apple,j713")) + /* Only the M4 Airs' sensor topology and operating policy are qualified. */ + if (!apple_t8132_air()) return -ENODEV; if (!sensors || !sensors->read || !sensors->dev) return -EINVAL; diff --git a/drivers/usb/dwc3/dwc3-apple.c b/drivers/usb/dwc3/dwc3-apple.c index 349faf22f5225..4652697b2f4d0 100644 --- a/drivers/usb/dwc3/dwc3-apple.c +++ b/drivers/usb/dwc3/dwc3-apple.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -326,7 +327,7 @@ static void dwc3_apple_set_ptrcap(struct dwc3_apple *appledwc, u32 mode) static bool dwc3_apple_host_before_core_init(struct dwc3_apple *appledwc, enum dwc3_apple_state state) { - return state == DWC3_APPLE_HOST && of_machine_is_compatible("apple,j713") && + return state == DWC3_APPLE_HOST && apple_t8132_air() && of_device_is_compatible(appledwc->dev->of_node, "apple,t8132-dwc3"); } diff --git a/include/linux/soc/apple/clpc.h b/include/linux/soc/apple/clpc.h index 37b2cfce5594a..0a4c4f439ac56 100644 --- a/include/linux/soc/apple/clpc.h +++ b/include/linux/soc/apple/clpc.h @@ -7,11 +7,16 @@ #include struct apple_clpc_gpu; +struct apple_clpc_ane; #if IS_REACHABLE(CONFIG_APPLE_CLPC) int apple_clpc_gpu_get(struct device *dev, struct apple_clpc_gpu **out); void apple_clpc_gpu_set_active(struct apple_clpc_gpu *gpu, bool active); void apple_clpc_gpu_put(struct apple_clpc_gpu *gpu); +/* Optional, single-publisher input: success with NULL means no provider. */ +int apple_clpc_ane_get(struct device *dev, struct apple_clpc_ane **out); +void apple_clpc_ane_set_active(struct apple_clpc_ane *ane, bool active); +void apple_clpc_ane_put(struct apple_clpc_ane *ane); #else static inline int apple_clpc_gpu_get(struct device *dev, struct apple_clpc_gpu **out) { @@ -20,5 +25,16 @@ static inline int apple_clpc_gpu_get(struct device *dev, struct apple_clpc_gpu * } static inline void apple_clpc_gpu_set_active(struct apple_clpc_gpu *gpu, bool active) {} static inline void apple_clpc_gpu_put(struct apple_clpc_gpu *gpu) {} + +/* ANE remains usable when the optional floor provider is not reachable. */ +static inline int apple_clpc_ane_get(struct device *dev, struct apple_clpc_ane **out) +{ + *out = NULL; + return 0; +} + +static inline void apple_clpc_ane_set_active(struct apple_clpc_ane *ane, bool active) {} + +static inline void apple_clpc_ane_put(struct apple_clpc_ane *ane) {} #endif #endif diff --git a/include/linux/soc/apple/pmp-display.h b/include/linux/soc/apple/pmp-display.h index f919a4c362d6c..350a3c5f4e1c7 100644 --- a/include/linux/soc/apple/pmp-display.h +++ b/include/linux/soc/apple/pmp-display.h @@ -3,13 +3,13 @@ #define _LINUX_SOC_APPLE_PMP_DISPLAY_H #include +#include #include -/* The retained M4 bridge and raw thermal records are qualified for J713. */ +/* The retained M4 bridge and raw thermal records: J713, and the J715 too. */ static inline bool apple_pmp_j713_board(void) { - return of_machine_is_compatible("apple,j713") && - of_machine_is_compatible("apple,t8132"); + return apple_t8132_air() && of_machine_is_compatible("apple,t8132"); } struct device; diff --git a/include/linux/soc/apple/t8132.h b/include/linux/soc/apple/t8132.h new file mode 100644 index 0000000000000..bd383c51b13d7 --- /dev/null +++ b/include/linux/soc/apple/t8132.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR MIT */ +#ifndef _LINUX_SOC_APPLE_T8132_H +#define _LINUX_SOC_APPLE_T8132_H + +#include +#include + +/* + * The M4 MacBook Airs, J713 (13-inch) and J715 (15-inch): one board design + * and boot loader handoff. Their ADTs differ in the panel, the speakers, the + * radio's firmware island and per-machine trims, all of which their device + * trees describe. + */ +static inline bool apple_t8132_air(void) +{ + return of_machine_is_compatible("apple,j713") || + of_machine_is_compatible("apple,j715"); +} + +#endif diff --git a/scripts/dtc/apple-dt-check.sh b/scripts/dtc/apple-dt-check.sh new file mode 100755 index 0000000000000..04b634e886427 --- /dev/null +++ b/scripts/dtc/apple-dt-check.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0-only +# apple-dt-check.sh BASE HEAD WORKDIR: run CHECK_DTBS on every Apple device tree at BASE and at HEAD +# and fail when HEAD has a warning BASE does not. Also runs dt_binding_check on every binding HEAD +# changes. Phandle values in the messages are masked, so renumbering is not a new warning. +# Needs dtschema (dt-validate), clang/lld (LLVM=1), flex, bison. Prints a summary. +set -u +BASE=$1 HEAD=$2 W=$3 +export ARCH=arm64 LLVM=1 +mkdir -p "$W" +warnings() { # rev tag + local t=$W/src-$2 o=$W/out-$2 + git worktree add -q --detach "$t" "$1" || return 1 + make -s -C "$t" O="$o" defconfig >/dev/null || return 1 + local dtbs; dtbs=$(cd "$t/arch/arm64/boot/dts" && ls apple/*.dts | sed 's/dts$/dtb/') + make -C "$t" O="$o" -j"$(nproc)" CHECK_DTBS=y $dtbs > "$W/$2.log" 2>&1 + local rc=$? + grep -E '\.dtb: |[Ww]arning|rror' "$W/$2.log" | grep -v '^ ' | + sed -E "s#$t/##g; s#$o/##g" | + perl -pe 's{(\[\[[^:]*?\]\])}{(my $x = $1) =~ s/\d+/N/g; $x}ge; s{b\x27(?:\\.|[^\x27])*\x27}{b\x27N\x27}g' | + sort -u > "$W/$2.warn" + echo "$2: make rc=$rc, $(wc -l < "$W/$2.warn") warning lines, $(echo $dtbs | wc -w) DTBs" + return $rc +} +warnings "$BASE" base || echo "base build failed (its warnings still count)" +warnings "$HEAD" head; hrc=$? +comm -13 "$W/base.warn" "$W/head.warn" > "$W/new.warn" +comm -23 "$W/base.warn" "$W/head.warn" > "$W/gone.warn" +echo "new warnings: $(wc -l < "$W/new.warn"), removed: $(wc -l < "$W/gone.warn")" +fail=0 +[ $hrc = 0 ] || { echo "HEAD device trees do not build"; fail=1; } +if [ -s "$W/new.warn" ]; then echo "--- new CHECK_DTBS warnings"; cat "$W/new.warn"; fail=1; fi +b=$(git diff --name-only --diff-filter=AM "$BASE" "$HEAD" -- 'Documentation/devicetree/bindings/*.yaml') +for f in $b; do + if make -s -C "$W/src-head" O="$W/out-head" dt_binding_check DT_SCHEMA_FILES="${f#Documentation/devicetree/bindings/}" > "$W/binding.log" 2>&1 && + ! grep -qE 'warning|error' "$W/binding.log"; then + echo "binding ok: $f" + else + echo "--- binding check failed: $f"; cat "$W/binding.log"; fail=1 + fi +done +git worktree remove --force "$W/src-base" 2>/dev/null; true +exit $fail diff --git a/sound/soc/apple/macaudio-amp-level-test.h b/sound/soc/apple/macaudio-amp-level-test.h index 54f091838085b..bf062d733d648 100644 --- a/sound/soc/apple/macaudio-amp-level-test.h +++ b/sound/soc/apple/macaudio-amp-level-test.h @@ -57,7 +57,7 @@ static void macaudio_level_no_table(struct kunit *test) &macaudio_j180_cfg, &macaudio_j314_cfg, &macaudio_j316_cfg, &macaudio_j37x_j47x_cfg, &macaudio_j413_cfg, &macaudio_j415_cfg, &macaudio_j493_cfg, &macaudio_j614_cfg, &macaudio_j616_cfg, - &macaudio_j713_cfg, + &macaudio_j713_cfg, &macaudio_j715_cfg, }; unsigned int i; diff --git a/sound/soc/apple/macaudio.c b/sound/soc/apple/macaudio.c index 9039758b57c0c..5506a2021911b 100644 --- a/sound/soc/apple/macaudio.c +++ b/sound/soc/apple/macaudio.c @@ -2989,6 +2989,27 @@ struct macaudio_platform_cfg macaudio_j713_cfg = { .speaker_fe_channels = 6, }; +/* + * J715 (T8132, MacBook Air 15" M4): the same stream with six SN012776 amps, + * two woofers and a tweeter per side, on all six playback and twelve sense + * slots. The speakers stay at their safe level as on the J713. + */ +struct macaudio_platform_cfg macaudio_j715_cfg = { + .enable_speakers = true, + .amp = AMP_SN012776, + .speakers = SPKR_2W1T, + .stereo = true, + .safe_vol = -20, + .fe_dai_names = { "j616-pcm-0", "j616-pcm-1", "j616-pcm-2" }, + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBC_CFC | + SND_SOC_DAIFMT_GATED | SND_SOC_DAIFMT_NB_IF, + .secondary_bclk_ratio = 250, + .fe_cpu_is_platform = true, + /* No headphone codec on this card: the jack is a card of its own. */ + .route_only_fes = BIT(0), + .speaker_fe_channels = 6, +}; + /* * The J614s and J616s headphone jack, a card of its own: a CS42L84 on the * AOP's "jack" back-end, which the firmware runs on MCA cluster 2 as a 64-SCLK @@ -3083,6 +3104,9 @@ static const struct of_device_id macaudio_snd_device_id[] = { { .compatible = "apple,j873-macaudio", .data = &macaudio_j873_cfg }, /* j813 AID? sn012776 15 2x 1W+1T (AOP-fed, V/I sense) */ { .compatible = "apple,j813-macaudio", .data = &macaudio_j813_cfg }, + /* j715 - sn012776 15 2x 2W+1T (AOP-fed, one serializer) */ + { .compatible = "apple,j715-macaudio", .data = &macaudio_j715_cfg }, + { .compatible = "apple,j715-macaudio-jack", .data = &macaudio_j616_jack_cfg }, /* Fallback, jack only */ { .compatible = "apple,macaudio"}, { } diff --git a/tools/asahi/avd-av1-tail-tests.py b/tools/asahi/avd-av1-tail-tests.py index d434ab3a0b8a2..633e3fdda337d 100644 --- a/tools/asahi/avd-av1-tail-tests.py +++ b/tools/asahi/avd-av1-tail-tests.py @@ -54,6 +54,7 @@ def structure(source, name): #define ALIGN_DOWN(x,a) ((x)&~((__typeof__(x))(a)-1)) #define WARN_ON(x) (x) #define DIV_ROUND_UP(n,d) (((n)+(d)-1)/(d)) +#define dev_err_ratelimited(...) ((void)0) @ALIGNMENT@ @CDF_HEADER@ @CDF_DEFAULTS@ @@ -64,10 +65,10 @@ def structure(source, name): struct {unsigned int color_size; unsigned short width,height; size_t seg_size;} av1; }; struct avd_buf {void *cpu; dma_addr_t addr;}; -struct avd_run {struct {struct vb2_v4l2_buffer *dst;} bufs; dma_addr_t y_out;}; +struct avd_run {struct {struct vb2_v4l2_buffer *src,*dst;} bufs; dma_addr_t y_out;}; @RUN_STRUCT@ @CTX_STRUCT@ -struct v4l2_ctrl {struct {void *p;} p_cur;}; +struct v4l2_ctrl {unsigned int elems; struct {void *p;} p_cur;}; struct v4l2_pix_format_mplane {unsigned int width,height; struct {unsigned int sizeimage;} plane_fmt[1];}; struct avd_ctx {void *priv; int ctrl_hdl; struct {struct {struct {unsigned int width,height;} pix_mp;} fmt;} decoded_fmt;}; static struct avd_decoded_buffer *reference; @@ -78,6 +79,7 @@ def structure(source, name): static struct v4l2_ctrl controls[4]; static unsigned int lookup_calls, preamble_calls; static void *vb2_plane_vaddr(struct vb2_buffer *b,unsigned int p){assert(p==0);return b->memory;} +static unsigned long vb2_get_plane_payload(struct vb2_buffer *b,unsigned int p){assert(p==0);return b->planes[0].length;} static dma_addr_t vb2_dma_contig_plane_dma_addr(struct vb2_buffer *b,unsigned int p){assert(p==0);return b->dma;} static struct avd_decoded_buffer *vb2_to_avd_decoded_buf(struct vb2_buffer *b){return (void *)b;} static struct avd_decoded_buffer *avd_get_ref_buf(struct avd_ctx *ctx,struct vb2_v4l2_buffer *dst,uint64_t timestamp){(void)ctx;(void)dst;assert(timestamp==1000);lookup_calls++;return reference;} @@ -213,7 +215,7 @@ def main(): text = {name: p.read_text() for name, p in paths.items()} src = text['avd-av1.c'] macros = src[src.index('#define AVD_CDFS_SIZE'):src.index('struct avd_av1_run {')] - functions = {n: function(src, n) for n in ['avd_av1_ref_ts', 'avd_av1_set_prob', 'avd_av1_set_seg', 'avd_av1_seg_size', 'avd_color_size', 'avd_av1_run_preamble', 'avd_av1_adjust_decoded_fmt']} + functions = {n: function(src, n) for n in ['avd_av1_ref_ts', 'avd_av1_set_prob', 'avd_av1_set_seg', 'avd_av1_seg_size', 'avd_color_size', 'avd_av1_check_tiles', 'avd_av1_run_preamble', 'avd_av1_adjust_decoded_fmt']} unaligned = ('\n#define UNALIGNED_CDFS_OFFSET(dst,cl) ((dst)-ALIGN(cl,AVD_ALIGN)-ALIGN(AVD_CDFS_SIZE,AVD_ALIGN))\n' '#define UNALIGNED_SEG_OFFSET(dst,cl,sl) (UNALIGNED_CDFS_OFFSET(dst,cl)-(sl))\n') # Each mutation names the extracted text it rewrites; a stale one is refused, never run as a no-op. diff --git a/tools/asahi/clpc-gpu-demand-tests.py b/tools/asahi/clpc-gpu-demand-tests.py index 68407dd744dd6..c8c2c9d9ad361 100644 --- a/tools/asahi/clpc-gpu-demand-tests.py +++ b/tools/asahi/clpc-gpu-demand-tests.py @@ -37,6 +37,7 @@ def main(): 'static bool apple_clpc_gpu_limited(', 'static void apple_clpc_gpu_floor_count(', 'static bool apple_clpc_gpu_input_demand(', + 'static bool apple_clpc_ane_input_demand(', 'static void apple_clpc_sample(']) code = r''' #include @@ -64,6 +65,9 @@ def main(): enum apple_clpc_rail { APPLE_CLPC_DCS, APPLE_CLPC_SOC, APPLE_CLPC_RAILS }; ''' + types + r''' struct apple_clpc_gpu { bool active; u64 sequence; }; +struct apple_clpc_ane { int lock; bool active, pending; }; +#define spin_lock_irqsave(l, f) ((void)(l), (f) = 0) +#define spin_unlock_irqrestore(l, f) ((void)(l), (void)(f)) struct apple_clpc_cluster { unsigned int request[APPLE_CLPC_RAILS]; }; struct apple_clpc { const struct apple_clpc_hw *hw; @@ -82,6 +86,8 @@ def main(): unsigned long gpu_streaming_samples, gpu_dense_samples; u64 last_vote_ns; struct apple_clpc_gpu *gpu; + struct apple_clpc_ane *ane; + unsigned int ane_states[APPLE_CLPC_RAILS]; }; static unsigned long jiffies; static u64 ktime_get_mono_fast_ns(void) { return jiffies * 1000000ull; } @@ -104,6 +110,23 @@ def main(): } static void apple_clpc_queue(struct apple_clpc *c, bool idle) { (void)c; queued_idle=idle; } ''' + dense_samples + '\n' + tables + '\n' + methods + r''' +// T8140 ANE work holds its DRAM and fabric states while it runs, a request +// shorter than one sample is still seen once, and the hold then expires. +static void check_t8140_ane(void) { + struct apple_clpc_ane ane={0}; + struct apple_clpc c={.hw=&apple_clpc_hw_t8140,.agent=1,.mask=3,.ane=&ane}; + c.ane_states[APPLE_CLPC_DCS]=c.hw->ane[APPLE_CLPC_DCS]; + c.ane_states[APPLE_CLPC_SOC]=c.hw->ane[APPLE_CLPC_SOC]; + read_error=vote_error=0; pmgr_status=0; pmp_floor=0; jiffies=1000; published=~0u; + apple_clpc_sample(&c); assert(published==0 && c.last_reason==0); + ane.active=true; jiffies=1004; apple_clpc_sample(&c); + assert(published==0x34 && c.last_reason==32); + ane.active=false; ane.pending=true; jiffies=1008; apple_clpc_sample(&c); + assert(published==0x34 && c.last_reason==32 && !ane.pending); + jiffies=1012; apple_clpc_sample(&c); assert(published==0x34 && c.last_reason==16); + jiffies=1040; apple_clpc_sample(&c); assert(published==0 && queued_idle); +} + // T8132's G16 firmware keeps graphics powered while the GPU idles: the // M5/F3 floor follows the work the GPU driver reports, as on T6040. static void check_t8132(void) { @@ -205,7 +228,8 @@ def main(): check_read_error(); check_t8140(); check_t8140_dense(); - puts("PASS: T6040 and T8132 host demand; T8140 streaming, dense work, read errors and PMP backoff; idle release"); + check_t8140_ane(); + puts("PASS: T6040 and T8132 host demand; T8140 ANE, streaming, dense work, read errors and PMP backoff; idle release"); } ''' code = code.replace('#define APPLE_PMC_RAIL_SHIFT(r) ((r)*8)', rail_shift) @@ -214,7 +238,9 @@ def main(): for name, text in [ ('fixed', code), ('omit-host-demand', code.replace('if (apple_clpc_gpu_input_demand(clpc->hw, clpc->gpu, demand))', - 'if (false && apple_clpc_gpu_input_demand(clpc->hw, clpc->gpu, demand))')), ('omit-streaming-demand', code.replace('bool streaming = apple_clpc_gpu_streaming(clpc, now);', + 'if (false && apple_clpc_gpu_input_demand(clpc->hw, clpc->gpu, demand))')), ('omit-ane-demand', code.replace('if (apple_clpc_ane_input_demand(clpc, demand))', + 'if (false && apple_clpc_ane_input_demand(clpc, demand))')), + ('omit-streaming-demand', code.replace('bool streaming = apple_clpc_gpu_streaming(clpc, now);', 'bool streaming = (apple_clpc_gpu_streaming(clpc, now), false);')), ('omit-dense-demand', code.replace('if (streaming || dense) {', 'if (streaming || (dense && false)) {')), ('dense-ignores-late', code.replace('if (!threshold || late || submissions < threshold)', diff --git a/tools/asahi/t6030-pmp-graph-tests.c b/tools/asahi/t6030-pmp-graph-tests.c index ca1cde04f1363..f66c94e26fc6e 100644 --- a/tools/asahi/t6030-pmp-graph-tests.c +++ b/tools/asahi/t6030-pmp-graph-tests.c @@ -463,6 +463,12 @@ static bool of_machine_is_compatible(const char *s) { return !strcmp(s, "apple,t6030"); } +/* As in . */ +static inline bool apple_t8132_air(void) +{ + return of_machine_is_compatible("apple,j713") || + of_machine_is_compatible("apple,j715"); +} static bool of_property_read_bool(const struct device_node *n, const char *p) { if (!strcmp(p, "apple,always-on")) diff --git a/tools/asahi/t6030-pmp-supplier-tests.c b/tools/asahi/t6030-pmp-supplier-tests.c index ecb6dcec9fff5..6bbd3b30572e6 100644 --- a/tools/asahi/t6030-pmp-supplier-tests.c +++ b/tools/asahi/t6030-pmp-supplier-tests.c @@ -159,6 +159,12 @@ static bool of_machine_is_compatible(const char *name) { return !strcmp(machine, name); } +/* As in . */ +static inline bool apple_t8132_air(void) +{ + return of_machine_is_compatible("apple,j713") || + of_machine_is_compatible("apple,j715"); +} static struct device_node *of_find_compatible_node(struct device_node *from, const char *type, const char *compat) diff --git a/tools/testing/selftests/drivers/apple/macsmc-j713.py b/tools/testing/selftests/drivers/apple/macsmc-j713.py index d4398800492a8..cc3402376f157 100755 --- a/tools/testing/selftests/drivers/apple/macsmc-j713.py +++ b/tools/testing/selftests/drivers/apple/macsmc-j713.py @@ -24,6 +24,7 @@ def main(): root = Path(__file__).resolve().parents[5] source = (root / "drivers/gpio/gpio-macsmc.c").read_text() header = (root / "include/linux/mfd/macsmc.h").read_text() + t8132 = (root / "include/linux/soc/apple/t8132.h").read_text() defines = "\n".join(re.findall( r"^#define (?:MAX_GPIO|MACSMC_\w+|CMD_\w+|MODE_\w+)\b[^\n]*", source, re.M)) key_defines = "\n".join(re.findall(r"^#define (?:_SMC_KEY\(s\)|SMC_KEY\(s\))[^\n]*", header, re.M)) @@ -97,18 +98,23 @@ def main(): # Compile the actual probe assignments, so the test also checks board selection. assignments = re.search(r"\tsmcgp->j713 = [^;]+;\n\tmutex_init\([^;]+;", source).group() parts += [r''' -static bool board_j713; +static const char *const boards[] = { NULL, "apple,j713", "apple,j715" }; +static unsigned int board; static bool of_machine_is_compatible(const char *name) -{ assert(!strcmp(name, "apple,j713")); return board_j713; } +{ + assert(!strcmp(name, "apple,j713") || !strcmp(name, "apple,j715")); + return board && !strcmp(name, boards[board]); +} +''', block(t8132, "static inline bool apple_t8132_air("), r''' static void profile_init(struct macsmc_gpio *smcgp) { ''', assignments, r''' } -static void reset(struct macsmc_gpio *g, bool j713, smc_key base) +static void reset(struct macsmc_gpio *g, unsigned int which, smc_key base) { memset(g, 0, sizeof(*g)); g->gc.data = g; g->base_key = base; - board_j713 = j713; profile_init(g); + board = which; profile_init(g); active = g; expect_native = false; write_result = rw_result = 0; writes32 = writes64 = rw_count = 0; } @@ -147,11 +153,11 @@ def main(): CHECK(!g.j713_reg_on_lock.held && rw_count == 0 && writes64 == 0); /* Every other board/namespace/line retains the generic GPIO operations. */ - for (unsigned int board = 0; board < 2; board++) + for (unsigned int b = 0; b < 3; b++) for (unsigned int lower = 0; lower < 2; lower++) for (unsigned int line = 0; line < MAX_GPIO; line++) { - reset(&g, board, lower ? _SMC_KEY("gp\0\0") : _SMC_KEY("gP\0\0")); - bool native = board && !lower && line == 0x13; + reset(&g, b, lower ? _SMC_KEY("gp\0\0") : _SMC_KEY("gP\0\0")); + bool native = b && !lower && line == 0x13; CHECK(macsmc_gpio_is_j713_reg_on(&g, line) == native); if (native) continue; CHECK(macsmc_gpio_get_direction(&g.gc, line) == GPIO_LINE_DIRECTION_OUT); diff --git a/tools/testing/selftests/drivers/gpu/apple-dcp/dwc3/mocks.c b/tools/testing/selftests/drivers/gpu/apple-dcp/dwc3/mocks.c index 9ad16b8627902..ae59233cf8b9f 100644 --- a/tools/testing/selftests/drivers/gpu/apple-dcp/dwc3/mocks.c +++ b/tools/testing/selftests/drivers/gpu/apple-dcp/dwc3/mocks.c @@ -192,6 +192,12 @@ static bool of_machine_is_compatible(const char *name) { return !strcmp(name, "apple,t8140"); } +/* As in . */ +static inline bool apple_t8132_air(void) +{ + return of_machine_is_compatible("apple,j713") || + of_machine_is_compatible("apple,j715"); +} #define READ_ONCE(x) (x) #define WRITE_ONCE(p, v) ((p) = (v)) diff --git a/tools/testing/selftests/drivers/gpu/apple-dcp/m4-dart-boot-contract-test.py b/tools/testing/selftests/drivers/gpu/apple-dcp/m4-dart-boot-contract-test.py index 0366c9102d31b..79ba745f03e04 100755 --- a/tools/testing/selftests/drivers/gpu/apple-dcp/m4-dart-boot-contract-test.py +++ b/tools/testing/selftests/drivers/gpu/apple-dcp/m4-dart-boot-contract-test.py @@ -20,6 +20,9 @@ args = parser.parse_args() DTB, ROOT = args.dtb, args.kernel_root.resolve() source = (ROOT / 'drivers/iommu/apple-dart.c').read_text() +t8132 = (ROOT / 'include/linux/soc/apple/t8132.h').read_text() +air = t8132[t8132.index('static inline bool apple_t8132_air('):] +air = air[:air.index('\n}\n') + 3] def property(node, name, kind='s'): @@ -77,8 +80,10 @@ def address(node): static unsigned int checks; static bool of_machine_is_compatible(const char *s) { if (!strcmp(s,"apple,j713")) return board; + if (!strcmp(s,"apple,j715")) return false; assert(!strcmp(s,"apple,t8132")); return soc; } +AIR_HELPER static bool of_device_is_compatible(const struct device_node *n,const char *s) { for(unsigned int i=0;icount;i++) if(!strcmp(n->compatible[i],s))return true; return false; @@ -127,6 +132,7 @@ def address(node): } ''' for name, value in { + 'AIR_HELPER': air, 'RADIO_EXPRESSION': radio, 'MTP_EXPRESSION': mtp, 'IRQ_EXPRESSION': irq, 'IRQ_EXPECTED': '(display||radio)' if 'preserve_display' in irq else 'radio', 'RADIO_COMPAT': radio_compat, 'MTP_COMPAT': mtp_compat, diff --git a/tools/testing/selftests/drivers/gpu/apple-dcp/m4.py b/tools/testing/selftests/drivers/gpu/apple-dcp/m4.py index 7fc32185e318d..79f4c23ebc677 100644 --- a/tools/testing/selftests/drivers/gpu/apple-dcp/m4.py +++ b/tools/testing/selftests/drivers/gpu/apple-dcp/m4.py @@ -58,7 +58,8 @@ def header_body(source): def production(root): - return PREFIX + ''.join(header_body((root / APPLE / p).read_text()) for p in HEADERS) + return (PREFIX + ''.join(header_body((root / APPLE / p).read_text()) for p in HEADERS) + + 'const struct dcp_m4_profile *dcp_m4_pf = &dcp_m4_profile_j713;\n') def request_golden(root, output):