All of lore.kernel.org
 help / color / mirror / Atom feed
* Testing ad9833 with Diolan DLN2 adapter
@ 2019-03-13 19:35 Gaston Gonzalez
  2019-03-14 13:39 ` Alexandru Ardelean
  0 siblings, 1 reply; 7+ messages in thread
From: Gaston Gonzalez @ 2019-03-13 19:35 UTC (permalink / raw)
  To: linux-iio; +Cc: gascoar, linux-spi

Hi,

I am trying to test an ad9833 module like the one in [1] using Diolan DLN2
adapter and the driver ad9834.c

So far I get the DLN2 adapter correctly registered as master device
(below the spi debug output) but the ad9833 driver doesn't even probe.

Below the spi log output and pin connections. I'm using the testing
branch of the iio repo. The ad9834 and dln2 drivers were compiled as
modules.

The question is: should this setup probe or extra steps are needed?

Any help appreciated.

Thanks,

Gaston

Hardware device
---------------

[1] https://www.amazon.com/Alloet-AD9833-Generator-Programmable-Triangle/dp/B07GS1CDXZ/ref=sr_1_1?keywords=ad9833&qid=1550752799&s=gateway&sr=8-1

Kernel tree: IIO, testing branch.

DLN2 - AD983 connections
------------------------

 - SS -> FSY
 - SCK -> CLK
 - MOSI -> DAT
 - GND -> GND
 - VCC_OUT -> VCC

SPI debug output
----------------

[65465.572149] usb 1-1.2: New USB device found, idVendor=a257, idProduct=2013, bcdDevice= 1.00
[65465.572155] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[65465.572158] usb 1-1.2: Product: Diolan DLN2
[65465.572160] usb 1-1.2: Manufacturer: Diolan
[65466.553970] dln2 1-1.2:1.0: Diolan DLN2 serial 33629166
[65466.554925] usbcore: registered new interface driver dln2
[65466.733716] dln2-spi dln2-spi.3.auto: cs_num = 5
[65466.734198] dln2-spi dln2-spi.3.auto: freq_min = 2000, freq_max = 18000000
[65466.734453] dln2-spi dln2-spi.3.auto: bpw_mask = 0xFF80
[65466.735044] dln2-spi dln2-spi.3.auto: registered master spi0

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

* Re: Testing ad9833 with Diolan DLN2 adapter
  2019-03-13 19:35 Testing ad9833 with Diolan DLN2 adapter Gaston Gonzalez
@ 2019-03-14 13:39 ` Alexandru Ardelean
  2019-03-14 13:44   ` Ardelean, Alexandru
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandru Ardelean @ 2019-03-14 13:39 UTC (permalink / raw)
  To: Gaston Gonzalez; +Cc: linux-iio, linux-spi, alexandru.ardelean

On Wed, Mar 13, 2019 at 9:36 PM Gaston Gonzalez <gascoar@gmail.com> wrote:
>
> Hi,
>
> I am trying to test an ad9833 module like the one in [1] using Diolan DLN2
> adapter and the driver ad9834.c
>
> So far I get the DLN2 adapter correctly registered as master device
> (below the spi debug output) but the ad9833 driver doesn't even probe.
>
> Below the spi log output and pin connections. I'm using the testing
> branch of the iio repo. The ad9834 and dln2 drivers were compiled as
> modules.
>
> The question is: should this setup probe or extra steps are needed?

Hey,

I'm assuming you enabled the driver in the kernel ?
How does your device-tree look ?

There is some documentation about this chip/driver:
https://wiki.analog.com/resources/tools-software/linux-drivers/iio-dds/ad9834

The old doc still assumes that the driver is using the old
platform-data mechanism.
It needs a bit of updating, but some info should still be useful.

Thanks
Alex

>
> Any help appreciated.
>
> Thanks,
>
> Gaston
>
> Hardware device
> ---------------
>
> [1] https://www.amazon.com/Alloet-AD9833-Generator-Programmable-Triangle/dp/B07GS1CDXZ/ref=sr_1_1?keywords=ad9833&qid=1550752799&s=gateway&sr=8-1
>
> Kernel tree: IIO, testing branch.
>
> DLN2 - AD983 connections
> ------------------------
>
>  - SS -> FSY
>  - SCK -> CLK
>  - MOSI -> DAT
>  - GND -> GND
>  - VCC_OUT -> VCC
>
> SPI debug output
> ----------------
>
> [65465.572149] usb 1-1.2: New USB device found, idVendor=a257, idProduct=2013, bcdDevice= 1.00
> [65465.572155] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> [65465.572158] usb 1-1.2: Product: Diolan DLN2
> [65465.572160] usb 1-1.2: Manufacturer: Diolan
> [65466.553970] dln2 1-1.2:1.0: Diolan DLN2 serial 33629166
> [65466.554925] usbcore: registered new interface driver dln2
> [65466.733716] dln2-spi dln2-spi.3.auto: cs_num = 5
> [65466.734198] dln2-spi dln2-spi.3.auto: freq_min = 2000, freq_max = 18000000
> [65466.734453] dln2-spi dln2-spi.3.auto: bpw_mask = 0xFF80
> [65466.735044] dln2-spi dln2-spi.3.auto: registered master spi0

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

* Re: Testing ad9833 with Diolan DLN2 adapter
  2019-03-14 13:39 ` Alexandru Ardelean
