Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/apple,pmp-v1-report-entry.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple PMPv1 Report Entry Power Domains

maintainers:
- Didi Nuk <dev@ydnuk.com>

description:
Apple PMPv1 report-entry nodes expose individual PMP-managed resources as
generic power domains. The PMP driver requires a report-entry node for each
SoC-specific PMP-managed resource.

properties:
compatible:
const: apple,t8103-pmp-v1-report-entry

reg:
maxItems: 1

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

power-domains:
maxItems: 1

label:
description:
Specifies the name of the SoC report entry domain. This is used to
name the report entry domains.

apple,always-on:
description:
Forces this power domain to always be powered up.
type: boolean

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

additionalProperties: false
76 changes: 76 additions & 0 deletions Documentation/devicetree/bindings/power/apple,pmp-v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/power/apple,pmp-v1.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple PMPv1 Power Domains

maintainers:
- Didi Nuk <dev@ydnuk.com>

description:
Apple PMPv1 power domains are controlled by the Apple Power Management
Processor (PMP).

properties:
compatible:
const: apple,t8103-pmp-v1

reg:
maxItems: 2

reg-names:
items:
- const: pmp
- const: asc

mboxes:
maxItems: 1

mbox-names:
items:
- const: mbox

iommus:
maxItems: 1

"#address-cells":
const: 1

"#size-cells":
const: 0

power-domains:
maxItems: 1

apple,init-ranges:
description:
List of PMP memory regions, represented as address and size pairs for
initializing PMP.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2

apple,init-dva:
description:
List of device virtual address with count pairs for initializing PMP.
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 2

required:
- compatible
- reg
- reg-names
- mboxes
- mbox-names
- "#address-cells"
- "#size-cells"
- iommus
- apple,init-ranges
- apple,init-dva

patternProperties:
"^report@[0-9a-f]+$":
$ref: apple,pmp-v1-report-entry.yaml#

additionalProperties: false
222 changes: 217 additions & 5 deletions arch/arm64/boot/dts/apple/t8103.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

aliases {
gpu = &gpu;
pmp = &pmp;
};

cpus {
Expand Down Expand Up @@ -480,7 +481,7 @@
<0x2 0x4000000 0 0x1000000>;
reg-names = "asc", "sgx";
mboxes = <&agx_mbox>;
power-domains = <&ps_gfx>;
power-domains = <&pmp_report_gfx>;
memory-region = <&uat_ttbs>, <&uat_pagetables>, <&uat_handoff>,
<&gpu_hw_cal_a>, <&gpu_hw_cal_b>, <&gpu_globals>;
memory-region-names = "ttbs", "pagetables", "handoff",
Expand Down Expand Up @@ -553,7 +554,7 @@
reg = <0x2 0x28200000 0x0 0xc000>,
<0x2 0x28400000 0x0 0x4000>;
reg-names = "be", "fe";
power-domains = <&ps_dispdfr_fe>, <&ps_dispdfr_be>;
power-domains = <&pmp_report_dispdfr>, <&ps_dispdfr_be>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 502 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 506 IRQ_TYPE_LEVEL_HIGH>;
Expand Down Expand Up @@ -660,7 +661,7 @@
apple,bw-scratch = <&pmgr_dcp 0 5 0x14>;
apple,bw-doorbell = <&pmgr_dcp 1 6>;
apple,iomfb-surfaces = <1 1 0 0>;
power-domains = <&ps_disp0_cpu0>;
power-domains = <&pmp_report_disp0>;
resets = <&ps_disp0_cpu0>;
clocks = <&clk_disp0>;
phandle = <&dcp>;
Expand Down Expand Up @@ -736,7 +737,7 @@
<0x2 0x2c1043f0 0x0 0x100>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 246 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&ps_isp_sys>, <&ps_isp_set0>,
power-domains = <&pmp_report_isp_sys>, <&ps_isp_set0>,
<&ps_isp_set1>, <&ps_isp_set2>, <&ps_isp_fe>,
<&ps_isp_set4>, <&ps_isp_set5>, <&ps_isp_set6>,
<&ps_isp_set7>, <&ps_isp_set8>, <&ps_isp_set9>,
Expand Down Expand Up @@ -1061,6 +1062,218 @@
#apple,bw-doorbell-cells = <2>;
};

pmp_dart: iommu@23b300000 {
compatible = "apple,t8103-dart";
reg = <0x2 0x3b300000 0x0 0x4000>;
#iommu-cells = <1>;
interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 515 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&ps_pmp>;
};

pmp_mbox: mbox@23bc08000 {
compatible = "apple,t8103-asc-mailbox", "apple,asc-mailbox-v4";
reg = <0x2 0x3bc08000 0x0 0x4000>;
interrupt-parent = <&aic>;

interrupts = <AIC_IRQ 511 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 512 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 513 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 514 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "send-empty", "send-not-empty",
"recv-empty", "recv-not-empty";
#mbox-cells = <0>;
power-domains = <&ps_pmp>, <&ps_pms_sram>;
};

