All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: DM1105: could not attach frontend 195d:1105
@ 2010-01-16  2:49 paul10
  2010-01-16  3:11 ` paul10
  0 siblings, 1 reply; 51+ messages in thread
From: paul10 @ 2010-01-16  2:49 UTC (permalink / raw)
  To: Igor M. Liplianin, linux-media

Paul wrote:
> Is it likely that there is a tuner under the card labelled "ERIT"?  To
> take it off I have to unsolder some stuff - I can do that, but I reckon
> it's only 50% chance the card will work again when I put it back
together -
> my soldering isn't so good.

Igor wrote:
> No need to unsolder. I see a Serit can tuner. There is a sticked paper
with a label on right side 
> of the tuner. It must contain something like "sp2636lhb" or "sp2633chb".
Please provide me text of 
> label.

Ah, I see.   The whole thing is a tuner, and the label that I thought said
"ERIT" actually says "SERIT".  Yes, it does have a label on it, I should
have given you that up front.  I had searched for it on the internet and
decided that it didn't mean anything.  Thanks so much for your help.

The label reads SP1514LHb  D0943B

If I follow your decipher instructions that means:

1: DVB-S
5: 16cc
1: Unsure, but it has an LNB in and an LNB out, so I guess it does have
loop through?
4: Si2109
L: Si labs
H: Horizontal
b: Lead free

So I'm looking for some code to enable an Si2109 tuner?

Thanks again,

Paul


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-16  2:49 DM1105: could not attach frontend 195d:1105 paul10
@ 2010-01-16  3:11 ` paul10
  2010-01-16 13:18   ` paul10
  0 siblings, 1 reply; 51+ messages in thread
From: paul10 @ 2010-01-16  3:11 UTC (permalink / raw)
  To: paul10; +Cc: Igor M. Liplianin, linux-media

On Sat, 16 Jan 2010 02:49:52 +0000, <paul10@planar.id.au> wrote:
> Ah, I see.   The whole thing is a tuner, and the label that I thought
said
> "ERIT" actually says "SERIT".  Yes, it does have a label on it, I should
> have given you that up front.  I had searched for it on the internet and
> decided that it didn't mean anything.  Thanks so much for your help.
> 
> The label reads SP1514LHb  D0943B
> 
> If I follow your decipher instructions that means:
> 
> 1: DVB-S
> 5: 16cc
> 1: Unsure, but it has an LNB in and an LNB out, so I guess it does have
> loop through?
> 4: Si2109
> L: Si labs
> H: Horizontal
> b: Lead free
> 
> So I'm looking for some code to enable an Si2109 tuner?
> 
> Thanks again,
> 
> Paul

I'm looking through the dm1105 code that I have in 2.6.33-rc4.  I have a
block that reads:
                dm1105dvb->fe = dvb_attach(
                        si21xx_attach, &serit_config,
                        &dm1105dvb->i2c_adap);
                if (dm1105dvb->fe)
                        dm1105dvb->fe->ops.set_voltage =
                                                dm1105dvb_set_voltage;

I have looked through the code for si21xx.c, and I see that you wrote that
as well.  You have been very busy!!  

I did rmmod si21xx, then insmod si21xx debug=1.

I then rmmod dm1105, insmod dm1105.

dmesg reports:
[191712.426735] dm1105 0000:06:00.0: PCI INT A -> GSI 20 (level, low) ->
IRQ 20
[191712.426898] DVB: registering new adapter (dm1105)
[191712.674945] dm1105 0000:06:00.0: MAC 00:00:00:00:00:00
[191714.072172] si21xx: si21xx_attach
[191714.320219] si21xx: si21_readreg: readreg error (reg == 0x01, ret ==
-1)
[191714.568266] si21xx: si21_writereg: writereg error (reg == 0x01, data
== 0x40, ret == -1)
[191715.020067] si21xx: si21_readreg: readreg error (reg == 0x00, ret ==
-1)
[191715.020125] dm1105 0000:06:00.0: could not attach frontend
[191715.020297] dm1105 0000:06:00.0: PCI INT A disabled

Does this shed any light on the matter for you?

Thanks,

Paul


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-16  3:11 ` paul10
@ 2010-01-16 13:18   ` paul10
  2010-01-16 14:12     ` Igor M. Liplianin
  2010-01-19  8:51     ` paul10
  0 siblings, 2 replies; 51+ messages in thread
From: paul10 @ 2010-01-16 13:18 UTC (permalink / raw)
  To: Igor M. Liplianin, linux-media

Igor wrote:

> Accordingly datasheet possible demod addresses are 0x68, 0x69, 0x6a,
0x6b only.
> Possibly there is some DM1105 GPIO drives reset for demod.
> I assume it is last (26, top right if you look from card elements side)
pin on tuner.
> You can visually trace way from can tuner. Or use multimeter.

Sorry, that is a bit beyond me.

If I understand correctly, I'm looking for the top right pin from the
tuner when I'm looking at the side of the card that has all the chips on
it.  I can see that, and there are a number of traces that run from there
to the DM1105, and also a few that run to other components on the card. 

I'm assuming I need to follow the topmost of the traces that go to the
DM1105, and see which pin on the DM1105 it goes to.

My eyesight isn't that good...but I have a magnifying glass.  If I follow
the topmost of the traces it looks to run to the rightmost pin on the top
row of pins on the DM1105, when the writing on the DM1105 is the right way
up.  I didn't find a data sheet for the DM1105, so I can't tell if that is
a GPIO pin or not.

The next trace down from the top right on the tuner appears to end without
connecting.  It ends in a small brass circle, and doesn't appear to go
through to the back of the board and connect anywhere.  The next one below
that goes to the fifth pin in from the right hand end of the top row on the
DM1105.

Am I doing the right thing here - does this make sense?

I've drawn on the photo so you can see what I'm doing.  Refer:
http://planar.id.au/Photos/img_1964%20%28copy%29.jpg.  The far right blue
line comes from the top most right hand pin on the tuner, runs under the
board at the brass circle, and comes out again to join on to the rightmost
pin.  The next blue line in is the one going to the fifth pin, it is the
third track down coming from the tuner.  In between the two is a track that
appears to go nowhere.  I've marked in white roughly where they are coming
out of the tuner.

Thanks again for all your help,

Paul



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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-16 13:18   ` paul10
@ 2010-01-16 14:12     ` Igor M. Liplianin
  2010-01-19  8:51     ` paul10
  1 sibling, 0 replies; 51+ messages in thread
From: Igor M. Liplianin @ 2010-01-16 14:12 UTC (permalink / raw)
  To: paul10, linux-media

On 16 января 2010 15:18:07 paul10@planar.id.au wrote:
> Igor wrote:
> > Accordingly datasheet possible demod addresses are 0x68, 0x69, 0x6a,
>
> 0x6b only.
>
> > Possibly there is some DM1105 GPIO drives reset for demod.
> > I assume it is last (26, top right if you look from card elements side)
>
> pin on tuner.
>
> > You can visually trace way from can tuner. Or use multimeter.
>
> Sorry, that is a bit beyond me.
>
> If I understand correctly, I'm looking for the top right pin from the
> tuner when I'm looking at the side of the card that has all the chips on
> it.  I can see that, and there are a number of traces that run from there
> to the DM1105, and also a few that run to other components on the card.
>
> I'm assuming I need to follow the topmost of the traces that go to the
> DM1105, and see which pin on the DM1105 it goes to.
>
> My eyesight isn't that good...but I have a magnifying glass.  If I follow
> the topmost of the traces it looks to run to the rightmost pin on the top
> row of pins on the DM1105, when the writing on the DM1105 is the right way
> up.  I didn't find a data sheet for the DM1105, so I can't tell if that is
> a GPIO pin or not.
>
> The next trace down from the top right on the tuner appears to end without
> connecting.  It ends in a small brass circle, and doesn't appear to go
> through to the back of the board and connect anywhere.  The next one below
> that goes to the fifth pin in from the right hand end of the top row on the
> DM1105.
>
> Am I doing the right thing here - does this make sense?
>
> I've drawn on the photo so you can see what I'm doing.  Refer:
> http://planar.id.au/Photos/img_1964%20%28copy%29.jpg.  The far right blue
> line comes from the top most right hand pin on the tuner, runs under the
> board at the brass circle, and comes out again to join on to the rightmost
> pin.  The next blue line in is the one going to the fifth pin, it is the
> third track down coming from the tuner.  In between the two is a track that
> appears to go nowhere.  I've marked in white roughly where they are coming
> out of the tuner.
>
> Thanks again for all your help,
>
> Paul
Well, as I understood, GPIO15 drives reset for demod.
dm1105 driver needs little patching.

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-16 13:18   ` paul10
  2010-01-16 14:12     ` Igor M. Liplianin
@ 2010-01-19  8:51     ` paul10
  2010-01-19 13:45       ` Igor M. liplianin
  2010-01-20 21:20       ` paul10
  1 sibling, 2 replies; 51+ messages in thread
From: paul10 @ 2010-01-19  8:51 UTC (permalink / raw)
  To: Igor M. Liplianin, linux-media

> Well, as I understood, GPIO15 drives reset for demod.
> dm1105 driver needs little patching.
> 
> 

Igor,

Not to hassle you, I'm sure you're very busy.  Is this something I could
undertake myself?  If so, which driver would you recommend I copy from - I
saw on the list that some drivers do their own GPIO management, and others
use a generic GPIO layer.  I presume we'd need to use the generic layer?

Also, from your explanation it sounds like we need to set GPIO 15 to true
before we attempt to attach.  Is that correct?  From my reading there are
two GPIO registers (8 bits each), so we'd be bit masking bit 7 in the
second GPIO register to 1, then sending that GPIO to the card?

Thanks for any tips,

Paul



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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-19  8:51     ` paul10
@ 2010-01-19 13:45       ` Igor M. liplianin
  2010-01-20 21:20       ` paul10
  1 sibling, 0 replies; 51+ messages in thread
From: Igor M. liplianin @ 2010-01-19 13:45 UTC (permalink / raw)
  To: paul10; +Cc: linux-media

2010/1/19  <paul10@planar.id.au>:
>> Well, as I understood, GPIO15 drives reset for demod.
>> dm1105 driver needs little patching.
>>
>>
>
> Igor,
>
> Not to hassle you, I'm sure you're very busy.  Is this something I could
> undertake myself?  If so, which driver would you recommend I copy from - I
> saw on the list that some drivers do their own GPIO management, and others
> use a generic GPIO layer.  I presume we'd need to use the generic layer?
>
> Also, from your explanation it sounds like we need to set GPIO 15 to true
> before we attempt to attach.  Is that correct?  From my reading there are
> two GPIO registers (8 bits each), so we'd be bit masking bit 7 in the
> second GPIO register to 1, then sending that GPIO to the card?
>
> Thanks for any tips,
>
> Paul
>
>
>
As you can see there is two 32-bit registers. First for values, second
for controls. Control means 0 for output and 1 for input.
If I remember it is 17 GPIO lines only.

/* GPIO Interface */
#define DM1105_GPIOVAL				0x08
#define DM1105_GPIOCTR				0x0c


BR

Igor

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-19  8:51     ` paul10
  2010-01-19 13:45       ` Igor M. liplianin
@ 2010-01-20 21:20       ` paul10
  2010-01-31 13:45         ` Igor M. Liplianin
  1 sibling, 1 reply; 51+ messages in thread
From: paul10 @ 2010-01-20 21:20 UTC (permalink / raw)
  To: Igor M. Liplianin, linux-media

Igor wrote:
> Oh, that is wrong. It is registers addresses, Never touch this.
>
> Let's look on that part of code:
>
> /* GPIO's for LNB power control */
> #define DM1105_LNB_MASK                         0x00000000 // later in
code write it to
> DM1105_GPIOCTR, all GPIO's as OUT
> #define DM1105_LNB_OFF                          0x00020000 // later in
code write it to
> DM1105_GPIOVAL, set GPIO17 to HIGH

> But you have not to change this.
> Right way is to write another entry in cards structure and so on.
> Better leave it to me.

> Regards
> Igor

Thanks for all your help, I understand better now.  I have moved to code
like that at the bottom.  It still doesn't work, but feels a lot closer.

Before I keep playing with values, I want to check I'm on the right track.
Does it look right?  Specific questions:
1. I see there is a hw_init function.  Should I be using that?  I put the
logic into fe_attach because there was already card-specific logic in
there.  But this feels like hw initialisation.  

2. Should I set the control to input or output?  I'm assuming input = 1.

3. Would pin 15 be numbered from the left or right - is it 0x4, or 0x2000?

Thanks,

Paul

*** dm1105.c.old        2010-01-13 16:15:00.000000000 +1100
--- dm1105.c    2010-01-21 08:13:14.000000000 +1100
***************
*** 51,56 ****
--- 51,57 ----
  #define DM1105_BOARD_DVBWORLD_2002    1
  #define DM1105_BOARD_DVBWORLD_2004    2
  #define DM1105_BOARD_AXESS_DM05               3
+ #define DM1105_BOARD_UNBRANDED                4
  
  /* ----------------------------------------------- */
  /*
***************
*** 171,176 ****
--- 172,181 ----
  #define DM05_LNB_13V                          0x00020000
  #define DM05_LNB_18V                          0x00030000
  
+ /* GPIO's for demod reset for unbranded 195d:1105 */
+ #define UNBRANDED_DEMOD_MASK                  0x00008000
+ #define UNBRANDED_DEMOD_RESET                 0x00008000
+ 
  static unsigned int card[]  = {[0 ... 3] = UNSET };
  module_param_array(card,  int, NULL, 0444);
  MODULE_PARM_DESC(card, "card type");
***************
*** 206,211 ****
--- 211,219 ----
        [DM1105_BOARD_AXESS_DM05] = {
                .name           = "Axess/EasyTv DM05",
        },
+       [DM1105_BOARD_UNBRANDED] = {
+               .name           = "Unbranded 195d:1105",
+         },
  };
  
  static const struct dm1105_subid dm1105_subids[] = {
***************
*** 229,234 ****
--- 237,246 ----
                .subvendor = 0x195d,
                .subdevice = 0x1105,
                .card      = DM1105_BOARD_AXESS_DM05,
+       }, {
+               .subvendor = 0x195d,
+               .subdevice = 0x1105,
+               .card      = DM1105_BOARD_UNBRANDED,
        },
  };
  
***************
*** 698,703 ****
--- 710,727 ----
                        dm1105dvb->fe->ops.set_voltage =
dm1105dvb_set_voltage;
  
                break;
+       case DM1105_BOARD_UNBRANDED:
+                 printk(KERN_ERR "Attaching as board_unbranded\n");
+               outl(UNBRANDED_DEMOD_MASK, dm_io_mem(DM1105_GPIOCTR));
+               outl(UNBRANDED_DEMOD_RESET , dm_io_mem(DM1105_GPIOVAL));
+               dm1105dvb->fe = dvb_attach(
+                       si21xx_attach, &serit_config,
+                       &dm1105dvb->i2c_adap);
+                       if (dm1105dvb->fe)
+                               dm1105dvb->fe->ops.set_voltage =
+                                       dm1105dvb_set_voltage;
+ 
+               break;
        case DM1105_BOARD_DVBWORLD_2002:
        case DM1105_BOARD_AXESS_DM05:
        default:


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-20 21:20       ` paul10
@ 2010-01-31 13:45         ` Igor M. Liplianin
  2010-02-01 12:17           ` Nameer Kazzaz
  0 siblings, 1 reply; 51+ messages in thread
From: Igor M. Liplianin @ 2010-01-31 13:45 UTC (permalink / raw)
  To: paul10, linux-media, Christian Hüppe

[-- Attachment #1: Type: text/plain, Size: 4218 bytes --]

On 20 января 2010 23:20:20 paul10@planar.id.au wrote:
> Igor wrote:
> > Oh, that is wrong. It is registers addresses, Never touch this.
> >
> > Let's look on that part of code:
> >
> > /* GPIO's for LNB power control */
> > #define DM1105_LNB_MASK                         0x00000000 // later in
>
> code write it to
>
> > DM1105_GPIOCTR, all GPIO's as OUT
> > #define DM1105_LNB_OFF                          0x00020000 // later in
>
> code write it to
>
> > DM1105_GPIOVAL, set GPIO17 to HIGH
> >
> > But you have not to change this.
> > Right way is to write another entry in cards structure and so on.
> > Better leave it to me.
> >
> > Regards
> > Igor
>
> Thanks for all your help, I understand better now.  I have moved to code
> like that at the bottom.  It still doesn't work, but feels a lot closer.
>
> Before I keep playing with values, I want to check I'm on the right track.
> Does it look right?  Specific questions:
> 1. I see there is a hw_init function.  Should I be using that?  I put the
> logic into fe_attach because there was already card-specific logic in
> there.  But this feels like hw initialisation.
>
> 2. Should I set the control to input or output?  I'm assuming input = 1.
>
> 3. Would pin 15 be numbered from the left or right - is it 0x4, or 0x2000?
>
> Thanks,
>
> Paul
>
> *** dm1105.c.old        2010-01-13 16:15:00.000000000 +1100
> --- dm1105.c    2010-01-21 08:13:14.000000000 +1100
> ***************
> *** 51,56 ****
> --- 51,57 ----
>   #define DM1105_BOARD_DVBWORLD_2002    1
>   #define DM1105_BOARD_DVBWORLD_2004    2
>   #define DM1105_BOARD_AXESS_DM05               3
> + #define DM1105_BOARD_UNBRANDED                4
>
>   /* ----------------------------------------------- */
>   /*
> ***************
> *** 171,176 ****
> --- 172,181 ----
>   #define DM05_LNB_13V                          0x00020000
>   #define DM05_LNB_18V                          0x00030000
>
> + /* GPIO's for demod reset for unbranded 195d:1105 */
> + #define UNBRANDED_DEMOD_MASK                  0x00008000
> + #define UNBRANDED_DEMOD_RESET                 0x00008000
> +
>   static unsigned int card[]  = {[0 ... 3] = UNSET };
>   module_param_array(card,  int, NULL, 0444);
>   MODULE_PARM_DESC(card, "card type");
> ***************
> *** 206,211 ****
> --- 211,219 ----
>         [DM1105_BOARD_AXESS_DM05] = {
>                 .name           = "Axess/EasyTv DM05",
>         },
> +       [DM1105_BOARD_UNBRANDED] = {
> +               .name           = "Unbranded 195d:1105",
> +         },
>   };
>
>   static const struct dm1105_subid dm1105_subids[] = {
> ***************
> *** 229,234 ****
> --- 237,246 ----
>                 .subvendor = 0x195d,
>                 .subdevice = 0x1105,
>                 .card      = DM1105_BOARD_AXESS_DM05,
> +       }, {
> +               .subvendor = 0x195d,
> +               .subdevice = 0x1105,
> +               .card      = DM1105_BOARD_UNBRANDED,
>         },
>   };
>
> ***************
> *** 698,703 ****
> --- 710,727 ----
>                         dm1105dvb->fe->ops.set_voltage =
> dm1105dvb_set_voltage;
>
>                 break;
> +       case DM1105_BOARD_UNBRANDED:
> +                 printk(KERN_ERR "Attaching as board_unbranded\n");
> +               outl(UNBRANDED_DEMOD_MASK, dm_io_mem(DM1105_GPIOCTR));
> +               outl(UNBRANDED_DEMOD_RESET , dm_io_mem(DM1105_GPIOVAL));
> +               dm1105dvb->fe = dvb_attach(
> +                       si21xx_attach, &serit_config,
> +                       &dm1105dvb->i2c_adap);
> +                       if (dm1105dvb->fe)
> +                               dm1105dvb->fe->ops.set_voltage =
> +                                       dm1105dvb_set_voltage;
> +
> +               break;
>         case DM1105_BOARD_DVBWORLD_2002:
>         case DM1105_BOARD_AXESS_DM05:
>         default:
Some things are missed, like keep GPIO15 high in set_voltage function.
Try attached patch against current v4l-dvb tree with modprobe option card=4
	modprobe dm1105 card=4
-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks



[-- Attachment #2: dm1105_gpio15.diff --]
[-- Type: text/x-patch, Size: 1794 bytes --]

diff -r d6520e486ee6 linux/drivers/media/dvb/dm1105/dm1105.c
--- a/linux/drivers/media/dvb/dm1105/dm1105.c	Sat Jan 30 01:27:34 2010 -0200
+++ b/linux/drivers/media/dvb/dm1105/dm1105.c	Sun Jan 31 15:35:30 2010 +0200
@@ -52,6 +52,7 @@
 #define DM1105_BOARD_DVBWORLD_2002	1
 #define DM1105_BOARD_DVBWORLD_2004	2
 #define DM1105_BOARD_AXESS_DM05		3
+#define DM1105_BOARD_UNBRANDED_GPIO15	4
 
 /* ----------------------------------------------- */
 /*
@@ -207,6 +208,9 @@
 	[DM1105_BOARD_AXESS_DM05] = {
 		.name		= "Axess/EasyTv DM05",
 	},
+	[DM1105_BOARD_UNBRANDED_GPIO15] = {
+		.name		= "Unbranded Board GPIO15",
+	},
 };
 
 static const struct dm1105_subid dm1105_subids[] = {
@@ -327,6 +331,8 @@
 #define dm_setl(reg, bit)	dm_andorl((reg), (bit), (bit))
 #define dm_clearl(reg, bit)	dm_andorl((reg), (bit), 0)
 
+#define DM1105_GPIO(x)		(1 << x)
+
 static int dm1105_i2c_xfer(struct i2c_adapter *i2c_adap,
 			    struct i2c_msg *msgs, int num)
 {
@@ -441,6 +447,12 @@
 	u32 lnb_mask, lnb_13v, lnb_18v, lnb_off;
 
 	switch (dev->boardnr) {
+	case DM1105_BOARD_UNBRANDED_GPIO15:
+		lnb_mask = DM05_LNB_MASK;
+		lnb_off = DM05_LNB_OFF | DM1105_GPIO(15);/* keep GPIO15 high */
+		lnb_13v = DM05_LNB_13V | DM1105_GPIO(15);
+		lnb_18v = DM05_LNB_18V | DM1105_GPIO(15);
+		break;
 	case DM1105_BOARD_AXESS_DM05:
 		lnb_mask = DM05_LNB_MASK;
 		lnb_off = DM05_LNB_OFF;
@@ -758,6 +770,14 @@
 			dev->fe->ops.set_voltage = dm1105_set_voltage;
 
 		break;
+	case DM1105_BOARD_UNBRANDED_GPIO15:
+		/* reset frontend */
+		dm_clearl(DM1105_GPIOCTR, DM1105_GPIO(15));
+		dm_clearl(DM1105_GPIOVAL, DM1105_GPIO(15));
+		msleep(10);
+		dm_setl(DM1105_GPIOVAL, DM1105_GPIO(15));
+		msleep(100);
+	/* break omitted intentionally */
 	case DM1105_BOARD_DVBWORLD_2002:
 	case DM1105_BOARD_AXESS_DM05:
 	default:

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-31 13:45         ` Igor M. Liplianin
@ 2010-02-01 12:17           ` Nameer Kazzaz
  2010-02-02 15:21             ` Nameer Kazzaz
  0 siblings, 1 reply; 51+ messages in thread
From: Nameer Kazzaz @ 2010-02-01 12:17 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: paul10, linux-media, Christian Hüppe

Hi there,
dmesg output with patched dm1105.c against current v4l-dvb 'modprob 
dm1105 card=4'

dm1105 0000:05:0f.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
DVB: registering new adapter (dm1105)
dm1105 0000:05:0f.0: MAC dd49b0dc
dm1105 0000:05:0f.0: could not attach frontend
dm1105 0000:05:0f.0: PCI INT A disabled

Thanks
Nameer Kazzaz

Igor M. Liplianin wrote:
> On 20 ?????? 2010 23:20:20 paul10@planar.id.au wrote:
>   
>> Igor wrote:
>>     
>>> Oh, that is wrong. It is registers addresses, Never touch this.
>>>
>>> Let's look on that part of code:
>>>
>>> /* GPIO's for LNB power control */
>>> #define DM1105_LNB_MASK                         0x00000000 // later in
>>>       
>> code write it to
>>
>>     
>>> DM1105_GPIOCTR, all GPIO's as OUT
>>> #define DM1105_LNB_OFF                          0x00020000 // later in
>>>       
>> code write it to
>>
>>     
>>> DM1105_GPIOVAL, set GPIO17 to HIGH
>>>
>>> But you have not to change this.
>>> Right way is to write another entry in cards structure and so on.
>>> Better leave it to me.
>>>
>>> Regards
>>> Igor
>>>       
>> Thanks for all your help, I understand better now.  I have moved to code
>> like that at the bottom.  It still doesn't work, but feels a lot closer.
>>
>> Before I keep playing with values, I want to check I'm on the right track.
>> Does it look right?  Specific questions:
>> 1. I see there is a hw_init function.  Should I be using that?  I put the
>> logic into fe_attach because there was already card-specific logic in
>> there.  But this feels like hw initialisation.
>>
>> 2. Should I set the control to input or output?  I'm assuming input = 1.
>>
>> 3. Would pin 15 be numbered from the left or right - is it 0x4, or 0x2000?
>>
>> Thanks,
>>
>> Paul
>>
>> *** dm1105.c.old        2010-01-13 16:15:00.000000000 +1100
>> --- dm1105.c    2010-01-21 08:13:14.000000000 +1100
>> ***************
>> *** 51,56 ****
>> --- 51,57 ----
>>   #define DM1105_BOARD_DVBWORLD_2002    1
>>   #define DM1105_BOARD_DVBWORLD_2004    2
>>   #define DM1105_BOARD_AXESS_DM05               3
>> + #define DM1105_BOARD_UNBRANDED                4
>>
>>   /* ----------------------------------------------- */
>>   /*
>> ***************
>> *** 171,176 ****
>> --- 172,181 ----
>>   #define DM05_LNB_13V                          0x00020000
>>   #define DM05_LNB_18V                          0x00030000
>>
>> + /* GPIO's for demod reset for unbranded 195d:1105 */
>> + #define UNBRANDED_DEMOD_MASK                  0x00008000
>> + #define UNBRANDED_DEMOD_RESET                 0x00008000
>> +
>>   static unsigned int card[]  = {[0 ... 3] = UNSET };
>>   module_param_array(card,  int, NULL, 0444);
>>   MODULE_PARM_DESC(card, "card type");
>> ***************
>> *** 206,211 ****
>> --- 211,219 ----
>>         [DM1105_BOARD_AXESS_DM05] = {
>>                 .name           = "Axess/EasyTv DM05",
>>         },
>> +       [DM1105_BOARD_UNBRANDED] = {
>> +               .name           = "Unbranded 195d:1105",
>> +         },
>>   };
>>
>>   static const struct dm1105_subid dm1105_subids[] = {
>> ***************
>> *** 229,234 ****
>> --- 237,246 ----
>>                 .subvendor = 0x195d,
>>                 .subdevice = 0x1105,
>>                 .card      = DM1105_BOARD_AXESS_DM05,
>> +       }, {
>> +               .subvendor = 0x195d,
>> +               .subdevice = 0x1105,
>> +               .card      = DM1105_BOARD_UNBRANDED,
>>         },
>>   };
>>
>> ***************
>> *** 698,703 ****
>> --- 710,727 ----
>>                         dm1105dvb->fe->ops.set_voltage =
>> dm1105dvb_set_voltage;
>>
>>                 break;
>> +       case DM1105_BOARD_UNBRANDED:
>> +                 printk(KERN_ERR "Attaching as board_unbranded\n");
>> +               outl(UNBRANDED_DEMOD_MASK, dm_io_mem(DM1105_GPIOCTR));
>> +               outl(UNBRANDED_DEMOD_RESET , dm_io_mem(DM1105_GPIOVAL));
>> +               dm1105dvb->fe = dvb_attach(
>> +                       si21xx_attach, &serit_config,
>> +                       &dm1105dvb->i2c_adap);
>> +                       if (dm1105dvb->fe)
>> +                               dm1105dvb->fe->ops.set_voltage =
>> +                                       dm1105dvb_set_voltage;
>> +
>> +               break;
>>         case DM1105_BOARD_DVBWORLD_2002:
>>         case DM1105_BOARD_AXESS_DM05:
>>         default:
>>     
> Some things are missed, like keep GPIO15 high in set_voltage function.
> Try attached patch against current v4l-dvb tree with modprobe option card=4
> 	modprobe dm1105 card=4
>   


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-01 12:17           ` Nameer Kazzaz
@ 2010-02-02 15:21             ` Nameer Kazzaz
  2010-02-02 16:57               ` Igor M. Liplianin
  0 siblings, 1 reply; 51+ messages in thread
From: Nameer Kazzaz @ 2010-02-02 15:21 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: paul10, linux-media, Christian Hüppe

Hi Igor,
    What do you think ? if I can help you solve this, let me know what I 
can do.

Thanks
Nameer

Nameer Kazzaz wrote:
> Hi there,
> dmesg output with patched dm1105.c against current v4l-dvb 'modprob 
> dm1105 card=4'
>
> dm1105 0000:05:0f.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> DVB: registering new adapter (dm1105)
> dm1105 0000:05:0f.0: MAC dd49b0dc
> dm1105 0000:05:0f.0: could not attach frontend
> dm1105 0000:05:0f.0: PCI INT A disabled
>
> Thanks
> Nameer Kazzaz
>
> Igor M. Liplianin wrote:
>> On 20 ?????? 2010 23:20:20 paul10@planar.id.au wrote:
>>  
>>> Igor wrote:
>>>    
>>>> Oh, that is wrong. It is registers addresses, Never touch this.
>>>>
>>>> Let's look on that part of code:
>>>>
>>>> /* GPIO's for LNB power control */
>>>> #define DM1105_LNB_MASK                         0x00000000 // later in
>>>>       
>>> code write it to
>>>
>>>    
>>>> DM1105_GPIOCTR, all GPIO's as OUT
>>>> #define DM1105_LNB_OFF                          0x00020000 // later in
>>>>       
>>> code write it to
>>>
>>>    
>>>> DM1105_GPIOVAL, set GPIO17 to HIGH
>>>>
>>>> But you have not to change this.
>>>> Right way is to write another entry in cards structure and so on.
>>>> Better leave it to me.
>>>>
>>>> Regards
>>>> Igor
>>>>       
>>> Thanks for all your help, I understand better now.  I have moved to 
>>> code
>>> like that at the bottom.  It still doesn't work, but feels a lot 
>>> closer.
>>>
>>> Before I keep playing with values, I want to check I'm on the right 
>>> track.
>>> Does it look right?  Specific questions:
>>> 1. I see there is a hw_init function.  Should I be using that?  I 
>>> put the
>>> logic into fe_attach because there was already card-specific logic in
>>> there.  But this feels like hw initialisation.
>>>
>>> 2. Should I set the control to input or output?  I'm assuming input 
>>> = 1.
>>>
>>> 3. Would pin 15 be numbered from the left or right - is it 0x4, or 
>>> 0x2000?
>>>
>>> Thanks,
>>>
>>> Paul
>>>
>>> *** dm1105.c.old        2010-01-13 16:15:00.000000000 +1100
>>> --- dm1105.c    2010-01-21 08:13:14.000000000 +1100
>>> ***************
>>> *** 51,56 ****
>>> --- 51,57 ----
>>>   #define DM1105_BOARD_DVBWORLD_2002    1
>>>   #define DM1105_BOARD_DVBWORLD_2004    2
>>>   #define DM1105_BOARD_AXESS_DM05               3
>>> + #define DM1105_BOARD_UNBRANDED                4
>>>
>>>   /* ----------------------------------------------- */
>>>   /*
>>> ***************
>>> *** 171,176 ****
>>> --- 172,181 ----
>>>   #define DM05_LNB_13V                          0x00020000
>>>   #define DM05_LNB_18V                          0x00030000
>>>
>>> + /* GPIO's for demod reset for unbranded 195d:1105 */
>>> + #define UNBRANDED_DEMOD_MASK                  0x00008000
>>> + #define UNBRANDED_DEMOD_RESET                 0x00008000
>>> +
>>>   static unsigned int card[]  = {[0 ... 3] = UNSET };
>>>   module_param_array(card,  int, NULL, 0444);
>>>   MODULE_PARM_DESC(card, "card type");
>>> ***************
>>> *** 206,211 ****
>>> --- 211,219 ----
>>>         [DM1105_BOARD_AXESS_DM05] = {
>>>                 .name           = "Axess/EasyTv DM05",
>>>         },
>>> +       [DM1105_BOARD_UNBRANDED] = {
>>> +               .name           = "Unbranded 195d:1105",
>>> +         },
>>>   };
>>>
>>>   static const struct dm1105_subid dm1105_subids[] = {
>>> ***************
>>> *** 229,234 ****
>>> --- 237,246 ----
>>>                 .subvendor = 0x195d,
>>>                 .subdevice = 0x1105,
>>>                 .card      = DM1105_BOARD_AXESS_DM05,
>>> +       }, {
>>> +               .subvendor = 0x195d,
>>> +               .subdevice = 0x1105,
>>> +               .card      = DM1105_BOARD_UNBRANDED,
>>>         },
>>>   };
>>>
>>> ***************
>>> *** 698,703 ****
>>> --- 710,727 ----
>>>                         dm1105dvb->fe->ops.set_voltage =
>>> dm1105dvb_set_voltage;
>>>
>>>                 break;
>>> +       case DM1105_BOARD_UNBRANDED:
>>> +                 printk(KERN_ERR "Attaching as board_unbranded\n");
>>> +               outl(UNBRANDED_DEMOD_MASK, dm_io_mem(DM1105_GPIOCTR));
>>> +               outl(UNBRANDED_DEMOD_RESET , 
>>> dm_io_mem(DM1105_GPIOVAL));
>>> +               dm1105dvb->fe = dvb_attach(
>>> +                       si21xx_attach, &serit_config,
>>> +                       &dm1105dvb->i2c_adap);
>>> +                       if (dm1105dvb->fe)
>>> +                               dm1105dvb->fe->ops.set_voltage =
>>> +                                       dm1105dvb_set_voltage;
>>> +
>>> +               break;
>>>         case DM1105_BOARD_DVBWORLD_2002:
>>>         case DM1105_BOARD_AXESS_DM05:
>>>         default:
>>>     
>> Some things are missed, like keep GPIO15 high in set_voltage function.
>> Try attached patch against current v4l-dvb tree with modprobe option 
>> card=4
>>     modprobe dm1105 card=4
>>   
>


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-02 15:21             ` Nameer Kazzaz
@ 2010-02-02 16:57               ` Igor M. Liplianin
  2010-02-02 17:16                 ` Nameer Kazzaz
  0 siblings, 1 reply; 51+ messages in thread
