All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-raspberrypi][PATCH] rpi-config: SPI bus support
@ 2015-11-19 16:52 Gary Thomas
  2015-12-02 14:05 ` Gary Thomas
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2015-11-19 16:52 UTC (permalink / raw)
  To: yocto; +Cc: 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.conf

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
---
 README                                  | 5 +++++
 recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/README b/README
index e16dee9..bef13a3 100644
--- a/README
+++ b/README
@@ -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
 =============
 
diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
index 45b9f1d..aa11b25 100644
--- a/recipes-bsp/bootfiles/rpi-config_git.bb
+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
@@ -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
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [meta-raspberrypi][PATCH] rpi-config: SPI bus support
  2015-11-19 16:52 [meta-raspberrypi][PATCH] rpi-config: SPI bus support Gary Thomas
@ 2015-12-02 14:05 ` Gary Thomas
  2015-12-02 14:20   ` Andrei Gherzan
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Thomas @ 2015-12-02 14:05 UTC (permalink / raw)
  To: yocto

Ping?

On 2015-11-19 09:52, Gary Thomas wrote:
> 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
>
> Signed-off-by: Gary Thomas <gary@mlbassoc.com>
> ---
>   README                                  | 5 +++++
>   recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
>   2 files changed, 11 insertions(+)
>
> diff --git a/README b/README
> index e16dee9..bef13a3 100644
> --- a/README
> +++ b/README
> @@ -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
>   =============
>
> diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
> index 45b9f1d..aa11b25 100644
> --- a/recipes-bsp/bootfiles/rpi-config_git.bb
> +++ b/recipes-bsp/bootfiles/rpi-config_git.bb
> @@ -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
>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-raspberrypi][PATCH] rpi-config: SPI bus support
  2015-12-02 14:05 ` Gary Thomas
@ 2015-12-02 14:20   ` Andrei Gherzan
  2015-12-02 21:42     ` Andrei Gherzan
  0 siblings, 1 reply; 4+ messages in thread
From: Andrei Gherzan @ 2015-12-02 14:20 UTC (permalink / raw)
  To: Gary Thomas; +Cc: yocto

On Wed, Dec 02, 2015 at 07:05:38AM -0700, Gary Thomas wrote:
> Ping?
> 
> On 2015-11-19 09:52, Gary Thomas wrote:
> >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
> >
> >Signed-off-by: Gary Thomas <gary@mlbassoc.com>
> >---
> >  README                                  | 5 +++++
> >  recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
> >  2 files changed, 11 insertions(+)
> >
> >diff --git a/README b/README
> >index e16dee9..bef13a3 100644
> >--- a/README
> >+++ b/README
> >@@ -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
> >  =============
> >
> >diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
> >index 45b9f1d..aa11b25 100644
> >--- a/recipes-bsp/bootfiles/rpi-config_git.bb
> >+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
> >@@ -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
> >

Looks good to me. Compiling and merging soon.

-- 
Andrei Gherzan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-raspberrypi][PATCH] rpi-config: SPI bus support
  2015-12-02 14:20   ` Andrei Gherzan
@ 2015-12-02 21:42     ` Andrei Gherzan
  0 siblings, 0 replies; 4+ messages in thread
From: Andrei Gherzan @ 2015-12-02 21:42 UTC (permalink / raw)
  To: Gary Thomas; +Cc: yocto

On Wed, Dec 02, 2015 at 03:20:56PM +0100, Andrei Gherzan wrote:
> On Wed, Dec 02, 2015 at 07:05:38AM -0700, Gary Thomas wrote:
> > Ping?
> > 
> > On 2015-11-19 09:52, Gary Thomas wrote:
> > >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
> > >
> > >Signed-off-by: Gary Thomas <gary@mlbassoc.com>
> > >---
> > >  README                                  | 5 +++++
> > >  recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
> > >  2 files changed, 11 insertions(+)
> > >
> > >diff --git a/README b/README
> > >index e16dee9..bef13a3 100644
> > >--- a/README
> > >+++ b/README
> > >@@ -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
> > >  =============
> > >
> > >diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
> > >index 45b9f1d..aa11b25 100644
> > >--- a/recipes-bsp/bootfiles/rpi-config_git.bb
> > >+++ b/recipes-bsp/bootfiles/rpi-config_git.bb
> > >@@ -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
> > >
> 
> Looks good to me. Compiling and merging soon.
> 
> -- 
> Andrei Gherzan

Merged to master. Thank you.
-- 
Andrei Gherzan


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-02 21:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19 16:52 [meta-raspberrypi][PATCH] rpi-config: SPI bus support Gary Thomas
2015-12-02 14:05 ` Gary Thomas
2015-12-02 14:20   ` Andrei Gherzan
2015-12-02 21:42     ` Andrei Gherzan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.