public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Nishanth Menon <menon.nishanth@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
Date: Sat, 13 Jun 2009 09:26:42 -0500	[thread overview]
Message-ID: <4A33B722.5000405@gmail.com> (raw)
In-Reply-To: <4A33B4A0.9040608@windriver.com>

looping in beagleboard for comments.

Tom said the following on 06/13/2009 09:16 AM:
> Tom wrote:
>   
>> Menon, Nishanth wrote:
>>     
>>>> -----Original Message-----
>>>> From: Tom [mailto:Tom.Rix at windriver.com]
>>>> Sent: Friday, June 12, 2009 4:57 PM
>>>> To: Jean-Christophe PLAGNIOL-VILLARD
>>>> Cc: u-boot at lists.denx.de; Menon, Nishanth
>>>> Subject: Re: [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button
>>>>
>>>>         
>>>>>> */
>>>>>> void twl4030_power_reset_init(void)
>>>>>> {
>>>>>> -#ifdef CONFIG_OMAP3_ZOOM2
>>>>>> +#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM1)
>>>>>>
>>>>>>             
>>>>> I think it will be better to avoid board specifc code in the driver
>>>>> unless it's the only solution
>>>>>
>>>>>
>>>>>           
>>>> I think this is zoom1 and zoom2 specific.
>>>> I could add this function to each of their board files.
>>>> I was trying to avoid that.
>>>>         
>>>>>> + if (twl4030_i2c_read_u8(TWL4030_CHIP_PM_MASTER, &val,
>>>>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>>>>> + printf("Error:TWL4030: failed to read the power register\n");
>>>>>> + printf("Could not initialize hardware reset\n");
>>>>>> + } else {
>>>>>> + val |= TWL4030_PM_MASTER_SW_EVENTS_STOPON_PWRON;
>>>>>> + if (twl4030_i2c_write_u8(TWL4030_CHIP_PM_MASTER, val,
>>>>>> + TWL4030_PM_MASTER_P1_SW_EVENTS)) {
>>>>>>             
>>> Why is this zoom1 and zoom2 specific? You are playing with PM Master 
>>> registers causing a board reset right? It should in theory work for 
>>> beagleboard also.. am I wrong?
>>>       
>> Half right I think.
>> The beagle, from the schematics, has a 'Reset' - 'S2' switch. This is 
>> tied to them omap's sys_nRespwon and to the t2_nRespwon. I think when 
>> the switch is pressed only the omap gets reset. I could try verifing 
>> this but it would take a while. Looking at 
>> theTWL4030_PM_MASTER_P1_SW_EVENTS using 'i2c md 4b 46' it is clear in 
>> both the factory and the current versions of u-boot.
>>
>> I think that setting this bit in beagle will reset just the twl4030. 
>> Which I think is the right thing to do.
>>
>> I will try removing the #if-defs and see what happens :|
>>     
>
> I have taken a closer look.
> I think the 'Cold Reset' label for switch 2 should be relabeled 'Warm 
> Reset'
> twl4030 registers are persistent on beagle and zoom1 when both the sw 
> reset cmd is given and when the beagle reset or the zoom1 reset (pin 
> hole in back + handy paperclip) is used. The easiest way to test this is 
> to set the sw_events manually using
> inm 4b 46
> then set to
> 40
> Verify with imd 4b 46.
>
> When the hw reset button is used on the zoom1, front face red button, 
> the board resets and this is clear. On beagle you need to cycle power by 
> unplugging / replugging power. Otherwise it does not get reset.
>
> Looking at beagle schematics, the ic SN74LVC2G07 has nRESPWRON as an 
> input. So the resetting of the omap is an or-ing of nRESPWRON and the 
> switch. The switch has no effect on nRESPWRON. If the input & output of 
> ic were reversed, you _may_ get the behaviour of resetting omap with a 
> touch and resetting omap+twl4030 when held for 8+ seconds.
>
> The moral of the story is do not depend on twl4030 to be reset.
>
> For this patch for resetting, the reset logic is generic and should be 
> in the driver layer and not in the board layer.
>
> Tom
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>   

  reply	other threads:[~2009-06-13 14:26 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 12:53 [U-Boot] Zoom hw reset Tom Rix
2009-06-10 12:53 ` [U-Boot] [PATCH 1/4] OMAP3 I2C Fix the sampling clock Tom Rix
2009-06-10 12:53   ` [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030 Tom Rix
2009-06-10 12:53     ` [U-Boot] [PATCH 3/4] ZOOM2 Add power reset button Tom Rix
2009-06-10 12:53       ` [U-Boot] [PATCH 4/4] ZOOM1 " Tom Rix
2009-06-12 21:46         ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-12 21:57           ` Tom
2009-06-12 23:08             ` Menon, Nishanth
2009-06-13  2:28               ` Tom
2009-06-13 14:16                 ` Tom
2009-06-13 14:26                   ` Nishanth Menon [this message]
2009-06-10 14:27       ` [U-Boot] [PATCH 3/4] ZOOM2 " Peter Tyser
2009-06-10 14:43         ` Menon, Nishanth
2009-06-10 15:43           ` Dirk Behme
2009-06-10 16:16             ` Menon, Nishanth
2009-06-10 16:25               ` Peter Tyser
2009-06-10 18:08                 ` Heiko Schocher
2009-06-10 18:27                 ` Menon, Nishanth
2009-06-10 18:21                   ` Heiko Schocher
2009-06-10 18:50                     ` Menon, Nishanth
2009-06-10 20:27                   ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-12 13:02                     ` Tom
2009-06-13 14:27                       ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-10 18:06               ` Heiko Schocher
2009-06-10 18:04             ` Heiko Schocher
2009-06-10 17:56         ` Heiko Schocher
2009-06-10 17:48       ` Heiko Schocher
2009-06-10 14:46     ` [U-Boot] [PATCH 2/4] I2C Add initial support for TWL4030 Menon, Nishanth
2009-06-10 17:59       ` Heiko Schocher
2009-06-10 17:45     ` Heiko Schocher
2009-07-19  9:19     ` Wolfgang Denk
2009-07-19 15:23       ` Heiko Schocher
2009-07-19 17:06         ` Tom
2009-07-20  9:12           ` Heiko Schocher
2009-07-22 21:41             ` Jean-Christophe PLAGNIOL-VILLARD
2009-07-20 15:38           ` Dirk Behme
2009-06-10 14:52   ` [U-Boot] [PATCH 1/4] OMAP3 I2C Fix the sampling clock Menon, Nishanth
2009-06-11  2:43     ` Tom
2009-06-11  4:12       ` Menon, Nishanth
2009-06-11 14:02         ` Tom
2009-06-12 21:44           ` Jean-Christophe PLAGNIOL-VILLARD
2009-06-12 22:06             ` Tom
2009-06-17 22:31             ` [U-Boot] RFC " Tom
2009-06-12 21:41         ` [U-Boot] " Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A33B722.5000405@gmail.com \
    --to=menon.nishanth@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox