1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
|
#
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
define KernelPackage/usb-rt305x-dwc_otg
TITLE:=RT305X USB controller driver
DEPENDS:=@TARGET_ramips_rt305x
KCONFIG:= \
CONFIG_DWC_OTG \
CONFIG_DWC_OTG_HOST_ONLY=y \
CONFIG_DWC_OTG_DEVICE_ONLY=n \
CONFIG_DWC_OTG_DEBUG=n
FILES:=$(LINUX_DIR)/drivers/usb/dwc_otg/dwc_otg.ko
AUTOLOAD:=$(call AutoLoad,54,dwc_otg,1)
$(call AddDepends/usb)
endef
define KernelPackage/usb-rt305x-dwc_otg/description
This driver provides USB Device Controller support for the
Synopsys DesignWare USB OTG Core used in the Ralink RT305X SoCs.
endef
$(eval $(call KernelPackage,usb-rt305x-dwc_otg))
OTHER_MENU:=Other modules
define KernelPackage/sdhci-mt7620
SUBMENU:=Other modules
TITLE:=MT7620 SDCI
DEPENDS:=@TARGET_ramips_mt7620a +kmod-sdhci
KCONFIG:= \
CONFIG_MMC_SDHCI_MT7620
FILES:= \
$(LINUX_DIR)/drivers/mmc/host/sdhci-mt7620.ko
AUTOLOAD:=$(call AutoProbe,sdhci-mt7620,1)
endef
$(eval $(call KernelPackage,sdhci-mt7620))
I2C_RALINK_MODULES:= \
CONFIG_I2C_RALINK:drivers/i2c/busses/i2c-ralink
define KernelPackage/i2c-ralink
$(call i2c_defaults,$(I2C_RALINK_MODULES),59)
TITLE:=Ralink I2C Controller
DEPENDS:=@TARGET_ramips kmod-i2c-core
endef
define KernelPackage/i2c-ralink/description
Kernel modules for enable ralink i2c controller.
endef
$(eval $(call KernelPackage,i2c-ralink))
define KernelPackage/hw_nat
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=MTK Hardware NAT
KCONFIG:=CONFIG_RA_HW_NAT
DEPENDS:=@TARGET_ramips_mt7620||@TARGET_ramips_mt7621||@TARGET_mediatek_mt7623_emmc||@TARGET_mediatek_mt7623_mtd
FILES:=$(LINUX_DIR)/net/nat/hw_nat/hw_nat.ko
AUTOLOAD:=$(call AutoProbe,hw_nat)
endef
define KernelPackage/hw_nat/install
$(INSTALL_DIR) $(1)/lib/modules/ralink/
mv $(1)/lib/modules/$(if $(findstring y,$(CONFIG_TARGET_mediatek)),3.10.20,3.10.14)/hw_nat.ko $(1)/lib/modules/ralink/
endef
$(eval $(call KernelPackage,hw_nat))
define KernelPackage/nf-sc
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=Netfilter shortcut
DEPENDS:=+kmod-ipt-core
KCONFIG:=CONFIG_NF_SHORTCUT_HOOK
FILES:=$(LINUX_DIR)/net/netfilter/nf_sc.ko
AUTOLOAD:=$(call AutoProbe,nf_sc)
endef
define KernelPackage/nf-sc/install
$(INSTALL_DIR) $(1)/lib/modules/ralink/
mv $(1)/lib/modules/$(if $(findstring y,$(CONFIG_TARGET_mediatek)),3.10.20,3.10.14)/nf_sc.ko $(1)/lib/modules/ralink/
endef
define KernelPackage/nf-sc/description
Kernel modules support for shortcut
endef
$(eval $(call KernelPackage,nf-sc))
define KernelPackage/sound-mt7620
TITLE:=MT7620 PCM/I2S Alsa Driver
DEPENDS:=@TARGET_ramips_mt7620a +kmod-sound-soc-core +kmod-regmap
KCONFIG:= \
CONFIG_SND_MT7620_SOC_I2S \
CONFIG_SND_MT7620_SOC_WM8960
FILES:= \
$(LINUX_DIR)/sound/soc/ralink/snd-soc-mt7620-i2s.ko \
$(LINUX_DIR)/sound/soc/ralink/snd-soc-mt7620-wm8960.ko \
$(LINUX_DIR)/sound/soc/codecs/snd-soc-wm8960.ko
AUTOLOAD:=$(call AutoLoad,90,snd-soc-wm8960 snd-soc-mt7620-i2s snd-soc-mt7620-wm8960)
$(call AddDepends/sound)
endef
define KernelPackage/sound-mt7620/description
Alsa modules for ralink i2s controller.
endef
$(eval $(call KernelPackage,sound-mt7620))
define KernelPackage/mtk-gdma
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=GDMA Driver
DEPENDS:=@TARGET_ramips_mt7621
KCONFIG:=CONFIG_RALINK_GDMA CONFIG_GDMA_EVERYBODY
FILES:=$(LINUX_DIR)/drivers/char/ralink_gdma.ko
AUTOLOAD:=$(call AutoLoad,90,ralink_gdma)
endef
define KernelPackage/mtk-gdma/description
MediaTek APSoC GDMA driver
endef
$(eval $(call KernelPackage,mtk-gdma))
define KernelPackage/mtk-i2c
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=MTK I2C Driver
DEPENDS:=@TARGET_ramips_mt7621
KCONFIG:=CONFIG_RALINK_I2C
FILES:=$(LINUX_DIR)/drivers/char/i2c_drv.ko
AUTOLOAD:=$(call AutoLoad,90,i2c_drv)
endef
define KernelPackage/mtk-i2c/description
MediaTek APSoC I2C Driver
endef
$(eval $(call KernelPackage,mtk-i2c))
define KernelPackage/mtk-pcm
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=MTK PCM Driver
DEPENDS:=@TARGET_ramips_mt7621 +kmod-mtk-gdma
KCONFIG:=CONFIG_RALINK_PCM
FILES:=$(LINUX_DIR)/drivers/char/pcm/ralink_pcm.ko
AUTOLOAD:=$(call AutoLoad,90,ralink_pcm)
endef
define KernelPackage/mtk-pcm/description
MediaTek APSoC PCM Driver
endef
$(eval $(call KernelPackage,mtk-pcm))
define KernelPackage/mtk-i2s
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=I2S Driver
DEPENDS:=@TARGET_ramips_mt7621 +kmod-mtk-gdma +kmod-mtk-i2c
KCONFIG:=CONFIG_RALINK_I2S CONFIG_I2S_WM8960
FILES:=$(LINUX_DIR)/drivers/char/i2s/core/ralink_i2s.ko
AUTOLOAD:=$(call AutoLoad,90,ralink_i2s)
endef
define KernelPackage/mtk-i2s/description
MediaTek APSoC I2S driver, along with a WM8960 driver (You don't
have to choose /sound/soc/codecs/wm8960 .
endef
$(eval $(call KernelPackage,mtk-i2s))
define KernelPackage/mtk-mmc
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=MMC/SD card support
DEPENDS:=+kmod-mmc
KCONFIG:= \
CONFIG_MTK_MMC=m
FILES:= \
$(LINUX_DIR)/drivers/mmc/host/mtk-mmc/mtk_sd.ko
AUTOLOAD:=$(call AutoLoad,90,mtk_sd)
endef
define KernelPackage/mtk-mmc/description
driver for mtk mmc/sd card controller.
endef
$(eval $(call KernelPackage,mtk-mmc))
define KernelPackage/hw_wdg
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=MTK APSoC Watchdog Driver
KCONFIG:= CONFIG_WATCHDOG=y CONFIG_RALINK_WATCHDOG CONFIG_RALINK_TIMER_WDG_RESET_OUTPUT=y
FILES:=$(LINUX_DIR)/drivers/watchdog/ralink_wdt.ko
AUTOLOAD:=$(call AutoProbe,ralink_wdt)
endef
$(eval $(call KernelPackage,hw_wdg))
define KernelPackage/hw_kwdg
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=Kernel Mode Watchdog
KCONFIG:=CONFIG_RALINK_TIMER CONFIG_RALINK_TIMER_DFS=y CONFIG_RALINK_TIMER_WDG CONFIG_RALINK_WDG_TIMER=10 CONFIG_RALINK_WDG_REFRESH_INTERVAL=4 CONFIG_RALINK_TIMER_WDG_RESET_OUTPUT=y
FILES:=$(LINUX_DIR)/arch/mips/ralink/ralink_wdt.ko
AUTOLOAD:=$(call AutoProbe,ralink_wdt)
endef
$(eval $(call KernelPackage,hw_kwdg))
define KernelPackage/rdm
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=Register Debug Module
KCONFIG:=CONFIG_RALINK_RDM=m
FILES:=$(LINUX_DIR)/drivers/net/rt_rdm/rt_rdm.ko
AUTOLOAD:=$(call AutoProbe,rt_rdm)
endef
$(eval $(call KernelPackage,rdm))
define KernelPackage/cfg80211-normal
CATEGORY:=MTK Properties
SUBMENU:=Drivers
TITLE:=CFG80211 kernel support
KCONFIG:=CONFIG_CFG80211=m
FILES:=$(LINUX_DIR)/net/wireless/cfg80211.ko
AUTOLOAD:=$(call AutoProbe,cfg80211)
endef
$(eval $(call KernelPackage,cfg80211-normal))
|