From: Igor M. Liplianin @ 2010-02-02 16:57 UTC (permalink / raw)
  To: Nameer Kazzaz; +Cc: paul10, linux-media, Christian Hüppe

On 2 февраля 2010 17:21:46 Nameer Kazzaz wrote:
> Hi Igor,
>     What do you think ? if I can help you solve this, let me know what I
> can do.
>
> Thanks
> Nameer
>
> Nameer Kazzaz wrote:
> > Hi there,
> > dmesg output with patched dm1105.c against current v4l-dvb 'modprob
> > dm1105 card=4'
> >
> > dm1105 0000:05:0f.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> > DVB: registering new adapter (dm1105)
> > dm1105 0000:05:0f.0: MAC dd49b0dc
> > dm1105 0000:05:0f.0: could not attach frontend
> > dm1105 0000:05:0f.0: PCI INT A disabled
> >
> > Thanks
> > Nameer Kazzaz
> >
> > Igor M. Liplianin wrote:
> >> On 20 ?????? 2010 23:20:20 paul10@planar.id.au wrote:
> >>> Igor wrote:
> >>>> Oh, that is wrong. It is registers addresses, Never touch this.
> >>>>
> >>>> Let's look on that part of code:
> >>>>
> >>>> /* GPIO's for LNB power control */
> >>>> #define DM1105_LNB_MASK                         0x00000000 // later in
> >>>
> >>> code write it to
> >>>
> >>>> DM1105_GPIOCTR, all GPIO's as OUT
> >>>> #define DM1105_LNB_OFF                          0x00020000 // later in
> >>>
> >>> code write it to
> >>>
> >>>> DM1105_GPIOVAL, set GPIO17 to HIGH
> >>>>
> >>>> But you have not to change this.
> >>>> Right way is to write another entry in cards structure and so on.
> >>>> Better leave it to me.
> >>>>
> >>>> Regards
> >>>> Igor
> >>>
> >>> Thanks for all your help, I understand better now.  I have moved to
> >>> code
> >>> like that at the bottom.  It still doesn't work, but feels a lot
> >>> closer.
> >>>
> >>> Before I keep playing with values, I want to check I'm on the right
> >>> track.
> >>> Does it look right?  Specific questions:
> >>> 1. I see there is a hw_init function.  Should I be using that?  I
> >>> put the
> >>> logic into fe_attach because there was already card-specific logic in
> >>> there.  But this feels like hw initialisation.
> >>>
> >>> 2. Should I set the control to input or output?  I'm assuming input
> >>> = 1.
> >>>
> >>> 3. Would pin 15 be numbered from the left or right - is it 0x4, or
> >>> 0x2000?
> >>>
> >>> Thanks,
> >>>
> >>> Paul
> >>>
> >>> *** dm1105.c.old        2010-01-13 16:15:00.000000000 +1100
> >>> --- dm1105.c    2010-01-21 08:13:14.000000000 +1100
> >>> ***************
> >>> *** 51,56 ****
> >>> --- 51,57 ----
> >>>   #define DM1105_BOARD_DVBWORLD_2002    1
> >>>   #define DM1105_BOARD_DVBWORLD_2004    2
> >>>   #define DM1105_BOARD_AXESS_DM05               3
> >>> + #define DM1105_BOARD_UNBRANDED                4
> >>>
> >>>   /* ----------------------------------------------- */
> >>>   /*
> >>> ***************
> >>> *** 171,176 ****
> >>> --- 172,181 ----
> >>>   #define DM05_LNB_13V                          0x00020000
> >>>   #define DM05_LNB_18V                          0x00030000
> >>>
> >>> + /* GPIO's for demod reset for unbranded 195d:1105 */
> >>> + #define UNBRANDED_DEMOD_MASK                  0x00008000
> >>> + #define UNBRANDED_DEMOD_RESET                 0x00008000
> >>> +
> >>>   static unsigned int card[]  = {[0 ... 3] = UNSET };
> >>>   module_param_array(card,  int, NULL, 0444);
> >>>   MODULE_PARM_DESC(card, "card type");
> >>> ***************
> >>> *** 206,211 ****
> >>> --- 211,219 ----
> >>>         [DM1105_BOARD_AXESS_DM05] = {
> >>>                 .name           = "Axess/EasyTv DM05",
> >>>         },
> >>> +       [DM1105_BOARD_UNBRANDED] = {
> >>> +               .name           = "Unbranded 195d:1105",
> >>> +         },
> >>>   };
> >>>
> >>>   static const struct dm1105_subid dm1105_subids[] = {
> >>> ***************
> >>> *** 229,234 ****
> >>> --- 237,246 ----
> >>>                 .subvendor = 0x195d,
> >>>                 .subdevice = 0x1105,
> >>>                 .card      = DM1105_BOARD_AXESS_DM05,
> >>> +       }, {
> >>> +               .subvendor = 0x195d,
> >>> +               .subdevice = 0x1105,
> >>> +               .card      = DM1105_BOARD_UNBRANDED,
> >>>         },
> >>>   };
> >>>
> >>> ***************
> >>> *** 698,703 ****
> >>> --- 710,727 ----
> >>>                         dm1105dvb->fe->ops.set_voltage =
> >>> dm1105dvb_set_voltage;
> >>>
> >>>                 break;
> >>> +       case DM1105_BOARD_UNBRANDED:
> >>> +                 printk(KERN_ERR "Attaching as board_unbranded\n");
> >>> +               outl(UNBRANDED_DEMOD_MASK, dm_io_mem(DM1105_GPIOCTR));
> >>> +               outl(UNBRANDED_DEMOD_RESET ,
> >>> dm_io_mem(DM1105_GPIOVAL));
> >>> +               dm1105dvb->fe = dvb_attach(
> >>> +                       si21xx_attach, &serit_config,
> >>> +                       &dm1105dvb->i2c_adap);
> >>> +                       if (dm1105dvb->fe)
> >>> +                               dm1105dvb->fe->ops.set_voltage =
> >>> +                                       dm1105dvb_set_voltage;
> >>> +
> >>> +               break;
> >>>         case DM1105_BOARD_DVBWORLD_2002:
> >>>         case DM1105_BOARD_AXESS_DM05:
> >>>         default:
> >>
> >> Some things are missed, like keep GPIO15 high in set_voltage function.
> >> Try attached patch against current v4l-dvb tree with modprobe option
> >> card=4
> >>     modprobe dm1105 card=4
Hi Nameer,
You can modify sended by me patch to guess GPIO pin. Simply try all of them, it is only 17. 
Just replace all appearances DM1105_GPIO(15) with number you want.
-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-02 16:57               ` Igor M. Liplianin
@ 2010-02-02 17:16                 ` Nameer Kazzaz
  2010-02-02 22:07                   ` Nameer Kazzaz
  0 siblings, 1 reply; 51+ messages in thread
From: Nameer Kazzaz @ 2010-02-02 17:16 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: paul10, linux-media, Christian Hüppe

Igor M. Liplianin wrote:
> On 2 февраля 2010 17:21:46 Nameer Kazzaz wrote:
>   
>> Hi Igor,
>>     What do you think ? if I can help you solve this, let me know what I
>> can do.
>>
>> Thanks
>> Nameer
>>
>> Nameer Kazzaz wrote:
>>     
>>> Hi there,
>>> dmesg output with patched dm1105.c against current v4l-dvb 'modprob
>>> dm1105 card=4'
>>>
>>> dm1105 0000:05:0f.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
>>> DVB: registering new adapter (dm1105)
>>> dm1105 0000:05:0f.0: MAC dd49b0dc
>>> dm1105 0000:05:0f.0: could not attach frontend
>>> dm1105 0000:05:0f.0: PCI INT A disabled
>>>
>>> Thanks
>>> Nameer Kazzaz
>>>
>>> Igor M. Liplianin wrote:
>>>       
>>>> On 20 ?????? 2010 23:20:20 paul10@planar.id.au wrote:
>>>>         
>>>>> Igor wrote:
>>>>>           
>>>>>> Oh, that is wrong. It is registers addresses, Never touch this.
>>>>>>
>>>>>> Let's look on that part of code:
>>>>>>
>>>>>> /* GPIO's for LNB power control */
>>>>>> #define DM1105_LNB_MASK                         0x00000000 // later in
>>>>>>             
>>>>> code write it to
>>>>>
>>>>>           
>>>>>> DM1105_GPIOCTR, all GPIO's as OUT
>>>>>> #define DM1105_LNB_OFF                          0x00020000 // later in
>>>>>>             
>>>>> code write it to
>>>>>
>>>>>           
>>>>>> DM1105_GPIOVAL, set GPIO17 to HIGH
>>>>>>
>>>>>> But you have not to change this.
>>>>>> Right way is to write another entry in cards structure and so on.
>>>>>> Better leave it to me.
>>>>>>
>>>>>> Regards
>>>>>> Igor
>>>>>>             
>>>>> Thanks for all your help, I understand better now.  I have moved to
>>>>> code
>>>>> like that at the bottom.  It still doesn't work, but feels a lot
>>>>> closer.
>>>>>
>>>>> Before I keep playing with values, I want to check I'm on the right
>>>>> track.
>>>>> Does it look right?  Specific questions:
>>>>> 1. I see there is a hw_init function.  Should I be using that?  I
>>>>> put the
>>>>> logic into fe_attach because there was already card-specific logic in
>>>>> there.  But this feels like hw initialisation.
>>>>>
>>>>> 2. Should I set the control to input or output?  I'm assuming input
>>>>> = 1.
>>>>>
>>>>> 3. Would pin 15 be numbered from the left or right - is it 0x4, or
>>>>> 0x2000?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Paul
>>>>>
>>>>> *** dm1105.c.old        2010-01-13 16:15:00.000000000 +1100
>>>>> --- dm1105.c    2010-01-21 08:13:14.000000000 +1100
>>>>> ***************
>>>>> *** 51,56 ****
>>>>> --- 51,57 ----
>>>>>   #define DM1105_BOARD_DVBWORLD_2002    1
>>>>>   #define DM1105_BOARD_DVBWORLD_2004    2
>>>>>   #define DM1105_BOARD_AXESS_DM05               3
>>>>> + #define DM1105_BOARD_UNBRANDED                4
>>>>>
>>>>>   /* ----------------------------------------------- */
>>>>>   /*
>>>>> ***************
>>>>> *** 171,176 ****
>>>>> --- 172,181 ----
>>>>>   #define DM05_LNB_13V                          0x00020000
>>>>>   #define DM05_LNB_18V                          0x00030000
>>>>>
>>>>> + /* GPIO's for demod reset for unbranded 195d:1105 */
>>>>> + #define UNBRANDED_DEMOD_MASK                  0x00008000
>>>>> + #define UNBRANDED_DEMOD_RESET                 0x00008000
>>>>> +
>>>>>   static unsigned int card[]  = {[0 ... 3] = UNSET };
>>>>>   module_param_array(card,  int, NULL, 0444);
>>>>>   MODULE_PARM_DESC(card, "card type");
>>>>> ***************
>>>>> *** 206,211 ****
>>>>> --- 211,219 ----
>>>>>         [DM1105_BOARD_AXESS_DM05] = {
>>>>>                 .name           = "Axess/EasyTv DM05",
>>>>>         },
>>>>> +       [DM1105_BOARD_UNBRANDED] = {
>>>>> +               .name           = "Unbranded 195d:1105",
>>>>> +         },
>>>>>   };
>>>>>
>>>>>   static const struct dm1105_subid dm1105_subids[] = {
>>>>> ***************
>>>>> *** 229,234 ****
>>>>> --- 237,246 ----
>>>>>                 .subvendor = 0x195d,
>>>>>                 .subdevice = 0x1105,
>>>>>                 .card      = DM1105_BOARD_AXESS_DM05,
>>>>> +       }, {
>>>>> +               .subvendor = 0x195d,
>>>>> +               .subdevice = 0x1105,
>>>>> +               .card      = DM1105_BOARD_UNBRANDED,
>>>>>         },
>>>>>   };
>>>>>
>>>>> ***************
>>>>> *** 698,703 ****
>>>>> --- 710,727 ----
>>>>>                         dm1105dvb->fe->ops.set_voltage =
>>>>> dm1105dvb_set_voltage;
>>>>>
>>>>>                 break;
>>>>> +       case DM1105_BOARD_UNBRANDED:
>>>>> +                 printk(KERN_ERR "Attaching as board_unbranded\n");
>>>>> +               outl(UNBRANDED_DEMOD_MASK, dm_io_mem(DM1105_GPIOCTR));
>>>>> +               outl(UNBRANDED_DEMOD_RESET ,
>>>>> dm_io_mem(DM1105_GPIOVAL));
>>>>> +               dm1105dvb->fe = dvb_attach(
>>>>> +                       si21xx_attach, &serit_config,
>>>>> +                       &dm1105dvb->i2c_adap);
>>>>> +                       if (dm1105dvb->fe)
>>>>> +                               dm1105dvb->fe->ops.set_voltage =
>>>>> +                                       dm1105dvb_set_voltage;
>>>>> +
>>>>> +               break;
>>>>>         case DM1105_BOARD_DVBWORLD_2002:
>>>>>         case DM1105_BOARD_AXESS_DM05:
>>>>>         default:
>>>>>           
>>>> Some things are missed, like keep GPIO15 high in set_voltage function.
>>>> Try attached patch against current v4l-dvb tree with modprobe option
>>>> card=4
>>>>     modprobe dm1105 card=4
>>>>         
> Hi Nameer,
> You can modify sended by me patch to guess GPIO pin. Simply try all of them, it is only 17. 
> Just replace all appearances DM1105_GPIO(15) with number you want.
>   
Ok I will do that.

Thanks
Nameer

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-02 17:16                 ` Nameer Kazzaz
@ 2010-02-02 22:07                   ` Nameer Kazzaz
  2010-02-03 17:41                     ` Igor M. Liplianin
  0 siblings, 1 reply; 51+ messages in thread
From: Nameer Kazzaz @ 2010-02-02 22:07 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: paul10, linux-media, Christian Hüppe

Nameer Kazzaz wrote:
> Igor M. Liplianin wrote:
>> On 2 февраля 2010 17:21:46 Nameer Kazzaz wrote:
>>  
>>> Hi Igor,
>>>     What do you think ? if I can help you solve this, let me know 
>>> what I
>>> can do.
>>>
>>> Thanks
>>> Nameer
>>>
>>> Nameer Kazzaz wrote:
>>>    
>>>> Hi there,
>>>> dmesg output with patched dm1105.c against current v4l-dvb 'modprob
>>>> dm1105 card=4'
>>>>
>>>> dm1105 0000:05:0f.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
>>>> DVB: registering new adapter (dm1105)
>>>> dm1105 0000:05:0f.0: MAC dd49b0dc
>>>> dm1105 0000:05:0f.0: could not attach frontend
>>>> dm1105 0000:05:0f.0: PCI INT A disabled
>>>>
>>>> Thanks
>>>> Nameer Kazzaz
>>>>
>>>> Igor M. Liplianin wrote:
>>>>      
>>>>> On 20 ?????? 2010 23:20:20 paul10@planar.id.au wrote:
>>>>>        
>>>>>> Igor wrote:
>>>>>>          
>>>>>>> Oh, that is wrong. It is registers addresses, Never touch this.
>>>>>>>
>>>>>>> Let's look on that part of code:
>>>>>>>
>>>>>>> /* GPIO's for LNB power control */
>>>>>>> #define DM1105_LNB_MASK                         0x00000000 // 
>>>>>>> later in
>>>>>>>             
>>>>>> code write it to
>>>>>>
>>>>>>          
>>>>>>> DM1105_GPIOCTR, all GPIO's as OUT
>>>>>>> #define DM1105_LNB_OFF                          0x00020000 // 
>>>>>>> later in
>>>>>>>             
>>>>>> code write it to
>>>>>>
>>>>>>          
>>>>>>> DM1105_GPIOVAL, set GPIO17 to HIGH
>>>>>>>
>>>>>>> But you have not to change this.
>>>>>>> Right way is to write another entry in cards structure and so on.
>>>>>>> Better leave it to me.
>>>>>>>
>>>>>>> Regards
>>>>>>> Igor
>>>>>>>             
>>>>>> Thanks for all your help, I understand better now.  I have moved to
>>>>>> code
>>>>>> like that at the bottom.  It still doesn't work, but feels a lot
>>>>>> closer.
>>>>>>
>>>>>> Before I keep playing with values, I want to check I'm on the right
>>>>>> track.
>>>>>> Does it look right?  Specific questions:
>>>>>> 1. I see there is a hw_init function.  Should I be using that?  I
>>>>>> put the
>>>>>> logic into fe_attach because there was already card-specific 
>>>>>> logic in
>>>>>> there.  But this feels like hw initialisation.
>>>>>>
>>>>>> 2. Should I set the control to input or output?  I'm assuming input
>>>>>> = 1.
>>>>>>
>>>>>> 3. Would pin 15 be numbered from the left or right - is it 0x4, or
>>>>>> 0x2000?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Paul
>>>>>>
>>>>>> *** dm1105.c.old        2010-01-13 16:15:00.000000000 +1100
>>>>>> --- dm1105.c    2010-01-21 08:13:14.000000000 +1100
>>>>>> ***************
>>>>>> *** 51,56 ****
>>>>>> --- 51,57 ----
>>>>>>   #define DM1105_BOARD_DVBWORLD_2002    1
>>>>>>   #define DM1105_BOARD_DVBWORLD_2004    2
>>>>>>   #define DM1105_BOARD_AXESS_DM05               3
>>>>>> + #define DM1105_BOARD_UNBRANDED                4
>>>>>>
>>>>>>   /* ----------------------------------------------- */
>>>>>>   /*
>>>>>> ***************
>>>>>> *** 171,176 ****
>>>>>> --- 172,181 ----
>>>>>>   #define DM05_LNB_13V                          0x00020000
>>>>>>   #define DM05_LNB_18V                          0x00030000
>>>>>>
>>>>>> + /* GPIO's for demod reset for unbranded 195d:1105 */
>>>>>> + #define UNBRANDED_DEMOD_MASK                  0x00008000
>>>>>> + #define UNBRANDED_DEMOD_RESET                 0x00008000
>>>>>> +
>>>>>>   static unsigned int card[]  = {[0 ... 3] = UNSET };
>>>>>>   module_param_array(card,  int, NULL, 0444);
>>>>>>   MODULE_PARM_DESC(card, "card type");
>>>>>> ***************
>>>>>> *** 206,211 ****
>>>>>> --- 211,219 ----
>>>>>>         [DM1105_BOARD_AXESS_DM05] = {
>>>>>>                 .name           = "Axess/EasyTv DM05",
>>>>>>         },
>>>>>> +       [DM1105_BOARD_UNBRANDED] = {
>>>>>> +               .name           = "Unbranded 195d:1105",
>>>>>> +         },
>>>>>>   };
>>>>>>
>>>>>>   static const struct dm1105_subid dm1105_subids[] = {
>>>>>> ***************
>>>>>> *** 229,234 ****
>>>>>> --- 237,246 ----
>>>>>>                 .subvendor = 0x195d,
>>>>>>                 .subdevice = 0x1105,
>>>>>>                 .card      = DM1105_BOARD_AXESS_DM05,
>>>>>> +       }, {
>>>>>> +               .subvendor = 0x195d,
>>>>>> +               .subdevice = 0x1105,
>>>>>> +               .card      = DM1105_BOARD_UNBRANDED,
>>>>>>         },
>>>>>>   };
>>>>>>
>>>>>> ***************
>>>>>> *** 698,703 ****
>>>>>> --- 710,727 ----
>>>>>>                         dm1105dvb->fe->ops.set_voltage =
>>>>>> dm1105dvb_set_voltage;
>>>>>>
>>>>>>                 break;
>>>>>> +       case DM1105_BOARD_UNBRANDED:
>>>>>> +                 printk(KERN_ERR "Attaching as board_unbranded\n");
>>>>>> +               outl(UNBRANDED_DEMOD_MASK, 
>>>>>> dm_io_mem(DM1105_GPIOCTR));
>>>>>> +               outl(UNBRANDED_DEMOD_RESET ,
>>>>>> dm_io_mem(DM1105_GPIOVAL));
>>>>>> +               dm1105dvb->fe = dvb_attach(
>>>>>> +                       si21xx_attach, &serit_config,
>>>>>> +                       &dm1105dvb->i2c_adap);
>>>>>> +                       if (dm1105dvb->fe)
>>>>>> +                               dm1105dvb->fe->ops.set_voltage =
>>>>>> +                                       dm1105dvb_set_voltage;
>>>>>> +
>>>>>> +               break;
>>>>>>         case DM1105_BOARD_DVBWORLD_2002:
>>>>>>         case DM1105_BOARD_AXESS_DM05:
>>>>>>         default:
>>>>>>           
>>>>> Some things are missed, like keep GPIO15 high in set_voltage 
>>>>> function.
>>>>> Try attached patch against current v4l-dvb tree with modprobe option
>>>>> card=4
>>>>>     modprobe dm1105 card=4
>>>>>         
>> Hi Nameer,
>> You can modify sended by me patch to guess GPIO pin. Simply try all 
>> of them, it is only 17. Just replace all appearances DM1105_GPIO(15) 
>> with number you want.
>>   
> Ok I will do that.
>
> Thanks
> Nameer
Hi Igor,
    I tried all DM1105_GPIO(0) to DM1105_GPIO(17), same error. Any Idea ?

