Skip to content

Commit 9476d41

Browse files
committed
Merge tag 'asahi-soc-dt-6.4-v2' of https://github.com/AsahiLinux/linux into soc/dt
Apple SoC DT updates for 6.4 (v2). A late addition to the tree, adding the PWM controllers and associated keyboard backlight nodes, since that driver and its bindings are now on the way to 6.4. * tag 'asahi-soc-dt-6.4-v2' of https://github.com/AsahiLinux/linux: arm64: dts: apple: t8112: Add PWM controller arm64: dts: apple: t600x: Add PWM controller arm64: dts: apple: t8103: Add PWM controller Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 1e14b4f + 50aa09a commit 9476d41

File tree

8 files changed

+113
-0
lines changed

8 files changed

+113
-0
lines changed

arch/arm64/boot/dts/apple/t600x-die0.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@
7171
power-domains = <&ps_sio_cpu>;
7272
};
7373

74+
fpwm0: pwm@39b030000 {
75+
compatible = "apple,t6000-fpwm", "apple,s5l-fpwm";
76+
reg = <0x3 0x9b030000 0x0 0x4000>;
77+
power-domains = <&ps_fpwm0>;
78+
clocks = <&clkref>;
79+
#pwm-cells = <2>;
80+
status = "disabled";
81+
};
82+
7483
i2c0: i2c@39b040000 {
7584
compatible = "apple,t6000-i2c", "apple,i2c";
7685
reg = <0x3 0x9b040000 0x0 0x4000>;

arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* Copyright The Asahi Linux Contributors
1010
*/
1111

12+
#include <dt-bindings/leds/common.h>
13+
1214
/ {
1315
aliases {
1416
serial0 = &serial0;
@@ -34,6 +36,18 @@
3436
device_type = "memory";
3537
reg = <0x100 0 0x2 0>; /* To be filled by loader */
3638
};
39+
40+
led-controller {
41+
compatible = "pwm-leds";
42+
led-0 {
43+
pwms = <&fpwm0 0 40000>;
44+
label = "kbd_backlight";
45+
function = LED_FUNCTION_KBD_BACKLIGHT;
46+
color = <LED_COLOR_ID_WHITE>;
47+
max-brightness = <255>;
48+
default-state = "keep";
49+
};
50+
};
3751
};
3852

3953
&serial0 {
@@ -101,3 +115,7 @@
101115
wp-inverted;
102116
};
103117
};
118+
119+
&fpwm0 {
120+
status = "okay";
121+
};

arch/arm64/boot/dts/apple/t8103-j293.dts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,23 @@
1111

1212
#include "t8103.dtsi"
1313
#include "t8103-jxxx.dtsi"
14+
#include <dt-bindings/leds/common.h>
1415

1516
/ {
1617
compatible = "apple,j293", "apple,t8103", "apple,arm-platform";
1718
model = "Apple MacBook Pro (13-inch, M1, 2020)";
19+
20+
led-controller {
21+
compatible = "pwm-leds";
22+
led-0 {
23+
pwms = <&fpwm1 0 40000>;
24+
label = "kbd_backlight";
25+
function = LED_FUNCTION_KBD_BACKLIGHT;
26+
color = <LED_COLOR_ID_WHITE>;
27+
max-brightness = <255>;
28+
default-state = "keep";
29+
};
30+
};
1831
};
1932

