From: Andrei Gherzan <andrei@gherzan.ro>
To: "Petter Mabäcker" <petter@technux.se>
Cc: yocto@yoctoproject.org
Subject: Re: [meta-raspberrypi][PATCH v3 3/6] rpi-config: I2C support
Date: Tue, 1 Mar 2016 14:23:52 +0100 [thread overview]
Message-ID: <20160301131114.GA21641@resin.home> (raw)
In-Reply-To: <1456667173-28743-4-git-send-email-petter@technux.se>
On Sun, Feb 28, 2016 at 02:46:10PM +0100, Petter Mabäcker wrote:
> With newer kernels (>=3.18) that supports device-trees I2C
> should be enabled with device-trees.
>
> This is now support by adding:
> ENABLE_I2C = "1"
> in local.conf
>
> This will enable the dtparams:
> i2c1
> i2c_arm
>
> Signed-off-by: Petter Mabäcker <petter@technux.se>
> ---
> README | 21 +++++++++++++--------
> recipes-bsp/bootfiles/rpi-config_git.bb | 6 ++++++
> 2 files changed, 19 insertions(+), 8 deletions(-)
>
> diff --git a/README b/README
> index a168692..8ef4e7a 100644
> --- a/README
> +++ b/README
> @@ -21,10 +21,11 @@ Contents:
> 2.G. Optional - Enable offline compositing support
> 2.H. Optional - Enable kgdb over console support
> 2.I. Optional - Enable SPI bus
> - 2.J. Images
> - 2.K. Boot to U-Boot
> - 2.L. Image with Initramfs
> - 2.M. Device tree support
> + 2.J. Optional - Enable I2C
> + 2.K. Images
> + 2.L. Boot to U-Boot
> + 2.M. Image with Initramfs
> + 2.N. Device tree support
> 3. Extra apps
> 3.A. omxplayer
> 4. Source code and mirrors
> @@ -151,8 +152,12 @@ ENABLE_KGDB = "1"
> When using device tree kernels, set this variable to enable the SPI bus
> ENABLE_SPI_BUS = "1"
>
> +2.J. Optional - Enable I2C
> +==========================
> +When using device tree kernels, set this variable to enable I2C
> +ENABLE_I2C = "1"
>
> -2.J. Images
> +2.K. Images
> ===========
> * rpi-hwup-image
> Hardware up image
> @@ -162,7 +167,7 @@ ENABLE_SPI_BUS = "1"
> Image based on rpi-basic-image which includes most of the packages in this
> layer and some media samples.
>
> -2.K. Boot to U-Boot
> +2.L. Boot to U-Boot
> ===================
> To have u-boot load kernel image, set in your local.conf
> KERNEL_IMAGETYPE = "uImage"
> @@ -170,7 +175,7 @@ KERNEL_IMAGETYPE = "uImage"
> This will make kernel.img be u-boot image which will load uImage.
> By default, kernel.img is the actual kernel image (ex. Image).
>
> -2.L. Image with Initramfs
> +2.M. Image with Initramfs
> =========================
> To build an initramfs image :
> * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
> @@ -183,7 +188,7 @@ To build an initramfs image :
> * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
> - KERNEL_INITRAMFS = "-initramfs"
>
> -2.M. Device tree support
> +2.N. Device tree support
> =========================
> Device tree for RPi is only supported when using linux-raspberrypi 3.18+
> kernels.
> diff --git a/recipes-bsp/bootfiles/rpi-config_git.bb b/recipes-bsp/bootfiles/rpi-config_git.bb
> index aa11b25..ccb9b7f 100644
> --- a/recipes-bsp/bootfiles/rpi-config_git.bb
> +++ b/recipes-bsp/bootfiles/rpi-config_git.bb
> @@ -72,6 +72,12 @@ do_deploy() {
> echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> fi
> +
> + if [ -n "${ENABLE_I2C}" ]; then
> + echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> + echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> + echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
> + fi
> }
>
> addtask deploy before do_package after do_install
I rebased this on current master and merged to master. Thanks.
--
Andrei Gherzan
next prev parent reply other threads:[~2016-03-01 13:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-28 13:46 [meta-raspberrypi][PATCH v3 0/6] Various upgrade/fixes from Technux Petter Mabäcker
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 1/6] README: Add SPI bus chapter to content Petter Mabäcker
2016-03-01 13:28 ` Andrei Gherzan
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 2/6] .gitignore: Ignore .swp files Petter Mabäcker
2016-02-29 21:26 ` Andrei Gherzan
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 3/6] rpi-config: I2C support Petter Mabäcker
2016-02-28 17:02 ` Leon Anavi
2016-03-01 13:23 ` Andrei Gherzan [this message]
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 4/6] rpi-base.inc: Allow MACHINE_FEATURES appends Petter Mabäcker
2016-03-01 13:26 ` Andrei Gherzan
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 5/6] pitft: Add basic support for PiTFT Petter Mabäcker
2016-03-01 13:39 ` Andrei Gherzan
2016-02-28 13:46 ` [meta-raspberrypi][PATCH v3 6/6] pitft: Add PiTFT22 support Petter Mabäcker
2016-03-01 23:50 ` Andrei Gherzan
2016-03-02 5:35 ` Petter Mabäcker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160301131114.GA21641@resin.home \
--to=andrei@gherzan.ro \
--cc=petter@technux.se \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.