mbox series

[v6,0/3] Add support for Allwinner PWM on D1/T113s/R329 SoCs

Message ID 20230824114038.891493-1-privatesub2@gmail.com (mailing list archive)
Headers show
Series Add support for Allwinner PWM on D1/T113s/R329 SoCs | expand

Message

Александр Шубин Aug. 24, 2023, 11:40 a.m. UTC
Hi,

This series adds support for PWM controller on new
Allwinner's SoCs, such as D1, T113s and R329. The implemented driver
provides basic functionality for control PWM channels.

v2:
 - fix dt-bindings
 - fix a remark in the driver

v3:
 - fix dt-bindings
 - fix sunxi-d1s-t113.dtsi

v4:
 - fix a remark in the driver

v5:
 - dropped unused varibale in the driver
 - fix dt-bindings

v6:
 - add apb0 clock

Aleksandr Shubin (3):
  dt-bindings: pwm: Add binding for Allwinner D1/T113-S3/R329 PWM
    controller
  pwm: Add Allwinner's D1/T113-S3/R329 SoCs PWM support
  riscv: dts: allwinner: d1: Add pwm node

 .../bindings/pwm/allwinner,sun20i-pwm.yaml    |  87 +++++
 .../boot/dts/allwinner/sunxi-d1s-t113.dtsi    |  12 +
 drivers/pwm/Kconfig                           |  10 +
 drivers/pwm/Makefile                          |   1 +
 drivers/pwm/pwm-sun20i.c                      | 328 ++++++++++++++++++
 5 files changed, 438 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/allwinner,sun20i-pwm.yaml
 create mode 100644 drivers/pwm/pwm-sun20i.c

Comments

John Watts Sept. 6, 2023, 2:46 a.m. UTC | #1
On Thu, Aug 24, 2023 at 02:40:24PM +0300, Aleksandr Shubin wrote:
> Hi,
> 
> This series adds support for PWM controller on new
> Allwinner's SoCs, such as D1, T113s and R329. The implemented driver
> provides basic functionality for control PWM channels.

I have tested this patch and earlier versions successfully on a Mango Pi MQ
Dual and verified it outputs a PWM signal.

John.
Uwe Kleine-König Sept. 21, 2023, 9:27 p.m. UTC | #2
Hi John,

On Wed, Sep 06, 2023 at 12:46:19PM +1000, John Watts wrote:
> On Thu, Aug 24, 2023 at 02:40:24PM +0300, Aleksandr Shubin wrote:
> > This series adds support for PWM controller on new
> > Allwinner's SoCs, such as D1, T113s and R329. The implemented driver
> > provides basic functionality for control PWM channels.
> 
> I have tested this patch and earlier versions successfully on a Mango Pi MQ
> Dual and verified it outputs a PWM signal.

If you want that documented, the usual thing to do is to include a
Tested-by: tag in your reply.

Best regards
Uwe
John Watts Sept. 21, 2023, 9:35 p.m. UTC | #3
On Thu, Sep 21, 2023 at 11:27:36PM +0200, Uwe Kleine-König wrote:
> Hi John,
> 
> On Wed, Sep 06, 2023 at 12:46:19PM +1000, John Watts wrote:
> > On Thu, Aug 24, 2023 at 02:40:24PM +0300, Aleksandr Shubin wrote:
> > > This series adds support for PWM controller on new
> > > Allwinner's SoCs, such as D1, T113s and R329. The implemented driver
> > > provides basic functionality for control PWM channels.
> > 
> > I have tested this patch and earlier versions successfully on a Mango Pi MQ
> > Dual and verified it outputs a PWM signal.
> 
> If you want that documented, the usual thing to do is to include a
> Tested-by: tag in your reply.

That's a good idea! I'll take a closer look under a scope and against the data
sheet and give another tested-by then when I can. I'm not sure how close that
gets to a reviewed-by but I don't have the experience in driver development to
know if something is off in the design.

> 
> Best regards
> Uwe

John.
Uwe Kleine-König Sept. 22, 2023, 6:47 a.m. UTC | #4
Hey John,

On Fri, Sep 22, 2023 at 07:35:19AM +1000, John Watts wrote:
> On Thu, Sep 21, 2023 at 11:27:36PM +0200, Uwe Kleine-König wrote:
> > Hi John,
> > 
> > On Wed, Sep 06, 2023 at 12:46:19PM +1000, John Watts wrote:
> > > On Thu, Aug 24, 2023 at 02:40:24PM +0300, Aleksandr Shubin wrote:
> > > > This series adds support for PWM controller on new
> > > > Allwinner's SoCs, such as D1, T113s and R329. The implemented driver
> > > > provides basic functionality for control PWM channels.
> > > 
> > > I have tested this patch and earlier versions successfully on a Mango Pi MQ
> > > Dual and verified it outputs a PWM signal.
> > 
> > If you want that documented, the usual thing to do is to include a
> > Tested-by: tag in your reply.
> 
> That's a good idea! I'll take a closer look under a scope and against the data
> sheet and give another tested-by then when I can. I'm not sure how close that
> gets to a reviewed-by but I don't have the experience in driver development to
> know if something is off in the design.

Tested-by has little to nothing to do with development or review. If you
tested that patch and it worked for you, that's enough to give such a
tag.

Best regards
Uwe
John Watts Sept. 25, 2023, 12:59 a.m. UTC | #5
On Thu, Aug 24, 2023 at 02:40:24PM +0300, Aleksandr Shubin wrote:
> Hi,
> 
> This series adds support for PWM controller on new
> Allwinner's SoCs, such as D1, T113s and R329. The implemented driver
> provides basic functionality for control PWM channels.

I did some more testing of this and it seems to work on my T113, outputting
correct periods and duty cycles.

Tested-by: John Watts <contact@jookia.org>

John.