pmp: pmp@23b850000 {
compatible = "apple,t8103-pmp-v1";
reg = <0x2 0x3b850000 0x0 0x200000>,
<0x2 0x3bc00000 0x0 0x60000>;
reg-names = "pmp", "asc";
power-domains = <&ps_pmp>;

mboxes = <&pmp_mbox>;
mbox-names = "mbox";
#address-cells = <1>;
#size-cells = <0>;
iommus = <&pmp_dart 0>;

apple,init-ranges = <0x00024000 0x4000>,
<0x00064000 0x4000>,
<0x000a4000 0x4000>,
<0x000e4000 0x4000>,
<0x00158000 0x4000>,
<0x00204000 0x4000>,
<0x00244000 0x4000>,
<0x00284000 0x4000>,
<0x002c4000 0x4000>,
<0x00000000 0x0000>,
<0x00000000 0x0000>,
<0x00000000 0x0000>,
<0x00000000 0x0000>,
<0x00000000 0x0000>,
<0x04d10000 0x4000>,
<0x10058000 0x4000>,
<0x10158000 0x4000>,
<0x10258000 0x4000>,
<0x10358000 0x4000>,
<0x10e20000 0x60000>,
<0x10e48000 0x4000>,
<0x11058000 0x4000>,
<0x11158000 0x4000>,
<0x11258000 0x4000>,
<0x11358000 0x4000>,
<0x11e20000 0x60000>,
<0x11e48000 0x4000>,
<0x3d100000 0x14000>,
<0x3d128000 0x30000>,
<0x3d0d8000 0x4000>,
<0x6b90c000 0x4000>,
<0x00000000 0x0000>,
<0x00170000 0x4000>,
<0x00000000 0x0000>,
<0x3c100000 0x4000>,
<0x04e20000 0x4000>,
<0x11ee0000 0x8000>,
<0x11ee8000 0x8000>,
<0x11ef0000 0x8000>,
<0x10ee0000 0x8000>,
<0x04d80000 0x8000>;

apple,init-dva = <0xc0000000 0xe>,
<0xc1000000 1>,
<0xc2000000 6>,
<0xc3000000 6>,
<0xc4000000 3>,
<0xc5000000 2>,
<0xc0024000 2>,
<0xc6000000 1>,
<0xc1004000 1>,
<0xc3074000 3>,
<0xc2074000 1>,
<0xc1008000 1>;

pmp_report_gfx: report@99 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-gfx";
reg = <99>;
#power-domain-cells = <0>;
power-domains = <&ps_gfx>;
};

pmp_report_ane_sys: report@104 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-ane-sys";
reg = <104>;
#power-domain-cells = <0>;
power-domains = <&ps_ane_sys>;
status = "disabled";
};

pmp_report_isp_sys: report@100 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-isp-sys";
reg = <0x64>;
#power-domain-cells = <0>;
power-domains = <&ps_isp_sys>;
};

pmp_report_disp0: report@84 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-disp0";
reg = <84>;
#power-domain-cells = <0>;
power-domains = <&ps_disp0_cpu0>;
apple,always-on;
};

pmp_report_dispext: report@85 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-dispext";
reg = <0x55>;
#power-domain-cells = <0>;
power-domains = <&ps_dispext_cpu0>;
};

pmp_report_venc_sys: report@101 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-venc-sys";
reg = <101>;
#power-domain-cells = <0>;
power-domains = <&ps_venc_sys>;
status = "disabled";
};

pmp_report_avd_sys: report@102 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-avd-sys";
reg = <102>;
#power-domain-cells = <0>;
power-domains = <&ps_avd_sys>;
status = "disabled";
};

pmp_report_msr: report@93 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-msr";
reg = <0x5d>;
#power-domain-cells = <0>;
power-domains = <&ps_msr>;
status = "disabled";
};

pmp_report_jpg: report@92 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-jpg";
reg = <0x5c>;
#power-domain-cells = <0>;
power-domains = <&ps_jpg>;
status = "disabled";
};

pmp_report_dispdfr: report@219 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-dispdfr";
reg = <219>;
#power-domain-cells = <0>;
power-domains = <&ps_dispdfr_fe>;
};

pmp_report_atc0_pcie: report@e {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-atc0_pcie";
reg = <0xe>;
#power-domain-cells = <0>;
power-domains = <&ps_atc0_pcie>;
status = "disabled";
};

pmp_report_atc1_pcie: report@62 {
compatible = "apple,t8103-pmp-v1-report-entry";
label = "pmp-atc1_pcie";
reg = <0x3e>;
#power-domain-cells = <0>;
power-domains = <&ps_atc1_pcie>;
status = "disabled";
};

// pmp_report_atc0_pcie_v: report@10 {
// compatible = "apple,t8103-pmp-v1-report-entry";
// label = "pmp-atc0_pcie-v";
// #power-domain-cells = <0>;
// power-domains = <&ps_atc0_pcie_v>;
// };

// pmp_report_atc1_pcie_v: report@11 {
// compatible = "apple,t8103-pmp-v1-report-entry";
// label = "pmp-atc1_pcie-v";
// #power-domain-cells = <0>;
// power-domains = <&ps_atc1_pcie_v>;
// };

};

pinctrl_ap: pinctrl@23c100000 {
compatible = "apple,t8103-pinctrl", "apple,pinctrl";
reg = <0x2 0x3c100000 0x0 0x100000>;
Expand Down Expand Up @@ -1712,7 +1925,6 @@
msi-parent = <&pcie0>;
msi-ranges = <&aic AIC_IRQ 704 IRQ_TYPE_EDGE_RISING 32>;


iommu-map = <0x100 &pcie0_dart_0 1 1>,
<0x200 &pcie0_dart_1 1 1>,
<0x300 &pcie0_dart_2 1 1>;
Expand Down
Loading