@ 2019-03-14 13:44   ` Ardelean, Alexandru
  2019-03-14 20:21     ` Gaston Gonzalez
  0 siblings, 1 reply; 7+ messages in thread
From: Ardelean, Alexandru @ 2019-03-14 13:44 UTC (permalink / raw)
  To: ardeleanalex, gascoar; +Cc: linux-spi, linux-iio

On Thu, 2019-03-14 at 15:39 +0200, Alexandru Ardelean wrote:
> [External]
> 
> 
> On Wed, Mar 13, 2019 at 9:36 PM Gaston Gonzalez <gascoar@gmail.com>
> wrote:
> > 
> > Hi,
> > 
> > I am trying to test an ad9833 module like the one in [1] using Diolan
> > DLN2
> > adapter and the driver ad9834.c
> > 
> > So far I get the DLN2 adapter correctly registered as master device
> > (below the spi debug output) but the ad9833 driver doesn't even probe.
> > 
> > Below the spi log output and pin connections. I'm using the testing
> > branch of the iio repo. The ad9834 and dln2 drivers were compiled as
> > modules.
> > 
> > The question is: should this setup probe or extra steps are needed?
> 
> Hey,
> 
> I'm assuming you enabled the driver in the kernel ?
> How does your device-tree look ?
> 
> There is some documentation about this chip/driver:
> 
https://wiki.analog.com/resources/tools-software/linux-drivers/iio-dds/ad9834
> 
> The old doc still assumes that the driver is using the old
> platform-data mechanism.
> It needs a bit of updating, but some info should still be useful.

There's this device-tree overlay example/reference for the Raspberry PI:

https://github.com/analogdevicesinc/linux/commit/7e0b66336ed05dab97c5663f7bc43822c79199dd

A lot of our chips/eval-boards are interface with the PI.

