lkml.org 
[lkml]   [2013]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 14/36] mtd: st_spi_fsm: Add device-tree binding documentation
From
On Fri, Nov 29, 2013 at 1:19 PM, Lee Jones <lee.jones@linaro.org> wrote:

Re this:

> +Optional properties:
> + - st,syscfg : Phandle to boot-device system configuration registers
> + - st,boot-device-reg : Address of the aforementioned boot-device register(s)
> + - st,boot-device-spi : Expected boot-device value if booted via this device
> +
> +Example:
> + spifsm: spifsm@fe902000{
> + compatible = "st,spi-fsm";
> + reg = <0xfe902000 0x1000>;
> + reg-names = "spi-fsm";
> + pinctrl-0 = <&pinctrl_fsm>;
> + st,syscfg = <&syscfg_rear>;
> + st,boot-device-reg = <0x958>;
> + st,boot-device-spi = <0x1a>;

I don't think we should encode any register offsets whatsoever in device
tree but maybe that's just me. (Yes, Stephen will beat me up about
pin control single, but I consider that a special case.)

I would just put the last two things as #defines into the driver file(s)
or - if it's related to other syscfg registers and varies with SoC incarnation,
as a #define in a shared header for that syscfg thing.

The syscfg phandle is elegant though, really like that.

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2013-11-29 20:21    [W:0.581 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site