Skip to content

Commit e6916c0

Browse files
IntegralPilotjannau
authored andcommitted
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 MacBook board files where it is tested and confirmed to work. Co-developed-by: Alyssa Milburn <amilburn@zall.org> Signed-off-by: Alyssa Milburn <amilburn@zall.org> Signed-off-by: Michael Reeves <michael.reeves077@gmail.com>
1 parent 4511a4b commit e6916c0

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

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

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,83 @@
544544
<AIC_IRQ 352 IRQ_TYPE_LEVEL_HIGH>;
545545
};
546546

547+
mtp: mtp@2fa400000 {
548+
compatible = "apple,t8122-mtp", "apple,t8122-rtk-helper-asc4", "apple,mtp", "apple,rtk-helper-asc4";
549+
reg = <0x2 0xfa400000 0x0 0x4000>,
550+
<0x2 0xfac00000 0x0 0x100000>;
551+
reg-names = "asc", "sram";
552+
553+
mboxes = <&mtp_mbox>;
554+
iommus = <&mtp_dart 1>;
555+
#helper-cells = <0>;
556+
557+
status = "disabled";
558+
};
559+
560+
mtp_mbox: mbox@2fa408000 {
561+
compatible = "apple,t8122-asc-mailbox", "apple,asc-mailbox-v4";
562+
reg = <0x2 0xfa408000 0x0 0x4000>;
563+
564+
interrupt-parent = <&aic>;
565+
interrupts = <AIC_IRQ 838 IRQ_TYPE_LEVEL_HIGH>,
566+
<AIC_IRQ 839 IRQ_TYPE_LEVEL_HIGH>,
567+
<AIC_IRQ 840 IRQ_TYPE_LEVEL_HIGH>,
568+
<AIC_IRQ 841 IRQ_TYPE_LEVEL_HIGH>;
569+
interrupt-names = "send-empty", "send-not-empty",
570+
"recv-empty", "recv-not-empty";
571+
#mbox-cells = <0>;
572+
status = "disabled";
573+
};
574+
575+
mtp_dart: iommu@2fa808000 {
576+
compatible = "apple,t8122-dart", "apple,t8110-dart";
577+
reg = <0x2 0xfa808000 0x0 0x4000>;
578+
579+
interrupt-parent = <&aic>;
580+
interrupts = <AIC_IRQ 822 IRQ_TYPE_LEVEL_HIGH>;
581+
582+
#iommu-cells = <1>;
583+
584+
status = "disabled";
585+
};
586+
587+
mtp_dockchannel: fifo@2fab30000 {
588+
compatible = "apple,t8122-dockchannel", "apple,dockchannel";
589+
reg = <0x2 0xfab14000 0x0 0x4000>;
590+
reg-names = "irq";
591+
interrupt-parent = <&aic>;
592+
interrupts = <AIC_IRQ 824 IRQ_TYPE_LEVEL_HIGH>;
593+
594+
ranges = <0 0x2 0xfab30000 0x20000>;
595+
nonposted-mmio;
596+
#address-cells = <1>;
597+
#size-cells = <1>;
598+
599+
interrupt-controller;
600+
#interrupt-cells = <2>;
601+
602+
status = "disabled";
603+
604+
mtp_hid: input@8000 {
605+
compatible = "apple,dockchannel-hid";
606+
reg = <0x8000 0x4000>,
607+
<0xc000 0x4000>,
608+
<0x0000 0x4000>,
609+
<0x4000 0x4000>;
610+
reg-names = "rmt-config", "rmt-data", "config", "data";
611+
612+
iommus = <&mtp_dart 1>;
613+
614+
interrupt-parent = <&mtp_dockchannel>;
615+
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>,
616+
<3 IRQ_TYPE_LEVEL_HIGH>;
617+
interrupt-names = "tx", "rx";
618+
619+
apple,fifo-size = <0x800>;
620+
apple,helper-cpu = <&mtp>;
621+
};
622+
};
623+
547624
ans_mbox: mbox@309408000 {
548625
compatible = "apple,t8122-asc-mailbox", "apple,asc-mailbox-v4";
549626
reg = <0x3 0x09408000 0x0 0x4000>;

0 commit comments

Comments
 (0)