All of lore.kernel.org
 help / color / mirror / Atom feed
* Gpio reset handling
@ 2009-09-15 18:32 Michal Simek
       [not found] ` <4AAFDDD1.9070702-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Michal Simek @ 2009-09-15 18:32 UTC (permalink / raw)
  To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A; +Cc: John Williams

Hi All,

I would like to find out proper way how to handle xilinx reset gpio.
We are using gpio for soft reset.

I read led.txt in Documentation and currently are used/supported some triggers
but reset is not there.

Led gpio is clear because example is in kernel (xpedite5301.dts for example)

Here is description for mixed reset/heartbeat/led gpio
1. line - soft reset
2. line - phy reset for example or any different one
3. line - heartbeat
4. line - led


Not sure if is first line from 1 or 0 - but doesn't matter right now.



		gpio_res: gpio@81400000 {
			compatible = "xlnx,xps-gpio-1.00.a";
			interrupt-parent = <&xps_intc_0>;
			interrupts = < 7 2 >;
			reg = < 0x81400000 0x10000 >;
...
			xlnx,gpio-width = <0x8>;
...
		} ;

gpio-leds {
	compatible = "gpio-leds";
	heartbeat {
		label = "Heartbeat";
		gpios = <&gpio_res 4 1>;
		linux,default-trigger = "heartbeat";
	}

	green {
		label = "Green"
		gpios = <&gpio_res 5 1>;
	}
}

Ok and here about description of reset port
I see two option to write new trigger
1. new reset trigger and add it to gpio-leds node - but this should be in gpio-leds node which make
no sense to me

	reset {
		label = "Heartbeat";
		gpios = <&gpio_res 3 1>;
		linux,default-trigger = "reset";
	}

2. create own reset node

reset {
	compatible = "gpio-reset";
	reset0 {
		label "Soft reset";
		gpios = <&gpio_res 1 1>;
	}

	reset1 {
		label "Phy reset";
		gpios = <&gpio_res 2 1>;
	}
}

For this node there should be better reset description not just label with different description.
I expect that it will be useful soft and hard reset and maybe you can find some others.


Thanks for you help,
Michal



-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-09-17 13:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-15 18:32 Gpio reset handling Michal Simek
     [not found] ` <4AAFDDD1.9070702-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2009-09-15 22:27   ` Grant Likely
     [not found]     ` <fa686aa40909151527r36334528ne1194523f141a8a2-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-15 22:40       ` John Williams
     [not found]         ` <1d3f23370909151540p411f0bc0r1c81b68ceb2fb45e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-15 23:07           ` Grant Likely
     [not found]             ` <fa686aa40909151607u29d4025ay101e89d9eae5f30a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-17  6:46               ` Michal Simek
     [not found]                 ` <4AB1DB2A.6050109-pSz03upnqPeHXe+LvDLADg@public.gmane.org>
2009-09-17 13:42                   ` Grant Likely
     [not found]                     ` <fa686aa40909170642j63ccef7bnf162cb88b9733023-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-17 13:46                       ` Michal Simek
2009-09-16 11:07           ` Martin Donnelly
2009-09-16  0:24       ` David Gibson
     [not found]         ` <20090916002459.GA8891-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-09-17  6:46           ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.