devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dts-binding doc for opencores
@ 2011-01-25  2:37 Thomas Chou
       [not found] ` <4D3E3764.1050603-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Chou @ 2011-01-25  2:37 UTC (permalink / raw)
  To: Jonas Bonn
  Cc: Nios2 development list, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Hi Jonas,

As Grant suggested, we will need to document the dts property for 
opencores drivers. Do you have any suggestion?

linux-2.6/Documentation/powerpc/dts-bindings/opencores.txt

project: tiny SPI controller
core: tiny_spi
driver: spi_oc_tiny
compat: "opencores,tiny-spi-rtlsvn2"
Optional properties:
        - clock-frequency : input clock freq to the core
        - baud-width: baud rate divider width of the core

Best regards,
Thomas

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

* Re: dts-binding doc for opencores
       [not found] ` <4D3E3764.1050603-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>
@ 2011-01-25  9:33   ` Jonas Bonn
  0 siblings, 0 replies; 2+ messages in thread
From: Jonas Bonn @ 2011-01-25  9:33 UTC (permalink / raw)
  To: Thomas Chou
  Cc: Nios2 development list, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

Hi Thomas,

> 
> As Grant suggested, we will need to document the dts property for 
> opencores drivers. Do you have any suggestion?
> 
> linux-2.6/Documentation/powerpc/dts-bindings/opencores.txt
> 
> project: tiny SPI controller
> core: tiny_spi
> driver: spi_oc_tiny
> compat: "opencores,tiny-spi-rtlsvn2"
> Optional properties:
>         - clock-frequency : input clock freq to the core
>         - baud-width: baud rate divider width of the core
> 

Is clock-frequency really optional?

Otherwise, I think this looks pretty good.  I'd add the following
though:

i) a description of the reg parameter, given that the address range of
the device is known:  0x10+ROUND_UP(BAUD_WIDTH/8) (right?)

reg: <BASE 0x10+ROUND_UP(BAUD_WIDTH/8)>

ii) add the 'interrupts' property to the list of optional properties

interrupts: <IRQ NUMBER>

Finally, the name 'baud-width' is a bit strange.  I know what you want
to say with it, but it doesn't feel very intuitive.  Perhaps
'clk-divider-bits'...???  or 'sclk-divider-bits'???

Otherwise, a better description of the baud-width parameter, perhaps:

baud-width:  width, in bits, of the programmable divider used to scale
the input clock to SCLK

Best regards,
Jonas

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

end of thread, other threads:[~2011-01-25  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-25  2:37 dts-binding doc for opencores Thomas Chou
     [not found] ` <4D3E3764.1050603-SDxUXYEhEBiCuPEqFHbRBg@public.gmane.org>
2011-01-25  9:33   ` Jonas Bonn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).