dt-bindings: pwm: ti,pwm-omap-dmtimer: Update binding for yaml
Subsystems (2)
PATCH v4 1/1 dt-bindings: pwm: ti,pwm-omap-dmtimer: Update binding for yaml
Update for yaml and remove the old txt binding.
As we can replace most of the custom timer API with standard Linux frameworks such as clock framework, let's tag the properties for ti,prescaler and ti,clock-source as deprecated.
---
Changes since v3:
- No changes, reposted without patch 1/2. The pwm.yaml related issues got fixed by commit 05b743db9d8c ("dt-bindings: pwm: restrict node name suffixes")
Changes since v2:
- Reviewed-by collected from Krzysztof, no changes
Changes since v1:
- Fix issues noticed by Krzysztof
--- .../bindings/pwm/pwm-omap-dmtimer.txt | 22 ------- .../bindings/pwm/ti,omap-dmtimer-pwm.yaml | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 22 deletions(-) delete mode 100644 Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt create mode 100644 Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml
Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt deleted +0 -22
@@ -1,22 +0,0 @@ -* OMAP PWM for dual-mode timers - -Required properties: -- compatible: Shall contain "ti,omap-dmtimer-pwm". -- ti,timers: phandle to PWM capable OMAP timer. See timer/ti,timer-dm.yaml for info - about these timers. -- #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of - the cells format. - -Optional properties: -- ti,prescaler: Should be a value between 0 and 7, see the timers datasheet -- ti,clock-source: Set dmtimer parent clock, values between 0 and 2: - - 0x00 - high-frequency system clock (timer_sys_ck) - - 0x01 - 32-kHz always-on clock (timer_32k_ck) - - 0x02 - external clock (timer_ext_ck, OMAP2 only) - -Example: - pwm9: dmtimer-pwm@9 { - compatible = "ti,omap-dmtimer-pwm"; - ti,timers = <&timer9>; - #pwm-cells = <3>; - };
Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml new file +59 -0
59 lines not on this page · raw message
Signature · 1 line
2.42.1
Hello,
Quoted 11 lines · Tony Lindgren
Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml new file +11
-0+ ti,timers: + description: Timer instance phandle for the PWM + $ref: /schemas/types.yaml#/definitions/phandle + + ti,prescaler: + description: | + Legacy clock prescaler for timer. The timer counter is prescaled + with 2^n where n is the prescaler. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ] + deprecated: true
Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml line 45
Quoted 10 lines
Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml new file +10
-0+ + ti,clock-source: + description: | + Legacy clock for timer, please use assigned-clocks instead. + 0x00 - high-frequency system clock (timer_sys_ck) + 0x01 - 32-kHz always-on clock (timer_32k_ck) + 0x02 - external clock (timer_ext_ck, OMAP2 only) + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2 ] + deprecated: true
Someone could collect some bonus points by converting these:
$ git grep ti,clock-source arch/arm/boot arch/arm/boot/dts/ti/omap/am335x-guardian.dts: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/am3517-evm.dts: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/logicpd-torpedo-baseboard.dtsi: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/omap3-n900.dts: ti,clock-source = <0x00>; /* timer_sys_ck */
(I verified, this are all about this binding.)
otherwise LGTM:
Should this go via the pwm tree or via some arm or omap or dt tree?
Best regards
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | https://www.pengutronix.de/ |
Quoted 36 lines · Uwe Kleine-König
Hello,
Quoted 11 lines · Tony Lindgren
Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml new file +11
-0+ ti,timers: + description: Timer instance phandle for the PWM + $ref: /schemas/types.yaml#/definitions/phandle + + ti,prescaler: + description: | + Legacy clock prescaler for timer. The timer counter is prescaled + with 2^n where n is the prescaler. + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2, 3, 4, 5, 6, 7 ] + deprecated: trueDocumentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml line 45
Quoted 10 lines
Documentation/devicetree/bindings/pwm/ti,omap-dmtimer-pwm.yaml new file +10
-0+ + ti,clock-source: + description: | + Legacy clock for timer, please use assigned-clocks instead. + 0x00 - high-frequency system clock (timer_sys_ck) + 0x01 - 32-kHz always-on clock (timer_32k_ck) + 0x02 - external clock (timer_ext_ck, OMAP2 only) + $ref: /schemas/types.yaml#/definitions/uint32 + enum: [ 0, 1, 2 ] + deprecated: trueSomeone could collect some bonus points by converting these:
$ git grep ti,clock-source arch/arm/boot arch/arm/boot/dts/ti/omap/am335x-guardian.dts: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/am3517-evm.dts: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/logicpd-torpedo-baseboard.dtsi: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/motorola-mapphone-common.dtsi: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi: ti,clock-source = <0x01>; arch/arm/boot/dts/ti/omap/omap3-n900.dts: ti,clock-source = <0x00>; /* timer_sys_ck */
Quoted 1 line
(I verified, this are all about this binding.)
Agreed, we should update all those.
Quoted 5 lines
otherwise LGTM:
Reviewed-by Uwe Kleine-König <[email protected]>Should this go via the pwm tree or via some arm or omap or dt tree?
Please take this via the pwm tree, there are no dependencies.
Regards,
Tony