Skip to content

Commit e6884f2

Browse files
xdarklightsuperna9999
authored andcommitted
arm64: dts: amlogic: g12: switch to the new PWM controller binding
Use the new PWM controller binding which now relies on passing all clock inputs available on the SoC (instead of passing the "wanted" clock input for a given board). Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241227212514.1376682-6-martin.blumenstingl@googlemail.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
1 parent 0322ff4 commit e6884f2

19 files changed

Lines changed: 28 additions & 79 deletions

arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,8 +2060,11 @@
20602060
};
20612061

20622062
pwm_AO_cd: pwm@2000 {
2063-
compatible = "amlogic,meson-g12a-ao-pwm-cd";
2063+
compatible = "amlogic,meson-g12-pwm-v2",
2064+
"amlogic,meson8-pwm-v2";
20642065
reg = <0x0 0x2000 0x0 0x20>;
2066+
clocks = <&xtal>,
2067+
<&clkc_AO CLKID_AO_CLK81>;
20652068
#pwm-cells = <3>;
20662069
status = "disabled";
20672070
};
@@ -2099,8 +2102,13 @@
20992102
};
21002103

21012104
pwm_AO_ab: pwm@7000 {
2102-
compatible = "amlogic,meson-g12a-ao-pwm-ab";
2105+
compatible = "amlogic,meson-g12-pwm-v2",
2106+
"amlogic,meson8-pwm-v2";
21032107
reg = <0x0 0x7000 0x0 0x20>;
2108+
clocks = <&xtal>,
2109+
<&clkc_AO CLKID_AO_CLK81>,
2110+
<&clkc CLKID_FCLK_DIV4>,
2111+
<&clkc CLKID_FCLK_DIV5>;
21042112
#pwm-cells = <3>;
21052113
status = "disabled";
21062114
};
@@ -2301,22 +2309,37 @@
23012309
};
23022310

23032311
pwm_ef: pwm@19000 {
2304-
compatible = "amlogic,meson-g12a-ee-pwm";
2312+
compatible = "amlogic,meson-g12-pwm-v2",
2313+
"amlogic,meson8-pwm-v2";
23052314
reg = <0x0 0x19000 0x0 0x20>;
2315+
clocks = <&xtal>,
2316+
<>, /* unknown/untested, the datasheet calls it "vid_pll" */
2317+
<&clkc CLKID_FCLK_DIV4>,
2318+
<&clkc CLKID_FCLK_DIV3>;
23062319
#pwm-cells = <3>;
23072320
status = "disabled";
23082321
};
23092322

23102323
pwm_cd: pwm@1a000 {
2311-
compatible = "amlogic,meson-g12a-ee-pwm";
2324+
compatible = "amlogic,meson-g12-pwm-v2",
2325+
"amlogic,meson8-pwm-v2";
23122326
reg = <0x0 0x1a000 0x0 0x20>;
2327+
clocks = <&xtal>,
2328+
<>, /* unknown/untested, the datasheet calls it "vid_pll" */
2329+
<&clkc CLKID_FCLK_DIV4>,
2330+
<&clkc CLKID_FCLK_DIV3>;
23132331
#pwm-cells = <3>;
23142332
status = "disabled";
23152333
};
23162334

23172335
pwm_ab: pwm@1b000 {
2318-
compatible = "amlogic,meson-g12a-ee-pwm";
2336+
compatible = "amlogic,meson-g12-pwm-v2",
2337+
"amlogic,meson8-pwm-v2";
23192338
reg = <0x0 0x1b000 0x0 0x20>;
2339+
clocks = <&xtal>,
2340+
<>, /* unknown/untested, the datasheet calls it "vid_pll" */
2341+
<&clkc CLKID_FCLK_DIV4>,
2342+
<&clkc CLKID_FCLK_DIV3>;
23202343
#pwm-cells = <3>;
23212344
status = "disabled";
23222345
};

arch/arm64/boot/dts/amlogic/meson-g12a-fbx8am.dts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,17 +346,13 @@
346346
&pwm_AO_cd {
347347
pinctrl-0 = <&pwm_ao_d_e_pins>;
348348
pinctrl-names = "default";
349-
clocks = <&xtal>;
350-
clock-names = "clkin1";
351349
status = "okay";
352350
};
353351

354352
&pwm_ef {
355353
status = "okay";
356354
pinctrl-0 = <&pwm_e_pins>;
357355
pinctrl-names = "default";
358-
clocks = <&xtal>;
359-
clock-names = "clkin0";
360356
};
361357