Nameer

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-02 22:07                   ` Nameer Kazzaz
@ 2010-02-03 17:41                     ` Igor M. Liplianin
  2010-02-04  9:56                       ` Nameer Kazzaz
  0 siblings, 1 reply; 51+ messages in thread
From: Igor M. Liplianin @ 2010-02-03 17:41 UTC (permalink / raw)
  To: Nameer Kazzaz; +Cc: paul10, linux-media, Christian Hüppe

On 3 февраля 2010 00:07:36 Nameer Kazzaz wrote:
> Nameer Kazzaz wrote:
> > Igor M. Liplianin wrote:
> >> On 2 февраля 2010 17:21:46 Nameer Kazzaz wrote:
> >>> Hi Igor,
> >>>     What do you think ? if I can help you solve this, let me know
> >>> what I
> >>> can do.
> >>>
> >>> Thanks
> >>> Nameer
> >>>
> >>> Nameer Kazzaz wrote:
> >>>> Hi there,
> >>>> dmesg output with patched dm1105.c against current v4l-dvb 'modprob
> >>>> dm1105 card=4'
> >>>>
> >>>> dm1105 0000:05:0f.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> >>>> DVB: registering new adapter (dm1105)
> >>>> dm1105 0000:05:0f.0: MAC dd49b0dc
> >>>> dm1105 0000:05:0f.0: could not attach frontend
> >>>> dm1105 0000:05:0f.0: PCI INT A disabled
> >>>>
> >>>> Thanks
> >>>> Nameer Kazzaz
> >>>>
> >>>> Igor M. Liplianin wrote:
> >>>>> On 20 ?????? 2010 23:20:20 paul10@planar.id.au wrote:
> >>>>>> Igor wrote:
> >>>>>>> Oh, that is wrong. It is registers addresses, Never touch this.
> >>>>>>>
> >>>>>>> Let's look on that part of code:
> >>>>>>>
> >>>>>>> /* GPIO's for LNB power control */
> >>>>>>> #define DM1105_LNB_MASK                         0x00000000 //
> >>>>>>> later in
> >>>>>>
> >>>>>> code write it to
> >>>>>>
> >>>>>>> DM1105_GPIOCTR, all GPIO's as OUT
> >>>>>>> #define DM1105_LNB_OFF                          0x00020000 //
> >>>>>>> later in
> >>>>>>
> >>>>>> code write it to
> >>>>>>
> >>>>>>> DM1105_GPIOVAL, set GPIO17 to HIGH
> >>>>>>>
> >>>>>>> But you have not to change this.
> >>>>>>> Right way is to write another entry in cards structure and so on.
> >>>>>>> Better leave it to me.
> >>>>>>>
> >>>>>>> Regards
> >>>>>>> Igor
> >>>>>>
> >>>>>> Thanks for all your help, I understand better now.  I have moved to
> >>>>>> code
> >>>>>> like that at the bottom.  It still doesn't work, but feels a lot
> >>>>>> closer.
> >>>>>>
> >>>>>> Before I keep playing with values, I want to check I'm on the right
> >>>>>> track.
> >>>>>> Does it look right?  Specific questions:
> >>>>>> 1. I see there is a hw_init function.  Should I be using that?  I
> >>>>>> put the
> >>>>>> logic into fe_attach because there was already card-specific
> >>>>>> logic in
> >>>>>> there.  But this feels like hw initialisation.
> >>>>>>
> >>>>>> 2. Should I set the control to input or output?  I'm assuming input
> >>>>>> = 1.
> >>>>>>
> >>>>>> 3. Would pin 15 be numbered from the left or right - is it 0x4, or
> >>>>>> 0x2000?
> >>>>>>
> >>>>>> Thanks,
> >>>>>>
> >>>>>> Paul
> >>>>>>
> >>>>>> *** dm1105.c.old        2010-01-13 16:15:00.000000000 +1100
> >>>>>> --- dm1105.c    2010-01-21 08:13:14.000000000 +1100
> >>>>>> ***************
> >>>>>> *** 51,56 ****
> >>>>>> --- 51,57 ----
> >>>>>>   #define DM1105_BOARD_DVBWORLD_2002    1
> >>>>>>   #define DM1105_BOARD_DVBWORLD_2004    2
> >>>>>>   #define DM1105_BOARD_AXESS_DM05               3
> >>>>>> + #define DM1105_BOARD_UNBRANDED                4
> >>>>>>
> >>>>>>   /* ----------------------------------------------- */
> >>>>>>   /*
> >>>>>> ***************
> >>>>>> *** 171,176 ****
> >>>>>> --- 172,181 ----
> >>>>>>   #define DM05_LNB_13V                          0x00020000
> >>>>>>   #define DM05_LNB_18V                          0x00030000
> >>>>>>
> >>>>>> + /* GPIO's for demod reset for unbranded 195d:1105 */
> >>>>>> + #define UNBRANDED_DEMOD_MASK                  0x00008000
> >>>>>> + #define UNBRANDED_DEMOD_RESET                 0x00008000
> >>>>>> +
> >>>>>>   static unsigned int card[]  = {[0 ... 3] = UNSET };
> >>>>>>   module_param_array(card,  int, NULL, 0444);
> >>>>>>   MODULE_PARM_DESC(card, "card type");
> >>>>>> ***************
> >>>>>> *** 206,211 ****
> >>>>>> --- 211,219 ----
> >>>>>>         [DM1105_BOARD_AXESS_DM05] = {
> >>>>>>                 .name           = "Axess/EasyTv DM05",
> >>>>>>         },
> >>>>>> +       [DM1105_BOARD_UNBRANDED] = {
> >>>>>> +               .name           = "Unbranded 195d:1105",
> >>>>>> +         },
> >>>>>>   };
> >>>>>>
> >>>>>>   static const struct dm1105_subid dm1105_subids[] = {
> >>>>>> ***************
> >>>>>> *** 229,234 ****
> >>>>>> --- 237,246 ----
> >>>>>>                 .subvendor = 0x195d,
> >>>>>>                 .subdevice = 0x1105,
> >>>>>>                 .card      = DM1105_BOARD_AXESS_DM05,
> >>>>>> +       }, {
> >>>>>> +               .subvendor = 0x195d,
> >>>>>> +               .subdevice = 0x1105,
> >>>>>> +               .card      = DM1105_BOARD_UNBRANDED,
> >>>>>>         },
> >>>>>>   };
> >>>>>>
> >>>>>> ***************
> >>>>>> *** 698,703 ****
> >>>>>> --- 710,727 ----
> >>>>>>                         dm1105dvb->fe->ops.set_voltage =
> >>>>>> dm1105dvb_set_voltage;
> >>>>>>
> >>>>>>                 break;
> >>>>>> +       case DM1105_BOARD_UNBRANDED:
> >>>>>> +                 printk(KERN_ERR "Attaching as board_unbranded\n");
> >>>>>> +               outl(UNBRANDED_DEMOD_MASK,
> >>>>>> dm_io_mem(DM1105_GPIOCTR));
> >>>>>> +               outl(UNBRANDED_DEMOD_RESET ,
> >>>>>> dm_io_mem(DM1105_GPIOVAL));
> >>>>>> +               dm1105dvb->fe = dvb_attach(
> >>>>>> +                       si21xx_attach, &serit_config,
> >>>>>> +                       &dm1105dvb->i2c_adap);
> >>>>>> +                       if (dm1105dvb->fe)
> >>>>>> +                               dm1105dvb->fe->ops.set_voltage =
> >>>>>> +                                       dm1105dvb_set_voltage;
> >>>>>> +
> >>>>>> +               break;
> >>>>>>         case DM1105_BOARD_DVBWORLD_2002:
> >>>>>>         case DM1105_BOARD_AXESS_DM05:
> >>>>>>         default:
> >>>>>
> >>>>> Some things are missed, like keep GPIO15 high in set_voltage
> >>>>> function.
> >>>>> Try attached patch against current v4l-dvb tree with modprobe option
> >>>>> card=4
> >>>>>     modprobe dm1105 card=4
> >>
> >> Hi Nameer,
> >> You can modify sended by me patch to guess GPIO pin. Simply try all
> >> of them, it is only 17. Just replace all appearances DM1105_GPIO(15)
> >> with number you want.
> >
> > Ok I will do that.
> >
> > Thanks
> > Nameer
>
> Hi Igor,
>     I tried all DM1105_GPIO(0) to DM1105_GPIO(17), same error. Any Idea ?
>
> Nameer
Hi

I have some ideas, for example, to add to driver i2c_scan function.

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-03 17:41                     ` Igor M. Liplianin
@ 2010-02-04  9:56                       ` Nameer Kazzaz
  0 siblings, 0 replies; 51+ messages in thread
From: Nameer Kazzaz @ 2010-02-04  9:56 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: paul10, linux-media, Christian Hüppe

Igor M. Liplianin wrote:
> On 3 февраля 2010 00:07:36 Nameer Kazzaz wrote:
>   
>> Nameer Kazzaz wrote:
>>     
>>> Igor M. Liplianin wrote:
>>>       
>>>> On 2 февраля 2010 17:21:46 Nameer Kazzaz wrote:
>>>>         
>>>>> Hi Igor,
>>>>>     What do you think ? if I can help you solve this, let me know
>>>>> what I
>>>>> can do.
>>>>>
>>>>> Thanks
>>>>> Nameer
>>>>>
>>>>> Nameer Kazzaz wrote:
>>>>>           
>>>>>> Hi there,
>>>>>> dmesg output with patched dm1105.c against current v4l-dvb 'modprob
>>>>>> dm1105 card=4'
>>>>>>
>>>>>> dm1105 0000:05:0f.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
>>>>>> DVB: registering new adapter (dm1105)
>>>>>> dm1105 0000:05:0f.0: MAC dd49b0dc
>>>>>> dm1105 0000:05:0f.0: could not attach frontend
>>>>>> dm1105 0000:05:0f.0: PCI INT A disabled
>>>>>>
>>>>>> Thanks
>>>>>> Nameer Kazzaz
>>>>>>
>>>>>> Igor M. Liplianin wrote:
>>>>>>             
>>>>>>> On 20 ?????? 2010 23:20:20 paul10@planar.id.au wrote:
>>>>>>>               
>>>>>>>> Igor wrote:
>>>>>>>>                 
>>>>>>>>> Oh, that is wrong. It is registers addresses, Never touch this.
>>>>>>>>>
>>>>>>>>> Let's look on that part of code:
>>>>>>>>>
>>>>>>>>> /* GPIO's for LNB power control */
>>>>>>>>> #define DM1105_LNB_MASK                         0x00000000 //
>>>>>>>>> later in
>>>>>>>>>                   
>>>>>>>> code write it to
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> DM1105_GPIOCTR, all GPIO's as OUT
>>>>>>>>> #define DM1105_LNB_OFF                          0x00020000 //
>>>>>>>>> later in
>>>>>>>>>                   
>>>>>>>> code write it to
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> DM1105_GPIOVAL, set GPIO17 to HIGH
>>>>>>>>>
>>>>>>>>> But you have not to change this.
>>>>>>>>> Right way is to write another entry in cards structure and so on.
>>>>>>>>> Better leave it to me.
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> Igor
>>>>>>>>>                   
>>>>>>>> Thanks for all your help, I understand better now.  I have moved to
>>>>>>>> code
>>>>>>>> like that at the bottom.  It still doesn't work, but feels a lot
>>>>>>>> closer.
>>>>>>>>
>>>>>>>> Before I keep playing with values, I want to check I'm on the right
>>>>>>>> track.
>>>>>>>> Does it look right?  Specific questions:
>>>>>>>> 1. I see there is a hw_init function.  Should I be using that?  I
>>>>>>>> put the
>>>>>>>> logic into fe_attach because there was already card-specific
>>>>>>>> logic in
>>>>>>>> there.  But this feels like hw initialisation.
>>>>>>>>
>>>>>>>> 2. Should I set the control to input or output?  I'm assuming input
>>>>>>>> = 1.
>>>>>>>>
>>>>>>>> 3. Would pin 15 be numbered from the left or right - is it 0x4, or
>>>>>>>> 0x2000?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Paul
>>>>>>>>
>>>>>>>> *** dm1105.c.old        2010-01-13 16:15:00.000000000 +1100
>>>>>>>> --- dm1105.c    2010-01-21 08:13:14.000000000 +1100
>>>>>>>> ***************
>>>>>>>> *** 51,56 ****
>>>>>>>> --- 51,57 ----
>>>>>>>>   #define DM1105_BOARD_DVBWORLD_2002    1
>>>>>>>>   #define DM1105_BOARD_DVBWORLD_2004    2
>>>>>>>>   #define DM1105_BOARD_AXESS_DM05               3
>>>>>>>> + #define DM1105_BOARD_UNBRANDED                4
>>>>>>>>
>>>>>>>>   /* ----------------------------------------------- */
>>>>>>>>   /*
>>>>>>>> ***************
>>>>>>>> *** 171,176 ****
>>>>>>>> --- 172,181 ----
>>>>>>>>   #define DM05_LNB_13V                          0x00020000
>>>>>>>>   #define DM05_LNB_18V                          0x00030000
>>>>>>>>
>>>>>>>> + /* GPIO's for demod reset for unbranded 195d:1105 */
>>>>>>>> + #define UNBRANDED_DEMOD_MASK                  0x00008000
>>>>>>>> + #define UNBRANDED_DEMOD_RESET                 0x00008000
>>>>>>>> +
>>>>>>>>   static unsigned int card[]  = {[0 ... 3] = UNSET };
>>>>>>>>   module_param_array(card,  int, NULL, 0444);
>>>>>>>>   MODULE_PARM_DESC(card, "card type");
>>>>>>>> ***************
>>>>>>>> *** 206,211 ****
>>>>>>>> --- 211,219 ----
>>>>>>>>         [DM1105_BOARD_AXESS_DM05] = {
>>>>>>>>                 .name           = "Axess/EasyTv DM05",
>>>>>>>>         },
>>>>>>>> +       [DM1105_BOARD_UNBRANDED] = {
>>>>>>>> +               .name           = "Unbranded 195d:1105",
>>>>>>>> +         },
>>>>>>>>   };
>>>>>>>>
>>>>>>>>   static const struct dm1105_subid dm1105_subids[] = {
>>>>>>>> ***************
>>>>>>>> *** 229,234 ****
>>>>>>>> --- 237,246 ----
>>>>>>>>                 .subvendor = 0x195d,
>>>>>>>>                 .subdevice = 0x1105,
>>>>>>>>                 .card      = DM1105_BOARD_AXESS_DM05,
>>>>>>>> +       }, {
>>>>>>>> +               .subvendor = 0x195d,
>>>>>>>> +               .subdevice = 0x1105,
>>>>>>>> +               .card      = DM1105_BOARD_UNBRANDED,
>>>>>>>>         },
>>>>>>>>   };
>>>>>>>>
>>>>>>>> ***************
>>>>>>>> *** 698,703 ****
>>>>>>>> --- 710,727 ----
>>>>>>>>                         dm1105dvb->fe->ops.set_voltage =
>>>>>>>> dm1105dvb_set_voltage;
>>>>>>>>
>>>>>>>>                 break;
>>>>>>>> +       case DM1105_BOARD_UNBRANDED:
>>>>>>>> +                 printk(KERN_ERR "Attaching as board_unbranded\n");
>>>>>>>> +               outl(UNBRANDED_DEMOD_MASK,
>>>>>>>> dm_io_mem(DM1105_GPIOCTR));
>>>>>>>> +               outl(UNBRANDED_DEMOD_RESET ,
>>>>>>>> dm_io_mem(DM1105_GPIOVAL));
>>>>>>>> +               dm1105dvb->fe = dvb_attach(
>>>>>>>> +                       si21xx_attach, &serit_config,
>>>>>>>> +                       &dm1105dvb->i2c_adap);
>>>>>>>> +                       if (dm1105dvb->fe)
>>>>>>>> +                               dm1105dvb->fe->ops.set_voltage =
>>>>>>>> +                                       dm1105dvb_set_voltage;
>>>>>>>> +
>>>>>>>> +               break;
>>>>>>>>         case DM1105_BOARD_DVBWORLD_2002:
>>>>>>>>         case DM1105_BOARD_AXESS_DM05:
>>>>>>>>         default:
>>>>>>>>                 
>>>>>>> Some things are missed, like keep GPIO15 high in set_voltage
>>>>>>> function.
>>>>>>> Try attached patch against current v4l-dvb tree with modprobe option
>>>>>>> card=4
>>>>>>>     modprobe dm1105 card=4
>>>>>>>               
>>>> Hi Nameer,
>>>> You can modify sended by me patch to guess GPIO pin. Simply try all
>>>> of them, it is only 17. Just replace all appearances DM1105_GPIO(15)
>>>> with number you want.
>>>>         
>>> Ok I will do that.
>>>
>>> Thanks
>>> Nameer
>>>       
>> Hi Igor,
>>     I tried all DM1105_GPIO(0) to DM1105_GPIO(17), same error. Any Idea ?
>>
>> Nameer
>>     
> Hi
>
> I have some ideas, for example, to add to driver i2c_scan function.
>   
Hi Igor,
    Ok so if you need any more info from the pci board and testing any 
patches please let me know. And thanks for your help on this.

Nameer


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

* Re: DM1105: could not attach frontend 195d:1105
  2011-05-05 18:41 Igor M. Liplianin
@ 2011-05-05 19:01 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 51+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-05 19:01 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: Hendrik Skarpeid, linux-media, Nameer Kazzaz

Em 05-05-2011 15:41, Igor M. Liplianin escreveu:
> В сообщении от 4 мая 2011 00:33:51 автор Mauro Carvalho Chehab написал:
>> Hi Igor,
>>
>> Em 23-10-2010 07:20, Igor M. Liplianin escreveu:
>>> В сообщении от 10 марта 2010 14:15:49 автор Hendrik Skarpeid написал:
>>>> Igor M. Liplianin skrev:
>>>>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
>>>>>> Igor M. Liplianin wrote:
>>>>>>> Now to find GPIO's for LNB power control and ... watch TV :)
>>>>>>
>>>>>> Yep. No succesful tuning at the moment. There might also be an issue
>>>>>> with the reset signal and writing to GPIOCTR, as the module at the
>>>>>> moment loads succesfully only once.
>>>>>> As far as I can make out, the LNB power control is probably GPIO 16
>>>>>> and 17, not sure which is which, and how they work.
>>>>>> GPIO15 is wired to tuner #reset
>>>>>
>>>>> New patch to test
>>>>
>>>> I think the LNB voltage may be a little to high on my card, 14.5V and
>>>> 20V. I would be a little more happy if they were 14 and 19, 13 and 18
>>>> would be perfect.
>>>> Anyways, as Igor pointet out, I don't have any signal from the LNB,
>>>> checked with another tuner card. It's a quad LNB, and the other outputs
>>>> are fine. Maybe it's' toasted from to high supply voltage! I little word
>>>> of warning then.
>>>> Anyways, here's my tweaked driver.
>>>
>>> Here is reworked patch for clear GPIO's handling.
>>> It allows to support I2C on GPIO's and per board LNB control through
>>> GPIO's. Also incuded support for Hendrik's card.
>>> I think it is clear how to change and test GPIO's for LNB and other stuff
>>> now.
>>>
>>> To Hendrik:
>>> 	Not shure, but there is maybe GPIO for raise/down LNB voltage a little
>>> 	(~1v). It is used for long coaxial lines to compensate voltage
>>> 	dropping.
>>>
>>> Signed-off-by: Igor M. Liplianin <liplianin@me.by>
>>
>> I'm not sure if this patch is still valid or not, and if it should or not
>> be applied, as there were several discussions around it. As a reference,
>> it is stored at patchwork with:
>> 	X-Patchwork-Id: 279091
>>
>> And still applies fine (yet, patchwork lost patch history/comments and
>> SOB).
>>
>> Igor, could you please update me if I should apply this patch or if the
>> patch got rejected/superseeded?
>>
>> Thanks!
>> Mauro.
> Hi Mauro,
> The patch should be applied.
> Do I need to do something, it means apply to a tree and send pull request? 

I could just apply it, as your email is an ack for it, but, as it is not
properly documented, I prefer if you can send an email to the mailing list
with the patch properly described.

Thanks!
Mauro.

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

* Re: DM1105: could not attach frontend 195d:1105
@ 2011-05-05 18:41 Igor M. Liplianin
  2011-05-05 19:01 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 51+ messages in thread
From: Igor M. Liplianin @ 2011-05-05 18:41 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Hendrik Skarpeid, linux-media, Nameer Kazzaz

В сообщении от 4 мая 2011 00:33:51 автор Mauro Carvalho Chehab написал:
> Hi Igor,
> 
> Em 23-10-2010 07:20, Igor M. Liplianin escreveu:
> > В сообщении от 10 марта 2010 14:15:49 автор Hendrik Skarpeid написал:
> >> Igor M. Liplianin skrev:
> >>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
> >>>> Igor M. Liplianin wrote:
> >>>>> Now to find GPIO's for LNB power control and ... watch TV :)
> >>>> 
> >>>> Yep. No succesful tuning at the moment. There might also be an issue
> >>>> with the reset signal and writing to GPIOCTR, as the module at the
> >>>> moment loads succesfully only once.
> >>>> As far as I can make out, the LNB power control is probably GPIO 16
> >>>> and 17, not sure which is which, and how they work.
> >>>> GPIO15 is wired to tuner #reset
> >>> 
> >>> New patch to test
> >> 
> >> I think the LNB voltage may be a little to high on my card, 14.5V and
> >> 20V. I would be a little more happy if they were 14 and 19, 13 and 18
> >> would be perfect.
> >> Anyways, as Igor pointet out, I don't have any signal from the LNB,
> >> checked with another tuner card. It's a quad LNB, and the other outputs
> >> are fine. Maybe it's' toasted from to high supply voltage! I little word
> >> of warning then.
> >> Anyways, here's my tweaked driver.
> > 
> > Here is reworked patch for clear GPIO's handling.
> > It allows to support I2C on GPIO's and per board LNB control through
> > GPIO's. Also incuded support for Hendrik's card.
> > I think it is clear how to change and test GPIO's for LNB and other stuff
> > now.
> > 
> > To Hendrik:
> > 	Not shure, but there is maybe GPIO for raise/down LNB voltage a little
> > 	(~1v). It is used for long coaxial lines to compensate voltage
> > 	dropping.
> > 
> > Signed-off-by: Igor M. Liplianin <liplianin@me.by>
> 
> I'm not sure if this patch is still valid or not, and if it should or not
> be applied, as there were several discussions around it. As a reference,
> it is stored at patchwork with:
> 	X-Patchwork-Id: 279091
> 
> And still applies fine (yet, patchwork lost patch history/comments and
> SOB).
> 
> Igor, could you please update me if I should apply this patch or if the
> patch got rejected/superseeded?
> 
> Thanks!
> Mauro.
Hi Mauro,
The patch should be applied.
Do I need to do something, it means apply to a tree and send pull request? 

Thanks!
Igor
-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-10-23  9:20                         ` Igor M. Liplianin
  2011-01-31  9:33                           ` Matt Vickers
@ 2011-05-03 21:33                           ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 51+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-03 21:33 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: Hendrik Skarpeid, linux-media, Nameer Kazzaz

Hi Igor,

Em 23-10-2010 07:20, Igor M. Liplianin escreveu:
> В сообщении от 10 марта 2010 14:15:49 автор Hendrik Skarpeid написал:
>> Igor M. Liplianin skrev:
>>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
>>>> Igor M. Liplianin wrote:
>>>>> Now to find GPIO's for LNB power control and ... watch TV :)
>>>>
>>>> Yep. No succesful tuning at the moment. There might also be an issue
>>>> with the reset signal and writing to GPIOCTR, as the module at the
>>>> moment loads succesfully only once.
>>>> As far as I can make out, the LNB power control is probably GPIO 16 and
>>>> 17, not sure which is which, and how they work.
>>>> GPIO15 is wired to tuner #reset
>>>
>>> New patch to test
>>
>> I think the LNB voltage may be a little to high on my card, 14.5V and
>> 20V. I would be a little more happy if they were 14 and 19, 13 and 18
>> would be perfect.
>> Anyways, as Igor pointet out, I don't have any signal from the LNB,
>> checked with another tuner card. It's a quad LNB, and the other outputs
>> are fine. Maybe it's' toasted from to high supply voltage! I little word
>> of warning then.
>> Anyways, here's my tweaked driver.
> 
> Here is reworked patch for clear GPIO's handling.
> It allows to support I2C on GPIO's and per board LNB control through GPIO's.
> Also incuded support for Hendrik's card.
> I think it is clear how to change and test GPIO's for LNB and other stuff now.
> To Hendrik:
> 	Not shure, but there is maybe GPIO for raise/down LNB voltage a little (~1v).
> 	It is used for long coaxial lines to compensate voltage dropping.
> 
> Signed-off-by: Igor M. Liplianin <liplianin@me.by>

I'm not sure if this patch is still valid or not, and if it should or not be
applied, as there were several discussions around it. As a reference, it is stored
at patchwork with:
	X-Patchwork-Id: 279091

And still applies fine (yet, patchwork lost patch history/comments and SOB).

Igor, could you please update me if I should apply this patch or if the patch got
rejected/superseeded?

Thanks!
Mauro.




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

* Re: DM1105: could not attach frontend 195d:1105
  2011-02-02 18:39                                 ` Igor M. Liplianin
@ 2011-02-02 18:41                                   ` Igor M. Liplianin
  0 siblings, 0 replies; 51+ messages in thread
From: Igor M. Liplianin @ 2011-02-02 18:41 UTC (permalink / raw)
  To: Matt Vickers; +Cc: linux-media

В сообщении от 2 февраля 2011 20:39:33 автор Igor M. Liplianin написал:
> В сообщении от 1 февраля 2011 07:17:19 автор Matt Vickers написал:
> > On 1/02/2011 6:55 a.m., Igor M. Liplianin wrote:
> > > В сообщении от 31 января 2011 11:33:54 автор Matt Vickers написал:
> > >> On 23/10/2010 10:20 p.m., Igor M. Liplianin wrote:
> > >>> В сообщении от 10 марта 2010 14:15:49 автор Hendrik Skarpeid написал:
> > >>>> Igor M. Liplianin skrev:
> > >>>>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
> > >>>>>> Igor M. Liplianin wrote:
> > >>>>>>> Now to find GPIO's for LNB power control and ... watch TV :)
> > >>>>>> 
> > >>>>>> Yep. No succesful tuning at the moment. There might also be an
> > >>>>>> issue with the reset signal and writing to GPIOCTR, as the module
> > >>>>>> at the moment loads succesfully only once.
> > >>>>>> As far as I can make out, the LNB power control is probably GPIO
> > >>>>>> 16 and 17, not sure which is which, and how they work.
> > >>>>>> GPIO15 is wired to tuner #reset
> > >>>>> 
> > >>>>> New patch to test
> > >>>> 
> > >>>> I think the LNB voltage may be a little to high on my card, 14.5V
> > >>>> and 20V. I would be a little more happy if they were 14 and 19, 13
> > >>>> and 18 would be perfect.
> > >>>> Anyways, as Igor pointet out, I don't have any signal from the LNB,
> > >>>> checked with another tuner card. It's a quad LNB, and the other
> > >>>> outputs are fine. Maybe it's' toasted from to high supply voltage! I
> > >>>> little word of warning then.
> > >>>> Anyways, here's my tweaked driver.
> > >>> 
> > >>> Here is reworked patch for clear GPIO's handling.
> > >>> It allows to support I2C on GPIO's and per board LNB control through
> > >>> GPIO's. Also incuded support for Hendrik's card.
> > >>> I think it is clear how to change and test GPIO's for LNB and other
> > >>> stuff now.
> > >>> 
> > >>> To Hendrik:
> > >>> 	Not shure, but there is maybe GPIO for raise/down LNB voltage a
> > >>> 	little (~1v). It is used for long coaxial lines to compensate
> > >>> 	voltage dropping.
> > >>> 
> > >>> Signed-off-by: Igor M. Liplianin<liplianin@me.by>
> > >> 
> > >> Hi Igor,
> > >> 
> > >> I have a brandless DVB-S tv tuner card also, with a dm1105n chip. I
> > >> was getting the "DM1105: could not attach frontend 195d:1105" message
> > >> with the latest kernel also, but I applied this patch to the dm1105
> > >> module and now the card's being recognised  (though is still listed
> > >> as an ethernet controller with lspci)
> > >> 
> > >> My dmesg output is:
> > >> 
> > >> dm1105 0000:01:05.0: PCI INT A ->  GSI 17 (level, low) ->  IRQ 17
> > >> DVB: registering new adapter (dm1105)
> > >> dm1105 0000:01:05.0: MAC 00:00:00:00:00:00
> > >> DVB: registering adapter 0 frontend 0 (SL SI21XX DVB-S)...
> > >> Registered IR keymap rc-dm1105-nec
> > >> input: DVB on-card IR receiver as
> > >> /devices/pci0000:00/0000:00:1e.0/0000:01:05.0/rc/rc0/input6
> > >> rc0: DVB on-card IR receiver as
> > >> /devices/pci0000:00/0000:00:1e.0/0000:01:05.0/rc/rc0
> > >> 
> > >> The card is one of these:
> > >> http://www.hongsun.biz/ProView.asp?ID=90
> > >> 
> > >> Scanning doesn't appear to give me any results.  Should this be
> > >> working?
> > >> 
> > >>    Anything I can do to test the card out for you?
> > >> 
> > >> Cheers,
> > >> Matt.
> > > 
> > > Hi Matt,
> > > Is there any label on tuner can?
> > > Have you a close look picture of PCB ?
> > > 
> > > Cheers,
> > > Igor.
> > 
> > Hi Igor,
> > 
> > The label on the tuner can is SP1514LHb S1009, so I'm guessing this is a
> > near-identical card to the one that Paul was asking you about in January
> > 
> > of last year, e.g:
> > >  1: DVB-S
> > >  5: 16cc
> > >  1: Unsure, but it has an LNB in and an LNB out, so I guess it does
> > >  have loop through?
> > >  4: Si2109
> > >  L: Si labs
> > >  H: Horizontal
> > >  b: Lead free
> > 
> > Here are two images I took of the card:
> > 
> > A view of the entire board:
> > 
> > http://matt.vicke.rs/pics/pcb_full.jpg
> > 
> > And here is a closer view of the board between the tuner and the dm1105n
> > chip.
> > 
> > http://matt.vicke.rs/pics/pcb_detail.jpg
> > 
> > With your patch and the card=4 parameter the card is recognised, and the
> > dvb device created. Scanning will run (I'm attempting to locate channels
> > on Optus D1, which I can successfully scan using a set top box, so the
> > dish is correctly aligned), but the card reports tuning failed on all of
> > the Optus D1 frequencies that I attempt. I also tried running w_scan but
> > had no success.
> > 
> > Cheers,
> > Matt.
> 
> Hi Matt,
> 
> Did you read this post?
> http://www.mail-archive.com/linux-media@vger.kernel.org/msg17269.html
> It seems the card needs some soldering :(
or you can test the card using loop output from another STB/card.
 
> 
> Cheers
> Igor
> 
> > >> --
> > >> To unsubscribe from this list: send the line "unsubscribe linux-media"
> > >> in the body of a message to majordomo@vger.kernel.org
> > >> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2011-02-01  5:17                               ` Matt Vickers
@ 2011-02-02 18:39                                 ` Igor M. Liplianin
  2011-02-02 18:41                                   ` Igor M. Liplianin
  0 siblings, 1 reply; 51+ messages in thread
From: Igor M. Liplianin @ 2011-02-02 18:39 UTC (permalink / raw)
  To: Matt Vickers; +Cc: linux-media

