• Martin Kepplinger's avatar
    arm64: dts: imx8mq-librem5: describe the selfie cam · fed76035
    Martin Kepplinger authored
    Enable the CSI1 MIPI RX controller and CSI1 bridge on the SoC. Describe
    the Librem 5 front-facing camera, connected to the CSI1 MIPI.
    
    the following sets formats, streams 10 frames and saves one:
    
    	#!/bin/bash
    	WIDTH=1632
    	HEIGHT=1224
    	SKIP=10
    
    	media-ctl -d "platform:30a90000.csi" --set-v4l2 "'csi':0 [fmt:SGBRG10/${WIDTH}x${HEIGHT} colorspace:raw]"
    	media-ctl -d "platform:30a90000.csi" --set-v4l2 "'imx8mq-mipi-csi2 30a70000.csi':0 [fmt:SGBRG10/${WIDTH}x${HEIGHT} colorspace:raw]"
    	media-ctl -d "platform:30a90000.csi" --set-v4l2 "'hi846 2-0020':0 [fmt:SGBRG10/${WIDTH}x${HEIGHT} colorspace:raw]"
    	media-ctl -d "platform:30a90000.csi" -l "'hi846 2-0020':0 -> 'imx8mq-mipi-csi2 30a70000.csi':0 [1]"
    	v4l2-ctl -d "/dev/v4l/by-path/platform-30a90000.csi-video-index0" --set-fmt-video=width=${WIDTH},height=${HEIGHT},pixelformat=GB16 --stream-mmap --stream-to=$WIDTH.raw --stream-skip=$SKIP --stream-count=1
    Signed-off-by: default avatarMartin Kepplinger <martin.kepplinger@puri.sm>
    Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
    fed76035
imx8mq-librem5.dtsi 28.4 KB