* Panel unable to use atmel,hlcdc-pwm for backlight
@ 2016-09-26 19:35 Peter Rosin
2016-09-26 19:51 ` Boris Brezillon
0 siblings, 1 reply; 4+ messages in thread
From: Peter Rosin @ 2016-09-26 19:35 UTC (permalink / raw)
To: dri-devel, Boris Brezillon
Hi!
I'm trying to attach a simpel-panel to an atmel,sama5d3-hlcdc
controller. See below for the parts of my .dts that I find
relevant.
When I boot with this, I run into a problem. What I think
happens is that the hlcdc probe fails because the panel
probe fails because the backlight probe fails because the
pwm probe fails because the hlcdc probe hasn't completed
yet. I.e. a circular dependency.
I get this in log (twice, with some other stuff in between):
atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to create HLCDC outputs: -517
atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to initialize mode setting
-517 is of course -EPROBE_DEFER
If I comment out the problematic backlight line from the
panel node (and fiddle with the devices that control the
backlight manually in sysfs) I can get things to work. But
that's not very elegant.
Would it be possible to have the hlcdc code somehow "publish"
the hlcdc-pwm before it tries to fire up the output panel?
Assuming my analysis is correct, of course...
Cheers,
Peter
/dts-v1/;
#include "sama5d3.dtsi"
#include "sama5d3_lcd.dtsi"
/ {
panel_reg: panel-regulator {
compatible = "regulator-fixed";
regulator-name = "panel-VCC";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
bl_reg: backlight-regulator {
compatible = "regulator-fixed";
regulator-name = "panel-VDD";
regulator-min-microvolt = <12000000>;
regulator-max-microvolt = <12000000>;
};
/*
* the panel has a backlight that needs 12V, and a pwm
* controls the intensity. A gpio (PD0) is used to enable it.
*/
panel_bl: backlight {
compatible = "pwm-backlight";
pwms = <&hlcdc_pwm 0 1000000 0>;
brightness-levels = <0 20 40 60 80 100>;
default-brightness-level = <2>;
power-supply = <&bl_reg>;
enable-gpios = <&pioD 0 GPIO_ACTIVE_HIGH>;
};
panel: panel {
compatible = "some-simple-panel-with-pwm-backlight";
/* problem */ backlight = <&panel_bl>;
power-supply = <&panel_reg>;
port {
panel_input: endpoint {
remote-endpoint = <&hlcdc_panel_output>;
};
};
};
};
&hlcdc {
status = "okay";
};
&hlcdc_panel_output {
remote-endpoint = <&panel_input>;
};
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Panel unable to use atmel,hlcdc-pwm for backlight
2016-09-26 19:35 Panel unable to use atmel,hlcdc-pwm for backlight Peter Rosin
@ 2016-09-26 19:51 ` Boris Brezillon
2016-09-26 19:58 ` Peter Rosin
0 siblings, 1 reply; 4+ messages in thread
From: Boris Brezillon @ 2016-09-26 19:51 UTC (permalink / raw)
To: Peter Rosin; +Cc: dri-devel
On Mon, 26 Sep 2016 21:35:43 +0200
Peter Rosin <peda@axentia.se> wrote:
> Hi!
>
> I'm trying to attach a simpel-panel to an atmel,sama5d3-hlcdc
> controller. See below for the parts of my .dts that I find
> relevant.
>
> When I boot with this, I run into a problem. What I think
> happens is that the hlcdc probe fails because the panel
> probe fails because the backlight probe fails because the
> pwm probe fails because the hlcdc probe hasn't completed
> yet. I.e. a circular dependency.
No, it's not a circular dependency issue (the atmel-hlcdc-pwm depends
on the atmel-hlcdc-mfd driver, not the atmel-hlcdc-drm driver).
Are you sure you enabled CONFIG_PWM_ATMEL_HLCDC?
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Panel unable to use atmel,hlcdc-pwm for backlight
2016-09-26 19:51 ` Boris Brezillon
@ 2016-09-26 19:58 ` Peter Rosin
2016-09-26 20:58 ` Peter Rosin
0 siblings, 1 reply; 4+ messages in thread
From: Peter Rosin @ 2016-09-26 19:58 UTC (permalink / raw)
To: Boris Brezillon; +Cc: dri-devel
On 2016-09-26 21:51, Boris Brezillon wrote:
> On Mon, 26 Sep 2016 21:35:43 +0200
> Peter Rosin <peda@axentia.se> wrote:
>
>> Hi!
>>
>> I'm trying to attach a simpel-panel to an atmel,sama5d3-hlcdc
>> controller. See below for the parts of my .dts that I find
>> relevant.
>>
>> When I boot with this, I run into a problem. What I think
>> happens is that the hlcdc probe fails because the panel
>> probe fails because the backlight probe fails because the
>> pwm probe fails because the hlcdc probe hasn't completed
>> yet. I.e. a circular dependency.
>
> No, it's not a circular dependency issue (the atmel-hlcdc-pwm depends
> on the atmel-hlcdc-mfd driver, not the atmel-hlcdc-drm driver).
>
> Are you sure you enabled CONFIG_PWM_ATMEL_HLCDC?
Yes,
$ grep PWM_ATMEL_HLCDC .config
CONFIG_PWM_ATMEL_HLCDC_PWM=y
and I can manipulate the pwm from sysfs, so it's definitely there.
Cheers,
Peter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Panel unable to use atmel,hlcdc-pwm for backlight
2016-09-26 19:58 ` Peter Rosin
@ 2016-09-26 20:58 ` Peter Rosin
0 siblings, 0 replies; 4+ messages in thread
From: Peter Rosin @ 2016-09-26 20:58 UTC (permalink / raw)
To: Boris Brezillon; +Cc: dri-devel
On 2016-09-26 21:58, Peter Rosin wrote:
> On 2016-09-26 21:51, Boris Brezillon wrote:
>> On Mon, 26 Sep 2016 21:35:43 +0200
>> Peter Rosin <peda@axentia.se> wrote:
>>
>>> Hi!
>>>
>>> I'm trying to attach a simpel-panel to an atmel,sama5d3-hlcdc
>>> controller. See below for the parts of my .dts that I find
>>> relevant.
>>>
>>> When I boot with this, I run into a problem. What I think
>>> happens is that the hlcdc probe fails because the panel
>>> probe fails because the backlight probe fails because the
>>> pwm probe fails because the hlcdc probe hasn't completed
>>> yet. I.e. a circular dependency.
>>
>> No, it's not a circular dependency issue (the atmel-hlcdc-pwm depends
>> on the atmel-hlcdc-mfd driver, not the atmel-hlcdc-drm driver).
>>
>> Are you sure you enabled CONFIG_PWM_ATMEL_HLCDC?
>
> Yes,
>
> $ grep PWM_ATMEL_HLCDC .config
> CONFIG_PWM_ATMEL_HLCDC_PWM=y
>
> and I can manipulate the pwm from sysfs, so it's definitely there.
WTF, I got it to probe. I must have made some silly typo that I
somehow fixed when going back and forth trying a few different
things.
I wonder what I did???
Ok, sorry for the noise then...
Cheers,
Peter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-26 23:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-26 19:35 Panel unable to use atmel,hlcdc-pwm for backlight Peter Rosin
2016-09-26 19:51 ` Boris Brezillon
2016-09-26 19:58 ` Peter Rosin
2016-09-26 20:58 ` Peter Rosin
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.