Skip to content

WIP: Add radxa-cm-q64 suppots#545

Draft
CodeChenL wants to merge 17 commits intoradxa:linux-6.18.2from
CodeChenL:add_cm-q64
Draft

WIP: Add radxa-cm-q64 suppots#545
CodeChenL wants to merge 17 commits intoradxa:linux-6.18.2from
CodeChenL:add_cm-q64

Conversation

@CodeChenL
Copy link
Copy Markdown
Member

@CodeChenL CodeChenL commented Apr 27, 2026

Compatible with the manually modified hardware version X1.0, for testing purposes only "Unified Image"

@CodeChenL
Copy link
Copy Markdown
Member Author

@BigfootACA @strongtz 有空也可以review一下,谢谢

The Raspberry Pi 7" 800x480 panel uses a Toshiba TC358762 DSI
to DPI bridge chip, so there is a requirement for the timings
to be specified for the end panel. Add such a definition.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

drm/panel-simple: Populate bpc when using panel-dpi

panel-dpi doesn't know the bit depth, so in the same way that
DPI is guessed for the connector type, guess that it'll be 8bpc.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

drm/panel-simple: Allow the bus format to be read from DT for panel-dpi

The "panel-dpi" compatible string configures panel from device tree,
but it doesn't provide any way of configuring the bus format (colour
representation), nor does it populate it.

Add a DT parameter "bus-format" that allows the MEDIA_BUS_FMT_xxx value
to be specified from device tree.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

drm/panel: simple: add Geekworm MZP280 Panel

Add support for the Geekworm MZP280 Panel

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Acked-by: Maxime Ripard <maxime@cerno.tech>

drm/panel: simple: Add Innolux AT056tN53V1 5.6" VGA

Add support for the Innolux AT056tN53V1 5.6" VGA (640x480) TFT LCD
panel.

Signed-off-by: Joerg Quinten <aBUGSworstnightmare@gmail.com>
Signed-off-by: Phil Elwell <phil@raspberrypi.com>

drm/panel: simple: Alter the timing for the Pi 7" DSI display

vc4 has always fixed up the timing, so the values defined have
never actually appeared on the wire.
The display appears to want a slightly longer HFP, so extend
the timings and recompute the clock to give the same frame rate.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

drm/panel: add panel-dsi

Equivalent to panel-dpi for configuring a simple DSI panel with
device tree side timings and bus settings.
Motiviation is the same as for panel-dpi of wanting to support
new simple panels without needing to patch the kernel.

Signed-off-by: Timon Skerutsch <kernel@diodes-delight.com>

drm/panel-simple: Remove custom handling of orientation

The framework now handles reading orientation from DT, therefore
remove the custom get_orientation hook from panel-simple.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

drm/panel-simple: Fix 7inch panel mode for misalignment

The 7inch panel is one line off the screen both horizontally
and vertically.

Alter the panel mode to correct this.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

drm/panel-simple: Increase pixel clock on Pi 7inch panel

The Toshiba bridge is very fussy and doesn't like the CM3
output when being told to produce a 27.777MHz pixel clock, which
is an almost perfect match to the DSI link integer divider.

Increasing to 30MHz will switch the DSI link from 333MHz to 400MHz
and makes the bridge happy with the same video timing as works
on Pi4.
(Pi4 will be using a link frequency of 375MHz due to a 3GHz
parent PLL).

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
@CodeChenL
Copy link
Copy Markdown
Member Author

rebase了一下到linux-6.18.2分支的最新提交

u32 max_vrefresh;
} msm_dp_bridge_mode_filters[] = {
{ "radxa,dragon-q6a", 3440 * 1440, 30 },
{}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不是少了q64的设置

Copy link
Copy Markdown
Member Author

@CodeChenL CodeChenL Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q6a转换芯片性能不行才限制,cm-q64不用限制

* Copyright (C) 2022-2023, Raspberry Pi Ltd
*
* Based on Sony imx477 camera driver
* Copyright (C) 2020 Raspberry Pi Ltd
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是别人的现成代码那尽量保留别人的提交信息,跟第一个提交一样

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个驱动是结合树莓派内核源码+邮件列表(他们之中单拎出来一个在主线都不能用),独立新创建的驱动,所以可能git不好溯源,我补一下版权信息吧

};

