Skip to content

Commit a6d0110

Browse files
alexandrebelloniambarus
authored andcommitted
ARM: dts: at91: kizbox: switch to new pwm-atmel-tcb binding
Switch to the new pwm-atmel-tcb binding that avoid wasting TCB channels. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Antoine Aubert <a.aubert@overkiz.com> Link: https://lore.kernel.org/r/20201030183658.1007395-5-alexandre.belloni@bootlin.com (cherry picked from commit 8caaf06) Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
1 parent 753b328 commit a6d0110

1 file changed

Lines changed: 30 additions & 15 deletions

File tree

arch/arm/boot/dts/at91-kizbox.dts

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,43 +53,32 @@
5353

5454
led-1 {
5555
label = "pwm:green:network";
56-
pwms = <&tcb_pwm 2 10000000 PWM_POLARITY_INVERTED>;
56+
pwms = <&tcb1_pwm1 0 10000000 PWM_POLARITY_INVERTED>;
5757
max-brightness = <255>;
5858
linux,default-trigger = "default-on";
5959
};
6060

6161
led-2 {
6262
label = "pwm:red:network";
63-
pwms = <&tcb_pwm 4 10000000 PWM_POLARITY_INVERTED>;
63+
pwms = <&tcb1_pwm2 0 10000000 PWM_POLARITY_INVERTED>;
6464
max-brightness = <255>;
6565
linux,default-trigger = "default-on";
6666
};
6767

6868
led-3 {
6969
label = "pwm:green:user";
70-
pwms = <&tcb_pwm 0 10000000 PWM_POLARITY_INVERTED>;
70+
pwms = <&tcb1_pwm0 0 10000000 PWM_POLARITY_INVERTED>;
7171
max-brightness = <255>;
7272
linux,default-trigger = "default-on";
7373
};
7474

7575
led-4 {
7676
label = "pwm:red:user";
77-
pwms = <&tcb_pwm 1 10000000 PWM_POLARITY_INVERTED>;
77+
pwms = <&tcb1_pwm0 1 10000000 PWM_POLARITY_INVERTED>;
7878
max-brightness = <255>;
7979
linux,default-trigger = "default-on";
8080
};
8181
};
82-
83-
tcb_pwm: pwm {
84-
compatible = "atmel,tcb-pwm";
85-
#pwm-cells = <3>;
86-
tc-block = <1>;
87-
pinctrl-names = "default";
88-
pinctrl-0 = <&pinctrl_tcb1_tioa0
89-
&pinctrl_tcb1_tioa1
90-
&pinctrl_tcb1_tioa2
91-
&pinctrl_tcb1_tiob0>;
92-
};
9382
};
9483

9584
&tcb0 {
@@ -104,6 +93,32 @@
10493
};
10594
};
10695

96+
&tcb1 {
97+
tcb1_pwm0: pwm@0 {
98+
compatible = "atmel,tcb-pwm";
99+
reg = <0>;
100+
#pwm-cells = <3>;
101+
pinctrl-names = "default";
102+
pinctrl-0 = <&pinctrl_tcb1_tioa0 &pinctrl_tcb1_tiob0>;
103+
};
104+
105+
tcb1_pwm1: pwm@1 {
106+
compatible = "atmel,tcb-pwm";
107+
reg = <1>;
108+
#pwm-cells = <3>;
109+
pinctrl-names = "default";
110+
pinctrl-0 = <&pinctrl_tcb1_tioa1>;
111+
};
112+
113+
tcb1_pwm2: pwm@2 {
114+
compatible = "atmel,tcb-pwm";
115+
reg = <2>;
116+
#pwm-cells = <3>;
117+
pinctrl-names = "default";
118+
pinctrl-0 = <&pinctrl_tcb1_tioa2>;
119+
};
120+
};
121+
107122
&ebi {
108123
status = "okay";
109124
};

0 commit comments

Comments
 (0)