Skip to content

Commit

Permalink
Merge the code from Wifi_debug_branch for support wifi
Browse files Browse the repository at this point in the history
  • Loading branch information
garywangcn committed Sep 1, 2017
1 parent a668616 commit 6b9512b
Show file tree
Hide file tree
Showing 556 changed files with 71,638 additions and 219,364 deletions.
93 changes: 93 additions & 0 deletions linux-mt/arch/arm/boot/dts/mt7623.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,39 @@
#clock-cells = <0>;
};

reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;

trustzone-bootinfo@80002000 {
compatible = "mediatek,trustzone-bootinfo";
reg = <0 0x80002000 0 0x1000>;
};

ram_console-reserved-memory@83f00000 {
compatible = "mediatek,ram_console";
reg = <0 0x83f00000 0 0x10000>;
};

pstore-reserved-memory@83f10000 {
compatible = "mediatek,pstore";
reg = <0 0x83f10000 0 0xe0000>;
};

minirdump-reserved-memory@83ff0000 {
compatible = "mediatek,minirdump";
reg = <0 0x83ff0000 0 0x10000>;
};

consys-reserve-memory {
compatible = "mediatek,consys-reserve-memory";
no-map;
size = <0 0x100000>;
alignment = <0 0x100000>;
};
};

clk_null: clk_null {
compatible = "fixed-clock";
#clock-cells = <0>;
Expand Down Expand Up @@ -241,6 +274,20 @@
clock-names = "system-clk", "rtc-clk";
};

spi0: spi@1100a000 {
compatible = "mediatek,mt7623-spi",
"mediatek,mt2701-spi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0 0x1100a000 0 0x100>;
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_LOW>;
clocks = <&topckgen CLK_TOP_SYSPLL3_D2>,
<&topckgen CLK_TOP_SPI0_SEL>,
<&pericfg CLK_PERI_SPI0>;
clock-names = "parent-clk", "sel-clk", "spi-clk";
status = "disabled";
};

smi_common: smi@1000c000 {
compatible = "mediatek,mt7623-smi-common",
"mediatek,mt2701-smi-common";
Expand Down Expand Up @@ -356,6 +403,29 @@
#io-channel-cells = <1>;
};

btif_tx: btif_tx@11000780 {
compatible = "mediatek,btif_tx";
reg = <0 0x11000780 0 0x80>;
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_LOW>;
status = "okay";
};

btif_rx: btif_rx@11000800 {
compatible = "mediatek,btif_rx";
reg = <0 0x11000800 0 0x80>;
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
status = "okay";
};

btif: btif@1100c000 {
compatible = "mediatek,btif";
reg = <0 0x1100c000 0 0x1000>;
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_BTIF>, <&pericfg CLK_PERI_AP_DMA>;
clock-names = "btifc", "apdmac";
status = "okay";
};

uart2: serial@11004000 {
compatible = "mediatek,mt7623-uart",
"mediatek,mt6577-uart";
Expand Down Expand Up @@ -920,6 +990,29 @@
power-domains = <&scpsys MT2701_POWER_DOMAIN_VDEC>;
};

consys: consys@18070000 {
compatible = "mediatek,mt7623-consys";
reg = <0 0x18070000 0 0x0200>, /*CONN_MCU_CONFIG_BASE */
<0 0x10001000 0 0x1600>; /*TOPCKGEN_BASE */
clocks = <&infracfg CLK_INFRA_CONNMCU>;
clock-names = "consysbus";
power-domains = <&scpsys MT2701_POWER_DOMAIN_CONN>;
interrupts = <GIC_SPI 185 IRQ_TYPE_LEVEL_LOW>, /* BGF_EINT */
<GIC_SPI 163 IRQ_TYPE_LEVEL_LOW>; /* WDT_EINT */
resets = <&watchdog MT2701_TOPRGU_CONN_MCU_RST>;
reset-names = "connsys";
status="disabled";
};

wifi:wifi@180f0000 {
compatible = "mediatek,mt7623-wifi",
"mediatek,wifi";
reg = <0 0x180f0000 0 0x005c>;
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_AP_DMA>;
clock-names = "wifi-dma";
};

hifsys: syscon@1a000000 {
compatible = "mediatek,mt7623-hifsys",
"mediatek,mt2701-hifsys",
Expand Down
30 changes: 30 additions & 0 deletions linux-mt/arch/arm/boot/dts/mt7623n-bpi-r2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,18 @@
status = "okay";
};

