From patchwork Wed Jun 1 05:07:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Triplett X-Patchwork-Id: 98116 X-Patchwork-Delegate: grant.likely@secretlab.ca Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id A9C01B7525 for ; Wed, 1 Jun 2011 15:23:04 +1000 (EST) X-Greylist: delayed 805 seconds by postgrey-1.34 at bilbo; Wed, 01 Jun 2011 15:22:55 EST Received: from slow3-v.mail.gandi.net (slow3-v.mail.gandi.net [217.70.178.89]) by ozlabs.org (Postfix) with ESMTP id 70EF9B6F7F; Wed, 1 Jun 2011 15:22:54 +1000 (EST) X-WhiteListed: mail was accepted with no delay X-WhiteListed: mail was accepted with no delay X-WhiteListed: mail was accepted with no delay X-WhiteListed: mail was accepted with no delay Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by slow3-v.mail.gandi.net (Postfix) with ESMTP id 014643889C; Wed, 1 Jun 2011 07:07:19 +0200 (CEST) X-Originating-IP: 217.70.178.131 Received: from mfilter11-d.gandi.net (mfilter11-d.gandi.net [217.70.178.131]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 2A585A806E; Wed, 1 Jun 2011 07:07:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at #File managed by puppet, do not edit locally Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter11-d.gandi.net (mfilter11-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id cqJsoYyCrRhz; Wed, 1 Jun 2011 07:07:13 +0200 (CEST) X-Originating-IP: 131.252.248.105 Received: from leaf (host-248-105.pubnet.pdx.edu [131.252.248.105]) (Authenticated sender: josh@joshtriplett.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 28DABA8068; Wed, 1 Jun 2011 07:07:03 +0200 (CEST) Date: Tue, 31 May 2011 22:07:01 -0700 From: Josh Triplett To: linux-kernel@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linuxppc-dev@lists.ozlabs.org Subject: Hooking up SM501 on TQM5200 (MPC5200) board via device tree? Message-ID: <20110601050659.GA7789@leaf> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Jamey Sharp X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org We have a TQM5200 board, which has GPIO lines hooked up to an SM501. I've managed to come up with the following patch to the tqm5200 device tree, which manages to convince the sm501 driver to attach an sm501-fb: However, this doesn't hook up the sm501-gpio bits. Reading the sm501 driver carefully, it looks like it only hooks up sm501-gpio if it has platform_data available which sets some flags and other information. So, if I understand correctly, hooking up sm501-gpio would require adding functionality the driver to get the GPIO information from the device tree in preference to the platform_data, if available, and fall back to the platform_data for existing users? What should the necessary device tree properties look like to replace sm501_initdata? - Josh Triplett --- a/arch/powerpc/boot/dts/tqm5200.dts 2009-11-23 03:13:27.000000000 -0800 +++ b/arch/powerpc/boot/dts/tqm5200.dts 2011-05-31 22:00:28.000580627 -0700 @@ -177,7 +177,8 @@ compatible = "fsl,mpc5200-lpb","simple-bus"; #address-cells = <2>; #size-cells = <1>; - ranges = <0 0 0xfc000000 0x02000000>; + ranges = <0 0 0xfc000000 0x02000000 + 1 0 0xe0000000 0x04000000>; flash@0,0 { compatible = "cfi-flash"; @@ -187,6 +188,13 @@ #size-cells = <1>; #address-cells = <1>; }; + + display@1,0 { + compatible = "smi,sm501"; + reg = <1 0x00000000 0x00800000 + 1 0x03e00000 0x00200000>; + interrupts = <1 1 3>; + }; }; pci@f0000d00 {