> 
> Thanks
> Alex
> 
> > 
> > Any help appreciated.
> > 
> > Thanks,
> > 
> > Gaston
> > 
> > Hardware device
> > ---------------
> > 
> > [1] 
> > https://www.amazon.com/Alloet-AD9833-Generator-Programmable-Triangle/dp/B07GS1CDXZ/ref=sr_1_1?keywords=ad9833&qid=1550752799&s=gateway&sr=8-1
> > 
> > Kernel tree: IIO, testing branch.
> > 
> > DLN2 - AD983 connections
> > ------------------------
> > 
> >  - SS -> FSY
> >  - SCK -> CLK
> >  - MOSI -> DAT
> >  - GND -> GND
> >  - VCC_OUT -> VCC
> > 
> > SPI debug output
> > ----------------
> > 
> > [65465.572149] usb 1-1.2: New USB device found, idVendor=a257,
> > idProduct=2013, bcdDevice= 1.00
> > [65465.572155] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
> > SerialNumber=0
> > [65465.572158] usb 1-1.2: Product: Diolan DLN2
> > [65465.572160] usb 1-1.2: Manufacturer: Diolan
> > [65466.553970] dln2 1-1.2:1.0: Diolan DLN2 serial 33629166
> > [65466.554925] usbcore: registered new interface driver dln2
> > [65466.733716] dln2-spi dln2-spi.3.auto: cs_num = 5
> > [65466.734198] dln2-spi dln2-spi.3.auto: freq_min = 2000, freq_max =
> > 18000000
> > [65466.734453] dln2-spi dln2-spi.3.auto: bpw_mask = 0xFF80
> > [65466.735044] dln2-spi dln2-spi.3.auto: registered master spi0

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

* Re: Testing ad9833 with Diolan DLN2 adapter
  2019-03-14 13:44   ` Ardelean, Alexandru
@ 2019-03-14 20:21     ` Gaston Gonzalez
  2019-03-15  7:19       ` Ardelean, Alexandru
  0 siblings, 1 reply; 7+ messages in thread
From: Gaston Gonzalez @ 2019-03-14 20:21 UTC (permalink / raw)
  To: Ardelean, Alexandru; +Cc: ardeleanalex, linux-spi, linux-iio

On Thu, Mar 14, 2019 at 01:44:50PM +0000, Ardelean, Alexandru wrote:
> On Thu, 2019-03-14 at 15:39 +0200, Alexandru Ardelean wrote:
> > [External]
> > 
> > 
> > On Wed, Mar 13, 2019 at 9:36 PM Gaston Gonzalez <gascoar@gmail.com>
> > wrote:
> > > 
> > > Hi,
> > > 
> > > I am trying to test an ad9833 module like the one in [1] using Diolan
> > > DLN2
> > > adapter and the driver ad9834.c
> > > 
> > > So far I get the DLN2 adapter correctly registered as master device
> > > (below the spi debug output) but the ad9833 driver doesn't even probe.
> > > 
> > > Below the spi log output and pin connections. I'm using the testing
> > > branch of the iio repo. The ad9834 and dln2 drivers were compiled as
> > > modules.
> > > 
> > > The question is: should this setup probe or extra steps are needed?
> > 
> > Hey,
> > 
> > I'm assuming you enabled the driver in the kernel ?
> > How does your device-tree look ?
> > 
> > There is some documentation about this chip/driver:
> > 
> https://wiki.analog.com/resources/tools-software/linux-drivers/iio-dds/ad9834
> > 
> > The old doc still assumes that the driver is using the old
> > platform-data mechanism.
> > It needs a bit of updating, but some info should still be useful.
> 
> There's this device-tree overlay example/reference for the Raspberry PI:
> 
> https://github.com/analogdevicesinc/linux/commit/7e0b66336ed05dab97c5663f7bc43822c79199dd
> 
> A lot of our chips/eval-boards are interface with the PI.
>

Hi Alexandru,

Thank you for your reply.

Yes, I inserted the driver, but I didn't use any device-tree for this device.

To be completely honest I read the AD9834 Analog wiki page, I thought about
adding the ad9834_platform_data and spi_board_info but then I saw that the
ad9834_platform_data structure was removed in commit 80109c32, so I thought
'I'm missing something...' that's why I asked.

I will try using the files in the Analog tree you pointed to.

Thanks a lot!

Gaston

> > 
> > Thanks
> > Alex
> > 
> > > 
> > > Any help appreciated.
> > > 
> > > Thanks,
> > > 
> > > Gaston
> > > 
> > > Hardware device
> > > ---------------
> > > 
> > > [1] 
> > > https://www.amazon.com/Alloet-AD9833-Generator-Programmable-Triangle/dp/B07GS1CDXZ/ref=sr_1_1?keywords=ad9833&qid=1550752799&s=gateway&sr=8-1
> > > 
> > > Kernel tree: IIO, testing branch.
> > > 
> > > DLN2 - AD983 connections
> > > ------------------------
> > > 
> > >  - SS -> FSY
> > >  - SCK -> CLK
> > >  - MOSI -> DAT
> > >  - GND -> GND
> > >  - VCC_OUT -> VCC
> > > 
> > > SPI debug output
> > > ----------------
> > > 
> > > [65465.572149] usb 1-1.2: New USB device found, idVendor=a257,
> > > idProduct=2013, bcdDevice= 1.00
> > > [65465.572155] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
> > > SerialNumber=0
> > > [65465.572158] usb 1-1.2: Product: Diolan DLN2
> > > [65465.572160] usb 1-1.2: Manufacturer: Diolan
> > > [65466.553970] dln2 1-1.2:1.0: Diolan DLN2 serial 33629166
> > > [65466.554925] usbcore: registered new interface driver dln2
> > > [65466.733716] dln2-spi dln2-spi.3.auto: cs_num = 5
> > > [65466.734198] dln2-spi dln2-spi.3.auto: freq_min = 2000, freq_max =
> > > 18000000
> > > [65466.734453] dln2-spi dln2-spi.3.auto: bpw_mask = 0xFF80
> > > [65466.735044] dln2-spi dln2-spi.3.auto: registered master spi0

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

* Re: Testing ad9833 with Diolan DLN2 adapter
  2019-03-14 20:21     ` Gaston Gonzalez