2033
&bluetooth0 {
@@ -32,3 +45,7 @@
3245
&i2c4 {
3346
status = "okay";
3447
};
48+
49+
&fpwm1 {
50+
status = "okay";
51+
};

arch/arm64/boot/dts/apple/t8103-j313.dts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,23 @@
1111

1212
#include "t8103.dtsi"
1313
#include "t8103-jxxx.dtsi"
14+
#include <dt-bindings/leds/common.h>
1415

1516
/ {
1617
compatible = "apple,j313", "apple,t8103", "apple,arm-platform";
1718
model = "Apple MacBook Air (M1, 2020)";
19+
20+
led-controller {
21+
compatible = "pwm-leds";
22+
led-0 {
23+
pwms = <&fpwm1 0 40000>;
24+
label = "kbd_backlight";
25+
function = LED_FUNCTION_KBD_BACKLIGHT;
26+
color = <LED_COLOR_ID_WHITE>;
27+
max-brightness = <255>;
28+
default-state = "keep";
29+
};
30+
};
1831
};
1932

2033
&bluetooth0 {
@@ -24,3 +37,7 @@
2437
&wifi0 {
2538
brcm,board-type = "apple,shikoku";
2639
};
40+
41+
&fpwm1 {
42+
status = "okay";
43+
};

arch/arm64/boot/dts/apple/t8103.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,15 @@
432432
status = "disabled"; /* only used in J293 */
433433
};
434434

435+
fpwm1: pwm@235044000 {
436+
compatible = "apple,t8103-fpwm", "apple,s5l-fpwm";
437+
reg = <0x2 0x35044000 0x0 0x4000>;
438+
power-domains = <&ps_fpwm1>;
439+
clocks = <&clkref>;
440+
#pwm-cells = <2>;
441+
status = "disabled";
442+
};
443+
435444
serial0: serial@235200000 {
436445
compatible = "apple,s5l-uart";
437446
reg = <0x2 0x35200000 0x0 0x1000>;

arch/arm64/boot/dts/apple/t8112-j413.dts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "t8112.dtsi"
1313
#include "t8112-jxxx.dtsi"
14+
#include <dt-bindings/leds/common.h>
1415

1516
/ {
1617
compatible = "apple,j413", "apple,t8112", "apple,arm-platform";
@@ -20,6 +21,18 @@
2021
bluetooth0 = &bluetooth0;
2122
wifi0 = &wifi0;
2223
};
24+
25+
led-controller {
26+
compatible = "pwm-leds";
27+
led-0 {
28+
pwms = <&fpwm1 0 40000>;
29+
label = "kbd_backlight";
30+
function = LED_FUNCTION_KBD_BACKLIGHT;
31+
color = <LED_COLOR_ID_WHITE>;
32+
max-brightness = <255>;
33+
default-state = "keep";
34+
};
35+
};
2336
};
2437

2538
/*
@@ -61,3 +74,7 @@
6174
&i2c4 {
6275
status = "okay";
6376
};
77+
78+
&fpwm1 {
79+
status = "okay";
80+
};

arch/arm64/boot/dts/apple/t8112-j493.dts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "t8112.dtsi"
1313
#include "t8112-jxxx.dtsi"
14+
#include <dt-bindings/leds/common.h>
1415

1516
/ {
1617
compatible = "apple,j493", "apple,t8112", "apple,arm-platform";
@@ -20,6 +21,18 @@
2021
bluetooth0 = &bluetooth0;
2122
wifi0 = &wifi0;
2223
};
24+
25+
led-controller {
26+
compatible = "pwm-leds";
27+
led-0 {
28+
pwms = <&fpwm1 0 40000>;
29+
label = "kbd_backlight";
30+
function = LED_FUNCTION_KBD_BACKLIGHT;
31+
color = <LED_COLOR_ID_WHITE>;
32+
max-brightness = <255>;
33+
default-state = "keep";
34+
};
35+
};
2336
};
2437

2538
/*
@@ -50,3 +63,7 @@
5063
&i2c4 {
5164
status = "okay";
5265
};
66+
67+
&fpwm1 {
68+
status = "okay";
69+
};

arch/arm64/boot/dts/apple/t8112.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,15 @@
458458
status = "disabled";
459459
};
460460

461+
fpwm1: pwm@235044000 {
462+
compatible = "apple,t8112-fpwm", "apple,s5l-fpwm";
463+
reg = <0x2 0x35044000 0x0 0x4000>;
464+
power-domains = <&ps_fpwm1>;
465+
clocks = <&clkref>;
466+
#pwm-cells = <2>;
467+
status = "disabled";
468+
};
469+
461470
serial0: serial@235200000 {
462471
compatible = "apple,s5l-uart";
463472
reg = <0x2 0x35200000 0x0 0x1000>;

0 commit comments

Comments
 (0)