Skip to contentSkip to conversation

Various upgrade/fixes from Technux

PATCH Applied Petter Mabäcker 4 participants 11 messages Mar 30, 2016 – Apr 25, 2016 Broadcom BCM2711/BCM2835 Arm architecture

v2 of 3 Applied Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Various upgrade/fixes from Technux

Various fixes from Technux, with focus on PiTFT28 resistive support and Official Raspberry Pi 7 inch touchscreen enablers.

Petter Mabäcker (5):
pitft: Add support for pitft28r rpi-base.inc: Remove deprecated MACHINE_FEATURES rpi-base.inc: Add overlay for rpi-ft5406 .gitignore: Ignore some additional files
linux-raspberrypi: Drop support for 3.14

 .gitignore                                         |   2 +
 README                                             |   3 +-
 conf/machine/include/rpi-base.inc                  |   4 +-
 recipes-bsp/bootfiles/rpi-config_git.bb            |   6 +
 .../rpi/xorg.conf.d/98-pitft.conf                  |   5 +
 .../rpi/xorg.conf.d/99-calibration.conf            |   6 +
 .../rpi/xorg.conf.d/99-pitft.conf                  |   5 -
 .../xorg-xserver/xserver-xf86-config_0.1.bbappend  |   6 +-
 .../0001-ASoC-Add-BCM2708-fixes.patch              | 263 ---------------------
 ...ng-lock-from-atomic-context-in-i2c-driver.patch | 235 ------------------
 recipes-kernel/linux/linux-raspberrypi.inc         |   2 +
 recipes-kernel/linux/linux-raspberrypi_3.14.bb     |  11 -
 12 files changed, 30 insertions(+), 518 deletions(-)
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/98-pitft.conf
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-calibration.conf
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi-3.14/0001-ASoC-Add-BCM2708-fixes.patch
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi-3.14/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.14.bb
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/5 pitft: Add support for pitft28r

The support for PiTFT 28 inch resistive touchscreen is optional and can be enabled by adding below in local.conf:

MACHINE_FEATURES += "pitft pitft28r"

While at it also fix a minor typo in README.

---
 README                                                              | 3 ++-
 conf/machine/include/rpi-base.inc                                   | 1 +
 recipes-bsp/bootfiles/rpi-config_git.bb                             | 6 ++++++
 .../xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/98-pitft.conf  | 5 +++++
 .../xserver-xf86-config/rpi/xorg.conf.d/99-calibration.conf         | 6 ++++++
 .../xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf  | 5 -----
 recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend      | 6 ++++--
 recipes-kernel/linux/linux-raspberrypi.inc                          | 2 ++
 8 files changed, 26 insertions(+), 8 deletions(-)
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/98-pitft.conf
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-calibration.conf
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
README +2 -1
index 536926b..3a7735c 100644
@@ -204,7 +204,7 @@ kernels.
 NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for
       older kernel versions.
 
-3.L. Eenable SPI bus
+3.L. Enable SPI bus
 ====================
 When using device tree kernels, set this variable to enable the SPI bus
 ENABLE_SPI_BUS = "1"
@@ -232,6 +232,7 @@ the modelname should be added as a MACHINE_FEATURES in local.conf like below:
 
 List of currently supported models:
     - pitft22
+    - pitft28r
 
 
 4. Extra apps
conf/machine/include/rpi-base.inc +1 -0
index 792150e..a9e8053 100644
@@ -33,6 +33,7 @@ KERNEL_DEVICETREE ?= " \
     overlays/iqaudio-dacplus-overlay.dtb \
     overlays/lirc-rpi-overlay.dtb \
     overlays/pitft22-overlay.dtb \
+    overlays/pitft28-resistive-overlay.dtb \
     overlays/pps-gpio-overlay.dtb \
     overlays/w1-gpio-overlay.dtb \
     overlays/w1-gpio-pullup-overlay.dtb \
recipes-bsp/bootfiles/rpi-config_git.bb +6 -0
index 4d41723..2941982 100644
@@ -17,6 +17,7 @@ PR = "r4"
 
 PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
 PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