В сообщении от 1 февраля 2011 07:17:19 автор Matt Vickers написал:
> On 1/02/2011 6:55 a.m., Igor M. Liplianin wrote:
> > В сообщении от 31 января 2011 11:33:54 автор Matt Vickers написал:
> >> On 23/10/2010 10:20 p.m., Igor M. Liplianin wrote:
> >>> В сообщении от 10 марта 2010 14:15:49 автор Hendrik Skarpeid написал:
> >>>> Igor M. Liplianin skrev:
> >>>>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
> >>>>>> Igor M. Liplianin wrote:
> >>>>>>> Now to find GPIO's for LNB power control and ... watch TV :)
> >>>>>> 
> >>>>>> Yep. No succesful tuning at the moment. There might also be an issue
> >>>>>> with the reset signal and writing to GPIOCTR, as the module at the
> >>>>>> moment loads succesfully only once.
> >>>>>> As far as I can make out, the LNB power control is probably GPIO 16
> >>>>>> and 17, not sure which is which, and how they work.
> >>>>>> GPIO15 is wired to tuner #reset
> >>>>> 
> >>>>> New patch to test
> >>>> 
> >>>> I think the LNB voltage may be a little to high on my card, 14.5V and
> >>>> 20V. I would be a little more happy if they were 14 and 19, 13 and 18
> >>>> would be perfect.
> >>>> Anyways, as Igor pointet out, I don't have any signal from the LNB,
> >>>> checked with another tuner card. It's a quad LNB, and the other
> >>>> outputs are fine. Maybe it's' toasted from to high supply voltage! I
> >>>> little word of warning then.
> >>>> Anyways, here's my tweaked driver.
> >>> 
> >>> Here is reworked patch for clear GPIO's handling.
> >>> It allows to support I2C on GPIO's and per board LNB control through
> >>> GPIO's. Also incuded support for Hendrik's card.
> >>> I think it is clear how to change and test GPIO's for LNB and other
> >>> stuff now.
> >>> 
> >>> To Hendrik:
> >>> 	Not shure, but there is maybe GPIO for raise/down LNB voltage a little
> >>> 	(~1v). It is used for long coaxial lines to compensate voltage
> >>> 	dropping.
> >>> 
> >>> Signed-off-by: Igor M. Liplianin<liplianin@me.by>
> >> 
> >> Hi Igor,
> >> 
> >> I have a brandless DVB-S tv tuner card also, with a dm1105n chip. I was
> >> getting the "DM1105: could not attach frontend 195d:1105" message with
> >> the latest kernel also, but I applied this patch to the dm1105 module
> >> and now the card's being recognised  (though is still listed as an
> >> ethernet controller with lspci)
> >> 
> >> My dmesg output is:
> >> 
> >> dm1105 0000:01:05.0: PCI INT A ->  GSI 17 (level, low) ->  IRQ 17
> >> DVB: registering new adapter (dm1105)
> >> dm1105 0000:01:05.0: MAC 00:00:00:00:00:00
> >> DVB: registering adapter 0 frontend 0 (SL SI21XX DVB-S)...
> >> Registered IR keymap rc-dm1105-nec
> >> input: DVB on-card IR receiver as
> >> /devices/pci0000:00/0000:00:1e.0/0000:01:05.0/rc/rc0/input6
> >> rc0: DVB on-card IR receiver as
> >> /devices/pci0000:00/0000:00:1e.0/0000:01:05.0/rc/rc0
> >> 
> >> The card is one of these:
> >> http://www.hongsun.biz/ProView.asp?ID=90
> >> 
> >> Scanning doesn't appear to give me any results.  Should this be working?
> >> 
> >>    Anything I can do to test the card out for you?
> >> 
> >> Cheers,
> >> Matt.
> > 
> > Hi Matt,
> > Is there any label on tuner can?
> > Have you a close look picture of PCB ?
> > 
> > Cheers,
> > Igor.
> 
> Hi Igor,
> 
> The label on the tuner can is SP1514LHb S1009, so I'm guessing this is a
> near-identical card to the one that Paul was asking you about in January
> 
> of last year, e.g:
> >  1: DVB-S
> >  5: 16cc
> >  1: Unsure, but it has an LNB in and an LNB out, so I guess it does have
> >  loop through?
> >  4: Si2109
> >  L: Si labs
> >  H: Horizontal
> >  b: Lead free
> 
> Here are two images I took of the card:
> 
> A view of the entire board:
> 
> http://matt.vicke.rs/pics/pcb_full.jpg
> 
> And here is a closer view of the board between the tuner and the dm1105n
> chip.
> 
> http://matt.vicke.rs/pics/pcb_detail.jpg
> 
> With your patch and the card=4 parameter the card is recognised, and the
> dvb device created. Scanning will run (I'm attempting to locate channels
> on Optus D1, which I can successfully scan using a set top box, so the
> dish is correctly aligned), but the card reports tuning failed on all of
> the Optus D1 frequencies that I attempt. I also tried running w_scan but
> had no success.
> 
> Cheers,
> Matt.
Hi Matt,

Did you read this post?
http://www.mail-archive.com/linux-media@vger.kernel.org/msg17269.html
It seems the card needs some soldering :(

Cheers
Igor
> 
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-media"
> >> in the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2011-01-31 17:55                             ` Igor M. Liplianin
@ 2011-02-01  5:17                               ` Matt Vickers
  2011-02-02 18:39                                 ` Igor M. Liplianin
  0 siblings, 1 reply; 51+ messages in thread
From: Matt Vickers @ 2011-02-01  5:17 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: linux-media

On 1/02/2011 6:55 a.m., Igor M. Liplianin wrote:
> В сообщении от 31 января 2011 11:33:54 автор Matt Vickers написал:
>> On 23/10/2010 10:20 p.m., Igor M. Liplianin wrote:
>>> В сообщении от 10 марта 2010 14:15:49 автор Hendrik Skarpeid написал:
>>>> Igor M. Liplianin skrev:
>>>>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
>>>>>> Igor M. Liplianin wrote:
>>>>>>> Now to find GPIO's for LNB power control and ... watch TV :)
>>>>>> Yep. No succesful tuning at the moment. There might also be an issue
>>>>>> with the reset signal and writing to GPIOCTR, as the module at the
>>>>>> moment loads succesfully only once.
>>>>>> As far as I can make out, the LNB power control is probably GPIO 16
>>>>>> and 17, not sure which is which, and how they work.
>>>>>> GPIO15 is wired to tuner #reset
>>>>> New patch to test
>>>> I think the LNB voltage may be a little to high on my card, 14.5V and
>>>> 20V. I would be a little more happy if they were 14 and 19, 13 and 18
>>>> would be perfect.
>>>> Anyways, as Igor pointet out, I don't have any signal from the LNB,
>>>> checked with another tuner card. It's a quad LNB, and the other outputs
>>>> are fine. Maybe it's' toasted from to high supply voltage! I little word
>>>> of warning then.
>>>> Anyways, here's my tweaked driver.
>>> Here is reworked patch for clear GPIO's handling.
>>> It allows to support I2C on GPIO's and per board LNB control through
>>> GPIO's. Also incuded support for Hendrik's card.
>>> I think it is clear how to change and test GPIO's for LNB and other stuff
>>> now.
>>>
>>> To Hendrik:
>>> 	Not shure, but there is maybe GPIO for raise/down LNB voltage a little
>>> 	(~1v). It is used for long coaxial lines to compensate voltage
>>> 	dropping.
>>>
>>> Signed-off-by: Igor M. Liplianin<liplianin@me.by>
>> Hi Igor,
>>
>> I have a brandless DVB-S tv tuner card also, with a dm1105n chip. I was
>> getting the "DM1105: could not attach frontend 195d:1105" message with
>> the latest kernel also, but I applied this patch to the dm1105 module
>> and now the card's being recognised  (though is still listed as an
>> ethernet controller with lspci)
>>
>> My dmesg output is:
>>
>> dm1105 0000:01:05.0: PCI INT A ->  GSI 17 (level, low) ->  IRQ 17
>> DVB: registering new adapter (dm1105)
>> dm1105 0000:01:05.0: MAC 00:00:00:00:00:00
>> DVB: registering adapter 0 frontend 0 (SL SI21XX DVB-S)...
>> Registered IR keymap rc-dm1105-nec
>> input: DVB on-card IR receiver as
>> /devices/pci0000:00/0000:00:1e.0/0000:01:05.0/rc/rc0/input6
>> rc0: DVB on-card IR receiver as
>> /devices/pci0000:00/0000:00:1e.0/0000:01:05.0/rc/rc0
>>
>> The card is one of these:
>> http://www.hongsun.biz/ProView.asp?ID=90
>>
>> Scanning doesn't appear to give me any results.  Should this be working?
>>    Anything I can do to test the card out for you?
>>
>> Cheers,
>> Matt.
> Hi Matt,
> Is there any label on tuner can?
> Have you a close look picture of PCB ?
>
> Cheers,
> Igor.

Hi Igor,

The label on the tuner can is SP1514LHb S1009, so I'm guessing this is a 
near-identical card to the one that Paul was asking you about in January 
of last year, e.g:

>  1: DVB-S
>  5: 16cc
>  1: Unsure, but it has an LNB in and an LNB out, so I guess it does have
>  loop through?
>  4: Si2109
>  L: Si labs
>  H: Horizontal
>  b: Lead free

Here are two images I took of the card:

A view of the entire board:

http://matt.vicke.rs/pics/pcb_full.jpg

And here is a closer view of the board between the tuner and the dm1105n 
chip.

http://matt.vicke.rs/pics/pcb_detail.jpg

With your patch and the card=4 parameter the card is recognised, and the 
dvb device created. Scanning will run (I'm attempting to locate channels 
on Optus D1, which I can successfully scan using a set top box, so the 
dish is correctly aligned), but the card reports tuning failed on all of 
the Optus D1 frequencies that I attempt. I also tried running w_scan but 
had no success.

Cheers,
Matt.

>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: DM1105: could not attach frontend 195d:1105
  2011-01-31  9:33                           ` Matt Vickers
@ 2011-01-31 17:55                             ` Igor M. Liplianin
  2011-02-01  5:17                               ` Matt Vickers
  0 siblings, 1 reply; 51+ messages in thread
From: Igor M. Liplianin @ 2011-01-31 17:55 UTC (permalink / raw)
  To: Matt Vickers; +Cc: linux-media

В сообщении от 31 января 2011 11:33:54 автор Matt Vickers написал:
> On 23/10/2010 10:20 p.m., Igor M. Liplianin wrote:
> > В сообщении от 10 марта 2010 14:15:49 автор Hendrik Skarpeid написал:
> >> Igor M. Liplianin skrev:
> >>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
> >>>> Igor M. Liplianin wrote:
> >>>>> Now to find GPIO's for LNB power control and ... watch TV :)
> >>>> 
> >>>> Yep. No succesful tuning at the moment. There might also be an issue
> >>>> with the reset signal and writing to GPIOCTR, as the module at the
> >>>> moment loads succesfully only once.
> >>>> As far as I can make out, the LNB power control is probably GPIO 16
> >>>> and 17, not sure which is which, and how they work.
> >>>> GPIO15 is wired to tuner #reset
> >>> 
> >>> New patch to test
> >> 
> >> I think the LNB voltage may be a little to high on my card, 14.5V and
> >> 20V. I would be a little more happy if they were 14 and 19, 13 and 18
> >> would be perfect.
> >> Anyways, as Igor pointet out, I don't have any signal from the LNB,
> >> checked with another tuner card. It's a quad LNB, and the other outputs
> >> are fine. Maybe it's' toasted from to high supply voltage! I little word
> >> of warning then.
> >> Anyways, here's my tweaked driver.
> > 
> > Here is reworked patch for clear GPIO's handling.
> > It allows to support I2C on GPIO's and per board LNB control through
> > GPIO's. Also incuded support for Hendrik's card.
> > I think it is clear how to change and test GPIO's for LNB and other stuff
> > now.
> > 
> > To Hendrik:
> > 	Not shure, but there is maybe GPIO for raise/down LNB voltage a little
> > 	(~1v). It is used for long coaxial lines to compensate voltage
> > 	dropping.
> > 
> > Signed-off-by: Igor M. Liplianin<liplianin@me.by>
> 
> Hi Igor,
> 
> I have a brandless DVB-S tv tuner card also, with a dm1105n chip. I was
> getting the "DM1105: could not attach frontend 195d:1105" message with
> the latest kernel also, but I applied this patch to the dm1105 module
> and now the card's being recognised  (though is still listed as an
> ethernet controller with lspci)
> 
> My dmesg output is:
> 
> dm1105 0000:01:05.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
> DVB: registering new adapter (dm1105)
> dm1105 0000:01:05.0: MAC 00:00:00:00:00:00
> DVB: registering adapter 0 frontend 0 (SL SI21XX DVB-S)...
> Registered IR keymap rc-dm1105-nec
> input: DVB on-card IR receiver as
> /devices/pci0000:00/0000:00:1e.0/0000:01:05.0/rc/rc0/input6
> rc0: DVB on-card IR receiver as
> /devices/pci0000:00/0000:00:1e.0/0000:01:05.0/rc/rc0
> 
> The card is one of these:
> http://www.hongsun.biz/ProView.asp?ID=90
> 
> Scanning doesn't appear to give me any results.  Should this be working?
>   Anything I can do to test the card out for you?
> 
> Cheers,
> Matt.
Hi Matt,
Is there any label on tuner can?
Have you a close look picture of PCB ?

Cheers,
Igor.
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-10-23  9:20                         ` Igor M. Liplianin
@ 2011-01-31  9:33                           ` Matt Vickers
  2011-01-31 17:55                             ` Igor M. Liplianin
  2011-05-03 21:33                           ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 51+ messages in thread
From: Matt Vickers @ 2011-01-31  9:33 UTC (permalink / raw)
  To: linux-media

On 23/10/2010 10:20 p.m., Igor M. Liplianin wrote:
> В сообщении от 10 марта 2010 14:15:49 автор Hendrik Skarpeid написал:
>> Igor M. Liplianin skrev:
>>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
>>>> Igor M. Liplianin wrote:
>>>>> Now to find GPIO's for LNB power control and ... watch TV :)
>>>>
>>>> Yep. No succesful tuning at the moment. There might also be an issue
>>>> with the reset signal and writing to GPIOCTR, as the module at the
>>>> moment loads succesfully only once.
>>>> As far as I can make out, the LNB power control is probably GPIO 16 and
>>>> 17, not sure which is which, and how they work.
>>>> GPIO15 is wired to tuner #reset
>>>
>>> New patch to test
>>
>> I think the LNB voltage may be a little to high on my card, 14.5V and
>> 20V. I would be a little more happy if they were 14 and 19, 13 and 18
>> would be perfect.
>> Anyways, as Igor pointet out, I don't have any signal from the LNB,
>> checked with another tuner card. It's a quad LNB, and the other outputs
>> are fine. Maybe it's' toasted from to high supply voltage! I little word
>> of warning then.
>> Anyways, here's my tweaked driver.
>
> Here is reworked patch for clear GPIO's handling.
> It allows to support I2C on GPIO's and per board LNB control through GPIO's.
> Also incuded support for Hendrik's card.
> I think it is clear how to change and test GPIO's for LNB and other stuff now.
> To Hendrik:
> 	Not shure, but there is maybe GPIO for raise/down LNB voltage a little (~1v).
> 	It is used for long coaxial lines to compensate voltage dropping.
>
> Signed-off-by: Igor M. Liplianin<liplianin@me.by>

Hi Igor,

I have a brandless DVB-S tv tuner card also, with a dm1105n chip. I was 
getting the "DM1105: could not attach frontend 195d:1105" message with 
the latest kernel also, but I applied this patch to the dm1105 module 
and now the card's being recognised  (though is still listed as an 
ethernet controller with lspci)

My dmesg output is:

dm1105 0000:01:05.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
DVB: registering new adapter (dm1105)
dm1105 0000:01:05.0: MAC 00:00:00:00:00:00
DVB: registering adapter 0 frontend 0 (SL SI21XX DVB-S)...
Registered IR keymap rc-dm1105-nec
input: DVB on-card IR receiver as 
/devices/pci0000:00/0000:00:1e.0/0000:01:05.0/rc/rc0/input6
rc0: DVB on-card IR receiver as 
/devices/pci0000:00/0000:00:1e.0/0000:01:05.0/rc/rc0

The card is one of these:
http://www.hongsun.biz/ProView.asp?ID=90

Scanning doesn't appear to give me any results.  Should this be working? 
  Anything I can do to test the card out for you?

Cheers,
Matt.


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-10 12:15                       ` Hendrik Skarpeid
  2010-03-31 10:47                         ` Hendrik Skarpeid
@ 2010-10-23  9:20                         ` Igor M. Liplianin
  2011-01-31  9:33                           ` Matt Vickers
  2011-05-03 21:33                           ` Mauro Carvalho Chehab
  1 sibling, 2 replies; 51+ messages in thread
From: Igor M. Liplianin @ 2010-10-23  9:20 UTC (permalink / raw)
  To: Hendrik Skarpeid, Mauro Chehab; +Cc: linux-media, Nameer Kazzaz

