Skip to content

Commit 4622f3b

Browse files
authored
Merge pull request #43 from frank-w/4.19-wifi
4.19 wifi
2 parents 68eab22 + f59ea52 commit 4622f3b

File tree

294 files changed

+214559
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+214559
-15
lines changed

arch/arm/boot/dts/mt7623.dtsi

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@
266266
compatible = "mediatek,mt7623-wdt",
267267
"mediatek,mt6589-wdt";
268268
reg = <0 0x10007000 0 0x100>;
269+
interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_FALLING>;
270+
#reset-cells = <1>;
269271
};
270272

271273
timer: timer@10008000 {
@@ -494,13 +496,26 @@
494496
"mediatek,mtk-btif";
495497
reg = <0 0x1100c000 0 0x1000>;
496498
interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_LOW>;
497-
clocks = <&pericfg CLK_PERI_BTIF>;
498-
clock-names = "main";
499+
clocks = <&pericfg CLK_PERI_BTIF>, <&pericfg CLK_PERI_AP_DMA>;
500+
clock-names = "main", "apdmac";
499501
reg-shift = <2>;
500502
reg-io-width = <4>;
501503
status = "disabled";
502504
};
503505

506+
btif_tx: btif_tx@11000780 {
507+
compatible = "mediatek,btif_tx";
508+
reg = <0 0x11000780 0 0x80>;
509+
interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_LOW>;
510+
status = "okay";
511+
};
512+
btif_rx: btif_rx@11000800 {
513+
compatible = "mediatek,btif_rx";
514+
reg = <0 0x11000800 0 0x80>;
515+
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
516+
status = "okay";
517+
};
518+
504519
nandc: nfi@1100d000 {
505520
compatible = "mediatek,mt7623-nfc",
506521
"mediatek,mt2701-nfc";
@@ -683,6 +698,28 @@
683698
status = "disabled";
684699
};
685700

701+
consys: consys@18070000 {
702+
compatible = "mediatek,mt7623-consys";
703+
reg = <0 0x18070000 0 0x0200>, /*CONN_MCU_CONFIG_BASE */
704+
<0 0x10001000 0 0x1600>; /*TOPCKGEN_BASE */
705+
clocks = <&infracfg CLK_INFRA_CONNMCU>;
706+
clock-names = "consysbus";
707+
power-domains = <&scpsys MT2701_POWER_DOMAIN_CONN>;
708+
interrupts = <GIC_SPI 185 IRQ_TYPE_LEVEL_LOW>, /* BGF_EINT */
709+
<GIC_SPI 163 IRQ_TYPE_LEVEL_LOW>; /* WDT_EINT */
710+
resets = <&watchdog MT2701_TOPRGU_CONN_MCU_RST>;
711+
reset-names = "connsys";
712+
status="disabled";
713+
};
714+
wifi:wifi@180f0000 {
715+
compatible = "mediatek,mt7623-wifi",
716+
"mediatek,wifi";
717+
reg = <0 0x180f0000 0 0x005c>;
718+
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_LOW>;
719+
clocks = <&pericfg CLK_PERI_AP_DMA>;
720+
clock-names = "wifi-dma";
721+
};
722+
686723
hifsys: syscon@1a000000 {
687724
compatible = "mediatek,mt7623-hifsys",
688725
"mediatek,mt2701-hifsys",

arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@
8484
};
8585
};
8686

87+
reserved-memory {
88+
#address-cells = <2>;
89+
#size-cells = <2>;
90+
ranges;
91+
consys-reserve-memory {
92+
compatible = "mediatek,consys-reserve-memory";
93+
no-map;
94+
size = <0 0x100000>;
95+
alignment = <0 0x100000>;
96+
};
97+
};
98+
8799
leds {
88100
compatible = "gpio-leds";
89101
pinctrl-names = "default";
@@ -259,6 +271,36 @@
259271
};
260272
};
261273