+PITFT28r="${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "1", "0", d)}"
 
 inherit deploy
 
@@ -90,6 +91,11 @@ do_deploy() {
         echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
+
+    if [ "${PITFT28r}" = "1" ]; then
+        echo "# Enable PITFT28r display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        echo "dtoverlay=pitft28-resistive,rotate=90,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
 }
 
 addtask deploy before do_package after do_install
recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/98-pitft.conf new file +5 -0
new file mode 100644
index 0000000..0d2b36b
@@ -0,0 +1,5 @@
+Section "Device"
+    Identifier "Adafruit PiTFT"
+    Driver "fbdev"
+    Option "fbdev" "/dev/fb1"
+EndSection
recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-calibration.conf new file +6 -0
new file mode 100644
index 0000000..f8b578c
@@ -0,0 +1,6 @@
+Section "InputClass"
+        Identifier      "calibration"
+        MatchProduct    "stmpe-ts"
+        Option  "Calibration"   "3800 200 200 3800"
+        Option  "SwapAxes"      "1"
+EndSection
recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf deleted +0 -5
deleted file mode 100644
index 0d2b36b..0000000
@@ -1,5 +0,0 @@
-Section "Device"
-    Identifier "Adafruit PiTFT"
-    Driver "fbdev"
-    Option "fbdev" "/dev/fb1"
-EndSection
recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend +4 -2
index 0ae2ee0..062de2d 100644
@@ -1,7 +1,8 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
 SRC_URI_append_rpi = " file://xorg.conf.d/10-evdev.conf \
-                       file://xorg.conf.d/99-pitft.conf \
+                       file://xorg.conf.d/98-pitft.conf \
+                       file://xorg.conf.d/99-calibration.conf \
                      "
 
 do_install_append_rpi () {
@@ -10,7 +11,8 @@ do_install_append_rpi () {
 
 	PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
 	if [ "${PITFT}" = "1" ]; then
-		install -m 0644 ${WORKDIR}/xorg.conf.d/99-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
+		install -m 0644 ${WORKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
+		install -m 0644 ${WORKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
 	fi
 }
 
recipes-kernel/linux/linux-raspberrypi.inc +2 -0
index 24e7fe2..142ad7f 100644
@@ -27,6 +27,8 @@ CMDLINE_append = ' ${@base_conditional("ENABLE_KGDB", "1", "kgdboc=ttyAMA0,11520
 
 UDEV_GE_141 ?= "1"
 
+KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}"
+
 # Set programmatically some variables during recipe parsing
 # See http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python-functions
 python __anonymous () {
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 2/5 rpi-base.inc: Remove deprecated MACHINE_FEATURES

In reply to Petter Mabäcker
---
 conf/machine/include/rpi-base.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/include/rpi-base.inc +1 -1
index a9e8053..f70e952 100644
@@ -40,7 +40,7 @@ KERNEL_DEVICETREE ?= " \
     "
 KERNEL_IMAGETYPE ?= "Image"
 
-MACHINE_FEATURES += "kernel26 apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
+MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
 
 # Raspberry Pi has no hardware clock
 MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
Signature · 1 line
1.9.1
#3 lore raw

PATCH v2 3/5 rpi-base.inc: Add overlay for rpi-ft5406

In reply to Petter Mabäcker

rpi-ft5406 is an enabler for Official Raspberry Pi 7 inch touchscreen support.

---
 conf/machine/include/rpi-base.inc | 1 +
 1 file changed, 1 insertion(+)
conf/machine/include/rpi-base.inc +1 -0
index f70e952..34eb774 100644
@@ -35,6 +35,7 @@ KERNEL_DEVICETREE ?= " \
     overlays/pitft22-overlay.dtb \
     overlays/pitft28-resistive-overlay.dtb \
     overlays/pps-gpio-overlay.dtb \
+    overlays/rpi-ft5406-overlay.dtb \
     overlays/w1-gpio-overlay.dtb \
     overlays/w1-gpio-pullup-overlay.dtb \
     "
Signature · 1 line
1.9.1
#4 lore raw

Re: [meta-raspberrypi][PATCH v2 3/5] rpi-base.inc: Add overlay for rpi-ft5406

Quoted 2 lines · Petter Mabäcker

rpi-ft5406 is an enabler for Official Raspberry Pi 7 inch touchscreen support.

I have an official raspberry pi 7" touchscreen and it's not obvious to me how I would go about enabling it in my config. If I had one of the others I would simply add:

	MACHINE_FEATURES += "pitft pitft22"

or

	MACHINE_FEATURES += "pitft pitft28r"

to my conf/local.conf, but what do I do for the official touchscreen?

Also, by trial and error I've discovered that my touchscreen comes up as /dev/fb0 and not /dev/fb1. But the xorg config for touchscreen support assumes /dev/fb1. Am I doing something wrong in my build or can anyone think of a reason why my screen would be /dev/fb0 instead of /dev/fb1?

By the way

	MACHINE_FEATURES += "pitft pitft22"

seems to work for me if I use /dev/fb0, but I'm not sure if that's a fluke?

Best regards,
Trevor

#5 lore raw

Re: [meta-raspberrypi][PATCH v2 3/5] rpi-base.inc: Add overlay for rpi-ft5406

Quoted 6 lines · Trevor Woerner
Quoted 2 lines · Petter Mabäcker

rpi-ft5406 is an enabler for Official Raspberry Pi 7 inch touchscreen support.

I have an official raspberry pi 7" touchscreen and it's not obvious to me

how

Quoted 1 line

I would go about enabling it in my config. If I had one of the others I

would

Quoted 4 lines

simply add:

        MACHINE_FEATURES += "pitft pitft22"
Quoted 8 lines

or

        MACHINE_FEATURES += "pitft pitft28r"

to my conf/local.conf, but what do I do for the official touchscreen?

Also, by trial and error I've discovered that my touchscreen comes up as /dev/fb0 and not /dev/fb1. But the xorg config for touchscreen support

assumes

Quoted 8 lines

/dev/fb1. Am I doing something wrong in my build or can anyone think of a reason why my screen would be /dev/fb0 instead of /dev/fb1?

By the way

        MACHINE_FEATURES += "pitft pitft22"

seems to work for me if I use /dev/fb0, but I'm not sure if that's a

fluke?

Check the device trees. Are you using 4.1 kernel or some other

Quoted 8 lines

Best regards,
Trevor
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#6 lore raw

Re: [meta-raspberrypi][PATCH v2 3/5] rpi-base.inc: Add overlay for rpi-ft5406

In reply to Trevor Woerner

2016-04-14 00:04 skrev Trevor Woerner:

Quoted 1 line

On Wed 2016-03-30 @

Quoted 2 lines · Petter Mabäcker
Quoted 2 lines

rpi-ft5406 is an enabler for

Official Raspberry Pi 7 inch touchscreen support.

Quoted 2 lines

I have an

official raspberry pi 7" touchscreen and it's not obvious to me how

Quoted 1 line

I

would go about enabling it in my config. If I had one of the others I would

Quoted 10 lines

simply add:

MACHINE_FEATURES += "pitft pitft22"

or

MACHINE_FEATURES += "pitft pitft28r"

to my conf/local.conf, but

what do I do for the official touchscreen?

Quoted 2 lines

Also, by trial and error

I've discovered that my touchscreen comes up as

Quoted 1 line

/dev/fb0 and not

/dev/fb1. But the xorg config for touchscreen support assumes

Quoted 1 line

/dev/fb1. Am I doing something wrong in my build or can anyone think of a

Quoted 3 lines

reason why my screen would be /dev/fb0 instead of /dev/fb1?

By

the way

Quoted 4 lines

MACHINE_FEATURES += "pitft pitft22"

seems to work for

me if I use /dev/fb0, but I'm not sure if that's a fluke?

Quoted 2 lines

Best

regards,

Quoted 1 line

Trevor

Hi Trevor,

Actually it's very simple for the
Official rpi touchscreen.

1. Ensure that you DON'T have pitft support
enabled when using this touchscreen! (PiTFT uses /dev/fb1, which isn't the case for the official toucscreen).

2. Build for example
'core-image-sato'

3. Add:

echo "dtoverlay=rpi-ft5406" >>
/path/to/sdcard/boot/config.txt

...and you are done.

Like stated in
the commit msg this is just an enabler for being able to configure rpi-ft5406. When I have time I will send the complete solution for this, perhaps a good idea is to do like a MACHINE_FEATURES as well, to make it look similar to the PiTFT's usage?

BR Petter

Petter
Mabäcker

Technux <[email protected]>
www.technux.se

#7 lore raw

Re: [meta-raspberrypi][PATCH v2 3/5] rpi-base.inc: Add overlay for rpi-ft5406

In reply to Trevor Woerner

Hi Trevor,

Quoted 21 lines · Trevor Woerner
Quoted 2 lines · Petter Mabäcker

rpi-ft5406 is an enabler for Official Raspberry Pi 7 inch touchscreen support.

I have an official raspberry pi 7" touchscreen and it's not obvious to me how I would go about enabling it in my config. If I had one of the others I would simply add:

	MACHINE_FEATURES += "pitft pitft22"

or

	MACHINE_FEATURES += "pitft pitft28r"

to my conf/local.conf, but what do I do for the official touchscreen?

Also, by trial and error I've discovered that my touchscreen comes up as /dev/fb0 and not /dev/fb1. But the xorg config for touchscreen support assumes /dev/fb1. Am I doing something wrong in my build or can anyone think of a reason why my screen would be /dev/fb0 instead of /dev/fb1?

Quoted 6 lines

By the way

	MACHINE_FEATURES += "pitft pitft22"

seems to work for me if I use /dev/fb0, but I'm not sure if that's a fluke?

Sorry for not being able to follow this thread. Did you manage to make it work?

Regards,
--
Andrei Gherzan

#9 lore raw

PATCH v2 5/5 linux-raspberrypi: Drop support for 3.14

In reply to Petter Mabäcker

General policy is to support three kernel versions; latest stable + two longterm versions. These are currently 4.4, 4.1, and 3.18.

---
 .../0001-ASoC-Add-BCM2708-fixes.patch              | 263 ---------------------
 ...ng-lock-from-atomic-context-in-i2c-driver.patch | 235 ------------------
 recipes-kernel/linux/linux-raspberrypi_3.14.bb     |  11 -
 3 files changed, 509 deletions(-)
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi-3.14/0001-ASoC-Add-BCM2708-fixes.patch
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi-3.14/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.14.bb
recipes-kernel/linux/linux-raspberrypi-3.14/0001-ASoC-Add-BCM2708-fixes.patch deleted +0 -263
deleted file mode 100644
index 26c71b8..0000000
@@ -1,263 +0,0 @@
-From e73a69601c65103b0e032e6093af0f00a1e1af3a Mon Sep 17 00:00:00 2001
-From: Florian Meier <[email protected]>
-Date: Fri, 22 Nov 2013 14:33:38 +0100
-Subject: [PATCH 1/2] ASoC: Add BCM2708 fixes
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-(cherry-pick remaining parts of
-730cb8a1216f9da3d097072cd9bb06e0db348172)
-
-bcm2708-i2s: Update bclk_ratio to more correct values
-
-Move GPIO setup to hw_params.
-
-This is used to stop the I2S driver from breaking
-the GPIO setup for other uses of the PCM interface
-
-Configure GPIOs for I2S based on revision/card settings
-
-With RPi model B+, assignment of the I2S GPIO pins has changed.
-This patch uses the board revision to auto-detect the GPIOs used
-for I2S. It also allows sound card drivers to set the GPIOs that
-should be used. This is especially important with the Compute
-Module.
-
-bcm2708-i2s: Avoid leak from iomap when accessing gpio
-
-bcm2708: Eliminate i2s debugfs directory error
-
-Qualify the two regmap ranges uses by bcm2708-i2s ('-i2s' and '-clk')
-to avoid the name clash when registering debugfs entries.
-
-Upstream-Status: Pending
-
-Signed-off-by: Petter Mabäcker <[email protected]>
-
-Conflicts:
-	sound/soc/bcm/Kconfig
-	sound/soc/bcm/Makefile
-	sound/soc/bcm/bcm2708-i2s.c
----
- sound/soc/bcm/bcm2708-i2s.c | 82 ++++++++++++++++++++++++++++++++++++---------
- sound/soc/bcm/bcm2708-i2s.h | 35 +++++++++++++++++++
- 2 files changed, 102 insertions(+), 15 deletions(-)
- create mode 100644 sound/soc/bcm/bcm2708-i2s.h
-
-diff --git a/sound/soc/bcm/bcm2708-i2s.c b/sound/soc/bcm/bcm2708-i2s.c
-index 9976571..3fcb740 100644
---- a/sound/soc/bcm/bcm2708-i2s.c
-+++ b/sound/soc/bcm/bcm2708-i2s.c
-@@ -31,6 +31,8 @@
-  * General Public License for more details.
-  */
- 
-+#include "bcm2708-i2s.h"
-+
- #include <linux/init.h>
- #include <linux/module.h>
- #include <linux/device.h>
-@@ -38,6 +40,7 @@
- #include <linux/delay.h>
- #include <linux/io.h>
- #include <linux/clk.h>
-+#include <mach/gpio.h>
- 
- #include <sound/core.h>
- #include <sound/pcm.h>
-@@ -46,6 +49,8 @@
- #include <sound/soc.h>
- #include <sound/dmaengine_pcm.h>
- 
-+#include <asm/system_info.h>
-+
- /* Clock registers */
- #define BCM2708_CLK_PCMCTL_REG  0x00
- #define BCM2708_CLK_PCMDIV_REG  0x04
-@@ -163,6 +168,9 @@ static const unsigned int bcm2708_clk_freq[BCM2708_CLK_SRC_HDMI+1] = {
- #define BCM2708_DMA_DREQ_PCM_TX		2
- #define BCM2708_DMA_DREQ_PCM_RX		3
- 
-+/* I2S pin configuration */
-+static int bcm2708_i2s_gpio=BCM2708_I2S_GPIO_AUTO;
-+
- /* General device struct */
- struct bcm2708_i2s_dev {
- 	struct device				*dev;
-@@ -174,6 +182,12 @@ struct bcm2708_i2s_dev {
- 	struct regmap *clk_regmap;
- };
- 
-+void bcm2708_i2s_set_gpio(int gpio) {
-+	bcm2708_i2s_gpio=gpio;
-+}
-+EXPORT_SYMBOL(bcm2708_i2s_set_gpio);
-+
-+
- static void bcm2708_i2s_start_clock(struct bcm2708_i2s_dev *dev)
- {
- 	/* Start the clock if in master mode */
-@@ -306,6 +320,25 @@ static int bcm2708_i2s_set_dai_bclk_ratio(struct snd_soc_dai *dai,
- }
- 
- 
-+static int bcm2708_i2s_set_function(unsigned offset, int function)
-+{
-+	#define GPIOFSEL(x)  (0x00+(x)*4)
-+	void __iomem *gpio = __io_address(GPIO_BASE);
-+	unsigned alt = function <= 3 ? function + 4: function == 4 ? 3 : 2;
-+	unsigned gpiodir;
-+	unsigned gpio_bank = offset / 10;
-+	unsigned gpio_field_offset = (offset - 10 * gpio_bank) * 3;
-+
-+	if (offset >= BCM2708_NR_GPIOS)
-+		return -EINVAL;
-+
-+	gpiodir = readl(gpio + GPIOFSEL(gpio_bank));
-+	gpiodir &= ~(7 << gpio_field_offset);
-+	gpiodir |= alt << gpio_field_offset;
-+	writel(gpiodir, gpio + GPIOFSEL(gpio_bank));
-+	return 0;
-+}
-+
- static void bcm2708_i2s_setup_gpio(void)
- {
- 	/*
-@@ -314,20 +347,37 @@ static void bcm2708_i2s_setup_gpio(void)
- 	 * TODO Better way would be to handle
- 	 * this in the device tree!
- 	 */
--#define INP_GPIO(g) *(gpio+((g)/10)) &= ~(7<<(((g)%10)*3))
--#define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3))
-+	int pin,pinconfig,startpin,alt;
-+
-+	/* SPI is on different GPIOs on different boards */
-+        /* for Raspberry Pi B+, this is pin GPIO18-21, for original on 28-31 */
-+	if (bcm2708_i2s_gpio==BCM2708_I2S_GPIO_AUTO) {	
-+		if ((system_rev & 0xffffff) >= 0x10) {
-+			/* Model B+ */
-+			pinconfig=BCM2708_I2S_GPIO_PIN18;
-+		} else {
-+			/* original */
-+			pinconfig=BCM2708_I2S_GPIO_PIN28;
-+		}
-+	} else {
-+		pinconfig=bcm2708_i2s_gpio;
-+	}
- 
--	unsigned int *gpio;
--	int pin;
--	gpio = ioremap(GPIO_BASE, SZ_16K);
-+	if (pinconfig==BCM2708_I2S_GPIO_PIN18) {
-+		startpin=18;
-+		alt=BCM2708_I2S_GPIO_PIN18_ALT;
-+	} else if (pinconfig==BCM2708_I2S_GPIO_PIN28) {
-+		startpin=28;
-+		alt=BCM2708_I2S_GPIO_PIN28_ALT;
-+	} else {
-+		printk(KERN_INFO "Can't configure I2S GPIOs, unknown pin mode for I2S: %i\n",pinconfig);
-+		return;
-+	}	
- 
--	/* SPI is on GPIO 7..11 */
--	for (pin = 28; pin <= 31; pin++) {
--		INP_GPIO(pin);		/* set mode to GPIO input first */
--		SET_GPIO_ALT(pin, 2);	/* set mode to ALT 0 */
-+	/* configure I2S pins to correct ALT mode */
-+	for (pin = startpin; pin <= startpin+3; pin++) {
-+		bcm2708_i2s_set_function(pin, alt);
- 	}
--#undef INP_GPIO
--#undef SET_GPIO_ALT
- }
- 
- static int bcm2708_i2s_hw_params(struct snd_pcm_substream *substream,
-@@ -372,15 +422,15 @@ static int bcm2708_i2s_hw_params(struct snd_pcm_substream *substream,
- 	switch (params_format(params)) {
- 	case SNDRV_PCM_FORMAT_S16_LE:
- 		data_length = 16;
--		bclk_ratio = 40;
-+		bclk_ratio = 50;
- 		break;
- 	case SNDRV_PCM_FORMAT_S24_LE:
- 		data_length = 24;
--		bclk_ratio = 40;
-+		bclk_ratio = 50;
- 		break;
- 	case SNDRV_PCM_FORMAT_S32_LE:
- 		data_length = 32;
--		bclk_ratio = 80;
-+		bclk_ratio = 100;
- 		break;
- 	default:
- 		return -EINVAL;
-@@ -746,7 +796,7 @@ static struct snd_soc_dai_driver bcm2708_i2s_dai = {
- 		.channels_max = 2,
- 		.rates =	SNDRV_PCM_RATE_8000_192000,
- 		.formats =	SNDRV_PCM_FMTBIT_S16_LE
--				// | SNDRV_PCM_FMTBIT_S24_LE : disable for now, it causes white noise with xbmc
-+				| SNDRV_PCM_FMTBIT_S24_LE
- 				| SNDRV_PCM_FMTBIT_S32_LE
- 		},
- 	.capture = {
-@@ -803,6 +853,7 @@ static const struct regmap_config bcm2708_regmap_config[] = {
- 		.precious_reg = bcm2708_i2s_precious_reg,
- 		.volatile_reg = bcm2708_i2s_volatile_reg,
- 		.cache_type = REGCACHE_RBTREE,
-+		.name = "i2s",
- 	},
- 	{
- 		.reg_bits = 32,
-@@ -811,6 +862,7 @@ static const struct regmap_config bcm2708_regmap_config[] = {
- 		.max_register = BCM2708_CLK_PCMDIV_REG,
- 		.volatile_reg = bcm2708_clk_volatile_reg,
- 		.cache_type = REGCACHE_RBTREE,
-+		.name = "clk",
- 	},
- };
- 
-diff --git a/sound/soc/bcm/bcm2708-i2s.h b/sound/soc/bcm/bcm2708-i2s.h
-new file mode 100644
-index 0000000..94fed6a
---- /dev/null
-+++ b/sound/soc/bcm/bcm2708-i2s.h
-@@ -0,0 +1,35 @@
-+/*
-+ * I2S configuration for sound cards. 
-+ *
-+ * Copyright (c) 2014 Daniel Matuschek <[email protected]>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ */
-+
-+#ifndef BCM2708_I2S_H
-+#define BCM2708_I2S_H
-+
-+/* I2S pin assignment */
-+#define BCM2708_I2S_GPIO_AUTO	0
-+#define BCM2708_I2S_GPIO_PIN18	1
-+#define BCM2708_I2S_GPIO_PIN28	2
-+
-+/* Alt mode to enable I2S */
-+#define BCM2708_I2S_GPIO_PIN18_ALT	0
-+#define BCM2708_I2S_GPIO_PIN28_ALT	2
-+
-+extern void bcm2708_i2s_set_gpio(int gpio);
-+
-+#endif
--- 
-1.9.1
-
recipes-kernel/linux/linux-raspberrypi-3.14/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch deleted +0 -235

235 lines not on this page · raw message

recipes-kernel/linux/linux-raspberrypi_3.14.bb deleted +0 -11
deleted file mode 100644
index f6e6291..0000000
@@ -1,11 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
-
-LINUX_VERSION ?= "3.14.28"
-
-SRCREV = "e294028d7733a30f3befacc41d473c251096a515"
-SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.14.y \
-           file://0001-ASoC-Add-BCM2708-fixes.patch \
-           file://0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch \
-          "
-
-require linux-raspberrypi.inc
Signature · 1 line
1.9.1
#10 lore raw
In reply to Petter Mabäcker
Quoted 30 lines · Petter Mabäcker

Various fixes from Technux, with focus on PiTFT28 resistive support and Official Raspberry Pi 7 inch touchscreen enablers.

Petter Mabäcker (5):
pitft: Add support for pitft28r rpi-base.inc: Remove deprecated MACHINE_FEATURES rpi-base.inc: Add overlay for rpi-ft5406 .gitignore: Ignore some additional files
linux-raspberrypi: Drop support for 3.14

 .gitignore                                         |   2 +
 README                                             |   3 +-
 conf/machine/include/rpi-base.inc                  |   4 +-
 recipes-bsp/bootfiles/rpi-config_git.bb            |   6 +
 .../rpi/xorg.conf.d/98-pitft.conf                  |   5 +
 .../rpi/xorg.conf.d/99-calibration.conf            |   6 +
 .../rpi/xorg.conf.d/99-pitft.conf                  |   5 -
 .../xorg-xserver/xserver-xf86-config_0.1.bbappend  |   6 +-
 .../0001-ASoC-Add-BCM2708-fixes.patch              | 263 ---------------------
 ...ng-lock-from-atomic-context-in-i2c-driver.patch | 235 ------------------
 recipes-kernel/linux/linux-raspberrypi.inc         |   2 +
 recipes-kernel/linux/linux-raspberrypi_3.14.bb     |  11 -
 12 files changed, 30 insertions(+), 518 deletions(-)
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/98-pitft.conf
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-calibration.conf
 delete mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi-3.14/0001-ASoC-Add-BCM2708-fixes.patch
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi-3.14/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.14.bb
Quoted 8 lines

--
1.9.1

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Merged to master. Thanks Petter.

--
Andrei Gherzan