MT8735A平台配置MT6630

1. codegen配置

 

2. ProjectConfig

CUSTOM_HAL_ANT = mt6630_ant_m1

CUSTOM_HAL_COMBO = mt6630

MTK_BT_CHIP = MTK_MT6630

MTK_COMBO_CHIP = MT6630

MTK_FM_CHIP = MT6630_FM

MTK_FM_TX_SUPPORT = yes

MTK_GPS_CHIP = MTK_GPS_MT6630

MTK_MERGE_INTERFACE_SUPPORT = yes

MTK_WAPI_SUPPORT = no

MTK_WLAN_CHIP = MT6630

MTK_SDIOAUTOK_SUPPORT = yes

 

3. hiteq8735a_tb_n.dts

/* Connectivity */
mediatek,connectivity-combo {
compatible = "mediatek,connectivity-combo";
/*gpio_combo_ldo_en_pin = <&pio 0xffff 0>; /*0) GPIO_COMBO_LDO_EN_PIN */
/*gpio_combo_pmuv28_en_pin = <&pio 0xffff 0>; /* 1) GPIO_COMBO_PMUV28_EN_PIN */
gpio_combo_pmu_en_pin = <&pio 21 0>; /* 2) GPIO_COMBO_PMU_EN_PIN */
gpio_combo_rst_pin = <&pio 186 0>; /* 3) GPIO_COMBO_RST_PIN pin */
/*gpio_combo_bgf_eint_pin = <&pio 0xffff 0>; /* 4) GPIO_COMBO_BGF_EINT_PIN */
gpio_wifi_eint_pin = <&pio 20 0>; /* 5) GPIO_WIFI_EINT_PIN */
/*gpio_all_eint_pin = <&pio 0xffff 0>; /* 6) GPIO_ALL_EINT_PIN */
gpio_combo_urxd_pin = <&pio 74 0>; /* 7) GPIO_COMBO_URXD_PIN */
gpio_combo_utxd_pin = <&pio 75 0>; /* 8) GPIO_COMBO_UTXD_PIN */
gpio_pcm_daiclk_pin = <&pio 184 0>; /* 9) GPIO_PCM_DAICLK_PIN */
gpio_pcm_daipcmin_pin = <&pio 185 0>; /* 10) GPIO_PCM_DAIPCMIN_PIN */
gpio_pcm_daipcmout_pin = <&pio 187 0>; /* 11) GPIO_PCM_DAIPCMOUT_PIN */
gpio_pcm_daisync_pin = <&pio 188 0>; /* 12) GPIO_PCM_DAISYNC_PIN */
/*gpio_combo_i2s_ck_pin = <&pio 0xffff 0>; /* 13) GPIO_COMBO_I2S_CK_PIN */
/*gpio_combo_i2s_ws_pin = <&pio 0xffff 0>; /* 14) GPIO_COMBO_I2S_WS_PIN */
/*gpio_combo_i2s_dat_pin = <&pio 0xffff 0>; /* 15) GPIO_COMBO_I2S_DAT_PIN */
gpio_gps_sync_pin = <&pio 19 0>; /* 16) GPIO_GPS_SYNC_PIN */
gpio_gps_lna_pin = <&pio 77 0>; /* 17) GPIO_GPS_LNA_PIN */
pinctrl-names = "gpio_pmu_en_pull_dis",
"gpio_pmu_en_in_pulldown",
"gpio_rst_pull_dis",
"gpio_wifi_eint_in_pull_dis",
"gpio_wifi_eint_in_pullup",
"gpio_urxd_uart_pull_dis",
"gpio_urxd_gpio_in_pullup",
"gpio_urxd_gpio_in_pull_dis",
"gpio_utxd_uart_pull_dis",
"gpio_pcm_daiclk_pull_dis",
"gpio_pcm_daipcmin_pull_dis",
"gpio_pcm_daipcmout_pull_dis",
"gpio_pcm_daisync_pull_dis",
"gpio_gps_sync_pull_dis",
"gpio_gps_lna_pull_dis";
pinctrl-0 = <&pcfg_combo_pmu_en_pull_dis_cfgs>;
pinctrl-1 = <&pcfg_combo_pmu_en_in_pulldown_cfgs>;
pinctrl-2 = <&pcfg_combo_rst_pull_dis_cfgs>;
pinctrl-3 = <&pcfg_combo_wifi_eint_in_pull_dis_cfgs>;
pinctrl-4 = <&pcfg_combo_wifi_eint_in_pullup_cfgs>;
pinctrl-5 = <&pcfg_combo_urxd_uart_pull_dis_cfgs>;
pinctrl-6 = <&pcfg_combo_urxd_gpio_in_pullup_cfgs>;
pinctrl-7 = <&pcfg_combo_urxd_gpio_in_pull_dis_cfgs>;
pinctrl-8 = <&pcfg_combo_utxd_uart_pull_dis_cfgs>;
pinctrl-9 = <&pcfg_combo_pcm_daiclk_pull_dis_cfgs>;
pinctrl-10 = <&pcfg_combo_pcm_daipcmin_pull_dis_cfgs>;
pinctrl-11 = <&pcfg_combo_pcm_daipcmout_pull_dis_cfgs>;
pinctrl-12 = <&pcfg_combo_pcm_daisync_pull_dis_cfgs>;
pinctrl-13 = <&pcfg_combo_gps_sync_pull_dis_cfgs>;
pinctrl-14 = <&pcfg_combo_gps_lna_pull_dis_cfgs>;
interrupt-parent = <&eintc>;
interrupts = < 20 IRQ_TYPE_LEVEL_LOW >; /* WIFI EINT num is 1 active low level-sensitive */
debounce = <20 0>;
status = "okay";
};
};

 

