RAT mode configuration introduction

文摘 MediaTek 2020-03-11 阅读:9003

1. Supported RAT mode

1.png

  • NOTE: From Android P, the below feature options are phase out

        - MTK_IRAT_SUPPORT / CONFIG_MTK_IRAT_SUPPORT

2. Example for build config

  • Switch rat mode from 6M to 4M, please modify the below files:

        - alps/vendor/mediatek/proprietary/bootable/bootloader/lk/project/k39v1.mk
            - Before:
                MTK_PROTOCOL1_RAT_CONFIG = C/Lf/Lt/W/T/G
            - After:
                MTK_PROTOCOL1_RAT_CONFIG = Lf/Lt/W/G
        - alps/kernel-4.4/arch/arm/configs/k39v1_debug_defconfig
            - Before:
                CONFIG_MTK_MD1_SUPPORT=12
                CONFIG_MTK_C2K_LTE_MODE=2
            - After:
                CONFIG_MTK_MD1_SUPPORT=9

                CONFIG_MTK_C2K_LTE_MODE=0
        - alps/kernel-4.4/arch/arm/configs/k39v1_defconfig
            - Before:
                CONFIG_MTK_MD1_SUPPORT=12
                CONFIG_MTK_C2K_LTE_MODE=2
            - After:
                CONFIG_MTK_MD1_SUPPORT=9

                CONFIG_MTK_C2K_LTE_MODE=0
        - alps/device/mediatek/k39v1/ProjectConfig.mk
            - Before:
                MTK_C2K_LTE_MODE = 2
                MTK_MD1_SUPPORT = 12
                MTK_PROTOCOL1_RAT_CONFIG = C/Lf/Lt/W/T/G
            - After:
                MTK_C2K_LTE_MODE = 0
                MTK_MD1_SUPPORT = 9
                MTK_PROTOCOL1_RAT_CONFIG = Lf/Lt/W/G

3. Related property

  • At build time, create system property, ro.mtk_protocol1_rat_config = MTK_PROTOCOL1_RAT_CONFIG (defined in make file)
  • Example

    • Build time MTK_PROTOCOL1_RAT_CONFIG = C/Lf/Lt/W/T/G
            - ro.mtk_protocol1_rat_config = C/Lf/Lt/W/T/G (it always be fixed)
    • Use run time switch mechanism, change RAT mode to Lf/Lt/W/T/G, the below properties will be changed: 
            - ro.boot.opt_ps1_rat will be set to Lf/Lt/W/T/G

          - ro.boot.opt_using_default = 1 (default value is "0", change to "1" after run time switch)
          - ro.mtk_protocol1_rat_config = C/Lf/Lt/W/T/G (build time rat mode is no change)

4. MD query RF ID customization

  • Customer need to implement the function "customized_get_rf_id" at LK.
  • Prototype is "unsigned int customized_get_rf_id(void)".
  • Return value is RF ID.
  • CCCI driver code will add the return value to device tree, and pass the setting to modem if modem send query request. The key at device tree for modem is "mediatek,md_drdi_rf_set_idx".
  • Landing version:?Android O
  • NOTE: This function need modem send query request. Modem may be need customization too!

5. MD query model ID customization

  • Customer need to implement the function "customized_get_model_id" at LK. 
  • Prototype is "unsigned int customized_get_model_id(void)".
  • Return value is model ID.
  • CCCI driver code will add the return value to device tree, and pass the setting to modem if modem send query request. The key at device tree for modem is "mediatek,md_product_name_model_id".
  • Landing version:?Android O
  • NOTE: This function need modem send query request. Modem may be need customization too!

6. MD query RAT ID customization

  • Customer need to implement the function "customized_get_RAT_id" at LK. 
  • Prototype is "unsigned int customized_get_RAT_id(void)".
  • Return value is RAT ID.
  • Landing version:?Android O
  • Currently, the following RAT modes are supported

2.png

7. How to check rat mode in RILD?

  • Add to Android.mk

      - LOCAL_SHARED_LIBRARIES +=libratconfig
  • Include head file

      - #include "ratconfig.h"
  • APIs for query rat mode

3.png

8. How to check rat mode in Java?

  • Import library

        - import com.mediatek.internal.telephony.RatConfiguration.RatConfiguration;

  • APIs for query rat mode

4.png

9. Rat mode switch customization Properties on Android Q

  • Define the following new properties in customer boot-time configuration files

5.png

  • New properties' value are same to the old properties, details as below

      6.png

0条评论

© 2024 芯缘异码. Powered by Typecho