&consys {
mediatek,pwrap-regmap = <&pwrap>;
pinctrl-names = "default";
pinctrl-0 = <&consys_pins_default>;
vcn18-supply = <&mt6323_vcn18_reg>;
vcn28-supply = <&mt6323_vcn28_reg>;
vcn33_bt-supply = <&mt6323_vcn33_bt_reg>;
vcn33_wifi-supply = <&mt6323_vcn33_wifi_reg>;
status = "okay";
};


&crypto {
status = "okay";
};
Expand Down Expand Up @@ -199,6 +211,24 @@
};
};

consys_pins_default: consys_pins_default {
adie {
pinmux = <MT7623_PIN_60_WB_RSTB_FUNC_WB_RSTB>,
<MT7623_PIN_61_GPIO61_FUNC_TEST_FD>,
<MT7623_PIN_62_GPIO62_FUNC_TEST_FC>,
<MT7623_PIN_63_WB_SCLK_FUNC_WB_SCLK>,
<MT7623_PIN_64_WB_SDATA_FUNC_WB_SDATA>,
<MT7623_PIN_65_WB_SEN_FUNC_WB_SEN>,
<MT7623_PIN_66_WB_CRTL0_FUNC_WB_CRTL0>,
<MT7623_PIN_67_WB_CRTL1_FUNC_WB_CRTL1>,
<MT7623_PIN_68_WB_CRTL2_FUNC_WB_CRTL2>,
<MT7623_PIN_69_WB_CRTL3_FUNC_WB_CRTL3>,
<MT7623_PIN_70_WB_CRTL4_FUNC_WB_CRTL4>,
<MT7623_PIN_71_WB_CRTL5_FUNC_WB_CRTL5>;
bias-disable;
};
};

