Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

OPI 4A - Allwinner T527

Featured Replies

NPU is functional on https://github.com/ut-slayer/orangepi-4a-mainline

 

https://github.com/defencedog/orangepi4A/tree/main/NPU_modules_opi4a_6.18.44

https://github.com/defencedog/orangepi4A/tree/main/NPU_proj_opi4a_6.18.44

 

Many inference functions are missing from mainline NPU support (many works though which were exploited in x3 NPU projects)

 

However I do use NPU for pdf OCR which I cannot do here https://github.com/defencedog/orangepi3b_v2.1/tree/main/apps/NPU_OCR

 

 

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

Edited by Nick_Sl

I’ve published my experimental Sony IMX219 camera support for the Orange Pi 4A (Allwinner T527/A523).

The project brings up the complete camera path on Linux 7.2.6: IMX219 → MIPI CSI-2/D-PHY → A523 CSI/VIN capture → V4L2. It includes a validated 22-patch kernel series, Device Tree integration, A523 MIPI D-PHY and CSI capture support, RAW10 capture, and an OpenCL/Rusticl/Panfrost userspace pipeline for debayering and YUV420 conversion.

The current setup has been tested with 1920×1080 RAW10 capture and an approximately 10 FPS userspace streaming pipeline. The kernel patch series was also reproduced from a clean Linux 7.2.6 base and verified against the published aggregate patch.

This is experimental bring-up work, not upstream-ready support yet.

GitHub: https://github.com/nickslkr/orangepi-4a-imx219

Feedback, testing on other A523/T527 boards, and technical review are welcome.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.