From: Heiko Stuebner <heiko@sntech.de>
To: "Robin Murphy" <robin.murphy@arm.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Johan Jonker <jbx6244@gmail.com>,
thierry.reding@gmail.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org,
sebastian.reichel@collabora.com, wxt@rock-chips.com,
kever.yang@rock-chips.com, linux-pwm@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 2/2] ARM: dts: rk3288: add the interrupts property for PWM
Date: Wed, 19 Oct 2022 11:16:58 +0200 [thread overview]
Message-ID: <5883380.DvuYhMxLoT@phil> (raw)
In-Reply-To: <20221019072621.lh5hcznggbcscihf@pengutronix.de>
Am Mittwoch, 19. Oktober 2022, 09:26:21 CEST schrieb Uwe Kleine-König:
> On Thu, Sep 29, 2022 at 04:50:43PM +0100, Robin Murphy wrote:
> > On 2022-09-29 15:04, Johan Jonker wrote:
> > > The Rockchip rk3288 SoC has 4-built-in PWM channels.
> > >
> > > Configurable to operate in capture mode.
> > > Measures the high/low polarity effective cycles of this input waveform
> > > Generates a single interrupt at the transition of input waveform polarity
> > >
> > > Configurable to operate in continuous mode or one-shot mode.
> > > One-shot operation will produce N + 1 periods of the waveform,
> > > where N is the repeat counter value, and generates a single interrupt at
> > > the end of operation.
> > > Continuous mode generates the waveform continuously and
> > > do not generates any interrupts.
> > >
> > > Add interrupts property to rk3288 PWM nodes.
> >
> > As far as I can make out from the TRM, these are only valid when
> > GRF_SOC_CON2[0] = 0, otherwise it's in "new" RK_PWM mode using SPI 78 for
> > all channels. Which apparently will be the case for anyone using upstream
> > U-Boot:
> >
> > https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-rockchip/rk3288/rk3288.c#L83
>
> Huh, so it depends on a (software) setting which irqs are in use?
In the past when Rockchip swapped one IP block for another they often
had both in a soc for one generation (as a safeguard probably)
So the rk3288 has two different pwm implementations and the GRF
register selects which one is active.
Heiko
> So the
> patch isn't correct as is, but I have no idea how to make it right.
> Should we rely on the bootloader to fixup the dtb correctly?
>
> Anyhow, I'm marking the patch as 'changes-requested' in our patchwork
> instance.
>
> Best regards
> Uwe
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Heiko Stuebner <heiko@sntech.de>
To: "Robin Murphy" <robin.murphy@arm.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Johan Jonker <jbx6244@gmail.com>,
thierry.reding@gmail.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org,
sebastian.reichel@collabora.com, wxt@rock-chips.com,
kever.yang@rock-chips.com, linux-pwm@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 2/2] ARM: dts: rk3288: add the interrupts property for PWM
Date: Wed, 19 Oct 2022 11:16:58 +0200 [thread overview]
Message-ID: <5883380.DvuYhMxLoT@phil> (raw)
In-Reply-To: <20221019072621.lh5hcznggbcscihf@pengutronix.de>
Am Mittwoch, 19. Oktober 2022, 09:26:21 CEST schrieb Uwe Kleine-König:
> On Thu, Sep 29, 2022 at 04:50:43PM +0100, Robin Murphy wrote:
> > On 2022-09-29 15:04, Johan Jonker wrote:
> > > The Rockchip rk3288 SoC has 4-built-in PWM channels.
> > >
> > > Configurable to operate in capture mode.
> > > Measures the high/low polarity effective cycles of this input waveform
> > > Generates a single interrupt at the transition of input waveform polarity
> > >
> > > Configurable to operate in continuous mode or one-shot mode.
> > > One-shot operation will produce N + 1 periods of the waveform,
> > > where N is the repeat counter value, and generates a single interrupt at
> > > the end of operation.
> > > Continuous mode generates the waveform continuously and
> > > do not generates any interrupts.
> > >
> > > Add interrupts property to rk3288 PWM nodes.
> >
> > As far as I can make out from the TRM, these are only valid when
> > GRF_SOC_CON2[0] = 0, otherwise it's in "new" RK_PWM mode using SPI 78 for
> > all channels. Which apparently will be the case for anyone using upstream
> > U-Boot:
> >
> > https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-rockchip/rk3288/rk3288.c#L83
>
> Huh, so it depends on a (software) setting which irqs are in use?
In the past when Rockchip swapped one IP block for another they often
had both in a soc for one generation (as a safeguard probably)
So the rk3288 has two different pwm implementations and the GRF
register selects which one is active.
Heiko
> So the
> patch isn't correct as is, but I have no idea how to make it right.
> Should we rely on the bootloader to fixup the dtb correctly?
>
> Anyhow, I'm marking the patch as 'changes-requested' in our patchwork
> instance.
>
> Best regards
> Uwe
>
>
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Heiko Stuebner <heiko@sntech.de>
To: "Robin Murphy" <robin.murphy@arm.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Johan Jonker <jbx6244@gmail.com>,
thierry.reding@gmail.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org,
sebastian.reichel@collabora.com, wxt@rock-chips.com,
kever.yang@rock-chips.com, linux-pwm@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v1 2/2] ARM: dts: rk3288: add the interrupts property for PWM
Date: Wed, 19 Oct 2022 11:16:58 +0200 [thread overview]
Message-ID: <5883380.DvuYhMxLoT@phil> (raw)
In-Reply-To: <20221019072621.lh5hcznggbcscihf@pengutronix.de>
Am Mittwoch, 19. Oktober 2022, 09:26:21 CEST schrieb Uwe Kleine-König:
> On Thu, Sep 29, 2022 at 04:50:43PM +0100, Robin Murphy wrote:
> > On 2022-09-29 15:04, Johan Jonker wrote:
> > > The Rockchip rk3288 SoC has 4-built-in PWM channels.
> > >
> > > Configurable to operate in capture mode.
> > > Measures the high/low polarity effective cycles of this input waveform
> > > Generates a single interrupt at the transition of input waveform polarity
> > >
> > > Configurable to operate in continuous mode or one-shot mode.
> > > One-shot operation will produce N + 1 periods of the waveform,
> > > where N is the repeat counter value, and generates a single interrupt at
> > > the end of operation.
> > > Continuous mode generates the waveform continuously and
> > > do not generates any interrupts.
> > >
> > > Add interrupts property to rk3288 PWM nodes.
> >
> > As far as I can make out from the TRM, these are only valid when
> > GRF_SOC_CON2[0] = 0, otherwise it's in "new" RK_PWM mode using SPI 78 for
> > all channels. Which apparently will be the case for anyone using upstream
> > U-Boot:
> >
> > https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/mach-rockchip/rk3288/rk3288.c#L83
>
> Huh, so it depends on a (software) setting which irqs are in use?
In the past when Rockchip swapped one IP block for another they often
had both in a soc for one generation (as a safeguard probably)
So the rk3288 has two different pwm implementations and the GRF
register selects which one is active.
Heiko
> So the
> patch isn't correct as is, but I have no idea how to make it right.
> Should we rely on the bootloader to fixup the dtb correctly?
>
> Anyhow, I'm marking the patch as 'changes-requested' in our patchwork
> instance.
>
> Best regards
> Uwe
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-10-19 9:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-29 14:04 [RFC PATCH v1 2/2] ARM: dts: rk3288: add the interrupts property for PWM Johan Jonker
2022-09-29 14:04 ` Johan Jonker
2022-09-29 14:04 ` Johan Jonker
2022-09-29 15:50 ` Robin Murphy
2022-09-29 15:50 ` Robin Murphy
2022-09-29 15:50 ` Robin Murphy
2022-10-19 7:26 ` Uwe Kleine-König
2022-10-19 7:26 ` Uwe Kleine-König
2022-10-19 7:26 ` Uwe Kleine-König
2022-10-19 9:16 ` Heiko Stuebner [this message]
2022-10-19 9:16 ` Heiko Stuebner
2022-10-19 9:16 ` Heiko Stuebner
2022-09-30 19:55 ` Rob Herring
2022-09-30 19:55 ` Rob Herring
2022-09-30 19:55 ` Rob Herring
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=5883380.DvuYhMxLoT@phil \
--to=heiko@sntech.de \
--cc=devicetree@vger.kernel.org \
--cc=jbx6244@gmail.com \
--cc=kever.yang@rock-chips.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh+dt@kernel.org \
--cc=robin.murphy@arm.com \
--cc=sebastian.reichel@collabora.com \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
--cc=wxt@rock-chips.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.