From 22da203ef82137fa4d930cabefc8501aef1f352d Mon Sep 17 00:00:00 2001 From: Dzmitry Sankouski Date: Fri, 14 Oct 2022 19:01:13 +0300 Subject: [PATCH] arm64: dts: qcom: sagit: add reserved memory nodes and chassis type This taken from upstream patch, and fixes wifi. fix adsp size, slpi size, reorganize reserved memory nodes --- .../boot/dts/qcom/msm8998-xiaomi-sagit.dts | 72 ++++++++++++++++++- 1 file changed, 69 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts b/arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts index 430d9863047f..b07f77527c6b 100644 --- a/arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts +++ b/arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts @@ -17,11 +17,26 @@ #include #include +/* + * Delete following upstream (msm8998.dtsi) reserved + * memory mappings which are different in this device. + */ +/delete-node/ &adsp_mem; +/delete-node/ &mpss_mem; +/delete-node/ &venus_mem; +/delete-node/ &mba_mem; +/delete-node/ &slpi_mem; +/delete-node/ &ipa_fw_mem; +/delete-node/ &ipa_gsi_mem; +/delete-node/ &gpu_mem; +/delete-node/ &wlan_msa_mem; + / { model = "Xiaomi Mi 6"; compatible = "xiaomi,sagit", "qcom,msm8998"; - qcom,board-id = <30 0>; + chassis-type = "handset"; /* Required for bootloader to select correct board */ + qcom,board-id = <30 0>; qcom,msm-id = <292 0x20001>; /* 8998 v2.1 */ chosen { @@ -42,6 +57,56 @@ }; reserved-memory { + /* + * Xiaomi's ADSP firmware requires 30 MiB in total, so increase the adsp_mem + * region by 4 MiB to account for this while relocating the other now + * conflicting memory nodes accordingly. + */ + adsp_mem: memory@8b200000 { + reg = <0x0 0x8b200000 0x0 0x1e00000>; + no-map; + }; + + mpss_mem: memory@8d000000 { + reg = <0x0 0x8d000000 0x0 0x7000000>; + no-map; + }; + + venus_mem: memory@94000000 { + reg = <0x0 0x94000000 0x0 0x500000>; + no-map; + }; + + mba_mem: memory@94500000 { + reg = <0x0 0x94500000 0x0 0x200000>; + no-map; + }; + + slpi_mem: memory@94700000 { + reg = <0x0 0x94700000 0x0 0xf00000>; + no-map; + }; + + ipa_fw_mem: memory@95600000 { + reg = <0x0 0x95600000 0x0 0x10000>; + no-map; + }; + + ipa_gsi_mem: memory@95610000 { + reg = <0x0 0x95610000 0x0 0x5000>; + no-map; + }; + + gpu_mem: memory@95615000 { + reg = <0x0 0x95615000 0x0 0x100000>; + no-map; + }; + + wlan_msa_mem: memory@95715000 { + reg = <0x0 0x95715000 0x0 0x100000>; + no-map; + }; + /* Bootloader display framebuffer region */ cont_splash_mem: memory@9d400000 { reg = <0x0 0x9d400000 0x0 0x2400000>; @@ -63,12 +128,13 @@ * but given the same addresses every time. Hard code them as these addresses * are where the Xiaomi signed firmware expects them to be. */ - ipa_fws_region: ipa@f7800000 { + ipa_fws_region: memory@f7800000 { compatible = "shared-dma-pool"; reg = <0x0 0xf7800000 0x0 0x5000>; no-map; }; - zap_shader_region: gpu@f7900000 { + + zap_shader_region: memory@f7900000 { compatible = "shared-dma-pool"; reg = <0x0 0xf7900000 0x0 0x2000>; no-map;