chosen {
stdout-path = "serial0:115200n8";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其他设备树也有么?这个好像是bootloader去配置的

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接从q6a设备树拷的

};
};

// hdmi-edp-connector {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要提交注释了的代码

regulator-max-microvolt = <1800000>;
vin-supply = <&vreg_l18b_1p8>;

regulator-boot-on;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regulator-boot-on一般是不需要的属性

};

&remoteproc_adsp {
firmware-name = "qcom/qcs6490/radxa/dragon-q6a/adsp.mbn";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可能要用单独的名字

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

声卡实现方案还不确定,所以可能先不动,后期再改


&sound {
compatible = "qcom,qcs6490-rb3gen2-sndcard";
model = "QCS6490-Radxa-Dragon-Q6A";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

新model?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

声卡实现方案还不确定,所以可能先不动,后期再改

@CodeChenL CodeChenL changed the title Add radxa-cm-q64 suppots WIP: Add radxa-cm-q64 suppots Apr 28, 2026
@CodeChenL CodeChenL marked this pull request as draft April 28, 2026 02:24
@CodeChenL
Copy link
Copy Markdown
Member Author

根据内部建议需要较大修改,先转为草稿了

njhollinghurst and others added 15 commits May 6, 2026 12:02
The imx708 is a 12MP MIPI sensor with a 16:9 aspect ratio, here using
two CSI-2 lanes. It is a "quad Bayer" sensor with all 3 modes offering
10-bit output:

12MP: 4608x2592 up to 14.35fps (full FoV)
1080p: 2304x1296 up to 56.02fps (full FoV)
720p: 1536x864 up to 120.12fps (cropped)

This imx708 sensor driver is based heavily on the imx477 driver and
has been tested on the Raspberry Pi platform using libcamera.

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

drivers: media: imx708: Enable long exposure mode

Enable long exposure modes by using the long exposure shift register setting
in the imx708 sensor.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

drivers: media: i2c: imx708: Fix crop information

The 1536x864 mode contained incorrect crop information.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>

drivers: media: i2c: imx708: Fix WIDE_DYNAMIC_RANGE control with long exposure

Setting V4L2_CID_WIDE_DYNAMIC_RANGE was causing the long exposure
shift count to be reset, which is incorrect if the user has already
changed the frame length to cause it to have a non-zero value.

Because it only updates control ranges and doesn't set any registers,
the control can also be applied when the sensor is not powered on.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>

drivers: media: imx708: Increase usable link frequencies

Add support for three different usable link frequencies (default 450Mhz,
447Mhz, and 453MHz) for the IMX708 camera sensor. The choice of
frequency is handled thorugh the "link-frequency" overlay parameter.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

drivers: media: imx708: Remove unused control fields

Remove unused and redundant control fields from the state structure.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

drivers: media: imx708: Tidy-ups to address upstream review comments

This commit addresses vaious tidy-ups requesed for upstreaming the
IMX708 driver. Notably:

- Remove #define IMX708_NUM_SUPPLIES and use ARRAY_SIZE() directly
- Use dev_err_probe where possible in imx708_probe()
- Fix error handling paths in imx708_probe()

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

drivers: media: imx708: Follow the standard devicetree labels

Switch the system clock name from "xclk" to "inclk".
Use lower case lables for all regulator names.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

drives: media: imx708: Put HFLIP and VFLIP controls in a cluster

Create a cluster for the HVLIP and VFLIP controls so they are treated
as a single composite control.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

drivers: media: imx708: Adjust broken line correction parameter

In full-resolution mode, the LPF_INTENSITY_EN and LPF_INTENSITY
registers control Quad Bayer Re-mosaic broken line correction.
Expose this as a module parameter "qbc_adjust": zero disables
the correction and values in the range 2 to 5 set its strength.

There is a trade-off between coloured and monochrome patterns.
The previous fixed value 4 could produce ladder/spots artefacts
in coloured textures. The new default value 2 may suit a wider
range of scenes.

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>

media: i2c: imx708: Squash fixes

media: i2c: imx708: Fix lockdep issues.

The driver had a lockdep_assert_held in imx708_get_format_code,
but the calls from enum_mbus_code and enum_frame_size didn't take
the mutex.

Likewise imx708_set_framing_limits calling __v4l2_ctrl_modify_range
had a lockdep, but when going through the probe function the mutex
hadn't been taken.

Fix both cases.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

media: i2c: Tweak default PDAF gain table in imx708 driver

After analyzing more Raspberry Pi V3 cameras, adjust the
default PDAF shield-pixel gain tables (they can still be
overridden by camera OTP where programmed).

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>

drivers: i2c: imx708: Use pm_runtime_use_autosuspend()

Switch the power management in the imx708 device driver to use auto-
suspend with a 5s timeout.

This improves mode switching time that avoids additional regulator
switch-on delays and common register I2C writes.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
The driver was always using non-continuous clock mode.
Add support for selecting continuous clock mode as well.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
This patch adds MEDIA_BUS_FMT_SENSOR_DATA used by the bcm2835-unicam
driver to support CSI-2 embedded data streams from camera sensors.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
The DW9817 is effectively the same as DW9807 from a programming
interface, however it drives +/-100mA instead of 0-100mA. This means
that the power on ramp needs to take the lens from the midpoint, and
power off return it there. It also changes the default position for
the module.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
The VCM driver will often be controlled via a regulator,
therefore add in the relevant DT hooks.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Uses the regulator notifier framework so that the current
focus position will be restored whenever any user of the
regulator powers it up. This means that should the VCM
and sensor share a common regulator then starting the sensor
will automatically restore the default position. If they
have independent regulators then it will behave be powered
up when the VCM subdev is opened.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
The power up/down sequence is already ramped. Extend this to
the first user movement as well, as this will generally avoid
the "tick" noises due to rapid movements and overshooting.
Subsequent movements are generally smaller and so don't cause
issues.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Add Belling BL24C16F EEPROM compatible string alongside the
existing BL24C16A entry.

Signed-off-by: Jiali Chen <chenjiali@radxa.com>
Add GPIO1 through GPIO4 voltage channel definitions
to the ADC7 PMIC channel table.

Signed-off-by: Jiali Chen <chenjiali@radxa.com>
Add set_continuous_clock callback to the 7nm 7280 PHY
configuration, enabling continuous DSI clock mode support.

Signed-off-by: Jiali Chen <chenjiali@radxa.com>
Change DSI mode from MIPI_DSI_MODE_VIDEO_SYNC_PULSE to
MIPI_DSI_MODE_VIDEO_BURST for improved display compatibility.

Signed-off-by: Jiali Chen <chenjiali@radxa.com>
…avoid instability

Signed-off-by: Junhao Xie <bigfoot@radxa.com>
Add driver for Lontium LT8712sx Single DisplayPort to Dual HDMI bridge.
The LT8713sx is in place, but is untested.

Signed-off-by: Jiali Chen <chenjiali@radxa.com>
add "radxa,cm-q64" as compatible device for QSEECOM

This is required to get access to efivars and uefi boot loader support.
Signed-off-by: Jiali Chen <chenjiali@radxa.com>
Rework PM7325 GPIO pinctrl for hardware version selection. Add
gpio-line-names, hardware_version_sel pin configuration, and
hardware_version_adc VADC channel for board revision identification.

Signed-off-by: Jiali Chen <chenjiali@radxa.com>
Add device tree for Radxa CM-Q64 compute module on Raspberry Pi
CM5 IO carrier board. Includes full PMIC, PCIe, USB, DP, audio
(WCD938x), UFS, and SD card support. Add KVM overlay for
hypervisor mode configuration.

Signed-off-by: Jiali Chen <chenjiali@radxa.com>
@RadxaYuntian
Copy link
Copy Markdown
Member

rebase到7.0.2或者是开一个新PR?

@CodeChenL
Copy link
Copy Markdown
Member Author

rebase到7.0.2或者是开一个新PR?

先开一个pr吧,这个分支备用说不定还有用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants