rpi-config: SPI bus support
PATCH 1/1 rpi-config: SPI bus support
With the newer kernels that use device tree, the SPI bus is only enabled by a device tree setting. This is now supported by adding
ENABLE_SPI_BUS = "1"
in local.conf
--- README | 5 +++++ recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++ 2 files changed, 11 insertions(+)
README +5 -0
@@ -189,6 +189,11 @@ kernels. NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for older kernel versions. +2.M. Optional - enable SPI bus +============================== +When using device tree kernels, set this variable to enable the SPI bus +ENABLE_SPI_BUS = "1" + 3. Extra apps =============
recipes-bsp/bootfiles/rpi-config_git.bb +6 -0
@@ -66,6 +66,12 @@ do_deploy() { echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt fi + + # SPI bus support + if [ -n "${ENABLE_SPI_BUS}" ]; then + echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi } addtask deploy before do_package after do_install
Signature · 1 line
1.9.1
Ping?
Quoted 45 lines · Gary Thomas
With the newer kernels that use device tree, the SPI bus is only enabled by a device tree setting. This is now supported by adding
ENABLE_SPI_BUS= "1"
in local.confSigned-off-by Gary Thomas <[email protected]>--- README | 5 +++++ recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++ 2 files changed, 11 insertions(+)README +5
-0@@ -189,6 +189,11 @@ kernels. NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for older kernel versions. +2.M. Optional - enable SPI bus +============================== +When using device tree kernels, set this variable to enable the SPI bus +ENABLE_SPI_BUS = "1" + 3. Extra apps =============recipes-bsp/bootfiles/rpi-config_git.bb +6
-0@@ -66,6 +66,12 @@ do_deploy() { echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt fi + + # SPI bus support + if [ -n "${ENABLE_SPI_BUS}" ]; then + echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi } addtask deploy before do_package after do_install
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 46 lines · Gary Thomas
Ping?
Quoted 43 lines · Gary Thomas
With the newer kernels that use device tree, the SPI bus is only enabled by a device tree setting. This is now supported by adding
ENABLE_SPI_BUS= "1"
in local.confSigned-off-by Gary Thomas <[email protected]>--- README | 5 +++++ recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++ 2 files changed, 11 insertions(+)README +5
-0@@ -189,6 +189,11 @@ kernels. NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for older kernel versions. +2.M. Optional - enable SPI bus +============================== +When using device tree kernels, set this variable to enable the SPI bus +ENABLE_SPI_BUS = "1" + 3. Extra apps =============recipes-bsp/bootfiles/rpi-config_git.bb +6
-0@@ -66,6 +66,12 @@ do_deploy() { echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt fi + + # SPI bus support + if [ -n "${ENABLE_SPI_BUS}" ]; then + echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi }
Quoted 2 lines
recipes-bsp/bootfiles/rpi-config_git.bb do_deploy() { · line 77
Quoted 2 lines
recipes-bsp/bootfiles/rpi-config_git.bb +0
-0addtask deploy before do_package after do_install
Looks good to me. Compiling and merging soon.
Signature · 1 line
Andrei Gherzan
Andrei Gherzan
AppliedQuoted 47 lines · Andrei Gherzan
Quoted 46 lines · Gary Thomas
Ping?
Quoted 43 lines · Gary Thomas
With the newer kernels that use device tree, the SPI bus is only enabled by a device tree setting. This is now supported by adding
ENABLE_SPI_BUS= "1"
in local.confSigned-off-by Gary Thomas <[email protected]>--- README | 5 +++++ recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++ 2 files changed, 11 insertions(+)README +5
-0@@ -189,6 +189,11 @@ kernels. NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for older kernel versions. +2.M. Optional - enable SPI bus +============================== +When using device tree kernels, set this variable to enable the SPI bus +ENABLE_SPI_BUS = "1" + 3. Extra apps =============recipes-bsp/bootfiles/rpi-config_git.bb +6
-0@@ -66,6 +66,12 @@ do_deploy() { echo "# Enable offline compositing" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo "dispmanx_offline=1" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt fi + + # SPI bus support + if [ -n "${ENABLE_SPI_BUS}" ]; then + echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi }
Quoted 7 lines
Quoted 2 lines
recipes-bsp/bootfiles/rpi-config_git.bb do_deploy() { · line 77
Quoted 2 lines
recipes-bsp/bootfiles/rpi-config_git.bb +0
-0addtask deploy before do_package after do_installLooks good to me. Compiling and merging soon.
Signature · 1 line
Andrei Gherzan
Merged to master. Thank you.
Signature · 1 line
Andrei Gherzan