Thread (16 messages) flat view 16 messages, 3 authors, 2021-06-13

Re: [PATCH v2 3/5] ARM: dts: NSP: Add common bindings for MX64/MX65

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-06-13 02:04:42
Also in: linux-devicetree, lkml


On 6/12/2021 4:14 PM, Matthew Hagan wrote:
[snip]
quoted
quoted
+	pwm-leds {
+		compatible = "pwm-leds";
+
+		red {
+			label = "red:led";
+			pwms = <&pwm 1 50000>;
+		};
+
+		green {
+			label = "green:led";
+			pwms = <&pwm 2 50000>;
+		};
+
+		blue {
+			label = "blue:led";
+			pwms = <&pwm 3 50000>;
+		};
+	};
[snip]
quoted
What is the reason for overriding this to 2?
I can't provide an explanation other than that it only works at 2.

When set to 3 I get the following:

[    0.784051] OF: /pwm-leds/red: #pwm-cells = 3 found -1
[    0.789201] of_pwm_get(): can't parse "pwms" property
[    0.794295] leds_pwm pwm-leds: error -EINVAL: unable to request PWM for red:led
[    0.801628] leds_pwm: probe of pwm-leds failed with error -22
Strange because with a #pwm-cells value of 3, of_pwm_xlate_with_flags()
would treat the flags as optional so the way you have put it looks
correct to me. I am not sure what the channel sub-nodes are supposed to
do, they do not appear to be documented properties or parsed by the PWM
core?

Is your Device Tree possibly corrupted here?
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help