@ 2019-03-15  7:19       ` Ardelean, Alexandru
  2019-03-15 13:41         ` Gaston Gonzalez
  0 siblings, 1 reply; 7+ messages in thread
From: Ardelean, Alexandru @ 2019-03-15  7:19 UTC (permalink / raw)
  To: gascoar; +Cc: ardeleanalex, linux-spi, linux-iio

On Thu, 2019-03-14 at 17:21 -0300, Gaston Gonzalez wrote:
> [External]
> 
> 
> On Thu, Mar 14, 2019 at 01:44:50PM +0000, Ardelean, Alexandru wrote:
> > On Thu, 2019-03-14 at 15:39 +0200, Alexandru Ardelean wrote:
> > > [External]
> > > 
> > > 
> > > On Wed, Mar 13, 2019 at 9:36 PM Gaston Gonzalez <gascoar@gmail.com>
> > > wrote:
> > > > 
> > > > Hi,
> > > > 
> > > > I am trying to test an ad9833 module like the one in [1] using
> > > > Diolan
> > > > DLN2
> > > > adapter and the driver ad9834.c
> > > > 
> > > > So far I get the DLN2 adapter correctly registered as master device
> > > > (below the spi debug output) but the ad9833 driver doesn't even
> > > > probe.
> > > > 
> > > > Below the spi log output and pin connections. I'm using the testing
> > > > branch of the iio repo. The ad9834 and dln2 drivers were compiled
> > > > as
> > > > modules.
> > > > 
> > > > The question is: should this setup probe or extra steps are needed?
> > > 
> > > Hey,
> > > 
> > > I'm assuming you enabled the driver in the kernel ?
> > > How does your device-tree look ?
> > > 
> > > There is some documentation about this chip/driver:
> > > 
> > 
> > 
https://wiki.analog.com/resources/tools-software/linux-drivers/iio-dds/ad9834
> > > 
> > > The old doc still assumes that the driver is using the old
> > > platform-data mechanism.
> > > It needs a bit of updating, but some info should still be useful.
> > 
> > There's this device-tree overlay example/reference for the Raspberry
> > PI:
> > 
> > 
https://github.com/analogdevicesinc/linux/commit/7e0b66336ed05dab97c5663f7bc43822c79199dd
> > 
> > A lot of our chips/eval-boards are interface with the PI.
> > 
> 
> Hi Alexandru,
> 
> Thank you for your reply.
> 
> Yes, I inserted the driver, but I didn't use any device-tree for this
> device.
> 
> To be completely honest I read the AD9834 Analog wiki page, I thought
> about
> adding the ad9834_platform_data and spi_board_info but then I saw that
> the
> ad9834_platform_data structure was removed in commit 80109c32, so I
> thought
> 'I'm missing something...' that's why I asked.
> 
> I will try using the files in the Analog tree you pointed to.

