Commit graph

706 commits

Author SHA1 Message Date
Hector Martin
fe4037365b Merge remote-tracking branch 'jannau/m2_dptx' into m2-13_2 2023-04-11 21:29:01 +09:00
Hector Martin
2ff412930e dart: Detect locked t8110 DARTs
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-11 20:08:11 +09:00
Janne Grunau
7715b04217 kboot: Add DCP reserved mem support for t602x
Signed-off-by: Janne Grunau <j@jannau.net>
2023-04-11 19:18:51 +09:00
Hector Martin
9a2e530fed nvme: Add nvme_ensure_shutdown()
We're not using it in the end because we fixed this in Linux, but I went
through the trouble of writing the function so we might as well leave it
lying around.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-11 17:47:41 +09:00
Hector Martin
7d37a61a06 pcie: Add initial t602x support
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-11 17:47:41 +09:00
Hector Martin
046620d4d5 pmgr: Add pmgr_adt_power_{en,dis}able_index()
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-10 01:06:05 +09:00
Hector Martin
41aac76fff Bring T6020 support up to parity with T6021
Missing smp/cpufreq/soc stuff.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 21:05:50 +09:00
Hector Martin
dabad98d6e smp: Bump MAX_CPUS to 24
Needed for (presumed) M2 Ultra.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 20:37:56 +09:00
Hector Martin
481f662271 hv_vm: Fix CTRR hugepage issue
This is the hypervisor counterpart to da9ceddeac.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-04-09 19:46:13 +09:00
Mario Hros
2f96635420 mcc: Reuse existing T6000 impl for T6020
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:13 +09:00
Mario Hros
049bc64e36 smp: Add T6021 CPU start offset
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:13 +09:00
Mario Hros
da03138eec cpufreq: Add T6021 clusters
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:13 +09:00
Mario Hros
e71ad13474 chickens: Add preliminary T6020 support
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:12 +09:00
Mario Hros
afb68db34c chickens: Force nonspec for rev 0x0 of Avalanche
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 19:46:12 +09:00
Mario Hros
2e040a6729 chickens: Add T6021 chickens
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 17:56:01 +09:00
Mario Hros
d033044a80 soc: Add T6021 defines
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 17:56:01 +09:00
Mario Hros
34f49a56fc nvme: assume die 0 if clock-gates not set
Signed-off-by: Mario Hros <git@reversity.org>
2023-04-09 17:56:01 +09:00
Janne Grunau
e029c588c0 Merge branch 'pulls/286' into m2_dptx 2023-03-31 18:03:57 +02:00
Janne Grunau
f9af0a1606 HACK: display: disable non-working display config on j473
Signed-off-by: Janne Grunau <j@jannau.net>
2023-03-31 17:46:30 +02:00
Janne Grunau
b67063abba HACK: dcp/afk: fix inline size based on macos trace
not really looked into this discrepancy but my best guess is that the
retcode should not be counted towards the payload size.
2023-03-31 17:46:30 +02:00
Janne Grunau
d4b3e758da display: trigger dptx hpd before waiting for iboot hpd
This is not enough to make the display work but at least triggers
dptx-phy link config (lane count/link rate).
2023-03-31 17:46:30 +02:00
Janne Grunau
26ceac4a3a dcp/afk: Read mailbox in afk_epic_rx
This is primarily to aid the dcp tracer to report received messages in
the order m1n1's implementation actually reads them.
This unfortunately only works for the dptx-port endpoint and not for the
dcp/iboot endpoint.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-03-31 17:46:30 +02:00
Janne Grunau
c1f14a4738 dcp: add dptx-phy support for j473/t8112
Phy "implementation" is just a replay of a macos trace with an 1920x1080
display.
2023-03-31 17:46:30 +02:00
Janne Grunau
43fa9185f6 WIP: AFK: Support multiple endpoints with IOP initiated communication
Endpoint 0x2a (dptx-port) sees DCP initiated notify messages. Those need
to be handled with the correct endpoint context and must not be rejected
when other endpoints are polling for new messages.
2023-03-31 17:46:30 +02:00
Janne Grunau
32431d8ba1 WIP: dcp/dptx: Add support for dcp endpoint dptx
Supposedly required for HDMI out initilization on M2 (Pro)? Mac minis.
2023-03-31 17:46:30 +02:00
Janne Grunau
a2b4a7479a payload: Add a custom header with a payload size field for initramfs'
This add supports for concatenated (compressed) cpio archives and relies
on the kernel to decompress the initramfs.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-03-31 17:46:30 +02:00
Asahi Lina
fa3dcd3e77 payload: Add tso=1 m1n1 option to enable TSO
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-03-28 19:06:20 +09:00
Asahi Lina
0a05a0171e proxy: Add smp_is_alive() thunk
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-03-28 19:06:20 +09:00
Eileen Yoon
4a679b12bd tunables_static: improve sequence iter
Signed-off-by: Eileen Yoon <eyn@gmx.com>
2023-03-28 17:19:45 +09:00
Eileen Yoon
2abf3af38e tunables_static: add t8103 ane tunables
Signed-off-by: Eileen Yoon <eyn@gmx.com>
2023-03-28 17:19:45 +09:00
Eileen Yoon
cf09e4ff56 tunables_static: abstraction to reuse entries
Signed-off-by: Eileen Yoon <eyn@gmx.com>
2023-03-28 17:19:45 +09:00
Hector Martin
a633b90634 kboot: Remove leftover IPD lookup dead code
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-03-19 20:30:01 +09:00
Hector Martin
a024101b75 kboot: Pass keyboard layout ID & country code in HID device
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-03-19 18:14:44 +09:00
Janne Grunau
c6c426581b pcie: Add link speed override for SD card reader
The SD card reader on Macbook Pro 14"/16" and Mac Studio uses yet
another property to override the port's "maximum-link-speed" property.
Add parsing for "expected-link-speed" and always look in the port's
first child for these properties.
Increases the link speed to PCIe 2.0 which is required for the full
bandwidth of SDXC UHS-II.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-03-12 00:32:10 +09:00
Asahi Lina
5d5fa70efa firmware: Add 13.1/13.2 to version list
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-03-06 15:15:17 +09:00
Martin Povišer
f17cf4e6fe sio: Move to 'copy rules'
Summarize the preparation of SIO firmware data in a table of 'copy
rules'.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-02-22 16:35:27 +01:00
Martin Povišer
c735b0ebca sio: Allocate from top of memory
Place the firmware data we are preparing at the top of memory.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-02-22 16:35:27 +01:00
Martin Povišer
b74218f2ae display: Factor out top of memory allocation
Move it into utils.c before we reuse it for SIO data.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-02-22 16:35:27 +01:00
Martin Povišer
9e616021d6 kboot: Fix dt_device_set_reserved_mem error print
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-02-22 16:35:27 +01:00
Martin Povišer
bdc82267c8 sio: Set up auxiliary SIO data in FDT
On kboot, parse the ADT for SIO firmware parameters, set up the expected
data structures for SIO consumption in reserved memory, and pass those
in properties of the SIO FDT node.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-02-22 16:35:27 +01:00
Martin Povišer
99245aa654 kboot: Make filling in of memory-region-names optional
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-02-22 16:35:27 +01:00
Martin Povišer
f996295045 kboot: Split dt_device_set_reserved_mem
Make dt_device_set_reserved_mem take in an explicit iova instead of
reading it off from a DART. Add a separate 'from_dart' variety of the
function for getting the iova from DART.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-02-22 16:35:27 +01:00
Martin Povišer
5ad92458b7 kboot: Reserve SIO firmware
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-02-22 10:56:25 +01:00
Martin Povišer
3a65b207bc kboot: Add dt_reserve_asc_firmware
The new function parses ADT's segment-ranges and builds up nodes in
/reserved-memory representing the appropriate physical and device
address spans. This is to describe the memory placement of ASC firmware.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-02-22 10:56:25 +01:00
Janne Grunau
583f290b2b Add a space between '//' and '#' to satisfy clang-format 15
Signed-off-by: Janne Grunau <j@jannau.net>
2023-02-02 09:51:08 +09:00
Janne Grunau
c8c0bd5dc5 display: Check if FB IOVA is available on dart-disp0
Fixes a copy and paste error in 1b5dee2496 checking dart-dcp twice.

Fixes: 1b5dee2496 ("display: Map the framebuffer if it is not mapped")
Signed-off-by: Janne Grunau <j@jannau.net>
2023-02-02 09:50:33 +09:00
Janne Grunau
4e7398e3a8 display: Start scanning for fb IOVA at vm-base
Required for M2 devices as the M2 Mac mini.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-02-02 09:50:33 +09:00
Janne Grunau
bff8aa647c dcp: Offset temporary IOVA space from vm-base
Required on M2 devices.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-02-02 09:50:33 +09:00
Janne Grunau
7e33a578d8 rtkit: Extend IOVA to 36-bit
Required for DCP on M2.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-02-02 09:50:33 +09:00
Janne Grunau
f68a842ab7 rtkit: Apply "asc-dram-mask" consistently
Required for DCP on M2 which requires 36-bit IOVA space.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-02-02 09:50:33 +09:00