From 6f057d339567e376b954e41fdced12fa9d09eb7b Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 1 Feb 2023 14:45:03 +0100 Subject: [PATCH] proxy: hv: Add trace_dptx.py for tracing dptx-phy on j473/t8112 Signed-off-by: Janne Grunau --- proxyclient/hv/trace_dptx.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 proxyclient/hv/trace_dptx.py diff --git a/proxyclient/hv/trace_dptx.py b/proxyclient/hv/trace_dptx.py new file mode 100644 index 00000000..ddf12262 --- /dev/null +++ b/proxyclient/hv/trace_dptx.py @@ -0,0 +1,24 @@ +# SPDX-License-Identifier: MIT + +from m1n1.trace.gpio import GPIOTracer + +# trace gpio interrups, useful to follow the cascaded interrupts +aic_phandle = getattr(hv.adt["/arm-io/aic"], "AAPL,phandle") +node = hv.adt["/arm-io/aop-gpio"] +path = "/arm-io/aop-gpio" + +if getattr(node, "interrupt-parent") == aic_phandle: + for irq in getattr(node, "interrupts"): + hv.trace_irq(node.name, irq, 1, hv.IRQTRACE_IRQ) + +PIN_NAMES_DP2HDMI_J473 = { + 0x28: "force_dfp", + 0x31: "hdmi_hpd", +} + +GPIOTracer = GPIOTracer._reloadcls() +gpio_tracer = GPIOTracer(hv, path, PIN_NAMES_DP2HDMI_J473, verbose=0) +gpio_tracer.start() + +trace_device("/arm-io/dptx-phy") +