I updated the wiki page.
If you see issues with it, feel free to point them out.

We keep wanting to do a refresh of the entire wiki, but that's a big effort
right now (given new things we have to do). But, if we do it on-demand
(like this) it also helps us get a feel for what's being used.

Thanks
Alex

> 
> Thanks a lot!
> 
> Gaston
> 
> > > 
> > > Thanks
> > > Alex
> > > 
> > > > 
> > > > Any help appreciated.
> > > > 
> > > > Thanks,
> > > > 
> > > > Gaston
> > > > 
> > > > Hardware device
> > > > ---------------
> > > > 
> > > > [1]
> > > > 
https://www.amazon.com/Alloet-AD9833-Generator-Programmable-Triangle/dp/B07GS1CDXZ/ref=sr_1_1?keywords=ad9833&qid=1550752799&s=gateway&sr=8-1
> > > > 
> > > > Kernel tree: IIO, testing branch.
> > > > 
> > > > DLN2 - AD983 connections
> > > > ------------------------
> > > > 
> > > >  - SS -> FSY
> > > >  - SCK -> CLK
> > > >  - MOSI -> DAT
> > > >  - GND -> GND
> > > >  - VCC_OUT -> VCC
> > > > 
> > > > SPI debug output
> > > > ----------------
> > > > 
> > > > [65465.572149] usb 1-1.2: New USB device found, idVendor=a257,
> > > > idProduct=2013, bcdDevice= 1.00
> > > > [65465.572155] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
> > > > SerialNumber=0
> > > > [65465.572158] usb 1-1.2: Product: Diolan DLN2
> > > > [65465.572160] usb 1-1.2: Manufacturer: Diolan
> > > > [65466.553970] dln2 1-1.2:1.0: Diolan DLN2 serial 33629166
> > > > [65466.554925] usbcore: registered new interface driver dln2
> > > > [65466.733716] dln2-spi dln2-spi.3.auto: cs_num = 5
> > > > [65466.734198] dln2-spi dln2-spi.3.auto: freq_min = 2000, freq_max
> > > > =
> > > > 18000000
> > > > [65466.734453] dln2-spi dln2-spi.3.auto: bpw_mask = 0xFF80
> > > > [65466.735044] dln2-spi dln2-spi.3.auto: registered master spi0

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

