From 9f34c31456e9e451d86a1f480f9e3f818a2f1cfa Mon Sep 17 00:00:00 2001 From: Mayank Grover Date: Mon, 9 Nov 2020 16:01:00 +0530 Subject: [PATCH 1/2] ARM: dts: msm: Change the node location for optimise Optimise for boot up time since it will use special node and dt property before unflat and put those in the beginning of the device tree can make it search fast. Change-Id: I655c0ff8ac720c16b61da680b8e389585b5a01a6 --- qcom/holi.dtsi | 341 +++++++++++++++++++++++++------------------------ 1 file changed, 172 insertions(+), 169 deletions(-) diff --git a/qcom/holi.dtsi b/qcom/holi.dtsi index e106fc3161c4..9487018bbdad 100644 --- a/qcom/holi.dtsi +++ b/qcom/holi.dtsi @@ -22,7 +22,13 @@ #address-cells = <2>; #size-cells = <2>; + + chosen { + bootargs = "log_buf_len=256K rcupdate.rcu_expedited=1 rcu_nocbs=0-7 kpti=off"; + }; + memory { device_type = "memory"; reg = <0 0 0 0>; }; + reserved_memory: reserved-memory { }; mem-offline { compatible = "qcom,mem-offline"; @@ -238,173 +244,6 @@ }; }; - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - hyp_mem: hyp@80000000 { - no-map; - reg = <0x0 0x80000000 0x0 0x600000>; - }; - - xbl_aop_mem: xbl_aop_mem@80700000 { - no-map; - reg = <0x0 0x80700000 0x0 0x160000>; - }; - - cmd_db: reserved-memory@80860000 { - no-map; - reg = <0x0 0x80860000 0x0 0x20000>; - }; - - smem_mem: smem@80900000 { - no-map; - reg = <0x0 0x80900000 0x0 0x200000>; - }; - - fw_mem: fw_mem@80b00000 { - no-map; - reg = <0x0 0x80b00000 0x0 0x100000>; - }; - - cdsp_secure_heap_mem: cdsp_secure_heap_mem@80c00000 { - no-map; - reg = <0x0 0x80c00000 0x0 0x4600000>; - }; - - pil_wlan_mem: wlan@86500000 { - no-map; - reg = <0x0 0x86500000 0x0 0x200000>; - }; - - pil_adsp_mem: adsp@86700000 { - no-map; - reg = <0x0 0x86700000 0x0 0x2800000>; - }; - - pil_cdsp_mem: cdsp@88f00000 { - no-map; - reg = <0x0 0x88f00000 0x0 0x1e00000>; - }; - - pil_camera_mem: camera@8ad00000 { - no-map; - reg = <0x0 0x8ad00000 0x0 0x500000>; - }; - - pil_video_mem: video@8b200000 { - no-map; - reg = <0x0 0x8b200000 0x0 0x500000>; - }; - - pil_ipa_fw_mem: ipa_fw@8b700000 { - no-map; - reg = <0x0 0x8b700000 0x0 0x10000>; - }; - - pil_ipa_gsi_mem: ipa_gsi@8b710000 { - no-map; - reg = <0x0 0x8b710000 0x0 0xa000>; - }; - - pil_gpu_micro_code_mem: gpu_micro_code@8b71a000 { - no-map; - reg = <0x0 0x8b71a000 0x0 0x2000>; - }; - - pil_mpss_wlan_mem: mpss_wlan@8b800000 { - no-map; - reg = <0x0 0x8b800000 0x0 0x10000000>; - }; - - removed_mem: removed_region@c0000000 { - no-map; - reg = <0x0 0xc0000000 0x0 0x5100000>; - }; - - secure_display_memory: secure_display_region { - compatible = "shared-dma-pool"; - alloc-ranges = <0 0x00000000 0 0xffffffff>; - reusable; - alignment = <0 0x400000>; - size = <0 0x5c00000>; - }; - - dump_mem: mem_dump_region { - compatible = "shared-dma-pool"; - alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; - reusable; - size = <0 0x800000>; - }; - - splash_memory: splash_region@0x85200000 { - reg = <0x0 0x85200000 0x0 0x00c00000>; - label = "cont_splash_region"; - }; - - dfps_data_memory: dfps_data_region@85e00000 { - reg = <0x0 0x85e00000 0x0 0x00100000>; - label = "dfps_data_region"; - }; - - qcom: ramoops { - compatible = "ramoops"; - reg = <0x0 0xd0000000 0x0 0x200000>; - pmsg-size = <0x200000>; - mem-type = <2>; - }; - - /* global autoconfigured region for contiguous allocations */ - linux,cma { - compatible = "shared-dma-pool"; - alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; - reusable; - alignment = <0x0 0x400000>; - size = <0x0 0x2000000>; - linux,cma-default; - }; - - adsp_mem: adsp_region { - compatible = "shared-dma-pool"; - alloc-ranges = <0 0x00000000 0 0xffffffff>; - reusable; - alignment = <0 0x400000>; - size = <0 0x800000>; - }; - - user_contig_mem: user_contig_region { - compatible = "shared-dma-pool"; - alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; - reusable; - alignment = <0x0 0x400000>; - size = <0x0 0x1000000>; - }; - - qseecom_mem: qseecom_region { - compatible = "shared-dma-pool"; - alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; - reusable; - alignment = <0x0 0x400000>; - size = <0x0 0x1400000>; - }; - - qseecom_ta_mem: qseecom_ta_region { - compatible = "shared-dma-pool"; - alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; - reusable; - alignment = <0x0 0x400000>; - size = <0x0 0x1000000>; - }; - - memshare_mem: memshare_region { - compatible = "shared-dma-pool"; - no-map; - alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; - alignment = <0x0 0x100000>; - size = <0x0 0x800000>; - }; - }; soc: soc { }; @@ -446,9 +285,173 @@ reg = <0x0 0x0 0x0 0x80>; }; }; +}; - chosen { - bootargs = "log_buf_len=256K rcupdate.rcu_expedited=1 rcu_nocbs=0-7 kpti=off"; +&reserved_memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + hyp_mem: hyp@80000000 { + no-map; + reg = <0x0 0x80000000 0x0 0x600000>; + }; + + xbl_aop_mem: xbl_aop_mem@80700000 { + no-map; + reg = <0x0 0x80700000 0x0 0x160000>; + }; + + cmd_db: reserved-memory@80860000 { + no-map; + reg = <0x0 0x80860000 0x0 0x20000>; + }; + + smem_mem: smem@80900000 { + no-map; + reg = <0x0 0x80900000 0x0 0x200000>; + }; + + fw_mem: fw_mem@80b00000 { + no-map; + reg = <0x0 0x80b00000 0x0 0x100000>; + }; + + cdsp_secure_heap_mem: cdsp_secure_heap_mem@80c00000 { + no-map; + reg = <0x0 0x80c00000 0x0 0x4600000>; + }; + + pil_wlan_mem: wlan@86500000 { + no-map; + reg = <0x0 0x86500000 0x0 0x200000>; + }; + + pil_adsp_mem: adsp@86700000 { + no-map; + reg = <0x0 0x86700000 0x0 0x2800000>; + }; + + pil_cdsp_mem: cdsp@88f00000 { + no-map; + reg = <0x0 0x88f00000 0x0 0x1e00000>; + }; + + pil_camera_mem: camera@8ad00000 { + no-map; + reg = <0x0 0x8ad00000 0x0 0x500000>; + }; + + pil_video_mem: video@8b200000 { + no-map; + reg = <0x0 0x8b200000 0x0 0x500000>; + }; + + pil_ipa_fw_mem: ipa_fw@8b700000 { + no-map; + reg = <0x0 0x8b700000 0x0 0x10000>; + }; + + pil_ipa_gsi_mem: ipa_gsi@8b710000 { + no-map; + reg = <0x0 0x8b710000 0x0 0xa000>; + }; + + pil_gpu_micro_code_mem: gpu_micro_code@8b71a000 { + no-map; + reg = <0x0 0x8b71a000 0x0 0x2000>; + }; + + pil_mpss_wlan_mem: mpss_wlan@8b800000 { + no-map; + reg = <0x0 0x8b800000 0x0 0x10000000>; + }; + + removed_mem: removed_region@c0000000 { + no-map; + reg = <0x0 0xc0000000 0x0 0x5100000>; + }; + + secure_display_memory: secure_display_region { + compatible = "shared-dma-pool"; + alloc-ranges = <0 0x00000000 0 0xffffffff>; + reusable; + alignment = <0 0x400000>; + size = <0 0x5c00000>; + }; + + dump_mem: mem_dump_region { + compatible = "shared-dma-pool"; + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; + reusable; + size = <0 0x800000>; + }; + + splash_memory: splash_region@0x85200000 { + reg = <0x0 0x85200000 0x0 0x00c00000>; + label = "cont_splash_region"; + }; + + dfps_data_memory: dfps_data_region@85e00000 { + reg = <0x0 0x85e00000 0x0 0x00100000>; + label = "dfps_data_region"; + }; + + qcom: ramoops { + compatible = "ramoops"; + reg = <0x0 0xd0000000 0x0 0x200000>; + pmsg-size = <0x200000>; + mem-type = <2>; + }; + + /* global autoconfigured region for contiguous allocations */ + linux,cma { + compatible = "shared-dma-pool"; + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; + reusable; + alignment = <0x0 0x400000>; + size = <0x0 0x2000000>; + linux,cma-default; + }; + + adsp_mem: adsp_region { + compatible = "shared-dma-pool"; + alloc-ranges = <0 0x00000000 0 0xffffffff>; + reusable; + alignment = <0 0x400000>; + size = <0 0x800000>; + }; + + user_contig_mem: user_contig_region { + compatible = "shared-dma-pool"; + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; + reusable; + alignment = <0x0 0x400000>; + size = <0x0 0x1000000>; + }; + + qseecom_mem: qseecom_region { + compatible = "shared-dma-pool"; + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; + reusable; + alignment = <0x0 0x400000>; + size = <0x0 0x1400000>; + }; + + qseecom_ta_mem: qseecom_ta_region { + compatible = "shared-dma-pool"; + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; + reusable; + alignment = <0x0 0x400000>; + size = <0x0 0x1000000>; + }; + + memshare_mem: memshare_region { + compatible = "shared-dma-pool"; + no-map; + alloc-ranges = <0x0 0x00000000 0x0 0xffffffff>; + alignment = <0x0 0x100000>; + size = <0x0 0x800000>; }; }; From c25be01b4926dc627061e6a21d4c6ed92f35cd5c Mon Sep 17 00:00:00 2001 From: Mayank Grover Date: Mon, 9 Nov 2020 16:35:19 +0530 Subject: [PATCH 2/2] ARM: dts: msm: Move firmware node ahead Bootloader need to update property in firmware, so move firmware node ahead can improve the bootloader search dt and update property time. Change-Id: Iae35be08cae1e514d6b6ad051e5e42137f99db8b --- qcom/holi.dtsi | 55 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/qcom/holi.dtsi b/qcom/holi.dtsi index 9487018bbdad..8053abd609dd 100644 --- a/qcom/holi.dtsi +++ b/qcom/holi.dtsi @@ -49,6 +49,8 @@ swr1 = &swr1; }; + firmware: firmware {}; + cpus { #address-cells = <2>; #size-cells = <0>; @@ -244,35 +246,8 @@ }; }; - soc: soc { }; - firmware: firmware { - scm { - compatible = "qcom,scm"; - }; - - android { - compatible = "android,firmware"; - vbmeta { - compatible = "android,vbmeta"; - parts = "vbmeta,boot,system,vendor,dtbo"; - }; - - fstab { - compatible = "android,fstab"; - vendor { - compatible = "android,vendor"; - dev = "/dev/block/platform/soc/4744000.sdhci/by-name/vendor"; - type = "ext4"; - mnt_flags = "ro,barrier=1,discard"; - fsmgr_flags = "wait,slotselect,avb"; - status = "ok"; - }; - }; - }; - }; - sram: sram@fd04480 { #address-cells = <2>; #size-cells = <2>; @@ -287,6 +262,32 @@ }; }; +&firmware { + scm { + compatible = "qcom,scm"; + }; + + android { + compatible = "android,firmware"; + vbmeta { + compatible = "android,vbmeta"; + parts = "vbmeta,boot,system,vendor,dtbo"; + }; + + fstab { + compatible = "android,fstab"; + vendor { + compatible = "android,vendor"; + dev = "/dev/block/platform/soc/4744000.sdhci/by-name/vendor"; + type = "ext4"; + mnt_flags = "ro,barrier=1,discard"; + fsmgr_flags = "wait,slotselect,avb"; + status = "ok"; + }; + }; + }; +}; + &reserved_memory { #address-cells = <2>; #size-cells = <2>;