/* ++++++ Connectivity GPIO configs ++++++ */
&pio {
pinctrl-names = "default";
pinctrl-0 = <&state_default>;
pcfg_combo_pmu_en_pull_dis_cfgs:cfg_mode1_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO21__FUNC_GPIO21>;
bias-disable;
};
};

pcfg_combo_pmu_en_in_pulldown_cfgs:cfg_mode1_in_pulldown {
combo_pins {
pinmux = <PINMUX_GPIO21__FUNC_GPIO21>;
bias-pull-down;
};
};

pcfg_combo_rst_pull_dis_cfgs:cfg_mode1_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO186__FUNC_GPIO186>;
bias-disable;
};
};

pcfg_combo_wifi_eint_in_pull_dis_cfgs:cfg_mode1_in_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO20__FUNC_GPIO20>;
input-enable;
bias-disable;
};
};
pcfg_combo_wifi_eint_in_pullup_cfgs:cfg_mode1_in_pullup {
combo_pins {
pinmux = <PINMUX_GPIO20__FUNC_GPIO20>;
input-enable;
bias-pull-up;
};
};

pcfg_combo_urxd_uart_pull_dis_cfgs:cfg_mode2_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO74__FUNC_URXD0>;
bias-disable;
};
};
pcfg_combo_urxd_gpio_in_pullup_cfgs:cfg_mode1_in_pullup {
combo_pins {
pinmux = <PINMUX_GPIO74__FUNC_URXD0>;
input-enable;
bias-pull-up;
};
};
pcfg_combo_urxd_gpio_in_pull_dis_cfgs:cfg_mode1_in_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO74__FUNC_URXD0>;
input-enable;
bias-disable;
};
};

pcfg_combo_utxd_uart_pull_dis_cfgs:cfg_mode2_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO75__FUNC_UTXD0>;
bias-disable;
};
};

pcfg_combo_pcm_daiclk_pull_dis_cfgs:cfg_mode3_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO184__FUNC_PCM0_CLK>;
bias-disable;
};
};

pcfg_combo_pcm_daipcmin_pull_dis_cfgs:cfg_mode3_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO185__FUNC_PCM0_DI>;
bias-disable;
};
};

pcfg_combo_pcm_daipcmout_pull_dis_cfgs:cfg_mode3_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO187__FUNC_PCM0_DO>;
bias-disable;
};
};

pcfg_combo_pcm_daisync_pull_dis_cfgs:cfg_mode3_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO188__FUNC_PCM0_SYNC>;
bias-disable;
};
};

