mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-06-08 11:50:56 +00:00
linux-ti33x-psp 3.2: add fixed for cssp, fbset and OPP50
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
This commit is contained in:
committed by
Denys Dmytriyenko
parent
e1b4ab72cf
commit
cb872e3786
-28
@@ -1,28 +0,0 @@
|
||||
From 954d199a0e9aaa4d7dbc7215cea0225cd3ffe186 Mon Sep 17 00:00:00 2001
|
||||
From: Koen Kooi <koen@dominion.thruhere.net>
|
||||
Date: Mon, 28 May 2012 18:54:57 +0200
|
||||
Subject: [PATCH 66/68] beaglebone: disable OPP for 275MHz due to silicon
|
||||
errata
|
||||
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-am335xevm.c | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
index da6020b..58c2754 100644
|
||||
--- a/arch/arm/mach-omap2/board-am335xevm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
@@ -2975,6 +2975,9 @@ static void tps65217_init(int evm_id, int profile)
|
||||
return;
|
||||
}
|
||||
|
||||
+ pr_info("Disabling OPP for 275MHz due to silicon errata");
|
||||
+ opp_disable(mpu_dev, 275000000);
|
||||
+
|
||||
if (!(val & TPS65217_STATUS_ACPWR)) {
|
||||
/* If powered by USB then disable OPP120 and OPPTURBO */
|
||||
pr_info("Maximum current provided by the USB port is 500mA"
|
||||
--
|
||||
1.7.7.6
|
||||
|
||||
+1612
File diff suppressed because it is too large
Load Diff
+73
@@ -0,0 +1,73 @@
|
||||
From e12d15eadf15f8119729a65ecca79529b4fe3863 Mon Sep 17 00:00:00 2001
|
||||
From: "Manjunathappa, Prakash" <prakash.pm@ti.com>
|
||||
Date: Wed, 4 Jul 2012 17:10:16 +0530
|
||||
Subject: [PATCH 75/79] video:da8xx-fb: calculate pixel clock period for the
|
||||
panel
|
||||
|
||||
Patch calculates pixel clock period in pico seconds and updates
|
||||
the same in variable screen information structure. fbset utility
|
||||
uses this information.
|
||||
This patch is from upstream backport, bearing commit id
|
||||
12fa8350244d73b6111ec9bc6c2fd5d49fa601b5.
|
||||
|
||||
Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
|
||||
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
|
||||
Signed-off-by: Patil, Rachna <rachna@ti.com>
|
||||
---
|
||||
drivers/video/da8xx-fb.c | 19 ++++++++++++++++++-
|
||||
1 file changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
|
||||
index 010a8bc..ddc251e 100644
|
||||
--- a/drivers/video/da8xx-fb.c
|
||||
+++ b/drivers/video/da8xx-fb.c
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <linux/lcm.h>
|
||||
#include <video/da8xx-fb.h>
|
||||
#include <asm/mach-types.h>
|
||||
+#include <asm/div64.h>
|
||||
|
||||
#define DRIVER_NAME "da8xx_lcdc"
|
||||
|
||||
@@ -192,7 +193,6 @@ static struct fb_var_screeninfo da8xx_fb_var __devinitdata = {
|
||||
.activate = 0,
|
||||
.height = -1,
|
||||
.width = -1,
|
||||
- .pixclock = 33333,/*Pico Sec*/
|
||||
.accel_flags = 0,
|
||||
.left_margin = LEFT_MARGIN,
|
||||
.right_margin = RIGHT_MARGIN,
|
||||
@@ -1267,6 +1267,22 @@ static struct fb_ops da8xx_fb_ops = {
|
||||
.fb_blank = cfb_blank,
|
||||
};
|
||||
|
||||
+/* Calculate and return pixel clock period in pico seconds */
|
||||
+static unsigned int da8xxfb_pixel_clk_period(struct da8xx_fb_par *par)
|
||||
+{
|
||||
+ unsigned int lcd_clk, div;
|
||||
+ unsigned int configured_pix_clk;
|
||||
+ unsigned long long pix_clk_period_picosec = 1000000000000ULL;
|
||||
+
|
||||
+ lcd_clk = clk_get_rate(par->lcdc_clk);
|
||||
+ div = lcd_clk / par->pxl_clk;
|
||||
+ configured_pix_clk = (lcd_clk / div);
|
||||
+
|
||||
+ do_div(pix_clk_period_picosec, configured_pix_clk);
|
||||
+
|
||||
+ return pix_clk_period_picosec;
|
||||
+}
|
||||
+
|
||||
static int __devinit fb_probe(struct platform_device *device)
|
||||
{
|
||||
struct da8xx_lcdc_platform_data *fb_pdata =
|
||||
@@ -1437,6 +1453,7 @@ static int __devinit fb_probe(struct platform_device *device)
|
||||
|
||||
da8xx_fb_var.hsync_len = lcdc_info->hsw;
|
||||
da8xx_fb_var.vsync_len = lcdc_info->vsw;
|
||||
+ da8xx_fb_var.pixclock = da8xxfb_pixel_clk_period(par);
|
||||
|
||||
da8xx_fb_var.right_margin = lcdc_info->hfp;
|
||||
da8xx_fb_var.left_margin = lcdc_info->hbp;
|
||||
--
|
||||
1.7.10
|
||||
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
From e81c7627c3d90209271a0f1e7486d0f779f05289 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Aizenstros <daizenstros@quicklogic.com>
|
||||
Date: Thu, 12 Jul 2012 12:31:08 -0400
|
||||
Subject: [PATCH 76/79] beaglebone: improve GPMC bus timings for camera cape
|
||||
|
||||
Signed-off-by: Dan Aizenstros <daizenstros@quicklogic.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
arch/arm/mach-omap2/board-am335xevm.c | 13 +++++++------
|
||||
drivers/media/video/cssp_camera/cssp_camera.c | 5 +----
|
||||
drivers/media/video/cssp_camera/cssp_camera.h | 2 +-
|
||||
3 files changed, 9 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/board-am335xevm.c b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
index 6b4539e..82020fc 100644
|
||||
--- a/arch/arm/mach-omap2/board-am335xevm.c
|
||||
+++ b/arch/arm/mach-omap2/board-am335xevm.c
|
||||
@@ -1895,9 +1895,10 @@ static struct gpmc_timings cssp_timings = {
|
||||
/* Minimum clock period for synchronous mode (in picoseconds) */
|
||||
.sync_clk = 10000,
|
||||
|
||||
+ /* CS signal timings corresponding to GPMC_CONFIG2 */
|
||||
.cs_on = 0,
|
||||
- .cs_rd_off = 23 * 10, /* Read deassertion time */
|
||||
- .cs_wr_off = 23 * 10, /* Write deassertion time */
|
||||
+ .cs_rd_off = 8 * 10, /* Read deassertion time */
|
||||
+ .cs_wr_off = 20 * 10, /* Write deassertion time */
|
||||
|
||||
/* ADV signal timings corresponding to GPMC_CONFIG3 */
|
||||
.adv_on = 0, /* Assertion time */
|
||||
@@ -1906,17 +1907,17 @@ static struct gpmc_timings cssp_timings = {
|
||||
|
||||
/* WE signals timings corresponding to GPMC_CONFIG4 */
|
||||
.we_on = 3 * 10, /* WE assertion time */
|
||||
- .we_off = 23 * 10, /* WE deassertion time */
|
||||
+ .we_off = 8 * 10, /* WE deassertion time */
|
||||
|
||||
/* OE signals timings corresponding to GPMC_CONFIG4 */
|
||||
.oe_on = 3 * 10, /* OE assertion time */
|
||||
- .oe_off = 23 * 10, /* OE deassertion time */
|
||||
+ .oe_off = 8 * 10, /* OE deassertion time */
|
||||
|
||||
/* Access time and cycle time timings corresponding to GPMC_CONFIG5 */
|
||||
.page_burst_access = 1 * 10, /* Multiple access word delay */
|
||||
.access = 7 * 10, /* Start-cycle to first data valid delay */
|
||||
- .rd_cycle = 23 * 10, /* Total read cycle time */
|
||||
- .wr_cycle = 23 * 10, /* Total write cycle time */
|
||||
+ .rd_cycle = 8 * 10, /* Total read cycle time */
|
||||
+ .wr_cycle = 20 * 10, /* Total write cycle time */
|
||||
|
||||
/* The following are only on OMAP3430 */
|
||||
.wr_access = 7 * 10, /* WRACCESSTIME */
|
||||
diff --git a/drivers/media/video/cssp_camera/cssp_camera.c b/drivers/media/video/cssp_camera/cssp_camera.c
|
||||
index 39aa003..34a36d7 100644
|
||||
--- a/drivers/media/video/cssp_camera/cssp_camera.c
|
||||
+++ b/drivers/media/video/cssp_camera/cssp_camera.c
|
||||
@@ -147,7 +147,6 @@ static int trigger_dma_transfer_to_buf(struct cssp_cam_dev *dev, struct vb2_buff
|
||||
// Enable data capture
|
||||
dev->mode |= ENABLE;
|
||||
writew(dev->mode, dev->reg_base_virt + REG_MODE);
|
||||
- readw(dev->reg_base_virt + REG_MODE);
|
||||
|
||||
dev->current_vb = vb;
|
||||
|
||||
@@ -182,7 +181,6 @@ static void dma_callback(unsigned lch, u16 ch_status, void *data)
|
||||
// Disable data capture
|
||||
dev->mode &= ~ENABLE;
|
||||
writew(dev->mode, dev->reg_base_virt + REG_MODE);
|
||||
- readw(dev->reg_base_virt + REG_MODE);
|
||||
|
||||
if (ch_status == DMA_COMPLETE) {
|
||||
struct vb2_buffer *vb = dev->current_vb;
|
||||
@@ -223,7 +221,7 @@ static int configure_edma(struct cssp_cam_dev *cam)
|
||||
return -1;
|
||||
}
|
||||
|
||||
- cam->dma_ch = edma_alloc_channel(dma_channel, dma_callback, cam, EVENTQ_1);
|
||||
+ cam->dma_ch = edma_alloc_channel(dma_channel, dma_callback, cam, EVENTQ_0);
|
||||
if (cam->dma_ch < 0) {
|
||||
printk(KERN_ERR "[%s]: allocating channel for DMA failed\n", pdev->name);
|
||||
return -EBUSY;
|
||||
@@ -526,7 +524,6 @@ static int stop_streaming(struct vb2_queue *vq)
|
||||
// Disable data capture
|
||||
dev->mode &= ~ENABLE;
|
||||
writew(dev->mode, dev->reg_base_virt + REG_MODE);
|
||||
- readw(dev->reg_base_virt + REG_MODE);
|
||||
|
||||
stop_camera_sensor(dev);
|
||||
|
||||
diff --git a/drivers/media/video/cssp_camera/cssp_camera.h b/drivers/media/video/cssp_camera/cssp_camera.h
|
||||
index d018ca1..8eb5f83 100644
|
||||
--- a/drivers/media/video/cssp_camera/cssp_camera.h
|
||||
+++ b/drivers/media/video/cssp_camera/cssp_camera.h
|
||||
@@ -28,7 +28,7 @@ static unsigned debug;
|
||||
module_param(debug, uint, 0644);
|
||||
MODULE_PARM_DESC(debug, "activates debug info");
|
||||
|
||||
-static unsigned int vid_limit = 1;
|
||||
+static unsigned int vid_limit = 6;
|
||||
module_param(vid_limit, uint, 0644);
|
||||
MODULE_PARM_DESC(vid_limit, "capture memory limit in megabytes");
|
||||
|
||||
--
|
||||
1.7.10
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
From 850bc72301ae8eae6e9d11a9ec4d64bc683410fe Mon Sep 17 00:00:00 2001
|
||||
From: Dan Aizenstros <daizenstros@quicklogic.com>
|
||||
Date: Wed, 11 Jul 2012 12:29:29 -0400
|
||||
Subject: [PATCH 77/79] beaglebone: disable UYVY, VYUY and YVYU modes in
|
||||
camera_cssp.c
|
||||
|
||||
Signed-off-by: Dan Aizenstros <daizenstros@quicklogic.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
drivers/media/video/cssp_camera/cssp_camera.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/drivers/media/video/cssp_camera/cssp_camera.c b/drivers/media/video/cssp_camera/cssp_camera.c
|
||||
index 34a36d7..acd38ee 100644
|
||||
--- a/drivers/media/video/cssp_camera/cssp_camera.c
|
||||
+++ b/drivers/media/video/cssp_camera/cssp_camera.c
|
||||
@@ -60,6 +60,11 @@ static struct cssp_cam_fmt formats[] = {
|
||||
.depth = 16,
|
||||
.code = V4L2_MBUS_FMT_YUYV8_2X8,
|
||||
},
|
||||
+/*
|
||||
+ * UYVY doesn't work properly. VYUY and YVYU are not tested.
|
||||
+ * So disable the UYVY, VYUY and YVYU modes for now
|
||||
+ */
|
||||
+#if 0
|
||||
{
|
||||
.name = "4:2:2, packed, UYVY",
|
||||
.fourcc = V4L2_PIX_FMT_UYVY,
|
||||
@@ -78,6 +83,7 @@ static struct cssp_cam_fmt formats[] = {
|
||||
.depth = 16,
|
||||
.code = V4L2_MBUS_FMT_YVYU8_2X8,
|
||||
},
|
||||
+#endif
|
||||
{
|
||||
.name = "RGB565 (LE)",
|
||||
.fourcc = V4L2_PIX_FMT_RGB565,
|
||||
--
|
||||
1.7.10
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
From 823d8b7b4a1dcfefc7260110a3acada0d1f45695 Mon Sep 17 00:00:00 2001
|
||||
From: Dan Aizenstros <daizenstros@quicklogic.com>
|
||||
Date: Thu, 12 Jul 2012 16:52:21 -0400
|
||||
Subject: [PATCH 78/79] beaglebone: error handling for DMA completion in
|
||||
cssp_camera.c
|
||||
|
||||
Signed-off-by: Dan Aizenstros <daizenstros@quicklogic.com>
|
||||
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
|
||||
---
|
||||
drivers/media/video/cssp_camera/cssp_camera.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/media/video/cssp_camera/cssp_camera.c b/drivers/media/video/cssp_camera/cssp_camera.c
|
||||
index acd38ee..fca199b 100644
|
||||
--- a/drivers/media/video/cssp_camera/cssp_camera.c
|
||||
+++ b/drivers/media/video/cssp_camera/cssp_camera.c
|
||||
@@ -191,6 +191,21 @@ static void dma_callback(unsigned lch, u16 ch_status, void *data)
|
||||
if (ch_status == DMA_COMPLETE) {
|
||||
struct vb2_buffer *vb = dev->current_vb;
|
||||
struct timeval ts;
|
||||
+ struct edmacc_param dma_tr_params;
|
||||
+
|
||||
+ edma_read_slot(dev->dma_ch, &dma_tr_params);
|
||||
+ if ((dma_tr_params.opt != 0) ||
|
||||
+ (dma_tr_params.src != 0) ||
|
||||
+ (dma_tr_params.a_b_cnt != 0) ||
|
||||
+ (dma_tr_params.dst != 0) ||
|
||||
+ (dma_tr_params.src_dst_bidx != 0) ||
|
||||
+ (dma_tr_params.link_bcntrld != 0xffff) ||
|
||||
+ (dma_tr_params.src_dst_cidx != 0) ||
|
||||
+ (dma_tr_params.ccnt != 0)) {
|
||||
+
|
||||
+ trigger_dma_transfer_to_buf(dev, dev->current_vb);
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
vb->v4l2_buf.field = dev->field;
|
||||
dev->field_count++;
|
||||
@@ -204,7 +219,6 @@ static void dma_callback(unsigned lch, u16 ch_status, void *data)
|
||||
/* check if we have new buffer queued */
|
||||
dequeue_buffer_for_dma(dev);
|
||||
} else {
|
||||
- printk(KERN_ERR "[cssp_camera]: EDMA error (ch_status = %d)\n", ch_status);
|
||||
/* we got a missed interrupt so just start a new DMA with the existing buffer */
|
||||
if (dev->current_vb != NULL)
|
||||
trigger_dma_transfer_to_buf(dev, dev->current_vb);
|
||||
--
|
||||
1.7.10
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
From 662134c1007cc275193737dd11ea4b77f47256a7 Mon Sep 17 00:00:00 2001
|
||||
From: AnilKumar Ch <anilkumar@ti.com>
|
||||
Date: Tue, 26 Jun 2012 15:41:51 +0530
|
||||
Subject: [PATCH 79/79] AM335X: errata: OPP50 on MPU domain is not supported
|
||||
|
||||
This patch implements a workaround for OPP50 erratum, Advisory
|
||||
1.0.15 at http://www.ti.com/lit/er/sprz360b/sprz360b.pdf
|
||||
|
||||
OPP50 Operation on MPU Domain is Not Supported. This issue seen with
|
||||
reliability tests running on MPU. To minimize power consumption, the
|
||||
ARM Cortex-A8 may be operated at the lower frequency defined by OPP50,
|
||||
but the respective power terminal VDD_MPU must be operated as defined
|
||||
by OPP100. So MPU OPP50 modified to <275MHz, 1.1V>.
|
||||
|
||||
Power consumption as seen on AM335x EVM:
|
||||
OPP50 <275MHz, 0.95> - 40.5 mW
|
||||
OPP50 <275MHz, 1.10> - 55.5 mW
|
||||
OPP100 <500MHz, 1.10> - 98.5 mW
|
||||
|
||||
Based on the above data we can see 43mW power savings compared to
|
||||
OPP100. This is the reason for keeping OPP50 alive instead of
|
||||
shutting down completely.
|
||||
|
||||
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
|
||||
---
|
||||
arch/arm/mach-omap2/opp3xxx_data.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c
|
||||
index 0e540c8..9fbcfc3 100644
|
||||
--- a/arch/arm/mach-omap2/opp3xxx_data.c
|
||||
+++ b/arch/arm/mach-omap2/opp3xxx_data.c
|
||||
@@ -154,7 +154,15 @@ static struct omap_opp_def __initdata omap36xx_opp_def_list[] = {
|
||||
|
||||
/* VDD1 */
|
||||
|
||||
-#define AM33XX_VDD_MPU_OPP50_UV 950000
|
||||
+/*
|
||||
+ * Errata 1.0.15: OPP50 Operation on MPU Domain is Not Supported.
|
||||
+ *
|
||||
+ * To minimize power consumption, the ARM Cortex-A8 may be operated at
|
||||
+ * the lower frequency defined by OPP50, but the respective voltage
|
||||
+ * domain VDD_MPU must be operated as defined by OPP100. So MPU OPP50
|
||||
+ * definition is modified to 275MHz, 1.1V.
|
||||
+ */
|
||||
+#define AM33XX_VDD_MPU_OPP50_UV 1100000
|
||||
#define AM33XX_VDD_MPU_OPP100_UV 1100000
|
||||
#define AM33XX_VDD_MPU_OPP120_UV 1200000
|
||||
#define AM33XX_VDD_MPU_OPPTURBO_UV 1260000
|
||||
--
|
||||
1.7.10
|
||||
|
||||
@@ -15,7 +15,7 @@ PV = "${@base_contains('DISTRO_FEATURES', 'tipspkernel', "3.2", "3.2.21", d)}"
|
||||
|
||||
BRANCH = "v3.2-staging"
|
||||
SRCREV = "720e07b4c1f687b61b147b31c698cb6816d72f01"
|
||||
MACHINE_KERNEL_PR_append = "f+gitr${SRCREV}"
|
||||
MACHINE_KERNEL_PR_append = "g+gitr${SRCREV}"
|
||||
|
||||
COMPATIBLE_MACHINE = "(ti33x)"
|
||||
|
||||
@@ -1530,7 +1530,6 @@ PATCHES_OVER_PSP = " \
|
||||
file://beaglebone/0063-beaglebone-dvi-cape-audio-hacks.patch \
|
||||
file://beaglebone/0064-beaglebone-always-execute-the-pin-free-checks.patch \
|
||||
file://beaglebone/0065-ti_tscadc-switch-to-16x-averaging.patch \
|
||||
file://beaglebone/0066-beaglebone-disable-OPP-for-275MHz-due-to-silicon-err.patch \
|
||||
file://beaglebone/0067-video-da8xx-fb-Add-Newhaven-LCD-Panel-details.patch \
|
||||
file://beaglebone/0068-beaglebone-add-support-for-the-4.3-lcd-cape-with-res.patch \
|
||||
file://beaglebone/0069-beaglebone-add-support-for-LCD3-rev-A1.patch \
|
||||
@@ -1540,4 +1539,9 @@ PATCHES_OVER_PSP = " \
|
||||
file://beaglebone/0073-beaglebone-add-support-for-QuickLogic-Camera-interfa.patch \
|
||||
file://beaglebone/0074-beaglebone-add-support-for-DVI-audio-and-audio-only-.patch \
|
||||
file://beaglebone/0075-beaglebone-disable-LBO-GPIO-for-battery-cape.patch \
|
||||
file://beaglebone/0075-video-da8xx-fb-calculate-pixel-clock-period-for-the-.patch \
|
||||
file://beaglebone/0076-beaglebone-improve-GPMC-bus-timings-for-camera-cape.patch \
|
||||
file://beaglebone/0077-beaglebone-disable-UYVY-VYUY-and-YVYU-modes-in-camer.patch \
|
||||
file://beaglebone/0078-beaglebone-error-handling-for-DMA-completion-in-cssp.patch \
|
||||
file://beaglebone/0079-AM335X-errata-OPP50-on-MPU-domain-is-not-supported.patch \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user