mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
134 lines
3.8 KiB
Diff
134 lines
3.8 KiB
Diff
From 226311814eda36c1ad693189e5402ced55e91f11 Mon Sep 17 00:00:00 2001
|
|
From: Janne Grunau <j@jannau.net>
|
|
Date: Fri, 26 Nov 2021 00:24:15 +0100
|
|
Subject: [PATCH 004/171] arm64: dts: apple: t8103: Add spi3/keyboard nodes
|
|
|
|
Enables keyboard and touchpad input on MacBook Air (M1, 2020) and
|
|
MacBook Pro (13-inch, M1, 2020).
|
|
|
|
Signed-off-by: Janne Grunau <j@jannau.net>
|
|
---
|
|
arch/arm64/boot/dts/apple/t8103-j293.dts | 20 +++++++++++++++++
|
|
arch/arm64/boot/dts/apple/t8103-j313.dts | 20 +++++++++++++++++
|
|
arch/arm64/boot/dts/apple/t8103.dtsi | 28 ++++++++++++++++++++++++
|
|
3 files changed, 68 insertions(+)
|
|
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j293.dts b/arch/arm64/boot/dts/apple/t8103-j293.dts
|
|
index 6f08fd64f482..9405e97a85f2 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j293.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j293.dts
|
|
@@ -29,6 +29,26 @@ &typec1 {
|
|
label = "USB-C Left-front";
|
|
};
|
|
|
|
+&spi3 {
|
|
+ status = "okay";
|
|
+
|
|
+ hid-transport@0 {
|
|
+ compatible = "apple,spi-hid-transport";
|
|
+ reg = <0>;
|
|
+ spi-max-frequency = <8000000>;
|
|
+ /*
|
|
+ * cs-setup and cs-hold delays are derived from Apple's ADT
|
|
+ * Mac OS driver meta data secify 45 us for 'cs to clock' and
|
|
+ * 'clock to cs' delays.
|
|
+ */
|
|
+ spi-cs-setup-delay-ns = <20000>;
|
|
+ spi-cs-hold-delay-ns = <20000>;
|
|
+ spi-cs-inactive-delay-ns = <250000>;
|
|
+ spien-gpios = <&pinctrl_ap 195 0>;
|
|
+ interrupts-extended = <&pinctrl_nub 13 IRQ_TYPE_LEVEL_LOW>;
|
|
+ };
|
|
+};
|
|
+
|
|
/*
|
|
* Remove unused PCIe ports and disable the associated DARTs.
|
|
*/
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j313.dts b/arch/arm64/boot/dts/apple/t8103-j313.dts
|
|
index 114aa87c8cb4..bc84f8af0b1d 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j313.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j313.dts
|
|
@@ -29,6 +29,26 @@ &typec1 {
|
|
label = "USB-C Left-front";
|
|
};
|
|
|
|
+&spi3 {
|
|
+ status = "okay";
|
|
+
|
|
+ hid-transport@0 {
|
|
+ compatible = "apple,spi-hid-transport";
|
|
+ reg = <0>;
|
|
+ spi-max-frequency = <8000000>;
|
|
+ /*
|
|
+ * cs-setup and cs-hold delays are derived from Apple's ADT
|
|
+ * Mac OS driver meta data secify 45 us for 'cs to clock' and
|
|
+ * 'clock to cs' delays.
|
|
+ */
|
|
+ spi-cs-setup-delay-ns = <20000>;
|
|
+ spi-cs-hold-delay-ns = <20000>;
|
|
+ spi-cs-inactive-delay-ns = <250000>;
|
|
+ spien-gpios = <&pinctrl_ap 195 0>;
|
|
+ interrupts-extended = <&pinctrl_nub 13 IRQ_TYPE_LEVEL_LOW>;
|
|
+ };
|
|
+};
|
|
+
|
|
/*
|
|
* Remove unused PCIe ports and disable the associated DARTs.
|
|
*/
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi
|
|
index ec7234cdc861..9750438c30dd 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103.dtsi
|
|
+++ b/arch/arm64/boot/dts/apple/t8103.dtsi
|
|
@@ -290,6 +290,13 @@ clkref: clock-ref {
|
|
clock-output-names = "clkref";
|
|
};
|
|
|
|
+ clk_120m: clock-120m {
|
|
+ compatible = "fixed-clock";
|
|
+ #clock-cells = <0>;
|
|
+ clock-frequency = <120000000>;
|
|
+ clock-output-names = "clk_120m";
|
|
+ };
|
|
+
|
|
soc {
|
|
compatible = "simple-bus";
|
|
#address-cells = <2>;
|
|
@@ -374,6 +381,20 @@ i2c4: i2c@235020000 {
|
|
status = "disabled"; /* only used in J293 */
|
|
};
|
|
|
|
+ spi3: spi@23510c000 {
|
|
+ compatible = "apple,t8103-spi", "apple,spi";
|
|
+ reg = <0x2 0x3510c000 0x0 0x4000>;
|
|
+ interrupt-parent = <&aic>;
|
|
+ interrupts = <AIC_IRQ 617 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ clocks = <&clk_120m>;
|
|
+ pinctrl-0 = <&spi3_pins>;
|
|
+ pinctrl-names = "default";
|
|
+ power-domains = <&ps_spi3>;
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ status = "disabled"; /* only used in J293/J313 */
|
|
+ };
|
|
+
|
|
serial0: serial@235200000 {
|
|
compatible = "apple,s5l-uart";
|
|
reg = <0x2 0x35200000 0x0 0x1000>;
|
|
@@ -475,6 +496,13 @@ i2c4_pins: i2c4-pins {
|
|
<APPLE_PINMUX(134, 1)>;
|
|
};
|
|
|
|
+ spi3_pins: spi3-pins {
|
|
+ pinmux = <APPLE_PINMUX(46, 1)>,
|
|
+ <APPLE_PINMUX(47, 1)>,
|
|
+ <APPLE_PINMUX(48, 1)>,
|
|
+ <APPLE_PINMUX(49, 1)>;
|
|
+ };
|
|
+
|
|
pcie_pins: pcie-pins {
|
|
pinmux = <APPLE_PINMUX(150, 1)>,
|
|
<APPLE_PINMUX(151, 1)>,
|
|
--
|
|
2.34.1
|
|
|