274+
&pio {
275+
consys_pins_default: consys_pins_default {
276+
adie {
277+
pinmux = <MT7623_PIN_60_WB_RSTB_FUNC_WB_RSTB>,
278+
<MT7623_PIN_61_GPIO61_FUNC_TEST_FD>,
279+
<MT7623_PIN_62_GPIO62_FUNC_TEST_FC>,
280+
<MT7623_PIN_63_WB_SCLK_FUNC_WB_SCLK>,
281+
<MT7623_PIN_64_WB_SDATA_FUNC_WB_SDATA>,
282+
<MT7623_PIN_65_WB_SEN_FUNC_WB_SEN>,
283+
<MT7623_PIN_66_WB_CRTL0_FUNC_WB_CRTL0>,
284+
<MT7623_PIN_67_WB_CRTL1_FUNC_WB_CRTL1>,
285+
<MT7623_PIN_68_WB_CRTL2_FUNC_WB_CRTL2>,
286+
<MT7623_PIN_69_WB_CRTL3_FUNC_WB_CRTL3>,
287+
<MT7623_PIN_70_WB_CRTL4_FUNC_WB_CRTL4>,
288+
<MT7623_PIN_71_WB_CRTL5_FUNC_WB_CRTL5>;
289+
bias-disable;
290+
};
291+
};
292+
};
293+
&consys {
294+
mediatek,pwrap-regmap = <&pwrap>;
295+
pinctrl-names = "default";
296+
pinctrl-0 = <&consys_pins_default>;
297+
vcn18-supply = <&mt6323_vcn18_reg>;
298+
vcn28-supply = <&mt6323_vcn28_reg>;
299+
vcn33_bt-supply = <&mt6323_vcn33_bt_reg>;
300+
vcn33_wifi-supply = <&mt6323_vcn33_wifi_reg>;
301+
status = "okay";
302+
};
303+
262304
&pcie {
263305
pinctrl-names = "default";
264306
pinctrl-0 = <&pcie_default>;

build.log

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<stdin>:1332:2: warning: #warning syscall io_pgetevents not implemented [-Wcpp]

drivers/misc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,4 +527,5 @@ source "drivers/misc/echo/Kconfig"
527527
source "drivers/misc/cxl/Kconfig"
528528
source "drivers/misc/ocxl/Kconfig"
529529
source "drivers/misc/cardreader/Kconfig"
530+
source "drivers/misc/mediatek/Kconfig"
530531
endmenu

drivers/misc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o
5858
obj-$(CONFIG_PCI_ENDPOINT_TEST) += pci_endpoint_test.o
5959
obj-$(CONFIG_OCXL) += ocxl/
6060
obj-$(CONFIG_MISC_RTSX) += cardreader/
61+
obj-$(CONFIG_MTK_COMBO) += mediatek/

drivers/misc/mediatek/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
menu "Mediatek Peripherals "
2+
3+
config MTK_PLATFORM
4+
string "MTK platform name"
5+
source "drivers/misc/mediatek/btif/Kconfig"
6+
7+
menu "Modem & Connectivity related configs"
8+
source "drivers/misc/mediatek/connectivity/Kconfig"
9+
endmenu
10+
11+
endmenu # CONN

drivers/misc/mediatek/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Copyright (C) 2015 MediaTek Inc.
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License version 2 as
6+
# published by the Free Software Foundation.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
14+
#$(call all-subdir-src-or-makefile)
15+
subdir-ccflags-y += -Werror
16+
subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/
17+
18+
obj-$(CONFIG_MTK_COMBO) += connectivity/
19+
obj-$(CONFIG_MTK_BTIF) += btif/

drivers/misc/mediatek/btif/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
config MTK_BTIF
2+
tristate"MediaTek BTIF Driver"
3+
help
4+
MTK connectivity BTIF driver for A/D die
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#
2+
# Copyright (C) 2015 MediaTek Inc.
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License version 2 as
6+
# published by the Free Software Foundation.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
14+
# BTIF driver for AD DIE
15+
# If KERNELRELEASE is defined, we've been invoked from the
16+
# kernel build system and can use its language.
17+
ifneq ($(KERNELRELEASE),)
18+
#subdir-ccflags-y can be used in 2.6.34 in the future
19+
MTK_PLATFORM := $(subst ",,$(CONFIG_MTK_PLATFORM))
20+
subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/$(MTK_PLATFORM)/include
21+
subdir-ccflags-y += -I$(srctree)/arch/arm/mach-$(MTK_PLATFORM)/include/mach
22+
subdir-ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat
23+
24+
obj-y += common/
25+
26+
# Otherwise we were called directly from the command
27+
# line; invoke the kernel build system.
28+
else
29+
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
30+
PWD := $(shell pwd)
31+
default:
32+
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
33+
endif
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#
2+
# Copyright (C) 2015 MediaTek Inc.
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License version 2 as
6+
# published by the Free Software Foundation.
7+
#
8+
# This program is distributed in the hope that it will be useful,
9+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
# GNU General Public License for more details.
12+
#
13+
14+
# BTIF driver for AD DIE
15+
# If KERNELRELEASE is defined, we've been invoked from the
16+
# kernel build system and can use its language.
17+
ifneq ($(KERNELRELEASE),)
18+
ccflags-y += -I$(src)/inc
19+
ccflags-y += -I$(src)/plat_inc
20+
21+
obj-y += btif.o
22+
btif-y := mtk_btif.o mtk_btif_exp.o btif_dma_plat.o btif_plat.o
23+
24+
# Otherwise we were called directly from the command
25+
# line; invoke the kernel build system.
26+
else
27+
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
28+
PWD := $(shell pwd)
29+
default:
30+
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
31+
endif

0 commit comments

Comments
 (0)