From nobody Thu May 14 19:07:09 2026 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gGfwc5XvTz5Wrfp; Thu, 14 May 2026 19:07:44 +0000 (UTC) (envelope-from jsm@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gGfwc2WfJz3F69; Thu, 14 May 2026 19:07:44 +0000 (UTC) (envelope-from jsm@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778785664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wwrbT/9csE48KHfnp2rlrVR08OexQcGC4Jf3HL0waA4=; b=pPRAdJOqFn+Y+27pp1dn8SYK/gh0Gnk/vmeLfiLn5PqSZ006kphvQST8lq4cE6w8f4x2dt 00zS7j5dbatD0s+jnUdLX2RGXc5srRTbILrONahUV6t3l8B2OAKzdKTfs+E3W4AmJe/xFH m52VkqrNaCsfplhfQrV4AQm+PQy4Cgac2ujpZ/pV4GxZzsd6HFmNAM1liSfdd1s4/6xXa+ QE5qpIVbZ8RGaIik1Rqo99Y+npFH32rFsNIkvizVmWSjKiOAsRLaug2CX0tRHyhXXCt0ya RCo3um58/qPBlWxREe1jSbb/fjOmeCSeycKZg7E0Qe/7b1NAhim9tGZsITNP/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778785664; a=rsa-sha256; cv=none; b=S9do0/0nW+35oSpJNMo//p/HIFSD9EAK0HD7AMaOEwXo2tarWc8h5/v3hnpEzzNmOyv/Hm Sfq4YMiDcfHlnmwNmv9vAISTnXgRws7Ww3jzZTBQh0Kr4LHexA4wpMzeKVr56dheZr82/A sW225ctwngcOCPDtQhHDdnESW/SubF+6MwAXq3yLuZyKMnL9Qlvg3nKFQ+in9wJJI+Ezvu F4SOC0EsQnUUbkrVhiClHmo2bHMLzvFIop8Lua49IltAnB9ZFMUytyRNhCe/DI53uXJCEZ wcA4qsShXxp/dn6iWkfP5Xt5HyupotqjkwsgGQookYr1+UEiiZPNx0XLfw5G7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778785664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wwrbT/9csE48KHfnp2rlrVR08OexQcGC4Jf3HL0waA4=; b=Vmo2uFuLFg1PtlDinnKaK+Pt4diKkhbD6zEx8Od4xFIU4zBRQ/mX4xlPNcUiiG44sXxIUA QvE0NAhXtgAIPZedReY+/Ar2cJPjs4yMsOLYSUxag4BrqX+gazrq3Ug2R+F3dUeZiy1EjW 25marv69QSmu+PjDOB2jCMLubpUZOcv/uwKaxV0LYTtTHg0YoPtGszwdCICReKsH9sZlxa 4N89dXU0HizxlaASaYhcfnUCGzJM/BVf/pVwfLCN7u6K4PfDJ7UqAP4G0NBkwqHdQsNhZT tCKJZb8fbXRb2StAjatG3zKEEd2mtlX3Icf69IDJoMHHuaFOIQARSIssynEexw== Received: from [192.168.1.5] (mail.northatlanticmusicsupplies.com [212.237.182.202]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jsm) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gGfwb5vJrz13bj; Thu, 14 May 2026 19:07:43 +0000 (UTC) (envelope-from jsm@FreeBSD.org) Message-ID: <4d8c447c-e104-4008-9ca0-835178a41c1c@FreeBSD.org> Date: Thu, 14 May 2026 21:07:09 +0200 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: =?UTF-8?Q?Re=3A_USB-C_DisplayPort_+_audio_bring-up_on_RK3399_=28Roc?= =?UTF-8?Q?kPro64=29_=E2=80=94_looking_for_reviewers?= To: Bin C0d3x , freebsd-arm@freebsd.org Cc: freebsd-current@freebsd.org References: Content-Language: en-US From: Jesper Schmitz Mouridsen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/14/26 17:27, Bin C0d3x wrote: > Hi, > > > > > I have a working USB-C DisplayPort + audio path for the RK3399 > > (RockPro64) on -CURRENT that I'd like to start landing. Looking for > > a reviewer or two before I split this into Differential reviews. > > > > Hardware: Pine64 RockPro64, FUSB302B Type-C controller (i2c), Cadence > > MHDP DPTX block at 0xfec00000, RK3399 Type-C PHY, dw-hdmi for audio > > codec endpoint, I2S2 (8-ch on-chip-only) feeding both HDMI and the > > Cadence DP audio packetizer. Sink: XYM W156F1 portable monitor over > > USB-C; verified 1920x1080 @ 60 Hz, link rate HBR (2.7 Gbps), 2 lanes, > > plus stereo LPCM 48 kHz audio through panel speakers. > > > > > What's in the work (new drivers / subsystems): > > > > > sys/dev/iicbus/usb/fusb302.c > > > FUSB302B i2c driver: SRC/SNK PD policy state machine, > > DP Alt Mode VDM (Discover/Enter/DP_Status), role discovery, > > hard-reset, fault recovery. Modeled functionally on Linux's > > drivers/usb/typec/tcpm/fusb302.c -- not a port, clean > > re-implementation. > > > > > sys/sys/usbc/* > > > USB-PD policy state machine framework + TCPC abstraction so the > PD/VDM logic is driver-agnostic. > > > > > sys/arm64/rockchip/rk_typec_phy.c > > > RK3399 Type-C PHY bring-up for DP altmode (combo PHY mode > > switch, lane swap, pin assignments C/D/E/F). > > > > > sys/arm64/rockchip/rk_cdn_dp.c > > > Cadence MHDP DPTX scaffold: firmware load, 19-stage bring-up, > AUX over mailbox, link training (CR+EQ both lanes at HBR), > > DPCD, EDID readback, MSA/timing, audio packetizer with SDP > > infoframe, DPMS sleep/wake via scanout swap. > > > > > sys/arm64/rockchip/rk_hdmi_codec_stub.c > > > Tiny audio_dai shim that claims rockchip,rk3399-dw-hdmi so > > audio_soc's simple-audio-card codec phandle resolves -- enables > > /dev/dsp0 over both HDMI and DP audio paths. > > > > > sys/arm64/rockchip/rk_gpio.c (PIC method fix) > > > pic_disable_intr/enable_intr/pre_ithread/post_ithread, missing > > from the Rockchip GPIO PIC. Without them, level-sensitive > > sources (FUSB302 INT_N) starve the system with ~210 kHz storms > > during their ithread. > > > > > sys/dev/drm2/drm_fb_helper.c (small fix) > > > Don't strand on a safe-fallback fb after a late EDID arrives -- > > the cdn-dp panel EDID only becomes available after the 19-stage > > bring-up, well after the kernel's first hotplug pass. > > > > Status: > > > * fusb302 + PD policy SM: stable. Source + sink contracts work, > > DP Alt Mode succeeds, retry/hard-reset paths exercised. > > * cdn-dp: panel lit at 1920x1080@60 HBR. Audio decodes through > > panel speakers via /dev/dsp0 with the rk_hdmi_codec_stub. > > * Trace output is gated behind dev.fusb302.0.debug / > > > dev.rk_cdn_dp.0.debug (default 0), so default dmesg is quiet. > > * Known open: transient panel artifacts ("black tears") during > > USB-C boot bring-up. Source-side fully clean; appears framer- > > side; cosmetic only. > > > > > Public reference: > > > https://github.com/b1nc0d3x/FBSD_DEV/tree/rkdev > > > > > That branch is a fork of freebsd/freebsd-src with ~30 commits on top. > > I plan to split into separate Differential reviews: > > > 1. rk_gpio PIC method fix (independent, useful on its own) > > 2. drm_fb_helper hotplug fix > > > 3. USB-PD policy SM framework (sys/sys/usbc/) > > > 4. fusb302 driver > > > 5. rk_typec_phy > 6. rk_cdn_dp (scaffold + bring-up) > > > 7. rk_cdn_dp DP audio + rk_hdmi_codec_stub > > > 8. RockPro64 DT overlays + module hookup > > > > > Each phase is self-contained and builds cleanly on the previous. > > > > Would anyone with arm64 / DRM / USB-C familiarity be willing to look > > at (1) and (2) first? They're the smallest and most clearly correct > > bits. I can post Differentials as soon as a reviewer says go. > > > > Thanks, > > > Kyle Crenshaw > I did similar work but too gpl infected so I never published it. I can test your work. Do you get any fusb302 interrupt on cold boot? Even the RockChip kernel on linux did not.. Do you know my anxdp port from openbsd for the edp? the HW is in the pinebook pro, which share the usb-c graphics with rockpro64. With a minor u-boot change it works the same. So you should add support for the pinebook pro as well. If you do not have the hw i can test. Great work, congrats! /jsm