Hello,
I am working on Sony IMX219 camera support on the Orange Pi 4A (Allwinner T527) with the current Armbian/mainline kernel.
Current system
Board: Orange Pi 4A
SoC: Allwinner T527 / sun55i-a523 family
Armbian: 26.11.0-trunk.54
Running kernel: 7.2.6-edge-sunxi64
Camera: Sony IMX219
Interface: 4-lane MIPI CSI-2
Current DTB: sun55i-t527-orangepi-4a.dtb
The IMX219 V4L2 sensor driver is already present in the kernel:
drivers/media/i2c/imx219.c
and the corresponding module is available:
imx219.ko
with the expected sony,imx219 alias.
Current camera state
At the moment there are:
/dev/video* — absent /dev/media* — absent
The current DT does not contain the complete T527 camera/VIN/CSI/MIPI/ISP topology.
I therefore started comparing the current mainline DT and drivers with the Orange Pi vendor T527 BSP.
I2C / IMX219
The vendor DTS defines:
TWI0 controller: 0x02502000 IMX219 address: 0x20 TWI0 pins: PH0 / PH1 PWDN: PH2
On the current Armbian system TWI0 is available as:
/dev/i2c-1
and PH0/PH1 are correctly assigned to:
2502000.i2c function twi0
However:
sudo i2cdetect -y 1
does not detect a device at 0x20.
At this point I have not established the reason for the missing I2C ACK. I do not want to assume that it is caused by the driver or by the CSI host.
PH2 is currently unclaimed and matches the PWDN GPIO used by the vendor DTS.
Reconstructed vendor camera topology
From the Orange Pi T527 vendor BSP I reconstructed the following intended topology:
IMX219 │ │ 4-lane MIPI CSI-2 ▼ MIPI2 │ ▼ CSI2 │ ▼ VINC0 │ ▼ ISP / VIPP / DMA │ ▼ V4L2 / media
The vendor VINC configuration contains:
vinc0_csi_sel = 2 vinc0_mipi_sel = 2
which points to MIPI2 / CSI2 for this configuration.
Important vendor hardware resources
The vendor BSP exposes the following resources:
BlockBase address
VIN host0x05800800
CSI20x05822000
MIPI20x05810300
MIPI2 PHY0x05811800
MIPI2 is configured for four lanes.
The MIPI2 S2P register is:
0x05810328
and the vendor four-lane configuration uses:
0x00280300
The vendor implementation also contains separate CSI/MIPI/ISP clocks, bus gates and resets, including CSI and ISP reset resources.
No MMIO writes have been performed during this investigation.
Vendor VIN implementation
The vendor vind@5800800 node contains the complete camera-host resource set, including:
CSI core clock
CSI source clock
CSI master clocks 0..3
ISP clock/source
CSI bus clock
CSI MBUS gate
ISP MBUS gate
CSI reset
ISP reset
camera power domain
VIN / CCU / combo-CSI register mappings
The vendor driver maps three relevant register regions:
VIN / CSI top VIN CCU Combo CSI top
Vendor driver structure
An important finding is that the vendor camera support is not implemented as a single MIPI driver.
The vendor vin_v4l2.ko contains, among other components:
sunxi_csi sunxi_mipi combo_csi sunxi_isp vipp dma vin_video vin_core sensor_list
So simply enabling the existing imx219 driver is not sufficient to reproduce the vendor camera pipeline.
The generic mainline MIPI CSI-2 drivers currently available for other Allwinner SoCs also use different compatibles and do not directly bind the vendor:
allwinner,sunxi-mipi
implementation used by the T527 BSP.
Present / Missing
PresentMissing
IMX219 kernel driverComplete T527 camera DT topology
TWI0 /dev/i2c-1IMX219 ACK at 0x20
PH0/PH1 TWI0 pinmuxSensor power/MCLK/PWDN binding
Vendor T527 camera topology reconstructedMainline T527 CSI/MIPI host support
4-lane IMX219 configuration identified/dev/video* / /dev/media* camera pipeline
Current conclusion
The sensor driver itself is already available.
The larger missing piece appears to be the T527 camera host integration: VIN/VINC, MIPI2, CSI2, PHY, clocks/resets, power domain and the corresponding device-tree/media-controller topology.
At the same time, the sensor currently does not ACK on I2C address 0x20, so the physical/power/MCLK/PWDN side still needs to be verified independently.
I have documented the reconstructed vendor resources and topology in more detail in the attached technical report.
Question for the Armbian / mainline developers
Would this reconstructed T527 camera topology and the vendor resource information be useful for upstream/mainline camera support?
If so, which repository/subsystem would be the preferred place to continue this work — Linux media/V4L2, sunxi platform support, or another location?
I would also appreciate advice on whether the T527 VIN/MIPI/CSI blocks are already being worked on elsewhere, so that this work can be aligned with existing upstream efforts rather than duplicated.
English technical report:
Orange Pi 4A / Allwinner T527 — IMX219 Camera Support Report
Thank you.
orange_pi_4a_imx219_report_en.pdf