362358
&pdm {

arch/arm64/boot/dts/amlogic/meson-g12a-radxa-zero.dts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,17 +284,13 @@
284284
&pwm_AO_cd {
285285
pinctrl-0 = <&pwm_ao_d_e_pins>;
286286
pinctrl-names = "default";
287-
clocks = <&xtal>;
288-
clock-names = "clkin1";
289287
status = "okay";
290288
};
291289

292290
&pwm_ef {
293291
status = "okay";
294292
pinctrl-0 = <&pwm_e_pins>;
295293
pinctrl-names = "default";
296-
clocks = <&xtal>;
297-
clock-names = "clkin0";
298294
};
299295

300296
&saradc {

arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,17 +389,13 @@
389389
&pwm_AO_cd {
390390
pinctrl-0 = <&pwm_ao_d_e_pins>;
391391
pinctrl-names = "default";
392-
clocks = <&xtal>;
393-
clock-names = "clkin1";
394392
status = "okay";
395393
};
396394

397395
&pwm_ef {
398396
status = "okay";
399397
pinctrl-0 = <&pwm_e_pins>;
400398
pinctrl-names = "default";
401-
clocks = <&xtal>;
402-
clock-names = "clkin0";
403399
};
404400

405401
&pdm {

arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,6 @@
502502
&pwm_AO_cd {
503503
pinctrl-0 = <&pwm_ao_d_e_pins>;
504504
pinctrl-names = "default";
505-
clocks = <&xtal>;
506-
clock-names = "clkin1";
507505
status = "okay";
508506
};
509507

arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,6 @@
328328
&pwm_AO_cd {
329329
pinctrl-0 = <&pwm_ao_d_e_pins>;
330330
pinctrl-names = "default";
331-
clocks = <&xtal>;
332-
clock-names = "clkin1";
333331
status = "okay";
334332
};
335333

@@ -363,8 +361,6 @@
363361
status = "okay";
364362
pinctrl-0 = <&pwm_e_pins>;
365363
pinctrl-names = "default";
366-
clocks = <&xtal>;
367-
clock-names = "clkin0";
368364
};
369365

370366
&uart_A {

arch/arm64/boot/dts/amlogic/meson-g12b-a311d-libretech-cc.dts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,4 @@
116116

117117
&pwm_ab {
118118
pinctrl-0 = <&pwm_a_e_pins>, <&pwm_b_x7_pins>;
119-
clocks = <&xtal>, <&xtal>;
120-
clock-names = "clkin0", "clkin1";
121119
};

arch/arm64/boot/dts/amlogic/meson-g12b-bananapi-cm4.dtsi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,6 @@
257257
&pwm_ab {
258258
pinctrl-0 = <&pwm_a_e_pins>;
259259
pinctrl-names = "default";
260-
clocks = <&xtal>;
261-
clock-names = "clkin0";
262260

263261
status = "okay";
264262
};
@@ -273,8 +271,6 @@
273271
&pwm_AO_cd {
274272
pinctrl-0 = <&pwm_ao_d_e_pins>;
275273
pinctrl-names = "default";
276-
clocks = <&xtal>;
277-
clock-names = "clkin1";
278274

279275
status = "okay";
280276
};

arch/arm64/boot/dts/amlogic/meson-g12b-bananapi.dtsi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,6 @@
367367
status = "okay";
368368
pinctrl-0 = <&pwm_a_e_pins>;
369369
pinctrl-names = "default";
370-
clocks = <&xtal>;
371-
clock-names = "clkin0";
372370
};
373371

374372
&pwm_ef {
@@ -380,8 +378,6 @@
380378
&pwm_AO_cd {
381379
pinctrl-0 = <&pwm_ao_d_e_pins>;
382380
pinctrl-names = "default";
383-
clocks = <&xtal>;
384-
clock-names = "clkin1";
385381
status = "okay";
386382
};
387383

arch/arm64/boot/dts/amlogic/meson-g12b-khadas-vim3.dtsi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,12 @@
9292
&pwm_ab {
9393
pinctrl-0 = <&pwm_a_e_pins>;
9494
pinctrl-names = "default";
95-
clocks = <&xtal>;
96-
clock-names = "clkin0";
9795
status = "okay";
9896
};
9997

10098
&pwm_AO_cd {
10199
pinctrl-0 = <&pwm_ao_d_e_pins>;
102100
pinctrl-names = "default";
103-
clocks = <&xtal>;
104-
clock-names = "clkin1";
105101
status = "okay";
106102
};
107103

0 commit comments

Comments
 (0)