* [PATCH 1/3] dt-bindings: add compatible for the PWM controller on Allwinner A64
@ 2017-02-25 7:42 Icenowy Zheng
[not found] ` <20170225074216.64868-1-icenowy-ymACFijhrKM@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Icenowy Zheng @ 2017-02-25 7:42 UTC (permalink / raw)
To: Thierry Reding, Rob Herring, Maxime Ripard, Chen-Yu Tsai
Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng
Allwinner A64 have a PWM controller like other Allwinner SoCs.
Add a compatible string for it.
Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
---
Documentation/devicetree/bindings/pwm/pwm-sun4i.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt b/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt
index f1cbeefb3087..2f8315aafe22 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-sun4i.txt
@@ -7,6 +7,7 @@ Required properties:
- "allwinner,sun5i-a13-pwm"
- "allwinner,sun7i-a20-pwm"
- "allwinner,sun8i-h3-pwm"
+ - "allwinner,sun50i-a64-pwm"
- reg: physical base address and length of the controller's registers
- #pwm-cells: should be 3. See pwm.txt in this directory for a description of
the cells format.
--
2.11.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] pwm: sunxi: Add A64 support
[not found] ` <20170225074216.64868-1-icenowy-ymACFijhrKM@public.gmane.org>
@ 2017-02-25 7:42 ` Icenowy Zheng
[not found] ` <20170225074216.64868-2-icenowy-ymACFijhrKM@public.gmane.org>
2017-02-25 7:42 ` [PATCH 3/3] arm64: dts: allwinner: add pwm device node for A64 Icenowy Zheng
1 sibling, 1 reply; 7+ messages in thread
From: Icenowy Zheng @ 2017-02-25 7:42 UTC (permalink / raw)
To: Thierry Reding, Rob Herring, Maxime Ripard, Chen-Yu Tsai
Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng
A64 PWM controller has same register layout as sun4i driver, so it works
by adding A64 specific data.
Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
---
drivers/pwm/pwm-sun4i.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
index 1284ffa05921..ca3431e03fb8 100644
--- a/drivers/pwm/pwm-sun4i.c
+++ b/drivers/pwm/pwm-sun4i.c
@@ -290,6 +290,12 @@ static const struct sun4i_pwm_data sun4i_pwm_data_h3 = {
.npwm = 1,
};
+static const struct sun4i_pwm_data sun4i_pwm_data_a64 = {
+ .has_prescaler_bypass = true,
+ .has_rdy = true,
+ .npwm = 1,
+};
+
static const struct of_device_id sun4i_pwm_dt_ids[] = {
{
.compatible = "allwinner,sun4i-a10-pwm",
@@ -307,6 +313,9 @@ static const struct of_device_id sun4i_pwm_dt_ids[] = {
.compatible = "allwinner,sun8i-h3-pwm",
.data = &sun4i_pwm_data_h3,
}, {
+ .compatible = "allwinner,sun50i-a64-pwm",
+ .data = &sun4i_pwm_data_a64,
+ }, {
/* sentinel */
},
};
--
2.11.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] arm64: dts: allwinner: add pwm device node for A64
[not found] ` <20170225074216.64868-1-icenowy-ymACFijhrKM@public.gmane.org>
2017-02-25 7:42 ` [PATCH 2/3] pwm: sunxi: Add A64 support Icenowy Zheng
@ 2017-02-25 7:42 ` Icenowy Zheng
1 sibling, 0 replies; 7+ messages in thread
From: Icenowy Zheng @ 2017-02-25 7:42 UTC (permalink / raw)
To: Thierry Reding, Rob Herring, Maxime Ripard, Chen-Yu Tsai
Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Icenowy Zheng
Allwinner A64 features a PWM controller, which is used for backlight
control by several boards (Pine64 Pinebook, Olimex TERES I).
Add its device node.
Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
---
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 601514ead28c..afc76d5df4e2 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -302,6 +302,14 @@
};
};
+ pwm: pwm@01c21400 {
+ compatible = "allwinner,sun50i-a64-pwm";
+ reg = <0x01c21400 0x8>;
+ clocks = <&osc24M>;
+ #pwm-cells = <3>;
+ status = "disabled";
+ };
+
uart0: serial@1c28000 {
compatible = "snps,dw-apb-uart";
reg = <0x01c28000 0x400>;
--
2.11.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] pwm: sunxi: Add A64 support
[not found] ` <20170225074216.64868-2-icenowy-ymACFijhrKM@public.gmane.org>
@ 2017-02-25 8:53 ` Chen-Yu Tsai
[not found] ` <CAGb2v67OaUps1yffyZ8pBvMwbAU+6WC2pPkt25e5i+SYU1nrDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Chen-Yu Tsai @ 2017-02-25 8:53 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Thierry Reding, Rob Herring, Maxime Ripard, Chen-Yu Tsai,
linux-pwm-u79uwXL29TY76Z2rM5mHXA, devicetree, linux-arm-kernel,
linux-kernel, linux-sunxi
On Sat, Feb 25, 2017 at 3:42 PM, Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> wrote:
> A64 PWM controller has same register layout as sun4i driver, so it works
> by adding A64 specific data.
>
> Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
> ---
> drivers/pwm/pwm-sun4i.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
> index 1284ffa05921..ca3431e03fb8 100644
> --- a/drivers/pwm/pwm-sun4i.c
> +++ b/drivers/pwm/pwm-sun4i.c
> @@ -290,6 +290,12 @@ static const struct sun4i_pwm_data sun4i_pwm_data_h3 = {
> .npwm = 1,
> };
>
> +static const struct sun4i_pwm_data sun4i_pwm_data_a64 = {
> + .has_prescaler_bypass = true,
> + .has_rdy = true,
> + .npwm = 1,
> +};
> +
This seems to be tha same as the H3. Any differences between the
H3 and A64? Otherwise please just use that compatible.
ChenYu
> static const struct of_device_id sun4i_pwm_dt_ids[] = {
> {
> .compatible = "allwinner,sun4i-a10-pwm",
> @@ -307,6 +313,9 @@ static const struct of_device_id sun4i_pwm_dt_ids[] = {
> .compatible = "allwinner,sun8i-h3-pwm",
> .data = &sun4i_pwm_data_h3,
> }, {
> + .compatible = "allwinner,sun50i-a64-pwm",
> + .data = &sun4i_pwm_data_a64,
> + }, {
> /* sentinel */
> },
> };
> --
> 2.11.1
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] pwm: sunxi: Add A64 support
[not found] ` <CAGb2v67OaUps1yffyZ8pBvMwbAU+6WC2pPkt25e5i+SYU1nrDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-02-25 9:23 ` Icenowy Zheng
[not found] ` <870861488014589-IyhJ2jtAr7tuio3avFS2gg@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Icenowy Zheng @ 2017-02-25 9:23 UTC (permalink / raw)
To: Chen-Yu Tsai
Cc: Thierry Reding, Rob Herring, Maxime Ripard,
linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree,
linux-arm-kernel, linux-kernel, linux-sunxi
25.02.2017, 16:53, "Chen-Yu Tsai" <wens-jdAy2FN1RRM@public.gmane.org>:
> On Sat, Feb 25, 2017 at 3:42 PM, Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> wrote:
>> A64 PWM controller has same register layout as sun4i driver, so it works
>> by adding A64 specific data.
>>
>> Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
>> ---
>> drivers/pwm/pwm-sun4i.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
>> index 1284ffa05921..ca3431e03fb8 100644
>> --- a/drivers/pwm/pwm-sun4i.c
>> +++ b/drivers/pwm/pwm-sun4i.c
>> @@ -290,6 +290,12 @@ static const struct sun4i_pwm_data sun4i_pwm_data_h3 = {
>> .npwm = 1,
>> };
>>
>> +static const struct sun4i_pwm_data sun4i_pwm_data_a64 = {
>> + .has_prescaler_bypass = true,
>> + .has_rdy = true,
>> + .npwm = 1,
>> +};
>> +
>
> This seems to be tha same as the H3. Any differences between the
> H3 and A64? Otherwise please just use that compatible.
H3 is also same as A13...
See http://lists.infradead.org/pipermail/linux-arm-kernel/2017-February/486595.html
>
> ChenYu
>
>> static const struct of_device_id sun4i_pwm_dt_ids[] = {
>> {
>> .compatible = "allwinner,sun4i-a10-pwm",
>> @@ -307,6 +313,9 @@ static const struct of_device_id sun4i_pwm_dt_ids[] = {
>> .compatible = "allwinner,sun8i-h3-pwm",
>> .data = &sun4i_pwm_data_h3,
>> }, {
>> + .compatible = "allwinner,sun50i-a64-pwm",
>> + .data = &sun4i_pwm_data_a64,
>> + }, {
>> /* sentinel */
>> },
>> };
>> --
>> 2.11.1
>>
>> --
>> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] pwm: sunxi: Add A64 support
[not found] ` <870861488014589-IyhJ2jtAr7tuio3avFS2gg@public.gmane.org>
@ 2017-02-25 13:00 ` Siarhei Volkau
2017-02-27 7:44 ` Maxime Ripard
1 sibling, 0 replies; 7+ messages in thread
From: Siarhei Volkau @ 2017-02-25 13:00 UTC (permalink / raw)
To: linux-sunxi
Cc: wens-jdAy2FN1RRM, thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
linux-pwm-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, icenowy-ymACFijhrKM
[-- Attachment #1.1: Type: text/plain, Size: 159 bytes --]
> H3 is also same as A13...
According to datasheets/user manuals H3 has 2 PWM channels, but A64
has only one channel, so A13 compatible string is preferred.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] pwm: sunxi: Add A64 support
[not found] ` <870861488014589-IyhJ2jtAr7tuio3avFS2gg@public.gmane.org>
2017-02-25 13:00 ` Siarhei Volkau
@ 2017-02-27 7:44 ` Maxime Ripard
1 sibling, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2017-02-27 7:44 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Chen-Yu Tsai, Thierry Reding, Rob Herring,
linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree,
linux-arm-kernel, linux-kernel, linux-sunxi
[-- Attachment #1: Type: text/plain, Size: 2008 bytes --]
On Sat, Feb 25, 2017 at 05:23:09PM +0800, Icenowy Zheng wrote:
>
>
> 25.02.2017, 16:53, "Chen-Yu Tsai" <wens-jdAy2FN1RRM@public.gmane.org>:
> > On Sat, Feb 25, 2017 at 3:42 PM, Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org> wrote:
> >> A64 PWM controller has same register layout as sun4i driver, so it works
> >> by adding A64 specific data.
> >>
> >> Signed-off-by: Icenowy Zheng <icenowy-ymACFijhrKM@public.gmane.org>
> >> ---
> >> drivers/pwm/pwm-sun4i.c | 9 +++++++++
> >> 1 file changed, 9 insertions(+)
> >>
> >> diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c
> >> index 1284ffa05921..ca3431e03fb8 100644
> >> --- a/drivers/pwm/pwm-sun4i.c
> >> +++ b/drivers/pwm/pwm-sun4i.c
> >> @@ -290,6 +290,12 @@ static const struct sun4i_pwm_data sun4i_pwm_data_h3 = {
> >> .npwm = 1,
> >> };
> >>
> >> +static const struct sun4i_pwm_data sun4i_pwm_data_a64 = {
> >> + .has_prescaler_bypass = true,
> >> + .has_rdy = true,
> >> + .npwm = 1,
> >> +};
> >> +
> >
> > This seems to be tha same as the H3. Any differences between the
> > H3 and A64? Otherwise please just use that compatible.
>
> H3 is also same as A13...
>
> See http://lists.infradead.org/pipermail/linux-arm-kernel/2017-February/486595.html
What I meant was that you should have a compatible in your DT like this:
compatible = "allwinner,sun50i-a64-pwm", "allwinner,sun5i-a13-pwm".
There's no need to add a new one in the driver (for now).
And you still haven't fixed the size.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-02-27 7:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-25 7:42 [PATCH 1/3] dt-bindings: add compatible for the PWM controller on Allwinner A64 Icenowy Zheng
[not found] ` <20170225074216.64868-1-icenowy-ymACFijhrKM@public.gmane.org>
2017-02-25 7:42 ` [PATCH 2/3] pwm: sunxi: Add A64 support Icenowy Zheng
[not found] ` <20170225074216.64868-2-icenowy-ymACFijhrKM@public.gmane.org>
2017-02-25 8:53 ` Chen-Yu Tsai
[not found] ` <CAGb2v67OaUps1yffyZ8pBvMwbAU+6WC2pPkt25e5i+SYU1nrDw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-25 9:23 ` Icenowy Zheng
[not found] ` <870861488014589-IyhJ2jtAr7tuio3avFS2gg@public.gmane.org>
2017-02-25 13:00 ` Siarhei Volkau
2017-02-27 7:44 ` Maxime Ripard
2017-02-25 7:42 ` [PATCH 3/3] arm64: dts: allwinner: add pwm device node for A64 Icenowy Zheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox