[OpenWrt-Devel] [PATCH 6/8] brcm2708: improve modules
Álvaro Fernández Rojas
noltari at gmail.com
Tue Jul 14 14:15:59 EDT 2015
- Add upstream (bcm2835) modules and improve downstream ones (bcm2708)
- Override disabled device tree module status from config.txt
Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
target/linux/brcm2708/image/config.txt | 6 +++
target/linux/brcm2708/modules.mk | 71 ++++++++++++++++++++++++++++------
2 files changed, 66 insertions(+), 11 deletions(-)
diff --git a/target/linux/brcm2708/image/config.txt b/target/linux/brcm2708/image/config.txt
index 9e6e8e9..f66f6bc 100644
--- a/target/linux/brcm2708/image/config.txt
+++ b/target/linux/brcm2708/image/config.txt
@@ -921,3 +921,9 @@ init_uart_clock=3000000
## 8 1.4 V
##
#over_voltage_sdram_p=0
+
+################################################################################
+## Device Tree Settings
+################################################################################
+
+dtparam=random=on,watchdog=on,audio=on,i2c0=on,i2c1=on,spi=on
diff --git a/target/linux/brcm2708/modules.mk b/target/linux/brcm2708/modules.mk
index 408382d..3f9c118 100644
--- a/target/linux/brcm2708/modules.mk
+++ b/target/linux/brcm2708/modules.mk
@@ -6,7 +6,7 @@
#
define KernelPackage/sound-arm-bcm2835
- TITLE:=Broadcom 2708,2835 SoC sound support
+ TITLE:=BCM2835 ALSA driver
KCONFIG:= \
CONFIG_SND_ARM=y \
CONFIG_SND_BCM2835 \
@@ -19,14 +19,15 @@ define KernelPackage/sound-arm-bcm2835
endef
define KernelPackage/sound-arm-bcm2835/description
- This package contains the Broadcom 2708/2835 sound driver
+ This package contains the BCM2835 ALSA pcm card driver
endef
$(eval $(call KernelPackage,sound-arm-bcm2835))
+
define KernelPackage/random-bcm2708
SUBMENU:=$(OTHER_MENU)
- TITLE:=BCM2708 H/W Random Number Generator
+ TITLE:=BCM2708 HW Random Number Generator
KCONFIG:=CONFIG_HW_RANDOM_BCM2708
FILES:=$(LINUX_DIR)/drivers/char/hw_random/bcm2708-rng.ko
AUTOLOAD:=$(call AutoLoad,11,bcm2708-rng)
@@ -39,14 +40,30 @@ endef
$(eval $(call KernelPackage,random-bcm2708))
+define KernelPackage/random-bcm2835
+ SUBMENU:=$(OTHER_MENU)
+ TITLE:=BCM2835 HW Random Number Generator
+ KCONFIG:=CONFIG_HW_RANDOM_BCM2835
+ FILES:=$(LINUX_DIR)/drivers/char/hw_random/bcm2835-rng.ko
+ AUTOLOAD:=$(call AutoLoad,11,bcm2835-rng)
+ DEPENDS:=@TARGET_brcm2708 +kmod-random-core
+endef
+
+define KernelPackage/random-bcm2835/description
+ This package contains the Broadcom 2835 HW random number generator driver
+endef
+
+$(eval $(call KernelPackage,random-bcm2835))
+
define KernelPackage/spi-bcm2708
SUBMENU:=$(SPI_MENU)
- TITLE:=BCM2708 SPI controller driver (SPI0)
- KCONFIG:=CONFIG_SPI_BCM2708 \
- CONFIG_SPI=y \
- CONFIG_SPI_MASTER=y \
- CONFIG_BCM2708_SPIDEV=y
+ TITLE:=BCM2708 SPI controller driver
+ KCONFIG:= \
+ CONFIG_BCM2708_SPIDEV=n \
+ CONFIG_SPI=y \
+ CONFIG_SPI_BCM2708 \
+ CONFIG_SPI_MASTER=y
FILES:=$(LINUX_DIR)/drivers/spi/spi-bcm2708.ko
AUTOLOAD:=$(call AutoLoad,89,spi-bcm2708)
DEPENDS:=@TARGET_brcm2708
@@ -58,13 +75,31 @@ endef
$(eval $(call KernelPackage,spi-bcm2708))
+define KernelPackage/spi-bcm2835
+ SUBMENU:=$(SPI_MENU)
+ TITLE:=BCM2835 SPI controller driver
+ KCONFIG:=\
+ CONFIG_BCM2708_SPIDEV=n \
+ CONFIG_SPI=y \
+ CONFIG_SPI_BCM2835 \
+ CONFIG_SPI_MASTER=y
+ FILES:=$(LINUX_DIR)/drivers/spi/spi-bcm2835.ko
+ AUTOLOAD:=$(call AutoLoad,89,spi-bcm2835)
+ DEPENDS:=@TARGET_brcm2708
+endef
+
+define KernelPackage/spi-bcm2835/description
+ This package contains the Broadcom 2835 SPI master controller driver
+endef
+
+$(eval $(call KernelPackage,spi-bcm2835))
+
define KernelPackage/hwmon-bcm2835
TITLE:=BCM2835 HWMON driver
KCONFIG:=CONFIG_SENSORS_BCM2835
FILES:=$(LINUX_DIR)/drivers/hwmon/bcm2835-hwmon.ko
AUTOLOAD:=$(call AutoLoad,60,bcm2835-hwmon)
- DEPENDS:=@TARGET_brcm2708
$(call AddDepends/hwmon, at TARGET_brcm2708)
endef
@@ -80,9 +115,8 @@ I2C_BCM2708_MODULES:=\
define KernelPackage/i2c-bcm2708
$(call i2c_defaults,$(I2C_BCM2708_MODULES),59)
- KCONFIG+= \
- CONFIG_I2C_BCM2708_BAUDRATE=100000
TITLE:=Broadcom BCM2708 I2C master controller driver
+ KCONFIG+= CONFIG_I2C_BCM2708_BAUDRATE=100000
DEPENDS:=@TARGET_brcm2708 +kmod-i2c-core
endef
@@ -91,3 +125,18 @@ define KernelPackage/i2c-bcm2708/description
endef
$(eval $(call KernelPackage,i2c-bcm2708))
+
+I2C_BCM2835_MODULES:=\
+ CONFIG_I2C_BCM2835:drivers/i2c/busses/i2c-bcm2835
+
+define KernelPackage/i2c-bcm2835
+ $(call i2c_defaults,$(I2C_BCM2835_MODULES),59)
+ TITLE:=Broadcom BCM2835 I2C master controller driver
+ DEPENDS:=@TARGET_brcm2708 +kmod-i2c-core
+endef
+
+define KernelPackage/i2c-bcm2835/description
+ This package contains the Broadcom 2835 I2C master controller driver
+endef
+
+$(eval $(call KernelPackage,i2c-bcm2835))
--
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list