From patchwork Tue Oct 26 20:18:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Chemparathy X-Patchwork-Id: 283652 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9QKJ34Y000535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 26 Oct 2010 20:19:24 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1PApz5-00017m-Co; Tue, 26 Oct 2010 20:19:03 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1PApz4-00017a-4I for spi-devel-general@lists.sourceforge.net; Tue, 26 Oct 2010 20:19:02 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of ti.com designates 198.47.26.152 as permitted sender) client-ip=198.47.26.152; envelope-from=cyril@ti.com; helo=comal.ext.ti.com; Received: from comal.ext.ti.com ([198.47.26.152]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1PApz3-00060C-9K for spi-devel-general@lists.sourceforge.net; Tue, 26 Oct 2010 20:19:02 +0000 Received: from dlep35.itg.ti.com ([157.170.170.118]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o9QKIh72019322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 26 Oct 2010 15:18:43 -0500 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id o9QKIgox015248; Tue, 26 Oct 2010 15:18:42 -0500 (CDT) Received: from gtrgwdeb (gtrgwdeb.telogy.design.ti.com [158.218.102.24]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o9QKIff11223; Tue, 26 Oct 2010 15:18:41 -0500 (CDT) Received: by gtrgwdeb (Postfix, from userid 39959) id C09501E2670; Tue, 26 Oct 2010 16:18:40 -0400 (EDT) From: Cyril Chemparathy To: davinci-linux-open-source@linux.davincidsp.com, spi-devel-general@lists.sourceforge.net, broonie@opensource.wolfsonmicro.com, lrg@slimlogic.co.uk, dbrownell@users.sourceforge.net, grant.likely@secretlab.ca, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, rpurdie@rpsys.net Subject: [PATCH v4 07/12] davinci: add tnetv107x evm regulators Date: Tue, 26 Oct 2010 16:18:23 -0400 Message-Id: <1288124308-14999-8-git-send-email-cyril@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1288124308-14999-1-git-send-email-cyril@ti.com> References: <1288124308-14999-1-git-send-email-cyril@ti.com> X-Spam-Score: -1.1 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record 0.4 AWL AWL: From: address is in the auto white-list X-Headers-End: 1PApz3-00060C-9K Cc: Cyril Chemparathy X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 26 Oct 2010 20:19:24 +0000 (UTC) diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c index 924cf06..42ae20f 100644 --- a/arch/arm/mach-davinci/board-tnetv107x-evm.c +++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c @@ -26,6 +26,9 @@ #include #include #include +#include +#include +#include #include #include @@ -257,7 +260,89 @@ static struct tnetv107x_device_info evm_device_info __initconst = { .ssp_config = &ssp_config, }; +static struct regulator_consumer_supply usb_consumers[] = { + REGULATOR_SUPPLY("vbus", "musb_hdrc.1"), +}; + +static struct regulator_consumer_supply lcd_consumers[] = { + REGULATOR_SUPPLY("vlcd", "tps6116x"), +}; + +static struct regulator_init_data regulators[] = { + { + .constraints = { + .name = "DCDC1", + .min_uV = 1000000, + .max_uV = 1000000, + .always_on = 1, + .boot_on = 1, + }, + }, + { + .constraints = { + .name = "DCDC2", + .min_uV = 1800000, + .max_uV = 1800000, + .always_on = 1, + .boot_on = 1, + }, + }, + { + .constraints = { + .name = "DCDC3", + .min_uV = 3300000, + .max_uV = 3300000, + .always_on = 1, + .boot_on = 1, + }, + }, + { + .constraints = { + .name = "LDO1", + .min_uV = 4800000, + .max_uV = 4800000, + .always_on = 1, + .boot_on = 1, + }, + }, + { + .constraints = { + .name = "LDO1", + .min_uV = 3300000, + .max_uV = 3300000, + .always_on = 1, + .boot_on = 1, + }, + }, + { + .num_consumer_supplies = ARRAY_SIZE(usb_consumers), + .consumer_supplies = usb_consumers, + .constraints = { + .name = "USB", + .min_uA = 200000, + .max_uA = 1000000, + .valid_ops_mask = REGULATOR_CHANGE_CURRENT | + REGULATOR_CHANGE_STATUS, + }, + }, + { + .num_consumer_supplies = ARRAY_SIZE(lcd_consumers), + .consumer_supplies = lcd_consumers, + .constraints = { + .name = "LCD", + .valid_ops_mask = REGULATOR_CHANGE_STATUS, + }, + }, +}; + static struct spi_board_info spi_info[] __initconst = { + { + .modalias = "tps6524x", + .bus_num = 1, + .chip_select = 0, + .mode = SPI_MODE_0, + .platform_data = regulators, + }, }; static __init void tnetv107x_evm_board_init(void)