diff mbox

[2/4] ARM: dts: sun8i: Add PWM channel 0 pinmux setting for A23/A33

Message ID 1442561739-6824-3-git-send-email-wens@csie.org (mailing list archive)
State New, archived
Headers show

Commit Message

Chen-Yu Tsai Sept. 18, 2015, 7:35 a.m. UTC
The PWM controller has 2 outputs, with one usable pin for each.

Add a pinmux setting for the first channel. This is often used
for backlight dimming on tablets.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-a23-a33.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Hans de Goede Sept. 18, 2015, 3:30 p.m. UTC | #1
Hi,

On 09/18/2015 03:35 AM, Chen-Yu Tsai wrote:
> The PWM controller has 2 outputs, with one usable pin for each.
>
> Add a pinmux setting for the first channel. This is often used
> for backlight dimming on tablets.
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>   arch/arm/boot/dts/sun8i-a23-a33.dtsi | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
> index e7054304018a..8f4db82084c5 100644
> --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
> +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
> @@ -412,6 +412,13 @@
>   				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>   			};
>
> +			pwm0_pins: pwm0 {

This should be "pwm0_pins_a: pwm0@0" so as to be consistent with the a10 / a20 dtsi
files.

Regards,

Hans

> +				allwinner,pins = "PH0";
> +				allwinner,function = "pwm0";
> +				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +			};
> +
>   			i2c0_pins_a: i2c0@0 {
>   				allwinner,pins = "PH2", "PH3";
>   				allwinner,function = "i2c0";
>
Chen-Yu Tsai Sept. 18, 2015, 4:18 p.m. UTC | #2
On Fri, Sep 18, 2015 at 11:30 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> Hi,
>
> On 09/18/2015 03:35 AM, Chen-Yu Tsai wrote:
>>
>> The PWM controller has 2 outputs, with one usable pin for each.
>>
>> Add a pinmux setting for the first channel. This is often used
>> for backlight dimming on tablets.
>>
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> ---
>>   arch/arm/boot/dts/sun8i-a23-a33.dtsi | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
>> b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
>> index e7054304018a..8f4db82084c5 100644
>> --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
>> +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
>> @@ -412,6 +412,13 @@
>>                                 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>>                         };
>>
>> +                       pwm0_pins: pwm0 {
>
>
> This should be "pwm0_pins_a: pwm0@0" so as to be consistent with the a10 /
> a20 dtsi
> files.

This is the only possible setting. I do not see why we need "_a" for the
label and "@0" for the name. IMHO they are used to avoid name clashes when
there are multiple possible pinmux settings.


Regards
ChenYu

> Regards,
>
> Hans
>
>
>> +                               allwinner,pins = "PH0";
>> +                               allwinner,function = "pwm0";
>> +                               allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +                               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>> +                       };
>> +
>>                         i2c0_pins_a: i2c0@0 {
>>                                 allwinner,pins = "PH2", "PH3";
>>                                 allwinner,function = "i2c0";
>>
>
Maxime Ripard Sept. 18, 2015, 7:33 p.m. UTC | #3
On Sat, Sep 19, 2015 at 12:18:04AM +0800, Chen-Yu Tsai wrote:
> On Fri, Sep 18, 2015 at 11:30 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> > Hi,
> >
> > On 09/18/2015 03:35 AM, Chen-Yu Tsai wrote:
> >>
> >> The PWM controller has 2 outputs, with one usable pin for each.
> >>
> >> Add a pinmux setting for the first channel. This is often used
> >> for backlight dimming on tablets.
> >>
> >> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> >> ---
> >>   arch/arm/boot/dts/sun8i-a23-a33.dtsi | 7 +++++++
> >>   1 file changed, 7 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
> >> b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
> >> index e7054304018a..8f4db82084c5 100644
> >> --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
> >> +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
> >> @@ -412,6 +412,13 @@
> >>                                 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> >>                         };
> >>
> >> +                       pwm0_pins: pwm0 {
> >
> >
> > This should be "pwm0_pins_a: pwm0@0" so as to be consistent with the a10 /
> > a20 dtsi
> > files.
> 
> This is the only possible setting. I do not see why we need "_a" for the
> label and "@0" for the name. IMHO they are used to avoid name clashes when
> there are multiple possible pinmux settings.

Yep, sounds reasonable, I applied the patch.

Maxime
diff mbox

Patch

diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
index e7054304018a..8f4db82084c5 100644
--- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
@@ -412,6 +412,13 @@ 
 				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 			};
 
+			pwm0_pins: pwm0 {
+				allwinner,pins = "PH0";
+				allwinner,function = "pwm0";
+				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+			};
+
 			i2c0_pins_a: i2c0@0 {
 				allwinner,pins = "PH2", "PH3";
 				allwinner,function = "i2c0";