gsw_reset: gsw_reset {
pins_rst {
pinmux = <MT7623_PIN_33_I2S1_DATA_FUNC_GPIO33>;
Expand Down
48 changes: 37 additions & 11 deletions linux-mt/arch/arm/configs/mt7623n_evb_bpi_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1326,16 +1326,22 @@ CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_SPY=y
CONFIG_WEXT_PRIV=y
# CONFIG_CFG80211 is not set
CONFIG_CFG80211=y
CONFIG_NL80211_TESTMODE=y
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_REG_DEBUG is not set
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not set
# CONFIG_CFG80211_INTERNAL_REGDB is not set
CONFIG_CFG80211_CRDA_SUPPORT=y
# CONFIG_CFG80211_WEXT is not set
CONFIG_LIB80211=m
CONFIG_LIB80211_CRYPT_WEP=m
CONFIG_LIB80211_CRYPT_CCMP=m
CONFIG_LIB80211_CRYPT_TKIP=m
# CONFIG_LIB80211_DEBUG is not set

#
# CFG80211 needs to be enabled for MAC80211
#
# CONFIG_MAC80211 is not set
CONFIG_MAC80211_STA_HASH_MAX_SIZE=0
# CONFIG_WIMAX is not set
CONFIG_RFKILL=y
Expand Down Expand Up @@ -1645,20 +1651,28 @@ CONFIG_ALTERA_STAPL=m
#
# Mediatek Peripherals
#
CONFIG_MTK_PLATFORM="mt7623"
CONFIG_USB_MTK_HDRC=y
CONFIG_MTK_MUSB_QMU_SUPPORT=y
CONFIG_USB_MTK_OTG=y
# CONFIG_MTK_UART_USB_SWITCH is not set
# CONFIG_MTK_MUSB_CARPLAY_SUPPORT is not set
# CONFIG_MTK_MUSB_SW_WITCH_MODE is not set
CONFIG_MTK_ICE_DEBUG=y
# CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT is not set
CONFIG_HAVE_MTK_IN_HOUSE_TEE_SUPPORT=y
# CONFIG_MTK_IN_HOUSE_TEE_SUPPORT is not set
# CONFIG_MTK_SYS_CIRQ is not set
# CONFIG_MMC_MTK_SDIO is not set
# CONFIG_MTK_RAM_CONSOLE is not set
# CONFIG_MTK_AEE_FEATURE is not set
# CONFIG_MTK_EMI_BWL is not set
# CONFIG_MTK_EMI_7622 is not set
CONFIG_MTK_BTIF=y
CONFIG_MTK_COMBO=y
CONFIG_MTK_COMBO_CHIP_CONSYS_7623=y
CONFIG_MTK_COMBO_COMM=y
CONFIG_MTK_COMBO_BT=y
CONFIG_MTK_COMBO_WIFI=y

#
# MTK Cluster MultiProcessor Scheduler
Expand All @@ -1674,6 +1688,7 @@ CONFIG_MTK_ICE_DEBUG=y
# CONFIG_MTK_BASE_POWER_MT7622 is not set
# CONFIG_MTK_FREQ_HOPPING is not set
# CONFIG_MTK_TURNKEY_THERMAL is not set
# CONFIG_MTK_SECURE_EFUSE is not set
# CONFIG_MTK_HWRNG is not set
# CONFIG_RT_REGMAP is not set
# CONFIG_USB_C_SWITCH is not set
Expand All @@ -1695,19 +1710,17 @@ CONFIG_MTK_ICE_DEBUG=y
# CONFIG_MTK_AUTO_DETECT_ALSPS is not set
# CONFIG_MTK_CM36686_NEW is not set
# CONFIG_MTK_HWMON is not set
# CONFIG_MTK_BTIF is not set
# CONFIG_MTK_BTMTK_BTIF is not set

#
# Modem & Connectivity related configs
#
# CONFIG_MTK_COMBO is not set
# CONFIG_MTK_DHCPV6C_WIFI is not set
CONFIG_MTK_DHCPV6C_WIFI=y
CONFIG_MTK_COMBO_CHIP="CONSYS_7623"
# CONFIG_MTK_CONN_LTE_IDC_SUPPORT is not set
CONFIG_GPS=y
CONFIG_MTK_GPS=y
# CONFIG_MTK_GPS_SUPPORT is not set
# CONFIG_MTK_MERGE_INTERFACE_SUPPORT is not set
# CONFIG_MTK_CONN_MT3337_CHIP_SUPPORT is not set
# CONFIG_MTK_CONN_MD is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
Expand Down Expand Up @@ -2276,13 +2289,23 @@ CONFIG_USB_SIERRA_NET=m
CONFIG_USB_VL600=m
CONFIG_USB_NET_CH9200=m
CONFIG_WLAN=y
# CONFIG_ATMEL is not set
# CONFIG_PRISM54 is not set
# CONFIG_USB_ZD1201 is not set
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_ATH_CARDS is not set
# CONFIG_BRCMFMAC is not set
CONFIG_HOSTAP=m
# CONFIG_HOSTAP_FIRMWARE is not set
# CONFIG_HOSTAP_PLX is not set
# CONFIG_HOSTAP_PCI is not set
# CONFIG_IPW2100 is not set
# CONFIG_IPW2200 is not set
# CONFIG_LIBERTAS is not set
# CONFIG_HERMES is not set
# CONFIG_WL_MEDIATEK is not set
# CONFIG_WL_TI is not set
# CONFIG_MWIFIEX is not set

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
Expand Down Expand Up @@ -4143,10 +4166,12 @@ CONFIG_DMA_OF=y
# Microsoft Hyper-V guest support
#
CONFIG_STAGING=y
# CONFIG_PRISM2_USB is not set
# CONFIG_COMEDI is not set
# CONFIG_RTL8192U is not set
# CONFIG_RTLLIB is not set
# CONFIG_R8712U is not set
# CONFIG_R8188EU is not set
# CONFIG_R8723AU is not set
# CONFIG_RTS5208 is not set

Expand Down Expand Up @@ -4260,6 +4285,7 @@ CONFIG_MEDIA_CEC=y
# CONFIG_GS_FPGABOOT is not set
# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set
# CONFIG_FB_TFT is not set
# CONFIG_WILC1000_DRIVER is not set
# CONFIG_MOST is not set
# CONFIG_GOLDFISH is not set
# CONFIG_CHROME_PLATFORMS is not set
Expand Down
2 changes: 2 additions & 0 deletions linux-mt/drivers/misc/mediatek/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
menu "Mediatek Peripherals "

config MTK_PLATFORM
string "MTK platform name"
source "drivers/misc/mediatek/usb20/Kconfig"
source "drivers/misc/mediatek/ice_debug/Kconfig"
source "drivers/misc/mediatek/trustzone/Kconfig"
Expand Down
Loading

0 comments on commit 6b9512b

Please sign in to comment.