From c795bcd4921800cdd4a5f804b9ca128ff6b0ba06 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Tue, 29 Sep 2026 08:25:37 +0200 Subject: [PATCH] pinwheel: enable IPU6 MIPI webcam (ov08x40) Adds hardware.ipu6 for the built-in MIPI camera, plus two overlay fixes needed for it to actually work on this hardware: - Pin icamerasrc-ipu6epmtl to the same release tag already used by ipu6-camera-bins/ipu6-camera-hal (20250923_ov02e). The version nixpkgs currently pulls is an Intel internal IoT/Panther-Lake validation build whose device table only lists external USB AR0234 test sensors, never the real ov08x40, so the camera never gets selected. - Patch ipu6-camera-hal's hardcoded IVSC/CVS entity name from "Intel IVSC CSI" (the out-of-tree ivsc driver's name) to "Intel CVS" (the mainlined intel_cvs driver's name). The mismatch broke I2C bus address resolution for the sensor, which cascaded into wrong stream configs and black/missing video. --- hosts/pinwheel/modules/webcam/default.nix | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 hosts/pinwheel/modules/webcam/default.nix diff --git a/hosts/pinwheel/modules/webcam/default.nix b/hosts/pinwheel/modules/webcam/default.nix new file mode 100644 index 0000000..5a658b5 --- /dev/null +++ b/hosts/pinwheel/modules/webcam/default.nix @@ -0,0 +1,34 @@ +{ ... }: +{ + nixpkgs.overlays = [ + (final: prev: { + ipu6epmtl-camera-hal = prev.ipu6epmtl-camera-hal.overrideAttrs (old: { + postPatch = (old.postPatch or "") + '' + substituteInPlace src/v4l2/MediaControl.cpp \ + --replace-fail 'static const string ivscName = "Intel IVSC CSI";' \ + 'static const string ivscName = "Intel CVS";' + ''; + }); + + gst_all_1 = prev.gst_all_1 // { + icamerasrc-ipu6epmtl = (prev.gst_all_1.icamerasrc-ipu6epmtl.override { + ipu6-camera-hal = final.ipu6epmtl-camera-hal; + }).overrideAttrs + (old: { + version = "20250923_ov02e"; + src = final.fetchFromGitHub { + owner = "intel"; + repo = "icamerasrc"; + tag = "20250923_ov02e"; + hash = "sha256-mKRK0Z3dnyvzvoL6BotpVFRtkb53GQw9wUOrHIUoEsA="; + }; + }); + }; + }) + ]; + + hardware.ipu6 = { + enable = true; + platform = "ipu6epmtl"; + }; +}