pcfg_combo_gps_sync_pull_dis_cfgs:cfg_mode1_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO19__FUNC_GPS_FRAME_SYNC>;
bias-disable;
};
};
pcfg_combo_gps_lna_pull_dis_cfgs:cfg_mode1_pull_dis {
combo_pins {
pinmux = <PINMUX_GPIO77__FUNC_GPIO77>;
bias-disable;
};
};

state_default:pinctrl {
/* ++++++ Connectivity GPIO configs ++++++ */
combo_wifi_eint_pins {
pinmux = <PINMUX_GPIO20__FUNC_GPIO20>;
bias-pull-up;
};

combo_pcm_pins {
pinmux = <PINMUX_GPIO184__FUNC_MRG_CLK>,
<PINMUX_GPIO185__FUNC_MRG_DI>,
<PINMUX_GPIO187__FUNC_MRG_DO>,
<PINMUX_GPIO188__FUNC_MRG_SYNC>;
bias-disable;
};
/* ----- Connectivity GPIO configs ----- */
};
/* ------ Connectivity GPIO configs ------ */
};

 

4. hiteq8735a_tb_n_debug_defconfig

CONFIG_MTK_COMBO=y
CONFIG_MTK_COMBO_CHIP_MT6630=y
CONFIG_MTK_COMBO_CHIP="MT6630"
CONFIG_MTK_COMBO_COMM=y
CONFIG_MTK_COMBO_COMM_SDIO=y
CONFIG_MTK_COMBO_BT=y
CONFIG_MTK_COMBO_GPS=y
CONFIG_MTK_COMBO_WIFI=y
CONFIG_MTK_COMBO_ANT=y
CONFIG_SDIOAUTOK_SUPPORT=y
CONFIG_MTK_MERGE_INTERFACE_SUPPORT=y
# CONFIG_MTK_WAPI_SUPPORT is not set
CONFIG_MTK_GPS_SUPPORT=y
CONFIG_MTK_FMRADIO=y
CONFIG_MTK_FM_CHIP="MT6630_FM"

 

5. BoardConfig.mk

添加:

ifeq ($(strip $(BOARD_CONNECTIVITY_VENDOR)), MediaTek)
BOARD_CONNECTIVITY_MODULE := MT6630
endif

 

6. init.project.rc

添加:

#autok
chown root system /sys/autok/debug
chown root system /sys/autok/param_count
chown root system /sys/autok/ready
chown root system /sys/autok/ss_corner
chown root system /sys/autok/suggest_vol
chown root system /sys/autok/stage1/2/DONE
chown root system /sys/autok/stage1/2/PARAMS
chown root system /sys/autok/stage1/2/VOLTAGE
chown root system /sys/autok/stage1/2/LOG
chown root system /sys/autok/stage2/2

 

# For WiFi High Speed calibration
service autokd /vendor/bin/autokd
class core
user system
group system

service dhcpcd_eth0 /system/bin/dhcpcd -BK -dd
class main
user dhcp
group net_admin net_raw
disabled
oneshot

 

7. meta_init.project.rc

#autok
chown root system /sys/autok/debug
chown root system /sys/autok/param_count
chown root system /sys/autok/ready
chown root system /sys/autok/ss_corner
chown root system /sys/autok/suggest_vol
chown root system /sys/autok/stage1/2/DONE
chown root system /sys/autok/stage1/2/PARAMS
chown root system /sys/autok/stage1/2/VOLTAGE
chown root system /sys/autok/stage1/2/LOG
chown root system /sys/autok/stage2/2

 

# For WiFi High Speed calibration
service autokd /vendor/bin/autokd
class core
user system
group system

 

8. device/mediatek.mt6735/device.mk

添加:

PRODUCT_PROPERTY_OVERRIDES += gps.solution.combo.chip=1

 

9. vendor/mediatek/proprietary/hardware/connectivity/wlan/firmware/Android.mk

else ifeq ($(strip $(BOARD_CONNECTIVITY_MODULE)), MT6630)
# remove prefix and subffix chars, only left numbers.
WLAN_CHIP_ID := MT6630

posted @ 2018-02-08 15:52  爱无限  阅读(1646)  评论(0编辑  收藏  举报