Commit graph

2037 commits

Author SHA1 Message Date
Janne Grunau
cc7acfb65c experiments/dcp_iboot_m2pro.py: Support M2 Mac Mini
dptx-phy and lpdptx-phy look mostly identical. lpdptx-phy might support
DP 2.0 DP 2.0 link rates if the 8k@60 is supported without DSC or
chroma subsampling.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-10-05 14:02:28 +09:00
Janne Grunau
008aad39a3 experiments/dcp_iboot_m2pro.py: Change phy interface
Also annotates the dptx-port notify apcall methods.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-10-05 14:02:28 +09:00
Janne Grunau
1d4688a767 experiments/dcp_iboot_m2pro.py: generalize dp phy regs
Signed-off-by: Janne Grunau <j@jannau.net>
2023-10-05 14:02:28 +09:00
Hector Martin
31a43c4b40 experiments/dcp_iboot_m2pro.py: New experiment 2023-08-21 23:18:12 +09:00
Hector Martin
2d64f7a944 m1n1.fw.dcp.iboot: More stuff
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-21 23:17:49 +09:00
Hector Martin
2a23e72775 m1n1.fw.dcp.dcpav: Handle notifies
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-21 23:17:24 +09:00
Hector Martin
3e22464c86 XXX dcpav: port to 13.5
This needs to be dynamic.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-21 23:17:03 +09:00
Hector Martin
6d0979e71e m1n1.adt: Decode apcie tunables
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-21 23:16:08 +09:00
Hector Martin
8ca5d671ad sio: Fix error paths
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-21 14:00:33 +09:00
Martin Povišer
6a61c001d2 clk: Set up LEAP/PDM clocks
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-21 00:17:27 +09:00
Martin Povišer
f7824561af afk: Add missing wptr wraparound
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:57:12 +09:00
Martin Povišer
264e18169f afk: Fix ringbuf space checks in afk_epic_tx
Redo the checks to make sure we never cause rptr==wptr, because that
signifies an empty buffer, not a full one.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:57:12 +09:00
Martin Povišer
07ea5a92c3 afk: Fix edge case in ringbuf pointer assert
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:57:12 +09:00
Martin Povišer
fd0ae3663a afk: Drop stray 'rptr' field
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:57:12 +09:00
Martin Povišer
526f81f51e m1n1.hw.codecs: Add iMac codec
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:50:09 +09:00
Martin Povišer
d29df8e69b sio: Use 'FDT' in prints consistently
Both 'DT:' and 'FDT:' are in use as prefices in prints that relate to
the non-Apple devicetree. Put in 'FDT:' everywhere for consistence.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
8f8c3f903d kboot: Look up SIO by alias
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
1ba260c090 sio: Add missing exit on bad ADT data
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
94cf41e124 kboot: Postpone setting of /memory
Postpone the setting of the /memory node so that any allocations made
in course of the devicetree prep (e.g. the SIO reservations allocated
from the top of memory) are reflected in the usable memory span that's
set on the /memory node.

Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
9f12d5b3ff 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-08-17 19:49:43 +09:00
Martin Povišer
8824bd2dbf 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-08-17 19:49:43 +09:00
Martin Povišer
fa820a7164 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-08-17 19:49:43 +09:00
Martin Povišer
731f1c4761 kboot: Fix dt_device_set_reserved_mem error print
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
39f4919fc1 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-08-17 19:49:43 +09:00
Martin Povišer
44f65b1875 kboot: Make filling in of memory-region-names optional
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
9ccef6b8bd 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-08-17 19:49:43 +09:00
Martin Povišer
aa64faba4b kboot: Reserve SIO firmware
Signed-off-by: Martin Povišer <povik@cutebit.org>
2023-08-17 19:49:43 +09:00
Martin Povišer
8be10f5fa9 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-08-17 19:49:43 +09:00
Asahi Lina
925fe72b0b src/hv_vm: Fix some instruction emulations
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00
Asahi Lina
37ad9f7df6 m1n1.fw.dcp.ipc: Fix assert
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00
Asahi Lina
31da584be8 m1n1.fw.agx: Helpers everywhere!
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00
Asahi Lina
7f94c7f39a tools.chainload.py: Fixes for 13.5
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00
Asahi Lina
5a389fe87b kboot_gpu: Add another pwcalc difference for T602x
This doesn't make any sense... M2 Ultra should be 2x M2 Max, so there's
no reason for this constant to be different.

