Skip to content

Commit 4cc637d

Browse files
committed
Merge branch 'bits/230-touchbar' into asahi-wip
2 parents 8c7bfd0 + 9f3b0ff commit 4cc637d

File tree

11 files changed

+1536
-0
lines changed

11 files changed

+1536
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/input/touchscreen/apple,z2-touchscreen.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Apple touchscreens attached using the Z2 protocol.
8+
9+
maintainers:
10+
- asahi@lists.linux.dev
11+
- Sasha Finkelstein <fnkl.kernel@gmail.com>
12+
13+
description: A series of touschscreen controllers used in Apple products.
14+
15+
allOf:
16+
- $ref: touchscreen.yaml#
17+
- $ref: /schemas/spi/spi-peripheral-props.yaml#
18+
19+
properties:
20+
compatible:
21+
items:
22+
- enum:
23+
- apple,j293-touchbar
24+
- apple,j493-touchbar
25+
- const: apple,z2-touchbar
26+
- const: apple,z2-multitouch
27+
28+
reg:
29+
maxItems: 1
30+
31+
interrupts:
32+
maxItems: 1
33+
34+
reset-gpios:
35+
maxItems: 1
36+
37+
cs-gpios:
38+
maxItems: 1
39+
40+
firmware-name:
41+
maxItems: 1
42+
43+
label:
44+
maxItems: 1
45+
46+
touchscreen-size-x: true
47+
touchscreen-size-y: true
48+
spi-max-frequency: true
49+
spi-cs-hold-delay-ns: true
50+
spi-cs-setup-delay-ns: true
51+
52+
required:
53+
- compatible
54+
- interrupts
55+
- reset-gpios
56+
- firmware-name
57+
- label
58+
- touchscreen-size-x
59+
- touchscreen-size-y
60+
61+
additionalProperties: false
62+
63+
examples:
64+
- |
65+
#include <dt-bindings/gpio/gpio.h>
66+
#include <dt-bindings/interrupt-controller/irq.h>
67+
68+
spi {
69+
#address-cells = <1>;
70+
#size-cells = <0>;
71+
72+
touchscreen@0 {
73+
compatible = "apple,j293-touchbar", "apple,z2-touchbar",
74+
"apple,z2-multitouch";
75+
reg = <0>;
76+
spi-max-frequency = <11500000>;
77+
reset-gpios = <&pinctrl_ap 139 0>;
78+
cs-gpios = <&pinctrl_ap 109 0>;
79+
interrupts-extended = <&pinctrl_ap 194 IRQ_TYPE_EDGE_FALLING>;
80+
firmware-name = "apple/dfrmtfw-j293.bin";
81+
touchscreen-size-x = <23045>;
82+
touchscreen-size-y = <640>;
83+
label = "MacBookPro17,1 Touch Bar";
84+
};
85+
};
86+
87+
...

MAINTAINERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1943,6 +1943,7 @@ F: Documentation/devicetree/bindings/clock/apple,nco.yaml
19431943
F: Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml
19441944
F: Documentation/devicetree/bindings/dma/apple,admac.yaml
19451945
F: Documentation/devicetree/bindings/i2c/apple,i2c.yaml
1946+
F: Documentation/devicetree/bindings/input/touchscreen/apple,z2-touchscreen.yaml
19461947
F: Documentation/devicetree/bindings/interrupt-controller/apple,*
19471948
F: Documentation/devicetree/bindings/iommu/apple,dart.yaml
19481949
F: Documentation/devicetree/bindings/iommu/apple,sart.yaml
@@ -1962,9 +1963,11 @@ F: drivers/bluetooth/hci_bcm4377.c
19621963
F: drivers/clk/clk-apple-nco.c
19631964
F: drivers/cpufreq/apple-soc-cpufreq.c
19641965
F: drivers/dma/apple-admac.c
1966+
F: drivers/gpu/drm/adp/
19651967
F: drivers/pmdomain/apple/
19661968
F: drivers/i2c/busses/i2c-pasemi-core.c
19671969
F: drivers/i2c/busses/i2c-pasemi-platform.c
1970+
F: drivers/input/touchscreen/apple_z2.c
19681971
F: drivers/iommu/apple-dart.c
19691972
F: drivers/iommu/io-pgtable-dart.c
19701973
F: drivers/irqchip/irq-apple-aic.c

drivers/gpu/drm/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ source "drivers/gpu/drm/mcde/Kconfig"
392392

393393
source "drivers/gpu/drm/tidss/Kconfig"
394394

395+
source "drivers/gpu/drm/adp/Kconfig"
396+
395397
source "drivers/gpu/drm/xlnx/Kconfig"
396398

397399
source "drivers/gpu/drm/gud/Kconfig"

drivers/gpu/drm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ obj-y += mxsfb/
175175
obj-y += tiny/
176176
obj-$(CONFIG_DRM_PL111) += pl111/
177177
obj-$(CONFIG_DRM_TVE200) += tve200/
178+
obj-$(CONFIG_DRM_ADP) += adp/
178179
obj-$(CONFIG_DRM_XEN) += xen/
179180
obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
180181
obj-$(CONFIG_DRM_LIMA) += lima/

drivers/gpu/drm/adp/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR MIT
2+
config DRM_ADP
3+
tristate "DRM Support for pre-DCP Apple display controllers"
4+
depends on DRM && OF && ARM64
5+
depends on ARCH_APPLE || COMPILE_TEST
6+
select DRM_KMS_HELPER
7+
select DRM_KMS_DMA_HELPER
8+
select DRM_GEM_DMA_HELPER
9+
select VIDEOMODE_HELPERS
10+
select DRM_MIPI_DSI
11+
help
12+
Say Y if you have an Apple Arm laptop with a touchbar.

drivers/gpu/drm/adp/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR MIT
2+
3+
adpdrm-y := adp_drv.o
4+
obj-$(CONFIG_DRM_ADP) += adpdrm.o
5+
obj-$(CONFIG_DRM_ADP) += panel-summit.o

0 commit comments

Comments
 (0)