* [PATCH 1/5] ARM: dts: sun5i: Add PWM controller node for A13/A10s
2015-09-20 12:30 [PATCH 0/5] ARM: dts: sunxi: Add backlight node to q8 tablets Hans de Goede
@ 2015-09-20 12:30 ` Hans de Goede
2015-09-22 14:28 ` Maxime Ripard
2015-09-20 12:30 ` [PATCH 2/5] ARM: dts: sun5i: Add PWM channel 0 pinmux setting " Hans de Goede
` (4 subsequent siblings)
5 siblings, 1 reply; 17+ messages in thread
From: Hans de Goede @ 2015-09-20 12:30 UTC (permalink / raw)
To: linux-arm-kernel
The sun5i die has a PWM controller that is compatible to the one on the A20.
Add a device node for it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
arch/arm/boot/dts/sun5i.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi
index 78b993a..5e036a4 100644
--- a/arch/arm/boot/dts/sun5i.dtsi
+++ b/arch/arm/boot/dts/sun5i.dtsi
@@ -543,6 +543,14 @@
reg = <0x01c20c90 0x10>;
};
+ pwm: pwm at 01c20e00 {
+ compatible = "allwinner,sun7i-a20-pwm";
+ reg = <0x01c20e00 0xc>;
+ clocks = <&osc24M>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
lradc: lradc at 01c22800 {
compatible = "allwinner,sun4i-a10-lradc-keys";
reg = <0x01c22800 0x100>;
--
2.4.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 1/5] ARM: dts: sun5i: Add PWM controller node for A13/A10s
2015-09-20 12:30 ` [PATCH 1/5] ARM: dts: sun5i: Add PWM controller node for A13/A10s Hans de Goede
@ 2015-09-22 14:28 ` Maxime Ripard
0 siblings, 0 replies; 17+ messages in thread
From: Maxime Ripard @ 2015-09-22 14:28 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Sep 20, 2015 at 08:30:47AM -0400, Hans de Goede wrote:
> The sun5i die has a PWM controller that is compatible to the one on the A20.
> Add a device node for it.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> arch/arm/boot/dts/sun5i.dtsi | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi
> index 78b993a..5e036a4 100644
> --- a/arch/arm/boot/dts/sun5i.dtsi
> +++ b/arch/arm/boot/dts/sun5i.dtsi
> @@ -543,6 +543,14 @@
> reg = <0x01c20c90 0x10>;
> };
>
> + pwm: pwm at 01c20e00 {
> + compatible = "allwinner,sun7i-a20-pwm";
Is it? IIRC, it has a single channel, while the A20 has two.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150922/25c630ac/attachment.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/5] ARM: dts: sun5i: Add PWM channel 0 pinmux setting for A13/A10s
2015-09-20 12:30 [PATCH 0/5] ARM: dts: sunxi: Add backlight node to q8 tablets Hans de Goede
2015-09-20 12:30 ` [PATCH 1/5] ARM: dts: sun5i: Add PWM controller node for A13/A10s Hans de Goede
@ 2015-09-20 12:30 ` Hans de Goede
2015-09-22 14:29 ` Maxime Ripard
2015-09-20 12:30 ` [PATCH 3/5] ARM: dts: sunxi: Enable PWM controller on Q8 format tablets Hans de Goede
` (3 subsequent siblings)
5 siblings, 1 reply; 17+ messages in thread
From: Hans de Goede @ 2015-09-20 12:30 UTC (permalink / raw)
To: linux-arm-kernel
Add a pinmux setting for the first pwm channel. This is often used for
backlight dimming on tablets.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
arch/arm/boot/dts/sun5i.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi
index 5e036a4..f0714d3 100644
--- a/arch/arm/boot/dts/sun5i.dtsi
+++ b/arch/arm/boot/dts/sun5i.dtsi
@@ -529,6 +529,13 @@
allwinner,drive = <SUN4I_PINCTRL_30_MA>;
allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
};
+
+ pwm0_pins: pwm0 {
+ allwinner,pins = "PB2";
+ allwinner,function = "pwm";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
};
timer at 01c20c00 {
--
2.4.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/5] ARM: dts: sun5i: Add PWM channel 0 pinmux setting for A13/A10s
2015-09-20 12:30 ` [PATCH 2/5] ARM: dts: sun5i: Add PWM channel 0 pinmux setting " Hans de Goede
@ 2015-09-22 14:29 ` Maxime Ripard
0 siblings, 0 replies; 17+ messages in thread
From: Maxime Ripard @ 2015-09-22 14:29 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Sep 20, 2015 at 08:30:48AM -0400, Hans de Goede wrote:
> Add a pinmux setting for the first pwm channel. This is often used for
> backlight dimming on tablets.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> arch/arm/boot/dts/sun5i.dtsi | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts/sun5i.dtsi
> index 5e036a4..f0714d3 100644
> --- a/arch/arm/boot/dts/sun5i.dtsi
> +++ b/arch/arm/boot/dts/sun5i.dtsi
> @@ -529,6 +529,13 @@
> allwinner,drive = <SUN4I_PINCTRL_30_MA>;
> allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
> };
> +
> + pwm0_pins: pwm0 {
Is there a reason why you call this pinset pwm0, while it looks like
there's a single pwm controller?
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150922/86ee2f9f/attachment.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/5] ARM: dts: sunxi: Enable PWM controller on Q8 format tablets
2015-09-20 12:30 [PATCH 0/5] ARM: dts: sunxi: Add backlight node to q8 tablets Hans de Goede
2015-09-20 12:30 ` [PATCH 1/5] ARM: dts: sun5i: Add PWM controller node for A13/A10s Hans de Goede
2015-09-20 12:30 ` [PATCH 2/5] ARM: dts: sun5i: Add PWM channel 0 pinmux setting " Hans de Goede
@ 2015-09-20 12:30 ` Hans de Goede
2015-09-20 12:30 ` [PATCH 4/5] ARM: dts: sun8i: Add pwm-backlight device for A23/A33 " Hans de Goede
` (2 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Hans de Goede @ 2015-09-20 12:30 UTC (permalink / raw)
To: linux-arm-kernel
From: Chen-Yu Tsai <wens@csie.org>
Q8 format tablets use channel 0 of the PWM controller for backlight dimming.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
-Enable the pwm controller in sunxi-q8-common.dtsi rather then in
sun8i-q8-common.dtsi
---
arch/arm/boot/dts/sunxi-q8-common.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/sunxi-q8-common.dtsi b/arch/arm/boot/dts/sunxi-q8-common.dtsi
index 17b26ff..b824146 100644
--- a/arch/arm/boot/dts/sunxi-q8-common.dtsi
+++ b/arch/arm/boot/dts/sunxi-q8-common.dtsi
@@ -75,3 +75,9 @@
voltage = <400000>;
};
};
+
+&pwm {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm0_pins>;
+ status = "okay";
+};
--
2.4.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/5] ARM: dts: sun8i: Add pwm-backlight device for A23/A33 Q8 format tablets
2015-09-20 12:30 [PATCH 0/5] ARM: dts: sunxi: Add backlight node to q8 tablets Hans de Goede
` (2 preceding siblings ...)
2015-09-20 12:30 ` [PATCH 3/5] ARM: dts: sunxi: Enable PWM controller on Q8 format tablets Hans de Goede
@ 2015-09-20 12:30 ` Hans de Goede
2015-09-22 14:44 ` Maxime Ripard
2015-09-20 12:30 ` [PATCH 5/5] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi Hans de Goede
[not found] ` <fc4adcf5-4362-4d4c-b42e-729922c79f65@googlegroups.com>
5 siblings, 1 reply; 17+ messages in thread
From: Hans de Goede @ 2015-09-20 12:30 UTC (permalink / raw)
To: linux-arm-kernel
From: Chen-Yu Tsai <wens@csie.org>
The LCD backlight on the A23/A33 Q8 format tablets is enabled
with a GPIO controlled regulator, and brightness controlled with
the SoC's PWM controller.
The backlight is powered from the AXP223 PMIC's DC1SW output,
which is not supported yet. A proper bootloader is required
to enable it.
The brightness levels are arbitrary. The FEX files do not have
such information. As such, actual brightness levels may differ
from device to device.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
arch/arm/boot/dts/sun8i-q8-common.dtsi | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-q8-common.dtsi b/arch/arm/boot/dts/sun8i-q8-common.dtsi
index 6f8a8bb..f342736 100644
--- a/arch/arm/boot/dts/sun8i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun8i-q8-common.dtsi
@@ -41,11 +41,24 @@
*/
#include "sunxi-q8-common.dtsi"
+#include <dt-bindings/pwm/pwm.h>
+
/ {
aliases {
serial0 = &r_uart;
};
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pinctrl-names = "default";
+ pinctrl-0 = <&bl_en_pin_q8>;
+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+ default-brightness-level = <8>;
+ enable-gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
+ /* backlight is powered by AXP223 DC1SW */
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};
@@ -62,6 +75,13 @@
};
&pio {
+ bl_en_pin_q8: bl_en_pin at 0 {
+ allwinner,pins = "PH6";
+ allwinner,function = "gpio_in";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
mmc0_cd_pin_q8: mmc0_cd_pin at 0 {
allwinner,pins = "PB4";
allwinner,function = "gpio_in";
--
2.4.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/5] ARM: dts: sun8i: Add pwm-backlight device for A23/A33 Q8 format tablets
2015-09-20 12:30 ` [PATCH 4/5] ARM: dts: sun8i: Add pwm-backlight device for A23/A33 " Hans de Goede
@ 2015-09-22 14:44 ` Maxime Ripard
0 siblings, 0 replies; 17+ messages in thread
From: Maxime Ripard @ 2015-09-22 14:44 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Sep 20, 2015 at 08:30:50AM -0400, Hans de Goede wrote:
> From: Chen-Yu Tsai <wens@csie.org>
>
> The LCD backlight on the A23/A33 Q8 format tablets is enabled
> with a GPIO controlled regulator, and brightness controlled with
> the SoC's PWM controller.
>
> The backlight is powered from the AXP223 PMIC's DC1SW output,
> which is not supported yet. A proper bootloader is required
> to enable it.
>
> The brightness levels are arbitrary. The FEX files do not have
> such information. As such, actual brightness levels may differ
> from device to device.
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Applied, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150922/44c0da5a/attachment.sig>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 5/5] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi
2015-09-20 12:30 [PATCH 0/5] ARM: dts: sunxi: Add backlight node to q8 tablets Hans de Goede
` (3 preceding siblings ...)
2015-09-20 12:30 ` [PATCH 4/5] ARM: dts: sun8i: Add pwm-backlight device for A23/A33 " Hans de Goede
@ 2015-09-20 12:30 ` Hans de Goede
2015-09-20 14:46 ` Chen-Yu Tsai
2015-12-19 10:54 ` 8001010 at gmail.com
[not found] ` <fc4adcf5-4362-4d4c-b42e-729922c79f65@googlegroups.com>
5 siblings, 2 replies; 17+ messages in thread
From: Hans de Goede @ 2015-09-20 12:30 UTC (permalink / raw)
To: linux-arm-kernel
All A13 based q8 formfactor tablets use the same backlight setup, add
a backlight devicetree node for controlling the backlight on these devices.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
arch/arm/boot/dts/sun5i-q8-common.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-q8-common.dtsi
index 0641d68..76a5204 100644
--- a/arch/arm/boot/dts/sun5i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun5i-q8-common.dtsi
@@ -41,11 +41,22 @@
*/
#include "sunxi-q8-common.dtsi"
+#include <dt-bindings/pwm/pwm.h>
+
/ {
aliases {
serial0 = &uart1;
};
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
+ default-brightness-level = <8>;
+ /* TODO: backlight uses axp gpio1 as enable pin */
+ /* TODO: backlight is powered by AXP209 DCDC1SW */
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};
--
2.4.3
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 5/5] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi
2015-09-20 12:30 ` [PATCH 5/5] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi Hans de Goede
@ 2015-09-20 14:46 ` Chen-Yu Tsai
2015-09-20 15:14 ` [linux-sunxi] " Hans de Goede
2015-12-19 10:54 ` 8001010 at gmail.com
1 sibling, 1 reply; 17+ messages in thread
From: Chen-Yu Tsai @ 2015-09-20 14:46 UTC (permalink / raw)
To: linux-arm-kernel
On Sun, Sep 20, 2015 at 8:30 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> All A13 based q8 formfactor tablets use the same backlight setup, add
> a backlight devicetree node for controlling the backlight on these devices.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> arch/arm/boot/dts/sun5i-q8-common.dtsi | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-q8-common.dtsi
> index 0641d68..76a5204 100644
> --- a/arch/arm/boot/dts/sun5i-q8-common.dtsi
> +++ b/arch/arm/boot/dts/sun5i-q8-common.dtsi
> @@ -41,11 +41,22 @@
> */
> #include "sunxi-q8-common.dtsi"
>
> +#include <dt-bindings/pwm/pwm.h>
> +
> / {
> aliases {
> serial0 = &uart1;
> };
>
> + backlight: backlight {
> + compatible = "pwm-backlight";
> + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
> + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
> + default-brightness-level = <8>;
> + /* TODO: backlight uses axp gpio1 as enable pin */
> + /* TODO: backlight is powered by AXP209 DCDC1SW */
There's no DCDC1SW on AXP209. The reference design shows the backlight
regulator is powered directly from IPSOUT, but the PWM pullup is powered
by LCD-VCC, which itself is enabled by AXP209 GPIO0.
Would that be the case, or maybe closer, given we don't have schematics?
Regards
ChenYu
> + };
> +
> chosen {
> stdout-path = "serial0:115200n8";
> };
> --
> 2.4.3
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [linux-sunxi] Re: [PATCH 5/5] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi
2015-09-20 14:46 ` Chen-Yu Tsai
@ 2015-09-20 15:14 ` Hans de Goede
2015-09-20 15:21 ` Hans de Goede
0 siblings, 1 reply; 17+ messages in thread
From: Hans de Goede @ 2015-09-20 15:14 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 09/20/2015 10:46 AM, Chen-Yu Tsai wrote:
> On Sun, Sep 20, 2015 at 8:30 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>> All A13 based q8 formfactor tablets use the same backlight setup, add
>> a backlight devicetree node for controlling the backlight on these devices.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> arch/arm/boot/dts/sun5i-q8-common.dtsi | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-q8-common.dtsi
>> index 0641d68..76a5204 100644
>> --- a/arch/arm/boot/dts/sun5i-q8-common.dtsi
>> +++ b/arch/arm/boot/dts/sun5i-q8-common.dtsi
>> @@ -41,11 +41,22 @@
>> */
>> #include "sunxi-q8-common.dtsi"
>>
>> +#include <dt-bindings/pwm/pwm.h>
>> +
>> / {
>> aliases {
>> serial0 = &uart1;
>> };
>>
>> + backlight: backlight {
>> + compatible = "pwm-backlight";
>> + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
>> + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
>> + default-brightness-level = <8>;
>> + /* TODO: backlight uses axp gpio1 as enable pin */
>> + /* TODO: backlight is powered by AXP209 DCDC1SW */
>
> There's no DCDC1SW on AXP209. The reference design shows the backlight
> regulator is powered directly from IPSOUT,
Ah, right, I'll do a v2 dropping this comment line.
> but the PWM pullup is powered
> by LCD-VCC, which itself is enabled by AXP209 GPIO0.
>
> Would that be the case, or maybe closer, given we don't have schematics?
gpio0 needs to be driven high to get the backlight to lite up, that
is pretty much all I know.
Regards,
Hans
^ permalink raw reply [flat|nested] 17+ messages in thread
* [linux-sunxi] Re: [PATCH 5/5] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi
2015-09-20 15:14 ` [linux-sunxi] " Hans de Goede
@ 2015-09-20 15:21 ` Hans de Goede
0 siblings, 0 replies; 17+ messages in thread
From: Hans de Goede @ 2015-09-20 15:21 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 09/20/2015 11:14 AM, Hans de Goede wrote:
> Hi,
>
> On 09/20/2015 10:46 AM, Chen-Yu Tsai wrote:
>> On Sun, Sep 20, 2015 at 8:30 PM, Hans de Goede <hdegoede@redhat.com> wrote:
>>> All A13 based q8 formfactor tablets use the same backlight setup, add
>>> a backlight devicetree node for controlling the backlight on these devices.
>>>
>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>> ---
>>> arch/arm/boot/dts/sun5i-q8-common.dtsi | 11 +++++++++++
>>> 1 file changed, 11 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-q8-common.dtsi
>>> index 0641d68..76a5204 100644
>>> --- a/arch/arm/boot/dts/sun5i-q8-common.dtsi
>>> +++ b/arch/arm/boot/dts/sun5i-q8-common.dtsi
>>> @@ -41,11 +41,22 @@
>>> */
>>> #include "sunxi-q8-common.dtsi"
>>>
>>> +#include <dt-bindings/pwm/pwm.h>
>>> +
>>> / {
>>> aliases {
>>> serial0 = &uart1;
>>> };
>>>
>>> + backlight: backlight {
>>> + compatible = "pwm-backlight";
>>> + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
>>> + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
>>> + default-brightness-level = <8>;
>>> + /* TODO: backlight uses axp gpio1 as enable pin */
>>> + /* TODO: backlight is powered by AXP209 DCDC1SW */
>>
>> There's no DCDC1SW on AXP209. The reference design shows the backlight
>> regulator is powered directly from IPSOUT,
>
> Ah, right, I'll do a v2 dropping this comment line.
>
> > but the PWM pullup is powered
>> by LCD-VCC, which itself is enabled by AXP209 GPIO0.
>>
>> Would that be the case, or maybe closer, given we don't have schematics?
>
> gpio0 needs to be driven high to get the backlight to lite up, that
> is pretty much all I know.
Correction, gpio1. I guess that pullup is only there to keep the backlight
off while the pwm pin is still muxed as input, rather then pwm-output.
Regards,
Hans
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 5/5] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi
2015-09-20 12:30 ` [PATCH 5/5] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi Hans de Goede
2015-09-20 14:46 ` Chen-Yu Tsai
@ 2015-12-19 10:54 ` 8001010 at gmail.com
2015-12-22 3:21 ` Chen-Yu Tsai
1 sibling, 1 reply; 17+ messages in thread
From: 8001010 at gmail.com @ 2015-12-19 10:54 UTC (permalink / raw)
To: linux-arm-kernel
> + default-brightness-level = <8>;
Why?
Is not better 100% ?
Silviop
^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <fc4adcf5-4362-4d4c-b42e-729922c79f65@googlegroups.com>]
* [linux-sunxi] Re: [PATCH 0/5] ARM: dts: sunxi: Add backlight node to q8 tablets
[not found] ` <fc4adcf5-4362-4d4c-b42e-729922c79f65@googlegroups.com>
@ 2015-12-21 12:59 ` Hans de Goede
2016-01-11 10:34 ` 8001010
0 siblings, 1 reply; 17+ messages in thread
From: Hans de Goede @ 2015-12-21 12:59 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 21-12-15 11:56, Silvio Pellicano wrote:
>
>
>> Here is a slightly updated version of Chen-Yu's backlight
>> patches, also adding support for the backlight found on A13
>> based q8 tablets.
>>
>
> If i compile your dtsi with (obviously) pwm support enable , backlight
> switch off after kernel start,
> if i disable pwm in menuconfig,it stay on, all seem correct (pwm on PB2 in
> original script.bin),
> but there is somewhere a bug in pwm or dtsi description of backlight.
No there is not, if you enable the pwm driver you must also enable
the backlight-pwm driver / add CONFIG_BACKLIGHT_PWM=y to your .config
(and make sure it stays that way after a "make oldconfig").
Regards,
Hans
^ permalink raw reply [flat|nested] 17+ messages in thread
* [linux-sunxi] Re: [PATCH 0/5] ARM: dts: sunxi: Add backlight node to q8 tablets
2015-12-21 12:59 ` [linux-sunxi] Re: [PATCH 0/5] ARM: dts: sunxi: Add backlight node to q8 tablets Hans de Goede
@ 2016-01-11 10:34 ` 8001010
2016-01-11 11:09 ` Hans de Goede
0 siblings, 1 reply; 17+ messages in thread
From: 8001010 @ 2016-01-11 10:34 UTC (permalink / raw)
To: linux-arm-kernel
Hans de Goede wrote:
> Hi,
>
> On 21-12-15 11:56, Silvio Pellicano wrote:
>>
>>
>>> Here is a slightly updated version of Chen-Yu's backlight
>>> patches, also adding support for the backlight found on A13
>>> based q8 tablets.
>>>
>>
>> If i compile your dtsi with (obviously) pwm support enable , backlight
>> switch off after kernel start,
>> if i disable pwm in menuconfig,it stay on, all seem correct (pwm on PB2 in
>> original script.bin),
>> but there is somewhere a bug in pwm or dtsi description of backlight.
>
> No there is not, if you enable the pwm driver you must also enable
> the backlight-pwm driver / add CONFIG_BACKLIGHT_PWM=y to your .config
> (and make sure it stays that way after a "make oldconfig").
>
> Regards,
>
> Hans
>
Now work, but what flag i have to enable to leave 5v usb otg ON?
uboot switch ON Usb Otg voltage but kernel switch off during boot (no usb devices work).
Thanks
^ permalink raw reply [flat|nested] 17+ messages in thread
* [linux-sunxi] Re: [PATCH 0/5] ARM: dts: sunxi: Add backlight node to q8 tablets
2016-01-11 10:34 ` 8001010
@ 2016-01-11 11:09 ` Hans de Goede
0 siblings, 0 replies; 17+ messages in thread
From: Hans de Goede @ 2016-01-11 11:09 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 11-01-16 11:34, 8001010 wrote:
> Hans de Goede wrote:
>> Hi,
>>
>> On 21-12-15 11:56, Silvio Pellicano wrote:
>>>
>>>
>>>> Here is a slightly updated version of Chen-Yu's backlight
>>>> patches, also adding support for the backlight found on A13
>>>> based q8 tablets.
>>>>
>>>
>>> If i compile your dtsi with (obviously) pwm support enable , backlight
>>> switch off after kernel start,
>>> if i disable pwm in menuconfig,it stay on, all seem correct (pwm on PB2 in
>>> original script.bin),
>>> but there is somewhere a bug in pwm or dtsi description of backlight.
>>
>> No there is not, if you enable the pwm driver you must also enable
>> the backlight-pwm driver / add CONFIG_BACKLIGHT_PWM=y to your .config
>> (and make sure it stays that way after a "make oldconfig").
>>
>> Regards,
>>
>> Hans
>>
> Now work, but what flag i have to enable to leave 5v usb otg ON?
> uboot switch ON Usb Otg voltage but kernel switch off during boot (no usb devices work).
In order for otg to work you must load a gadget driver, e.g. do:
insmod libcomposite.ko
insmod u_serial.ko
insmod usb_f_acm.ko
insmod g_serial.ko
Regards,
Hans
^ permalink raw reply [flat|nested] 17+ messages in thread