I get the feeling Apple messed this one up too...

Also clean up some other constants.

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00
Asahi Lina
db49377e5a kboot_gpu: Fixes for >1 die t602x
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-17 19:46:07 +09:00
Alexis Deruelle
b2e5b3ef00 proxyclient:picocom-sec.sh:warn when overriding SECDEV
Add a warning message when overriding the target serial device with
SECDEV variable, just in case one is caught by surprise there.

Signed-off-by: Alexis Deruelle <alexis.deruelle@gmail.com>
2023-08-17 19:45:13 +09:00
Alexis Deruelle
21a403a163 proxyclient:tools:add default device name for macOS
Under macOS host, secondary UART device name is different from the linux
device name. Check OS name and chose default device name accordingly.

Signed-off-by: Alexis Deruelle <alexis.deruelle@gmail.com>
2023-08-17 19:45:13 +09:00
Alexis Deruelle
0673a226c9 proxyclient:m1n1:rely on UartInterface defaults when creating object
- in 'main' section, device name and baud values are redundant as the
  UartInterface constructor handles it already
- Add a comment on how to run proxy.py as script

Signed-off-by: Alexis Deruelle <alexis.deruelle@gmail.com>
2023-08-17 19:45:13 +09:00
Alexis Deruelle
bd82c5f47a proxyclient:m1n1:add macOS device name for m1n1 primary UART
m1n1 UART device names on macOS follow /dev/cu.usbmodemP_XX naming
convention. Check for platform name using platform.system() and use the
macOS device name instead of /dev/m1n1 if equals 'Darwin'

Signed-off-by: Alexis Deruelle <alexis.deruelle@gmail.com>
2023-08-17 19:45:13 +09:00
Davide Cavalca
6bca5f77e1 m1n1.asm: make it work again with gcc
Signed-off-by: Davide Cavalca <davide@cavalca.name>
2023-08-15 18:27:51 +09:00
Hector Martin
8e3016e323 pcie: T602X APCIE-GE support
Maybe maybe?

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-07 21:05:25 +09:00
Hector Martin
721107aa0a kboot_gpu: Fixes for T6022
This is still blind. Lina send help.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-07 19:27:47 +09:00
Hector Martin
31930a25f7 m1n1.hv: Add t6022 cpustart
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-07 19:27:47 +09:00
Hector Martin
33ef9cdaa8 m1n1.adt: Fix GPUPerfStates64 for T6022
Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-07 19:27:47 +09:00
Hector Martin
bb0e9ace57 display: Make M2+ desktop disable hack more generic
This should work on the Mac Pro.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-07 19:27:47 +09:00
Hector Martin
9b73944684 Initial t6022 support
GPU stuff is a wild guess.

Signed-off-by: Hector Martin <marcan@marcan.st>
2023-08-07 19:27:47 +09:00
Asahi Lina
28708461fc kboot_gpu: Fix core count for T8112
Oops...

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-02 21:10:41 +09:00
Asahi Lina
e322312c94 kboot_gpu: Do not try to set cs/afr pstates on <G14X
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-08-02 15:11:32 +09:00
Asahi Lina
86d75d4dba kboot: Add 13.5 firmware compats
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-07-20 11:54:11 +09:00
Asahi Lina
f58e213529 kboot_gpu: Power calc fixes for t6020
Looks like this is different from t6021, and now I wonder if we need to
recheck t6000...

Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-07-20 11:54:11 +09:00
Asahi Lina
dfecc20114 firmware: Add 13.5b4 and 13.5 versions
Signed-off-by: Asahi Lina <lina@asahilina.net>
2023-07-19 13:12:24 +09:00