[-- Attachment #1: Type: Text/Plain, Size: 1601 bytes --]

В сообщении от 10 марта 2010 14:15:49 автор Hendrik Skarpeid написал:
> Igor M. Liplianin skrev:
> > On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
> >> Igor M. Liplianin wrote:
> >>> Now to find GPIO's for LNB power control and ... watch TV :)
> >> 
> >> Yep. No succesful tuning at the moment. There might also be an issue
> >> with the reset signal and writing to GPIOCTR, as the module at the
> >> moment loads succesfully only once.
> >> As far as I can make out, the LNB power control is probably GPIO 16 and
> >> 17, not sure which is which, and how they work.
> >> GPIO15 is wired to tuner #reset
> > 
> > New patch to test
> 
> I think the LNB voltage may be a little to high on my card, 14.5V and
> 20V. I would be a little more happy if they were 14 and 19, 13 and 18
> would be perfect.
> Anyways, as Igor pointet out, I don't have any signal from the LNB,
> checked with another tuner card. It's a quad LNB, and the other outputs
> are fine. Maybe it's' toasted from to high supply voltage! I little word
> of warning then.
> Anyways, here's my tweaked driver.

Here is reworked patch for clear GPIO's handling.
It allows to support I2C on GPIO's and per board LNB control through GPIO's.
Also incuded support for Hendrik's card.
I think it is clear how to change and test GPIO's for LNB and other stuff now.
To Hendrik:
	Not shure, but there is maybe GPIO for raise/down LNB voltage a little (~1v).
	It is used for long coaxial lines to compensate voltage dropping.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>

[-- Attachment #2: dm1105_i2c_gpio.patch --]
[-- Type: text/x-patch, Size: 10185 bytes --]

diff -r abd3aac6644e linux/drivers/media/dvb/dm1105/dm1105.c
--- a/linux/drivers/media/dvb/dm1105/dm1105.c	Fri Jul 02 00:38:54 2010 -0300
+++ b/linux/drivers/media/dvb/dm1105/dm1105.c	Sat Oct 23 11:58:32 2010 +0300
@@ -20,6 +20,7 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -50,11 +51,12 @@
 
 #define UNSET (-1U)
 
-#define DM1105_BOARD_NOAUTO		UNSET
-#define DM1105_BOARD_UNKNOWN		0
-#define DM1105_BOARD_DVBWORLD_2002	1
-#define DM1105_BOARD_DVBWORLD_2004	2
-#define DM1105_BOARD_AXESS_DM05		3
+#define DM1105_BOARD_NOAUTO			UNSET
+#define DM1105_BOARD_UNKNOWN			0
+#define DM1105_BOARD_DVBWORLD_2002		1
+#define DM1105_BOARD_DVBWORLD_2004		2
+#define DM1105_BOARD_AXESS_DM05			3
+#define DM1105_BOARD_UNBRANDED_I2C_ON_GPIO	4
 
 /* ----------------------------------------------- */
 /*
@@ -158,22 +160,38 @@
 #define DM1105_MAX				0x04
 
 #define DRIVER_NAME				"dm1105"
+#define DM1105_I2C_GPIO_NAME			"dm1105-gpio"
 
 #define DM1105_DMA_PACKETS			47
 #define DM1105_DMA_PACKET_LENGTH		(128*4)
 #define DM1105_DMA_BYTES			(128 * 4 * DM1105_DMA_PACKETS)
 
+/*  */
+#define GPIO08					(1 << 8)
+#define GPIO13					(1 << 13)
+#define GPIO14					(1 << 14)
+#define GPIO15					(1 << 15)
+#define GPIO16					(1 << 16)
+#define GPIO17					(1 << 17)
+#define GPIO_ALL				0x03ffff
+
 /* GPIO's for LNB power control */
-#define DM1105_LNB_MASK				0x00000000
-#define DM1105_LNB_OFF				0x00020000
-#define DM1105_LNB_13V				0x00010100
-#define DM1105_LNB_18V				0x00000100
+#define DM1105_LNB_MASK				(GPIO_ALL & ~(GPIO14 | GPIO13))
+#define DM1105_LNB_OFF				GPIO17
+#define DM1105_LNB_13V				(GPIO16 | GPIO08)
+#define DM1105_LNB_18V				GPIO08
 
 /* GPIO's for LNB power control for Axess DM05 */
-#define DM05_LNB_MASK				0x00000000
-#define DM05_LNB_OFF				0x00020000/* actually 13v */
-#define DM05_LNB_13V				0x00020000
-#define DM05_LNB_18V				0x00030000
+#define DM05_LNB_MASK				(GPIO_ALL & ~(GPIO14 | GPIO13))
+#define DM05_LNB_OFF				GPIO17/* actually 13v */
+#define DM05_LNB_13V				GPIO17
+#define DM05_LNB_18V				(GPIO17 | GPIO16)
+
+/* GPIO's for LNB power control for unbranded with I2C on GPIO */
+#define UNBR_LNB_MASK				(GPIO17 | GPIO16)
+#define UNBR_LNB_OFF				0
+#define UNBR_LNB_13V				GPIO17
+#define UNBR_LNB_18V				(GPIO17 | GPIO16)
 
 static unsigned int card[]  = {[0 ... 3] = UNSET };
 module_param_array(card,  int, NULL, 0444);
@@ -188,7 +206,11 @@
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
 struct dm1105_board {
-	char                    *name;
+	char	*name;
+	struct	{
+		u32	mask, off, v13, v18;
+	} lnb;
+	u32	gpio_scl, gpio_sda;
 };
 
 struct dm1105_subid {
@@ -200,15 +222,50 @@
 static const struct dm1105_board dm1105_boards[] = {
 	[DM1105_BOARD_UNKNOWN] = {
 		.name		= "UNKNOWN/GENERIC",
+		.lnb = {
+			.mask = DM1105_LNB_MASK,
+			.off = DM1105_LNB_OFF,
+			.v13 = DM1105_LNB_13V,
+			.v18 = DM1105_LNB_18V,
+		},
 	},
 	[DM1105_BOARD_DVBWORLD_2002] = {
 		.name		= "DVBWorld PCI 2002",
+		.lnb = {
+			.mask = DM1105_LNB_MASK,
+			.off = DM1105_LNB_OFF,
+			.v13 = DM1105_LNB_13V,
+			.v18 = DM1105_LNB_18V,
+		},
 	},
 	[DM1105_BOARD_DVBWORLD_2004] = {
 		.name		= "DVBWorld PCI 2004",
+		.lnb = {
+			.mask = DM1105_LNB_MASK,
+			.off = DM1105_LNB_OFF,
+			.v13 = DM1105_LNB_13V,
+			.v18 = DM1105_LNB_18V,
+		},
 	},
 	[DM1105_BOARD_AXESS_DM05] = {
 		.name		= "Axess/EasyTv DM05",
+		.lnb = {
+			.mask = DM05_LNB_MASK,
+			.off = DM05_LNB_OFF,
+			.v13 = DM05_LNB_13V,
+			.v18 = DM05_LNB_18V,
+		},
+	},
+	[DM1105_BOARD_UNBRANDED_I2C_ON_GPIO] = {
+		.name		= "Unbranded DM1105 with i2c on GPIOs",
+		.lnb = {
+			.mask = UNBR_LNB_MASK,
+			.off = UNBR_LNB_OFF,
+			.v13 = UNBR_LNB_13V,
+			.v18 = UNBR_LNB_18V,
+		},
+		.gpio_scl	= GPIO14,
+		.gpio_sda	= GPIO13,
 	},
 };
 
@@ -294,6 +351,8 @@
 
 	/* i2c */
 	struct i2c_adapter i2c_adap;
+	struct i2c_adapter i2c_bb_adap;
+	struct i2c_algo_bit_data i2c_bit;
 
 	/* irq */
 	struct work_struct work;
@@ -329,6 +388,103 @@
 #define dm_setl(reg, bit)	dm_andorl((reg), (bit), (bit))
 #define dm_clearl(reg, bit)	dm_andorl((reg), (bit), 0)
 
+/* The chip has 18 GPIOs. In HOST mode GPIO's used as 15 bit address lines,
+ so we can use only 3 GPIO's from GPIO15 to GPIO17.
+ Here I don't check whether HOST is enebled as it is not implemented yet.
+ */
+static void dm1105_gpio_set(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_setl(DM1105_GPIOVAL, mask & 0x0003ffff);
+
+}
+
+static void dm1105_gpio_clear(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_clearl(DM1105_GPIOVAL, mask & 0x0003ffff);
+
+}
+
+static void dm1105_gpio_andor(struct dm1105_dev *dev, u32 mask, u32 val)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_andorl(DM1105_GPIOVAL, mask & 0x0003ffff, val);
+
+}
+
+static u32 dm1105_gpio_get(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		return dm_readl(DM1105_GPIOVAL) & mask & 0x0003ffff;
+
+	return 0;
+}
+
+static void dm1105_gpio_enable(struct dm1105_dev *dev, u32 mask, int asoutput)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if ((mask & 0x0003ffff) && asoutput)
+		dm_clearl(DM1105_GPIOCTR, mask & 0x0003ffff);
+	else if ((mask & 0x0003ffff) && !asoutput)
+		dm_setl(DM1105_GPIOCTR, mask & 0x0003ffff);
+
+}
+
+static void dm1105_setline(struct dm1105_dev *dev, u32 line, int state)
+{
+	if (state)
+		dm1105_gpio_enable(dev, line, 0);
+	else {
+		dm1105_gpio_enable(dev, line, 1);
+		dm1105_gpio_clear(dev, line);
+	}
+}
+
+static void dm1105_setsda(void *data, int state)
+{
+	struct dm1105_dev *dev = data;
+
+	dm1105_setline(dev, dm1105_boards[dev->boardnr].gpio_sda, state);
+}
+
+static void dm1105_setscl(void *data, int state)
+{
+	struct dm1105_dev *dev = data;
+
+	dm1105_setline(dev, dm1105_boards[dev->boardnr].gpio_scl, state);
+}
+
+static int dm1105_getsda(void *data)
+{
+	struct dm1105_dev *dev = data;
+
+	return dm1105_gpio_get(dev, dm1105_boards[dev->boardnr].gpio_sda)
+									? 1 : 0;
+}
+
+static int dm1105_getscl(void *data)
+{
+	struct dm1105_dev *dev = data;
+
+	return dm1105_gpio_get(dev, dm1105_boards[dev->boardnr].gpio_scl)
+									? 1 : 0;
+}
+
 static int dm1105_i2c_xfer(struct i2c_adapter *i2c_adap,
 			    struct i2c_msg *msgs, int num)
 {
@@ -440,31 +596,20 @@
 static int dm1105_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
 {
 	struct dm1105_dev *dev = frontend_to_dm1105_dev(fe);
-	u32 lnb_mask, lnb_13v, lnb_18v, lnb_off;
 
-	switch (dev->boardnr) {
-	case DM1105_BOARD_AXESS_DM05:
-		lnb_mask = DM05_LNB_MASK;
-		lnb_off = DM05_LNB_OFF;
-		lnb_13v = DM05_LNB_13V;
-		lnb_18v = DM05_LNB_18V;
-		break;
-	case DM1105_BOARD_DVBWORLD_2002:
-	case DM1105_BOARD_DVBWORLD_2004:
-	default:
-		lnb_mask = DM1105_LNB_MASK;
-		lnb_off = DM1105_LNB_OFF;
-		lnb_13v = DM1105_LNB_13V;
-		lnb_18v = DM1105_LNB_18V;
-	}
-
-	dm_writel(DM1105_GPIOCTR, lnb_mask);
+	dm1105_gpio_enable(dev, dm1105_boards[dev->boardnr].lnb.mask, 1);
 	if (voltage == SEC_VOLTAGE_18)
-		dm_writel(DM1105_GPIOVAL, lnb_18v);
+		dm1105_gpio_andor(dev,
+				dm1105_boards[dev->boardnr].lnb.mask,
+				dm1105_boards[dev->boardnr].lnb.v18);
 	else if (voltage == SEC_VOLTAGE_13)
-		dm_writel(DM1105_GPIOVAL, lnb_13v);
+		dm1105_gpio_andor(dev,
+				dm1105_boards[dev->boardnr].lnb.mask,
+				dm1105_boards[dev->boardnr].lnb.v13);
 	else
-		dm_writel(DM1105_GPIOVAL, lnb_off);
+		dm1105_gpio_andor(dev,
+				dm1105_boards[dev->boardnr].lnb.mask,
+				dm1105_boards[dev->boardnr].lnb.off);
 
 	return 0;
 }
@@ -740,6 +885,38 @@
 	int ret;
 
 	switch (dev->boardnr) {
+	case DM1105_BOARD_UNBRANDED_I2C_ON_GPIO:
+		dm1105_gpio_enable(dev, GPIO15, 1);
+		dm1105_gpio_clear(dev, GPIO15);
+		msleep(100);
+		dm1105_gpio_set(dev, GPIO15);
+		msleep(200);
+		dev->fe = dvb_attach(
+			stv0299_attach, &sharp_z0194a_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe) {
+			dev->fe->ops.set_voltage = dm1105_set_voltage;
+			dvb_attach(dvb_pll_attach, dev->fe, 0x60,
+					&dev->i2c_bb_adap, DVB_PLL_OPERA1);
+			break;
+		}
+
+		dev->fe = dvb_attach(
+			stv0288_attach, &earda_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe) {
+			dev->fe->ops.set_voltage = dm1105_set_voltage;
+			dvb_attach(stb6000_attach, dev->fe, 0x61,
+					&dev->i2c_bb_adap);
+			break;
+		}
+
+		dev->fe = dvb_attach(
+			si21xx_attach, &serit_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe)
+			dev->fe->ops.set_voltage = dm1105_set_voltage;
+		break;
 	case DM1105_BOARD_DVBWORLD_2004:
 		dev->fe = dvb_attach(
 			cx24116_attach, &serit_sp2633_config,
@@ -903,11 +1080,33 @@
 	if (ret < 0)
 		goto err_dm1105_hw_exit;
 
+	i2c_set_adapdata(&dev->i2c_bb_adap, dev);
+	strcpy(dev->i2c_bb_adap.name, DM1105_I2C_GPIO_NAME);
+	dev->i2c_bb_adap.owner = THIS_MODULE;
+	dev->i2c_bb_adap.class = I2C_CLASS_TV_DIGITAL;
+	dev->i2c_bb_adap.dev.parent = &pdev->dev;
+	dev->i2c_bb_adap.algo_data = &dev->i2c_bit;
+	dev->i2c_bit.data = dev;
+	dev->i2c_bit.setsda = dm1105_setsda;
+	dev->i2c_bit.setscl = dm1105_setscl;
+	dev->i2c_bit.getsda = dm1105_getsda;
+	dev->i2c_bit.getscl = dm1105_getscl;
+	dev->i2c_bit.udelay = 10;
+	dev->i2c_bit.timeout = 10;
+
+	/* Raise SCL and SDA */
+	dm1105_setsda(dev, 1);
+	dm1105_setscl(dev, 1);
+
+	ret = i2c_bit_add_bus(&dev->i2c_bb_adap);
+	if (ret < 0)
+		goto err_i2c_del_adapter;
+
 	/* dvb */
 	ret = dvb_register_adapter(&dev->dvb_adapter, DRIVER_NAME,
 					THIS_MODULE, &pdev->dev, adapter_nr);
 	if (ret < 0)
-		goto err_i2c_del_adapter;
+		goto err_i2c_del_adapters;
 
 	dvb_adapter = &dev->dvb_adapter;
 
@@ -989,6 +1188,8 @@
 	dvb_dmx_release(dvbdemux);
 err_dvb_unregister_adapter:
 	dvb_unregister_adapter(dvb_adapter);
+err_i2c_del_adapters:
+	i2c_del_adapter(&dev->i2c_bb_adap);
 err_i2c_del_adapter:
 	i2c_del_adapter(&dev->i2c_adap);
 err_dm1105_hw_exit:

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-10 12:15                       ` Hendrik Skarpeid
@ 2010-03-31 10:47                         ` Hendrik Skarpeid
  2010-10-23  9:20                         ` Igor M. Liplianin
  1 sibling, 0 replies; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-03-31 10:47 UTC (permalink / raw)
  To: linux-media; +Cc: Igor M. Liplianin, Nameer Kazzaz

A little update on the matter.

These cards are broken!

It seems that the card is designed for a different NIM than what is 
actually on the cards.
The worst problem is 3.3V power supply for the digital portion of the 
NIM. This powers the 3.3V IO on the Si2109, and it is unconnected! This 
effectively disables all the IO that is not open drain like i2c. That is 
why you will not get any 22khz tone from these cards.

Luckily, I think I have found a way to fix it. The card is now tuning, 
and the 22khz tone is working.
The LNB voltage is a little high, but that can be fixed by adding or 
replacing a resistor.
I have not tried to watch TV yet, so I am not certain if it is at all 
possible to get these cards into working order.

I will try the fix on a couple of boards and test them, and if it is 
successful, I will post a howto on the v4l wiki. Be warned though, it 
will involve the use of a soldering iron.

Hendrik Skarpeid wrote:
> Igor M. Liplianin wrote:
>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
>>  
>>> Igor M. Liplianin wrote:
>>>    
>>>> Now to find GPIO's for LNB power control and ... watch TV :)
>>>>       
>>> Yep. No succesful tuning at the moment. There might also be an issue
>>> with the reset signal and writing to GPIOCTR, as the module at the
>>> moment loads succesfully only once.
>>> As far as I can make out, the LNB power control is probably GPIO 16 and
>>> 17, not sure which is which, and how they work.
>>> GPIO15 is wired to tuner #reset
>>>     
>> New patch to test
>>   
> I think the LNB voltage may be a little to high on my card, 14.5V and 
> 20V. I would be a little more happy if they were 14 and 19, 13 and 18 
> would be perfect.
> Anyways, as Igor pointet out, I don't have any signal from the LNB, 
> checked with another tuner card. It's a quad LNB, and the other 
> outputs are fine. Maybe it's' toasted from to high supply voltage! I 
> little word of warning then.
> Anyways, here's my tweaked driver.
>
>


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-03 19:05                     ` Igor M. Liplianin
  2010-03-04 21:27                       ` Hendrik Skarpeid
  2010-03-04 22:16                       ` Hendrik Skarpeid
@ 2010-03-10 12:15                       ` Hendrik Skarpeid
  2010-03-31 10:47                         ` Hendrik Skarpeid
  2010-10-23  9:20                         ` Igor M. Liplianin
  2 siblings, 2 replies; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-03-10 12:15 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: linux-media, Nameer Kazzaz

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

Igor M. Liplianin skrev:
> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
>   
>> Igor M. Liplianin wrote:
>>     
>>> Now to find GPIO's for LNB power control and ... watch TV :)
>>>       
>> Yep. No succesful tuning at the moment. There might also be an issue
>> with the reset signal and writing to GPIOCTR, as the module at the
>> moment loads succesfully only once.
>> As far as I can make out, the LNB power control is probably GPIO 16 and
>> 17, not sure which is which, and how they work.
>> GPIO15 is wired to tuner #reset
>>     
> New patch to test
>   
I think the LNB voltage may be a little to high on my card, 14.5V and 
20V. I would be a little more happy if they were 14 and 19, 13 and 18 
would be perfect.
Anyways, as Igor pointet out, I don't have any signal from the LNB, 
checked with another tuner card. It's a quad LNB, and the other outputs 
are fine. Maybe it's' toasted from to high supply voltage! I little word 
of warning then.
Anyways, here's my tweaked driver.



[-- Attachment #2: dm1105.c.diff --]
[-- Type: text/plain, Size: 8435 bytes --]

diff -r 4dc29dc9ec91 linux/drivers/media/dvb/dm1105/dm1105.c
--- a/linux/drivers/media/dvb/dm1105/dm1105.c	Sat Feb 27 10:18:52 2010 +0200
+++ b/linux/drivers/media/dvb/dm1105/dm1105.c	Mon Mar 08 15:36:13 2010 +0100
@@ -20,6 +20,7 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -47,11 +48,12 @@
 
 #define UNSET (-1U)
 
-#define DM1105_BOARD_NOAUTO		UNSET
-#define DM1105_BOARD_UNKNOWN		0
-#define DM1105_BOARD_DVBWORLD_2002	1
-#define DM1105_BOARD_DVBWORLD_2004	2
-#define DM1105_BOARD_AXESS_DM05		3
+#define DM1105_BOARD_NOAUTO			UNSET
+#define DM1105_BOARD_UNKNOWN			0
+#define DM1105_BOARD_DVBWORLD_2002		1
+#define DM1105_BOARD_DVBWORLD_2004		2
+#define DM1105_BOARD_AXESS_DM05			3
+#define DM1105_BOARD_UNBRANDED_I2C_ON_GPIO	4
 
 /* ----------------------------------------------- */
 /*
@@ -155,23 +157,30 @@
 #define DM1105_MAX				0x04
 
 #define DRIVER_NAME				"dm1105"
+#define DM1105_I2C_GPIO_NAME			"dm1105-gpio"
 
 #define DM1105_DMA_PACKETS			47
 #define DM1105_DMA_PACKET_LENGTH		(128*4)
 #define DM1105_DMA_BYTES			(128 * 4 * DM1105_DMA_PACKETS)
 
 /* GPIO's for LNB power control */
-#define DM1105_LNB_MASK				0x00000000
+#define DM1105_LNB_MASK				0x00006000
 #define DM1105_LNB_OFF				0x00020000
 #define DM1105_LNB_13V				0x00010100
 #define DM1105_LNB_18V				0x00000100
 
 /* GPIO's for LNB power control for Axess DM05 */
-#define DM05_LNB_MASK				0x00000000
+#define DM05_LNB_MASK				0x00006000
 #define DM05_LNB_OFF				0x00020000/* actually 13v */
 #define DM05_LNB_13V				0x00020000
 #define DM05_LNB_18V				0x00030000
 
+#define GPIO13					(1 << 13)
+#define GPIO14					(1 << 14)
+#define GPIO15					(1 << 15)
+#define GPIO16					(1 << 16)
+#define GPIO17					(1 << 17)
+
 static unsigned int card[]  = {[0 ... 3] = UNSET };
 module_param_array(card,  int, NULL, 0444);
 MODULE_PARM_DESC(card, "card type");
@@ -185,7 +194,8 @@
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
 struct dm1105_board {
-	char                    *name;
+	char		*name;
+	u32		gpio_scl, gpio_sda;
 };
 
 struct dm1105_subid {
@@ -207,6 +217,11 @@
 	[DM1105_BOARD_AXESS_DM05] = {
 		.name		= "Axess/EasyTv DM05",
 	},
+	[DM1105_BOARD_UNBRANDED_I2C_ON_GPIO] = {
+		.name		= "Unbranded DM1105 with i2c on GPIOs",
+		.gpio_scl	= GPIO14,
+		.gpio_sda	= GPIO13,
+	},
 };
 
 static const struct dm1105_subid dm1105_subids[] = {
@@ -292,6 +307,8 @@
 
 	/* i2c */
 	struct i2c_adapter i2c_adap;
+	struct i2c_adapter i2c_bb_adap;
+	struct i2c_algo_bit_data i2c_bit;
 
 	/* irq */
 	struct work_struct work;
@@ -327,6 +344,101 @@
 #define dm_setl(reg, bit)	dm_andorl((reg), (bit), (bit))
 #define dm_clearl(reg, bit)	dm_andorl((reg), (bit), 0)
 
+/* The chip has 18 GPIOs. In HOST mode GPIO's used as 15 bit address lines,
+ so we can use only 3 GPIO's from GPIO15 to GPIO17.
+ Here I don't check whether HOST is enebled as it is not implemented yet.
+ */
+static void dm1105_gpio_set(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_setl(DM1105_GPIOVAL, mask & 0x0003ffff);
+
+}
+
+static void dm1105_gpio_clear(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_clearl(DM1105_GPIOVAL, mask & 0x0003ffff);
+
+}
+
+static void dm1105_gpio_andor(struct dm1105_dev *dev, u32 mask, u32 val)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_andorl(DM1105_GPIOVAL, mask & 0x0003ffff, val);
+
+}
+
+static u32 dm1105_gpio_get(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		return (dm_readl(DM1105_GPIOVAL) & mask & 0x0003ffff);
+
+	return 0;
+}
+
+static void dm1105_gpio_enable(struct dm1105_dev *dev, u32 mask, int asoutput)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if ((mask & 0x0003ffff) && asoutput)
+		dm_clearl(DM1105_GPIOCTR, mask & 0x0003ffff);
+	else if ((mask & 0x0003ffff) && !asoutput)
+		dm_setl(DM1105_GPIOCTR, mask & 0x0003ffff);
+
+}
+
+static void dm1105_setline(struct dm1105_dev *dev, u32 line, int state)
+{
+	if (state)
+		dm1105_gpio_enable(dev, line, 0);
+	else {
+		dm1105_gpio_enable(dev, line, 1);
+		dm1105_gpio_clear(dev, line);
+	}
+}
+
+static void dm1105_setsda(void *data, int state)
+{
+	struct dm1105_dev *dev = data;
+
+	dm1105_setline(dev, dm1105_boards[dev->boardnr].gpio_sda, state);
+}
+
+static void dm1105_setscl(void *data, int state)
+{
+	struct dm1105_dev *dev = data;
+
+	dm1105_setline(dev, dm1105_boards[dev->boardnr].gpio_scl, state);
+}
+
+static int dm1105_getsda(void *data)
+{
+	struct dm1105_dev *dev = data;
+
+	return dm1105_gpio_get(dev, dm1105_boards[dev->boardnr].gpio_sda) ? 1 : 0;
+}
+
+static int dm1105_getscl(void *data)
+{
+	struct dm1105_dev *dev = data;
+
+	return dm1105_gpio_get(dev, dm1105_boards[dev->boardnr].gpio_scl) ? 1 : 0;
+}
+
 static int dm1105_i2c_xfer(struct i2c_adapter *i2c_adap,
 			    struct i2c_msg *msgs, int num)
 {
@@ -467,6 +579,26 @@
 	return 0;
 }
 
+static int dm1105_set_voltage1(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
+{
+	struct dm1105_dev *dev = frontend_to_dm1105_dev(fe);
+
+	dm1105_gpio_enable(dev, GPIO16 | GPIO17, 1);
+	switch (voltage) {
+	case SEC_VOLTAGE_18:
+		dm1105_gpio_set(dev, GPIO16 | GPIO17);
+		break;
+	case SEC_VOLTAGE_13:
+		dm1105_gpio_andor(dev, GPIO16 | GPIO17, GPIO17);
+		break;
+	default:
+		dm1105_gpio_clear(dev, GPIO16 | GPIO17);
+		break;
+	}
+
+	return 0;
+}
+
 static void dm1105_set_dma_addr(struct dm1105_dev *dev)
 {
 	dm_writel(DM1105_STADR, cpu_to_le32(dev->dma_addr));
@@ -742,6 +874,38 @@
 	int ret;
 
 	switch (dev->boardnr) {
+	case DM1105_BOARD_UNBRANDED_I2C_ON_GPIO:
+		dm1105_gpio_enable(dev, GPIO15, 1);
+		dm1105_gpio_clear(dev, GPIO15);
+		msleep(100);
+		dm1105_gpio_set(dev, GPIO15);
+		msleep(200);
+		dev->fe = dvb_attach(
+			stv0299_attach, &sharp_z0194a_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe) {
+			dev->fe->ops.set_voltage = dm1105_set_voltage1;
+			dvb_attach(dvb_pll_attach, dev->fe, 0x60,
+					&dev->i2c_bb_adap, DVB_PLL_OPERA1);
+			break;
+		}
+
+		dev->fe = dvb_attach(
+			stv0288_attach, &earda_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe) {
+			dev->fe->ops.set_voltage = dm1105_set_voltage1;
+			dvb_attach(stb6000_attach, dev->fe, 0x61,
+					&dev->i2c_bb_adap);
+			break;
+		}
+
+		dev->fe = dvb_attach(
+			si21xx_attach, &serit_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe)
+			dev->fe->ops.set_voltage = dm1105_set_voltage1;
+		break;
 	case DM1105_BOARD_DVBWORLD_2004:
 		dev->fe = dvb_attach(
 			cx24116_attach, &serit_sp2633_config,
@@ -905,11 +1069,33 @@
 	if (ret < 0)
 		goto err_dm1105_hw_exit;
 
+	i2c_set_adapdata(&dev->i2c_bb_adap, dev);
+	strcpy(dev->i2c_bb_adap.name, DM1105_I2C_GPIO_NAME);
+	dev->i2c_bb_adap.owner = THIS_MODULE;
+	dev->i2c_bb_adap.class = I2C_CLASS_TV_DIGITAL;
+	dev->i2c_bb_adap.dev.parent = &pdev->dev;
+	dev->i2c_bb_adap.algo_data = &dev->i2c_bit;
+	dev->i2c_bit.data = dev;
+	dev->i2c_bit.setsda = dm1105_setsda;
+	dev->i2c_bit.setscl = dm1105_setscl;
+	dev->i2c_bit.getsda = dm1105_getsda;
+	dev->i2c_bit.getscl = dm1105_getscl;
+	dev->i2c_bit.udelay = 10;
+	dev->i2c_bit.timeout = 10;
+
+	/* Raise SCL and SDA */
+	dm1105_setsda(dev, 1);
+	dm1105_setscl(dev, 1);
+
+	ret = i2c_bit_add_bus(&dev->i2c_bb_adap);
+	if (ret < 0)
+		goto err_i2c_del_adapter;
+
 	/* dvb */
 	ret = dvb_register_adapter(&dev->dvb_adapter, DRIVER_NAME,
 					THIS_MODULE, &pdev->dev, adapter_nr);
 	if (ret < 0)
-		goto err_i2c_del_adapter;
+		goto err_i2c_del_adapters;
 
 	dvb_adapter = &dev->dvb_adapter;
 
@@ -991,6 +1177,8 @@
 	dvb_dmx_release(dvbdemux);
 err_dvb_unregister_adapter:
 	dvb_unregister_adapter(dvb_adapter);
+err_i2c_del_adapters:
+	i2c_del_adapter(&dev->i2c_bb_adap);
 err_i2c_del_adapter:
 	i2c_del_adapter(&dev->i2c_adap);
 err_dm1105_hw_exit:

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-06 19:18                           ` Hendrik Skarpeid
@ 2010-03-07 10:12                             ` Igor M. Liplianin
  0 siblings, 0 replies; 51+ messages in thread
From: Igor M. Liplianin @ 2010-03-07 10:12 UTC (permalink / raw)
  To: Hendrik Skarpeid; +Cc: linux-media, Nameer Kazzaz

On 6 марта 2010 21:18:28 Hendrik Skarpeid wrote:
> Igor M. Liplianin skrev:
> > On 5 марта 2010 00:16:07 Hendrik Skarpeid wrote:
> >> Igor M. Liplianin skrev:
> >>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
> >>>> Igor M. Liplianin wrote:
> >>>>> Now to find GPIO's for LNB power control and ... watch TV :)
> >>>>
> >>>> Yep. No succesful tuning at the moment. There might also be an issue
> >>>> with the reset signal and writing to GPIOCTR, as the module at the
> >>>> moment loads succesfully only once.
> >>>> As far as I can make out, the LNB power control is probably GPIO 16
> >>>> and 17, not sure which is which, and how they work.
> >>>> GPIO15 is wired to tuner #reset
> >>>
> >>> New patch to test
> >>>
> >>> -----------------------------------------------------------------------
> >>>-
> >>>
> >>>
> >>> No virus found in this incoming message.
> >>> Checked by AVG - www.avg.com
> >>> Version: 9.0.733 / Virus Database: 271.1.1/2721 - Release Date:
> >>> 03/03/10 20:34:00
> >>
> >> modprobe si21xx debug=1 produces this output when scanning.
> >>
> >> [ 2187.998349] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> >> [ 2187.998353] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> >> [ 2187.999881] si21xx: si21xx_setacquire
> >> [ 2187.999884] si21xx: si21xx_set_symbolrate : srate = 27500000
> >> [ 2188.022645] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x01
> >> [ 2188.054350] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> >> [ 2188.054355] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> >> [ 2188.055875] si21xx: si21xx_setacquire
> >> [ 2188.055879] si21xx: si21xx_set_symbolrate : srate = 27500000
> >> [ 2188.110359] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> >> [ 2188.110366] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> >> [ 2188.111885] si21xx: si21xx_setacquire
> >> [ 2188.111889] si21xx: si21xx_set_symbolrate : srate = 27500000
> >> [ 2188.166350] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> >> [ 2188.166354] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> >>
> >> Since the tuner at hand uses a Si2109 chip, VSTATUS 0x01 and 0x02 would
> >> indicate that blind scanning is used. Blind scanning is a 2109/2110
> >> specific function, and may not very usable since we always use initial
> >> tuning files anyway. 2109/10 also supports the legacy scanning method
> >> which is supported by Si2107708.
> >>
> >> Is the use of blind scanning intentional?
> >
> > Yes, of course, it's intentional. Why not?
> > User has freedom to make little errors in channels.conf file. Also the
> > chip didn't support DVB-S2. And last, has who si2107/08 ? My chip is
> > si2109.
>
> I agree, it's best to use the hardware features. I was worried that I
> may be getting bad i2c data.
It is likely. In that case try different delays like that
	dev->i2c_bit.udelay = 16;
	dev->i2c_bit.timeout = 200;


> If I understand you correctly, you have a working Si2109 frontend driver?
The driver is working. It's for shure. I tested PCI and USB cards with this chip.

> Here's what I'm getting:
> Added a few printouts to si21xx.c
>
>         u8 signal = si21_readreg(state, ANALOG_AGC_POWER_LEVEL_REG);
>         dprintk("%s : FE_READ_STATUS : AGC_POWER: 0x%02x\n", __func__,
> signal);
>
>         si21_readregs(state, LOCK_STATUS_REG_1, regs_read, 0x02);
>
>         reg_read = 0;
>
>         for (i = 0; i < 7; ++i)
>                 reg_read |= ((regs_read[0] >> i) & 0x01) << (6 - i);
>
>         lock = ((reg_read & 0x7f) | (regs_read[1] & 0x80));
>
>         dprintk("%s : FE_READ_STATUS : VSTATUS: 0x%02x\n", __func__, lock);
>         dprintk("%s : FE_READ_REGS : REGS[0]: 0x%02x\n", __func__,
> regs_read[0]);
>         dprintk("%s : FE_READ_REGS : REGS[1]: 0x%02x\n", __func__,
> regs_read[1]);
>
> hendrik@iptv:~$ scan -a 1 Sirius-5.0E
>
> [72933.818871] si21xx: si21xx_set_symbolrate : srate = 27500000
> [72933.900276] si21xx: si21_read_status : FE_READ_STATUS : AGC_POWER: 0x20
> [72933.908807] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> [72933.908812] si21xx: si21_read_status : FE_READ_REGS : REGS[0]: 0x20
> [72933.908815] si21xx: si21_read_status : FE_READ_REGS : REGS[1]: 0x00
> [72933.908827] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> [72933.914962] si21xx: si21xx_setacquire
> [72933.914967] si21xx: si21xx_set_symbolrate : srate = 27500000
> [72933.949370] si21xx: si21_read_status : FE_READ_STATUS : AGC_POWER: 0x21
> [72933.957877] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x01
> [72933.957882] si21xx: si21_read_status : FE_READ_REGS : REGS[0]: 0xc0
> [72933.957885] si21xx: si21_read_status : FE_READ_REGS : REGS[1]: 0x60
> [72933.996316] si21xx: si21_read_status : FE_READ_STATUS : AGC_POWER: 0x20
> [72934.004959] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> [72934.004964] si21xx: si21_read_status : FE_READ_REGS : REGS[0]: 0x20
> [72934.004968] si21xx: si21_read_status : FE_READ_REGS : REGS[1]: 0x00
>
> So, we have signal and sometimes we are getting carrier also.
> What worries me most is the FE_READ_REGS : REGS[1]: 0x60
> According to the datasheet this register 0x10 Lock status 2,  is RCVL 0
> 0 0 0 0 BSDA BSDO so 0x60 would seem meaningless.
>
> Same results using szap.
> hendrik@iptv:~$ szap -a 1 -r -n 170
> reading channels from file '/home/hendrik/.szap/channels.conf'
> zapping to 170 'NRK1;NRK':
> sat 0, frequency = 12015 MHz V, symbolrate 27500000, vpid = 0x0200, apid
> = 0x0280 sid = 0x0240
> using '/dev/dvb/adapter1/frontend0' and '/dev/dvb/adapter1/demux0'
> status 01 | signal c600 | snr 0000 | ber 000000b1 | unc 00000000 |
> status 01 | signal c600 | snr 0000 | ber 0000000f | unc 00000000 |
> status 01 | signal c000 | snr 0000 | ber 0000980f | unc 00000000 |
> status 03 | signal c600 | snr 0000 | ber 000098a3 | unc 00000000 |
> status 03 | signal c000 | snr 0000 | ber 000098c7 | unc 00000000 |
>
> Signal but no lock.
> Any ideas?
For me it's like no signal or wrong LNB configuration, but ...

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-06 11:52                         ` Igor M. Liplianin
@ 2010-03-06 19:18                           ` Hendrik Skarpeid
  2010-03-07 10:12                             ` Igor M. Liplianin
  0 siblings, 1 reply; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-03-06 19:18 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: linux-media, Nameer Kazzaz

Igor M. Liplianin skrev:
> On 5 марта 2010 00:16:07 Hendrik Skarpeid wrote:
>   
>> Igor M. Liplianin skrev:
>>     
>>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
>>>       
>>>> Igor M. Liplianin wrote:
>>>>         
>>>>> Now to find GPIO's for LNB power control and ... watch TV :)
>>>>>           
>>>> Yep. No succesful tuning at the moment. There might also be an issue
>>>> with the reset signal and writing to GPIOCTR, as the module at the
>>>> moment loads succesfully only once.
>>>> As far as I can make out, the LNB power control is probably GPIO 16 and
>>>> 17, not sure which is which, and how they work.
>>>> GPIO15 is wired to tuner #reset
>>>>         
>>> New patch to test
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - www.avg.com
>>> Version: 9.0.733 / Virus Database: 271.1.1/2721 - Release Date: 03/03/10
>>> 20:34:00
>>>       
>> modprobe si21xx debug=1 produces this output when scanning.
>>
>> [ 2187.998349] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
>> [ 2187.998353] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
>> [ 2187.999881] si21xx: si21xx_setacquire
>> [ 2187.999884] si21xx: si21xx_set_symbolrate : srate = 27500000
>> [ 2188.022645] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x01
>> [ 2188.054350] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
>> [ 2188.054355] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
>> [ 2188.055875] si21xx: si21xx_setacquire
>> [ 2188.055879] si21xx: si21xx_set_symbolrate : srate = 27500000
>> [ 2188.110359] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
>> [ 2188.110366] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
>> [ 2188.111885] si21xx: si21xx_setacquire
>> [ 2188.111889] si21xx: si21xx_set_symbolrate : srate = 27500000
>> [ 2188.166350] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
>> [ 2188.166354] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
>>
>> Since the tuner at hand uses a Si2109 chip, VSTATUS 0x01 and 0x02 would
>> indicate that blind scanning is used. Blind scanning is a 2109/2110
>> specific function, and may not very usable since we always use initial
>> tuning files anyway. 2109/10 also supports the legacy scanning method
>> which is supported by Si2107708.
>>
>> Is the use of blind scanning intentional?
>>     
> Yes, of course, it's intentional. Why not?
> User has freedom to make little errors in channels.conf file. Also the chip didn't support DVB-S2. 
> And last, has who si2107/08 ? My chip is si2109.
>
>
>   

I agree, it's best to use the hardware features. I was worried that I 
may be getting bad i2c data.
If I understand you correctly, you have a working Si2109 frontend driver?
Here's what I'm getting:
Added a few printouts to si21xx.c

        u8 signal = si21_readreg(state, ANALOG_AGC_POWER_LEVEL_REG);
        dprintk("%s : FE_READ_STATUS : AGC_POWER: 0x%02x\n", __func__, 
signal);

        si21_readregs(state, LOCK_STATUS_REG_1, regs_read, 0x02);

        reg_read = 0;

        for (i = 0; i < 7; ++i)
                reg_read |= ((regs_read[0] >> i) & 0x01) << (6 - i);

        lock = ((reg_read & 0x7f) | (regs_read[1] & 0x80));

        dprintk("%s : FE_READ_STATUS : VSTATUS: 0x%02x\n", __func__, lock);
        dprintk("%s : FE_READ_REGS : REGS[0]: 0x%02x\n", __func__, 
regs_read[0]);
        dprintk("%s : FE_READ_REGS : REGS[1]: 0x%02x\n", __func__, 
regs_read[1]);

hendrik@iptv:~$ scan -a 1 Sirius-5.0E

[72933.818871] si21xx: si21xx_set_symbolrate : srate = 27500000
[72933.900276] si21xx: si21_read_status : FE_READ_STATUS : AGC_POWER: 0x20
[72933.908807] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
[72933.908812] si21xx: si21_read_status : FE_READ_REGS : REGS[0]: 0x20
[72933.908815] si21xx: si21_read_status : FE_READ_REGS : REGS[1]: 0x00
[72933.908827] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
[72933.914962] si21xx: si21xx_setacquire
[72933.914967] si21xx: si21xx_set_symbolrate : srate = 27500000
[72933.949370] si21xx: si21_read_status : FE_READ_STATUS : AGC_POWER: 0x21
[72933.957877] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x01
[72933.957882] si21xx: si21_read_status : FE_READ_REGS : REGS[0]: 0xc0
[72933.957885] si21xx: si21_read_status : FE_READ_REGS : REGS[1]: 0x60
[72933.996316] si21xx: si21_read_status : FE_READ_STATUS : AGC_POWER: 0x20
[72934.004959] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
[72934.004964] si21xx: si21_read_status : FE_READ_REGS : REGS[0]: 0x20
[72934.004968] si21xx: si21_read_status : FE_READ_REGS : REGS[1]: 0x00

So, we have signal and sometimes we are getting carrier also.
What worries me most is the FE_READ_REGS : REGS[1]: 0x60
According to the datasheet this register 0x10 Lock status 2,  is RCVL 0 
0 0 0 0 BSDA BSDO so 0x60 would seem meaningless.

Same results using szap.
hendrik@iptv:~$ szap -a 1 -r -n 170
reading channels from file '/home/hendrik/.szap/channels.conf'
zapping to 170 'NRK1;NRK':
sat 0, frequency = 12015 MHz V, symbolrate 27500000, vpid = 0x0200, apid 
= 0x0280 sid = 0x0240
using '/dev/dvb/adapter1/frontend0' and '/dev/dvb/adapter1/demux0'
status 01 | signal c600 | snr 0000 | ber 000000b1 | unc 00000000 |
status 01 | signal c600 | snr 0000 | ber 0000000f | unc 00000000 |
status 01 | signal c000 | snr 0000 | ber 0000980f | unc 00000000 |
status 03 | signal c600 | snr 0000 | ber 000098a3 | unc 00000000 |
status 03 | signal c000 | snr 0000 | ber 000098c7 | unc 00000000 |

Signal but no lock.
Any ideas?

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-04 22:16                       ` Hendrik Skarpeid
  2010-03-04 22:46                         ` Hendrik Skarpeid
@ 2010-03-06 11:52                         ` Igor M. Liplianin
  2010-03-06 19:18                           ` Hendrik Skarpeid
  1 sibling, 1 reply; 51+ messages in thread
From: Igor M. Liplianin @ 2010-03-06 11:52 UTC (permalink / raw)
  To: Hendrik Skarpeid; +Cc: linux-media, Nameer Kazzaz

On 5 марта 2010 00:16:07 Hendrik Skarpeid wrote:
> Igor M. Liplianin skrev:
> > On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
> >> Igor M. Liplianin wrote:
> >>> Now to find GPIO's for LNB power control and ... watch TV :)
> >>
> >> Yep. No succesful tuning at the moment. There might also be an issue
> >> with the reset signal and writing to GPIOCTR, as the module at the
> >> moment loads succesfully only once.
> >> As far as I can make out, the LNB power control is probably GPIO 16 and
> >> 17, not sure which is which, and how they work.
> >> GPIO15 is wired to tuner #reset
> >
> > New patch to test
> >
> > ------------------------------------------------------------------------
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG - www.avg.com
> > Version: 9.0.733 / Virus Database: 271.1.1/2721 - Release Date: 03/03/10
> > 20:34:00
>
> modprobe si21xx debug=1 produces this output when scanning.
>
> [ 2187.998349] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> [ 2187.998353] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> [ 2187.999881] si21xx: si21xx_setacquire
> [ 2187.999884] si21xx: si21xx_set_symbolrate : srate = 27500000
> [ 2188.022645] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x01
> [ 2188.054350] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> [ 2188.054355] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> [ 2188.055875] si21xx: si21xx_setacquire
> [ 2188.055879] si21xx: si21xx_set_symbolrate : srate = 27500000
> [ 2188.110359] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> [ 2188.110366] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> [ 2188.111885] si21xx: si21xx_setacquire
> [ 2188.111889] si21xx: si21xx_set_symbolrate : srate = 27500000
> [ 2188.166350] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> [ 2188.166354] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
>
> Since the tuner at hand uses a Si2109 chip, VSTATUS 0x01 and 0x02 would
> indicate that blind scanning is used. Blind scanning is a 2109/2110
> specific function, and may not very usable since we always use initial
> tuning files anyway. 2109/10 also supports the legacy scanning method
> which is supported by Si2107708.
>
> Is the use of blind scanning intentional?
Yes, of course, it's intentional. Why not?
User has freedom to make little errors in channels.conf file. Also the chip didn't support DVB-S2. 
And last, has who si2107/08 ? My chip is si2109.

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-04 22:16                       ` Hendrik Skarpeid
@ 2010-03-04 22:46                         ` Hendrik Skarpeid
  2010-03-06 11:52                         ` Igor M. Liplianin
  1 sibling, 0 replies; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-03-04 22:46 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: linux-media, Nameer Kazzaz

Hendrik Skarpeid skrev:
> Igor M. Liplianin skrev:
>> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
>>  
>>> Igor M. Liplianin wrote:
>>>    
>>>> Now to find GPIO's for LNB power control and ... watch TV :)
>>>>       
>>> Yep. No succesful tuning at the moment. There might also be an issue
>>> with the reset signal and writing to GPIOCTR, as the module at the
>>> moment loads succesfully only once.
>>> As far as I can make out, the LNB power control is probably GPIO 16 and
>>> 17, not sure which is which, and how they work.
>>> GPIO15 is wired to tuner #reset
>>>     
>> New patch to test
>>   
>> ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com Version: 9.0.733 / Virus Database: 
>> 271.1.1/2721 - Release Date: 03/03/10 20:34:00
>>
>
> modprobe si21xx debug=1 produces this output when scanning.
>
> [ 2187.998349] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> [ 2187.998353] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> [ 2187.999881] si21xx: si21xx_setacquire
> [ 2187.999884] si21xx: si21xx_set_symbolrate : srate = 27500000
> [ 2188.022645] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x01
> [ 2188.054350] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> [ 2188.054355] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> [ 2188.055875] si21xx: si21xx_setacquire
> [ 2188.055879] si21xx: si21xx_set_symbolrate : srate = 27500000
> [ 2188.110359] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> [ 2188.110366] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
> [ 2188.111885] si21xx: si21xx_setacquire
> [ 2188.111889] si21xx: si21xx_set_symbolrate : srate = 27500000
> [ 2188.166350] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
> [ 2188.166354] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
>
> Since the tuner at hand uses a Si2109 chip, VSTATUS 0x01 and 0x02 
> would indicate that blind scanning is used. Blind scanning is a 
> 2109/2110 specific function, and may not very usable since we always 
> use initial tuning files anyway. 2109/10 also supports the legacy 
> scanning method which is supported by Si2107708.
>
> Is the use of blind scanning intentional?
>
Sorry, my bad. Mixed up the registers.
Got a VSTATUS: 0x0b once. Mostly I'm getting 0x01 and 0x02. Sometimes 
0x00 and 0x03


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-03 19:05                     ` Igor M. Liplianin
  2010-03-04 21:27                       ` Hendrik Skarpeid
@ 2010-03-04 22:16                       ` Hendrik Skarpeid
  2010-03-04 22:46                         ` Hendrik Skarpeid
  2010-03-06 11:52                         ` Igor M. Liplianin
  2010-03-10 12:15                       ` Hendrik Skarpeid
  2 siblings, 2 replies; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-03-04 22:16 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: linux-media, Nameer Kazzaz

Igor M. Liplianin skrev:
> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
>   
>> Igor M. Liplianin wrote:
>>     
>>> Now to find GPIO's for LNB power control and ... watch TV :)
>>>       
>> Yep. No succesful tuning at the moment. There might also be an issue
>> with the reset signal and writing to GPIOCTR, as the module at the
>> moment loads succesfully only once.
>> As far as I can make out, the LNB power control is probably GPIO 16 and
>> 17, not sure which is which, and how they work.
>> GPIO15 is wired to tuner #reset
>>     
> New patch to test
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 9.0.733 / Virus Database: 271.1.1/2721 - Release Date: 03/03/10 20:34:00
>

modprobe si21xx debug=1 produces this output when scanning.

[ 2187.998349] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
[ 2187.998353] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
[ 2187.999881] si21xx: si21xx_setacquire
[ 2187.999884] si21xx: si21xx_set_symbolrate : srate = 27500000
[ 2188.022645] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x01
[ 2188.054350] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
[ 2188.054355] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
[ 2188.055875] si21xx: si21xx_setacquire
[ 2188.055879] si21xx: si21xx_set_symbolrate : srate = 27500000
[ 2188.110359] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
[ 2188.110366] si21xx: si21xx_set_frontend : FE_SET_FRONTEND
[ 2188.111885] si21xx: si21xx_setacquire
[ 2188.111889] si21xx: si21xx_set_symbolrate : srate = 27500000
[ 2188.166350] si21xx: si21_read_status : FE_READ_STATUS : VSTATUS: 0x02
[ 2188.166354] si21xx: si21xx_set_frontend : FE_SET_FRONTEND

Since the tuner at hand uses a Si2109 chip, VSTATUS 0x01 and 0x02 would 
indicate that blind scanning is used. Blind scanning is a 2109/2110 
specific function, and may not very usable since we always use initial 
tuning files anyway. 2109/10 also supports the legacy scanning method 
which is supported by Si2107708.

Is the use of blind scanning intentional?

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-03 19:05                     ` Igor M. Liplianin
@ 2010-03-04 21:27                       ` Hendrik Skarpeid
  2010-03-04 22:16                       ` Hendrik Skarpeid
  2010-03-10 12:15                       ` Hendrik Skarpeid
  2 siblings, 0 replies; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-03-04 21:27 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: linux-media

Igor M. Liplianin skrev:
> On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
>   
>> Igor M. Liplianin wrote:
>>     
>>> Now to find GPIO's for LNB power control and ... watch TV :)
>>>       
>> Yep. No succesful tuning at the moment. There might also be an issue
>> with the reset signal and writing to GPIOCTR, as the module at the
>> moment loads succesfully only once.
>> As far as I can make out, the LNB power control is probably GPIO 16 and
>> 17, not sure which is which, and how they work.
>> GPIO15 is wired to tuner #reset
>>     
> New patch to test
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 9.0.733 / Virus Database: 271.1.1/2721 - Release Date: 03/03/10 20:34:00
>
A little tweaking produced the required voltages for the LNB:

switch (voltage) {
case SEC_VOLTAGE_18:
dm1105_gpio_set(dev, GPIO16 | GPIO17);
break;
case SEC_VOLTAGE_13:
dm1105_gpio_andor(dev, GPIO16 | GPIO17, GPIO17);
break;
default:
dm1105_gpio_clear(dev, GPIO16 | GPIO17);
break;
}

But unfortunately tuning is still failing. Could it be an issue with the 
21xx driver? I will read up on the Si2109.

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-03 16:42                   ` Hendrik Skarpeid
@ 2010-03-03 19:05                     ` Igor M. Liplianin
  2010-03-04 21:27                       ` Hendrik Skarpeid
                                         ` (2 more replies)
  0 siblings, 3 replies; 51+ messages in thread
From: Igor M. Liplianin @ 2010-03-03 19:05 UTC (permalink / raw)
  To: Hendrik Skarpeid; +Cc: linux-media, Nameer Kazzaz

[-- Attachment #1: Type: text/plain, Size: 603 bytes --]

On 3 марта 2010 18:42:42 Hendrik Skarpeid wrote:
> Igor M. Liplianin wrote:
> > Now to find GPIO's for LNB power control and ... watch TV :)
>
> Yep. No succesful tuning at the moment. There might also be an issue
> with the reset signal and writing to GPIOCTR, as the module at the
> moment loads succesfully only once.
> As far as I can make out, the LNB power control is probably GPIO 16 and
> 17, not sure which is which, and how they work.
> GPIO15 is wired to tuner #reset
New patch to test
-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

[-- Attachment #2: dm1105.c.diff --]
[-- Type: text/x-patch, Size: 8072 bytes --]

--- a/linux/drivers/media/dvb/dm1105/dm1105.c	Sun Feb 07 16:26:33 2010 +0200
+++ b/linux/drivers/media/dvb/dm1105/dm1105.c	Wed Mar 03 20:52:54 2010 +0200
@@ -20,6 +20,7 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -47,11 +48,12 @@
 
 #define UNSET (-1U)
 
-#define DM1105_BOARD_NOAUTO		UNSET
-#define DM1105_BOARD_UNKNOWN		0
-#define DM1105_BOARD_DVBWORLD_2002	1
-#define DM1105_BOARD_DVBWORLD_2004	2
-#define DM1105_BOARD_AXESS_DM05		3
+#define DM1105_BOARD_NOAUTO			UNSET
+#define DM1105_BOARD_UNKNOWN			0
+#define DM1105_BOARD_DVBWORLD_2002		1
+#define DM1105_BOARD_DVBWORLD_2004		2
+#define DM1105_BOARD_AXESS_DM05			3
+#define DM1105_BOARD_UNBRANDED_I2C_ON_GPIO	4
 
 /* ----------------------------------------------- */
 /*
@@ -155,23 +157,30 @@
 #define DM1105_MAX				0x04
 
 #define DRIVER_NAME				"dm1105"
+#define DM1105_I2C_GPIO_NAME			"dm1105-gpio"
 
 #define DM1105_DMA_PACKETS			47
 #define DM1105_DMA_PACKET_LENGTH		(128*4)
 #define DM1105_DMA_BYTES			(128 * 4 * DM1105_DMA_PACKETS)
 
 /* GPIO's for LNB power control */
-#define DM1105_LNB_MASK				0x00000000
+#define DM1105_LNB_MASK				0x00006000
 #define DM1105_LNB_OFF				0x00020000
 #define DM1105_LNB_13V				0x00010100
 #define DM1105_LNB_18V				0x00000100
 
 /* GPIO's for LNB power control for Axess DM05 */
-#define DM05_LNB_MASK				0x00000000
+#define DM05_LNB_MASK				0x00006000
 #define DM05_LNB_OFF				0x00020000/* actually 13v */
 #define DM05_LNB_13V				0x00020000
 #define DM05_LNB_18V				0x00030000
 
+#define GPIO13					(1 << 13)
+#define GPIO14					(1 << 14)
+#define GPIO15					(1 << 15)
+#define GPIO16					(1 << 16)
+#define GPIO17					(1 << 17)
+
 static unsigned int card[]  = {[0 ... 3] = UNSET };
 module_param_array(card,  int, NULL, 0444);
 MODULE_PARM_DESC(card, "card type");
@@ -185,7 +194,8 @@
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
 struct dm1105_board {
-	char                    *name;
+	char		*name;
+	u32		gpio_scl, gpio_sda;
 };
 
 struct dm1105_subid {
@@ -207,6 +217,11 @@
 	[DM1105_BOARD_AXESS_DM05] = {
 		.name		= "Axess/EasyTv DM05",
 	},
+	[DM1105_BOARD_UNBRANDED_I2C_ON_GPIO] = {
+		.name		= "Unbranded DM1105 with i2c on GPIOs",
+		.gpio_scl	= GPIO14,
+		.gpio_sda	= GPIO13,
+	},
 };
 
 static const struct dm1105_subid dm1105_subids[] = {
@@ -292,6 +307,8 @@
 
 	/* i2c */
 	struct i2c_adapter i2c_adap;
+	struct i2c_adapter i2c_bb_adap;
+	struct i2c_algo_bit_data i2c_bit;
 
 	/* irq */
 	struct work_struct work;
@@ -327,6 +344,101 @@
 #define dm_setl(reg, bit)	dm_andorl((reg), (bit), (bit))
 #define dm_clearl(reg, bit)	dm_andorl((reg), (bit), 0)
 
+/* The chip has 18 GPIOs. In HOST mode GPIO's used as 15 bit address lines,
+ so we can use only 3 GPIO's from GPIO15 to GPIO17.
+ Here I don't check whether HOST is enebled as it is not implemented yet.
+ */
+static void dm1105_gpio_set(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_setl(DM1105_GPIOVAL, mask & 0x0003ffff);
+
+}
+
+static void dm1105_gpio_clear(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_clearl(DM1105_GPIOVAL, mask & 0x0003ffff);
+
+}
+
+static void dm1105_gpio_andor(struct dm1105_dev *dev, u32 mask, u32 val)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_andorl(DM1105_GPIOVAL, mask & 0x0003ffff, val);
+
+}
+
+static u32 dm1105_gpio_get(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		return (dm_readl(DM1105_GPIOVAL) & mask & 0x0003ffff);
+
+	return 0;
+}
+
+static void dm1105_gpio_enable(struct dm1105_dev *dev, u32 mask, int asoutput)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if ((mask & 0x0003ffff) && asoutput)
+		dm_clearl(DM1105_GPIOCTR, mask & 0x0003ffff);
+	else if ((mask & 0x0003ffff) && !asoutput)
+		dm_setl(DM1105_GPIOCTR, mask & 0x0003ffff);
+
+}
+
+static void dm1105_setline(struct dm1105_dev *dev, u32 line, int state)
+{
+	if (state)
+		dm1105_gpio_enable(dev, line, 0);
+	else {
+		dm1105_gpio_enable(dev, line, 1);
+		dm1105_gpio_clear(dev, line);
+	}
+}
+
+static void dm1105_setsda(void *data, int state)
+{
+	struct dm1105_dev *dev = data;
+
+	dm1105_setline(dev, dm1105_boards[dev->boardnr].gpio_sda, state);
+}
+
+static void dm1105_setscl(void *data, int state)
+{
+	struct dm1105_dev *dev = data;
+
+	dm1105_setline(dev, dm1105_boards[dev->boardnr].gpio_scl, state);
+}
+
+static int dm1105_getsda(void *data)
+{
+	struct dm1105_dev *dev = data;
+
+	return dm1105_gpio_get(dev, dm1105_boards[dev->boardnr].gpio_sda) ? 1 : 0;
+}
+
+static int dm1105_getscl(void *data)
+{
+	struct dm1105_dev *dev = data;
+
+	return dm1105_gpio_get(dev, dm1105_boards[dev->boardnr].gpio_scl) ? 1 : 0;
+}
+
 static int dm1105_i2c_xfer(struct i2c_adapter *i2c_adap,
 			    struct i2c_msg *msgs, int num)
 {
@@ -467,6 +579,26 @@
 	return 0;
 }
 
+static int dm1105_set_voltage1(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
+{
+	struct dm1105_dev *dev = frontend_to_dm1105_dev(fe);
+
+	dm1105_gpio_enable(dev, GPIO16 | GPIO17, 1);
+	switch (voltage) {
+	case SEC_VOLTAGE_18:
+		dm1105_gpio_andor(dev, GPIO16 | GPIO17, 0);
+		break;
+	case SEC_VOLTAGE_13:
+		dm1105_gpio_andor(dev, GPIO16 | GPIO17, GPIO16);
+		break;
+	default:
+		dm1105_gpio_set(dev, GPIO16 | GPIO17);
+		break;
+	}
+
+	return 0;
+}
+
 static void dm1105_set_dma_addr(struct dm1105_dev *dev)
 {
 	dm_writel(DM1105_STADR, cpu_to_le32(dev->dma_addr));
@@ -742,6 +874,38 @@
 	int ret;
 
 	switch (dev->boardnr) {
+	case DM1105_BOARD_UNBRANDED_I2C_ON_GPIO:
+		dm1105_gpio_enable(dev, GPIO15, 1);
+		dm1105_gpio_clear(dev, GPIO15);
+		msleep(100);
+		dm1105_gpio_set(dev, GPIO15);
+		msleep(200);
+		dev->fe = dvb_attach(
+			stv0299_attach, &sharp_z0194a_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe) {
+			dev->fe->ops.set_voltage = dm1105_set_voltage1;
+			dvb_attach(dvb_pll_attach, dev->fe, 0x60,
+					&dev->i2c_bb_adap, DVB_PLL_OPERA1);
+			break;
+		}
+
+		dev->fe = dvb_attach(
+			stv0288_attach, &earda_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe) {
+			dev->fe->ops.set_voltage = dm1105_set_voltage1;
+			dvb_attach(stb6000_attach, dev->fe, 0x61,
+					&dev->i2c_bb_adap);
+			break;
+		}
+
+		dev->fe = dvb_attach(
+			si21xx_attach, &serit_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe)
+			dev->fe->ops.set_voltage = dm1105_set_voltage1;
+		break;
 	case DM1105_BOARD_DVBWORLD_2004:
 		dev->fe = dvb_attach(
 			cx24116_attach, &serit_sp2633_config,
@@ -905,11 +1069,33 @@
 	if (ret < 0)
 		goto err_dm1105_hw_exit;
 
+	i2c_set_adapdata(&dev->i2c_bb_adap, dev);
+	strcpy(dev->i2c_bb_adap.name, DM1105_I2C_GPIO_NAME);
+	dev->i2c_bb_adap.owner = THIS_MODULE;
+	dev->i2c_bb_adap.class = I2C_CLASS_TV_DIGITAL;
+	dev->i2c_bb_adap.dev.parent = &pdev->dev;
+	dev->i2c_bb_adap.algo_data = &dev->i2c_bit;
+	dev->i2c_bit.data = dev;
+	dev->i2c_bit.setsda = dm1105_setsda;
+	dev->i2c_bit.setscl = dm1105_setscl;
+	dev->i2c_bit.getsda = dm1105_getsda;
+	dev->i2c_bit.getscl = dm1105_getscl;
+	dev->i2c_bit.udelay = 10;
+	dev->i2c_bit.timeout = 10;
+
+	/* Raise SCL and SDA */
+	dm1105_setsda(dev, 1);
+	dm1105_setscl(dev, 1);
+
+	ret = i2c_bit_add_bus(&dev->i2c_bb_adap);
+	if (ret < 0)
+		goto err_i2c_del_adapter;
+
 	/* dvb */
 	ret = dvb_register_adapter(&dev->dvb_adapter, DRIVER_NAME,
 					THIS_MODULE, &pdev->dev, adapter_nr);
 	if (ret < 0)
-		goto err_i2c_del_adapter;
+		goto err_i2c_del_adapters;
 
 	dvb_adapter = &dev->dvb_adapter;
 
@@ -991,6 +1177,8 @@
 	dvb_dmx_release(dvbdemux);
 err_dvb_unregister_adapter:
 	dvb_unregister_adapter(dvb_adapter);
+err_i2c_del_adapters:
+	i2c_del_adapter(&dev->i2c_bb_adap);
 err_i2c_del_adapter:
 	i2c_del_adapter(&dev->i2c_adap);
 err_dm1105_hw_exit:

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-03 15:49                 ` Igor M. Liplianin
@ 2010-03-03 16:42                   ` Hendrik Skarpeid
  2010-03-03 19:05                     ` Igor M. Liplianin
  0 siblings, 1 reply; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-03-03 16:42 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: linux-media, Nameer Kazzaz

Igor M. Liplianin wrote:
>
> Now to find GPIO's for LNB power control and ... watch TV :)
>
>   
Yep. No succesful tuning at the moment. There might also be an issue 
with the reset signal and writing to GPIOCTR, as the module at the 
moment loads succesfully only once.
As far as I can make out, the LNB power control is probably GPIO 16 and 
17, not sure which is which, and how they work.
GPIO15 is wired to tuner #reset


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-03  8:38               ` Hendrik Skarpeid
@ 2010-03-03 15:49                 ` Igor M. Liplianin
  2010-03-03 16:42                   ` Hendrik Skarpeid
  0 siblings, 1 reply; 51+ messages in thread
From: Igor M. Liplianin @ 2010-03-03 15:49 UTC (permalink / raw)
  To: Hendrik Skarpeid; +Cc: linux-media, Nameer Kazzaz

On 3 марта 2010 10:38:09 Hendrik Skarpeid wrote:
> Igor M. Liplianin skrev:
> > On 2 марта 2010, "Igor M. Liplianin" <liplianin@me.by> wrote:
> >> Igor M. Liplianin skrev:
> >>> On 23 февраля 2010 15:12:05 Nameer Kazzaz wrote:
> >>>> Sounds cool, let me know if I can help you with anything.
> >>>>
> >>>> Thanks
> >>>> Nameer
> >>>>
> >>>> Hendrik Skarpeid wrote:
> >>>>> No luck here either, still working on it.
> >>>>> My plan is to solder som wires on strategic points on the board and
> >>>>> debug i2c and other activity with an oscilloscope. Will probably
> >>>>> start next week.
> >>>>>
> >>>>> Nameer Kazzaz wrote:
> >>>>>> Hey Igor,
> >>>>>> I'm getting the same error:
> >>>>>> dm1105 0000:04:0b.0: could not attach frontend
> >>>>>>
> >>>>>> Did you get your one to work.
> >>>>>>
> >>>>>> Thanks
> >>>>>> Nameer
> >>>>>>
> >>>>>> Igor M. Liplianin wrote:
> >>>>>>> On 18 февраля 2010, liplianin@me.by wrote:
> >>>>>>>> I also got the unbranded dm1105 card. I tried the four possible
> >>>>>>>> i2c addresses, just i case. Noen worked of course. Then I traced
> >>>>>>>> the i2c pins on the tuner to pins 100 and 101 on the DM1105.
> >>>>>>>> These are GPIO pins, so bit-banging i2c on these pins seems to be
> >>>>>>>> the solution.
> >>>>>>>>
> >>>>>>>> scl = p101 = gpio14
> >>>>>>>> sda = p100 = gpio13
> >>>>>>>
> >>>>>>> Here is the patch to test. Use option card=4.
> >>>>>>>     modprobe dm1105 card=4
> >>>
> >>> I didn't test patch in real hardware.
> >>> But I can connect GPIO14 and GPIO13 to SCL and SDA in any dm1105 card
> >>> and test whether it works. Then I will ask you to test also.
> >>>
> >>>
> >>> -----------------------------------------------------------------------
> >>>-
> >>>
> >>>
> >>> No virus found in this incoming message.
> >>> Checked by AVG - www.avg.com
> >>> Version: 9.0.733 / Virus Database: 271.1.1/2708 - Release Date:
> >>> 02/24/10 20:34:00
> >>
> >> Think I solved it.
> >> The dm1105_getsda and dm1105_getscl functions need to mask out the other
> >> GPIO bits.
> >> I hacked the code to return 1 if corresponding GPIO set, and 0 if not
> >> set. That did the trick. Now the frontend registers and /dev/dvb is
> >> populated. :)
> >> Haven't done any tuning yet.
> >
> > Do you cut connections between dm1105 i2c pins and the
> > gpio pins you make earlier?
>
> Success!
Glad to hear.
Now to find GPIO's for LNB power control and ... watch TV :)

>
> [ 4354.673688] dm1105 0000:03:01.0: PCI INT A -> GSI 19 (level, low) ->
> IRQ 19
> [ 4354.673806] DVB: registering new adapter (dm1105)
> [ 4354.921866] dm1105 0000:03:01.0: MAC 00:00:00:00:00:00
> [ 4355.533170] DVB: registering adapter 0 frontend 0 (SL SI21XX DVB-S)...
> [ 4355.533327] input: DVB on-card IR receiver as
> /devices/pci0000:00/0000:00:1e.0/0000:03:01.0/input/input7
> [ 4355.533377] Creating IR device irrcv0

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-02 23:10             ` Igor M. Liplianin
@ 2010-03-03  8:38               ` Hendrik Skarpeid
  2010-03-03 15:49                 ` Igor M. Liplianin
  0 siblings, 1 reply; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-03-03  8:38 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: linux-media, Nameer Kazzaz

Igor M. Liplianin skrev:
> On 2 марта 2010, "Igor M. Liplianin" <liplianin@me.by> wrote:
>   
>> Igor M. Liplianin skrev:
>>     
>>> On 23 февраля 2010 15:12:05 Nameer Kazzaz wrote:
>>>       
>>>> Sounds cool, let me know if I can help you with anything.
>>>>
>>>> Thanks
>>>> Nameer
>>>>
>>>> Hendrik Skarpeid wrote:
>>>>         
>>>>> No luck here either, still working on it.
>>>>> My plan is to solder som wires on strategic points on the board and
>>>>> debug i2c and other activity with an oscilloscope. Will probably start
>>>>> next week.
>>>>>
>>>>> Nameer Kazzaz wrote:
>>>>>           
>>>>>> Hey Igor,
>>>>>> I'm getting the same error:
>>>>>> dm1105 0000:04:0b.0: could not attach frontend
>>>>>>
>>>>>> Did you get your one to work.
>>>>>>
>>>>>> Thanks
>>>>>> Nameer
>>>>>>
>>>>>> Igor M. Liplianin wrote:
>>>>>>             
>>>>>>> On 18 февраля 2010, liplianin@me.by wrote:
>>>>>>>               
>>>>>>>> I also got the unbranded dm1105 card. I tried the four possible i2c
>>>>>>>> addresses, just i case. Noen worked of course. Then I traced the i2c
>>>>>>>> pins on the tuner to pins 100 and 101 on the DM1105.
>>>>>>>> These are GPIO pins, so bit-banging i2c on these pins seems to be
>>>>>>>> the solution.
>>>>>>>>
>>>>>>>> scl = p101 = gpio14
>>>>>>>> sda = p100 = gpio13
>>>>>>>>                 
>>>>>>> Here is the patch to test. Use option card=4.
>>>>>>>     modprobe dm1105 card=4
>>>>>>>               
>>> I didn't test patch in real hardware.
>>> But I can connect GPIO14 and GPIO13 to SCL and SDA in any dm1105 card and
>>> test whether it works. Then I will ask you to test also.
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - www.avg.com
>>> Version: 9.0.733 / Virus Database: 271.1.1/2708 - Release Date: 02/24/10
>>> 20:34:00
>>>       
>> Think I solved it.
>> The dm1105_getsda and dm1105_getscl functions need to mask out the other
>> GPIO bits.
>> I hacked the code to return 1 if corresponding GPIO set, and 0 if not
>> set. That did the trick. Now the frontend registers and /dev/dvb is
>> populated. :)
>> Haven't done any tuning yet.
>>     
>
> Do you cut connections between dm1105 i2c pins and the 
> gpio pins you make earlier?
>
>   
Success!

[ 4354.673688] dm1105 0000:03:01.0: PCI INT A -> GSI 19 (level, low) -> 
IRQ 19
[ 4354.673806] DVB: registering new adapter (dm1105)
[ 4354.921866] dm1105 0000:03:01.0: MAC 00:00:00:00:00:00
[ 4355.533170] DVB: registering adapter 0 frontend 0 (SL SI21XX DVB-S)...
[ 4355.533327] input: DVB on-card IR receiver as 
/devices/pci0000:00/0000:00:1e.0/0000:03:01.0/input/input7
[ 4355.533377] Creating IR device irrcv0


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-03-02 19:09           ` Hendrik Skarpeid
@ 2010-03-02 23:10             ` Igor M. Liplianin
  2010-03-03  8:38               ` Hendrik Skarpeid
  0 siblings, 1 reply; 51+ messages in thread
From: Igor M. Liplianin @ 2010-03-02 23:10 UTC (permalink / raw)
  To: Hendrik Skarpeid, linux-media, Nameer Kazzaz

[-- Attachment #1: Type: text/plain, Size: 2276 bytes --]

On 2 марта 2010, "Igor M. Liplianin" <liplianin@me.by> wrote:
> Igor M. Liplianin skrev:
> > On 23 февраля 2010 15:12:05 Nameer Kazzaz wrote:
> >> Sounds cool, let me know if I can help you with anything.
> >>
> >> Thanks
> >> Nameer
> >>
> >> Hendrik Skarpeid wrote:
> >>> No luck here either, still working on it.
> >>> My plan is to solder som wires on strategic points on the board and
> >>> debug i2c and other activity with an oscilloscope. Will probably start
> >>> next week.
> >>>
> >>> Nameer Kazzaz wrote:
> >>>> Hey Igor,
> >>>> I'm getting the same error:
> >>>> dm1105 0000:04:0b.0: could not attach frontend
> >>>>
> >>>> Did you get your one to work.
> >>>>
> >>>> Thanks
> >>>> Nameer
> >>>>
> >>>> Igor M. Liplianin wrote:
> >>>>> On 18 февраля 2010, liplianin@me.by wrote:
> >>>>>> I also got the unbranded dm1105 card. I tried the four possible i2c
> >>>>>> addresses, just i case. Noen worked of course. Then I traced the i2c
> >>>>>> pins on the tuner to pins 100 and 101 on the DM1105.
> >>>>>> These are GPIO pins, so bit-banging i2c on these pins seems to be
> >>>>>> the solution.
> >>>>>>
> >>>>>> scl = p101 = gpio14
> >>>>>> sda = p100 = gpio13
> >>>>>
> >>>>> Here is the patch to test. Use option card=4.
> >>>>>     modprobe dm1105 card=4
> >
> > I didn't test patch in real hardware.
> > But I can connect GPIO14 and GPIO13 to SCL and SDA in any dm1105 card and
> > test whether it works. Then I will ask you to test also.
> >
> >
> > ------------------------------------------------------------------------
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG - www.avg.com
> > Version: 9.0.733 / Virus Database: 271.1.1/2708 - Release Date: 02/24/10
> > 20:34:00
>
> Think I solved it.
> The dm1105_getsda and dm1105_getscl functions need to mask out the other
> GPIO bits.
> I hacked the code to return 1 if corresponding GPIO set, and 0 if not
> set. That did the trick. Now the frontend registers and /dev/dvb is
> populated. :)
> Haven't done any tuning yet.

Do you cut connections between dm1105 i2c pins and the 
gpio pins you make earlier?

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks


[-- Attachment #2: dm1105.c.diff --]
[-- Type: text/x-patch, Size: 6940 bytes --]

--- a/linux/drivers/media/dvb/dm1105/dm1105.c	Sun Feb 07 16:26:33 2010 +0200
+++ b/linux/drivers/media/dvb/dm1105/dm1105.c	Wed Mar 03 00:55:45 2010 +0200
@@ -20,6 +20,7 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -47,11 +48,12 @@
 
 #define UNSET (-1U)
 
-#define DM1105_BOARD_NOAUTO		UNSET
-#define DM1105_BOARD_UNKNOWN		0
-#define DM1105_BOARD_DVBWORLD_2002	1
-#define DM1105_BOARD_DVBWORLD_2004	2
-#define DM1105_BOARD_AXESS_DM05		3
+#define DM1105_BOARD_NOAUTO			UNSET
+#define DM1105_BOARD_UNKNOWN			0
+#define DM1105_BOARD_DVBWORLD_2002		1
+#define DM1105_BOARD_DVBWORLD_2004		2
+#define DM1105_BOARD_AXESS_DM05			3
+#define DM1105_BOARD_UNBRANDED_I2C_ON_GPIO	4
 
 /* ----------------------------------------------- */
 /*
@@ -155,23 +157,27 @@
 #define DM1105_MAX				0x04
 
 #define DRIVER_NAME				"dm1105"
+#define DM1105_I2C_GPIO_NAME			"dm1105-gpio"
 
 #define DM1105_DMA_PACKETS			47
 #define DM1105_DMA_PACKET_LENGTH		(128*4)
 #define DM1105_DMA_BYTES			(128 * 4 * DM1105_DMA_PACKETS)
 
 /* GPIO's for LNB power control */
-#define DM1105_LNB_MASK				0x00000000
+#define DM1105_LNB_MASK				0x00006000
 #define DM1105_LNB_OFF				0x00020000
 #define DM1105_LNB_13V				0x00010100
 #define DM1105_LNB_18V				0x00000100
 
 /* GPIO's for LNB power control for Axess DM05 */
-#define DM05_LNB_MASK				0x00000000
+#define DM05_LNB_MASK				0x00006000
 #define DM05_LNB_OFF				0x00020000/* actually 13v */
 #define DM05_LNB_13V				0x00020000
 #define DM05_LNB_18V				0x00030000
 
+#define GPIO13					(1 << 13)
+#define GPIO14					(1 << 14)
+
 static unsigned int card[]  = {[0 ... 3] = UNSET };
 module_param_array(card,  int, NULL, 0444);
 MODULE_PARM_DESC(card, "card type");
@@ -185,7 +191,8 @@
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
 struct dm1105_board {
-	char                    *name;
+	char		*name;
+	u32		gpio_scl, gpio_sda;
 };
 
 struct dm1105_subid {
@@ -207,6 +214,11 @@
 	[DM1105_BOARD_AXESS_DM05] = {
 		.name		= "Axess/EasyTv DM05",
 	},
+	[DM1105_BOARD_UNBRANDED_I2C_ON_GPIO] = {
+		.name		= "Unbranded DM1105 with i2c on GPIOs",
+		.gpio_scl	= GPIO14,
+		.gpio_sda	= GPIO13,
+	},
 };
 
 static const struct dm1105_subid dm1105_subids[] = {
@@ -292,6 +304,8 @@
 
 	/* i2c */
 	struct i2c_adapter i2c_adap;
+	struct i2c_adapter i2c_bb_adap;
+	struct i2c_algo_bit_data i2c_bit;
 
 	/* irq */
 	struct work_struct work;
@@ -327,6 +341,91 @@
 #define dm_setl(reg, bit)	dm_andorl((reg), (bit), (bit))
 #define dm_clearl(reg, bit)	dm_andorl((reg), (bit), 0)
 
+/* The chip has 18 GPIOs. In HOST mode GPIO's used as 15 bit address lines,
+ so we can use only 3 GPIO's from GPIO15 to GPIO17.
+ Here I don't check whether HOST is enebled as it is not implemented yet.
+ */
+void dm1105_gpio_set(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_setl(DM1105_GPIOVAL, mask & 0x0003ffff);
+
+}
+
+void dm1105_gpio_clear(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_clearl(DM1105_GPIOVAL, mask & 0x0003ffff);
+
+}
+
+u32 dm1105_gpio_get(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		return (dm_readl(DM1105_GPIOVAL) & mask & 0x0003ffff);
+
+	return 0;
+}
+
+void dm1105_gpio_enable(struct dm1105_dev *dev, u32 mask, int asoutput)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if ((mask & 0x0003ffff) && asoutput)
+		dm_clearl(DM1105_GPIOCTR, mask & 0x0003ffff);
+	else if ((mask & 0x0003ffff) && !asoutput)
+		dm_setl(DM1105_GPIOCTR, mask & 0x0003ffff);
+
+}
+
+static void dm1105_setline(struct dm1105_dev *dev, u32 line, int state)
+{
+	if (state)
+		dm1105_gpio_enable(dev, line, 0);
+	else {
+		dm1105_gpio_enable(dev, line, 1);
+		dm1105_gpio_clear(dev, line);
+	}
+}
+
+static void dm1105_setsda(void *data, int state)
+{
+	struct dm1105_dev *dev = data;
+
+	dm1105_setline(dev, dm1105_boards[dev->boardnr].gpio_sda, state);
+}
+
+static void dm1105_setscl(void *data, int state)
+{
+	struct dm1105_dev *dev = data;
+
+	dm1105_setline(dev, dm1105_boards[dev->boardnr].gpio_scl, state);
+}
+
+static int dm1105_getsda(void *data)
+{
+	struct dm1105_dev *dev = data;
+
+	return dm1105_gpio_get(dev, dm1105_boards[dev->boardnr].gpio_sda) ? 1 : 0;
+}
+
+static int dm1105_getscl(void *data)
+{
+	struct dm1105_dev *dev = data;
+
+	return dm1105_gpio_get(dev, dm1105_boards[dev->boardnr].gpio_scl) ? 1 : 0;
+}
+
 static int dm1105_i2c_xfer(struct i2c_adapter *i2c_adap,
 			    struct i2c_msg *msgs, int num)
 {
@@ -742,6 +841,33 @@
 	int ret;
 
 	switch (dev->boardnr) {
+	case DM1105_BOARD_UNBRANDED_I2C_ON_GPIO:
+		dev->fe = dvb_attach(
+			stv0299_attach, &sharp_z0194a_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe) {
+			dev->fe->ops.set_voltage = dm1105_set_voltage;
+			dvb_attach(dvb_pll_attach, dev->fe, 0x60,
+					&dev->i2c_bb_adap, DVB_PLL_OPERA1);
+			break;
+		}
+
+		dev->fe = dvb_attach(
+			stv0288_attach, &earda_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe) {
+			dev->fe->ops.set_voltage = dm1105_set_voltage;
+			dvb_attach(stb6000_attach, dev->fe, 0x61,
+					&dev->i2c_bb_adap);
+			break;
+		}
+
+		dev->fe = dvb_attach(
+			si21xx_attach, &serit_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe)
+			dev->fe->ops.set_voltage = dm1105_set_voltage;
+		break;
 	case DM1105_BOARD_DVBWORLD_2004:
 		dev->fe = dvb_attach(
 			cx24116_attach, &serit_sp2633_config,
@@ -905,11 +1031,33 @@
 	if (ret < 0)
 		goto err_dm1105_hw_exit;
 
+	i2c_set_adapdata(&dev->i2c_bb_adap, dev);
+	strcpy(dev->i2c_bb_adap.name, DM1105_I2C_GPIO_NAME);
+	dev->i2c_bb_adap.owner = THIS_MODULE;
+	dev->i2c_bb_adap.class = I2C_CLASS_TV_DIGITAL;
+	dev->i2c_bb_adap.dev.parent = &pdev->dev;
+	dev->i2c_bb_adap.algo_data = &dev->i2c_bit;
+	dev->i2c_bit.data = dev;
+	dev->i2c_bit.setsda = dm1105_setsda;
+	dev->i2c_bit.setscl = dm1105_setscl;
+	dev->i2c_bit.getsda = dm1105_getsda;
+	dev->i2c_bit.getscl = dm1105_getscl;
+	dev->i2c_bit.udelay = 10;
+	dev->i2c_bit.timeout = 10;
+
+	/* Raise SCL and SDA */
+	dm1105_setsda(dev, 1);
+	dm1105_setscl(dev, 1);
+
+	ret = i2c_bit_add_bus(&dev->i2c_bb_adap);
+	if (ret < 0)
+		goto err_i2c_del_adapter;
+
 	/* dvb */
 	ret = dvb_register_adapter(&dev->dvb_adapter, DRIVER_NAME,
 					THIS_MODULE, &pdev->dev, adapter_nr);
 	if (ret < 0)
-		goto err_i2c_del_adapter;
+		goto err_i2c_del_adapters;
 
 	dvb_adapter = &dev->dvb_adapter;
 
@@ -991,6 +1139,8 @@
 	dvb_dmx_release(dvbdemux);
 err_dvb_unregister_adapter:
 	dvb_unregister_adapter(dvb_adapter);
+err_i2c_del_adapters:
+	i2c_del_adapter(&dev->i2c_bb_adap);
 err_i2c_del_adapter:
 	i2c_del_adapter(&dev->i2c_adap);
 err_dm1105_hw_exit:

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-23 17:40         ` Igor M. Liplianin
  2010-02-23 19:40           ` Nameer Kazzaz
  2010-03-02 13:06           ` Hendrik Skarpeid
@ 2010-03-02 19:09           ` Hendrik Skarpeid
  2010-03-02 23:10             ` Igor M. Liplianin
  2 siblings, 1 reply; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-03-02 19:09 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: Nameer Kazzaz, linux-media

Igor M. Liplianin skrev:
> On 23 февраля 2010 15:12:05 Nameer Kazzaz wrote:
>   
>> Sounds cool, let me know if I can help you with anything.
>>
>> Thanks
>> Nameer
>>
>> Hendrik Skarpeid wrote:
>>     
>>> No luck here either, still working on it.
>>> My plan is to solder som wires on strategic points on the board and
>>> debug i2c and other activity with an oscilloscope. Will probably start
>>> next week.
>>>
>>> Nameer Kazzaz wrote:
>>>       
>>>> Hey Igor,
>>>> I'm getting the same error:
>>>> dm1105 0000:04:0b.0: could not attach frontend
>>>>
>>>> Did you get your one to work.
>>>>
>>>> Thanks
>>>> Nameer
>>>>
>>>> Igor M. Liplianin wrote:
>>>>         
>>>>> On 18 февраля 2010, liplianin@me.by wrote:
>>>>>           
>>>>>> I also got the unbranded dm1105 card. I tried the four possible i2c
>>>>>> addresses, just i case. Noen worked of course. Then I traced the i2c
>>>>>> pins on the tuner to pins 100 and 101 on the DM1105.
>>>>>> These are GPIO pins, so bit-banging i2c on these pins seems to be the
>>>>>> solution.
>>>>>>
>>>>>> scl = p101 = gpio14
>>>>>> sda = p100 = gpio13
>>>>>>             
>>>>> Here is the patch to test. Use option card=4.
>>>>>     modprobe dm1105 card=4
>>>>>           
> I didn't test patch in real hardware.
> But I can connect GPIO14 and GPIO13 to SCL and SDA in any dm1105 card and test whether it works.
> Then I will ask you to test also.
>
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 9.0.733 / Virus Database: 271.1.1/2708 - Release Date: 02/24/10 20:34:00
>
>   

Think I solved it.
The dm1105_getsda and dm1105_getscl functions need to mask out the other 
GPIO bits.
I hacked the code to return 1 if corresponding GPIO set, and 0 if not 
set. That did the trick. Now the frontend registers and /dev/dvb is 
populated. :)
Haven't done any tuning yet.

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-23 17:40         ` Igor M. Liplianin
  2010-02-23 19:40           ` Nameer Kazzaz
@ 2010-03-02 13:06           ` Hendrik Skarpeid
  2010-03-02 19:09           ` Hendrik Skarpeid
  2 siblings, 0 replies; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-03-02 13:06 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: Nameer Kazzaz, linux-media

Igor M. Liplianin skrev:
> On 23 февраля 2010 15:12:05 Nameer Kazzaz wrote:
>   
>> Sounds cool, let me know if I can help you with anything.
>>
>> Thanks
>> Nameer
>>
>> Hendrik Skarpeid wrote:
>>     
>>> No luck here either, still working on it.
>>> My plan is to solder som wires on strategic points on the board and
>>> debug i2c and other activity with an oscilloscope. Will probably start
>>> next week.
>>>
>>> Nameer Kazzaz wrote:
>>>       
>>>> Hey Igor,
>>>> I'm getting the same error:
>>>> dm1105 0000:04:0b.0: could not attach frontend
>>>>
>>>> Did you get your one to work.
>>>>
>>>> Thanks
>>>> Nameer
>>>>
>>>> Igor M. Liplianin wrote:
>>>>         
>>>>> On 18 февраля 2010, liplianin@me.by wrote:
>>>>>           
>>>>>> I also got the unbranded dm1105 card. I tried the four possible i2c
>>>>>> addresses, just i case. Noen worked of course. Then I traced the i2c
>>>>>> pins on the tuner to pins 100 and 101 on the DM1105.
>>>>>> These are GPIO pins, so bit-banging i2c on these pins seems to be the
>>>>>> solution.
>>>>>>
>>>>>> scl = p101 = gpio14
>>>>>> sda = p100 = gpio13
>>>>>>             
>>>>> Here is the patch to test. Use option card=4.
>>>>>     modprobe dm1105 card=4
>>>>>           
> I didn't test patch in real hardware.
> But I can connect GPIO14 and GPIO13 to SCL and SDA in any dm1105 card and test whether it works.
> Then I will ask you to test also.
>
>   
A little progress update.
A modded card with connections made between the dm1105 i2c pins and the 
gpio pins is detected as a dm05 and seems to work, at least with kernel 
2.6.33 and liplianin modules.
This suggests that the i2c bitbanging is not working properly.



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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-23 17:40         ` Igor M. Liplianin
@ 2010-02-23 19:40           ` Nameer Kazzaz
  2010-03-02 13:06           ` Hendrik Skarpeid
  2010-03-02 19:09           ` Hendrik Skarpeid
  2 siblings, 0 replies; 51+ messages in thread
From: Nameer Kazzaz @ 2010-02-23 19:40 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: Hendrik Skarpeid, linux-media

Ok, no problem happy to help.

Nameer


Igor M. Liplianin wrote:
> On 23 февраля 2010 15:12:05 Nameer Kazzaz wrote:
>   
>> Sounds cool, let me know if I can help you with anything.
>>
>> Thanks
>> Nameer
>>
>> Hendrik Skarpeid wrote:
>>     
>>> No luck here either, still working on it.
>>> My plan is to solder som wires on strategic points on the board and
>>> debug i2c and other activity with an oscilloscope. Will probably start
>>> next week.
>>>
>>> Nameer Kazzaz wrote:
>>>       
>>>> Hey Igor,
>>>> I'm getting the same error:
>>>> dm1105 0000:04:0b.0: could not attach frontend
>>>>
>>>> Did you get your one to work.
>>>>
>>>> Thanks
>>>> Nameer
>>>>
>>>> Igor M. Liplianin wrote:
>>>>         
>>>>> On 18 февраля 2010, liplianin@me.by wrote:
>>>>>           
>>>>>> I also got the unbranded dm1105 card. I tried the four possible i2c
>>>>>> addresses, just i case. Noen worked of course. Then I traced the i2c
>>>>>> pins on the tuner to pins 100 and 101 on the DM1105.
>>>>>> These are GPIO pins, so bit-banging i2c on these pins seems to be the
>>>>>> solution.
>>>>>>
>>>>>> scl = p101 = gpio14
>>>>>> sda = p100 = gpio13
>>>>>>             
>>>>> Here is the patch to test. Use option card=4.
>>>>>     modprobe dm1105 card=4
>>>>>           
> I didn't test patch in real hardware.
> But I can connect GPIO14 and GPIO13 to SCL and SDA in any dm1105 card and test whether it works.
> Then I will ask you to test also.
>
>   


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-23 13:12       ` Nameer Kazzaz
@ 2010-02-23 17:40         ` Igor M. Liplianin
  2010-02-23 19:40           ` Nameer Kazzaz
                             ` (2 more replies)
  0 siblings, 3 replies; 51+ messages in thread
From: Igor M. Liplianin @ 2010-02-23 17:40 UTC (permalink / raw)
  To: Nameer Kazzaz, Hendrik Skarpeid, linux-media

On 23 февраля 2010 15:12:05 Nameer Kazzaz wrote:
> Sounds cool, let me know if I can help you with anything.
>
> Thanks
> Nameer
>
> Hendrik Skarpeid wrote:
> > No luck here either, still working on it.
> > My plan is to solder som wires on strategic points on the board and
> > debug i2c and other activity with an oscilloscope. Will probably start
> > next week.
> >
> > Nameer Kazzaz wrote:
> >> Hey Igor,
> >> I'm getting the same error:
> >> dm1105 0000:04:0b.0: could not attach frontend
> >>
> >> Did you get your one to work.
> >>
> >> Thanks
> >> Nameer
> >>
> >> Igor M. Liplianin wrote:
> >>> On 18 февраля 2010, liplianin@me.by wrote:
> >>>> I also got the unbranded dm1105 card. I tried the four possible i2c
> >>>> addresses, just i case. Noen worked of course. Then I traced the i2c
> >>>> pins on the tuner to pins 100 and 101 on the DM1105.
> >>>> These are GPIO pins, so bit-banging i2c on these pins seems to be the
> >>>> solution.
> >>>>
> >>>> scl = p101 = gpio14
> >>>> sda = p100 = gpio13
> >>>
> >>> Here is the patch to test. Use option card=4.
> >>>     modprobe dm1105 card=4
I didn't test patch in real hardware.
But I can connect GPIO14 and GPIO13 to SCL and SDA in any dm1105 card and test whether it works.
Then I will ask you to test also.

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-23 12:14     ` Hendrik Skarpeid
@ 2010-02-23 13:12       ` Nameer Kazzaz
  2010-02-23 17:40         ` Igor M. Liplianin
  0 siblings, 1 reply; 51+ messages in thread
From: Nameer Kazzaz @ 2010-02-23 13:12 UTC (permalink / raw)
  To: Hendrik Skarpeid; +Cc: Igor M. Liplianin, linux-media

Sounds cool, let me know if I can help you with anything.

Thanks
Nameer

Hendrik Skarpeid wrote:
> No luck here either, still working on it.
> My plan is to solder som wires on strategic points on the board and 
> debug i2c and other activity with an oscilloscope. Will probably start 
> next week.
>
> Nameer Kazzaz wrote:
>> Hey Igor,
>> I'm getting the same error:
>> dm1105 0000:04:0b.0: could not attach frontend
>>
>> Did you get your one to work.
>>
>> Thanks
>> Nameer
>>
>> Igor M. Liplianin wrote:
>>> On 18 февраля 2010, liplianin@me.by wrote:
>>>  
>>>> I also got the unbranded dm1105 card. I tried the four possible i2c
>>>> addresses, just i case. Noen worked of course. Then I traced the i2c
>>>> pins on the tuner to pins 100 and 101 on the DM1105.
>>>> These are GPIO pins, so bit-banging i2c on these pins seems to be the
>>>> solution.
>>>>
>>>> scl = p101 = gpio14
>>>> sda = p100 = gpio13
>>>>     
>>> Here is the patch to test. Use option card=4.
>>>     modprobe dm1105 card=4
>>>   
>>
>>
>>
>


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-22 20:56   ` Nameer Kazzaz
@ 2010-02-23 12:14     ` Hendrik Skarpeid
  2010-02-23 13:12       ` Nameer Kazzaz
  0 siblings, 1 reply; 51+ messages in thread
From: Hendrik Skarpeid @ 2010-02-23 12:14 UTC (permalink / raw)
  To: Nameer Kazzaz; +Cc: Igor M. Liplianin, linux-media

No luck here either, still working on it.
My plan is to solder som wires on strategic points on the board and 
debug i2c and other activity with an oscilloscope. Will probably start 
next week.

Nameer Kazzaz wrote:
> Hey Igor,
> I'm getting the same error:
> dm1105 0000:04:0b.0: could not attach frontend
>
> Did you get your one to work.
>
> Thanks
> Nameer
>
> Igor M. Liplianin wrote:
>> On 18 февраля 2010, liplianin@me.by wrote:
>>  
>>> I also got the unbranded dm1105 card. I tried the four possible i2c
>>> addresses, just i case. Noen worked of course. Then I traced the i2c
>>> pins on the tuner to pins 100 and 101 on the DM1105.
>>> These are GPIO pins, so bit-banging i2c on these pins seems to be the
>>> solution.
>>>
>>> scl = p101 = gpio14
>>> sda = p100 = gpio13
>>>     
>> Here is the patch to test. Use option card=4.
>>     modprobe dm1105 card=4
>>   
>
>
>


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-02-20 17:49 ` Igor M. Liplianin
@ 2010-02-22 20:56   ` Nameer Kazzaz
  2010-02-23 12:14     ` Hendrik Skarpeid
  0 siblings, 1 reply; 51+ messages in thread
From: Nameer Kazzaz @ 2010-02-22 20:56 UTC (permalink / raw)
  To: Igor M. Liplianin; +Cc: Hendrik Skarpeid, linux-media

Hey Igor,
I'm getting the same error:
dm1105 0000:04:0b.0: could not attach frontend

Did you get your one to work.

Thanks
Nameer

Igor M. Liplianin wrote:
> On 18 февраля 2010, liplianin@me.by wrote:
>   
>> I also got the unbranded dm1105 card. I tried the four possible i2c
>> addresses, just i case. Noen worked of course. Then I traced the i2c
>> pins on the tuner to pins 100 and 101 on the DM1105.
>> These are GPIO pins, so bit-banging i2c on these pins seems to be the
>> solution.
>>
>> scl = p101 = gpio14
>> sda = p100 = gpio13
>>     
> Here is the patch to test. Use option card=4.
> 	modprobe dm1105 card=4
>   


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

* Re: DM1105: could not attach frontend 195d:1105
       [not found] <4B7D83B2.4030709@online.no>
@ 2010-02-20 17:49 ` Igor M. Liplianin
  2010-02-22 20:56   ` Nameer Kazzaz
  0 siblings, 1 reply; 51+ messages in thread
From: Igor M. Liplianin @ 2010-02-20 17:49 UTC (permalink / raw)
  To: Hendrik Skarpeid, linux-media

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

On 18 февраля 2010, liplianin@me.by wrote:
> I also got the unbranded dm1105 card. I tried the four possible i2c
> addresses, just i case. Noen worked of course. Then I traced the i2c
> pins on the tuner to pins 100 and 101 on the DM1105.
> These are GPIO pins, so bit-banging i2c on these pins seems to be the
> solution.
>
> scl = p101 = gpio14
> sda = p100 = gpio13
Here is the patch to test. Use option card=4.
	modprobe dm1105 card=4
-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

[-- Attachment #2: dm1105.c.diff --]
[-- Type: text/x-patch, Size: 7946 bytes --]

--- a/linux/drivers/media/dvb/dm1105/dm1105.c	Sun Feb 07 16:26:33 2010 +0200
+++ b/linux/drivers/media/dvb/dm1105/dm1105.c	Sat Feb 20 16:35:08 2010 +0200
@@ -20,6 +20,7 @@
  */
 
 #include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -47,11 +48,12 @@
 
 #define UNSET (-1U)
 
-#define DM1105_BOARD_NOAUTO		UNSET
-#define DM1105_BOARD_UNKNOWN		0
-#define DM1105_BOARD_DVBWORLD_2002	1
-#define DM1105_BOARD_DVBWORLD_2004	2
-#define DM1105_BOARD_AXESS_DM05		3
+#define DM1105_BOARD_NOAUTO			UNSET
+#define DM1105_BOARD_UNKNOWN			0
+#define DM1105_BOARD_DVBWORLD_2002		1
+#define DM1105_BOARD_DVBWORLD_2004		2
+#define DM1105_BOARD_AXESS_DM05			3
+#define DM1105_BOARD_UNBRANDED_I2C_ON_GPIO	4
 
 /* ----------------------------------------------- */
 /*
@@ -155,23 +157,27 @@
 #define DM1105_MAX				0x04
 
 #define DRIVER_NAME				"dm1105"
+#define DM1105_I2C_GPIO_NAME			"dm1105-gpio"
 
 #define DM1105_DMA_PACKETS			47
 #define DM1105_DMA_PACKET_LENGTH		(128*4)
 #define DM1105_DMA_BYTES			(128 * 4 * DM1105_DMA_PACKETS)
 
 /* GPIO's for LNB power control */
-#define DM1105_LNB_MASK				0x00000000
+#define DM1105_LNB_MASK				0x00006000
 #define DM1105_LNB_OFF				0x00020000
 #define DM1105_LNB_13V				0x00010100
 #define DM1105_LNB_18V				0x00000100
 
 /* GPIO's for LNB power control for Axess DM05 */
-#define DM05_LNB_MASK				0x00000000
+#define DM05_LNB_MASK				0x00006000
 #define DM05_LNB_OFF				0x00020000/* actually 13v */
 #define DM05_LNB_13V				0x00020000
 #define DM05_LNB_18V				0x00030000
 
+#define GPIO13					(1 << 13)
+#define GPIO14					(1 << 14)
+
 static unsigned int card[]  = {[0 ... 3] = UNSET };
 module_param_array(card,  int, NULL, 0444);
 MODULE_PARM_DESC(card, "card type");
@@ -185,7 +191,9 @@
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
 struct dm1105_board {
-	char                    *name;
+	char		*name;
+	int		i2c_on_gpio;
+	u32		gpio_scl, gpio_sda;
 };
 
 struct dm1105_subid {
@@ -207,6 +215,12 @@
 	[DM1105_BOARD_AXESS_DM05] = {
 		.name		= "Axess/EasyTv DM05",
 	},
+	[DM1105_BOARD_UNBRANDED_I2C_ON_GPIO] = {
+		.name		= "Unbranded DM1105 with i2c on GPIOs",
+		.i2c_on_gpio	= 1,
+		.gpio_scl	= GPIO14,
+		.gpio_sda	= GPIO13,
+	},
 };
 
 static const struct dm1105_subid dm1105_subids[] = {
@@ -292,6 +306,8 @@
 
 	/* i2c */
 	struct i2c_adapter i2c_adap;
+	struct i2c_adapter i2c_bb_adap;
+	struct i2c_algo_bit_data i2c_bit;
 
 	/* irq */
 	struct work_struct work;
@@ -327,6 +343,97 @@
 #define dm_setl(reg, bit)	dm_andorl((reg), (bit), (bit))
 #define dm_clearl(reg, bit)	dm_andorl((reg), (bit), 0)
 
+/* The chip has 18 GPIOs. In HOST mode GPIO's used as 15 bit address lines,
+ so we can use only 3 GPIO's from GPIO15 to GPIO17.
+ Here I don't check whether HOST is enebled as it is not implemented yet.
+ */
+void dm1105_gpio_set(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_setl(DM1105_GPIOVAL, mask & 0x0003ffff);
+
+}
+
+void dm1105_gpio_clear(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		dm_clearl(DM1105_GPIOVAL, mask & 0x0003ffff);
+
+}
+
+u32 dm1105_gpio_get(struct dm1105_dev *dev, u32 mask)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if (mask & 0x0003ffff)
+		return dm_readl(DM1105_GPIOVAL);
+
+	return 0;
+}
+
+void dm1105_gpio_enable(struct dm1105_dev *dev, u32 mask, int asoutput)
+{
+	if (mask & 0xfffc0000)
+		printk(KERN_ERR "%s: Only 18 GPIO's are allowed\n", __func__);
+
+	if ((mask & 0x0003ffff) && asoutput)
+		dm_clearl(DM1105_GPIOCTR, mask & 0x0003ffff);
+	else if ((mask & 0x0003ffff) && !asoutput)
+		dm_setl(DM1105_GPIOCTR, mask & 0x0003ffff);
+
+}
+
+static void dm1105_setline(struct dm1105_dev *dev, u32 line, int state)
+{
+	if (state)
+		dm1105_gpio_enable(dev, line, 0);
+	else {
+		dm1105_gpio_enable(dev, line, 1);
+		dm1105_gpio_clear(dev, line);
+	}
+}
+
+static void dm1105_setsda(void *data, int state)
+{
+	struct dm1105_dev *dev = data;
+
+	dm1105_setline(dev, dm1105_boards[dev->boardnr].gpio_sda, state);
+}
+
+static void dm1105_setscl(void *data, int state)
+{
+	struct dm1105_dev *dev = data;
+
+	dm1105_setline(dev, dm1105_boards[dev->boardnr].gpio_scl, state);
+}
+
+static int dm1105_getsda(void *data)
+{
+	struct dm1105_dev *dev = data;
+
+	return dm1105_gpio_get(dev, dm1105_boards[dev->boardnr].gpio_sda);
+}
+
+static int dm1105_getscl(void *data)
+{
+	struct dm1105_dev *dev = data;
+
+	return dm1105_gpio_get(dev, dm1105_boards[dev->boardnr].gpio_scl);
+}
+
+//static int dm1105_i2c_bb_xfer(struct i2c_adapter *i2c_adap,
+//			    struct i2c_msg *msgs, int num)
+//{
+//	return num;
+//}
+
 static int dm1105_i2c_xfer(struct i2c_adapter *i2c_adap,
 			    struct i2c_msg *msgs, int num)
 {
@@ -425,6 +532,14 @@
 #endif
 };
 
+//static struct i2c_algorithm dm1105_bb_algo = {
+//	.master_xfer   = dm1105_i2c_bb_xfer,
+//	.functionality = functionality,
+//#ifdef NEED_ALGO_CONTROL
+//	.algo_control = dummy_algo_control,
+//#endif
+//};
+
 static inline struct dm1105_dev *feed_to_dm1105_dev(struct dvb_demux_feed *feed)
 {
 	return container_of(feed->demux, struct dm1105_dev, demux);
@@ -742,6 +857,33 @@
 	int ret;
 
 	switch (dev->boardnr) {
+	case DM1105_BOARD_UNBRANDED_I2C_ON_GPIO:
+		dev->fe = dvb_attach(
+			stv0299_attach, &sharp_z0194a_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe) {
+			dev->fe->ops.set_voltage = dm1105_set_voltage;
+			dvb_attach(dvb_pll_attach, dev->fe, 0x60,
+					&dev->i2c_bb_adap, DVB_PLL_OPERA1);
+			break;
+		}
+
+		dev->fe = dvb_attach(
+			stv0288_attach, &earda_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe) {
+			dev->fe->ops.set_voltage = dm1105_set_voltage;
+			dvb_attach(stb6000_attach, dev->fe, 0x61,
+					&dev->i2c_bb_adap);
+			break;
+		}
+
+		dev->fe = dvb_attach(
+			si21xx_attach, &serit_config,
+			&dev->i2c_bb_adap);
+		if (dev->fe)
+			dev->fe->ops.set_voltage = dm1105_set_voltage;
+		break;
 	case DM1105_BOARD_DVBWORLD_2004:
 		dev->fe = dvb_attach(
 			cx24116_attach, &serit_sp2633_config,
@@ -904,12 +1046,48 @@
 
 	if (ret < 0)
 		goto err_dm1105_hw_exit;
+#if 0
+	/* second i2c for GPIO connected devices */
+	i2c_set_adapdata(&dev->i2c_bb_adap, dev);
+	strcpy(dev->i2c_bb_adap.name, DM1105_I2C_GPIO_NAME);
+	dev->i2c_bb_adap.owner = THIS_MODULE;
+	dev->i2c_bb_adap.class = I2C_CLASS_TV_DIGITAL;
+	dev->i2c_bb_adap.dev.parent = &pdev->dev;
+	dev->i2c_bb_adap.algo = &dm1105_bb_algo;
+	dev->i2c_bb_adap.algo_data = dev;
+	ret = i2c_add_adapter(&dev->i2c_bb_adap);
 
+	if (ret < 0)
+		goto err_i2c_del_adapter;
+#else
+	/* i2c */
+	i2c_set_adapdata(&dev->i2c_adap, dev);
+	strcpy(dev->i2c_bb_adap.name, DM1105_I2C_GPIO_NAME);
+	dev->i2c_bb_adap.owner = THIS_MODULE;
+	dev->i2c_bb_adap.class = I2C_CLASS_TV_DIGITAL;
+	dev->i2c_bb_adap.dev.parent = &pdev->dev;
+	dev->i2c_bb_adap.algo_data = &dev->i2c_bit;
+	dev->i2c_bit.data = dev;
+	dev->i2c_bit.setsda = dm1105_setsda;
+	dev->i2c_bit.setscl = dm1105_setscl;
+	dev->i2c_bit.getsda = dm1105_getsda;
+	dev->i2c_bit.getscl = dm1105_getscl;
+	dev->i2c_bit.udelay = 10;
+	dev->i2c_bit.timeout = 10;
+
+	/* Raise SCL and SDA */
+	dm1105_setsda(dev, 1);
+	dm1105_setscl(dev, 1);
+
+	ret = i2c_bit_add_bus(&dev->i2c_bb_adap);
+	if (ret < 0)
+		goto err_i2c_del_adapter;
+#endif
 	/* dvb */
 	ret = dvb_register_adapter(&dev->dvb_adapter, DRIVER_NAME,
 					THIS_MODULE, &pdev->dev, adapter_nr);
 	if (ret < 0)
-		goto err_i2c_del_adapter;
+		goto err_i2c_del_adapters;
 
 	dvb_adapter = &dev->dvb_adapter;
 
@@ -991,6 +1169,8 @@
 	dvb_dmx_release(dvbdemux);
 err_dvb_unregister_adapter:
 	dvb_unregister_adapter(dvb_adapter);
+err_i2c_del_adapters:
+	i2c_del_adapter(&dev->i2c_bb_adap);
 err_i2c_del_adapter:
 	i2c_del_adapter(&dev->i2c_adap);
 err_dm1105_hw_exit:

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

* Re: DM1105: could not attach frontend 195d:1105
@ 2010-01-16 11:55 Igor M. Liplianin
  0 siblings, 0 replies; 51+ messages in thread
From: Igor M. Liplianin @ 2010-01-16 11:55 UTC (permalink / raw)
  To: paul10; +Cc: linux-media

On 16 января 2010, paul10@planar.id.au wrote:
> Sorry for the many e-mails.
>
> I've looked through the code for si21xx.c.  I can't see any obvious reason
> it wouldn't be working.  si21xx_attach calls read_reg, and read_reg is not
> returning a value.  The datasheet for the chip
> (http://www.datasheetarchive.com/datasheet-pdf/016/DSA00286370.html) says
> those registers are correct.
>
> I'm assuming the problem would be the demod_address?  I modified the code
> in dm1105.c to try all options for demod_address between 0x01 and 0x100.
> None of them seemed to work.  The code looked like this:
>                 int demod = 0x01;
>                 while (demod < 0x100) {
>                     serit_config.demod_address = demod;
>                     dm1105dvb->fe = dvb_attach(
>                         si21xx_attach, &serit_config,
>                         &dm1105dvb->i2c_adap);
>                     if (dm1105dvb->fe) {
>                         dm1105dvb->fe->ops.set_voltage =
>                                                 dm1105dvb_set_voltage;
>                         break;
>                     }
>                     printk(KERN_ERR "Try: %x\n", demod);
>                     demod++;
>                 }
>
> The output from dmesg looks something like this (obviously much longer):
> [196838.768110] Try: fb
> [196838.768162] si21xx: si21xx_attach
> [196839.016208] si21xx: si21_readreg: readreg error (reg == 0x01, ret ==
> -1)
> [196839.264255] si21xx: si21_writereg: writereg error (reg == 0x01, data
> == 0x40, ret == -1)
> [196839.716056] si21xx: si21_readreg: readreg error (reg == 0x00, ret ==
> -1)
> [196839.716112] Try: fc
> [196839.716164] si21xx: si21xx_attach
> [196839.964211] si21xx: si21_readreg: readreg error (reg == 0x01, ret ==
> -1)
> [196840.212259] si21xx: si21_writereg: writereg error (reg == 0x01, data
> == 0x40, ret == -1)
> [196840.664056] si21xx: si21_readreg: readreg error (reg == 0x00, ret ==
> -1)
> [196840.664112] Try: fd
> [196840.664164] si21xx: si21xx_attach
> [196840.912211] si21xx: si21_readreg: readreg error (reg == 0x01, ret ==
> -1)
> [196841.160258] si21xx: si21_writereg: writereg error (reg == 0x01, data
> == 0x40, ret == -1)
> [196841.612053] si21xx: si21_readreg: readreg error (reg == 0x00, ret ==
> -1)
> [196841.612111] Try: fe
> [196841.612162] si21xx: si21xx_attach
> [196841.860209] si21xx: si21_readreg: readreg error (reg == 0x01, ret ==
> -1)
> [196842.108256] si21xx: si21_writereg: writereg error (reg == 0x01, data
> == 0x40, ret == -1)
> [196842.560055] si21xx: si21_readreg: readreg error (reg == 0x00, ret ==
> -1)
> [196842.560112] Try: ff
> [196842.560115] dm1105 0000:06:00.0: could not attach frontend
> [196842.560287] dm1105 0000:06:00.0: PCI INT A disabled
>
>
> I'm now out of ideas for what to do next.  In the mean-time, I noticed a
> couple of tidyups in the code for si21xx.c.  They are cosmetic only, patch
> is attached if you happened to be in that module for some other reason:
>
> diff si21xx.c.old si21xx.c
> 99a100,104
>
> > #define VERSION_SI2107                        0x34
> > #define VERSION_SI2108                        0x24
> > #define VERSION_SI2109                        0x14
> > #define VERSION_SI2110                        0x04
>
> 945c950
> <       id = si21_readreg(state, 0x00);
> ---
>
> >       id = si21_readreg(state, REVISION_REG);
>
> 947c952
> <       /* register 0x00 contains:
> ---
>
> >       /* register REVISION_REG contains:
>
> 953c958
> <       if (id != 0x04 && id != 0x14)
> ---
>
> >       if (id != VERSION_SI2110 && id != VERSION_SI2109)
>
> 954a960
>
> >                 /* only 2110 and 2109 are currently supported */
>
> Thanks again for your help,
>
> Paul

Accordingly datasheet possible demod addresses are 0x68, 0x69, 0x6a, 0x6b only.
Possibly there is some DM1105 GPIO drives reset for demod.
I assume it is last (26, top right if you look from card elements side) pin on tuner.
You can visually trace way from can tuner. Or use multimeter.

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-15 23:14 paul10
  2010-01-15 23:54 ` Igor M. Liplianin
@ 2010-01-16  0:10 ` Igor M. Liplianin
  1 sibling, 0 replies; 51+ messages in thread
From: Igor M. Liplianin @ 2010-01-16  0:10 UTC (permalink / raw)
  To: paul10, linux-media

On 16 января 2010 01:14:49 paul10@planar.id.au wrote:
> On 15 января 2010 11:15:26 paul10@planar.id.au wrote:
> > I bought a DVB-S card to attach to my mythtv setup.  I knew it was
>
> perhaps
>
> > not going to work, and I only spent $15 on it.  However, based on the
>
> info
>
> > the guy on eBay provided, it had a pci address of 195d:1105, which I
>
> could
>
> > see some people had cards that were working.
> >
> > The card itself is a no-name jobby.  I can see the DM1105 chip on it, I
> > can't see any other chips with any significant pin count (lots with 3 -
>
> 8
>
> > pins, but nothing with enough to be important).  There is a metal case
> > around the connectors that might be hiding a frontend chip of some sort,
> > but it doesn't seem to have enough connectors in and out to be doing
>
> much
>
> > that is important beyond just providing connectivity to the LNB.
>
> Igor wrote:
> > Hi Paul,
> >
> > Frontend/tuner must lay under cover.
> > Subsystem: Device 195d:1105 indicates that there is no EEPROM in card.
> > If you send some links/pictures/photos then it would helped a lot.
> > Is there a disk with drivers for Windows?
> > Also I know about dm1105 based cards with tda10086 demod, those are not
>
> supported in the driver
> yet.
>
> > BR
> > Igor
>
> Igor,
>
> Photos:
> 1.  Front of card.  You can see the DM1105 in the foreground.  There are
> no other significant looking chips on the card.
> http://planar.id.au/Photos/img_1964.jpg
>
> 2.  Back of card - as you can see, there aren't a lot of places where a
> lot of pins are connecting - mainly the DM1105 itself
> http://planar.id.au/Photos/img_1965.jpg
>
> 3.  With the top metal plate removed, and with the other end of the card
> in better focus.
> http://planar.id.au/Photos/img_1966.jpg
>
> Is it likely that there is a tuner under the card labelled "ERIT"?  To
> take it off I have to unsolder some stuff - I can do that, but I reckon
> it's only 50% chance the card will work again when I put it back together -
> my soldering isn't so good.
>
> Thanks heaps for the assistance.
>
> Paul

Example of decipher :)

SP2636SVb

Company Name
Model Number
Size Input Option
Demodulator Chip
Chip Solution
Chassis Type
Remark

Serit
Platform

1: DVB-S
2: DVB-S2

0 : 10cc
4 : 14cc
5 : 16cc
6 : 16cc

0 : Without Loop Thru
1 :
2 :
3 : Loop Thru
 
0 : Half NIM
1 : WJCE6313
2 : STV0288
3 : CX24116
4 : Si2109
5 : CX24123
6 : STV0903

C : Conaxent
L : Silabs
M : Montage
N : Half NIM
S : ST Micro.
Z : Intel

V : Vertical
H : Horizontal

b : Pb Fre
-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-15 23:14 paul10
@ 2010-01-15 23:54 ` Igor M. Liplianin
  2010-01-16  0:10 ` Igor M. Liplianin
  1 sibling, 0 replies; 51+ messages in thread
From: Igor M. Liplianin @ 2010-01-15 23:54 UTC (permalink / raw)
  To: paul10, linux-media

On 16 января 2010 01:14:49 paul10@planar.id.au wrote:
> On 15 января 2010 11:15:26 paul10@planar.id.au wrote:
> > I bought a DVB-S card to attach to my mythtv setup.  I knew it was
>
> perhaps
>
> > not going to work, and I only spent $15 on it.  However, based on the
>
> info
>
> > the guy on eBay provided, it had a pci address of 195d:1105, which I
>
> could
>
> > see some people had cards that were working.
> >
> > The card itself is a no-name jobby.  I can see the DM1105 chip on it, I
> > can't see any other chips with any significant pin count (lots with 3 -
>
> 8
>
> > pins, but nothing with enough to be important).  There is a metal case
> > around the connectors that might be hiding a frontend chip of some sort,
> > but it doesn't seem to have enough connectors in and out to be doing
>
> much
>
> > that is important beyond just providing connectivity to the LNB.
>
> Igor wrote:
> > Hi Paul,
> >
> > Frontend/tuner must lay under cover.
> > Subsystem: Device 195d:1105 indicates that there is no EEPROM in card.
> > If you send some links/pictures/photos then it would helped a lot.
> > Is there a disk with drivers for Windows?
> > Also I know about dm1105 based cards with tda10086 demod, those are not
>
> supported in the driver
> yet.
>
> > BR
> > Igor
>
> Igor,
>
> Photos:
> 1.  Front of card.  You can see the DM1105 in the foreground.  There are
> no other significant looking chips on the card.
> http://planar.id.au/Photos/img_1964.jpg
>
> 2.  Back of card - as you can see, there aren't a lot of places where a
> lot of pins are connecting - mainly the DM1105 itself
> http://planar.id.au/Photos/img_1965.jpg
>
> 3.  With the top metal plate removed, and with the other end of the card
> in better focus.
> http://planar.id.au/Photos/img_1966.jpg
>
> Is it likely that there is a tuner under the card labelled "ERIT"?  To
> take it off I have to unsolder some stuff - I can do that, but I reckon
> it's only 50% chance the card will work again when I put it back together -
> my soldering isn't so good.
No need to unsolder. I see a Serit can tuner. There is a sticked paper with a label on right side 
of the tuner. It must contain something like "sp2636lhb" or "sp2633chb". Please provide me text of 
label.


>
> Thanks heaps for the assistance.
>
> Paul

-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* Re: DM1105: could not attach frontend 195d:1105
@ 2010-01-15 23:14 paul10
  2010-01-15 23:54 ` Igor M. Liplianin
  2010-01-16  0:10 ` Igor M. Liplianin
  0 siblings, 2 replies; 51+ messages in thread
From: paul10 @ 2010-01-15 23:14 UTC (permalink / raw)
  To: linux-media, Igor M. Liplianin

On 15 января 2010 11:15:26 paul10@planar.id.au wrote:
> I bought a DVB-S card to attach to my mythtv setup.  I knew it was
perhaps
> not going to work, and I only spent $15 on it.  However, based on the
info
> the guy on eBay provided, it had a pci address of 195d:1105, which I
could
> see some people had cards that were working.

> The card itself is a no-name jobby.  I can see the DM1105 chip on it, I
> can't see any other chips with any significant pin count (lots with 3 -
8
> pins, but nothing with enough to be important).  There is a metal case
> around the connectors that might be hiding a frontend chip of some sort,
> but it doesn't seem to have enough connectors in and out to be doing
much
> that is important beyond just providing connectivity to the LNB.
>

Igor wrote:
> Hi Paul,

> Frontend/tuner must lay under cover.
> Subsystem: Device 195d:1105 indicates that there is no EEPROM in card.
> If you send some links/pictures/photos then it would helped a lot.
> Is there a disk with drivers for Windows?
> Also I know about dm1105 based cards with tda10086 demod, those are not
supported in the driver 
yet.

> BR
> Igor

Igor,

Photos:
1.  Front of card.  You can see the DM1105 in the foreground.  There are
no other significant looking chips on the card.
http://planar.id.au/Photos/img_1964.jpg

2.  Back of card - as you can see, there aren't a lot of places where a
lot of pins are connecting - mainly the DM1105 itself
http://planar.id.au/Photos/img_1965.jpg

3.  With the top metal plate removed, and with the other end of the card
in better focus.
http://planar.id.au/Photos/img_1966.jpg

Is it likely that there is a tuner under the card labelled "ERIT"?  To
take it off I have to unsolder some stuff - I can do that, but I reckon
it's only 50% chance the card will work again when I put it back together -
my soldering isn't so good.

Thanks heaps for the assistance.

Paul


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

* Re: DM1105: could not attach frontend 195d:1105
  2010-01-15  9:15 paul10
@ 2010-01-15 15:21 ` Igor M. Liplianin
  0 siblings, 0 replies; 51+ messages in thread
From: Igor M. Liplianin @ 2010-01-15 15:21 UTC (permalink / raw)
  To: paul10, linux-media

On 15 января 2010 11:15:26 paul10@planar.id.au wrote:
> I bought a DVB-S card to attach to my mythtv setup.  I knew it was perhaps
> not going to work, and I only spent $15 on it.  However, based on the info
> the guy on eBay provided, it had a pci address of 195d:1105, which I could
> see some people had cards that were working.
>
> The card itself is a no-name jobby.  I can see the DM1105 chip on it, I
> can't see any other chips with any significant pin count (lots with 3 - 8
> pins, but nothing with enough to be important).  There is a metal case
> around the connectors that might be hiding a frontend chip of some sort,
> but it doesn't seem to have enough connectors in and out to be doing much
> that is important beyond just providing connectivity to the LNB.
>
> I've got the latest kernel (2.6.33-rc4) and I've checked the code and it
> looks like the latest DM1105 code.  When booting I get:
>
> [    9.766188] dm1105 0000:06:00.0: PCI INT A -> GSI 20 (level, low) ->
> IRQ 20
> [   10.047331] dm1105 0000:06:00.0: MAC 00:00:00:00:00:00
> [   12.464628] dm1105 0000:06:00.0: could not attach frontend
> [   12.479830] dm1105 0000:06:00.0: PCI INT A disabled
>
> With lspci -vv I get:
> 06:00.0 Ethernet controller: Device 195d:1105 (rev 10)
>         Subsystem: Device 195d:1105
>         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
> ParErr- Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Interrupt: pin A routed to IRQ 20
>         Region 0: I/O ports at b000 [size=256]
>
> No DVB devices are created.
>
> I see from other people using a card with this chipset that there probably
> would be a tuner/frontend as well as the DM1105. I've also tried card=5 in
> the insmod parameters.
>
> It seems to me that the card probably has a tuner/frontend on id different
> from the Axess board, but I'm not sure how I'd work out what that is.  Is
> it possible that it doesn't have any chips on it other than the DM1105?
> Should I take the board apart a bit to find out?
>
> Thanks,
>
> Paul
>
Hi Paul,

Frontend/tuner must lay under cover.
Subsystem: Device 195d:1105 indicates that there is no EEPROM in card.
If you send some links/pictures/photos then it would helped a lot.
Is there a disk with drivers for Windows?
Also I know about dm1105 based cards with tda10086 demod, those are not supported in the driver 
yet.

BR
Igor
-- 
Igor M. Liplianin
Microsoft Windows Free Zone - Linux used for all Computing Tasks

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

* DM1105: could not attach frontend 195d:1105
@ 2010-01-15  9:15 paul10
  2010-01-15 15:21 ` Igor M. Liplianin
  0 siblings, 1 reply; 51+ messages in thread
From: paul10 @ 2010-01-15  9:15 UTC (permalink / raw)
  To: linux-media

I bought a DVB-S card to attach to my mythtv setup.  I knew it was perhaps
not going to work, and I only spent $15 on it.  However, based on the info
the guy on eBay provided, it had a pci address of 195d:1105, which I could
see some people had cards that were working.

The card itself is a no-name jobby.  I can see the DM1105 chip on it, I
can't see any other chips with any significant pin count (lots with 3 - 8
pins, but nothing with enough to be important).  There is a metal case
around the connectors that might be hiding a frontend chip of some sort,
but it doesn't seem to have enough connectors in and out to be doing much
that is important beyond just providing connectivity to the LNB.

I've got the latest kernel (2.6.33-rc4) and I've checked the code and it
looks like the latest DM1105 code.  When booting I get:

[    9.766188] dm1105 0000:06:00.0: PCI INT A -> GSI 20 (level, low) ->
IRQ 20
[   10.047331] dm1105 0000:06:00.0: MAC 00:00:00:00:00:00
[   12.464628] dm1105 0000:06:00.0: could not attach frontend
[   12.479830] dm1105 0000:06:00.0: PCI INT A disabled

With lspci -vv I get:
06:00.0 Ethernet controller: Device 195d:1105 (rev 10)
        Subsystem: Device 195d:1105
        Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin A routed to IRQ 20
        Region 0: I/O ports at b000 [size=256]

No DVB devices are created.

I see from other people using a card with this chipset that there probably
would be a tuner/frontend as well as the DM1105. I've also tried card=5 in
the insmod parameters.

It seems to me that the card probably has a tuner/frontend on id different
from the Axess board, but I'm not sure how I'd work out what that is.  Is
it possible that it doesn't have any chips on it other than the DM1105? 
Should I take the board apart a bit to find out?

Thanks,

Paul


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

end of thread, other threads:[~2011-05-05 19:01 UTC | newest]

Thread overview: 51+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-16  2:49 DM1105: could not attach frontend 195d:1105 paul10
2010-01-16  3:11 ` paul10
2010-01-16 13:18   ` paul10
2010-01-16 14:12     ` Igor M. Liplianin
2010-01-19  8:51     ` paul10
2010-01-19 13:45       ` Igor M. liplianin
2010-01-20 21:20       ` paul10
2010-01-31 13:45         ` Igor M. Liplianin
2010-02-01 12:17           ` Nameer Kazzaz
2010-02-02 15:21             ` Nameer Kazzaz
2010-02-02 16:57               ` Igor M. Liplianin
2010-02-02 17:16                 ` Nameer Kazzaz
2010-02-02 22:07                   ` Nameer Kazzaz
2010-02-03 17:41                     ` Igor M. Liplianin
2010-02-04  9:56                       ` Nameer Kazzaz
  -- strict thread matches above, loose matches on Subject: below --
2011-05-05 18:41 Igor M. Liplianin
2011-05-05 19:01 ` Mauro Carvalho Chehab
     [not found] <4B7D83B2.4030709@online.no>
2010-02-20 17:49 ` Igor M. Liplianin
2010-02-22 20:56   ` Nameer Kazzaz
2010-02-23 12:14     ` Hendrik Skarpeid
2010-02-23 13:12       ` Nameer Kazzaz
2010-02-23 17:40         ` Igor M. Liplianin
2010-02-23 19:40           ` Nameer Kazzaz
2010-03-02 13:06           ` Hendrik Skarpeid
2010-03-02 19:09           ` Hendrik Skarpeid
2010-03-02 23:10             ` Igor M. Liplianin
2010-03-03  8:38               ` Hendrik Skarpeid
2010-03-03 15:49                 ` Igor M. Liplianin
2010-03-03 16:42                   ` Hendrik Skarpeid
2010-03-03 19:05                     ` Igor M. Liplianin
2010-03-04 21:27                       ` Hendrik Skarpeid
2010-03-04 22:16                       ` Hendrik Skarpeid
2010-03-04 22:46                         ` Hendrik Skarpeid
2010-03-06 11:52                         ` Igor M. Liplianin
2010-03-06 19:18                           ` Hendrik Skarpeid
2010-03-07 10:12                             ` Igor M. Liplianin
2010-03-10 12:15                       ` Hendrik Skarpeid
2010-03-31 10:47                         ` Hendrik Skarpeid
2010-10-23  9:20                         ` Igor M. Liplianin
2011-01-31  9:33                           ` Matt Vickers
2011-01-31 17:55                             ` Igor M. Liplianin
2011-02-01  5:17                               ` Matt Vickers
2011-02-02 18:39                                 ` Igor M. Liplianin
2011-02-02 18:41                                   ` Igor M. Liplianin
2011-05-03 21:33                           ` Mauro Carvalho Chehab
2010-01-16 11:55 Igor M. Liplianin
2010-01-15 23:14 paul10
2010-01-15 23:54 ` Igor M. Liplianin
2010-01-16  0:10 ` Igor M. Liplianin
2010-01-15  9:15 paul10
2010-01-15 15:21 ` Igor M. Liplianin

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.