Re: Pinmux bindings proposal

2012-01-13 Thread Shawn Guo
On Fri, Jan 13, 2012 at 12:39:42PM -0800, Stephen Warren wrote: > I thought a bit more about pinmux DT bindings. I came up with something > that I like well enough, and is pretty similar to the binding that Dong > posted recently. I think it'll work for both Tegra's and IMX's needs. > Please take a

[git pull] a couple more device tree changes for v3.3

2012-01-13 Thread Grant Likely
Hi Linus, Here are a couple more device tree changes that I'd really like to get into v3.3. This sorts out driver resource decoding for some ARM platforms using the device tree. Thanks, g. The following changes since commit 2145199c4f0db7c517dd788abec301dc84b91bd0: Merge branch 'drm-fixes' o

Re: [RFC v2 4/9] of: add clock providers

2012-01-13 Thread Shawn Guo
On Fri, Jan 13, 2012 at 08:30:30PM -0800, Turquette, Mike wrote: ... > I had envisioned fixed clocks as being clocks whose rates could never > change; obviously this is mostly useful for root clocks like > oscillators and whatnot. > > There is nothing wrong with using fixed clock for sgtl5000-sys-

Re: [RFC PATCH v3 2/5] pinctrl: add dt binding support for pinmux mappings

2012-01-13 Thread Shawn Guo
On Fri, Jan 13, 2012 at 10:16:36AM -0800, Stephen Warren wrote: ... > For reference, that message is: > > Linusw wrote: > > On Mon, Dec 5, 2011 at 3:43 AM, Dong Aisheng gmail.com> > > wrote: > > > My current plan is to define all (might be frequently) used functoin > > > and groups for the exist

Re: [RFC PATCH v3 2/5] pinctrl: add dt binding support for pinmux mappings

2012-01-13 Thread Shawn Guo
On Fri, Jan 13, 2012 at 10:33:21AM -0800, Stephen Warren wrote: > So of_device_alloc(), which is called by of_platform_populate() for each > device, already parses basic DT content such as reg and interrupts, and > converts them to Linux resources. I'd consider parsing any pinmux properties > and r

[PATCH 4/6] tegra: fdt: Add NAND definitions to fdt

2012-01-13 Thread Simon Glass
Add a flash node to handle the NAND, including memory timings and page / block size information. Signed-off-by: Simon Glass --- board/nvidia/dts/tegra2-seaboard.dts | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/board/nvidia/dts/tegra2-seaboard.dts b/boa

[PATCH 3/6] tegra: fdt: Add NAND controller binding and definitions

2012-01-13 Thread Simon Glass
Add a NAND controller along with a bindings file for review. Signed-off-by: Simon Glass --- arch/arm/dts/tegra20.dtsi |7 ++- doc/device-tree-bindings/nand/nvidia-nand.txt | 68 + 2 files changed, 74 insertions(+), 1 deletions(-) create mode 100

[PATCH 1/6] fdt: Add debugging to fdtdec_get_int/addr()

2012-01-13 Thread Simon Glass
The new debugging shows the value of integers and addresses read from the device tree. Signed-off-by: Simon Glass --- lib/fdtdec.c | 22 -- 1 files changed, 16 insertions(+), 6 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index f08bfca..5d97e2a 100644 --- a/lib/fd

[PATCH v2] of: Support CONFIG_CMDLINE_EXTEND config option

2012-01-13 Thread Doug Anderson
The old logic assumes CMDLINE_FROM_BOOTLOADER vs. CMDLINE_FORCE and ignores CMDLINE_EXTEND. Here's the old logic: - CONFIG_CMDLINE_FORCE=true CONFIG_CMDLINE - dt bootargs=non-empty: dt bootargs - dt bootargs=empty, @data is non-empty string @data is left unchanged - dt bootargs=empty,

Re: [PATCH v2 19/20] tegra: fdt: Add EMC data for Tegra2 Seaboard

2012-01-13 Thread Simon Glass
On Fri, Jan 13, 2012 at 1:35 PM, Simon Glass wrote: > This adds timings for T20 and T25 Seaboards, using the bindings found here: > > http://patchwork.ozlabs.org/patch/132928/ > > We supply both full speed options for normal running, and half speed options > for testing / development. > > Signed-o

[PATCH v2 17/20] fdt: tegra: Add EMC node to device tree

2012-01-13 Thread Simon Glass
Add a definition of the memory controller node according to the bindings here: http://patchwork.ozlabs.org/patch/132928/ Signed-off-by: Simon Glass --- arch/arm/dts/tegra20.dtsi |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/

