From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Martin Bugge <marbugge@cisco.com>, Hans Verkuil <hans.verkuil@cisco.com>
Subject: [RFC PATCH 24/22] adv7842: set LLC DLL phase from platform_data
Date: Tue, 17 Dec 2013 14:17:28 +0100 [thread overview]
Message-ID: <52B04EE8.7040707@xs4all.nl> (raw)
In-Reply-To: <9e9eaa702db4b0e0626dbf7200578e66d8281312.1386687810.git.hans.verkuil@cisco.com>
The correct LLC DLL phase depends on the board layout, so this
should be part of the platform_data.
Verified-by: Martin Bugge <marbugge@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/i2c/adv7842.c | 6 +-----
include/media/adv7842.h | 6 ++++++
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index 82c57d7..2eb4058 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -1591,9 +1591,6 @@ static void select_input(struct v4l2_subdev *sd,
afe_write(sd, 0x00, 0x00); /* power up ADC */
afe_write(sd, 0xc8, 0x00); /* phase control */
- io_write(sd, 0x19, 0x83); /* LLC DLL phase */
- io_write(sd, 0x33, 0x40); /* LLC DLL enable */
-
io_write(sd, 0xdd, 0x90); /* Manual 2x output clock */
/* script says register 0xde, which don't exist in manual */
@@ -2603,8 +2600,7 @@ static int adv7842_core_init(struct v4l2_subdev *sd)
io_write_and_or(sd, 0x20, 0xcf, 0x00);
/* LLC */
- /* Set phase to 16. TODO: get this from platform_data */
- io_write(sd, 0x19, 0x90);
+ io_write(sd, 0x19, 0x80 | pdata->llc_dll_phase);
io_write(sd, 0x33, 0x40);
/* interrupts */
diff --git a/include/media/adv7842.h b/include/media/adv7842.h
index 8b336ab..c67051a 100644
--- a/include/media/adv7842.h
+++ b/include/media/adv7842.h
@@ -192,6 +192,12 @@ struct adv7842_platform_data {
unsigned sync:2;
} drive_strength;
+ /*
+ * IO register 0x19: Adjustment to the LLC DLL phase in
+ * increments of 1/32 of a clock period.
+ */
+ unsigned llc_dll_phase:5;
+
/* External RAM for 3-D comb or frame synchronizer */
unsigned sd_ram_size; /* ram size in MB */
unsigned sd_ram_ddr:1; /* ddr or sdr sdram */
--
1.8.4.rc3
next prev parent reply other threads:[~2013-12-17 13:19 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-10 15:03 [RFC PATCH 00/22] adv7842: fixes Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 01/22] adv7842: Re-worked query_dv_timings() Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 02/22] adv7842: corrected setting of cp-register 0x91 and 0x8f Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 03/22] adv7842: properly enable/disable the irqs Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 04/22] adv7842: save platform data in state struct Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 05/22] adv7842: support YCrCb analog input Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 06/22] adv7842: added DE vertical position in SDP-io-sync Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 07/22] adv7842: Receive CEA formats as RGB on VGA (RGB) input Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 08/22] adv7842: set defaults spa-location Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 09/22] adv7842: 625/525 line standard jitter fix Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 10/22] adv7842: set default input in platform-data Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 11/22] adv7842: increase wait time Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 12/22] adv7842: remove connector type. Never used for anything useful Hans Verkuil
2013-12-10 15:03 ` [RFC PATCH 13/22] adv7842: Use defines to select EDID port Hans Verkuil
2013-12-10 15:04 ` [RFC PATCH 14/22] adv7842: mute audio before switching inputs to avoid noise/pops Hans Verkuil
2013-12-10 15:04 ` [RFC PATCH 15/22] adv7842: clear edid, if no edid just disable Edid-DDC access Hans Verkuil
2013-12-10 15:04 ` [RFC PATCH 16/22] adv7842: restart STDI once if format is not found Hans Verkuil
2013-12-10 15:04 ` [RFC PATCH 17/22] adv7842: support g_edid ioctl Hans Verkuil
2013-12-10 15:04 ` [RFC PATCH 18/22] adv7842: i2c dummy clients registration Hans Verkuil
2013-12-10 15:04 ` [RFC PATCH 19/22] adv7842: enable HDMI/DVI mode irq Hans Verkuil
2013-12-10 15:04 ` [RFC PATCH 20/22] adv7842: composite sd-ram test, clear timings before setting Hans Verkuil
2013-12-10 15:04 ` [RFC PATCH 21/22] adv7842: obtain free-run mode from the platform_data Hans Verkuil
2013-12-10 15:04 ` [RFC PATCH 22/22] adv7842: Composite sync adjustment Hans Verkuil
2013-12-17 13:16 ` [RFC PATCH 23/22] adv7842: return 0 if no change in s_dv_timings Hans Verkuil
2013-12-17 13:17 ` Hans Verkuil [this message]
2013-12-17 20:59 ` [RFC PATCH 24/22] adv7842: set LLC DLL phase from platform_data Antti Palosaari
2013-12-17 13:17 ` [RFC PATCH 25/22] adv7842: initialize timings to CEA 640x480p59.94 Hans Verkuil
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=52B04EE8.7040707@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=hans.verkuil@cisco.com \
--cc=linux-media@vger.kernel.org \
--cc=marbugge@cisco.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox