diff --git a/arch/arm64/boot/dts/apple/t6020.dtsi b/arch/arm64/boot/dts/apple/t6020.dtsi index 9cc0b75b42c531..500726e697a894 100644 --- a/arch/arm64/boot/dts/apple/t6020.dtsi +++ b/arch/arm64/boot/dts/apple/t6020.dtsi @@ -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"; diff --git a/arch/arm64/boot/dts/apple/t6021.dtsi b/arch/arm64/boot/dts/apple/t6021.dtsi index 44c3b09ad46c51..bb0e66851f1b59 100644 --- a/arch/arm64/boot/dts/apple/t6021.dtsi +++ b/arch/arm64/boot/dts/apple/t6021.dtsi @@ -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"; diff --git a/arch/arm64/boot/dts/apple/t6022.dtsi b/arch/arm64/boot/dts/apple/t6022.dtsi index 788bbf078f3894..fe065d48726a3d 100644 --- a/arch/arm64/boot/dts/apple/t6022.dtsi +++ b/arch/arm64/boot/dts/apple/t6022.dtsi @@ -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", diff --git a/arch/arm64/boot/dts/apple/t602x-die0.dtsi b/arch/arm64/boot/dts/apple/t602x-die0.dtsi index 4d91bfa1d34232..c0c0626249a5a6 100644 --- a/arch/arm64/boot/dts/apple/t602x-die0.dtsi +++ b/arch/arm64/boot/dts/apple/t602x-die0.dtsi @@ -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"; @@ -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 { @@ -965,11 +958,7 @@ , ; 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", diff --git a/arch/arm64/boot/dts/apple/t602x-pmgr.dtsi b/arch/arm64/boot/dts/apple/t602x-pmgr.dtsi index b9233f252e6ca7..4ead781fea6893 100644 --- a/arch/arm64/boot/dts/apple/t602x-pmgr.dtsi +++ b/arch/arm64/boot/dts/apple/t602x-pmgr.dtsi @@ -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 { @@ -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 { diff --git a/drivers/soc/apple/pmp.rs b/drivers/soc/apple/pmp.rs index 8a5df41166a814..10524b2d19794b 100644 --- a/drivers/soc/apple/pmp.rs +++ b/drivers/soc/apple/pmp.rs @@ -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::(prop_name)? / 2; let ranges = node .property_read_array_vec::(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) })?;