Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 41 additions & 2 deletions arch/arm/boot/dts/mt7623.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@
compatible = "mediatek,mt7623-wdt",
"mediatek,mt6589-wdt";
reg = <0 0x10007000 0 0x100>;
interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_FALLING>;
#reset-cells = <1>;
};

timer: timer@10008000 {
Expand Down Expand Up @@ -491,13 +493,27 @@
"mediatek,mtk-btif";
reg = <0 0x1100c000 0 0x1000>;
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_LOW>;
clocks = <&pericfg CLK_PERI_BTIF>;
clock-names = "main";
clocks = <&pericfg CLK_PERI_BTIF>, <&pericfg CLK_PERI_AP_DMA>;
clock-names = "main", "apdmac";
reg-shift = <2>;
reg-io-width = <4>;
status = "disabled";
};

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";
};

nandc: nfi@1100d000 {
compatible = "mediatek,mt7623-nfc",
"mediatek,mt2701-nfc";
Expand Down Expand Up @@ -680,6 +696,29 @@
status = "disabled";
};

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
44 changes: 44 additions & 0 deletions arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,24 @@
};
};

reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
consys-reserve-memory {
compatible = "mediatek,consys-reserve-memory";
no-map;
size = <0 0x100000>;
alignment = <0 0x100000>;
};
};

leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&led_pins_a>;


blue {
label = "bpi-r2:pio:blue";
gpios = <&pio 240 GPIO_ACTIVE_LOW>;
Expand Down Expand Up @@ -237,6 +250,37 @@
vqmmc-supply = <&reg_3p3v>;
};

&pio {
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;
};
};
};

&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";
};

&mt6323_leds {
status = "okay";

Expand Down
12 changes: 6 additions & 6 deletions arch/arm/configs/mt7623n_evb_fwu_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ CONFIG_CIFS=m

#GPIO
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_GPIO=y
#CONFIG_DEBUG_GPIO=y
CONFIG_GPIO_SYSFS=y

#wlan
Expand All @@ -263,14 +263,14 @@ CONFIG_CFG80211=y

#internal wlan (not working yet)
# CONFIG_MTK_CONN_LTE_IDC_SUPPORT is not set
#CONFIG_MTK_COMBO=y
#CONFIG_MTK_COMBO_CHIP_CONSYS_7623=y
CONFIG_MTK_COMBO=y
CONFIG_MTK_COMBO_CHIP_CONSYS_7623=y
#used in 4.4, but should be set in Kconfig by selecting mt7623 COMBO
#CONFIG_MTK_PLATFORM="mt7623"

#CONFIG_MTK_COMBO_COMM=y
#CONFIG_MTK_COMBO_WIFI=y
#CONFIG_NL80211_TESTMODE=y
CONFIG_MTK_COMBO_COMM=y
CONFIG_MTK_COMBO_WIFI=y
CONFIG_NL80211_TESTMODE=y

#internal Bluetooth (also not working yet)
#CONFIG_BT=y
Expand Down
1 change: 1 addition & 0 deletions drivers/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -527,4 +527,5 @@ source "drivers/misc/echo/Kconfig"
source "drivers/misc/cxl/Kconfig"
source "drivers/misc/ocxl/Kconfig"
source "drivers/misc/cardreader/Kconfig"
source "drivers/misc/mediatek/Kconfig"
endmenu
1 change: 1 addition & 0 deletions drivers/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o
obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o
obj-$(CONFIG_OCXL) += ocxl/
obj-$(CONFIG_MISC_RTSX) += cardreader/
obj-$(CONFIG_MTK_COMBO) += mediatek/
11 changes: 11 additions & 0 deletions drivers/misc/mediatek/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
menu "Mediatek Peripherals "

config MTK_PLATFORM
string "MTK platform name"
source "drivers/misc/mediatek/btif/Kconfig"

menu "Modem & Connectivity related configs"
source "drivers/misc/mediatek/connectivity/Kconfig"
endmenu

endmenu # CONN
19 changes: 19 additions & 0 deletions drivers/misc/mediatek/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Copyright (C) 2015 MediaTek Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#

#$(call all-subdir-src-or-makefile)
subdir-ccflags-y += -Werror
subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/

obj-$(CONFIG_MTK_COMBO) += connectivity/
obj-$(CONFIG_MTK_BTIF) += btif/
4 changes: 4 additions & 0 deletions drivers/misc/mediatek/btif/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config MTK_BTIF
tristate"MediaTek BTIF Driver"
help
MTK connectivity BTIF driver for A/D die
33 changes: 33 additions & 0 deletions drivers/misc/mediatek/btif/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright (C) 2015 MediaTek Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#

# BTIF driver for AD DIE
# If KERNELRELEASE is defined, we've been invoked from the
# kernel build system and can use its language.
ifneq ($(KERNELRELEASE),)
#subdir-ccflags-y can be used in 2.6.34 in the future
MTK_PLATFORM := $(subst ",,$(CONFIG_MTK_PLATFORM))
subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include
subdir-ccflags-y += -I$(srctree)/arch/arm/mach-$(MTK_PLATFORM)/include/mach
subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat

obj-y += common/

# Otherwise we were called directly from the command
# line; invoke the kernel build system.
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif
31 changes: 31 additions & 0 deletions drivers/misc/mediatek/btif/common/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Copyright (C) 2015 MediaTek Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#

# BTIF driver for AD DIE
# If KERNELRELEASE is defined, we've been invoked from the
# kernel build system and can use its language.
ifneq ($(KERNELRELEASE),)
ccflags-y += -I$(src)/inc
ccflags-y += -I$(src)/plat_inc

obj-y += btif.o
btif-y := mtk_btif.o mtk_btif_exp.o btif_dma_plat.o btif_plat.o

# Otherwise we were called directly from the command
# line; invoke the kernel build system.
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif
Loading