Skip to content

Commit

Permalink
Merge branch 'bits/230-touchbar' into asahi-wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jannau committed Sep 21, 2024
2 parents 7460ac2 + cf595f4 commit c324221
Show file tree
Hide file tree
Showing 11 changed files with 1,534 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/input/touchscreen/apple,z2-touchscreen.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple touchscreens attached using the Z2 protocol.

maintainers:
- [email protected]
- Sasha Finkelstein <[email protected]>

description: A series of touschscreen controllers used in Apple products.

allOf:
- $ref: touchscreen.yaml#
- $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
compatible:
items:
- enum:
- apple,j293-touchbar
- apple,j493-touchbar
- const: apple,z2-touchbar
- const: apple,z2-multitouch

reg:
maxItems: 1

interrupts:
maxItems: 1

reset-gpios:
maxItems: 1

cs-gpios:
maxItems: 1

firmware-name:
maxItems: 1

label:
maxItems: 1

touchscreen-size-x: true
touchscreen-size-y: true
spi-max-frequency: true
spi-cs-hold-delay-ns: true
spi-cs-setup-delay-ns: true

required:
- compatible
- interrupts
- reset-gpios
- firmware-name
- label
- touchscreen-size-x
- touchscreen-size-y

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
spi {
#address-cells = <1>;
#size-cells = <0>;
touchscreen@0 {
compatible = "apple,j293-touchbar", "apple,z2-touchbar",
"apple,z2-multitouch";
reg = <0>;
spi-max-frequency = <11500000>;
reset-gpios = <&pinctrl_ap 139 0>;
cs-gpios = <&pinctrl_ap 109 0>;
interrupts-extended = <&pinctrl_ap 194 IRQ_TYPE_EDGE_FALLING>;
firmware-name = "apple/dfrmtfw-j293.bin";
touchscreen-size-x = <23045>;
touchscreen-size-y = <640>;
label = "MacBookPro17,1 Touch Bar";
};
};
...
3 changes: 3 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2066,6 +2066,7 @@ F: Documentation/devicetree/bindings/clock/apple,nco.yaml
F: Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml
F: Documentation/devicetree/bindings/dma/apple,admac.yaml
F: Documentation/devicetree/bindings/i2c/apple,i2c.yaml
F: Documentation/devicetree/bindings/input/touchscreen/apple,z2-touchscreen.yaml
F: Documentation/devicetree/bindings/interrupt-controller/apple,*
F: Documentation/devicetree/bindings/iommu/apple,dart.yaml
F: Documentation/devicetree/bindings/iommu/apple,sart.yaml
Expand All @@ -2085,9 +2086,11 @@ F: drivers/bluetooth/hci_bcm4377.c
F: drivers/clk/clk-apple-nco.c
F: drivers/cpufreq/apple-soc-cpufreq.c
F: drivers/dma/apple-admac.c
F: drivers/gpu/drm/adp/
F: drivers/pmdomain/apple/
F: drivers/i2c/busses/i2c-pasemi-core.c
F: drivers/i2c/busses/i2c-pasemi-platform.c
F: drivers/input/touchscreen/apple_z2.c
F: drivers/iommu/apple-dart.c
F: drivers/iommu/io-pgtable-dart.c
F: drivers/irqchip/irq-apple-aic.c
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,8 @@ source "drivers/gpu/drm/mcde/Kconfig"

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

source "drivers/gpu/drm/adp/Kconfig"

source "drivers/gpu/drm/xlnx/Kconfig"

source "drivers/gpu/drm/gud/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ obj-y += mxsfb/
obj-y += tiny/
obj-$(CONFIG_DRM_PL111) += pl111/
obj-$(CONFIG_DRM_TVE200) += tve200/
obj-$(CONFIG_DRM_ADP) += adp/
obj-$(CONFIG_DRM_XEN) += xen/
obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
obj-$(CONFIG_DRM_LIMA) += lima/
Expand Down
12 changes: 12 additions & 0 deletions drivers/gpu/drm/adp/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-only OR MIT
config DRM_ADP
tristate "DRM Support for pre-DCP Apple display controllers"
depends on DRM && OF && ARM64
depends on ARCH_APPLE || COMPILE_TEST
select DRM_KMS_HELPER
select DRM_KMS_DMA_HELPER
select DRM_GEM_DMA_HELPER
select VIDEOMODE_HELPERS
select DRM_MIPI_DSI
help
Say Y if you have an Apple Arm laptop with a touchbar.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/adp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only OR MIT

adpdrm-y := adp_drv.o
obj-$(CONFIG_DRM_ADP) += adpdrm.o
obj-$(CONFIG_DRM_ADP) += panel-summit.o
Loading

0 comments on commit c324221

Please sign in to comment.