All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Heiko Stuebner <heiko@sntech.de>,
	Caesar Wang <caesar.wang@rock-chips.com>,
	Sonny Rao <sonnyrao@chromium.org>,
	Olof Johansson <olof@lixom.net>,
	Eddie Cai <eddie.cai@rock-chips.com>,
	Russell King <linux@arm.linux.org.uk>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/4] ARM: rockchip: rk3288: Switch to use the proper PWM IP
Date: Thu, 21 Aug 2014 08:39:43 -0700	[thread overview]
Message-ID: <CAD=FV=WdJhGD=oSKGgAmHNgPmEfmp4rXtCxsjEdaijVK=dW=sA@mail.gmail.com> (raw)
In-Reply-To: <20140821062420.GA4486@ulmo>

Thierry and Heiko

On Wed, Aug 20, 2014 at 11:24 PM, Thierry Reding
<thierry.reding@gmail.com> wrote:
> On Wed, Aug 20, 2014 at 08:55:09AM -0700, Doug Anderson wrote:
>> On Wed, Aug 20, 2014 at 8:38 AM, Thierry Reding <thierry.reding@gmail.com> wrote:
> [...]
>> > Looking at the register offsets in the device tree that seems likely. At
>> > least PWMs 0 and 1 as well as 2 and 3 seem like they could be in the
>> > same IP block. Their placement in the register map is somewhat strange:
>> >
>> >         pwm0: pwm@20030000 {
>> >                 ...
>> >                 reg = <0x20030000 0x10>;
>> >                 ...
>> >                 clocks = <&cru PCLK_PWM01>;
>> >                 ...
>> >         };
>> >
>> >         pwm1: pwm@20030010 {
>> >                 ...
>> >                 reg = <0x20030010 0x10>;
>> >                 ...
>> >                 clocks = <&cru PCLK_PWM01>;
>> >                 ...
>> >         };
>> >
>> >         ...
>> >
>> >         pwm2: pwm@20050020 {
>> >                 ...
>> >                 reg = <0x20050020 0x10>;
>> >                 ...
>> >                 clocks = <&cru PCLK_PWM23>;
>> >                 ...
>> >         };
>> >
>> >         pwm3: pwm@20050030 {
>> >                 ...
>> >                 reg = <0x20050030 0x10>;
>> >                 ...
>> >                 clocks = <&cru PCLK_PWM23>;
>> >                 ...
>> >         };
>>
>> Ah, you're looking at "rk3xxx.dtsi".  That doesn't apply to rk3288
>> (the downsides of trying to guess ahead of time what SoC vendors will
>> name new models).
>>
>> In rk3288 they have the same clocks.  See patch #3 in this series.
>>
>>
>> > The clocks would also indicate that there are actually two blocks. I
>> > seem to remember a discussion about whether to handle them as a single
>> > block or two/four, but I can't seem to find a reference to it. Maybe I'm
>> > confusing it with another driver.
>>
>> At this point it seems like the choice has already been made to handle
>> them as separate PWMs.  I can change this choice if you want...
>
> Well, looking at patch 3/4 this really does seem to be one single block
> providing four PWM channels, so the right thing to do would be to
> represent it in one device tree node. But I'll leave it up to Heiko to
> decide how he wants to handle this.
>
> One downside of describing it as one device is that it would make the
> pinmux handling slightly more difficult, since presumably you'd only
> want to apply the pinmux settings when a channel is actually being used.
> Currently the pinmux doesn't apply as long as the device remains
> disabled in device tree (though enabling it doesn't necessarily mean
> that it's being used).
>
> Like I said, it's up to Heiko to decide whether it's worth making this
> change (and it'd make sense to apply it to existing DTS files
> retroactively) or better to keep what we have.

Please let me know if you'd like me to spin.  Otherwise I'll assume
this is OK as is.

-Doug

WARNING: multiple messages have this Message-ID (diff)
From: dianders@chromium.org (Doug Anderson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] ARM: rockchip: rk3288: Switch to use the proper PWM IP
Date: Thu, 21 Aug 2014 08:39:43 -0700	[thread overview]
Message-ID: <CAD=FV=WdJhGD=oSKGgAmHNgPmEfmp4rXtCxsjEdaijVK=dW=sA@mail.gmail.com> (raw)
In-Reply-To: <20140821062420.GA4486@ulmo>

Thierry and Heiko

On Wed, Aug 20, 2014 at 11:24 PM, Thierry Reding
<thierry.reding@gmail.com> wrote:
> On Wed, Aug 20, 2014 at 08:55:09AM -0700, Doug Anderson wrote:
>> On Wed, Aug 20, 2014 at 8:38 AM, Thierry Reding <thierry.reding@gmail.com> wrote:
> [...]
>> > Looking at the register offsets in the device tree that seems likely. At
>> > least PWMs 0 and 1 as well as 2 and 3 seem like they could be in the
>> > same IP block. Their placement in the register map is somewhat strange:
>> >
>> >         pwm0: pwm at 20030000 {
>> >                 ...
>> >                 reg = <0x20030000 0x10>;
>> >                 ...
>> >                 clocks = <&cru PCLK_PWM01>;
>> >                 ...
>> >         };
>> >
>> >         pwm1: pwm at 20030010 {
>> >                 ...
>> >                 reg = <0x20030010 0x10>;
>> >                 ...
>> >                 clocks = <&cru PCLK_PWM01>;
>> >                 ...
>> >         };
>> >
>> >         ...
>> >
>> >         pwm2: pwm at 20050020 {
>> >                 ...
>> >                 reg = <0x20050020 0x10>;
>> >                 ...
>> >                 clocks = <&cru PCLK_PWM23>;
>> >                 ...
>> >         };
>> >
>> >         pwm3: pwm at 20050030 {
>> >                 ...
>> >                 reg = <0x20050030 0x10>;
>> >                 ...
>> >                 clocks = <&cru PCLK_PWM23>;
>> >                 ...
>> >         };
>>
>> Ah, you're looking at "rk3xxx.dtsi".  That doesn't apply to rk3288
>> (the downsides of trying to guess ahead of time what SoC vendors will
>> name new models).
>>
>> In rk3288 they have the same clocks.  See patch #3 in this series.
>>
>>
>> > The clocks would also indicate that there are actually two blocks. I
>> > seem to remember a discussion about whether to handle them as a single
>> > block or two/four, but I can't seem to find a reference to it. Maybe I'm
>> > confusing it with another driver.
>>
>> At this point it seems like the choice has already been made to handle
>> them as separate PWMs.  I can change this choice if you want...
>
> Well, looking at patch 3/4 this really does seem to be one single block
> providing four PWM channels, so the right thing to do would be to
> represent it in one device tree node. But I'll leave it up to Heiko to
> decide how he wants to handle this.
>
> One downside of describing it as one device is that it would make the
> pinmux handling slightly more difficult, since presumably you'd only
> want to apply the pinmux settings when a channel is actually being used.
> Currently the pinmux doesn't apply as long as the device remains
> disabled in device tree (though enabling it doesn't necessarily mean
> that it's being used).
>
> Like I said, it's up to Heiko to decide whether it's worth making this
> change (and it'd make sense to apply it to existing DTS files
> retroactively) or better to keep what we have.

Please let me know if you'd like me to spin.  Otherwise I'll assume
this is OK as is.

-Doug

  reply	other threads:[~2014-08-21 15:39 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18 17:09 [PATCH 0/4] PWM changes for rk3288-evb Doug Anderson
2014-08-18 17:09 ` Doug Anderson
2014-08-18 17:09 ` [PATCH 1/4] ARM: rockchip: rk3288: Switch to use the proper PWM IP Doug Anderson
2014-08-18 17:09   ` Doug Anderson
2014-08-18 17:11   ` Sonny Rao
2014-08-18 17:11     ` Sonny Rao
2014-08-18 17:19     ` Doug Anderson
2014-08-18 17:19       ` Doug Anderson
2014-08-19  7:10   ` Thierry Reding
2014-08-19  7:10     ` Thierry Reding
2014-08-19 15:18     ` Doug Anderson
2014-08-19 15:18       ` Doug Anderson
2014-08-20  6:08       ` Thierry Reding
2014-08-20  6:08         ` Thierry Reding
2014-08-20 15:20         ` Doug Anderson
2014-08-20 15:20           ` Doug Anderson
2014-08-20 15:38           ` Thierry Reding
2014-08-20 15:38             ` Thierry Reding
2014-08-20 15:55             ` Doug Anderson
2014-08-20 15:55               ` Doug Anderson
2014-08-20 16:20               ` Heiko Stübner
2014-08-20 16:20                 ` Heiko Stübner
2014-08-20 16:27                 ` Doug Anderson
2014-08-20 16:27                   ` Doug Anderson
2014-08-20 18:03                   ` Heiko Stübner
2014-08-20 18:03                     ` Heiko Stübner
2014-08-20 20:49                     ` Doug Anderson
2014-08-20 20:49                       ` Doug Anderson
2014-08-21  6:36                 ` Thierry Reding
2014-08-21  6:36                   ` Thierry Reding
2014-08-21 15:38                   ` Doug Anderson
2014-08-21 15:38                     ` Doug Anderson
2014-08-21 15:49                     ` Tomasz Figa
2014-08-21 15:49                       ` Tomasz Figa
2014-08-21 16:49                       ` Thierry Reding
2014-08-21 16:49                         ` Thierry Reding
2014-08-21 16:47                     ` Thierry Reding
2014-08-21 16:47                       ` Thierry Reding
2014-08-25 23:40                       ` Doug Anderson
2014-08-25 23:40                         ` Doug Anderson
2014-08-26  7:31                         ` Thierry Reding
2014-08-26  7:31                           ` Thierry Reding
2014-08-21  6:24               ` Thierry Reding
2014-08-21  6:24                 ` Thierry Reding
2014-08-21 15:39                 ` Doug Anderson [this message]
2014-08-21 15:39                   ` Doug Anderson
2014-08-21 15:53                 ` Heiko Stübner
2014-08-21 15:53                   ` Heiko Stübner
2014-08-18 17:09 ` [PATCH 2/4] pwm: rockchip: Allow polarity invert on rk3288 Doug Anderson
2014-08-18 17:09   ` Doug Anderson
2014-08-18 17:09   ` Doug Anderson
2014-08-19  7:18   ` Thierry Reding
2014-08-19  7:18     ` Thierry Reding
2014-08-19 16:05     ` Doug Anderson
2014-08-19 16:05       ` Doug Anderson
2014-08-19 16:05       ` Doug Anderson
2014-08-20  6:09       ` Thierry Reding
2014-08-20  6:09         ` Thierry Reding
2014-08-20  6:09         ` Thierry Reding
2014-08-18 17:09 ` [PATCH 3/4] ARM: dts: Add main PWM info to rk3288 Doug Anderson
2014-08-18 17:09   ` Doug Anderson
2014-08-18 17:09 ` [PATCH 4/4] ARM: dts: Enable pwm backlight on rk3288-EVB Doug Anderson
2014-08-18 17:09   ` Doug Anderson
2014-08-19  7:22   ` Thierry Reding
2014-08-19  7:22     ` Thierry Reding
2014-08-19  7:22     ` Thierry Reding
2014-08-19 16:05     ` Doug Anderson
2014-08-19 16:05       ` Doug Anderson
2014-08-19 16:05       ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD=FV=WdJhGD=oSKGgAmHNgPmEfmp4rXtCxsjEdaijVK=dW=sA@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=caesar.wang@rock-chips.com \
    --cc=eddie.cai@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=olof@lixom.net \
    --cc=sonnyrao@chromium.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.