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
11 changes: 0 additions & 11 deletions arch/arm64/boot/dts/apple/t6020.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@
/delete-node/ &pmp_report_afnc4_ioa;
/delete-node/ &pmp_report_afnc5_ioa;

&pmp {
apple,pio-ranges = <0x2 0x80000000 0x0 0x1000000>,
<0x3 0x0 0x0 0x1000000>,
<0x3 0x80000000 0x0 0x1000000>,
<0x4 0x0 0x0 0x1000000>,
<0x3 0x40000000 0x0 0x1000000>,
<0x2 0x10e70000 0x0 0x90000>,
<0x2 0x11e70000 0x0 0x90000>,
<0x2 0x12e70000 0x0 0x90000>;
};

&gpu {
compatible = "apple,agx-t6020", "apple,agx-g14x", "apple,agx-g14s";

Expand Down
13 changes: 0 additions & 13 deletions arch/arm64/boot/dts/apple/t6021.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,6 @@
};
};

&pmp {
apple,pio-ranges = <0x2 0x80000000 0x0 0x1000000>,
<0x3 0x0 0x0 0x1000000>,
<0x3 0x80000000 0x0 0x1000000>,
<0x4 0x0 0x0 0x1000000>,
<0x3 0x40000000 0x0 0x1000000>,
<0x2 0x10e70000 0x0 0x90000>,
<0x2 0x11e70000 0x0 0x90000>,
<0x2 0x12e70000 0x0 0x90000>,
<0x4 0x80000000 0x0 0x1000000>,
<0x5 0x0 0x0 0x1000000>;
};

&gpu {
compatible = "apple,agx-t6021", "apple,agx-g14x", "apple,agx-g14c", "apple,agx-g14s";

Expand Down
23 changes: 0 additions & 23 deletions arch/arm64/boot/dts/apple/t6022.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -359,29 +359,6 @@
power-domains = <&ps_afr>, <&ps_afr_die1>;
};

&pmp {
apple,pio-ranges = <0x2 0x80000000 0x0 0x1000000>,
<0x3 0x0 0x0 0x1000000>,
<0x3 0x80000000 0x0 0x1000000>,
<0x4 0x0 0x0 0x1000000>,
<0x3 0x40000000 0x0 0x1000000>,
<0x2 0x10e70000 0x0 0x90000>,
<0x2 0x11e70000 0x0 0x90000>,
<0x2 0x12e70000 0x0 0x90000>,
<0x4 0x80000000 0x0 0x1000000>,
<0x5 0x0 0x0 0x1000000>,
<0x22 0x80000000 0x0 0x1000000>,
<0x23 0x0 0x0 0x1000000>,
<0x23 0x80000000 0x0 0x1000000>,
<0x24 0x0 0x0 0x1000000>,
<0x23 0x40000000 0x0 0x1000000>,
<0x24 0x80000000 0x0 0x1000000>,
<0x25 0x0 0x0 0x1000000>,
<0x22 0x10e70000 0x0 0x90000>,
<0x22 0x11e70000 0x0 0x90000>,
<0x22 0x12e70000 0x0 0x90000>;
};

&pmp_report {
pmp_report_dispext0_die1: report@1f {
compatible = "apple,t6020-pmp-v2-report-entry",
Expand Down
17 changes: 3 additions & 14 deletions arch/arm64/boot/dts/apple/t602x-die0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@
#address-cells = <1>;
#size-cells = <0>;

pmp_report_gfx: report@a {
compatible = "apple,t6020-pmp-v2-report-entry",
"apple,t6000-pmp-v2-report-entry";
reg = <0xa>;
label = "pmp-gfx";
#power-domain-cells = <0>;
power-domains = <&ps_gfx>;
};

pmp_report_ane_sys: report@b {
compatible = "apple,t6020-pmp-v2-report-entry",
"apple,t6000-pmp-v2-report-entry";
Expand Down Expand Up @@ -94,15 +85,17 @@
label = "pmp-dispext0";
#power-domain-cells = <0>;
power-domains = <&ps_dispext0_cpu0>;
apple,always-on;
};

pmp_report_dispext1: report@f {
compatible = "apple,t6020-pmp-v2-report-entry",
"apple,t6000-pmp-v2-report-entry";
reg = <0xe>;
reg = <0xf>;
label = "pmp-dispext1";
#power-domain-cells = <0>;
power-domains = <&ps_dispext1_cpu0>;
apple,always-on;
};

pmp_report_venc_sys: report@10 {
Expand Down Expand Up @@ -965,11 +958,7 @@
<AIC_IRQ 0 1149 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 0 1142 IRQ_TYPE_LEVEL_HIGH>;
mboxes = <&agx_mbox>;
#ifdef APPLE_USE_PMP
power-domains = <&pmp_report_gfx>;
#else
power-domains = <&ps_gfx>;
#endif
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
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/apple/t602x-pmgr.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = DIE_LABEL(pmp);
apple,always-on;
};

DIE_NODE(ps_pms_sram): power-controller@2d0 {
Expand All @@ -462,6 +463,7 @@
#power-domain-cells = <0>;
#reset-cells = <0>;
label = DIE_LABEL(pms_sram);
apple,always-on;
};

DIE_NODE(ps_dispext0_cpu0): power-controller@2d8 {
Expand Down
10 changes: 4 additions & 6 deletions drivers/soc/apple/pmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,13 @@ impl PmpData {
let node = self.dev.fwnode().ok_or(EIO)?;
let mut pio_base = PIO_VM_BASE;
let prop_name = c"apple,pio-ranges";
if !node.property_present(prop_name) {
return Ok((OPC_GET_IOVA_TABLE | OPC_ACK_MASK) << OPC_SHIFT);
}
let n_entries = node.property_count_elem::<u64>(prop_name)? / 2;
let ranges = node
.property_read_array_vec::<u64>(prop_name, n_entries * 2)?
.optional();
let ranges = if let Some(r) = ranges {
r
} else {
return Ok((OPC_GET_IOVA_TABLE | OPC_ACK_MASK) << OPC_SHIFT);
};
.required_by(&self.dev)?;
let mut table = self.dev.while_bound_with(|bound_dev| {
CoherentAllocation::alloc_coherent(bound_dev, 512, GFP_KERNEL)
})?;
Expand Down