All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 resend 0/4] ARM: dts: sunxi: q8 A13 tablet backlight support
@ 2015-09-29 10:29 ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-09-29 10:29 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi Maxime,

This series seems to have fallen through the cracks, hence this resend.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 resend 0/4] ARM: dts: sunxi: q8 A13 tablet backlight support
@ 2015-09-29 10:29 ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-09-29 10:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Maxime,

This series seems to have fallen through the cracks, hence this resend.

Regards,

Hans

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

* [PATCH v2 resend 1/4] ARM: dts: sun5i: Add PWM controller node for A13/A10s
  2015-09-29 10:29 ` Hans de Goede
@ 2015-09-29 10:29     ` Hans de Goede
  -1 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-09-29 10:29 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 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@01c20e00 {
+			compatible = "allwinner,sun7i-a20-pwm";
+			reg = <0x01c20e00 0xc>;
+			clocks = <&osc24M>;
+			#pwm-cells = <3>;
+			status = "disabled";
+		};
+
 		lradc: lradc@01c22800 {
 			compatible = "allwinner,sun4i-a10-lradc-keys";
 			reg = <0x01c22800 0x100>;
-- 
2.5.0

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

* [PATCH v2 resend 1/4] ARM: dts: sun5i: Add PWM controller node for A13/A10s
@ 2015-09-29 10:29     ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-09-29 10:29 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.5.0

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

* [PATCH v2 resend 2/4] ARM: dts: sun5i: Add PWM channel 0 pinmux setting for A13/A10s
  2015-09-29 10:29 ` Hans de Goede
@ 2015-09-29 10:29     ` Hans de Goede
  -1 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-09-29 10:29 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 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@01c20c00 {
-- 
2.5.0

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

* [PATCH v2 resend 2/4] ARM: dts: sun5i: Add PWM channel 0 pinmux setting for A13/A10s
@ 2015-09-29 10:29     ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-09-29 10:29 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.5.0

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

* [PATCH v2 resend 3/4] ARM: dts: sunxi: Enable PWM controller on Q8 format tablets
  2015-09-29 10:29 ` Hans de Goede
@ 2015-09-29 10:29     ` Hans de Goede
  -1 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-09-29 10:29 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

From: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

Q8 format tablets use channel 0 of the PWM controller for backlight dimming.

Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>
Signed-off-by: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
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.5.0

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

* [PATCH v2 resend 3/4] ARM: dts: sunxi: Enable PWM controller on Q8 format tablets
@ 2015-09-29 10:29     ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-09-29 10:29 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.5.0

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

* [PATCH v2 resend 4/4] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi
  2015-09-29 10:29 ` Hans de Goede
@ 2015-09-29 10:29     ` Hans de Goede
  -1 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-09-29 10:29 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Hans de Goede

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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
Changes in v2:
-Drop the comment about DCDC1SW, the axp209 used on A13 boards does not
 have a DCDC1SW
---
 arch/arm/boot/dts/sun5i-q8-common.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-q8-common.dtsi
index 0641d68..a78e189 100644
--- a/arch/arm/boot/dts/sun5i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun5i-q8-common.dtsi
@@ -41,11 +41,21 @@
  */
 #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 */
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
-- 
2.5.0

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

* [PATCH v2 resend 4/4] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi
@ 2015-09-29 10:29     ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-09-29 10:29 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>
---
Changes in v2:
-Drop the comment about DCDC1SW, the axp209 used on A13 boards does not
 have a DCDC1SW
---
 arch/arm/boot/dts/sun5i-q8-common.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-q8-common.dtsi b/arch/arm/boot/dts/sun5i-q8-common.dtsi
index 0641d68..a78e189 100644
--- a/arch/arm/boot/dts/sun5i-q8-common.dtsi
+++ b/arch/arm/boot/dts/sun5i-q8-common.dtsi
@@ -41,11 +41,21 @@
  */
 #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 */
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
-- 
2.5.0

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

* Re: [PATCH v2 resend 0/4] ARM: dts: sunxi: q8 A13 tablet backlight support
  2015-09-29 10:29 ` Hans de Goede
@ 2015-10-01 20:33     ` Maxime Ripard
  -1 siblings, 0 replies; 14+ messages in thread
From: Maxime Ripard @ 2015-10-01 20:33 UTC (permalink / raw)
  To: Hans de Goede
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

Hi,

On Tue, Sep 29, 2015 at 12:29:47PM +0200, Hans de Goede wrote:
> Hi Maxime,
> 
> This series seems to have fallen through the cracks, hence this
> resend.

No, it didn't fall through the cracks, I asked a question on the first
patch and never got a reply.

The way we handled *all* the controllers so far is that the compatible
was representing what the controllers what features the controller was
exposing. This is the case for the clocks or pinctrl for example.

We should be consistent with that (beside the fact that using a
compatible from a later SoC is wrong).

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [PATCH v2 resend 0/4] ARM: dts: sunxi: q8 A13 tablet backlight support
@ 2015-10-01 20:33     ` Maxime Ripard
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Ripard @ 2015-10-01 20:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Tue, Sep 29, 2015 at 12:29:47PM +0200, Hans de Goede wrote:
> Hi Maxime,
> 
> This series seems to have fallen through the cracks, hence this
> resend.

No, it didn't fall through the cracks, I asked a question on the first
patch and never got a reply.

The way we handled *all* the controllers so far is that the compatible
was representing what the controllers what features the controller was
exposing. This is the case for the clocks or pinctrl for example.

We should be consistent with that (beside the fact that using a
compatible from a later SoC is wrong).

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/20151001/cbee7732/attachment.sig>

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

* Re: Re: [PATCH v2 resend 0/4] ARM: dts: sunxi: q8 A13 tablet backlight support
  2015-10-01 20:33     ` Maxime Ripard
@ 2015-10-11  9:49       ` Hans de Goede
  -1 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-10-11  9:49 UTC (permalink / raw)
  To: maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8
  Cc: Chen-Yu Tsai, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

Hi,

On 01-10-15 22:33, Maxime Ripard wrote:
> Hi,
>
> On Tue, Sep 29, 2015 at 12:29:47PM +0200, Hans de Goede wrote:
>> Hi Maxime,
>>
>> This series seems to have fallen through the cracks, hence this
>> resend.
>
> No, it didn't fall through the cracks, I asked a question on the first
> patch and never got a reply.
>
> The way we handled *all* the controllers so far is that the compatible
> was representing what the controllers what features the controller was
> exposing. This is the case for the clocks or pinctrl for example.
>
> We should be consistent with that (beside the fact that using a
> compatible from a later SoC is wrong).

Ah ok, I somehow missed that reply, a pwm patch to add the compatibles
+ v3 of the dts patches is coming up.

Regards,

Hans

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

* [linux-sunxi] Re: [PATCH v2 resend 0/4] ARM: dts: sunxi: q8 A13 tablet backlight support
@ 2015-10-11  9:49       ` Hans de Goede
  0 siblings, 0 replies; 14+ messages in thread
From: Hans de Goede @ 2015-10-11  9:49 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On 01-10-15 22:33, Maxime Ripard wrote:
> Hi,
>
> On Tue, Sep 29, 2015 at 12:29:47PM +0200, Hans de Goede wrote:
>> Hi Maxime,
>>
>> This series seems to have fallen through the cracks, hence this
>> resend.
>
> No, it didn't fall through the cracks, I asked a question on the first
> patch and never got a reply.
>
> The way we handled *all* the controllers so far is that the compatible
> was representing what the controllers what features the controller was
> exposing. This is the case for the clocks or pinctrl for example.
>
> We should be consistent with that (beside the fact that using a
> compatible from a later SoC is wrong).

Ah ok, I somehow missed that reply, a pwm patch to add the compatibles
+ v3 of the dts patches is coming up.

Regards,

Hans

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

end of thread, other threads:[~2015-10-11  9:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-29 10:29 [PATCH v2 resend 0/4] ARM: dts: sunxi: q8 A13 tablet backlight support Hans de Goede
2015-09-29 10:29 ` Hans de Goede
     [not found] ` <1443522591-6590-1-git-send-email-hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-29 10:29   ` [PATCH v2 resend 1/4] ARM: dts: sun5i: Add PWM controller node for A13/A10s Hans de Goede
2015-09-29 10:29     ` Hans de Goede
2015-09-29 10:29   ` [PATCH v2 resend 2/4] ARM: dts: sun5i: Add PWM channel 0 pinmux setting " Hans de Goede
2015-09-29 10:29     ` Hans de Goede
2015-09-29 10:29   ` [PATCH v2 resend 3/4] ARM: dts: sunxi: Enable PWM controller on Q8 format tablets Hans de Goede
2015-09-29 10:29     ` Hans de Goede
2015-09-29 10:29   ` [PATCH v2 resend 4/4] ARM: dts: sun5i: Add backlight node to sun5i-q8-common.dtsi Hans de Goede
2015-09-29 10:29     ` Hans de Goede
2015-10-01 20:33   ` [PATCH v2 resend 0/4] ARM: dts: sunxi: q8 A13 tablet backlight support Maxime Ripard
2015-10-01 20:33     ` Maxime Ripard
2015-10-11  9:49     ` Hans de Goede
2015-10-11  9:49       ` [linux-sunxi] " Hans de Goede

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.