Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Documentation/admin-guide/media/apple-jpeg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ apple,t8112-jpeg wide64 0x0e0008
apple,t8122-jpeg wide64 0x0f0008
apple,t8132-jpeg wide64 0x100008
apple,t8140-jpeg wide64 0x110000
apple,t8142-jpeg wide64 0x110010
=================== ========= ========================

On the wide64 engines the HWREV readback equals the hardware description's
``hw-type`` with the stepping nibble masked (read back on T8112 and T6041), so
the T8122 and T8132 rows use their ``hw-type``. T8132 has the T6041
identity and shares its data. The T8103 engines report the legacy selector
identity and shares its data. T8142 (read back on a J815) has the T6050
identity and shares its data: macOS 27.2.1 programs its engines with T6050's
reset image and job sequence, write for write. The T8103 engines report the legacy selector
0x0a0103 there, which is not a HWREV, so T8103 has no row yet.

Identification powers the domain, writes MODE=0x147 and reads the selected
Expand Down
3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/media/apple,jpeg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ select:
- apple,t8132-jpeg
- apple,t6050-jpeg
- apple,t8140-jpeg
- apple,t8142-jpeg
required:
- compatible

Expand All @@ -57,6 +58,7 @@ allOf:
enum:
- apple,t8132-jpeg
- apple,t6050-jpeg
- apple,t8142-jpeg
required:
- compatible
then:
Expand All @@ -66,6 +68,7 @@ allOf:
- enum:
- apple,t8132-jpeg
- apple,t6050-jpeg
- apple,t8142-jpeg
- const: apple,jpeg

reg:
Expand Down
17 changes: 17 additions & 0 deletions arch/arm64/boot/dts/apple/t8142-j815.dts
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,20 @@
&ane {
status = "okay";
};

/* Both JPEG engines and their DART. */
&ps_jpg {
status = "okay";
};

&jpeg_dart {
status = "okay";
};

&jpeg0 {
status = "okay";
};

&jpeg1 {
status = "okay";
};
36 changes: 36 additions & 0 deletions arch/arm64/boot/dts/apple/t8142-peripherals.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,37 @@
status = "disabled";
};

/* ADT dart-jpeg: one DART for both engines, jpeg0 on SID 0, jpeg1 on SID 1. */
jpeg_dart: iommu@301020000 {
compatible = "apple,t8142-dart", "apple,t8110-dart";
reg = <0x3 0x1020000 0x0 0xc000>;
interrupts = <AIC_IRQ 1157 IRQ_TYPE_LEVEL_HIGH>;
#iommu-cells = <1>;
/* ADT vm-base 0x100_0000_0000, vm-size 0x300_0000_0000 */
apple,dma-range = <0x100 0x0 0x300 0x0>;
power-domains = <&ps_jpg>;
status = "disabled";
};

/*
* ADT jpeg0/jpeg1 ("jpeg,t8101", hw-type 0x110010). Their power-gates
* JPG0-V/JPG1-V are virtual PMGR entries under JPG.
*/
jpeg0: jpeg@301000000 {
compatible = "apple,t8142-jpeg", "apple,jpeg";
reg = <0x3 0x1000000 0x0 0x4000>;
interrupts = <AIC_IRQ 1156 IRQ_TYPE_LEVEL_HIGH>;
iommus = <&jpeg_dart 0>;
power-domains = <&ps_jpg>;
status = "disabled";
};

jpeg1: jpeg@301060000 {
compatible = "apple,t8142-jpeg", "apple,jpeg";
reg = <0x3 0x1060000 0x0 0x4000>;
interrupts = <AIC_IRQ 1159 IRQ_TYPE_LEVEL_HIGH>;
iommus = <&jpeg_dart 1>;
power-domains = <&ps_jpg>;
status = "disabled";
};

Expand Down Expand Up @@ -529,6 +555,16 @@
};

&pmgr {
/* ADT pmgr device JPG (id 64), parent AFISOCNI1 (no power state). */
ps_jpg: power-controller@2a0 {
compatible = "apple,t8142-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate";
reg = <0x2a0 4>;
#power-domain-cells = <0>;
#reset-cells = <0>;
label = "jpg";
status = "disabled";
};

/* ADT pmgr device ANE_SYS (id 73), parent AFISOCNI3 (no power state). */
ps_ane_sys: power-controller@2e8 {
compatible = "apple,t8142-pmgr-pwrstate", "apple,t8103-pmgr-pwrstate";
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/platform/apple/jpeg/apple-jpeg-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,8 @@ static const struct of_device_id aj_of_match[] = {
{ .compatible = "apple,t6041-jpeg", .data = &apple_jpeg_t6041 },
{ .compatible = "apple,t8132-jpeg", .data = &apple_jpeg_t6041 },
{ .compatible = "apple,t6050-jpeg", .data = &apple_jpeg_t6050 },
/* T6050's revision, reset image and job programming (traced on a J815). */
{ .compatible = "apple,t8142-jpeg", .data = &apple_jpeg_t6050 },
{ .compatible = "apple,t8140-jpeg", .data = &apple_jpeg_t8140 },
{ }
};
Expand Down
Loading