From patchwork Wed Jul 15 07:01:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hartmann X-Patchwork-Id: 6793531 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1E7DF9F380 for ; Wed, 15 Jul 2015 07:02:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1346020576 for ; Wed, 15 Jul 2015 07:02:09 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id A502E204E0 for ; Wed, 15 Jul 2015 07:02:07 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0DEA92657FF; Wed, 15 Jul 2015 09:02:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NO_DNS_FOR_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 744912657D2; Wed, 15 Jul 2015 09:01:56 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 209D22657DF; Wed, 15 Jul 2015 09:01:56 +0200 (CEST) Received: from mail-qk0-f172.google.com (mail-qk0-f172.google.com [209.85.220.172]) by alsa0.perex.cz (Postfix) with ESMTP id D9D4F2604E4 for ; Wed, 15 Jul 2015 09:01:50 +0200 (CEST) Received: by qkdl129 with SMTP id l129so22287840qkd.0 for ; Wed, 15 Jul 2015 00:01:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MRms60sUghCI1BW9HwBgY20d4bdusCwTPtJS03InDhI=; b=p5Ej7HxDWREVZLixtQk3qwOqrjYFcg3GvknX6kv9ZmRJ46Xg2mLvQcUW8sf1/Zoc1o TMBGYOVASor9YOwuABluNwBFiH5AKaxdV9ETFgg3U1HTKsk0hFP2Qe8D84Go+82J+07N bmj7G8xj3ricBmzh0mVdRr+xqCSlNb5GZ7v9tFq1VmQxWRgzncqxIC0g4v4e2HegjU/h rwdsoHFksJIlkCbrBdPs6lbuFnSrCM0LOdpdvNwN4Lyi8VR5utx25UL7420fuQYbjGWB //UB+SLF6Gr1olr9v6qyQhUtCfGbJuCXCxGo5Jg384niCdKR968R7BkHbYMTwoJSl2Pq QoYw== MIME-Version: 1.0 X-Received: by 10.140.41.134 with SMTP id z6mr5468955qgz.40.1436943709784; Wed, 15 Jul 2015 00:01:49 -0700 (PDT) Received: by 10.96.217.98 with HTTP; Wed, 15 Jul 2015 00:01:49 -0700 (PDT) In-Reply-To: <20150713095359.GM16517@opensource.wolfsonmicro.com> References: <20150625145853.GP14071@sirena.org.uk> <20150625154407.GE6321@opensource.wolfsonmicro.com> <558D3BAA.3080700@linux.intel.com> <20150626115823.GY14071@sirena.org.uk> <20150629094854.GB11162@sirena.org.uk> <20150630103404.GI6321@opensource.wolfsonmicro.com> <20150713095359.GM16517@opensource.wolfsonmicro.com> Date: Wed, 15 Jul 2015 09:01:49 +0200 Message-ID: From: Christian Hartmann To: Charles Keepax Cc: alsa-devel@alsa-project.org, Robert Jarzmik , Pierre-Louis Bossart , Haojian Zhuang , linux-spi@vger.kernel.org, Mark Brown , jarkko.nikula@linux.intel.com, dan.carpenter@oracle.com, mika.westerberg@linux.intel.com, Daniel Mack Subject: Re: [alsa-devel] Fwd: [PATCH 1/1] SPI : spi-pxa2xx : fix spi init of WM510205 codec via ACPI (resend) X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 2015-07-13 11:53 GMT+02:00 Charles Keepax : > On Tue, Jul 07, 2015 at 09:06:25AM +0200, Christian Hartmann wrote: >> 2015-06-30 12:34 GMT+02:00 Charles Keepax : >> > On Tue, Jun 30, 2015 at 09:14:37AM +0200, Christian Hartmann wrote: >> >> Hi, >> >> >> >> >> >> 2015-06-29 11:48 GMT+02:00 Mark Brown : >> >> > On Mon, Jun 29, 2015 at 09:27:17AM +0200, Christian Hartmann wrote: >> >> >> [ 5.927801] spi-WM510205:00 supply DCVDD not found, using dummy regulator >> >> >> [ 5.928958] arizona spi-WM510205:00: Unknown device ID: ffff >> >> >> [ 5.929098] pxa2xx-spi 80860F0E:00: registered child spi-WM510205:00 >> >> > >> >> > The above is saying that SPI I/O to the device isn't working - the >> >> > device ID is not being read back successfully. >> >> >> >> Ok that is the next problem that must be solved. >> >> I have yesterday made a patchset where I have added >> >> the enum type 5, but as you said already, >> >> that was not needed. >> >> All what I see the same: : Unknown device ID: ffff >> >> >> >> So where I have to look now or what can I do to let this device id >> >> register correctly? >> >> I hope the baytrail machine driver is easy peasy to add, but here I >> >> stuck at the moment. >> > >> > As I said in my other emails the next step is to work out what >> > the reset and ldoena gpio's are. You won't be able to read the >> > device ID until you have those setup. Unfortunately, finding the >> > right GPIOs is likely to be a bit of a chore, I will see if I can >> > find anything out from the Windows guys at this end. >> > >> > Also can you check that the arizona-ldo1 regulator is built in I >> > am surprised that is falling back to the dummy regulator. >> > >> > Thanks, >> > Charles >> >> Hi, >> >> I just want to ask, if the windows guys have such infos about the >> gpios in question (reset,ldoena) and of course the irq details. >> >> I am thinking actually to get a second device with Win installed, so >> that I can get more infos which I really need here. >> Anyway I can also provide more infos here (if its not against valid laws :) ) >> But indeeed I can need some hints where to put the pdata structure. >> >> I have some more questions that I want to ask/discuss later on irc - >> if its possible >> >> cheers >> Chris > > Ok so it does indeed seem the information I got from the Windows > team was not fully accurate last time. The IRQ pin, reset line > and LDO enable are actually specified in ACPI. This block here > has them: > > GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone, 0x0000, > "\\_SB.GPO2", 0x00, ResourceConsumer, ,) > { // Pin list > 0x0004 > } > GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly, > "\\_SB.I2C7.PMIC", 0x00, ResourceConsumer, ,) > { // Pin list > 0x0003 > } > GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly, > "\\_SB.GPO1", 0x00, ResourceConsumer, ,) > { // Pin list > 0x0017 > } > > The order here being: > > 1) IRQ > 2) Reset GPIO > 3) LDOENA GPIO > > Thanks, > Charles (email resend to all) Hello, @Charles : thank you. As Charles suggested prior in one of the mails, I have yesterday added this patch belowe and tried it out, but unfortunately I got some new/other errors now while the regulator stuff seems not to be working for the wm5102 device currently commit 305f33d58632f85730e245df08dc7070789f9789 Author: Christian Hartmann Date: Mon Jul 13 13:29:07 2015 +0200 mfd/arizona/pdata.h : added wm5102_pdata with structur of type arizona_pdata Signed-off-by: Christian Hartmann The dmesg I got in an endless loop is seen below and please note: the messages below are most of local added dev_err() to be sure which code path was running here. [ 5858.229428] spi spi-WM510205:00: checking WM510205 with bmp180 [ 5858.229437] spi spi-WM510205:00: checking WM510205 with bmp181 [ 5858.229443] spi spi-WM510205:00: modalias WM510205 in id_table not found, returns NULL [ 5858.229497] arizona spi-WM510205:00: acpi_match_device() first, than via spi_get_device_id(). [ 5858.229504] arizona spi-WM510205:00: matched ACPI ID and data [ 5858.229508] arizona spi-WM510205:00: using 1 as type for arizona audio codec [ 5858.229512] arizona spi-WM510205:00: regmap set to wm5102_spi [ 5858.230063] arizona spi-WM510205:00: spi_irq = -1 [ 5858.230069] arizona spi-WM510205:00: arizona_irq = -1 [ 5858.230073] arizona spi-WM510205:00: arizona_spi_probe done, call and return of arizona_dev_init [ 5858.230339] spi-WM510205:00 supply AVDD not found, using dummy regulator [ 5858.230411] spi-WM510205:00 supply DBVDD1 not found, using dummy regulator [ 5858.230451] arizona spi-WM510205:00: Failed to resolve LDOVDD-supply for LDO1 [ 5858.230458] arizona spi-WM510205:00: Failed to request DCVDD: -517 .... repeating now all the time until reboot/power off / energy=0 Did the patch I added here looks good ? or is there an error that I oversight?? cheers chris diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index 43db4fa..df9153b 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h @@ -181,4 +181,17 @@ struct arizona_pdata { int irq_gpio; }; +/* added for the WM510205 case here + * + */ + +const static struct arizona_pdata wm5102_pdata = { + .reset = 0x03, + .ldoena = 0x17, + .irq_flags = IRQF_TRIGGER_RISING| + IRQF_TRIGGER_FALLING, + .irq_gpio = 0x04, + +}; + #endif