arm: dts: lpc32xx: Set motor control PWM clock as required one
Vladimir Zapolskiy
maintainercover arm: dts: lpc32xx: Set motor control PWM clock as required one
Motor Control PWM depends on its own supply clock, the clock gate control is present in TIMCLK_CTRL1 register.
Vladimir Zapolskiy (2):
dt-bindings: pwm: nxp,lpc32xx-pwm: Specify clocks property as mandatory
arm: dts: lpc32xx: add clocks property to Motor Control PWM device tree node
Documentation/devicetree/bindings/pwm/nxp,lpc3220-pwm.yaml | 4 ++++ arch/arm/boot/dts/nxp/lpc/lpc32xx.dtsi | 1 + 2 files changed, 5 insertions(+)
Signature · 1 line
2.43.0
Vladimir Zapolskiy
maintainerPATCH 1/2 dt-bindings: pwm: nxp,lpc32xx-pwm: Specify clocks property as mandatory
Both described in the binding PWM controllers depend on supply clocks, thus it's necessary to specify 'clocks' property in the correspondent device tree nodes.
--- Documentation/devicetree/bindings/pwm/nxp,lpc3220-pwm.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/pwm/nxp,lpc3220-pwm.yaml +4 -0
@@ -27,6 +27,7 @@ properties: required: - compatible - reg + - clocks - '#pwm-cells' allOf:
@@ -36,9 +37,12 @@ unevaluatedProperties: false examples: - | + #include <dt-bindings/clock/lpc32xx-clock.h> + pwm@4005c000 { compatible = "nxp,lpc3220-pwm"; reg = <0x4005c000 0x4>; + clocks = <&clk LPC32XX_CLK_PWM1>; #pwm-cells = <3>; };
Signature · 1 line
2.43.0
Re: [PATCH 1/2] dt-bindings: pwm: nxp,lpc32xx-pwm: Specify clocks property as mandatory
Quoted 9 lines · Vladimir Zapolskiy
Both described in the binding PWM controllers depend on supply clocks, thus it's necessary to specify 'clocks' property in the correspondent device tree nodes.
Signed-off-by Vladimir Zapolskiy <[email protected]>--- Documentation/devicetree/bindings/pwm/nxp,lpc3220-pwm.yaml | 4 ++++ 1 file changed, 4 insertions(+)
Uwe Kleine-König
maintainerRe: [PATCH 1/2] dt-bindings: pwm: nxp,lpc32xx-pwm: Specify clocks property as mandatory
In reply to Vladimir ZapolskiyHello,
Quoted 5 lines · Vladimir Zapolskiy
Both described in the binding PWM controllers depend on supply clocks, thus it's necessary to specify 'clocks' property in the correspondent device tree nodes.
Signed-off-by Vladimir Zapolskiy <[email protected]>
LGTM, I applied it with Rob's Ack to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
as 6.20-rc1 material.
Best regards
Uwe
Vladimir Zapolskiy
maintainerPATCH 2/2 arm: dts: lpc32xx: add clocks property to Motor Control PWM device tree node
In reply to Vladimir ZapolskiyMotor Control PWM depends on its own supply clock, the clock gate control is present in TIMCLK_CTRL1 register.
--- arch/arm/boot/dts/nxp/lpc/lpc32xx.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/nxp/lpc/lpc32xx.dtsi +1 -0
@@ -304,6 +304,7 @@ i2c2: i2c@400a8000 { mpwm: pwm@400e8000 { compatible = "nxp,lpc3220-motor-pwm"; reg = <0x400e8000 0x78>; + clocks = <&clk LPC32XX_CLK_MCPWM>; #pwm-cells = <3>; status = "disabled"; };
Signature · 1 line
2.43.0
Rob Herring
maintainerRe: [PATCH 2/2] arm: dts: lpc32xx: add clocks property to Motor Control PWM device tree node
Quoted 2 lines · Vladimir Zapolskiy
Motor Control PWM depends on its own supply clock, the clock gate control is present in
TIMCLK_CTRL1register.
You say it is required, so does that mean this hasn't ever worked? Or it happened to work because something else turned on the clock?
Quoted 1 line
Fixes tag?
Quoted 20 lines
Signed-off-by Vladimir Zapolskiy <[email protected]>--- arch/arm/boot/dts/nxp/lpc/lpc32xx.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm/boot/dts/nxp/lpc/lpc32xx.dtsi +1
-0@@ -304,6 +304,7 @@ i2c2: i2c@400a8000 { mpwm: pwm@400e8000 { compatible = "nxp,lpc3220-motor-pwm"; reg = <0x400e8000 0x78>; + clocks = <&clk LPC32XX_CLK_MCPWM>; #pwm-cells = <3>; status = "disabled"; };Signature · 1 line
2.43.0
Vladimir Zapolskiy
maintainerRe: [PATCH 2/2] arm: dts: lpc32xx: add clocks property to Motor Control PWM device tree node
Quoted 6 lines · Rob Herring
Quoted 2 lines · Vladimir Zapolskiy
Motor Control PWM depends on its own supply clock, the clock gate control is present in
TIMCLK_CTRL1register.You say it is required, so does that mean this hasn't ever worked? Or it happened to work because something else turned on the clock?
There is no upstream driver for this particular PWM controller, I'm about to submit one though, and so far I've completed my review of its dt properties.
Quoted 3 lines
Quoted 1 line
Fixes tag?
It'd make sense, however as I've said above formally there is no fixed runtime bug, if the scope is limited to the upstream only.
Quoted 20 lines
Quoted 20 lines
Signed-off-by Vladimir Zapolskiy <[email protected]>--- arch/arm/boot/dts/nxp/lpc/lpc32xx.dtsi | 1 + 1 file changed, 1 insertion(+)arch/arm/boot/dts/nxp/lpc/lpc32xx.dtsi +1
-0@@ -304,6 +304,7 @@ i2c2: i2c@400a8000 { mpwm: pwm@400e8000 { compatible = "nxp,lpc3220-motor-pwm"; reg = <0x400e8000 0x78>; + clocks = <&clk LPC32XX_CLK_MCPWM>; #pwm-cells = <3>; status = "disabled"; };Signature · 1 line
2.43.0
Signature · 2 lines
Best wishes, Vladimir