Re: <Query> Reg: Adding a gpio initialization sequence in dts is valid or not
From: Leela Krishna Amudala <hidden>
Date: 2012-08-17 10:37:00
Hello,
I think you misinterpreted my question.
Alex,
Your documentation says that power on sequence look like shown below
(step1: enabling regulator, step2: enabling pwm and step3: enabling a
gpio line)
power-on-sequence {
step0 {
regulator = "power";
enable;
};
step1 {
delay = <10000>;
};
step2 {
pwm = "backlight";
enable;
};
But I don't bother about enabling regulator and pwm for my panel.
My panel needs a sequence like
1. Pull up a gpio line
2. Maintain some delay
3. Pull down gpio line
4. Maintain some delay and
5. Pull up a gpio line.
Please find the Image shown in the attachment for better understanding.
So, to get this done I used your code and created a node like below
and it worked for me.
backlight {
compatible = "pwm-backlight";
brightness-levels = <0 16 32 48 64 80 96 112 128 144 160 176
192 208 224 240 255>;
default-brightness-level = <12>;
enable-gpio1 = <&gpx1 5 1 0 0>;
enable-gpio2 = <&gpx3 0 0 0 0>;
power-on-sequence {
gpio@2 {
id = "enable-gpio1";
enable;
post-delay = <20>;
};
gpio@3 {
id = "enable-gpio1";
disable;
post-delay = <20>;
};
gpio@4 {
id = "enable-gpio1";
enable;
post-delay = <20>;
};
gpio@5 {
id = "enable-gpio2";
disable;
post-delay = <20>;
};
};
power-off-sequence {
gpio@0 {
id = "enable-gpio1";
disable;
post-delay = <20>;
};
};
};
I want to know whether this kind of sequence is allowed in DT or not ?
Best Wishes,
Leela Krishna Amudala
On Thu, Aug 9, 2012 at 7:37 AM, Alex Courbot [off-list ref] wrote:On Thu 09 Aug 2012 12:38:09 AM JST, Stephen Warren wrote:quoted
On 08/08/2012 07:30 AM, Rob Herring wrote:quoted
On 08/08/2012 04:52 AM, Leela Krishna Amudala wrote:quoted
Hello All, I came across that to set power to an LCD, few panels require a pull up/pull down operation on single GPIO line and few panels need some gpio line setting sequence with some delay in between....quoted
quoted
Putting the sequence in dts file like below for an LCD which requires gpio sequence lcd-reset-gpio = <&gpx1 5 1 3 0>, (3 - for pull up) <&gpx1 5 1 1 0>, (1 - for pull down) <&gpx1 5 1 3 0>; (3 - for pull up) delay = x; and only one gpio entry in the case of LCD which doesn't require gpio sequence setting lcd-reset-gpio = <&gpx1 5 1 3 0>, (3 - pull up) The 4 arguments in the above handle denotes <[phandle of the gpio controller node] [pin number within the gpio controller] [mux function] [pull up/down] [drive strength]>Mux function, pull-up/down and drive-strength should be handled by the pinctrl subsystem, and associated DT bindings. I suppose the proposal in the "runtime interpreted power sequences" thread could be extended to have an action for activating a particular pinctrl state too.Yup, that would totally make sense. Leela, you might want to try the next revision of my patches (coming today or tomorrow) and see how it can be extended to fit your needs. Alex. ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
Attachments
- gpio_sequence.jpg [image/jpeg] 7302 bytes
- (unnamed) [text/plain] 192 bytes · preview