* Re: Testing ad9833 with Diolan DLN2 adapter
  2019-03-15  7:19       ` Ardelean, Alexandru
@ 2019-03-15 13:41         ` Gaston Gonzalez
  2019-03-16 16:33           ` Jonathan Cameron
  0 siblings, 1 reply; 7+ messages in thread
From: Gaston Gonzalez @ 2019-03-15 13:41 UTC (permalink / raw)
  To: Ardelean, Alexandru; +Cc: ardeleanalex, linux-spi, linux-iio, gascoar

On Fri, Mar 15, 2019 at 07:19:22AM +0000, Ardelean, Alexandru wrote:
> On Thu, 2019-03-14 at 17:21 -0300, Gaston Gonzalez wrote:
> > [External]
> > 
> > 
> > On Thu, Mar 14, 2019 at 01:44:50PM +0000, Ardelean, Alexandru wrote:
> > > On Thu, 2019-03-14 at 15:39 +0200, Alexandru Ardelean wrote:
> > > > [External]
> > > > 
> > > > 
> > > > On Wed, Mar 13, 2019 at 9:36 PM Gaston Gonzalez <gascoar@gmail.com>
> > > > wrote:
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > I am trying to test an ad9833 module like the one in [1] using
> > > > > Diolan
> > > > > DLN2
> > > > > adapter and the driver ad9834.c
> > > > > 
> > > > > So far I get the DLN2 adapter correctly registered as master device
> > > > > (below the spi debug output) but the ad9833 driver doesn't even
> > > > > probe.
> > > > > 
> > > > > Below the spi log output and pin connections. I'm using the testing
> > > > > branch of the iio repo. The ad9834 and dln2 drivers were compiled
> > > > > as
> > > > > modules.
> > > > > 
> > > > > The question is: should this setup probe or extra steps are needed?
> > > > 
> > > > Hey,
> > > > 
> > > > I'm assuming you enabled the driver in the kernel ?
> > > > How does your device-tree look ?
> > > > 
> > > > There is some documentation about this chip/driver:
> > > > 
> > > 
> > > 
> https://wiki.analog.com/resources/tools-software/linux-drivers/iio-dds/ad9834
> > > > 
> > > > The old doc still assumes that the driver is using the old
> > > > platform-data mechanism.
> > > > It needs a bit of updating, but some info should still be useful.
> > > 
> > > There's this device-tree overlay example/reference for the Raspberry
> > > PI:
> > > 
> > > 
> https://github.com/analogdevicesinc/linux/commit/7e0b66336ed05dab97c5663f7bc43822c79199dd
> > > 
> > > A lot of our chips/eval-boards are interface with the PI.
> > > 
> > 
> > Hi Alexandru,
> > 
> > Thank you for your reply.
> > 
> > Yes, I inserted the driver, but I didn't use any device-tree for this
> > device.
> > 
> > To be completely honest I read the AD9834 Analog wiki page, I thought
> > about
> > adding the ad9834_platform_data and spi_board_info but then I saw that
> > the
> > ad9834_platform_data structure was removed in commit 80109c32, so I
> > thought
> > 'I'm missing something...' that's why I asked.
> > 
> > I will try using the files in the Analog tree you pointed to.
> 
> I updated the wiki page.
> If you see issues with it, feel free to point them out.
> 
> We keep wanting to do a refresh of the entire wiki, but that's a big effort
> right now (given new things we have to do). But, if we do it on-demand
> (like this) it also helps us get a feel for what's being used.
> 
> Thanks
> Alex
> 

That's great.

Thank you, it is really appreciated.

Gaston

> > 
> > Thanks a lot!
> > 
> > Gaston
> > 
> > > > 
> > > > Thanks
> > > > Alex
> > > > 
> > > > > 
> > > > > Any help appreciated.
> > > > > 
> > > > > Thanks,
> > > > > 
> > > > > Gaston
> > > > > 
> > > > > Hardware device
> > > > > ---------------
> > > > > 
> > > > > [1]
> > > > > 
> https://www.amazon.com/Alloet-AD9833-Generator-Programmable-Triangle/dp/B07GS1CDXZ/ref=sr_1_1?keywords=ad9833&qid=1550752799&s=gateway&sr=8-1
> > > > > 
> > > > > Kernel tree: IIO, testing branch.
> > > > > 
> > > > > DLN2 - AD983 connections
> > > > > ------------------------
> > > > > 
> > > > >  - SS -> FSY
> > > > >  - SCK -> CLK
> > > > >  - MOSI -> DAT
> > > > >  - GND -> GND
> > > > >  - VCC_OUT -> VCC
> > > > > 
> > > > > SPI debug output
> > > > > ----------------
> > > > > 
> > > > > [65465.572149] usb 1-1.2: New USB device found, idVendor=a257,
> > > > > idProduct=2013, bcdDevice= 1.00
> > > > > [65465.572155] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
> > > > > SerialNumber=0
> > > > > [65465.572158] usb 1-1.2: Product: Diolan DLN2
> > > > > [65465.572160] usb 1-1.2: Manufacturer: Diolan
> > > > > [65466.553970] dln2 1-1.2:1.0: Diolan DLN2 serial 33629166
> > > > > [65466.554925] usbcore: registered new interface driver dln2
> > > > > [65466.733716] dln2-spi dln2-spi.3.auto: cs_num = 5
> > > > > [65466.734198] dln2-spi dln2-spi.3.auto: freq_min = 2000, freq_max
> > > > > =
> > > > > 18000000
> > > > > [65466.734453] dln2-spi dln2-spi.3.auto: bpw_mask = 0xFF80
> > > > > [65466.735044] dln2-spi dln2-spi.3.auto: registered master spi0

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

* Re: Testing ad9833 with Diolan DLN2 adapter
  2019-03-15 13:41         ` Gaston Gonzalez