[PATCH v2 19/20] tegra: fdt: Add EMC data for Tegra2 Seaboard

2012-01-13 Thread Simon Glass
This adds timings for T20 and T25 Seaboards, using the bindings found here: http://patchwork.ozlabs.org/patch/132928/ We supply both full speed options for normal running, and half speed options for testing / development. Signed-off-by: Simon Glass --- board/nvidia/dts/tegra2-seaboard.dts |

[PATCH v2 01/20] fdt: Add function to locate an array in the device tree

2012-01-13 Thread Simon Glass
fdtdec_locate_array() locates an integer array but does not copy it. This saves the caller having to allocated wasted space. Access to array elements should be through the fdt32_to_cpu() macro. Signed-off-by: Simon Glass --- Changes in v2: - Add new fdtdec_locate_array() function include/fdtde

Re: [PATCH] video: s3c-fb: Add device tree support

2012-01-13 Thread Sylwester Nawrocki
On 01/13/2012 10:03 PM, Sylwester Nawrocki wrote: > On 01/09/2012 09:01 PM, Thomas Abraham wrote: >> >> +for (idx = 0; idx< nr_gpios; idx++) { >> +gpio = of_get_gpio(dev->of_node, idx); >> +if (!gpio_is_valid(gpio)) { >> +dev_err(dev, "invalid gpio[

Re: [PATCH 1/2] versatile: sic: add device tree bindings

2012-01-13 Thread Russell King - ARM Linux
On Fri, Jan 13, 2012 at 02:00:41PM -0700, Grant Likely wrote: > Let me look at it a bit. You can leave the initialization loop in > fpga_irq_init() for now. I'm looking at adding a mask field to > irq_domain_add_legacy in addition to the host_data pointer. I also > want to investigate replacing

Re: [PATCH] video: s3c-fb: Add device tree support

2012-01-13 Thread Sylwester Nawrocki
On 01/09/2012 09:01 PM, Thomas Abraham wrote: > > + for (idx = 0; idx< nr_gpios; idx++) { > + gpio = of_get_gpio(dev->of_node, idx); > + if (!gpio_is_valid(gpio)) { > + dev_err(dev, "invalid gpio[%d]: %d\n", idx, gpio); > + return

Re: [PATCH 1/2] versatile: sic: add device tree bindings

2012-01-13 Thread Grant Likely
On Fri, Jan 13, 2012 at 10:35:54AM +, Jamie Iles wrote: > On Thu, Jan 12, 2012 at 07:29:32PM -0700, Grant Likely wrote: > > On Fri, Jan 13, 2012 at 12:44:00AM +, Jamie Iles wrote: > > > @@ -53,6 +59,10 @@ void __init fpga_irq_init(int parent_irq, u32 > > > valid, struct fpga_irq_data *f) >

RE: [PATCH 6/6] gpio: tegra: Parameterize the number of banks

2012-01-13 Thread Stephen Warren
Rob Herring wrote at Thursday, January 05, 2012 10:25 AM: > On 01/04/2012 04:00 PM, Grant Likely wrote: > > On Wed, Jan 4, 2012 at 1:00 PM, Stephen Warren wrote: > >> Rob Herring wrote at Wednesday, January 04, 2012 12:54 PM: > >>> On 01/04/2012 12:39 PM, Stephen Warren wrote: > Tegra20's GPI

Pinmux bindings proposal

2012-01-13 Thread Stephen Warren
I thought a bit more about pinmux DT bindings. I came up with something that I like well enough, and is pretty similar to the binding that Dong posted recently. I think it'll work for both Tegra's and IMX's needs. Please take a look! Note: I've used named constants below just to make this easier t

Re: [RFC v2 PATCH 0/3] dt: device tree bindings and data for EMIF and DDR

2012-01-13 Thread Aneesh V
Hi Olof, On Monday 09 January 2012 11:12 AM, Olof Johansson wrote: Hi, On Sun, Jan 8, 2012 at 9:23 AM, Aneesh V wrote: Hi, On Tuesday 20 December 2011 03:08 PM, Aneesh V wrote: Hi Benoit On Tuesday 20 December 2011 06:10 PM, Cousson, Benoit wrote: Hi Aneesh, In general, is it rea

Re: multiple drivers for same hardware

2012-01-13 Thread Mitch Bradley
On 1/13/2012 8:52 AM, Kumar Gala wrote: We have some scenarios in which we might have 2 different drivers (one in kernel or one user space as an example) and wanted to see how we'd convey in the device tree which driver should "claim" the specific device instance. From glancing at the OF spec

Re: [PATCH 1/2] versatile: sic: add device tree bindings

2012-01-13 Thread Russell King - ARM Linux
On Fri, Jan 13, 2012 at 11:41:51AM -0700, Grant Likely wrote: > On Fri, Jan 13, 2012 at 10:58:34AM +, Jamie Iles wrote: > > On Fri, Jan 13, 2012 at 10:48:42AM +, Russell King - ARM Linux wrote: > > > On Fri, Jan 13, 2012 at 12:44:00AM +, Jamie Iles wrote: > > > > +#ifdef CONFIG_OF > > >

multiple drivers for same hardware

2012-01-13 Thread Kumar Gala
We have some scenarios in which we might have 2 different drivers (one in kernel or one user space as an example) and wanted to see how we'd convey in the device tree which driver should "claim" the specific device instance. >From glancing at the OF specs it seems we could utilize the precedence

Re: [PATCH 1/2] versatile: sic: add device tree bindings

2012-01-13 Thread Grant Likely
On Fri, Jan 13, 2012 at 10:58:34AM +, Jamie Iles wrote: > On Fri, Jan 13, 2012 at 10:48:42AM +, Russell King - ARM Linux wrote: > > On Fri, Jan 13, 2012 at 12:44:00AM +, Jamie Iles wrote: > > > +#ifdef CONFIG_OF > > > +int __init sic_of_init(struct device_node *np, struct device_node >

Re: [PATCH] USB: EHCI: Don't use NO_IRQ in xilinx ehci driver

2012-01-13 Thread Grant Likely
On Fri, Jan 13, 2012 at 12:27:22PM +0100, Michal Simek wrote: > Alan Stern wrote: > >On Thu, 12 Jan 2012, Michal Simek wrote: > > > >>Drivers shouldn't use NO_IRQ. This driver is used > >>by Microblaze and PPC. PPC defines NO_IRQ as 0 > >>and Microblaze has removed it. > >> > >>Signed-off-by: Micha

RE: [RFC PATCH v3 2/5] pinctrl: add dt binding support for pinmux mappings

2012-01-13 Thread Stephen Warren
Dong Aisheng wrote at Friday, January 13, 2012 10:12 AM: > On Thu, Jan 12, 2012 at 4:17 AM, Stephen Warren wrote: > ... > >> To keep consistency as the currently design of pinctrl subsystem and also > >> meet > >> the dt design philosophy, we still do not introduce a pinmux map in dt. > >> Instea

RE: [RFC PATCH v3 2/5] pinctrl: add dt binding support for pinmux mappings

2012-01-13 Thread Stephen Warren
Shawn Guo wrote at Thursday, January 12, 2012 8:46 PM: > On Thu, Jan 12, 2012 at 12:46:52PM -0800, Stephen Warren wrote: > > Shawn Guo wrote at Wednesday, January 11, 2012 8:40 PM: > > > On Wed, Jan 11, 2012 at 10:17:40AM -0800, Stephen Warren wrote: > > ... > > > > So, my position is that: > > > >

Re: [PATCH V6 4/7] cpufreq: add clk-reg cpufreq driver

2012-01-13 Thread Cousson, Benoit
On 1/12/2012 11:52 PM, Kevin Hilman wrote: Richard Zhao writes: [...] Do you have real case to need different voltage/clk? Sure, any system with independently scalable CPUs/clusters. AFAIK, in the ARM SoC world there is a least the MSM8660 that does support that today. Regards, Benoit

Re: [RFC PATCH v3 2/5] pinctrl: add dt binding support for pinmux mappings

2012-01-13 Thread Dong Aisheng
On Thu, Jan 12, 2012 at 4:17 AM, Stephen Warren wrote: ... >> To keep consistency as the currently design of pinctrl subsystem and also >> meet >> the dt design philosophy, we still do not introduce a pinmux map in dt. >> Instead, we choose to scan all the device node with a 'pinmux' phandle to

Re: [U-Boot] [PATCH v2 3/7] tegra: fdt: Add extra I2C bindings for U-Boot

2012-01-13 Thread Simon Glass
Hi Heiko, On Thu, Jan 12, 2012 at 10:31 PM, Heiko Schocher wrote: > Hello Simon, > > Simon Glass wrote: >> Add U-Boot's peripheral clock information to the Tegra20 device tree file. >> >> Signed-off-by: Simon Glass >> --- >> Changes in v2: >> - Adjust definitions to fit new peripheral clock bind

RE: [PATCH v2 4/5] arm/dts: OMAP3: Add interrupt-controller bindings for INTC

2012-01-13 Thread Hiremath, Vaibhav
On Fri, Jan 13, 2012 at 18:31:24, Cousson, Benoit wrote: > On 1/13/2012 1:31 PM, Hiremath, Vaibhav wrote: > > On Fri, Jan 13, 2012 at 16:33:07, Cousson, Benoit wrote: > >> Hi Vaibhav, > >> > >> On 1/13/2012 7:14 AM, Hiremath, Vaibhav wrote: > >>> On Tue, Dec 20, 2011 at 19:09:57, Cousson, Benoit wr

Re: [RFC v2 4/9] of: add clock providers

2012-01-13 Thread Shawn Guo
On Fri, Jan 13, 2012 at 08:05:21AM -0600, Rob Herring wrote: > On 01/13/2012 07:50 AM, Shawn Guo wrote: > > On Mon, Dec 12, 2011 at 03:02:04PM -0700, Grant Likely wrote: > >> +==Clock providers== > >> + > >> +Required properties: > >> +#clock-cells:Number of cells in a clock specifier; typi

Re: [RFC PATCH v3 2/5] pinctrl: add dt binding support for pinmux mappings

2012-01-13 Thread Linus Walleij
On 01/13/2012 02:35 PM, Shawn Guo wrote: My guess is that Linus.W did not get any chance to take the dt case into account with his first design of pinctrl core. But I guess he is open to any reasonable change to pinctrl core for dt adoption. Linus? Any patches welcome. However we cannot *requ

Re: [RFC PATCH v3 2/5] pinctrl: add dt binding support for pinmux mappings

2012-01-13 Thread Shawn Guo
On Fri, Jan 13, 2012 at 02:48:29PM +0100, Linus Walleij wrote: > On 01/13/2012 02:35 PM, Shawn Guo wrote: > >My guess is that Linus.W did not get any chance to take the dt case > >into account with his first design of pinctrl core. But I guess he > >is open to any reasonable change to pinctrl core

Re: [RFC v2 4/9] of: add clock providers

2012-01-13 Thread Rob Herring
On 01/13/2012 07:50 AM, Shawn Guo wrote: > On Mon, Dec 12, 2011 at 03:02:04PM -0700, Grant Likely wrote: >> +==Clock providers== >> + >> +Required properties: >> +#clock-cells: Number of cells in a clock specifier; typically will >> be >> + set to 1 > > Shouldn't it be 0 ty

Re: [RFC v2 4/9] of: add clock providers

2012-01-13 Thread Shawn Guo
On Mon, Dec 12, 2011 at 03:02:04PM -0700, Grant Likely wrote: > +==Clock providers== > + > +Required properties: > +#clock-cells: Number of cells in a clock specifier; typically will > be > +set to 1 Shouldn't it be 0 typically, which means it represents only one clock i

Re: [PATCH V2 REPOST] dtc: Implement -d option to write out a dependency file

2012-01-13 Thread Jon Loeliger
> This will allow callers to rebuild .dtb files when any of the /include/d > .dtsi files are modified, not just the top-level .dts file. > > Signed-off-by: Stephen Warren > Acked-by: David Gibson > --- > v2: Replaced fputs/fputc with fprintf. > v2 repost: Add David's ack. > > This patch is for

Re: [RFC PATCH v3 2/5] pinctrl: add dt binding support for pinmux mappings

2012-01-13 Thread Shawn Guo
On Fri, Jan 13, 2012 at 08:07:35AM +, Dong Aisheng-B29396 wrote: > > > But, one thought on doing this in pinmux_get(). I'd simply implement a > > > Function that read a DT node's pinmux property/node, converted it to a > > > pinmux mapping table, and registered it with the pinctrl core. Then, >

Re: [PATCH v2 4/5] arm/dts: OMAP3: Add interrupt-controller bindings for INTC

2012-01-13 Thread Cousson, Benoit
On 1/13/2012 1:31 PM, Hiremath, Vaibhav wrote: On Fri, Jan 13, 2012 at 16:33:07, Cousson, Benoit wrote: Hi Vaibhav, On 1/13/2012 7:14 AM, Hiremath, Vaibhav wrote: On Tue, Dec 20, 2011 at 19:09:57, Cousson, Benoit wrote: [...] +++ b/arch/arm/boot/dts/omap3.dtsi @@ -54,10 +54,12 @@

Re: [RFC v2 4/9] of: add clock providers

2012-01-13 Thread Shawn Guo
On Wed, Jan 11, 2012 at 09:46:58PM -0700, Grant Likely wrote: ... > >> +Required properties: > >> +- compatible : shall be "fixed-clock". > >> +- #clock-cells : from common clock binding; shall be set to 0. > >> +- clock-frequency : frequency of clock in Hz. May be multiple cells. > >> + > >> +Opti

RE: [PATCH v2 4/5] arm/dts: OMAP3: Add interrupt-controller bindings for INTC

2012-01-13 Thread Hiremath, Vaibhav
On Fri, Jan 13, 2012 at 16:33:07, Cousson, Benoit wrote: > Hi Vaibhav, > > On 1/13/2012 7:14 AM, Hiremath, Vaibhav wrote: > > On Tue, Dec 20, 2011 at 19:09:57, Cousson, Benoit wrote: > > [...] > > >> +++ b/arch/arm/boot/dts/omap3.dtsi > >> @@ -54,10 +54,12 @@ > >>ranges; > >>

Re: [PATCH] USB: EHCI: Don't use NO_IRQ in xilinx ehci driver

2012-01-13 Thread Michal Simek
Alan Stern wrote: On Thu, 12 Jan 2012, Michal Simek wrote: Drivers shouldn't use NO_IRQ. This driver is used by Microblaze and PPC. PPC defines NO_IRQ as 0 and Microblaze has removed it. Signed-off-by: Michal Simek CC: Alan Stern CC: Greg Kroah-Hartman CC: Grant Likely CC: linux-...@vger.k

Re: [PATCH v2 4/5] arm/dts: OMAP3: Add interrupt-controller bindings for INTC

2012-01-13 Thread Cousson, Benoit
Hi Vaibhav, On 1/13/2012 7:14 AM, Hiremath, Vaibhav wrote: On Tue, Dec 20, 2011 at 19:09:57, Cousson, Benoit wrote: [...] +++ b/arch/arm/boot/dts/omap3.dtsi @@ -54,10 +54,12 @@ ranges; ti,hwmods = "l3_main"; - intc: interrupt-controller@1 { -

Re: [PATCH 1/2] versatile: sic: add device tree bindings

2012-01-13 Thread Jamie Iles
On Fri, Jan 13, 2012 at 10:48:42AM +, Russell King - ARM Linux wrote: > On Fri, Jan 13, 2012 at 12:44:00AM +, Jamie Iles wrote: > > +#ifdef CONFIG_OF > > +int __init sic_of_init(struct device_node *np, struct device_node *parent) > > +{ > > + struct fpga_irq_data *sic_data = kzalloc(sizeo

Re: [PATCH 1/2] versatile: sic: add device tree bindings

2012-01-13 Thread Russell King - ARM Linux
On Fri, Jan 13, 2012 at 12:44:00AM +, Jamie Iles wrote: > +#ifdef CONFIG_OF > +int __init sic_of_init(struct device_node *np, struct device_node *parent) > +{ > + struct fpga_irq_data *sic_data = kzalloc(sizeof(*sic_data), GFP_KERNEL); > + int err = -ENOMEM, irq; > + > + if (WARN_ON

Re: [PATCH 1/2] versatile: sic: add device tree bindings

2012-01-13 Thread Jamie Iles
On Thu, Jan 12, 2012 at 07:29:32PM -0700, Grant Likely wrote: > On Fri, Jan 13, 2012 at 12:44:00AM +, Jamie Iles wrote: > > @@ -53,6 +59,10 @@ void __init fpga_irq_init(int parent_irq, u32 > > valid, struct fpga_irq_data *f) > > f->chip.irq_ack = fpga_irq_mask; > > f->chip.irq_mask = f

RE: [RFC PATCH v3 2/5] pinctrl: add dt binding support for pinmux mappings

2012-01-13 Thread Dong Aisheng-B29396
> -Original Message- > From: Shawn Guo [mailto:shawn@linaro.org] > Sent: Friday, January 13, 2012 11:55 AM > To: Stephen Warren > Cc: Dong Aisheng-B29396; Dong Aisheng; linux-ker...@vger.kernel.org; > linus.wall...@stericsson.com; s.ha...@pengutronix.de; rob.herr...@calxeda.com; > linux