diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index c5e4ab0ba915f0..a0a655039415f0 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -549,6 +549,13 @@ Kernel parameters apm= [APM] Advanced Power Management See header of arch/x86/kernel/apm_32.c. + apple_keep_idle_nop + [ARM64,EARLY] On T6050, keep idle=nop. These cores + idle in WFI by default, and an idle=nop that the boot + loader appends is ignored, because the kernel + preserves the registers WFI loses there. With this + flag idle=nop spins the idle loop as elsewhere. + apparmor= [APPARMOR] Disable or enable AppArmor at boot time Format: { "0" | "1" } See security/apparmor/Kconfig help text diff --git a/Documentation/devicetree/bindings/arm/apple.yaml b/Documentation/devicetree/bindings/arm/apple.yaml index 269909160867dd..51ee748ce19104 100644 --- a/Documentation/devicetree/bindings/arm/apple.yaml +++ b/Documentation/devicetree/bindings/arm/apple.yaml @@ -360,6 +360,18 @@ properties: - const: apple,t8142 - const: apple,arm-platform + - description: Apple M5 Pro SoC based platforms + items: + - const: apple,j716s # MacBook Pro (16-inch, M5 Pro, 2026) + - const: apple,t6050 + - const: apple,arm-platform + + - description: Apple M5 Max SoC based platforms + items: + - const: apple,j714c # MacBook Pro (14-inch, M5 Max, 2026) + - const: apple,t6050 + - const: apple,arm-platform + - description: Apple M6 SoC based platforms items: - const: apple,j873g # Mac mini (M6) diff --git a/Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml b/Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml index c5fce7d78bfc62..d8938d70fc5208 100644 --- a/Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml +++ b/Documentation/devicetree/bindings/arm/apple/apple,pmgr.yaml @@ -40,6 +40,7 @@ properties: - apple,t6020-pmgr - apple,t6030-pmgr - apple,t6031-pmgr + - apple,t6050-pmgr - apple,t8122-pmgr - apple,t8132-pmgr - apple,t8140-pmgr diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.yaml index bf4142469cb09c..d3e8faf5710c19 100644 --- a/Documentation/devicetree/bindings/arm/cpus.yaml +++ b/Documentation/devicetree/bindings/arm/cpus.yaml @@ -95,6 +95,7 @@ properties: - apple,mistral - apple,monsoon - apple,sawtooth + - apple,sotra - apple,t8152-e - apple,t8152-m - apple,t8152-p diff --git a/Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml b/Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml index a27f4314e0387a..c7cc6f262eb699 100644 --- a/Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml +++ b/Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml @@ -37,6 +37,7 @@ properties: - const: apple,s5l8960x-cluster-cpufreq - const: apple,t8140-cluster-cpufreq - const: apple,t8142-cluster-cpufreq + - const: apple,t6050-cluster-cpufreq - const: apple,t8152-cluster-cpufreq - items: - const: apple,t6020-cluster-cpufreq diff --git a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml index 45ffdebc9d86bf..1054c6f724b71f 100644 --- a/Documentation/devicetree/bindings/display/simple-framebuffer.yaml +++ b/Documentation/devicetree/bindings/display/simple-framebuffer.yaml @@ -142,6 +142,12 @@ properties: - mixer1-lcd1-hdmi - mixer1-lcd1-tve + apple,internal-panel: + type: boolean + description: + The framebuffer is the built-in panel of an Apple laptop, which the + boot loader hands over before the display coprocessor driver runs. + amlogic,pipeline: description: Pipeline used by the framebuffer on Amlogic SoCs enum: diff --git a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml index ea4ddc838d8605..ae96a7ac908c70 100644 --- a/Documentation/devicetree/bindings/i2c/apple,i2c.yaml +++ b/Documentation/devicetree/bindings/i2c/apple,i2c.yaml @@ -26,6 +26,7 @@ properties: - apple,t6020-i2c - apple,t6030-i2c - apple,t6031-i2c + - apple,t6050-i2c - apple,t8122-i2c - apple,t8132-i2c - apple,t8140-i2c diff --git a/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml b/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml index 25f31c8fb452de..c00cba873d224c 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/apple,aic2.yaml @@ -50,6 +50,10 @@ properties: - apple,t8142-aic3 - apple,t8152-aic3 - const: apple,t8122-aic3 + - items: + - const: apple,t6050-aic3 + - const: apple,t8142-aic3 + - const: apple,t8122-aic3 - const: apple,t8122-aic3 interrupt-controller: true diff --git a/Documentation/devicetree/bindings/iommu/apple,dart.yaml b/Documentation/devicetree/bindings/iommu/apple,dart.yaml index 44a0499ada2cbc..51a87422d65ae1 100644 --- a/Documentation/devicetree/bindings/iommu/apple,dart.yaml +++ b/Documentation/devicetree/bindings/iommu/apple,dart.yaml @@ -36,10 +36,15 @@ properties: - items: - enum: - apple,t6020-dart + - apple,t6050-dart - apple,t8122-dart - apple,t8140-dart - apple,t8142-dart - const: apple,t8110-dart + - items: + - const: apple,t6050-dart + - const: apple,t8142-dart + - const: apple,t8110-dart reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/iommu/apple,sart.yaml b/Documentation/devicetree/bindings/iommu/apple,sart.yaml index 472454c3d24d67..267bb580e998ef 100644 --- a/Documentation/devicetree/bindings/iommu/apple,sart.yaml +++ b/Documentation/devicetree/bindings/iommu/apple,sart.yaml @@ -38,6 +38,7 @@ properties: - const: apple,t6000-sart - enum: - apple,t6000-sart + - apple,t6050-sart - apple,t8015-sart - apple,t8103-sart diff --git a/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml b/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml index 8d66dc77c0a54e..c9b022de25f6c5 100644 --- a/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml +++ b/Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml @@ -35,6 +35,7 @@ properties: - apple,t8142-asc-mailbox - apple,t6000-asc-mailbox - apple,t6020-asc-mailbox + - apple,t6050-asc-mailbox - const: apple,asc-mailbox-v4 - description: diff --git a/Documentation/devicetree/bindings/mfd/apple,smc.yaml b/Documentation/devicetree/bindings/mfd/apple,smc.yaml index 31d1940f9d3dc0..0a3ab9d9473959 100644 --- a/Documentation/devicetree/bindings/mfd/apple,smc.yaml +++ b/Documentation/devicetree/bindings/mfd/apple,smc.yaml @@ -19,6 +19,7 @@ properties: - items: - enum: - apple,t6020-smc + - apple,t6050-smc - apple,t8122-smc - apple,t8140-smc - apple,t8142-smc diff --git a/Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml b/Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml index fc8a4afd5add47..20cb5703638572 100644 --- a/Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml +++ b/Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml @@ -22,6 +22,9 @@ properties: - items: - const: apple,t8140-nvme-ans2 - const: apple,t8132-nvme-ans2 + - items: + - const: apple,t6050-nvme-ans2 + - const: apple,t8140-nvme-ans2 - items: - enum: # Do not add additional SoC to this list. @@ -52,7 +55,7 @@ properties: SError, so it cannot be used to restart the co-processor there. power-domains: - # two domains for t8103, three for t6000, t6020 and t8140 + # two domains for t8103, three for t6000, t6020 and t8140, four for t6050 minItems: 2 items: - description: power domain for the NVMe controller. @@ -60,7 +63,10 @@ properties: controller to the storage modules. - description: optional power domain for the second PCIe bus connecting the NVMe controller to the storage modules (T6000, - T6020), or for the PCIe PHY of the link to the storage (T8140). + T6020), or for the PCIe PHY of the link to the storage (T8140, + T6050). + - description: power domain for the PCIe lane PHY of the link to the + storage (T6050). power-domain-names: minItems: 2 @@ -70,6 +76,7 @@ properties: - enum: - apcie1 - apcie_phy + - const: aphy_st0 mboxes: maxItems: 1 @@ -111,7 +118,9 @@ allOf: properties: compatible: contains: - const: apple,t8132-nvme-ans2 + enum: + - apple,t6050-nvme-ans2 + - apple,t8132-nvme-ans2 then: properties: reg: diff --git a/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml index 09cdd776f8d8bd..2eecc48c9b0616 100644 --- a/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml +++ b/Documentation/devicetree/bindings/nvmem/apple,spmi-nvmem.yaml @@ -18,6 +18,7 @@ properties: compatible: items: - enum: + - apple,abbey-pmic - apple,baku-pmic - apple,maverick-pmic - apple,sera-pmic diff --git a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml index b8b4a24107cd1b..18face34bd2002 100644 --- a/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml @@ -26,6 +26,9 @@ properties: - apple,t8132-pinctrl - apple,t8140-pinctrl - const: apple,t8103-pinctrl + - items: + - const: apple,t6050-pinctrl + - const: apple,t8140-pinctrl - items: # Do not add additional SoC to this list. - enum: diff --git a/Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml b/Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml index 7800f0f106f2cd..8d211b79538bd8 100644 --- a/Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml +++ b/Documentation/devicetree/bindings/power/apple,pmgr-pwrstate.yaml @@ -47,6 +47,7 @@ properties: - apple,t6020-pmgr-pwrstate - apple,t6030-pmgr-pwrstate - apple,t6031-pmgr-pwrstate + - apple,t6050-pmgr-pwrstate - apple,t8122-pmgr-pwrstate - apple,t8132-pmgr-pwrstate - apple,t8140-pmgr-pwrstate diff --git a/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml b/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml index 3b3cad92b601fa..5161591931df45 100644 --- a/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml +++ b/Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml @@ -25,6 +25,7 @@ properties: - apple,t6020-fpwm - apple,t6030-fpwm - apple,t6031-fpwm + - apple,t6050-fpwm - const: apple,s5l-fpwm reg: diff --git a/Documentation/devicetree/bindings/soc/apple/apple,dockchannel.yaml b/Documentation/devicetree/bindings/soc/apple/apple,dockchannel.yaml index a3362df34e148b..7b715cb3a72f38 100644 --- a/Documentation/devicetree/bindings/soc/apple/apple,dockchannel.yaml +++ b/Documentation/devicetree/bindings/soc/apple/apple,dockchannel.yaml @@ -25,6 +25,7 @@ properties: - apple,t6020-dockchannel - apple,t6030-dockchannel - apple,t6031-dockchannel + - apple,t6050-dockchannel - apple,t8112-dockchannel - apple,t8122-dockchannel - apple,t8140-dockchannel diff --git a/Documentation/devicetree/bindings/soc/apple/apple,rtk-helper-asc4.yaml b/Documentation/devicetree/bindings/soc/apple/apple,rtk-helper-asc4.yaml index da78694e374661..94605b2a122a40 100644 --- a/Documentation/devicetree/bindings/soc/apple/apple,rtk-helper-asc4.yaml +++ b/Documentation/devicetree/bindings/soc/apple/apple,rtk-helper-asc4.yaml @@ -25,6 +25,7 @@ properties: - apple,t6020-mtp - apple,t6030-mtp - apple,t6031-mtp + - apple,t6050-mtp - apple,t8112-mtp - apple,t8122-mtp - apple,t8140-mtp diff --git a/Documentation/devicetree/bindings/spmi/apple,spmi.yaml b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml index f88e21c348667b..99969dfa1ee0d8 100644 --- a/Documentation/devicetree/bindings/spmi/apple,spmi.yaml +++ b/Documentation/devicetree/bindings/spmi/apple,spmi.yaml @@ -35,6 +35,9 @@ properties: - apple,t8112-spmi - const: apple,spmi - const: apple,t8142-spmi + - items: + - const: apple,t6050-spmi + - const: apple,t8142-spmi reg: maxItems: 1 diff --git a/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml b/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml index 1af924157f7ca6..401ef0a17d7a26 100644 --- a/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/apple,wdt.yaml @@ -20,6 +20,7 @@ properties: - apple,t6020-wdt - apple,t6030-wdt - apple,t6031-wdt + - apple,t6050-wdt - apple,t8122-wdt - apple,t8132-wdt - apple,t8140-wdt diff --git a/arch/arm64/boot/dts/apple/Makefile b/arch/arm64/boot/dts/apple/Makefile index d15eeeb9ece3f0..8b605c635d6cd4 100644 --- a/arch/arm64/boot/dts/apple/Makefile +++ b/arch/arm64/boot/dts/apple/Makefile @@ -94,6 +94,8 @@ dtb-$(CONFIG_ARCH_APPLE) += t6031-j516c.dtb dtb-$(CONFIG_ARCH_APPLE) += t6032-j575d.dtb dtb-$(CONFIG_ARCH_APPLE) += t6034-j514m.dtb dtb-$(CONFIG_ARCH_APPLE) += t6034-j516m.dtb +dtb-$(CONFIG_ARCH_APPLE) += t6050-j714c.dtb +dtb-$(CONFIG_ARCH_APPLE) += t6050-j716s.dtb dtb-$(CONFIG_ARCH_APPLE) += t8112-j413.dtb dtb-$(CONFIG_ARCH_APPLE) += t8112-j415.dtb dtb-$(CONFIG_ARCH_APPLE) += t8112-j473.dtb diff --git a/arch/arm64/boot/dts/apple/t6050-base.dtsi b/arch/arm64/boot/dts/apple/t6050-base.dtsi new file mode 100644 index 00000000000000..bbb02557345c64 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-base.dtsi @@ -0,0 +1,575 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Nodes common for T6050 family SoCs (M5 Max) + * + * Copyright The Asahi Linux Contributors + */ + +/ { + #address-cells = <2>; + #size-cells = <2>; + + clk_200m: clock-200m { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <200000000>; + clock-output-names = "clk_200m"; + }; + + clkref: clock-ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + clock-output-names = "clkref"; + }; + + // This is a fabulated representation of the input clock + // to NCO since we don't know the true clock tree. + nco_clkref: clock-ref-nco { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-output-names = "nco_ref"; + }; + + cpus { + // cpu reg is the MPIDR affinity. On T6050 the boot core reads + // MPIDR_EL1 0x80040000: Aff2 is 4, cluster in Aff1, core in Aff0. + // Clusters 1 and 2 follow that pattern; their cores do not start today. + #address-cells = <2>; + #size-cells = <0>; + + cpu-map { + cluster0 { + core0 { cpu = <&cpu_m00>; }; + core1 { cpu = <&cpu_m01>; }; + core2 { cpu = <&cpu_m02>; }; + core3 { cpu = <&cpu_m03>; }; + core4 { cpu = <&cpu_m04>; }; + core5 { cpu = <&cpu_m05>; }; + }; + + cluster1 { + core0 { cpu = <&cpu_m10>; }; + core1 { cpu = <&cpu_m11>; }; + core2 { cpu = <&cpu_m12>; }; + core3 { cpu = <&cpu_m13>; }; + core4 { cpu = <&cpu_m14>; }; + core5 { cpu = <&cpu_m15>; }; + }; + + cluster2 { + core0 { cpu = <&cpu_p00>; }; + core1 { cpu = <&cpu_p01>; }; + core2 { cpu = <&cpu_p02>; }; + core3 { cpu = <&cpu_p03>; }; + core4 { cpu = <&cpu_p04>; }; + core5 { cpu = <&cpu_p05>; }; + }; + }; + + // T6050 (J714c ADT): 18 CPUs, three 6-core clusters. Clusters 0 + // and 1 are cluster-type "M", cluster 2 is cluster-type "P". + // reg encodes cluster << 8 | core. MIDR part 0x68 ("Sotra C" + // family). + cpu_m00: cpu@0 { + compatible = "apple,sotra"; + reg = <0x0 0x40000>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_0>; + operating-points-v2 = <&mcluster0_opp>; + performance-domains = <&cpufreq_m0>; + }; + + cpu_m01: cpu@1 { + compatible = "apple,sotra"; + reg = <0x0 0x40001>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_0>; + operating-points-v2 = <&mcluster0_opp>; + performance-domains = <&cpufreq_m0>; + }; + + cpu_m02: cpu@2 { + compatible = "apple,sotra"; + reg = <0x0 0x40002>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_0>; + operating-points-v2 = <&mcluster0_opp>; + performance-domains = <&cpufreq_m0>; + }; + + cpu_m03: cpu@3 { + compatible = "apple,sotra"; + reg = <0x0 0x40003>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_0>; + operating-points-v2 = <&mcluster0_opp>; + performance-domains = <&cpufreq_m0>; + }; + + cpu_m04: cpu@4 { + compatible = "apple,sotra"; + reg = <0x0 0x40004>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_0>; + operating-points-v2 = <&mcluster0_opp>; + performance-domains = <&cpufreq_m0>; + }; + + cpu_m05: cpu@5 { + compatible = "apple,sotra"; + reg = <0x0 0x40005>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_0>; + operating-points-v2 = <&mcluster0_opp>; + performance-domains = <&cpufreq_m0>; + }; + + cpu_m10: cpu@100 { + compatible = "apple,sotra"; + reg = <0x0 0x40100>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_1>; + operating-points-v2 = <&mcluster1_opp>; + performance-domains = <&cpufreq_m1>; + }; + + cpu_m11: cpu@101 { + compatible = "apple,sotra"; + reg = <0x0 0x40101>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_1>; + operating-points-v2 = <&mcluster1_opp>; + performance-domains = <&cpufreq_m1>; + }; + + cpu_m12: cpu@102 { + compatible = "apple,sotra"; + reg = <0x0 0x40102>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_1>; + operating-points-v2 = <&mcluster1_opp>; + performance-domains = <&cpufreq_m1>; + }; + + cpu_m13: cpu@103 { + compatible = "apple,sotra"; + reg = <0x0 0x40103>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_1>; + operating-points-v2 = <&mcluster1_opp>; + performance-domains = <&cpufreq_m1>; + }; + + cpu_m14: cpu@104 { + compatible = "apple,sotra"; + reg = <0x0 0x40104>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_1>; + operating-points-v2 = <&mcluster1_opp>; + performance-domains = <&cpufreq_m1>; + }; + + cpu_m15: cpu@105 { + compatible = "apple,sotra"; + reg = <0x0 0x40105>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_1>; + operating-points-v2 = <&mcluster1_opp>; + performance-domains = <&cpufreq_m1>; + }; + + cpu_p00: cpu@200 { + compatible = "apple,sotra"; + reg = <0x0 0x10200>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_2>; + operating-points-v2 = <&pcluster0_opp>; + performance-domains = <&cpufreq_p0>; + }; + + cpu_p01: cpu@201 { + compatible = "apple,sotra"; + reg = <0x0 0x10201>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_2>; + operating-points-v2 = <&pcluster0_opp>; + performance-domains = <&cpufreq_p0>; + }; + + cpu_p02: cpu@202 { + compatible = "apple,sotra"; + reg = <0x0 0x10202>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_2>; + operating-points-v2 = <&pcluster0_opp>; + performance-domains = <&cpufreq_p0>; + }; + + cpu_p03: cpu@203 { + compatible = "apple,sotra"; + reg = <0x0 0x10203>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_2>; + operating-points-v2 = <&pcluster0_opp>; + performance-domains = <&cpufreq_p0>; + }; + + cpu_p04: cpu@204 { + compatible = "apple,sotra"; + reg = <0x0 0x10204>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_2>; + operating-points-v2 = <&pcluster0_opp>; + performance-domains = <&cpufreq_p0>; + }; + + cpu_p05: cpu@205 { + compatible = "apple,sotra"; + reg = <0x0 0x10205>; + cpu-release-addr = <0 0>; /* to be filled by loader */ + device_type = "cpu"; + enable-method = "spin-table"; + next-level-cache = <&l2_cache_2>; + operating-points-v2 = <&pcluster0_opp>; + performance-domains = <&cpufreq_p0>; + }; + + l2_cache_0: l2-cache-0 { + compatible = "cache"; + cache-level = <2>; + cache-unified; + }; + + l2_cache_1: l2-cache-1 { + compatible = "cache"; + cache-level = <2>; + cache-unified; + }; + + l2_cache_2: l2-cache-2 { + compatible = "cache"; + cache-level = <2>; + cache-unified; + }; + }; + + // Cluster P-states from the ADT: cluster 0 (M) voltage-states22-sram, + // cluster 1 (M) voltage-states23-sram, cluster 2 (P) + // voltage-states5-sram. The frequency in kHz per hardware P-state; + // opp-level is that P-state. No clock-latency-ns, not measured. + mcluster0_opp: opp-table-0 { + compatible = "operating-points-v2"; + opp-shared; + + opp01 { + opp-hz = /bits/ 64 <1344000000>; + opp-level = <1>; + }; + + opp02 { + opp-hz = /bits/ 64 <1644000000>; + opp-level = <2>; + }; + + opp03 { + opp-hz = /bits/ 64 <1992000000>; + opp-level = <3>; + }; + + opp04 { + opp-hz = /bits/ 64 <2304000000>; + opp-level = <4>; + }; + + opp05 { + opp-hz = /bits/ 64 <2652000000>; + opp-level = <5>; + }; + + opp06 { + opp-hz = /bits/ 64 <2964000000>; + opp-level = <6>; + }; + + opp07 { + opp-hz = /bits/ 64 <3240000000>; + opp-level = <7>; + }; + + opp08 { + opp-hz = /bits/ 64 <3504000000>; + opp-level = <8>; + }; + + opp09 { + opp-hz = /bits/ 64 <3696000000>; + opp-level = <9>; + }; + + opp10 { + opp-hz = /bits/ 64 <3876000000>; + opp-level = <10>; + }; + + opp11 { + opp-hz = /bits/ 64 <4044000000>; + opp-level = <11>; + }; + + opp12 { + opp-hz = /bits/ 64 <4176000000>; + opp-level = <12>; + }; + + opp13 { + opp-hz = /bits/ 64 <4284000000>; + opp-level = <13>; + }; + + opp14 { + opp-hz = /bits/ 64 <4308000000>; + opp-level = <14>; + }; + + opp15 { + opp-hz = /bits/ 64 <4380000000>; + opp-level = <15>; + }; + }; + + mcluster1_opp: opp-table-1 { + compatible = "operating-points-v2"; + opp-shared; + + opp01 { + opp-hz = /bits/ 64 <1344000000>; + opp-level = <1>; + }; + + opp02 { + opp-hz = /bits/ 64 <1644000000>; + opp-level = <2>; + }; + + opp03 { + opp-hz = /bits/ 64 <1992000000>; + opp-level = <3>; + }; + + opp04 { + opp-hz = /bits/ 64 <2304000000>; + opp-level = <4>; + }; + + opp05 { + opp-hz = /bits/ 64 <2652000000>; + opp-level = <5>; + }; + + opp06 { + opp-hz = /bits/ 64 <2964000000>; + opp-level = <6>; + }; + + opp07 { + opp-hz = /bits/ 64 <3240000000>; + opp-level = <7>; + }; + + opp08 { + opp-hz = /bits/ 64 <3504000000>; + opp-level = <8>; + }; + + opp09 { + opp-hz = /bits/ 64 <3696000000>; + opp-level = <9>; + }; + + opp10 { + opp-hz = /bits/ 64 <3876000000>; + opp-level = <10>; + }; + + opp11 { + opp-hz = /bits/ 64 <4044000000>; + opp-level = <11>; + }; + + opp12 { + opp-hz = /bits/ 64 <4176000000>; + opp-level = <12>; + }; + + opp13 { + opp-hz = /bits/ 64 <4284000000>; + opp-level = <13>; + }; + + opp14 { + opp-hz = /bits/ 64 <4308000000>; + opp-level = <14>; + }; + + opp15 { + opp-hz = /bits/ 64 <4380000000>; + opp-level = <15>; + }; + }; + + pcluster0_opp: opp-table-2 { + compatible = "operating-points-v2"; + opp-shared; + + opp01 { + opp-hz = /bits/ 64 <1308000000>; + opp-level = <1>; + }; + + opp02 { + opp-hz = /bits/ 64 <1620000000>; + opp-level = <2>; + }; + + opp03 { + opp-hz = /bits/ 64 <1980000000>; + opp-level = <3>; + }; + + opp04 { + opp-hz = /bits/ 64 <2292000000>; + opp-level = <4>; + }; + + opp05 { + opp-hz = /bits/ 64 <2580000000>; + opp-level = <5>; + }; + + opp06 { + opp-hz = /bits/ 64 <2880000000>; + opp-level = <6>; + }; + + opp07 { + opp-hz = /bits/ 64 <3180000000>; + opp-level = <7>; + }; + + opp08 { + opp-hz = /bits/ 64 <3432000000>; + opp-level = <8>; + }; + + opp09 { + opp-hz = /bits/ 64 <3648000000>; + opp-level = <9>; + }; + + opp10 { + opp-hz = /bits/ 64 <3828000000>; + opp-level = <10>; + }; + + opp11 { + opp-hz = /bits/ 64 <3984000000>; + opp-level = <11>; + }; + + opp12 { + opp-hz = /bits/ 64 <4104000000>; + opp-level = <12>; + }; + + opp13 { + opp-hz = /bits/ 64 <4188000000>; + opp-level = <13>; + }; + + opp14 { + opp-hz = /bits/ 64 <4236000000>; + opp-level = <14>; + }; + + opp15 { + opp-hz = /bits/ 64 <4284000000>; + opp-level = <15>; + }; + + opp16 { + opp-hz = /bits/ 64 <4308000000>; + opp-level = <16>; + }; + + opp17 { + opp-hz = /bits/ 64 <4332000000>; + opp-level = <17>; + }; + + opp18 { + opp-hz = /bits/ 64 <4428000000>; + opp-level = <18>; + }; + + opp19 { + opp-hz = /bits/ 64 <4512000000>; + opp-level = <19>; + }; + + opp20 { + opp-hz = /bits/ 64 <4608000000>; + opp-level = <20>; + }; + }; + + reserved-memory { + ranges; + #address-cells = <2>; + #size-cells = <2>; + }; + + timer { + compatible = "arm,armv8-timer"; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "phys", "virt", "hyp-phys", "hyp-virt"; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-die0.dtsi b/arch/arm64/boot/dts/apple/t6050-die0.dtsi new file mode 100644 index 00000000000000..efb7e987e3f7b7 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-die0.dtsi @@ -0,0 +1,258 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Devices on the Apple T6050 "M5 Max" SoC (single die) + * + * Register windows from the J714c Apple Device Tree. + * The six pmgr register blocks are declared here; their power domains + * live in t6050-pmgr.dtsi. + * + * Copyright The Asahi Linux Contributors + */ + +&soc { + // J714c also has a dockchannel UART (aapl,dock-channels, + // 0x88e28000/0x10004 + 0x88e0c000/0x18, AIC IRQ 360). The in-tree + // apple,dockchannel-uart driver expects three named windows + // (data/config/irq) and its observability from this laptop without + // a debug cable is unverified, so it is left out of the first boot. + // Add it with the window layout resolved when it is needed. + + cpufreq_m0: cpufreq@210e20000 { + compatible = "apple,t6050-cluster-cpufreq"; + reg = <0x2 0x10e20000 0x0 0x1000>; + #performance-domain-cells = <0>; + }; + + cpufreq_m1: cpufreq@211e20000 { + compatible = "apple,t6050-cluster-cpufreq"; + reg = <0x2 0x11e20000 0x0 0x1000>; + #performance-domain-cells = <0>; + }; + + cpufreq_p0: cpufreq@212e20000 { + compatible = "apple,t6050-cluster-cpufreq"; + reg = <0x2 0x12e20000 0x0 0x1000>; + #performance-domain-cells = <0>; + }; + + aic: interrupt-controller@280400000 { + compatible = "apple,t6050-aic3", "apple,t8142-aic3", "apple,t8122-aic3"; + reg = <0x2 0x80400000 0x0 0x1cc000>, + <0x2 0x80440000 0x0 0x4000>; + reg-names = "core", "event"; + #interrupt-cells = <3>; + interrupt-controller; + }; + + pmgr: pmgr0: power-management@280600000 { + compatible = "apple,t6050-pmgr", "apple,t8103-pmgr", "syscon", "simple-mfd"; + reg = <0x2 0x80600000 0 0x4000>; + #address-cells = <1>; + #size-cells = <1>; + }; + + pmgr1: power-management@280900000 { + compatible = "apple,t6050-pmgr", "apple,t8103-pmgr", "syscon", "simple-mfd"; + reg = <0x2 0x80900000 0 0x4000>; + #address-cells = <1>; + #size-cells = <1>; + }; + + pmgr2: power-management@288300000 { + compatible = "apple,t6050-pmgr", "apple,t8103-pmgr", "syscon", "simple-mfd"; + reg = <0x2 0x88300000 0 0xc000>; + #address-cells = <1>; + #size-cells = <1>; + }; + + wdt: watchdog@28836c000 { + compatible = "apple,t6050-wdt", "apple,t8103-wdt"; + reg = <0x2 0x8836c000 0x0 0x4000>; + clocks = <&clkref>; + interrupt-parent = <&aic>; + interrupts = ; + }; + + // MTP coprocessor and dockchannel HID (keyboard, trackpad), on the + // t8142 J813 layout. Addresses from the J714c ADT: mtp 0x294600000, + // dart-mtp 0x294800000 (0xc000), dockchannel-mtp 0x294b14000 (irq) and + // 0x294b28000.. (data windows). The ADT lists no power or clock gates. + mtp: mtp@294600000 { + compatible = "apple,t6050-mtp", "apple,t8142-rtk-helper-asc4", + "apple,mtp", "apple,rtk-helper-asc4"; + /* The second region is firmware SRAM, not the ASC control window. */ + reg = <0x2 0x94600000 0x0 0x4000>, <0x2 0x94c00000 0x0 0x100000>; + reg-names = "asc", "sram"; + iommus = <&mtp_dart 0>; + mboxes = <&mtp_mbox>; + + status = "disabled"; + }; + + mtp_mbox: mailbox@294608000 { + compatible = "apple,t6050-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x2 0x94608000 0x0 0x4000>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + + status = "disabled"; + }; + + mtp_dart: iommu@294800000 { + compatible = "apple,t6050-dart", "apple,t8142-dart", "apple,t8110-dart"; + reg = <0x2 0x94800000 0x0 0xc000>; + interrupts = ; + #iommu-cells = <1>; + /* Keep host allocations clear of firmware's low IOVA mappings. */ + apple,dma-range = <0 0x02000000 0 0x10000000>; + + status = "disabled"; + }; + + mtp_dockchannel: fifo@294b14000 { + compatible = "apple,t6050-dockchannel", "apple,dockchannel"; + reg = <0x2 0x94b14000 0x0 0x1000>; + reg-names = "irq"; + ranges = <0 0x2 0x94b28000 0x20000>; + #address-cells = <1>; + #interrupt-cells = <2>; + interrupt-controller; + interrupts = ; + nonposted-mmio; + #size-cells = <1>; + + status = "disabled"; + + mtp_hid: input@8000 { + compatible = "apple,dockchannel-hid"; + reg = <0x8000 0x1000>, <0xc000 0x1000>, + <0x0000 0x1000>, <0x4000 0x1000>; + reg-names = "config", "data", "rmt-config", "rmt-data"; + interrupt-parent = <&mtp_dockchannel>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>, <3 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "tx", "rx"; + iommus = <&mtp_dart 0>; + apple,fifo-size = <0x800>; + apple,helper-cpu = <&mtp>; + }; + }; + + // AP GPIO block. ADT /arm-io/gpio0: 0x9c000000 + 0x44000, 221 pins, + // seven AIC interrupts, no-restore-gpio-pins 5 6 7 112 141. The t8140 + // driver variant: slots in the block fault when read, so the regmap is + // not cache-initialised and stays inside the valid pins minus the + // reserved ranges (the firmware's no-restore pins, as t8140.dtsi). + // Enabled by the board DT together with its first users, the audio + // codec reset, shutdown and interrupt lines. + pinctrl_ap: pinctrl@29c000000 { + compatible = "apple,t6050-pinctrl", "apple,t8140-pinctrl"; + reg = <0x2 0x9c000000 0x0 0x44000>; + #gpio-cells = <2>; + gpio-controller; + gpio-ranges = <&pinctrl_ap 0 0 221>; + gpio-reserved-ranges = <5 3>, <112 1>, <141 1>; + #interrupt-cells = <2>; + interrupt-controller; + interrupt-parent = <&aic>; + interrupts = , + , + , + , + , + , + ; + power-domains = <&ps_gpio>; + apple,npins = <221>; + + status = "disabled"; + }; + + // I2C controllers. ADT /arm-io/i2c1..3: 0x305014000, 0x305018000, + // 0x30501c000 (+ 0x4000 each), AIC interrupts 1376-1378, pmgr I2C1-3. + // SCL/SDA are AP pins 60/61, 62/63 and 64/65; iBoot leaves them muxed + // (it drives the speaker amps for the boot chime), so no pin groups are + // set here. i2c1 and i2c3 carry the speaker amps, i2c2 the jack codec. + i2c1: i2c@505014000 { + compatible = "apple,t6050-i2c", "apple,t8103-i2c"; + reg = <0x5 0x05014000 0x0 0x4000>; + #address-cells = <1>; + clocks = <&clkref>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_i2c1>; + #size-cells = <0>; + + status = "disabled"; + }; + + i2c2: i2c@505018000 { + compatible = "apple,t6050-i2c", "apple,t8103-i2c"; + reg = <0x5 0x05018000 0x0 0x4000>; + #address-cells = <1>; + clocks = <&clkref>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_i2c2>; + #size-cells = <0>; + + status = "disabled"; + }; + + i2c3: i2c@50501c000 { + compatible = "apple,t6050-i2c", "apple,t8103-i2c"; + reg = <0x5 0x0501c000 0x0 0x4000>; + #address-cells = <1>; + clocks = <&clkref>; + interrupt-parent = <&aic>; + interrupts = ; + power-domains = <&ps_i2c3>; + #size-cells = <0>; + + status = "disabled"; + }; + + fpwm0: pwm@505040000 { + compatible = "apple,t6050-fpwm", "apple,s5l-fpwm"; + reg = <0x5 0x05040000 0x0 0x4000>; + clocks = <&clkref>; + power-domains = <&ps_fpwm0>; + #pwm-cells = <2>; + + status = "disabled"; + }; + + serial0: serial@505200000 { + compatible = "apple,s5l-uart"; + reg = <0x5 0x05200000 0x0 0x4000>; + clocks = <&clkref>, <&clkref>; + clock-names = "uart", "clk_uart_baud0"; + interrupt-parent = <&aic>; + interrupts = ; + reg-io-width = <4>; + }; + + pmgr3: power-management@2300e80000 { + compatible = "apple,t6050-pmgr", "apple,t8103-pmgr", "syscon", "simple-mfd"; + reg = <0x23 0xe80000 0 0x4000>; + #address-cells = <1>; + #size-cells = <1>; + }; + + pmgr4: power-management@2380600000 { + compatible = "apple,t6050-pmgr", "apple,t8103-pmgr", "syscon", "simple-mfd"; + reg = <0x23 0x80600000 0 0xc000>; + #address-cells = <1>; + #size-cells = <1>; + }; + + pmgr5: power-management@2388300000 { + compatible = "apple,t6050-pmgr", "apple,t8103-pmgr", "syscon", "simple-mfd"; + reg = <0x23 0x88300000 0 0x4000>; + #address-cells = <1>; + #size-cells = <1>; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-j714c.dts b/arch/arm64/boot/dts/apple/t6050-j714c.dts new file mode 100644 index 00000000000000..7f57833557d301 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-j714c.dts @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple MacBook Pro (14-inch, M5 Max, 18 CPU cores) + * + * target-type: J714c + * + * The loader supplies usable memory, CPU release addresses and + * framebuffer geometry. Peripheral power domains come from + * t6050-pmgr.dtsi; the framebuffer holds the display domain. + * + * Copyright The Asahi Linux Contributors + */ + +/dts-v1/; + +#include +#include +#include +#include + +#include "t6050.dtsi" +#include "t6050-smc.dtsi" + +/ { + compatible = "apple,j714c", "apple,t6050", "apple,arm-platform"; + #address-cells = <2>; + interrupt-parent = <&aic>; + model = "Apple MacBook Pro (14-inch, M5 Max, 18 CPU cores)"; + #size-cells = <2>; + + aliases { + keyboard = &keyboard; + serial0 = &serial0; + }; + + chosen { + ranges; + #address-cells = <2>; + #size-cells = <2>; + stdout-path = "serial0:1500000n8"; + + framebuffer0: framebuffer@0 { + compatible = "apple,simple-framebuffer", "simple-framebuffer"; + reg = <0 0 0 0>; /* Filled by the loader. */ + power-domains = <&ps_disp_cpu>; + apple,internal-panel; /* simpledrm reports it as eDP */ + + status = "okay"; /* m1n1 only enables it on chips it knows. */ + }; + }; + + memory@10000000000 { + reg = <0x100 0 0 0>; /* Filled by the loader. */ + device_type = "memory"; + }; + + led-controller { + compatible = "pwm-leds"; + + led-0 { + color = ; + default-state = "keep"; + function = LED_FUNCTION_KBD_BACKLIGHT; + label = "kbd_backlight"; + max-brightness = <255>; + pwms = <&fpwm0 0 40000>; + }; + }; +}; + +&fpwm0 { + status = "okay"; +}; + +&mtp { + status = "okay"; +}; + +&mtp_mbox { + status = "okay"; +}; + +&mtp_dart { + status = "okay"; +}; + +&mtp_dockchannel { + status = "okay"; +}; + +&mtp_hid { + /* + * ADT multi-touch function-afe-reset = smc-pmu pKW8('pcIO', 0x10000, + * 0x11c0000), SMC pcIO output 28; level 1 asserts the reset. Left to + * the MTP firmware, the AFE sometimes never answers ("No HINT_L"). + */ + apple,afe-reset-gpios = <&smc_gpio 28 GPIO_ACTIVE_HIGH>; + + actuator { + }; + + keyboard: keyboard { + hid-country-code = <0>; + apple,keyboard-layout-id = <0>; + }; + + mtp_mt: multi-touch { + firmware-name = "apple/tpmtfw-j714c.bin"; + apple,power-method = <2>; + }; + + stm { + }; + + tp_accel { + }; +}; + +#include "hwmon-common.dtsi" +#include "hwmon-fan-dual.dtsi" +#include "hwmon-laptop.dtsi" + +/* + * The T6050 SMC spells the fan mode keys F0md/F1md; F0Md/F1Md from + * hwmon-fan*.dtsi do not exist. + */ +&smc_hwmon { + fan-F0Ac { + apple,fan-mode = "F0md"; + }; + + fan-F1Ac { + apple,fan-mode = "F1md"; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-j716s.dts b/arch/arm64/boot/dts/apple/t6050-j716s.dts new file mode 100644 index 00000000000000..761218d9d3bac2 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-j716s.dts @@ -0,0 +1,140 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple MacBook Pro (16-inch, M5 Pro, 2026) + * + * target-type: J716s (Mac17,8) + * + * The M5 Pro here is a T6050 with all 18 CPU cores, laid out as on the + * J714c. The loader supplies usable memory, CPU release addresses, + * framebuffer geometry and the keyboard layout. Peripheral power domains + * come from t6050-pmgr.dtsi; the framebuffer holds the display domain. + * + * Copyright The Asahi Linux Contributors + */ + +/dts-v1/; + +#include +#include +#include +#include + +#include "t6050.dtsi" +#include "t6050-smc.dtsi" + +/ { + compatible = "apple,j716s", "apple,t6050", "apple,arm-platform"; + #address-cells = <2>; + chassis-type = "laptop"; + interrupt-parent = <&aic>; + model = "Apple MacBook Pro (16-inch, M5 Pro, 2026)"; + #size-cells = <2>; + + aliases { + keyboard = &keyboard; + serial0 = &serial0; + }; + + chosen { + ranges; + #address-cells = <2>; + #size-cells = <2>; + stdout-path = "serial0:1500000n8"; + + framebuffer@0 { + compatible = "apple,simple-framebuffer", + "simple-framebuffer"; + reg = <0 0 0 0>; /* Filled by the loader. */ + power-domains = <&ps_disp_cpu>; + apple,internal-panel; /* simpledrm reports it as eDP */ + + /* m1n1 only enables it on chips it knows. */ + status = "okay"; + }; + }; + + memory@10000000000 { + reg = <0x100 0 0 0>; /* Filled by the loader. */ + device_type = "memory"; + }; + + /* ADT pwm0/kbd-backlight: channel 0 at 25 kHz */ + led-controller { + compatible = "pwm-leds"; + + led-0 { + color = ; + default-state = "keep"; + function = LED_FUNCTION_KBD_BACKLIGHT; + label = "kbd_backlight"; + max-brightness = <255>; + pwms = <&fpwm0 0 40000>; + }; + }; +}; + +&fpwm0 { + status = "okay"; +}; + +&mtp { + status = "okay"; +}; + +&mtp_mbox { + status = "okay"; +}; + +&mtp_dart { + status = "okay"; +}; + +&mtp_dockchannel { + status = "okay"; +}; + +&mtp_hid { + /* + * ADT multi-touch function-afe-reset = smc-pmu pKW8('pcIO', 0x10000, + * 0x11c0000), SMC pcIO output 28 as on the J714c; level 1 asserts the + * reset. + */ + apple,afe-reset-gpios = <&smc_gpio 28 GPIO_ACTIVE_HIGH>; + + actuator { + }; + + keyboard: keyboard { + hid-country-code = <0>; + apple,keyboard-layout-id = <0>; + }; + + multi-touch { + firmware-name = "apple/tpmtfw-j716s.bin"; + apple,power-method = <2>; + }; + + stm { + }; + + tp_accel { + }; +}; + +#include "hwmon-common.dtsi" +#include "hwmon-fan-dual.dtsi" +#include "hwmon-laptop.dtsi" + +/* + * The T6050 SMC spells the fan mode keys F0md/F1md; F0Md/F1Md from + * hwmon-fan*.dtsi do not exist. + */ +&smc_hwmon { + fan-F0Ac { + apple,fan-mode = "F0md"; + }; + + fan-F1Ac { + apple,fan-mode = "F1md"; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-nvme.dtsi b/arch/arm64/boot/dts/apple/t6050-nvme.dtsi new file mode 100644 index 00000000000000..199f5fccb3f294 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-nvme.dtsi @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * NVMe related devices for the Apple T6050 "M5 Max" SoC + * + * Register windows from the J714c ADT (/arm-io/ans and /arm-io/sart-ans); + * node layout and the M4-generation driver variant follow t8140.dtsi. + * + * Copyright The Asahi Linux Contributors + */ + +&soc { + ans_mbox: mailbox@419608000 { + compatible = "apple,t6050-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x4 0x19608000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + power-domains = <&ps_ans>; + }; + + sart: iommu@41dc50000 { + compatible = "apple,t6050-sart"; /* SARTv4, its own register layout */ + reg = <0x4 0x1dc50000 0x0 0xc000>; + power-domains = <&ps_ans>; + }; + + nvme: nvme@45dcc0000 { + compatible = "apple,t6050-nvme-ans2", "apple,t8140-nvme-ans2"; + // The ADT sizes the controller window at 0x10000; the linear + // submission queue registers sit above that, as on T8140. + reg = <0x4 0x5dcc0000 0x0 0x30000>, + <0x4 0x19600000 0x0 0x4000>, + <0x4 0x1dcc0000 0x0 0x60010>; + reg-names = "nvme", "ans", "nvmmu"; + interrupt-parent = <&aic>; + interrupts = ; + mboxes = <&ans_mbox>; + // The port-0 lane PHY must stay on for the controller: with it + // powered down as unused, enable never reaches CSTS.RDY. + power-domains = <&ps_ans>, <&ps_apcie_sys_st0>, + <&ps_apcie_phy_sw>, <&ps_aphy_st0_aus5>; + power-domain-names = "ans", "apcie0", "apcie_phy", "aphy_st0"; + resets = <&ps_ans>; + apple,sart = <&sart>; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-pmgr.dtsi b/arch/arm64/boot/dts/apple/t6050-pmgr.dtsi new file mode 100644 index 00000000000000..a692ab1e256646 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-pmgr.dtsi @@ -0,0 +1,2722 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * PMGR Power domains for Apple T6050 "M5 Max" SoC + * + * Generated from the J714c ADT with pmgr_adt2dt.py, then edited by hand. + * Regenerating loses the following: + * - the CPU core and cluster domains are left out, as in every other + * pmgr file; + * - parent references to register-less (no_ps) ADT domains point at the + * nearest real ancestor or are dropped; + * - apple,always-on is removed from the 25 domains the boot firmware + * leaves off (b2b fabric, nub SPMI, afr) and added to the core set + * aic, disp_sys, disp_fe, uart_p, spi_p, ans as in t8132-pmgr.dtsi; + * - apple,firmware-owned marks disp_cpu, dispext0-3_cpu (writing them + * raises an SError) and smc_i2cm0-5 (enabling auto-PM on one or more + * of them resets the machine a few seconds into the boot). + * + * Copyright The Asahi Linux Contributors + */ + +&pmgr0 { + ps_aic: power-controller@108 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x108 4>; + label = "aic"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_pmc: power-controller@110 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x110 4>; + label = "pmc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_pms_c1ppt: power-controller@118 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x118 4>; + label = "pms_c1ppt"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_soc_dpe: power-controller@120 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x120 4>; + label = "soc_dpe"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_pmp: power-controller@128 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x128 4>; + label = "pmp"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_pms_sram: power-controller@130 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x130 4>; + label = "pms_sram"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_pmgr_soc_ocla: power-controller@138 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x138 4>; + label = "pmgr_soc_ocla"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2b_ctrl_nogate: power-controller@140 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x140 4>; + label = "b2b_ctrl_nogate"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab0_acc_0: power-controller@148 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x148 4>; + label = "fab0_acc_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab0_acc_1: power-controller@150 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x150 4>; + label = "fab0_acc_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab2_acc: power-controller@158 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x158 4>; + label = "fab2_acc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab1_acc: power-controller@160 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x160 4>; + label = "fab1_acc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_b2bc_afc_0: power-controller@168 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x168 4>; + label = "b2bc_afc_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_b2bc_afc_0_dfx: power-controller@170 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x170 4>; + label = "b2bc_afc_0_dfx"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bc_afc_0>; + #reset-cells = <0>; + }; + + ps_b2bc_afc_1: power-controller@178 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x178 4>; + label = "b2bc_afc_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_b2bc_afc_1_dfx: power-controller@180 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x180 4>; + label = "b2bc_afc_1_dfx"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bc_afc_1>; + #reset-cells = <0>; + }; + + ps_fab4_soc: power-controller@1e8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1e8 4>; + label = "fab4_soc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab5_soc: power-controller@1f0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1f0 4>; + label = "fab5_soc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_dispext0_sys: power-controller@200 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x200 4>; + label = "dispext0_sys"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc0_common: power-controller@208 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x208 4>; + label = "atc0_common"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc1_common: power-controller@210 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x210 4>; + label = "atc1_common"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_dispext2_sys: power-controller@220 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x220 4>; + label = "dispext2_sys"; + #power-domain-cells = <0>; + power-domains = <&ps_fab4_soc>; + #reset-cells = <0>; + }; + + ps_dispext3_sys: power-controller@228 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x228 4>; + label = "dispext3_sys"; + #power-domain-cells = <0>; + power-domains = <&ps_fab4_soc>; + #reset-cells = <0>; + }; + + ps_dispext1_sys: power-controller@230 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x230 4>; + label = "dispext1_sys"; + #power-domain-cells = <0>; + power-domains = <&ps_fab5_soc>; + #reset-cells = <0>; + }; + + ps_atc2_common: power-controller@238 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x238 4>; + label = "atc2_common"; + #power-domain-cells = <0>; + power-domains = <&ps_fab5_soc>; + #reset-cells = <0>; + }; + + ps_atc3_common: power-controller@240 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x240 4>; + label = "atc3_common"; + #power-domain-cells = <0>; + power-domains = <&ps_fab5_soc>; + #reset-cells = <0>; + apple,firmware-owned; + }; + + ps_auss: power-controller@248 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x248 4>; + label = "auss"; + #power-domain-cells = <0>; + power-domains = <&ps_fab5_soc>; + #reset-cells = <0>; + }; + + ps_gpio: power-controller@250 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x250 4>; + label = "gpio"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_msg: power-controller@258 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x258 4>; + label = "msg"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_ap_tmm: power-controller@260 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x260 4>; + label = "ap_tmm"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_dispext0_fe: power-controller@268 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x268 4>; + label = "dispext0_fe"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext0_sys>; + #reset-cells = <0>; + }; + + ps_dispext0_adma: power-controller@270 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x270 4>; + label = "dispext0_adma"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext0_sys>; + #reset-cells = <0>; + }; + + ps_dispext0_cpu: power-controller@278 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x278 4>; + label = "dispext0_cpu"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext0_fe>; + #reset-cells = <0>; + /* The display coprocessor owns this state; writing it faults (SError). */ + apple,firmware-owned; + }; + +/* + * atc0-3_cio and atc3_common are left to the firmware for now: the kernel's + * boot-time power-on of these domains (J714c) breaks the USB 2.0 + * host on the parked Type-C PHY (the xHCI reset never completes). USB4 needs + * them driven in sequence with the PHY, by the PHY driver, later. + */ + ps_atc0_cio: power-controller@280 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x280 4>; + label = "atc0_cio"; + #power-domain-cells = <0>; + power-domains = <&ps_atc0_common>; + #reset-cells = <0>; + apple,firmware-owned; + }; + + ps_atc0_pcie: power-controller@288 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x288 4>; + label = "atc0_pcie"; + #power-domain-cells = <0>; + power-domains = <&ps_atc0_common>; + #reset-cells = <0>; + }; + + ps_atc1_cio: power-controller@290 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x290 4>; + label = "atc1_cio"; + #power-domain-cells = <0>; + power-domains = <&ps_atc1_common>; + #reset-cells = <0>; + apple,firmware-owned; + }; + + ps_atc1_pcie: power-controller@298 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x298 4>; + label = "atc1_pcie"; + #power-domain-cells = <0>; + power-domains = <&ps_atc1_common>; + #reset-cells = <0>; + }; + + ps_dispext2_fe: power-controller@2a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2a0 4>; + label = "dispext2_fe"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext2_sys>; + #reset-cells = <0>; + }; + + ps_dispext2_adma: power-controller@2a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2a8 4>; + label = "dispext2_adma"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext2_sys>; + #reset-cells = <0>; + }; + + ps_dispext2_cpu: power-controller@2b0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2b0 4>; + label = "dispext2_cpu"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext2_fe>; + #reset-cells = <0>; + /* The display coprocessor owns this state; writing it faults (SError). */ + apple,firmware-owned; + }; + + ps_dispext3_fe: power-controller@2b8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2b8 4>; + label = "dispext3_fe"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext3_sys>; + #reset-cells = <0>; + }; + + ps_dispext3_adma: power-controller@2c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2c0 4>; + label = "dispext3_adma"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext3_sys>; + #reset-cells = <0>; + }; + + ps_dispext3_cpu: power-controller@2c8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2c8 4>; + label = "dispext3_cpu"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext3_fe>; + #reset-cells = <0>; + /* The display coprocessor owns this state; writing it faults (SError). */ + apple,firmware-owned; + }; + + ps_dispext1_fe: power-controller@2d0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2d0 4>; + label = "dispext1_fe"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext1_sys>; + #reset-cells = <0>; + }; + + ps_dispext1_adma: power-controller@2d8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2d8 4>; + label = "dispext1_adma"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext1_sys>; + #reset-cells = <0>; + }; + + ps_dispext1_cpu: power-controller@2e0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2e0 4>; + label = "dispext1_cpu"; + #power-domain-cells = <0>; + power-domains = <&ps_dispext1_fe>; + #reset-cells = <0>; + /* The display coprocessor owns this state; writing it faults (SError). */ + apple,firmware-owned; + }; + + ps_atc2_cio: power-controller@2e8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2e8 4>; + label = "atc2_cio"; + #power-domain-cells = <0>; + power-domains = <&ps_atc2_common>; + #reset-cells = <0>; + apple,firmware-owned; + }; + + ps_atc2_pcie: power-controller@2f0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2f0 4>; + label = "atc2_pcie"; + #power-domain-cells = <0>; + power-domains = <&ps_atc2_common>; + #reset-cells = <0>; + }; + + ps_atc3_cio: power-controller@2f8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2f8 4>; + label = "atc3_cio"; + #power-domain-cells = <0>; + power-domains = <&ps_atc3_common>; + #reset-cells = <0>; + apple,firmware-owned; + }; + + ps_atc3_pcie: power-controller@300 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x300 4>; + label = "atc3_pcie"; + #power-domain-cells = <0>; + power-domains = <&ps_atc3_common>; + #reset-cells = <0>; + }; + + ps_atc0_cio_pcie: power-controller@338 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x338 4>; + label = "atc0_cio_pcie"; + #power-domain-cells = <0>; + power-domains = <&ps_atc0_cio>; + #reset-cells = <0>; + }; + + ps_atc0_cio_usb: power-controller@340 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x340 4>; + label = "atc0_cio_usb"; + #power-domain-cells = <0>; + power-domains = <&ps_atc0_cio>; + #reset-cells = <0>; + }; + + ps_atc0_cio_auss: power-controller@348 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x348 4>; + label = "atc0_cio_auss"; + #power-domain-cells = <0>; + power-domains = <&ps_atc0_cio>, <&ps_auss>; + #reset-cells = <0>; + }; + + ps_atc1_cio_pcie: power-controller@350 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x350 4>; + label = "atc1_cio_pcie"; + #power-domain-cells = <0>; + power-domains = <&ps_atc1_cio>; + #reset-cells = <0>; + }; + + ps_atc1_cio_usb: power-controller@358 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x358 4>; + label = "atc1_cio_usb"; + #power-domain-cells = <0>; + power-domains = <&ps_atc1_cio>; + #reset-cells = <0>; + }; + + ps_atc1_cio_auss: power-controller@360 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x360 4>; + label = "atc1_cio_auss"; + #power-domain-cells = <0>; + power-domains = <&ps_atc1_cio>, <&ps_auss>; + #reset-cells = <0>; + }; + + ps_atc2_cio_pcie: power-controller@3f8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3f8 4>; + label = "atc2_cio_pcie"; + #power-domain-cells = <0>; + power-domains = <&ps_atc2_cio>; + #reset-cells = <0>; + }; + + ps_atc2_cio_usb: power-controller@400 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x400 4>; + label = "atc2_cio_usb"; + #power-domain-cells = <0>; + power-domains = <&ps_atc2_cio>; + #reset-cells = <0>; + }; + + ps_atc2_cio_auss: power-controller@408 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x408 4>; + label = "atc2_cio_auss"; + #power-domain-cells = <0>; + power-domains = <&ps_atc2_cio>, <&ps_auss>; + #reset-cells = <0>; + }; + + ps_atc3_cio_pcie: power-controller@410 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x410 4>; + label = "atc3_cio_pcie"; + #power-domain-cells = <0>; + power-domains = <&ps_atc3_cio>; + #reset-cells = <0>; + }; + + ps_atc3_cio_usb: power-controller@418 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x418 4>; + label = "atc3_cio_usb"; + #power-domain-cells = <0>; + power-domains = <&ps_atc3_cio>; + #reset-cells = <0>; + }; + + ps_atc3_cio_auss: power-controller@420 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x420 4>; + label = "atc3_cio_auss"; + #power-domain-cells = <0>; + power-domains = <&ps_atc3_cio>, <&ps_auss>; + #reset-cells = <0>; + }; + + ps_fppt: power-controller@450 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x450 4>; + label = "fppt"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bc_dft: power-controller@458 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x458 4>; + label = "b2bc_dft"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bc_cntl_dfx: power-controller@460 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x460 4>; + label = "b2bc_cntl_dfx"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bc_dbg_0: power-controller@468 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x468 4>; + label = "b2bc_dbg_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bc_dbg_1: power-controller@470 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x470 4>; + label = "b2bc_dbg_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bc_dbg_2: power-controller@478 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x478 4>; + label = "b2bc_dbg_2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; +}; + +&pmgr1 { + ps_ispsens0: power-controller@100 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x100 4>; + label = "ispsens0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_global_aux_hpd_0: power-controller@108 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x108 4>; + label = "global_aux_hpd_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_global_aux_hpd_1: power-controller@110 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x110 4>; + label = "global_aux_hpd_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_apcie_gp: power-controller@118 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x118 4>; + label = "apcie_gp"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_apcie_st0: power-controller@128 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x128 4>; + label = "apcie_st0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_apcie_st1: power-controller@130 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x130 4>; + label = "apcie_st1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_fab6_soc: power-controller@138 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x138 4>; + label = "fab6_soc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_ans: power-controller@140 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x140 4>; + label = "ans"; + #power-domain-cells = <0>; + power-domains = <&ps_fab6_soc>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_apcie_sys_gp: power-controller@148 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x148 4>; + label = "apcie_sys_gp"; + #power-domain-cells = <0>; + power-domains = <&ps_apcie_gp>, <&ps_fab6_soc>; + #reset-cells = <0>; + }; + + ps_apcie_sys_st0: power-controller@150 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x150 4>; + label = "apcie_sys_st0"; + #power-domain-cells = <0>; + power-domains = <&ps_apcie_st0>, <&ps_ans>; + #reset-cells = <0>; + }; + + ps_apcie_sys_st1: power-controller@158 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x158 4>; + label = "apcie_sys_st1"; + #power-domain-cells = <0>; + power-domains = <&ps_apcie_st1>, <&ps_ans>; + #reset-cells = <0>; + }; + + ps_apcie_sys_gp_oc: power-controller@160 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x160 4>; + label = "apcie_sys_gp_oc"; + #power-domain-cells = <0>; + power-domains = <&ps_apcie_sys_gp>; + #reset-cells = <0>; + }; + + ps_apcie_sys_st0_o: power-controller@168 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x168 4>; + label = "apcie_sys_st0_o"; + #power-domain-cells = <0>; + power-domains = <&ps_apcie_sys_st0>; + #reset-cells = <0>; + }; + + ps_apcie_sys_st1_o: power-controller@170 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x170 4>; + label = "apcie_sys_st1_o"; + #power-domain-cells = <0>; + power-domains = <&ps_apcie_sys_st1>; + #reset-cells = <0>; + }; + + ps_fab7_soc: power-controller@178 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x178 4>; + label = "fab7_soc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_disp_sys: power-controller@180 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x180 4>; + label = "disp_sys"; + #power-domain-cells = <0>; + power-domains = <&ps_fab7_soc>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_scodec: power-controller@190 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x190 4>; + label = "scodec"; + #power-domain-cells = <0>; + power-domains = <&ps_fab7_soc>; + #reset-cells = <0>; + }; + + ps_disp_fe: power-controller@198 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x198 4>; + label = "disp_fe"; + #power-domain-cells = <0>; + power-domains = <&ps_disp_sys>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_disp_adma: power-controller@1a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1a0 4>; + label = "disp_adma"; + #power-domain-cells = <0>; + power-domains = <&ps_disp_sys>; + #reset-cells = <0>; + }; + + ps_disp_cpu: power-controller@1a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1a8 4>; + label = "disp_cpu"; + #power-domain-cells = <0>; + power-domains = <&ps_disp_fe>; + #reset-cells = <0>; + /* The display coprocessor owns this state; writing it faults (SError). */ + apple,firmware-owned; + }; + + ps_apcie_phy_sw: power-controller@1b0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1b0 4>; + label = "apcie_phy_sw"; + #power-domain-cells = <0>; + power-domains = <&ps_apcie_sys_gp>, <&ps_fab6_soc>; + #reset-cells = <0>; + }; + + ps_scodec_streaming: power-controller@1c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1c0 4>; + label = "scodec_streaming"; + #power-domain-cells = <0>; + power-domains = <&ps_scodec>; + #reset-cells = <0>; + }; + + ps_aphy_st0_aus5_a: power-controller@240 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x240 4>; + label = "aphy_st0_aus5_a"; + #power-domain-cells = <0>; + power-domains = <&ps_apcie_phy_sw>; + #reset-cells = <0>; + }; + + ps_aphy_st1_aus5_a: power-controller@248 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x248 4>; + label = "aphy_st1_aus5_a"; + #power-domain-cells = <0>; + power-domains = <&ps_apcie_phy_sw>; + #reset-cells = <0>; + }; + + ps_aphy_gp_aus5_a: power-controller@258 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x258 4>; + label = "aphy_gp_aus5_a"; + #power-domain-cells = <0>; + power-domains = <&ps_apcie_phy_sw>; + #reset-cells = <0>; + }; + + ps_aphy_st0_aus5: power-controller@268 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x268 4>; + label = "aphy_st0_aus5"; + #power-domain-cells = <0>; + power-domains = <&ps_aphy_st0_aus5_a>; + #reset-cells = <0>; + }; + + ps_aphy_st1_aus5: power-controller@270 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x270 4>; + label = "aphy_st1_aus5"; + #power-domain-cells = <0>; + power-domains = <&ps_aphy_st1_aus5_a>; + #reset-cells = <0>; + }; + + ps_aphy_gp_aus5: power-controller@280 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x280 4>; + label = "aphy_gp_aus5"; + #power-domain-cells = <0>; + power-domains = <&ps_aphy_gp_aus5_a>; + #reset-cells = <0>; + }; + + ps_fab8_soc: power-controller@288 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x288 4>; + label = "fab8_soc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_sio: power-controller@290 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x290 4>; + label = "sio"; + #power-domain-cells = <0>; + power-domains = <&ps_fab8_soc>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_sep: power-controller@298 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x298 4>; + label = "sep"; + #power-domain-cells = <0>; + power-domains = <&ps_fab8_soc>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_sio_cpu: power-controller@2a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2a0 4>; + label = "sio_cpu"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fpwm0: power-controller@2a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2a8 4>; + label = "fpwm0"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_fpwm2: power-controller@2b8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2b8 4>; + label = "fpwm2"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_i2c0: power-controller@2c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2c0 4>; + label = "i2c0"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_i2c1: power-controller@2c8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2c8 4>; + label = "i2c1"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_i2c2: power-controller@2d0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2d0 4>; + label = "i2c2"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_i2c3: power-controller@2d8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2d8 4>; + label = "i2c3"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_i2c4: power-controller@2e0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2e0 4>; + label = "i2c4"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_i2c5: power-controller@2e8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2e8 4>; + label = "i2c5"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_i2c6: power-controller@2f0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2f0 4>; + label = "i2c6"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_i2c7: power-controller@2f8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2f8 4>; + label = "i2c7"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_i2c8: power-controller@300 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x300 4>; + label = "i2c8"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_spi_p: power-controller@308 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x308 4>; + label = "spi_p"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_uart_p: power-controller@310 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x310 4>; + label = "uart_p"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_aes: power-controller@318 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x318 4>; + label = "aes"; + #power-domain-cells = <0>; + power-domains = <&ps_sio>; + #reset-cells = <0>; + }; + + ps_spi0: power-controller@320 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x320 4>; + label = "spi0"; + #power-domain-cells = <0>; + power-domains = <&ps_spi_p>; + #reset-cells = <0>; + }; + + ps_spi1: power-controller@328 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x328 4>; + label = "spi1"; + #power-domain-cells = <0>; + power-domains = <&ps_spi_p>; + #reset-cells = <0>; + }; + + ps_spi2: power-controller@330 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x330 4>; + label = "spi2"; + #power-domain-cells = <0>; + power-domains = <&ps_spi_p>; + #reset-cells = <0>; + }; + + ps_spi3: power-controller@338 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x338 4>; + label = "spi3"; + #power-domain-cells = <0>; + power-domains = <&ps_spi_p>; + #reset-cells = <0>; + }; + + ps_spi4: power-controller@340 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x340 4>; + label = "spi4"; + #power-domain-cells = <0>; + power-domains = <&ps_spi_p>; + #reset-cells = <0>; + }; + + ps_spi5: power-controller@348 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x348 4>; + label = "spi5"; + #power-domain-cells = <0>; + power-domains = <&ps_spi_p>; + #reset-cells = <0>; + }; + + ps_qspi: power-controller@350 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x350 4>; + label = "qspi"; + #power-domain-cells = <0>; + power-domains = <&ps_spi_p>; + #reset-cells = <0>; + }; + + ps_uart_n: power-controller@358 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x358 4>; + label = "uart_n"; + #power-domain-cells = <0>; + power-domains = <&ps_uart_p>; + #reset-cells = <0>; + }; + + ps_uart0: power-controller@360 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x360 4>; + label = "uart0"; + #power-domain-cells = <0>; + power-domains = <&ps_uart_p>; + #reset-cells = <0>; + }; + + ps_uart1: power-controller@368 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x368 4>; + label = "uart1"; + #power-domain-cells = <0>; + power-domains = <&ps_uart_p>; + #reset-cells = <0>; + }; + + ps_uart2: power-controller@370 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x370 4>; + label = "uart2"; + #power-domain-cells = <0>; + power-domains = <&ps_uart_p>; + #reset-cells = <0>; + }; + + ps_uart3: power-controller@378 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x378 4>; + label = "uart3"; + #power-domain-cells = <0>; + power-domains = <&ps_uart_p>; + #reset-cells = <0>; + }; + + ps_uart4: power-controller@380 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x380 4>; + label = "uart4"; + #power-domain-cells = <0>; + power-domains = <&ps_uart_p>; + #reset-cells = <0>; + }; + + ps_uart5: power-controller@388 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x388 4>; + label = "uart5"; + #power-domain-cells = <0>; + power-domains = <&ps_uart_p>; + #reset-cells = <0>; + }; + + ps_uart6: power-controller@390 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x390 4>; + label = "uart6"; + #power-domain-cells = <0>; + power-domains = <&ps_uart_p>; + #reset-cells = <0>; + }; + + ps_fab9_soc: power-controller@398 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x398 4>; + label = "fab9_soc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_isp_sys: power-controller@3a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3a0 4>; + label = "isp_sys"; + #power-domain-cells = <0>; + power-domains = <&ps_fab9_soc>; + #reset-cells = <0>; + }; + + ps_ane_sys: power-controller@3a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3a8 4>; + label = "ane_sys"; + #power-domain-cells = <0>; + power-domains = <&ps_fab8_soc>, <&ps_fab9_soc>; + #reset-cells = <0>; + }; + + ps_ane_mpm: power-controller@3c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3c0 4>; + label = "ane_mpm"; + #power-domain-cells = <0>; + power-domains = <&ps_ane_sys>; + #reset-cells = <0>; + }; + + ps_ane_cpu: power-controller@3c8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3c8 4>; + label = "ane_cpu"; + #power-domain-cells = <0>; + power-domains = <&ps_ane_sys>; + #reset-cells = <0>; + }; + + ps_ane_tdbase: power-controller@3d0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3d0 4>; + label = "ane_tdbase"; + #power-domain-cells = <0>; + power-domains = <&ps_ane_sys>; + #reset-cells = <0>; + }; +}; + +&pmgr2 { + ps_debug_gated: power-controller@58 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x58 4>; + label = "debug_gated"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_nub_spmi_a0: power-controller@60 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x60 4>; + label = "nub_spmi_a0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_nub_spmi_a1: power-controller@68 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x68 4>; + label = "nub_spmi_a1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_nub_spmi_a2: power-controller@70 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x70 4>; + label = "nub_spmi_a2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_nub_dock_channel: power-controller@80 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x80 4>; + label = "nub_dock_channel"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_nub_gpio: power-controller@88 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x88 4>; + label = "nub_gpio"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_atc0_common_dp_0: power-controller@98 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x98 4>; + label = "atc0_common_dp_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc0_common_dp_1: power-controller@a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xa0 4>; + label = "atc0_common_dp_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc0_common_dp_2: power-controller@a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xa8 4>; + label = "atc0_common_dp_2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc0_common_dp_3: power-controller@b0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xb0 4>; + label = "atc0_common_dp_3"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc1_common_dp_0: power-controller@b8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xb8 4>; + label = "atc1_common_dp_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc1_common_dp_1: power-controller@c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xc0 4>; + label = "atc1_common_dp_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc1_common_dp_2: power-controller@c8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xc8 4>; + label = "atc1_common_dp_2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc1_common_dp_3: power-controller@d0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xd0 4>; + label = "atc1_common_dp_3"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc2_common_dp_0: power-controller@d8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xd8 4>; + label = "atc2_common_dp_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc2_common_dp_1: power-controller@e0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xe0 4>; + label = "atc2_common_dp_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc2_common_dp_2: power-controller@e8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xe8 4>; + label = "atc2_common_dp_2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc2_common_dp_3: power-controller@f0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xf0 4>; + label = "atc2_common_dp_3"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc3_common_dp_0: power-controller@f8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0xf8 4>; + label = "atc3_common_dp_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc3_common_dp_1: power-controller@100 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x100 4>; + label = "atc3_common_dp_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc3_common_dp_2: power-controller@108 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x108 4>; + label = "atc3_common_dp_2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc3_common_dp_3: power-controller@110 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x110 4>; + label = "atc3_common_dp_3"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_nub_spmi_ahb: power-controller@118 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x118 4>; + label = "nub_spmi_ahb"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_nub_spmi0: power-controller@120 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x120 4>; + label = "nub_spmi0"; + #power-domain-cells = <0>; + power-domains = <&ps_nub_spmi_ahb>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_nub_spmi1: power-controller@128 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x128 4>; + label = "nub_spmi1"; + #power-domain-cells = <0>; + power-domains = <&ps_nub_spmi_ahb>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_nub_spmi2: power-controller@130 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x130 4>; + label = "nub_spmi2"; + #power-domain-cells = <0>; + power-domains = <&ps_nub_spmi_ahb>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_nub_spmi3: power-controller@138 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x138 4>; + label = "nub_spmi3"; + #power-domain-cells = <0>; + power-domains = <&ps_nub_spmi_ahb>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_nub_spmi4: power-controller@140 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x140 4>; + label = "nub_spmi4"; + #power-domain-cells = <0>; + power-domains = <&ps_nub_spmi_ahb>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_atc0_usb_aon: power-controller@148 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x148 4>; + label = "atc0_usb_aon"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc0_usb: power-controller@150 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x150 4>; + label = "atc0_usb"; + #power-domain-cells = <0>; + power-domains = <&ps_atc0_common>, <&ps_atc0_usb_aon>; + #reset-cells = <0>; + }; + + ps_atc0_phymxwrap: power-controller@158 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x158 4>; + label = "atc0_phymxwrap"; + #power-domain-cells = <0>; + power-domains = <&ps_atc0_common>, <&ps_atc0_usb_aon>; + #reset-cells = <0>; + }; + + ps_atc1_usb_aon: power-controller@160 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x160 4>; + label = "atc1_usb_aon"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc1_usb: power-controller@168 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x168 4>; + label = "atc1_usb"; + #power-domain-cells = <0>; + power-domains = <&ps_atc1_common>, <&ps_atc1_usb_aon>; + #reset-cells = <0>; + }; + + ps_atc1_phymxwrap: power-controller@170 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x170 4>; + label = "atc1_phymxwrap"; + #power-domain-cells = <0>; + power-domains = <&ps_atc1_common>, <&ps_atc1_usb_aon>; + #reset-cells = <0>; + }; + + ps_atc2_usb_aon: power-controller@178 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x178 4>; + label = "atc2_usb_aon"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc2_usb: power-controller@180 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x180 4>; + label = "atc2_usb"; + #power-domain-cells = <0>; + power-domains = <&ps_atc2_common>, <&ps_atc2_usb_aon>; + #reset-cells = <0>; + }; + + ps_atc2_phymxwrap: power-controller@188 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x188 4>; + label = "atc2_phymxwrap"; + #power-domain-cells = <0>; + power-domains = <&ps_atc2_common>, <&ps_atc2_usb_aon>; + #reset-cells = <0>; + }; + + ps_atc3_usb_aon: power-controller@190 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x190 4>; + label = "atc3_usb_aon"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_atc3_usb: power-controller@198 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x198 4>; + label = "atc3_usb"; + #power-domain-cells = <0>; + power-domains = <&ps_atc3_common>, <&ps_atc3_usb_aon>; + #reset-cells = <0>; + }; + + ps_atc3_phymxwrap: power-controller@1a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1a0 4>; + label = "atc3_phymxwrap"; + #power-domain-cells = <0>; + power-domains = <&ps_atc3_common>, <&ps_atc3_usb_aon>; + #reset-cells = <0>; + }; + + ps_smc_i2cm0: power-controller@8028 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8028 4>; + label = "smc_i2cm0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + /* The SMC owns its I2C masters; enabling auto-PM on them resets the machine. */ + apple,firmware-owned; + }; + + ps_smc_i2cm1: power-controller@8030 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8030 4>; + label = "smc_i2cm1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + /* The SMC owns its I2C masters; enabling auto-PM on them resets the machine. */ + apple,firmware-owned; + }; + + ps_smc_i2cm2: power-controller@8038 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8038 4>; + label = "smc_i2cm2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + /* The SMC owns its I2C masters; enabling auto-PM on them resets the machine. */ + apple,firmware-owned; + }; + + ps_smc_i2cm3: power-controller@8040 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8040 4>; + label = "smc_i2cm3"; + #power-domain-cells = <0>; + #reset-cells = <0>; + /* The SMC owns its I2C masters; enabling auto-PM on them resets the machine. */ + apple,firmware-owned; + }; + + ps_smc_i2cm4: power-controller@8048 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8048 4>; + label = "smc_i2cm4"; + #power-domain-cells = <0>; + #reset-cells = <0>; + /* The SMC owns its I2C masters; enabling auto-PM on them resets the machine. */ + apple,firmware-owned; + }; + + ps_smc_i2cm5: power-controller@8050 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8050 4>; + label = "smc_i2cm5"; + #power-domain-cells = <0>; + #reset-cells = <0>; + /* The SMC owns its I2C masters; enabling auto-PM on them resets the machine. */ + apple,firmware-owned; + }; + + ps_smc_i2cm6: power-controller@8058 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8058 4>; + label = "smc_i2cm6"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; +}; + +&pmgr3 { + ps_gpx: power-controller@0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x0 4>; + label = "gpx"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_afr: power-controller@100 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x100 4>; + label = "afr"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_cs: power-controller@108 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x108 4>; + label = "cs"; + #power-domain-cells = <0>; + power-domains = <&ps_afr>; + #reset-cells = <0>; + }; + + ps_gfx: power-controller@110 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x110 4>; + label = "gfx"; + #power-domain-cells = <0>; + power-domains = <&ps_afr>, <&ps_gpx>; + #reset-cells = <0>; + }; +}; + +&pmgr4 { + ps_aic_gfx: power-controller@108 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x108 4>; + label = "aic_gfx"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_pms_gfx_c1ppt: power-controller@110 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x110 4>; + label = "pms_gfx_c1ppt"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_soc_dpe_gfx: power-controller@118 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x118 4>; + label = "soc_dpe_gfx"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_pmgr_soc_ocla_g: power-controller@120 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x120 4>; + label = "pmgr_soc_ocla_g"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2b_ctrl_gfx: power-controller@128 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x128 4>; + label = "b2b_ctrl_gfx"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bg_afc_0: power-controller@130 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x130 4>; + label = "b2bg_afc_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_b2bg_afc_0_dfx: power-controller@138 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x138 4>; + label = "b2bg_afc_0_dfx"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bg_afc_0>; + #reset-cells = <0>; + }; + + ps_b2bg_afc_1: power-controller@140 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x140 4>; + label = "b2bg_afc_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_b2bg_afc_1_dfx: power-controller@148 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x148 4>; + label = "b2bg_afc_1_dfx"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bg_afc_1>; + #reset-cells = <0>; + }; + + ps_b2bg_afi_1_dfx: power-controller@188 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x188 4>; + label = "b2bg_afi_1_dfx"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_fppt_gfx: power-controller@198 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x198 4>; + label = "fppt_gfx"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_fab0_soc: power-controller@1a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1a8 4>; + label = "fab0_soc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab1_soc: power-controller@1b0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1b0 4>; + label = "fab1_soc"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_venc0_sys: power-controller@1c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1c0 4>; + label = "venc0_sys"; + #power-domain-cells = <0>; + power-domains = <&ps_fab0_soc>; + #reset-cells = <0>; + }; + + ps_msr0: power-controller@1c8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1c8 4>; + label = "msr0"; + #power-domain-cells = <0>; + power-domains = <&ps_fab0_soc>; + #reset-cells = <0>; + }; + + ps_jpg: power-controller@1d0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1d0 4>; + label = "jpg"; + #power-domain-cells = <0>; + power-domains = <&ps_fab0_soc>; + #reset-cells = <0>; + }; + + ps_avd_sys: power-controller@1d8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1d8 4>; + label = "avd_sys"; + #power-domain-cells = <0>; + power-domains = <&ps_fab1_soc>; + #reset-cells = <0>; + }; + + ps_prores: power-controller@1e0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1e0 4>; + label = "prores"; + #power-domain-cells = <0>; + power-domains = <&ps_fab1_soc>; + #reset-cells = <0>; + }; + + ps_venc1_sys: power-controller@1f0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1f0 4>; + label = "venc1_sys"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_msr1: power-controller@1f8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x1f8 4>; + label = "msr1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_msr0_ase_core: power-controller@200 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x200 4>; + label = "msr0_ase_core"; + #power-domain-cells = <0>; + power-domains = <&ps_msr0>; + #reset-cells = <0>; + }; + + ps_msr1_ase_core: power-controller@208 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x208 4>; + label = "msr1_ase_core"; + #power-domain-cells = <0>; + power-domains = <&ps_msr1>; + #reset-cells = <0>; + }; + + ps_amcc0: power-controller@218 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x218 4>; + label = "amcc0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc1: power-controller@220 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x220 4>; + label = "amcc1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc2: power-controller@228 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x228 4>; + label = "amcc2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc3: power-controller@230 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x230 4>; + label = "amcc3"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_0: power-controller@238 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x238 4>; + label = "fab_afr_amcc_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_1: power-controller@240 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x240 4>; + label = "fab_afr_amcc_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afc_amcc_0: power-controller@288 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x288 4>; + label = "fab_afc_amcc_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc4: power-controller@298 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x298 4>; + label = "amcc4"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc5: power-controller@2a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2a0 4>; + label = "amcc5"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc6: power-controller@2a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2a8 4>; + label = "amcc6"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc7: power-controller@2b0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2b0 4>; + label = "amcc7"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_2: power-controller@2b8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2b8 4>; + label = "fab_afr_amcc_2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_3: power-controller@2c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x2c0 4>; + label = "fab_afr_amcc_3"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afc_amcc_1: power-controller@308 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x308 4>; + label = "fab_afc_amcc_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc8: power-controller@318 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x318 4>; + label = "amcc8"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc9: power-controller@320 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x320 4>; + label = "amcc9"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc10: power-controller@328 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x328 4>; + label = "amcc10"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc11: power-controller@330 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x330 4>; + label = "amcc11"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_4: power-controller@338 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x338 4>; + label = "fab_afr_amcc_4"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_5: power-controller@340 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x340 4>; + label = "fab_afr_amcc_5"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afc_amcc_2: power-controller@388 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x388 4>; + label = "fab_afc_amcc_2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc12: power-controller@398 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x398 4>; + label = "amcc12"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc13: power-controller@3a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3a0 4>; + label = "amcc13"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc14: power-controller@3a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3a8 4>; + label = "amcc14"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc15: power-controller@3b0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3b0 4>; + label = "amcc15"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_6: power-controller@3b8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3b8 4>; + label = "fab_afr_amcc_6"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_7: power-controller@3c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x3c0 4>; + label = "fab_afr_amcc_7"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afc_amcc_3: power-controller@408 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x408 4>; + label = "fab_afc_amcc_3"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc16: power-controller@418 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x418 4>; + label = "amcc16"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc17: power-controller@420 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x420 4>; + label = "amcc17"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc18: power-controller@428 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x428 4>; + label = "amcc18"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc19: power-controller@430 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x430 4>; + label = "amcc19"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_8: power-controller@438 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x438 4>; + label = "fab_afr_amcc_8"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_9: power-controller@440 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x440 4>; + label = "fab_afr_amcc_9"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afc_amcc_4: power-controller@488 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x488 4>; + label = "fab_afc_amcc_4"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc20: power-controller@498 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x498 4>; + label = "amcc20"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc21: power-controller@4a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x4a0 4>; + label = "amcc21"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc22: power-controller@4a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x4a8 4>; + label = "amcc22"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc23: power-controller@4b0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x4b0 4>; + label = "amcc23"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_10: power-controller@4b8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x4b8 4>; + label = "fab_afr_amcc_10"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_11: power-controller@4c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x4c0 4>; + label = "fab_afr_amcc_11"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afc_amcc_5: power-controller@508 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x508 4>; + label = "fab_afc_amcc_5"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc24: power-controller@518 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x518 4>; + label = "amcc24"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc25: power-controller@520 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x520 4>; + label = "amcc25"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc26: power-controller@528 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x528 4>; + label = "amcc26"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc27: power-controller@530 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x530 4>; + label = "amcc27"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_12: power-controller@538 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x538 4>; + label = "fab_afr_amcc_12"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_13: power-controller@540 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x540 4>; + label = "fab_afr_amcc_13"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afc_amcc_6: power-controller@588 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x588 4>; + label = "fab_afc_amcc_6"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc28: power-controller@598 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x598 4>; + label = "amcc28"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc29: power-controller@5a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x5a0 4>; + label = "amcc29"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc30: power-controller@5a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x5a8 4>; + label = "amcc30"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_amcc31: power-controller@5b0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x5b0 4>; + label = "amcc31"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_14: power-controller@5b8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x5b8 4>; + label = "fab_afr_amcc_14"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afr_amcc_15: power-controller@5c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x5c0 4>; + label = "fab_afr_amcc_15"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_afc_amcc_7: power-controller@610 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x610 4>; + label = "fab_afc_amcc_7"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_fab_b2bd_afc_0: power-controller@648 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x648 4>; + label = "fab_b2bd_afc_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_fab_b2bd_afc_1: power-controller@650 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x650 4>; + label = "fab_b2bd_afc_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_afc_0: power-controller@658 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x658 4>; + label = "b2bd_afc_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_afc_0_dfx: power-controller@660 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x660 4>; + label = "b2bd_afc_0_dfx"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bd_afc_0>; + #reset-cells = <0>; + }; + + ps_b2bd_afc_1: power-controller@668 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x668 4>; + label = "b2bd_afc_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_afc_1_dfx: power-controller@670 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x670 4>; + label = "b2bd_afc_1_dfx"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bd_afc_1>; + #reset-cells = <0>; + }; + + ps_b2bd_afr_0: power-controller@678 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x678 4>; + label = "b2bd_afr_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_afr_1: power-controller@680 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x680 4>; + label = "b2bd_afr_1"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bd_afr_0>; + #reset-cells = <0>; + }; + + ps_b2bd_afr_dfx_0: power-controller@688 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x688 4>; + label = "b2bd_afr_dfx_0"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bd_afr_0>; + #reset-cells = <0>; + }; + + ps_b2bd_afr_dfx_1: power-controller@690 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x690 4>; + label = "b2bd_afr_dfx_1"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bd_afr_1>; + #reset-cells = <0>; + }; + + ps_b2bd_afr_3: power-controller@698 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x698 4>; + label = "b2bd_afr_3"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_afr_2: power-controller@6a0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6a0 4>; + label = "b2bd_afr_2"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bd_afr_3>; + #reset-cells = <0>; + }; + + ps_b2bd_afr_dfx_3: power-controller@6a8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6a8 4>; + label = "b2bd_afr_dfx_3"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bd_afr_3>; + #reset-cells = <0>; + }; + + ps_b2bd_afr_dfx_2: power-controller@6b0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6b0 4>; + label = "b2bd_afr_dfx_2"; + #power-domain-cells = <0>; + power-domains = <&ps_b2bd_afr_2>; + #reset-cells = <0>; + }; + + ps_b2bg_dft: power-controller@6b8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6b8 4>; + label = "b2bg_dft"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bg_cntl_dfx: power-controller@6c0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6c0 4>; + label = "b2bg_cntl_dfx"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bg_dbg_0: power-controller@6c8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6c8 4>; + label = "b2bg_dbg_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bg_dbg_1: power-controller@6d0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6d0 4>; + label = "b2bg_dbg_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bg_dbg_2: power-controller@6d8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6d8 4>; + label = "b2bg_dbg_2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_cntl_dfx_0: power-controller@6e0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6e0 4>; + label = "b2bd_cntl_dfx_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_cntl_dfx_1: power-controller@6e8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6e8 4>; + label = "b2bd_cntl_dfx_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_dbg_0: power-controller@6f0 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6f0 4>; + label = "b2bd_dbg_0"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_dbg_1: power-controller@6f8 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x6f8 4>; + label = "b2bd_dbg_1"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_dbg_2: power-controller@700 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x700 4>; + label = "b2bd_dbg_2"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_dbg_3: power-controller@708 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x708 4>; + label = "b2bd_dbg_3"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_b2bd_dbg_4: power-controller@710 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x710 4>; + label = "b2bd_dbg_4"; + #power-domain-cells = <0>; + #reset-cells = <0>; + }; + + ps_venc0_dma: power-controller@8000 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8000 4>; + label = "venc0_dma"; + #power-domain-cells = <0>; + power-domains = <&ps_venc0_sys>; + #reset-cells = <0>; + }; + + ps_venc0_pipe4: power-controller@8008 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8008 4>; + label = "venc0_pipe4"; + #power-domain-cells = <0>; + power-domains = <&ps_venc0_dma>; + #reset-cells = <0>; + }; + + ps_venc0_pipe5: power-controller@8010 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8010 4>; + label = "venc0_pipe5"; + #power-domain-cells = <0>; + power-domains = <&ps_venc0_dma>; + #reset-cells = <0>; + }; + + ps_venc0_me0: power-controller@8018 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8018 4>; + label = "venc0_me0"; + #power-domain-cells = <0>; + power-domains = <&ps_venc0_dma>; + #reset-cells = <0>; + }; + + ps_venc0_me1: power-controller@8020 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8020 4>; + label = "venc0_me1"; + #power-domain-cells = <0>; + power-domains = <&ps_venc0_me0>; + #reset-cells = <0>; + }; + + ps_venc1_dma: power-controller@8028 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8028 4>; + label = "venc1_dma"; + #power-domain-cells = <0>; + power-domains = <&ps_venc1_sys>; + #reset-cells = <0>; + }; + + ps_venc1_pipe4: power-controller@8030 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8030 4>; + label = "venc1_pipe4"; + #power-domain-cells = <0>; + power-domains = <&ps_venc1_dma>; + #reset-cells = <0>; + }; + + ps_venc1_pipe5: power-controller@8038 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8038 4>; + label = "venc1_pipe5"; + #power-domain-cells = <0>; + power-domains = <&ps_venc1_dma>; + #reset-cells = <0>; + }; + + ps_venc1_me0: power-controller@8040 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8040 4>; + label = "venc1_me0"; + #power-domain-cells = <0>; + power-domains = <&ps_venc1_dma>; + #reset-cells = <0>; + }; + + ps_venc1_me1: power-controller@8048 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x8048 4>; + label = "venc1_me1"; + #power-domain-cells = <0>; + power-domains = <&ps_venc1_me0>; + #reset-cells = <0>; + }; +}; + +&pmgr5 { + ps_debug_gfx_gated: power-controller@58 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x58 4>; + label = "debug_gfx_gated"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; + + ps_nub_gfx_gpio: power-controller@68 { + compatible = "apple,t6050-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate"; + reg = <0x68 4>; + label = "nub_gfx_gpio"; + #power-domain-cells = <0>; + #reset-cells = <0>; + apple,always-on; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6050-smc.dtsi b/arch/arm64/boot/dts/apple/t6050-smc.dtsi new file mode 100644 index 00000000000000..c38a76538d62a1 --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050-smc.dtsi @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * T6050 SMC (System Management Controller) and the SPMI PMIC NVMEM cells + * its reboot and RTC children need, from the J714c ADT. Based on + * omarchy-m5's dt/t6050-smc.dtsi (github.com/betizzel/omarchy-m5); the + * structure follows t6031-die0.dtsi and t8122.dtsi. + * + * Board files add hwmon sensors (hwmon-*.dtsi) on top of &smc_hwmon. The + * T6050 SMC has no F0Md/F1Md: its fan mode keys are F0md/F1md (ui8, + * writable), so every T6050 board overrides apple,fan-mode after including + * hwmon-fan*.dtsi. + */ + +#include + +&soc { + // ADT /arm-io/nub-spmi0: compatible "aapl,spmi", gen = 4, + // reg[0] = 0x8a014000 (-> 0x28a014000), ADT size 0x4000. The full + // ADT size is used: the gen 4 FIFO registers below sit at 0x200-0x220, + // outside the 0x100 window t6031 maps for its gen 1 layout (a 0x100 + // resource only worked because ioremap maps a whole 16K page). + // interrupts = [256, 726, 281, ...]: 256 is the controller-internal + // SPMI_IRQ_NOTIFY hwirq (identical in all five SPMI nodes), 726 is the + // AIC line (same index convention as wdt: ADT interrupts[0] = 721). + // This is a gen 4 controller (ADT "gen" = 4): STATUS/CMD/REPLY sit at + // 0x200/0x210/0x220 and RX-empty is bit 30 (as in m1n1). The + // gen 1 layout (t8103) does not apply, so there is no fallback + // compatible. Linux runs gen 4 polled: its IRQ registers are + // undocumented. + // + // No power-domains: the ADT node has no power-gates, and ps_nub_spmi0 + // (pmgr 0x120, boot value 0x1400024f = auto-PM + clock-gated) is + // apple,always-on in t6050-pmgr.dtsi. t6031's equivalent node also has + // none. Referencing it would only add a genpd dependency. + nub_spmi0: spmi@28a014000 { + /* Polled: this tree's gen 4 SPMI driver has no interrupt support. */ + compatible = "apple,t6050-spmi", "apple,t8142-spmi"; + reg = <0x2 0x8a014000 0x0 0x4000>; + #address-cells = <2>; + #size-cells = <0>; + + // ADT /arm-io/nub-spmi0/spmi-abbeyL1: compatible + // "pmu,spmi","pmu,abbey", reg[0] = 0xe -> USID 14, is-primary. + // (spmi-mosquitoM0 = USID 9, btm = USID 0xb on the same bus.) + // + // Cell offsets are the Asahi "chapel" layout (t6031-die0.dtsi); + // the ADT abbey properties confirm the ones it lists: + // info-pm_setting = 0x2001 + // info-clock_offset = {0x2100, 6} (info-rtc_scrpad + // 0x2100) + // info-fault_shadow = {0x867b, 0x10} + // info-scrpad_socd = {0x8b00, 0x1800} + // info-leg_scrpad = 0xf800 -> boot_stage 0xf801 etc. + // are + // base+1/+2/+3/+0xf as on chapel/stowe + // (the +N offsets are not in the ADT) + pmic1: pmic@e { + compatible = "apple,abbey-pmic", "apple,spmi-nvmem"; + reg = <0xe SPMI_USID>; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + pm_setting: pm-setting@2001 { + reg = <0x2001 0x1>; + }; + + rtc_offset: rtc-offset@2100 { + reg = <0x2100 0x6>; + }; + + fault_shadow: fault-shadow@867b { + reg = <0x867b 0x10>; + }; + + socd: socd@8b00 { + reg = <0x8b00 0x1800>; + }; + + 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>; + }; + + boot_error_stage: boot-error-stage@f803 { + reg = <0xf803 0x1>; + }; + + shutdown_flag: shutdown-flag@f80f,3 { + reg = <0xf80f 0x1>; + bits = <3 1>; + }; + }; + }; + }; + + // "smc" reg: ASC wrapper (driver does not map it; only index 1 is + // ioremapped). "sram" reg: ADT iop-smc-nub region-base = 0x28de00000, + // region-size = 0x140000 (Asahi uses 0x100000 on M1-M4; the T6050 + // firmware region is 0x140000, and the driver rejects any shmem buffer + // outside this window). smc_gpio is deliberately defined here although + // nothing consumes it yet. + smc: smc@28c600000 { + compatible = "apple,t6050-smc", "apple,t8103-smc"; + reg = <0x2 0x8c600000 0x0 0x4000>, + <0x2 0x8de00000 0x0 0x140000>; + reg-names = "smc", "sram"; + mboxes = <&smc_mbox>; + + smc_gpio: gpio { + compatible = "apple,smc-gpio"; + #gpio-cells = <2>; + gpio-controller; + }; + + smc_hwmon: hwmon { + compatible = "apple,smc-hwmon"; + }; + + // Registers SYS_OFF_PRIO_HIGH (192) restart + power-off + // handlers; the apple,t6050-wdt restart handler is priority + // 128 (apple_wdt.c), so once this probes, + // `reboot` goes through SMC 'phra' instead of the wdt. The + // PMIC scratchpad cells it writes match t6031 (M3 Max). + smc_reboot: reboot { + compatible = "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_rtc: rtc { + compatible = "apple,smc-rtc"; + nvmem-cells = <&rtc_offset>; + nvmem-cell-names = "rtc_offset"; + }; + }; + + // ADT /arm-io/smc: compatible "iop,ascwrap-v6" (same as ans/mtp), + // reg[0] = 0x8c600000 (ASC wrapper, size 0x88000), mailbox at + // reg[0] + 0x8000 exactly like ans_mbox/mtp_mbox (as in m1n1), + // interrupts = [900, 899, 902, 901] = [n+1, n, n+3, n+2] with n = 899, + // so send-empty = 899 ... recv-not-empty = 902 (same reordering as + // ANS 1348,1347,1350,1349 -> 1347..1350 and MTP 677,676,679,678). + // No power-gates / clock-gates in the ADT node -> no power-domains. + smc_mbox: mbox@28c608000 { + compatible = "apple,t6050-asc-mailbox", "apple,asc-mailbox-v4"; + reg = <0x2 0x8c608000 0x0 0x4000>; + interrupt-parent = <&aic>; + interrupts = , + , + , + ; + interrupt-names = "send-empty", "send-not-empty", + "recv-empty", "recv-not-empty"; + #mbox-cells = <0>; + }; +}; diff --git a/arch/arm64/boot/dts/apple/t6050.dtsi b/arch/arm64/boot/dts/apple/t6050.dtsi new file mode 100644 index 00000000000000..70ba4e4d37106d --- /dev/null +++ b/arch/arm64/boot/dts/apple/t6050.dtsi @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/* + * Apple T6050 "M5 Max" SoC + * + * Copyright The Asahi Linux Contributors + */ + +#include +#include + +#include "t6050-base.dtsi" + +/ { + compatible = "apple,t6050", "apple,arm-platform"; + #address-cells = <2>; + #size-cells = <2>; + + soc: soc { + compatible = "simple-bus"; + ranges; + #address-cells = <2>; + /* Required to get >32-bit DMA via DARTs */ + dma-ranges = <0 0 0 0 0xffffffff 0xffffc000>; + nonposted-mmio; + #size-cells = <2>; + }; +}; + +/* T6050 is a single die: no multi-die templating. */ +#include "t6050-die0.dtsi" +#include "t6050-pmgr.dtsi" +#include "t6050-nvme.dtsi" diff --git a/arch/arm64/configs/j716s.config b/arch/arm64/configs/j716s.config new file mode 100644 index 00000000000000..0627a221cab3c4 --- /dev/null +++ b/arch/arm64/configs/j716s.config @@ -0,0 +1,41 @@ +# MacBook Pro (16-inch, M5 Pro, 2026), J716s: the drivers on its boot path +# built in, for a root file system that carries no modules, on top of +# defconfig and asahi.config: +# make ARCH=arm64 LLVM=1 defconfig asahi.config j716s.config + +# Nothing on the T6050 boot path needs Rust yet +CONFIG_RUST=n +CONFIG_DRM_APPLE=n + +# Storage: ANS NVMe behind SART, RTKit +CONFIG_NVME_APPLE=y +CONFIG_APPLE_SART=y +CONFIG_APPLE_RTKIT_HELPER=y + +# SMC and its consumers; the PMIC NVMEM cells the RTC and reboot read +CONFIG_MFD_MACSMC=y +CONFIG_GPIO_MACSMC=y +CONFIG_INPUT_MACSMC_INPUT=y +CONFIG_POWER_RESET_MACSMC=y +CONFIG_SENSORS_MACSMC_HWMON=y +CONFIG_MACSMC_POWER=y +CONFIG_RTC_DRV_MACSMC=y +CONFIG_SPMI_APPLE=y +CONFIG_NVMEM_APPLE_SPMI=y + +# CPU frequency +CONFIG_ARM_APPLE_SOC_CPUFREQ=y + +# Keyboard and trackpad: DockChannel HID. HID_MAGICMOUSE drives the +# trackpad; the MTP haptic driver would force it to =m, so it stays off +# (no click haptics). +CONFIG_APPLE_DOCKCHANNEL=y +CONFIG_HID_DOCKCHANNEL=y +CONFIG_HID_APPLE=y +CONFIG_HID_MAGICMOUSE=y +CONFIG_HID_APPLE_MTP_HAPTIC=n +CONFIG_HIDRAW=y + +# Keyboard backlight +CONFIG_PWM_APPLE=y +CONFIG_LEDS_PWM=y diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h index 4a3fd1fabeecd1..2bbac91357582c 100644 --- a/arch/arm64/include/asm/cputype.h +++ b/arch/arm64/include/asm/cputype.h @@ -158,6 +158,8 @@ #define APPLE_CPU_PART_TAHITI_P 0x061 #define APPLE_CPU_PART_T8142_E 0x062 #define APPLE_CPU_PART_T8142_P 0x063 +#define APPLE_CPU_PART_T6050_M 0x064 +#define APPLE_CPU_PART_T6050_P 0x065 #define APPLE_CPU_PART_T8152_E 0x072 #define APPLE_CPU_PART_T8152_P 0x073 @@ -257,6 +259,8 @@ #define MIDR_APPLE_TAHITI_P MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_TAHITI_P) #define MIDR_APPLE_T8142_E MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_T8142_E) #define MIDR_APPLE_T8142_P MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_T8142_P) +#define MIDR_APPLE_T6050_M MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_T6050_M) +#define MIDR_APPLE_T6050_P MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_T6050_P) #define MIDR_APPLE_T8152_E MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_T8152_E) #define MIDR_APPLE_T8152_P MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_T8152_P) #define MIDR_AMPERE1 MIDR_CPU_MODEL(ARM_CPU_IMP_AMPERE, AMPERE_CPU_PART_AMPERE1) diff --git a/arch/arm64/kernel/idle.c b/arch/arm64/kernel/idle.c index f632551030d118..4478bb6f89bb3c 100644 --- a/arch/arm64/kernel/idle.c +++ b/arch/arm64/kernel/idle.c @@ -46,13 +46,39 @@ early_param("idle", setup_idle); * patched-out branch. */ static DEFINE_STATIC_KEY_FALSE(apple_wfi_loses_regs); +static bool apple_keep_idle_nop __initdata; + +/* + * The boot loader appends idle=nop after the user's arguments, so it cannot + * be overridden on the command line. This flag keeps it anyway. + */ +static int __init setup_apple_keep_idle_nop(char *arg) +{ + apple_keep_idle_nop = true; + return 0; +} +early_param("apple_keep_idle_nop", setup_apple_keep_idle_nop); static int __init apple_wfi_quirk_init(void) { + u32 model = read_cpuid_id() & MIDR_CPU_MODEL_MASK; + if (midr_is_apple_m4_or_later(read_cpuid_id())) { static_branch_enable(&apple_wfi_loses_regs); pr_info("Apple: preserving registers across WFI\n"); } + /* + * m1n1 passes idle=nop on M4 and later for kernels that do not + * preserve the registers WFI loses there. This one does, from here + * on, so on T6050 spinning only keeps every idle core busy: the + * system draws about 7 W more at idle. The secondary CPUs are not up + * yet, and the boot CPU has spun until now, so WFI is safe from here. + */ + if (idle == ARM64_IDLE_NOP && !apple_keep_idle_nop && + (model == MIDR_APPLE_T6050_M || model == MIDR_APPLE_T6050_P)) { + idle = ARM64_IDLE_WFI; + pr_info("Apple: idling in WFI, ignoring idle=nop\n"); + } return 0; } early_initcall(apple_wfi_quirk_init); diff --git a/drivers/cpufreq/apple-soc-cpufreq.c b/drivers/cpufreq/apple-soc-cpufreq.c index b0080dbdaeac74..234818235c9429 100644 --- a/drivers/cpufreq/apple-soc-cpufreq.c +++ b/drivers/cpufreq/apple-soc-cpufreq.c @@ -353,6 +353,11 @@ static const struct of_device_id apple_soc_cpufreq_of_match[] __maybe_unused = { .compatible = "apple,t8142-cluster-cpufreq", .data = &soc_t8142_info, }, + { + /* T6050: same command/readback model as T8142, CLPC/PMP keep the rest. */ + .compatible = "apple,t6050-cluster-cpufreq", + .data = &soc_t8142_info, + }, { .compatible = "apple,t8152-cluster-cpufreq", .data = &soc_t8152_info, diff --git a/drivers/gpio/gpio-macsmc.c b/drivers/gpio/gpio-macsmc.c index 424f19b1c4a5d0..60c776a7df44a2 100644 --- a/drivers/gpio/gpio-macsmc.c +++ b/drivers/gpio/gpio-macsmc.c @@ -18,20 +18,32 @@ #define MAX_GPIO 64 /* - * J700 resets its trackpad analog front end through the SMC "pcIO" key - * rather than a gPxx GPIO key. The Apple device tree describes the reset as - * the platform function pKW8("pcIO", 0x10000, 0x130000): an eight-byte write - * with 0x10000 in the low word, 0x130000 in the high word and the requested - * level in bits 15:0. Bits 23:16 of the high word hold the pin number. + * J700, J714c and J716s reset their trackpad analog front end through the SMC + * "pcIO" key rather than a gPxx GPIO key. The Apple device tree describes the + * reset as a platform function such as pKW8("pcIO", 0x10000, 0x130000): an + * eight-byte write with 0x10000 in the low word, 0x130000 in the high word + * and the requested level in bits 15:0. Bits 23:16 of the high word hold the + * pin number. */ -#define MACSMC_J700_AFE_RESET_GPIO 19 -#define MACSMC_J700_AFE_RESET_LO 0x10000 -#define MACSMC_J700_AFE_RESET_HI 0x130000 +struct macsmc_pcio_line { + unsigned int gpio; + u32 lo, hi; +}; -/* J700 amfm-sunrise function-reg_on: pKW8("pcIO", 0x800000, 0x80000). */ -#define MACSMC_J700_RADIO_REG_ON_GPIO 8 -#define MACSMC_J700_RADIO_REG_ON_LO 0x800000 -#define MACSMC_J700_RADIO_REG_ON_HI 0x80000 +static const struct macsmc_pcio_line macsmc_j700_pcio[] = { + /* multi-touch function-afe-reset */ + { 19, 0x10000, 0x130000 }, + /* amfm-sunrise function-reg_on */ + { 8, 0x800000, 0x80000 }, + { } +}; + +/* J714c and J716s: the same template in both Apple device trees */ +static const struct macsmc_pcio_line macsmc_j714c_pcio[] = { + /* multi-touch function-afe-reset: pKW8("pcIO", 0x10000, 0x11c0000) */ + { 28, 0x10000, 0x11c0000 }, + { } +}; /* * Commands 0-6 are, presumably, the intended API. @@ -94,16 +106,19 @@ struct macsmc_gpio { int first_index; smc_key base_key; - bool j700_pcio; - DECLARE_BITMAP(j700_pcio_level, MAX_GPIO); + const struct macsmc_pcio_line *pcio; + DECLARE_BITMAP(pcio_level, MAX_GPIO); }; -static bool macsmc_gpio_is_j700_pcio(struct macsmc_gpio *smcgp, - unsigned int offset) +static const struct macsmc_pcio_line *macsmc_gpio_pcio(struct macsmc_gpio *smcgp, + unsigned int offset) { - return smcgp->j700_pcio && - (offset == MACSMC_J700_AFE_RESET_GPIO || - offset == MACSMC_J700_RADIO_REG_ON_GPIO); + const struct macsmc_pcio_line *line; + + for (line = smcgp->pcio; line && line->hi; line++) + if (line->gpio == offset) + return line; + return NULL; } static int macsmc_gpio_nr(smc_key key) @@ -176,7 +191,7 @@ static int macsmc_gpio_get_direction(struct gpio_chip *gc, unsigned int offset) u32 val; int ret; - if (macsmc_gpio_is_j700_pcio(smcgp, offset)) + if (macsmc_gpio_pcio(smcgp, offset)) return GPIO_LINE_DIRECTION_OUT; /* First try reading the explicit pin mode register */ @@ -200,8 +215,8 @@ static int macsmc_gpio_get(struct gpio_chip *gc, unsigned int offset) int ret; /* 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); + if (macsmc_gpio_pcio(smcgp, offset)) + return test_bit(offset, smcgp->pcio_level); ret = macsmc_gpio_get_direction(gc, offset); if (ret < 0) @@ -223,20 +238,11 @@ static int macsmc_gpio_set(struct gpio_chip *gc, unsigned int offset, int value) { struct macsmc_gpio *smcgp = gpiochip_get_data(gc); smc_key key = macsmc_gpio_key(smcgp->base_key, offset); + const struct macsmc_pcio_line *line = macsmc_gpio_pcio(smcgp, offset); int ret; - if (macsmc_gpio_is_j700_pcio(smcgp, offset)) { - u32 lo, hi; - u64 payload; - - if (offset == MACSMC_J700_RADIO_REG_ON_GPIO) { - lo = MACSMC_J700_RADIO_REG_ON_LO; - hi = MACSMC_J700_RADIO_REG_ON_HI; - } else { - lo = MACSMC_J700_AFE_RESET_LO; - hi = MACSMC_J700_AFE_RESET_HI; - } - payload = ((u64)hi << 32) | lo | (value ? 1 : 0); + if (line) { + u64 payload = ((u64)line->hi << 32) | line->lo | (value ? 1 : 0); ret = apple_smc_write_u64(smcgp->smc, SMC_KEY(pcIO), payload); if (ret < 0) { @@ -245,7 +251,7 @@ static int macsmc_gpio_set(struct gpio_chip *gc, unsigned int offset, int value) offset, !!value, ret); return ret; } - assign_bit(offset, smcgp->j700_pcio_level, value); + assign_bit(offset, smcgp->pcio_level, value); return 0; } @@ -262,16 +268,15 @@ static int macsmc_gpio_init_valid_mask(struct gpio_chip *gc, unsigned long *valid_mask, unsigned int ngpios) { struct macsmc_gpio *smcgp = gpiochip_get_data(gc); + const struct macsmc_pcio_line *line; int count; int i; count = min(smcgp->smc->key_count, MAX_GPIO); bitmap_zero(valid_mask, ngpios); - if (smcgp->j700_pcio) { - set_bit(MACSMC_J700_AFE_RESET_GPIO, valid_mask); - set_bit(MACSMC_J700_RADIO_REG_ON_GPIO, valid_mask); - } + for (line = smcgp->pcio; line && line->hi; line++) + set_bit(line->gpio, valid_mask); for (i = 0; i < count; i++) { int ret, gpio_nr; @@ -315,8 +320,13 @@ static int macsmc_gpio_probe(struct platform_device *pdev) smcgp->dev = &pdev->dev; smcgp->smc = smc; 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"); + if (device_is_compatible(&pdev->dev, "apple,smc-gpio")) { + if (of_machine_is_compatible("apple,j700")) + smcgp->pcio = macsmc_j700_pcio; + else if (of_machine_is_compatible("apple,j714c") || + of_machine_is_compatible("apple,j716s")) + smcgp->pcio = macsmc_j714c_pcio; + } smcgp->first_index = macsmc_gpio_find_first_gpio_index(smcgp); if (smcgp->first_index < 0) diff --git a/drivers/gpu/drm/sysfb/simpledrm.c b/drivers/gpu/drm/sysfb/simpledrm.c index bb32b258a9b5f8..27208f700de457 100644 --- a/drivers/gpu/drm/sysfb/simpledrm.c +++ b/drivers/gpu/drm/sysfb/simpledrm.c @@ -839,8 +839,10 @@ static struct simpledrm_device *simpledrm_device_create(struct drm_driver *drv, /* Connector */ connector = &sdev->connector; + /* A built-in laptop panel the loader hands over (Apple, before DCP). */ ret = drm_connector_init(dev, connector, &simpledrm_connector_funcs, - DRM_MODE_CONNECTOR_Unknown); + of_property_read_bool(dev->dev->of_node, "apple,internal-panel") ? + DRM_MODE_CONNECTOR_eDP : DRM_MODE_CONNECTOR_Unknown); if (ret) return ERR_PTR(ret); drm_connector_helper_add(connector, &simpledrm_connector_helper_funcs); diff --git a/drivers/hid/dockchannel-hid/dockchannel-hid.c b/drivers/hid/dockchannel-hid/dockchannel-hid.c index e47de457f7f04f..00362e761d303f 100644 --- a/drivers/hid/dockchannel-hid/dockchannel-hid.c +++ b/drivers/hid/dockchannel-hid/dockchannel-hid.c @@ -436,7 +436,8 @@ static int dchid_reset_interface(struct dchid_iface *iface, int state) /* * Power method 2: announce the transition, drive the AFE reset line to the * new state and confirm the transition. The reset is asserted for a power-off - * and held for 50 ms, and released for a power-on. + * and held for 50 ms, and released for a power-on and given 50 ms to settle + * before the transition is confirmed. */ static int dchid_pm2_set_power(struct dchid_iface *iface, u8 state) { @@ -454,12 +455,23 @@ static int dchid_pm2_set_power(struct dchid_iface *iface, u8 state) if (state == DCHID_POWER_STATE_ON) fsleep(50 * USEC_PER_MSEC); } else { - ret = gpiod_set_value_cansleep(dchid->afe_reset, - state == DCHID_POWER_STATE_OFF); - if (ret < 0) + bool off = state == DCHID_POWER_STATE_OFF; + + ret = gpiod_set_value_cansleep(dchid->afe_reset, off); + if (ret < 0) { + dev_err(dchid->dev, "%s: failed to %s the AFE reset: %d\n", + iface->name, off ? "assert" : "release", ret); return ret; - if (state == DCHID_POWER_STATE_OFF) - fsleep(50 * USEC_PER_MSEC); + } + dev_dbg(dchid->dev, "%s: AFE reset %s\n", iface->name, + off ? "asserted" : "released"); + /* + * The sequence validated on J716s (M5 Pro, MTP firmware + * 6320.86.1, "Touch MT ready" on 3 of 3 boots) also waits + * 50 ms after the release before HasChanged, as the + * firmware-managed path above does. + */ + fsleep(50 * USEC_PER_MSEC); } dchid_pm2_command(iface->index, state, true, msg); diff --git a/drivers/hwmon/macsmc-hwmon.c b/drivers/hwmon/macsmc-hwmon.c index 7e0a2312d2d292..d545ad53d17a6d 100644 --- a/drivers/hwmon/macsmc-hwmon.c +++ b/drivers/hwmon/macsmc-hwmon.c @@ -865,6 +865,8 @@ static int macsmc_hwmon_create_fan(struct device *dev, struct apple_smc *smc, struct macsmc_hwmon_fan *fan) { const char *label, *now, *min, *max, *set, *mode; + char missing[64] = ""; + int len = 0; int ret; ret = of_property_read_string(fan_node, "apple,key-id", &now); @@ -887,37 +889,54 @@ static int macsmc_hwmon_create_fan(struct device *dev, struct apple_smc *smc, fan->attrs |= HWMON_F_LABEL; } - /* The following keys are not required to simply monitor fan speed */ + /* + * The following keys are not required to simply monitor fan speed. + * A key the firmware lacks (the T6050 SMC spells the mode key F0md, + * not F0Md) drops only that attribute, not the whole fan; the missing + * keys are reported together below. + */ if (!of_property_read_string(fan_node, "apple,fan-minimum", &min)) { - ret = macsmc_hwmon_parse_key(dev, smc, &fan->min, min); - if (ret) - return ret; - - fan->attrs |= HWMON_F_MIN; + if (macsmc_hwmon_parse_key(dev, smc, &fan->min, min)) + len += scnprintf(missing + len, sizeof(missing) - len, + " minimum %s", min); + else + fan->attrs |= HWMON_F_MIN; } if (!of_property_read_string(fan_node, "apple,fan-maximum", &max)) { - ret = macsmc_hwmon_parse_key(dev, smc, &fan->max, max); - if (ret) - return ret; - - fan->attrs |= HWMON_F_MAX; + if (macsmc_hwmon_parse_key(dev, smc, &fan->max, max)) + len += scnprintf(missing + len, sizeof(missing) - len, + " maximum %s", max); + else + fan->attrs |= HWMON_F_MAX; } if (!of_property_read_string(fan_node, "apple,fan-target", &set)) { - ret = macsmc_hwmon_parse_key(dev, smc, &fan->set, set); - if (ret) - return ret; - - fan->attrs |= HWMON_F_TARGET; + if (macsmc_hwmon_parse_key(dev, smc, &fan->set, set)) + len += scnprintf(missing + len, sizeof(missing) - len, + " target %s", set); + else + fan->attrs |= HWMON_F_TARGET; } if (!of_property_read_string(fan_node, "apple,fan-mode", &mode)) { - ret = macsmc_hwmon_parse_key(dev, smc, &fan->mode, mode); - if (ret) - return ret; + if (macsmc_hwmon_parse_key(dev, smc, &fan->mode, mode)) + len += scnprintf(missing + len, sizeof(missing) - len, + " mode %s", mode); } + if (len) + dev_info(dev, "Fan %s: optional keys not found:%s\n", now, missing); + + /* + * Manual control (fan_control) writes the mode key and checks the + * request against the minimum and maximum keys before writing the + * target: it needs all four. + */ + if ((fan->attrs & (HWMON_F_MIN | HWMON_F_MAX | HWMON_F_TARGET)) != + (HWMON_F_MIN | HWMON_F_MAX | HWMON_F_TARGET)) + fan->mode.macsmc_key = 0; + /* Initialise fan control mode to automatic */ fan->manual = false; diff --git a/drivers/input/misc/macsmc-input.c b/drivers/input/misc/macsmc-input.c index e149b043fef820..ab6099ca2c383e 100644 --- a/drivers/input/misc/macsmc-input.c +++ b/drivers/input/misc/macsmc-input.c @@ -11,23 +11,37 @@ #include #include #include +#include #include +#include +#include #include +static unsigned int lid_wake_settle_ms = 2000; +module_param(lid_wake_settle_ms, uint, 0644); +MODULE_PARM_DESC(lid_wake_settle_ms, + "A lid-open report this many ms or less after system sleep starts does not wake the system (0 = always wake)"); + /** * struct macsmc_input * @dev: Underlying struct device for the input sub-device * @smc: Pointer to apple_smc struct of the mfd parent * @input: Allocated input_dev; devres managed * @nb: Notifier block used for incoming events from SMC (e.g. button pressed down) + * @lid_lock: Serialises lid reports with the system sleep callbacks * @wakeup_mode: Set to true when system is suspended and power button events should wake it + * @lid_held: A lid-open report was not passed on during this system sleep + * @sleep_start: CLOCK_BOOTTIME at which this system sleep started */ struct macsmc_input { struct device *dev; struct apple_smc *smc; struct input_dev *input; struct notifier_block nb; + struct mutex lid_lock; /* protects the three fields below */ bool wakeup_mode; + bool lid_held; + ktime_t sleep_start; }; #define SMC_EV_BTN 0x7201 @@ -79,10 +93,57 @@ static void macsmc_input_event_button(struct macsmc_input *smcin, unsigned long } } +/* + * On the J716s the SMC has reported the lid open (event 0x72030001, the same + * bytes as a real opening) while the lid stayed shut, about 230 ms after the + * close that started the suspend and in step with the trackpad coprocessor + * moving its AFE to "Dependent Mode". Taken at face value, that report ends + * the suspend the close started. So in the sleep window an open report wakes + * the system only if the SMC's lid key agrees and the sleep has run for + * longer than lid_wake_settle_ms. Called with lid_lock held. + */ +static bool macsmc_input_lid_wake_ok(struct macsmc_input *smcin, unsigned long event) +{ + s64 ms = ktime_ms_delta(ktime_get_boottime(), smcin->sleep_start); + u8 closed; + int ret; + + ret = apple_smc_read_u8(smcin->smc, SMC_KEY(MSLD), &closed); + if (ret < 0) { + dev_warn(smcin->dev, "lid open %08lx at +%lld ms in sleep, MSLD read failed: %d\n", + event, ms, ret); + closed = 0; + } + + if (closed) { + dev_info(smcin->dev, "lid open %08lx at +%lld ms in sleep, MSLD=%u: ignored\n", + event, ms, closed); + return false; + } + + if (lid_wake_settle_ms && ms <= lid_wake_settle_ms) { + dev_info(smcin->dev, "lid open %08lx at +%lld ms in sleep, MSLD=0, within %u ms: no wakeup\n", + event, ms, lid_wake_settle_ms); + return false; + } + + dev_info(smcin->dev, "lid open %08lx at +%lld ms in sleep, MSLD=0: wakeup\n", event, ms); + return true; +} + static void macsmc_input_event_lid(struct macsmc_input *smcin, unsigned long event) { u8 lid_state = !!((event >> 8) & 0xff); + guard(mutex)(&smcin->lid_lock); + + if (smcin->wakeup_mode && !lid_state && + !macsmc_input_lid_wake_ok(smcin, event)) { + /* SW_LID stays closed; complete() resynchronises it from MSLD. */ + smcin->lid_held = true; + return; + } + pm_wakeup_dev_event(smcin->dev, 0, (smcin->wakeup_mode && !lid_state)); input_report_switch(smcin->input, SW_LID, lid_state); input_sync(smcin->input); @@ -134,6 +195,10 @@ static int macsmc_input_probe(struct platform_device *pdev) smcin->smc = smc; platform_set_drvdata(pdev, smcin); + error = devm_mutex_init(&pdev->dev, &smcin->lid_lock); + if (error) + return error; + smcin->input = devm_input_allocate_device(&pdev->dev); if (!smcin->input) return -ENOMEM; @@ -198,6 +263,9 @@ static int macsmc_input_pm_prepare(struct device *dev) { struct macsmc_input *smcin = dev_get_drvdata(dev); + guard(mutex)(&smcin->lid_lock); + smcin->sleep_start = ktime_get_boottime(); + smcin->lid_held = false; smcin->wakeup_mode = true; return 0; } @@ -205,8 +273,24 @@ static int macsmc_input_pm_prepare(struct device *dev) static void macsmc_input_pm_complete(struct device *dev) { struct macsmc_input *smcin = dev_get_drvdata(dev); + u8 closed; + int error; + guard(mutex)(&smcin->lid_lock); smcin->wakeup_mode = false; + if (!smcin->lid_held) + return; + smcin->lid_held = false; + + /* An open report was held back: report what the SMC says now. */ + error = apple_smc_read_u8(smcin->smc, SMC_KEY(MSLD), &closed); + if (error < 0) { + dev_warn(dev, "Failed to read the lid state after sleep: %d\n", error); + return; + } + dev_info(dev, "lid after sleep: MSLD=%u\n", closed); + input_report_switch(smcin->input, SW_LID, !!closed); + input_sync(smcin->input); } static const struct dev_pm_ops macsmc_input_pm_ops = { diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c index d3ef47fa840e49..2a3167c9fcc16e 100644 --- a/drivers/nvme/host/apple.c +++ b/drivers/nvme/host/apple.c @@ -43,6 +43,8 @@ #include "nvme.h" #define APPLE_ANS_BOOT_TIMEOUT USEC_PER_SEC +/* RTKit handshake timeout for the T6050 ANS, see apple_nvme_alloc() */ +#define APPLE_NVME_T6050_HANDSHAKE_TIMEOUT_MS 10000 #define APPLE_ANS_COPROC_CPU_CONTROL 0x44 #define APPLE_ANS_COPROC_CPU_CONTROL_RUN BIT(4) @@ -198,6 +200,8 @@ struct apple_nvme_hw { bool has_queue_count; bool has_separate_nvmmu; bool needs_ioq_registers; + /* Enable with the firmware's CC fields (128-byte SQ entries) instead of the core's. */ + bool keep_cc_fields; u32 max_queue_depth; unsigned long quirks; }; @@ -343,6 +347,13 @@ static bool apple_nvme_can_adopt_rtkit(struct apple_nvme *anv) * and ready identifies a live session. Borrowed buffers still require * reserved RAM and protected SART ranges. */ + /* + * T6050: the loader hands over the controller disabled with the RTKit + * session live (it cannot be restarted after a stop). Adopt on RUN and + * BOOT_STATUS alone there; the enable below starts the controller. + */ + if (anv->hw->keep_cc_fields && (cc & NVME_CC_ENABLE)) + return !(csts & NVME_CSTS_CFS); return (cc & NVME_CC_ENABLE) && (csts & NVME_CSTS_RDY) && !(csts & NVME_CSTS_CFS); } @@ -360,7 +371,8 @@ static unsigned int apple_nvme_queue_depth(struct apple_nvme_queue *q) struct apple_nvme *anv = queue_to_apple_nvme(q); if (q->is_adminq) - return APPLE_NVME_AQ_DEPTH; + return anv->hw->keep_cc_fields ? anv->hw->max_queue_depth : + APPLE_NVME_AQ_DEPTH; return anv->hw->max_queue_depth; } @@ -1535,6 +1547,31 @@ static void apple_nvme_wait_freeze(struct apple_nvme *anv) } } +/* + * T6050: the controller only reports ready when CC keeps the entry-size fields + * the firmware set (IOSQES 7, 128-byte entries), as the loader does. The core's + * nvme_enable_ctrl composes CC with the standard IOSQES 6. + */ +static int apple_nvme_enable_ctrl_keep_cc(struct apple_nvme *anv) +{ + u32 cc, csts, timeout_ms; + + anv->ctrl.cap = readq(anv->mmio_nvme + NVME_REG_CAP); + cc = readl(anv->mmio_nvme + NVME_REG_CC); + cc &= ~(NVME_CC_SHN_MASK | NVME_CC_ENABLE); + cc |= NVME_CC_ENABLE; + anv->ctrl.ctrl_config = cc; + writel(cc, anv->mmio_nvme + NVME_REG_CC); + timeout_ms = clamp_t(u32, (NVME_CAP_TIMEOUT(anv->ctrl.cap) + 1) * 500, 1000, 10000); + if (readl_poll_timeout(anv->mmio_nvme + NVME_REG_CSTS, csts, + csts & NVME_CSTS_RDY, 100, timeout_ms * 1000)) { + dev_err(anv->dev, "controller not ready after enable, CC=%#x CSTS=%#x\n", + readl(anv->mmio_nvme + NVME_REG_CC), readl(anv->mmio_nvme + NVME_REG_CSTS)); + return -ENODEV; + } + return 0; +} + static void apple_nvme_reset_work(struct work_struct *work) { unsigned int nr_io_queues = 1; @@ -1710,8 +1747,13 @@ static void apple_nvme_reset_work(struct work_struct *work) * Enable NVMMU and linear submission queues which is required * since T6000. */ - writel(APPLE_ANS_LINEAR_SQ_EN, - anv->mmio_nvme + APPLE_ANS_LINEAR_SQ_CTRL); + if (anv->hw->keep_cc_fields) + writel(readl(anv->mmio_nvme + APPLE_ANS_LINEAR_SQ_CTRL) | + APPLE_ANS_LINEAR_SQ_EN, + anv->mmio_nvme + APPLE_ANS_LINEAR_SQ_CTRL); + else + writel(APPLE_ANS_LINEAR_SQ_EN, + anv->mmio_nvme + APPLE_ANS_LINEAR_SQ_CTRL); if (anv->hw->needs_ioq_registers) { u32 lsq_ctrl = readl(anv->mmio_nvme + APPLE_ANS_LINEAR_SQ_CTRL); @@ -1750,15 +1792,28 @@ static void apple_nvme_reset_work(struct work_struct *work) } /* Setup the admin queue */ - aqa = APPLE_NVME_AQ_DEPTH - 1; + aqa = apple_nvme_queue_depth(&anv->adminq) - 1; aqa |= aqa << 16; - writel(aqa, anv->mmio_nvme + NVME_REG_AQA); - apple_nvme_writeq(anv, anv->adminq.sq_dma_addr, - anv->mmio_nvme + NVME_REG_ASQ); - apple_nvme_writeq(anv, anv->adminq.cq_dma_addr, - anv->mmio_nvme + NVME_REG_ACQ); + if (anv->hw->keep_cc_fields) { + /* T6050: the loader's order, NVMMU TCB bases, ASQ, ACQ, then AQA. */ + apple_nvme_writeq(anv, anv->adminq.tcb_dma_addr, + anv->mmio_nvmmu + APPLE_NVMMU_ASQ_TCB_BASE); + apple_nvme_writeq(anv, anv->ioq.tcb_dma_addr, + anv->mmio_nvmmu + APPLE_NVMMU_IOSQ_TCB_BASE); + apple_nvme_writeq(anv, anv->adminq.sq_dma_addr, + anv->mmio_nvme + NVME_REG_ASQ); + apple_nvme_writeq(anv, anv->adminq.cq_dma_addr, + anv->mmio_nvme + NVME_REG_ACQ); + writel(aqa, anv->mmio_nvme + NVME_REG_AQA); + } else { + writel(aqa, anv->mmio_nvme + NVME_REG_AQA); + apple_nvme_writeq(anv, anv->adminq.sq_dma_addr, + anv->mmio_nvme + NVME_REG_ASQ); + apple_nvme_writeq(anv, anv->adminq.cq_dma_addr, + anv->mmio_nvme + NVME_REG_ACQ); + } - if (anv->hw->has_lsq_nvmmu) { + if (anv->hw->has_lsq_nvmmu && !anv->hw->keep_cc_fields) { /* Setup NVMMU for both queues */ apple_nvme_writeq(anv, anv->adminq.tcb_dma_addr, anv->mmio_nvmmu + APPLE_NVMMU_ASQ_TCB_BASE); @@ -1771,7 +1826,8 @@ static void apple_nvme_reset_work(struct work_struct *work) anv->ctrl.cap = readq(anv->mmio_nvme + NVME_REG_CAP); dev_dbg(anv->dev, "Enabling controller now"); - ret = nvme_enable_ctrl(&anv->ctrl); + ret = anv->hw->keep_cc_fields ? apple_nvme_enable_ctrl_keep_cc(anv) : + nvme_enable_ctrl(&anv->ctrl); if (ret) goto out; @@ -2388,6 +2444,14 @@ static struct apple_nvme *apple_nvme_alloc(struct platform_device *pdev) goto out_detach_genpd; } + /* + * The T6050 ANS firmware handed over by iBoot can take about 3 s to + * answer the power-state and endpoint-map handshake. + */ + if (of_device_is_compatible(dev->of_node, "apple,t6050-nvme-ans2")) + apple_rtkit_set_handshake_timeout(anv->rtk, + APPLE_NVME_T6050_HANDSHAKE_TIMEOUT_MS); + ret = devm_add_action_or_reset(dev, apple_nvme_free_rtkit, anv); if (ret) goto out_detach_genpd; @@ -2642,11 +2706,27 @@ static const struct apple_nvme_hw apple_nvme_t8140_hw = { .quirks = NVME_QUIRK_BROKEN_FUA, }; +/* T6050: T8140 queue setup, with the CC fields the firmware sets. */ +static const struct apple_nvme_hw apple_nvme_t6050_hw = { + .has_lsq_nvmmu = true, + .has_separate_nvmmu = true, + .needs_ioq_registers = true, + .max_queue_depth = 64, + /* + * An fsynced overwrite completed and later reverted after an abrupt + * reset; explicit flushes persisted the preceding data. Let the block + * layer follow each FUA write with a flush. + */ + .quirks = NVME_QUIRK_BROKEN_FUA, + .keep_cc_fields = true, +}; + static const struct of_device_id apple_nvme_of_match[] = { { .compatible = "apple,t8015-nvme-ans2", .data = &apple_nvme_t8015_hw }, { .compatible = "apple,t8103-nvme-ans2", .data = &apple_nvme_t8103_hw }, { .compatible = "apple,t8132-nvme-ans2", .data = &apple_nvme_t8132_hw }, { .compatible = "apple,t8140-nvme-ans2", .data = &apple_nvme_t8140_hw }, + { .compatible = "apple,t6050-nvme-ans2", .data = &apple_nvme_t6050_hw }, { .compatible = "apple,nvme-ans2", .data = &apple_nvme_t8103_hw }, {}, }; diff --git a/drivers/power/supply/macsmc-power.c b/drivers/power/supply/macsmc-power.c index aec59fe13483c4..e6c3687d94ab0d 100644 --- a/drivers/power/supply/macsmc-power.c +++ b/drivers/power/supply/macsmc-power.c @@ -970,10 +970,34 @@ static int macsmc_power_event(struct notifier_block *nb, unsigned long event, vo return NOTIFY_DONE; } +static int macsmc_read_identity(struct apple_smc *smc, smc_key key, + char *out, size_t capacity) +{ + struct apple_smc_key_info info; + int ret; + + if (!capacity) + return -EINVAL; + out[0] = '\0'; + ret = apple_smc_get_key_info(smc, key, &info); + if (ret < 0) + return ret; + if (!info.size || info.size >= capacity || !(info.flags & APPLE_SMC_READABLE)) + return -EINVAL; + /* SMC read requests must describe this key, not the destination buffer. */ + ret = apple_smc_read(smc, key, out, info.size); + if (ret != info.size) { + out[0] = '\0'; + return ret < 0 ? ret : -EIO; + } + out[info.size] = '\0'; + return 0; +} + static int macsmc_power_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct apple_smc *smc = dev_get_drvdata(pdev->dev.parent); + struct apple_smc *smc; struct power_supply_config psy_cfg = {}; struct apple_smc_key_info info; struct macsmc_power *power; @@ -986,6 +1010,9 @@ static int macsmc_power_probe(struct platform_device *pdev) enum power_supply_property *props; size_t nprops; + if (!dev->parent) + return dev_err_probe(dev, -ENODEV, "Missing SMC parent\n"); + smc = dev_get_drvdata(dev->parent); if (!smc) return -ENODEV; @@ -1000,11 +1027,18 @@ static int macsmc_power_probe(struct platform_device *pdev) return ret; dev_set_drvdata(dev, power); - INIT_WORK(&power->critical_work, macsmc_power_critical_work); + /* devm_work_autocancel() initialises critical_work */ ret = devm_work_autocancel(dev, &power->critical_work, macsmc_power_critical_work); if (ret) return ret; + /* + * Must be ready before the notifier is registered below: an SMC event + * can arrive as soon as it is, and re-initialising a work item that + * is already queued corrupts the workqueue. + */ + INIT_DELAYED_WORK(&power->dbg_log_work, macsmc_dbg_work); + /* * Check for battery presence. * B0AV is a fundamental key. @@ -1141,12 +1175,12 @@ static int macsmc_power_probe(struct platform_device *pdev) power->batt_desc.num_properties = nprops; /* Fetch identity strings */ - apple_smc_read(smc, SMC_KEY(BMDN), power->model_name, - sizeof(power->model_name) - 1); - apple_smc_read(smc, SMC_KEY(BMSN), power->serial_number, - sizeof(power->serial_number) - 1); - apple_smc_read(smc, SMC_KEY(BMDT), power->mfg_date, - sizeof(power->mfg_date) - 1); + macsmc_read_identity(smc, SMC_KEY(BMDN), power->model_name, + sizeof(power->model_name)); + macsmc_read_identity(smc, SMC_KEY(BMSN), power->serial_number, + sizeof(power->serial_number)); + macsmc_read_identity(smc, SMC_KEY(BMDT), power->mfg_date, + sizeof(power->mfg_date)); apple_smc_read_u8(power->smc, SMC_KEY(BNCB), &power->num_cells); power->nominal_voltage_mv = MACSMC_NOMINAL_CELL_VOLTAGE_MV * power->num_cells; @@ -1209,9 +1243,6 @@ static int macsmc_power_probe(struct platform_device *pdev) power->nb.notifier_call = macsmc_power_event; blocking_notifier_chain_register(&smc->event_handlers, &power->nb); - INIT_WORK(&power->critical_work, macsmc_power_critical_work); - INIT_DELAYED_WORK(&power->dbg_log_work, macsmc_dbg_work); - g_power = power; if (log_power) diff --git a/drivers/soc/apple/rtkit-helper.c b/drivers/soc/apple/rtkit-helper.c index 5f03bed772f264..d5d2b473219f21 100644 --- a/drivers/soc/apple/rtkit-helper.c +++ b/drivers/soc/apple/rtkit-helper.c @@ -169,7 +169,8 @@ static int apple_rtkit_helper_probe(struct platform_device *pdev) helper->asc_base + APPLE_ASC_CPU_CONTROL); /* Works for both wake and boot */ - if (of_device_is_compatible(dev->of_node, "apple,t8142-mtp")) + if (of_device_is_compatible(dev->of_node, "apple,t8142-mtp") || + of_device_is_compatible(dev->of_node, "apple,t6050-mtp")) ret = apple_rtkit_wake_early_ap(helper->rtk); else ret = apple_rtkit_wake(helper->rtk); diff --git a/drivers/soc/apple/rtkit-internal.h b/drivers/soc/apple/rtkit-internal.h index 417d4550ef3aeb..856b78d81fcd9d 100644 --- a/drivers/soc/apple/rtkit-internal.h +++ b/drivers/soc/apple/rtkit-internal.h @@ -47,6 +47,8 @@ struct apple_rtkit { int boot_result; int version; + /* How long to wait for each handshake reply from the co-processor. */ + unsigned int handshake_timeout_ms; unsigned int iop_power_state; unsigned int ap_power_state; diff --git a/drivers/soc/apple/rtkit.c b/drivers/soc/apple/rtkit.c index 11334b3f68faa5..314fb8b4408153 100644 --- a/drivers/soc/apple/rtkit.c +++ b/drivers/soc/apple/rtkit.c @@ -104,6 +104,9 @@ enum { #define APPLE_RTKIT_MIN_SUPPORTED_VERSION 11 #define APPLE_RTKIT_MAX_SUPPORTED_VERSION 12 +/* Default wait for each handshake reply, see apple_rtkit_set_handshake_timeout() */ +#define APPLE_RTKIT_HANDSHAKE_TIMEOUT_MS 1000 + struct apple_rtkit_rx_work { struct apple_rtkit *rtk; u8 ep; @@ -190,7 +193,13 @@ static void apple_rtkit_management_rx_hello(struct apple_rtkit *rtk, u64 msg) static void apple_rtkit_management_rx_epmap(struct apple_rtkit *rtk, u64 msg) { - int i, ep, ret; + /* T6050: the system endpoints start in the loader's order, 3 1 2 4 8. */ + static const u8 t6050_order[] = { APPLE_RTKIT_EP_DEBUG, APPLE_RTKIT_EP_CRASHLOG, + APPLE_RTKIT_EP_SYSLOG, APPLE_RTKIT_EP_IOREPORT, + APPLE_RTKIT_EP_OSLOG }; + bool loader_order = of_machine_is_compatible("apple,t6050"); + int count = loader_order ? ARRAY_SIZE(t6050_order) : APPLE_RTKIT_APP_ENDPOINT_START; + int i, oi, ep, ret; u64 reply; unsigned long bitmap = FIELD_GET(APPLE_RTKIT_MGMT_EPMAP_BITMAP, msg); u32 base = FIELD_GET(APPLE_RTKIT_MGMT_EPMAP_BASE, msg); @@ -230,7 +239,10 @@ static void apple_rtkit_management_rx_epmap(struct apple_rtkit *rtk, u64 msg) if (!(msg & APPLE_RTKIT_MGMT_EPMAP_LAST)) return; - for_each_set_bit(ep, rtk->endpoints, APPLE_RTKIT_APP_ENDPOINT_START) { + for (oi = 0; oi < count; oi++) { + ep = loader_order ? t6050_order[oi] : oi; + if (!test_bit(ep, rtk->endpoints)) + continue; switch (ep) { /* the management endpoint is started by default */ case APPLE_RTKIT_EP_MGMT: @@ -756,7 +768,8 @@ static void apple_rtkit_oslog_rx(struct apple_rtkit *rtk, u64 msg) /* Preserve the tested Neo/M5 and synchronous-log no-ACK policy. */ if (type == APPLE_RTKIT_OSLOG_LOG && (rtk->sync_syslog_ack || of_machine_is_compatible("apple,t8140") || - of_machine_is_compatible("apple,t8142"))) { + of_machine_is_compatible("apple,t8142") || + of_machine_is_compatible("apple,t6050"))) { dev_dbg(rtk->dev, "RTKit: oslog notification: %016llx\n", msg); return; } @@ -1128,6 +1141,7 @@ static struct apple_rtkit *__apple_rtkit_init(struct device *dev, void *cookie, rtk->dev = dev; rtk->cookie = cookie; rtk->ops = ops; + rtk->handshake_timeout_ms = APPLE_RTKIT_HANDSHAKE_TIMEOUT_MS; rtk->sync_syslog_ack = of_property_read_bool(dev->of_node, "apple,sync-syslog-ack"); INIT_KFIFO(rtk->sync_ack_fifo); @@ -1198,7 +1212,8 @@ struct apple_rtkit *apple_rtkit_init_adopted(struct device *dev, void *cookie, } EXPORT_SYMBOL_GPL(apple_rtkit_init_adopted); -static int apple_rtkit_wait_for_completion(struct completion *c); +static int apple_rtkit_wait_for_completion(struct apple_rtkit *rtk, + struct completion *c); /* * apple,sync-syslog-ack (AsahiLinux/linux#607): the mailbox can leave @@ -1212,9 +1227,9 @@ static int apple_rtkit_wait(struct apple_rtkit *rtk, struct completion *c) int ret; if (!rtk->sync_syslog_ack) - return apple_rtkit_wait_for_completion(c); + return apple_rtkit_wait_for_completion(rtk, c); - timeout = jiffies + msecs_to_jiffies(1000); + timeout = jiffies + msecs_to_jiffies(rtk->handshake_timeout_ms); do { ret = apple_rtkit_poll(rtk); if (ret < 0) @@ -1232,12 +1247,13 @@ static int apple_rtkit_wait(struct apple_rtkit *rtk, struct completion *c) return try_wait_for_completion(c) ? 0 : -ETIME; } -static int apple_rtkit_wait_for_completion(struct completion *c) +static int apple_rtkit_wait_for_completion(struct apple_rtkit *rtk, + struct completion *c) { + unsigned long timeout = msecs_to_jiffies(rtk->handshake_timeout_ms); long t; - t = wait_for_completion_interruptible_timeout(c, - msecs_to_jiffies(1000)); + t = wait_for_completion_interruptible_timeout(c, timeout); if (t < 0) return t; else if (t == 0) @@ -1246,6 +1262,13 @@ static int apple_rtkit_wait_for_completion(struct completion *c) return 0; } +void apple_rtkit_set_handshake_timeout(struct apple_rtkit *rtk, + unsigned int timeout_ms) +{ + rtk->handshake_timeout_ms = timeout_ms ?: APPLE_RTKIT_HANDSHAKE_TIMEOUT_MS; +} +EXPORT_SYMBOL_GPL(apple_rtkit_set_handshake_timeout); + int apple_rtkit_reinit(struct apple_rtkit *rtk) { unsigned long flags; @@ -1313,6 +1336,18 @@ static int apple_rtkit_set_ap_power_state(struct apple_rtkit *rtk, if (ret) return ret; + /* + * T6050: the loader never waits for this acknowledgment, and not every + * coprocessor sends it. Give it a short window so a caller that starts an + * endpoint right away (macsmc) sees the AP state; carry on without it. + */ + if (of_machine_is_compatible("apple,t6050")) { + if (!wait_for_completion_timeout(&rtk->ap_pwr_ack_completion, + msecs_to_jiffies(200))) + dev_dbg(rtk->dev, "RTKit: no AP power state ACK\n"); + return 0; + } + ret = apple_rtkit_wait(rtk, &rtk->ap_pwr_ack_completion); if (ret) return ret; @@ -1379,6 +1414,28 @@ static int apple_rtkit_boot_common(struct apple_rtkit *rtk, bool early_ap_power) return ret; } + /* + * T6050: the loader only proceeds once the IOP reports ON, and + * intermediate states can be acknowledged first. Wait for ON here too. + */ + if (of_machine_is_compatible("apple,t6050")) { + int tries = 10; + + while ((rtk->iop_power_state & 0xff) != APPLE_RTKIT_PWR_STATE_ON && tries--) { + dev_dbg(rtk->dev, "RTKit: IOP power state 0x%x, waiting for ON\n", + rtk->iop_power_state); + reinit_completion(&rtk->iop_pwr_ack_completion); + if ((rtk->iop_power_state & 0xff) == APPLE_RTKIT_PWR_STATE_ON) + break; + ret = apple_rtkit_wait(rtk, &rtk->iop_pwr_ack_completion); + if (ret) { + dev_err(rtk->dev, "RTKit: IOP never reached ON (state 0x%x): %d\n", + rtk->iop_power_state, ret); + return ret; + } + } + } + return early_ap_power ? 0 : apple_rtkit_set_ap_power_state(rtk, APPLE_RTKIT_PWR_STATE_ON); } diff --git a/drivers/soc/apple/sart.c b/drivers/soc/apple/sart.c index b0b208c92741dc..e2450cbfa09bc4 100644 --- a/drivers/soc/apple/sart.c +++ b/drivers/soc/apple/sart.c @@ -62,6 +62,18 @@ #define APPLE_SART3_FLAGS_ALLOW 0xff +/* SARTv4: the T6050 layout, config at 0x00, paddr at 0x60, size at 0xc0 */ +#define APPLE_SART4_CONFIG(idx) (0x00 + 4 * (idx)) + +#define APPLE_SART4_PADDR(idx) (0x60 + 4 * (idx)) +#define APPLE_SART4_PADDR_SHIFT 12 + +#define APPLE_SART4_SIZE(idx) (0xc0 + 4 * (idx)) +#define APPLE_SART4_SIZE_SHIFT 12 +#define APPLE_SART4_SIZE_MAX GENMASK(29, 0) + +#define APPLE_SART4_FLAGS_ALLOW 0xff + struct apple_sart_ops { void (*get_entry)(struct apple_sart *sart, int index, u8 *flags, phys_addr_t *paddr, size_t *size); @@ -178,6 +190,34 @@ static struct apple_sart_ops sart_ops_v3 = { .size_max = APPLE_SART3_SIZE_MAX, }; +static void sart4_get_entry(struct apple_sart *sart, int index, u8 *flags, + phys_addr_t *paddr, size_t *size) +{ + phys_addr_t paddr_ = readl(sart->regs + APPLE_SART4_PADDR(index)); + size_t size_ = readl(sart->regs + APPLE_SART4_SIZE(index)); + + *flags = readl(sart->regs + APPLE_SART4_CONFIG(index)); + *size = size_ << APPLE_SART4_SIZE_SHIFT; + *paddr = paddr_ << APPLE_SART4_PADDR_SHIFT; +} + +static void sart4_set_entry(struct apple_sart *sart, int index, u8 flags, + phys_addr_t paddr_shifted, size_t size_shifted) +{ + writel(paddr_shifted, sart->regs + APPLE_SART4_PADDR(index)); + writel(size_shifted, sart->regs + APPLE_SART4_SIZE(index)); + writel(flags, sart->regs + APPLE_SART4_CONFIG(index)); +} + +static struct apple_sart_ops sart_ops_v4 = { + .get_entry = sart4_get_entry, + .set_entry = sart4_set_entry, + .flags_allow = APPLE_SART4_FLAGS_ALLOW, + .size_shift = APPLE_SART4_SIZE_SHIFT, + .paddr_shift = APPLE_SART4_PADDR_SHIFT, + .size_max = APPLE_SART4_SIZE_MAX, +}; + static int apple_sart_probe(struct platform_device *pdev) { int i; @@ -372,6 +412,10 @@ static void apple_sart_shutdown(struct platform_device *pdev) } static const struct of_device_id apple_sart_of_match[] = { + { + .compatible = "apple,t6050-sart", + .data = &sart_ops_v4, + }, { .compatible = "apple,t6000-sart", .data = &sart_ops_v3, diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h index 1ba27a92e2b144..a90ceb0de2757b 100644 --- a/include/linux/soc/apple/rtkit.h +++ b/include/linux/soc/apple/rtkit.h @@ -155,6 +155,18 @@ void apple_rtkit_free_retaining_buffers(struct apple_rtkit *rtk); */ int apple_rtkit_reinit(struct apple_rtkit *rtk); +/* + * Set how long each handshake step (power state and endpoint map replies) + * waits for the co-processor, for one that is known to answer slowly. Call + * before apple_rtkit_boot() or apple_rtkit_wake(). Zero restores the default + * of 1000 ms. + * + * @rtk: Internal RTKit state initialized by apple_rtkit_init() + * @timeout_ms: Timeout in milliseconds + */ +void apple_rtkit_set_handshake_timeout(struct apple_rtkit *rtk, + unsigned int timeout_ms); + /* * Handle RTKit's boot process. Should be called after the CPU of the * co-processor has been started.