@ 2019-03-16 16:33           ` Jonathan Cameron
  0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2019-03-16 16:33 UTC (permalink / raw)
  To: Gaston Gonzalez; +Cc: Ardelean, Alexandru, ardeleanalex, linux-spi, linux-iio

On Fri, 15 Mar 2019 10:41:26 -0300
Gaston Gonzalez <gascoar@gmail.com> wrote:

> On Fri, Mar 15, 2019 at 07:19:22AM +0000, Ardelean, Alexandru wrote:
> > On Thu, 2019-03-14 at 17:21 -0300, Gaston Gonzalez wrote:  
> > > [External]
> > > 
> > > 
> > > On Thu, Mar 14, 2019 at 01:44:50PM +0000, Ardelean, Alexandru wrote:  
> > > > On Thu, 2019-03-14 at 15:39 +0200, Alexandru Ardelean wrote:  
> > > > > [External]
> > > > > 
> > > > > 
> > > > > On Wed, Mar 13, 2019 at 9:36 PM Gaston Gonzalez <gascoar@gmail.com>
> > > > > wrote:  
> > > > > > 
> > > > > > Hi,
> > > > > > 
> > > > > > I am trying to test an ad9833 module like the one in [1] using
> > > > > > Diolan
> > > > > > DLN2
> > > > > > adapter and the driver ad9834.c
> > > > > > 
> > > > > > So far I get the DLN2 adapter correctly registered as master device
> > > > > > (below the spi debug output) but the ad9833 driver doesn't even
> > > > > > probe.
> > > > > > 
> > > > > > Below the spi log output and pin connections. I'm using the testing
> > > > > > branch of the iio repo. The ad9834 and dln2 drivers were compiled
> > > > > > as
> > > > > > modules.
> > > > > > 
> > > > > > The question is: should this setup probe or extra steps are needed?  
> > > > > 
> > > > > Hey,
> > > > > 
> > > > > I'm assuming you enabled the driver in the kernel ?
> > > > > How does your device-tree look ?
> > > > > 
> > > > > There is some documentation about this chip/driver:
> > > > >   
> > > > 
> > > >   
> > https://wiki.analog.com/resources/tools-software/linux-drivers/iio-dds/ad9834  
> > > > > 
> > > > > The old doc still assumes that the driver is using the old
> > > > > platform-data mechanism.
> > > > > It needs a bit of updating, but some info should still be useful.  
> > > > 
> > > > There's this device-tree overlay example/reference for the Raspberry
> > > > PI:
> > > > 
> > > >   
> > https://github.com/analogdevicesinc/linux/commit/7e0b66336ed05dab97c5663f7bc43822c79199dd  
> > > > 
> > > > A lot of our chips/eval-boards are interface with the PI.
> > > >   
> > > 
> > > Hi Alexandru,
> > > 
> > > Thank you for your reply.
> > > 
> > > Yes, I inserted the driver, but I didn't use any device-tree for this
> > > device.
> > > 
> > > To be completely honest I read the AD9834 Analog wiki page, I thought
> > > about
> > > adding the ad9834_platform_data and spi_board_info but then I saw that
> > > the
> > > ad9834_platform_data structure was removed in commit 80109c32, so I
> > > thought
> > > 'I'm missing something...' that's why I asked.
> > > 
> > > I will try using the files in the Analog tree you pointed to.  
> > 
> > I updated the wiki page.
> > If you see issues with it, feel free to point them out.
> > 
> > We keep wanting to do a refresh of the entire wiki, but that's a big effort
> > right now (given new things we have to do). But, if we do it on-demand
> > (like this) it also helps us get a feel for what's being used.
> > 
> > Thanks
> > Alex
> >   
> 
> That's great.
> 
> Thank you, it is really appreciated.
Hi Gaston,

When you have this working please do post the final method and DT
for future reference if anyone finds this thread!

Thanks,

Jonathan

> 
> Gaston
> 
> > > 
> > > Thanks a lot!
> > > 
> > > Gaston
> > >   
> > > > > 
> > > > > Thanks
> > > > > Alex
> > > > >   
> > > > > > 
> > > > > > Any help appreciated.
> > > > > > 
> > > > > > Thanks,
> > > > > > 
> > > > > > Gaston
> > > > > > 
> > > > > > Hardware device
> > > > > > ---------------
> > > > > > 
> > > > > > [1]
> > > > > >   
> > https://www.amazon.com/Alloet-AD9833-Generator-Programmable-Triangle/dp/B07GS1CDXZ/ref=sr_1_1?keywords=ad9833&qid=1550752799&s=gateway&sr=8-1  
> > > > > > 
> > > > > > Kernel tree: IIO, testing branch.
> > > > > > 
> > > > > > DLN2 - AD983 connections
> > > > > > ------------------------
> > > > > > 
> > > > > >  - SS -> FSY
> > > > > >  - SCK -> CLK
> > > > > >  - MOSI -> DAT
> > > > > >  - GND -> GND
> > > > > >  - VCC_OUT -> VCC
> > > > > > 
> > > > > > SPI debug output
> > > > > > ----------------
> > > > > > 
> > > > > > [65465.572149] usb 1-1.2: New USB device found, idVendor=a257,
> > > > > > idProduct=2013, bcdDevice= 1.00
> > > > > > [65465.572155] usb 1-1.2: New USB device strings: Mfr=1, Product=2,
> > > > > > SerialNumber=0
> > > > > > [65465.572158] usb 1-1.2: Product: Diolan DLN2
> > > > > > [65465.572160] usb 1-1.2: Manufacturer: Diolan
> > > > > > [65466.553970] dln2 1-1.2:1.0: Diolan DLN2 serial 33629166
> > > > > > [65466.554925] usbcore: registered new interface driver dln2
> > > > > > [65466.733716] dln2-spi dln2-spi.3.auto: cs_num = 5
> > > > > > [65466.734198] dln2-spi dln2-spi.3.auto: freq_min = 2000, freq_max
> > > > > > =
> > > > > > 18000000
> > > > > > [65466.734453] dln2-spi dln2-spi.3.auto: bpw_mask = 0xFF80
> > > > > > [65466.735044] dln2-spi dln2-spi.3.auto: registered master spi0  


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

end of thread, other threads:[~2019-03-16 16:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-13 19:35 Testing ad9833 with Diolan DLN2 adapter Gaston Gonzalez
2019-03-14 13:39 ` Alexandru Ardelean
2019-03-14 13:44   ` Ardelean, Alexandru
2019-03-14 20:21     ` Gaston Gonzalez
2019-03-15  7:19       ` Ardelean, Alexandru
2019-03-15 13:41         ` Gaston Gonzalez
2019-03-16 16:33           ` Jonathan Cameron

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.