Skip to content

Commit

Permalink
arm64: dts: apple: t8103: Add spi3 keyboard node
Browse files Browse the repository at this point in the history
Enables keyboard and touchpad input on MacBook Air (M1, 2020) and
MacBook Pro (13-inch, M1, 2020).

Signed-off-by: Janne Grunau <[email protected]>
  • Loading branch information
jannau committed Nov 27, 2024
1 parent 9a6f5d1 commit 3469644
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions arch/arm64/boot/dts/apple/t8103-j293.dts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,27 @@
label = "USB-C Left-front";
};

&spi3 {
status = "okay";

hid-transport@0 {
compatible = "apple,spi-hid-transport";
reg = <0>;
spi-max-frequency = <8000000>;
/*
* Apple's ADT specifies 20us CS change delays, and the
* SPI HID interface metadata specifies 45us. Using either
* seems not to be reliable, but adding both works, so
* best guess is they are cumulative.
*/
spi-cs-setup-delay-ns = <65000>;
spi-cs-hold-delay-ns = <65000>;
spi-cs-inactive-delay-ns = <250000>;
spien-gpios = <&pinctrl_ap 195 0>;
interrupts-extended = <&pinctrl_nub 13 IRQ_TYPE_LEVEL_LOW>;
};
};

&i2c2 {
status = "okay";
};
Expand Down
21 changes: 21 additions & 0 deletions arch/arm64/boot/dts/apple/t8103-j313.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,24 @@
&typec1 {
label = "USB-C Left-front";
};

&spi3 {
status = "okay";

hid-transport@0 {
compatible = "apple,spi-hid-transport";
reg = <0>;
spi-max-frequency = <8000000>;
/*
* Apple's ADT specifies 20us CS change delays, and the
* SPI HID interface metadata specifies 45us. Using either
* seems not to be reliable, but adding both works, so
* best guess is they are cumulative.
*/
spi-cs-setup-delay-ns = <65000>;
spi-cs-hold-delay-ns = <65000>;
spi-cs-inactive-delay-ns = <250000>;
spien-gpios = <&pinctrl_ap 195 0>;
interrupts-extended = <&pinctrl_nub 13 IRQ_TYPE_LEVEL_LOW>;
};
};

0 comments on commit 3469644

Please sign in to comment.