Skip to content

Commit f6e639b

Browse files
committed
arm64: dts: apple: Add MTP DockChannel to M3 device tree
The internal keyboard and trackpad HID on MacBook variants of the Apple M3 (t8122) SoC are connected through a Apple -developed protocol called DockChannel and mediated by a coprocessor known as the Multi-Touch Processor (MTP). This commit adds the nessecary device tree nodes to the M3's device tree for internal HID to work. It is disabled by default, to be enabled only in MackBook board files where it is tested and confirmed to work. Signed-off-by: Michael Reeves <[email protected]>
1 parent ddb3a57 commit f6e639b

1 file changed

Lines changed: 79 additions & 0 deletions

File tree

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

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,85 @@
671671
<AIC_IRQ 351 IRQ_TYPE_LEVEL_HIGH>,
672672
<AIC_IRQ 352 IRQ_TYPE_LEVEL_HIGH>;
673673
};
674+
675+
mtp: mtp@2fa400000 {
676+
compatible = "apple,t8122-mtp", "apple,t8122-rtk-helper-asc4", "apple,mtp", "apple,rtk-helper-asc4";
677+
reg = <0x2 0xfa400000 0x0 0x4000>,
678+
<0x2 0xfa050000 0x0 0x100000>;
679+
reg-names = "asc", "sram";
680+
681+
mboxes = <&mtp_mbox>;
682+
iommus = <&mtp_dart 1>;
683+
#helper-cells = <0>;
684+
685+
status = "disabled";
686+
};
687+
688+
mtp_mbox: mbox@2fa408000 {
689+
compatible = "apple,t8122-asc-mailbox", "apple,asc-mailbox-v4";
690+
reg = <0x2 0xfa408000 0x0 0x4000>;
691+
692+
interrupt-parent = <&aic>;
693+
interrupts = <AIC_IRQ 838 IRQ_TYPE_LEVEL_HIGH>,
694+
<AIC_IRQ 839 IRQ_TYPE_LEVEL_HIGH>,
695+
<AIC_IRQ 840 IRQ_TYPE_LEVEL_HIGH>,
696+
<AIC_IRQ 841 IRQ_TYPE_LEVEL_HIGH>;
697+
interrupt-names = "send-empty", "send-not-empty",
698+
"recv-empty", "recv-not-empty";
699+
700+
#mbox-cells = <0>;
701+
702+
status = "disabled";
703+
};
704+
705+
mtp_dart: iommu@2fa808000 {
706+
compatible = "apple,t8122-dart", "apple,t8110-dart";
707+
reg = <0x2 0xfa808000 0x0 0x4000>;
708+
709+
interrupt-parent = <&aic>;
710+
interrupts = <AIC_IRQ 822 IRQ_TYPE_LEVEL_HIGH>;
711+
712+
#iommu-cells = <1>;
713+
714+
status = "disabled";
715+
};
716+
717+
mtp_dockchannel: fifo@2fab30000 {
718+
compatible = "apple,t8122-dockchannel", "apple,dockchannel";
719+
reg = <0x2 0xfab14000 0x0 0x4000>;
720+
reg-names = "irq";
721+
interrupt-parent = <&aic>;
722+
interrupts = <AIC_IRQ 824 IRQ_TYPE_LEVEL_HIGH>;
723+
724+
ranges = <0 0x2 0xfab30000 0x20000>;
725+
nonposted-mmio;
726+
#address-cells = <1>;
727+
#size-cells = <1>;
728+
729+
interrupt-controller;
730+
#interrupt-cells = <2>;
731+
732+
status = "disabled";
733+
734+
mtp_hid: input@8000 {
735+
compatible = "apple,dockchannel-hid";
736+
reg = <0x8000 0x4000>,
737+
<0xc000 0x4000>,
738+
<0x0000 0x4000>,
739+
<0x4000 0x4000>;
740+
reg-names = "rmt-config", "rmt-data", "config", "data";
741+
742+
iommus = <&mtp_dart 1>;
743+
744+
interrupt-parent = <&mtp_dockchannel>;
745+
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>,
746+
<3 IRQ_TYPE_LEVEL_HIGH>;
747+
interrupt-names = "tx", "rx";
748+
749+
apple,fifo-size = <0x800>;
750+
apple,helper-cpu = <&mtp>;
751+
};
752+
};
674753
};
675754
};
676755

0 commit comments

Comments
 (0)