| Message ID | 20250427142500.151925-1-privatesub2@gmail.com |
|---|---|
| Headers | show |
| Series | Add support for Allwinner PWM on D1/T113s/R329 SoCs | expand |
Hi Aleksandr, On Sun 27 Apr 25, 17:24, Aleksandr Shubin wrote: > 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 | 84 ++++ > .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 12 + > drivers/pwm/Kconfig | 10 + > drivers/pwm/Makefile | 1 + > drivers/pwm/pwm-sun20i.c | 379 ++++++++++++++++++ > 5 files changed, 486 insertions(+) > create mode 100644 Documentation/devicetree/bindings/pwm/allwinner,sun20i-pwm.yaml > create mode 100644 drivers/pwm/pwm-sun20i.c Thanks for your work on this driver! For context, this PWM controller seems to be a second-generation design from Allwinner, which is found in the following chips: V5, A50, H616, V536, T7, A133, V833, R329, D1/T113, R128, V851, A523 and A733. I've tested your driver on A133, which works fine too. It seems that H616 uses a similar (but slightly different) register layout. In case you've missed it, there's a follow-up series adding H616 support at: https://patchwork.ozlabs.org/project/linux-pwm/list/?series=409036&archive=both&state=* And there's also a standalone effort (which I've redirected to your series) at: https://patchwork.ozlabs.org/project/linux-pwm/list/?series=485644&archive=both&state=* Now given that the new controller was introduced with the V5 (sun8iw12) from 2018, I think it would be a bit confusing to keep the sun20i-pwm name. How about renaming the driver to sun8i-pwm instead? That would be more consistent with how other second generation designs from Allwinner are usually called in Linux and makes it more clear that it also targets sun8i and sun50i chips, in addition to sun20i. All the best, Paul
Hi Paul, Thanks a lot for the detailed review and for testing on A133 - great to hear it works there as well. Good point about the naming. I can rename the driver to sun8i-pwm and send a new patch series. Thanks again for the pointers and the context. Thanks again, Aleksandr чт, 22 янв. 2026 г. в 19:43, Paul Kocialkowski <paulk@sys-base.io>: > > Hi Aleksandr, > > On Sun 27 Apr 25, 17:24, Aleksandr Shubin wrote: > > 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 | 84 ++++ > > .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 12 + > > drivers/pwm/Kconfig | 10 + > > drivers/pwm/Makefile | 1 + > > drivers/pwm/pwm-sun20i.c | 379 ++++++++++++++++++ > > 5 files changed, 486 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/pwm/allwinner,sun20i-pwm.yaml > > create mode 100644 drivers/pwm/pwm-sun20i.c > > Thanks for your work on this driver! > > For context, this PWM controller seems to be a second-generation design from > Allwinner, which is found in the following chips: V5, A50, H616, V536, T7, A133, > V833, R329, D1/T113, R128, V851, A523 and A733. > > I've tested your driver on A133, which works fine too. It seems that H616 uses > a similar (but slightly different) register layout. > > In case you've missed it, there's a follow-up series adding H616 support at: > https://patchwork.ozlabs.org/project/linux-pwm/list/?series=409036&archive=both&state=* > > And there's also a standalone effort (which I've redirected to your series) at: > https://patchwork.ozlabs.org/project/linux-pwm/list/?series=485644&archive=both&state=* > > Now given that the new controller was introduced with the V5 (sun8iw12) from > 2018, I think it would be a bit confusing to keep the sun20i-pwm name. > > How about renaming the driver to sun8i-pwm instead? That would be more > consistent with how other second generation designs from Allwinner are usually > called in Linux and makes it more clear that it also targets sun8i and sun50i > chips, in addition to sun20i. > > All the best, > > Paul > > -- > Paul Kocialkowski, > > Independent contractor - sys-base - https://www.sys-base.io/ > Free software developer - https://www.paulk.fr/ > > Expert in multimedia, graphics and embedded hardware support with Linux.
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 v7: - fix a remark in the driver - add maintainer v8: - fix compile driver for 6.8-rc v9: - fix a remark in the driver - fix dt-bindings - rename apb0 -> apb v10: - fix a remark in the driver - fix compile driver for 6.12-rc2 v11: - fix a remark in the driver - fix compile driver for 6.14.0-rc2 v12: - fix a remark in the driver - fix a remark in the dt-bindings - check driver build on 6.15.0-rc3 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 | 84 ++++ .../boot/dts/allwinner/sunxi-d1s-t113.dtsi | 12 + drivers/pwm/Kconfig | 10 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-sun20i.c | 379 ++++++++++++++++++ 5 files changed, 486 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/allwinner,sun20i-pwm.yaml create mode 100644 drivers/pwm/pwm-sun20i.c