maint: rewrite various kernel patchsets#9888
Conversation
📝 WalkthroughWalkthroughThis PR introduces a collection of kernel device tree and driver patches across Amlogic Meson, Rockchip, and Allwinner SoCs for kernel versions 6.18 and 7.0. Changes include MMC clock phase configuration, SPI NOR flash manufacturer support, DWC3 USB3 PHY power tracking, USB Type-C TCPM capability registration fixes, RK3528 USB2 PHY standalone regmap support, DRM backend DMA device handling, A523 SPI controller enablement, board device tree bindings for Radxa Cubie A5E, TCPM logging improvements, and DRM DE33 new bindings migration. ChangesMulti-subsystem kernel patches across Amlogic, Rockchip, and Allwinner platforms (6.18-7.0)
🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
patch/kernel/archive/sunxi-7.0/patches.drm/0038-drm-sun4i-switch-DE33-to-new-bindings.patch (1)
269-304:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix DE33 planes lookup: probe-defer must hit the mod_clk unwind, and the planes device ref must be released
- In
sun8i_mixer_bind(DE33 path), the!databranch doesput_device(&pdev->dev)and thenreturn -EPROBE_DEFER;, which bypasses theerr_disable_mod_clk:cleanup (leavesmixer->mod_clkenabled).- The code assigns
mixer->planes_dev = &pdev->devbut the patch hunk shows no corresponding success-path release for that device reference; add an unwind/cleanup path for the acquiredpdev->dev.🔧 Suggested fix
+static void sun8i_mixer_put_planes_dev(void *data) +{ + put_device(data); +} + ... if (mixer->cfg->de_type == SUN8I_MIXER_DE33) { struct platform_device *pdev; struct device_node *np; void *data; @@ data = platform_get_drvdata(pdev); if (!data) { put_device(&pdev->dev); - return -EPROBE_DEFER; + ret = -EPROBE_DEFER; + goto err_disable_mod_clk; } mixer->planes_dev = &pdev->dev; + ret = devm_add_action_or_reset(dev, sun8i_mixer_put_planes_dev, + mixer->planes_dev); + if (ret) + goto err_disable_mod_clk; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@patch/kernel/archive/sunxi-7.0/patches.drm/0038-drm-sun4i-switch-DE33-to-new-bindings.patch` around lines 269 - 304, The DE33 probe-defer path in sun8i_mixer_bind bypasses the mod_clk cleanup and leaks the pdev ref; change the !data branch so it calls put_device(&pdev->dev) then jumps to err_disable_mod_clk (instead of returning) and update the err_disable_mod_clk cleanup to release any held planes dev reference by calling put_device(mixer->planes_dev) if mixer->planes_dev is set before calling clk_disable_unprepare(mixer->mod_clk); ensure mixer->planes_dev is only assigned after platform_get_drvdata succeeds so the cleanup check is valid.patch/kernel/archive/rockchip64-7.0/general-drm-panel-add-yixian-yx0345-panel.patch (2)
185-208:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winHandle DSI init errors and guard optional reset GPIO
yixian_yx0345_prepare()ignoresmctx.accum_errand always returns success, so DSI init failures leave regulators enabled and the panel partially initialized.yixian_yx0345_unprepare()callsgpiod_set_value_cansleep(ctx->reset_gpio, 1)unconditionally, butreset_gpiois optional viadevm_gpiod_get_optional()and may beNULL.Suggested fix
static int yixian_yx0345_prepare(struct drm_panel *panel) { struct yixian_yx0345 *ctx = to_yixian_yx0345(panel); struct mipi_dsi_multi_context mctx = { .dsi = ctx->dsi }; + struct yixian_yx0345_panel_data *panel_data = ctx->panel_info->panel_data; int ret; ret = regulator_bulk_enable(ctx->num_supplies, ctx->supplies); if (ret < 0) return ret; @@ - struct yixian_yx0345_panel_data *panel_data = - ctx->panel_info->panel_data; - for (int i = 0; i < panel_data->len; i++) { struct yixian_yx0345_cmd code = panel_data->init_code[i]; mipi_dsi_dcs_write_buffer_multi(&mctx, &code.data, code.len); @@ mipi_dsi_msleep(&mctx, 10); - return 0; + ret = mctx.accum_err; + if (ret < 0) { + if (ctx->reset_gpio) + gpiod_set_value_cansleep(ctx->reset_gpio, 1); + regulator_bulk_disable(ctx->num_supplies, ctx->supplies); + } + + return ret; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@patch/kernel/archive/rockchip64-7.0/general-drm-panel-add-yixian-yx0345-panel.patch` around lines 185 - 208, yixian_yx0345_prepare currently ignores mctx.accum_err and may leave regulators enabled on DSI failures, and yixian_yx0345_unprepare calls gpiod_set_value_cansleep unconditionally even though reset_gpio is optional; update yixian_yx0345_prepare to check mctx.accum_err (and any returned error from mipi_dsi calls) after the init loop and on error call regulator_bulk_disable(ctx->num_supplies, ctx->supplies) and return the error code instead of 0, and update yixian_yx0345_unprepare to guard the reset operation with if (ctx->reset_gpio) before calling gpiod_set_value_cansleep(ctx->reset_gpio, 1).
229-236:⚠️ Potential issue | 🟠 Major | ⚡ Quick winUse zero-parameter DCS writes for display-off and enter-sleep
The code sends
mipi_dsi_dcs_write(..., <cmd>, &data, 1)with a dummy byte for DCS commands that should have no payload; use the helper’s zero-length form withNULL, 0for the payload.Suggested fix
- u8 data = 0x00; - ret = mipi_dsi_dcs_write(ctx.dsi, 0x28, &data, 1); + ret = mipi_dsi_dcs_write(ctx.dsi, MIPI_DCS_SET_DISPLAY_OFF, NULL, 0); if (ret < 0) return ret; - ret = mipi_dsi_dcs_write(ctx.dsi, 0x10, &data, 1); + ret = mipi_dsi_dcs_write(ctx.dsi, MIPI_DCS_ENTER_SLEEP_MODE, NULL, 0); if (ret < 0) return ret;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@patch/kernel/archive/rockchip64-7.0/general-drm-panel-add-yixian-yx0345-panel.patch` around lines 229 - 236, The DCS display-off and enter-sleep calls currently pass a dummy byte (u8 data and mipi_dsi_dcs_write(ctx.dsi, 0x28, &data, 1) / mipi_dsi_dcs_write(ctx.dsi, 0x10, &data, 1)); replace these with zero-parameter writes using the helper's NULL/0 payload form (call mipi_dsi_dcs_write(ctx.dsi, 0x28, NULL, 0) and mipi_dsi_dcs_write(ctx.dsi, 0x10, NULL, 0)) and remove the unused u8 data variable, keeping the same error checks against ret and ctx.dsi references.
🧹 Nitpick comments (1)
patch/kernel/archive/sunxi-6.18/patches.backports/30-allwinner-a523-support-spi-controllers.patch (1)
175-186: Please attach a minimal SPI bring-up validation matrix before merge.Since this enables board SPI NOR nodes on Cubie A5E and OrangePi 4A, please include boot evidence (probe + MTD enumeration) for both boards to reduce integration risk.
Also applies to: 195-208
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@patch/kernel/archive/sunxi-6.18/patches.backports/30-allwinner-a523-support-spi-controllers.patch` around lines 175 - 186, Add a minimal SPI bring-up validation matrix and boot evidence before merging the spi0 device-tree addition: for the spi0 node and the w25q128 flash@0 entry validate on both Cubie A5E and OrangePi 4A by providing dmesg/kernel logs showing the SPI controller probe and the Winbond w25q128 probe, plus MTD enumeration output (e.g., /proc/mtd or dmesg lines showing mtd0/mtdblock devices) and a short matrix listing board, kernel commit/patch used, test kernel config (if non-default), and whether booted from SPI NOR; attach those logs to the PR for lines adding spi0 and w25q128 so reviewers can confirm successful bring-up on both boards.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@patch/kernel/archive/rockchip64-6.18/rk3528-10-phy-rockchip-inno-usb2-Add-support-for-RK3528.patch`:
- Around line 149-153: In rockchip_usb2phy_probe the call rphy->phy_base =
device_node_to_regmap(np) can fail because the RK3528 PHY node isn’t registered
as a syscon; instead detect that the node is not a syscon and create an MMIO
regmap from the node’s reg resource (use
of_address_to_resource/of_address_count_to_resource or of_find_property to get
the 'reg' and then devm_regmap_init_mmio on dev/returned resource) falling back
to device_node_to_regmap only for syscon nodes; update error handling to return
PTR_ERR on regmap init failure and reference rphy->phy_base,
device_node_to_regmap, devm_regmap_init_mmio and
of_syscon_register_regmap/of_address_to_resource when making the change.
---
Outside diff comments:
In
`@patch/kernel/archive/rockchip64-7.0/general-drm-panel-add-yixian-yx0345-panel.patch`:
- Around line 185-208: yixian_yx0345_prepare currently ignores mctx.accum_err
and may leave regulators enabled on DSI failures, and yixian_yx0345_unprepare
calls gpiod_set_value_cansleep unconditionally even though reset_gpio is
optional; update yixian_yx0345_prepare to check mctx.accum_err (and any returned
error from mipi_dsi calls) after the init loop and on error call
regulator_bulk_disable(ctx->num_supplies, ctx->supplies) and return the error
code instead of 0, and update yixian_yx0345_unprepare to guard the reset
operation with if (ctx->reset_gpio) before calling
gpiod_set_value_cansleep(ctx->reset_gpio, 1).
- Around line 229-236: The DCS display-off and enter-sleep calls currently pass
a dummy byte (u8 data and mipi_dsi_dcs_write(ctx.dsi, 0x28, &data, 1) /
mipi_dsi_dcs_write(ctx.dsi, 0x10, &data, 1)); replace these with zero-parameter
writes using the helper's NULL/0 payload form (call mipi_dsi_dcs_write(ctx.dsi,
0x28, NULL, 0) and mipi_dsi_dcs_write(ctx.dsi, 0x10, NULL, 0)) and remove the
unused u8 data variable, keeping the same error checks against ret and ctx.dsi
references.
In
`@patch/kernel/archive/sunxi-7.0/patches.drm/0038-drm-sun4i-switch-DE33-to-new-bindings.patch`:
- Around line 269-304: The DE33 probe-defer path in sun8i_mixer_bind bypasses
the mod_clk cleanup and leaks the pdev ref; change the !data branch so it calls
put_device(&pdev->dev) then jumps to err_disable_mod_clk (instead of returning)
and update the err_disable_mod_clk cleanup to release any held planes dev
reference by calling put_device(mixer->planes_dev) if mixer->planes_dev is set
before calling clk_disable_unprepare(mixer->mod_clk); ensure mixer->planes_dev
is only assigned after platform_get_drvdata succeeds so the cleanup check is
valid.
---
Nitpick comments:
In
`@patch/kernel/archive/sunxi-6.18/patches.backports/30-allwinner-a523-support-spi-controllers.patch`:
- Around line 175-186: Add a minimal SPI bring-up validation matrix and boot
evidence before merging the spi0 device-tree addition: for the spi0 node and the
w25q128 flash@0 entry validate on both Cubie A5E and OrangePi 4A by providing
dmesg/kernel logs showing the SPI controller probe and the Winbond w25q128
probe, plus MTD enumeration output (e.g., /proc/mtd or dmesg lines showing
mtd0/mtdblock devices) and a short matrix listing board, kernel commit/patch
used, test kernel config (if non-default), and whether booted from SPI NOR;
attach those logs to the PR for lines adding spi0 and w25q128 so reviewers can
confirm successful bring-up on both boards.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4c136237-1874-4d87-9a80-9da27c9cb81c
📒 Files selected for processing (38)
patch/kernel/archive/meson64-6.18/general-meson-mmc-2-arm64-amlogic-dts-meson-update-meson-axg-device-tree.patchpatch/kernel/archive/meson64-6.18/general-soc-0004-arm64-dts-meson-add-dts-links-to-secure-monitor-for-.patchpatch/kernel/archive/meson64-6.18/general-spi-nor-add-support-for-XT25F128B.patchpatch/kernel/archive/meson64-7.0/general-meson-mmc-2-arm64-amlogic-dts-meson-update-meson-axg-device-tree.patchpatch/kernel/archive/meson64-7.0/general-soc-0004-arm64-dts-meson-add-dts-links-to-secure-monitor-for-.patchpatch/kernel/archive/rockchip64-6.18/general-add-xtx-spi-nor-chips.patchpatch/kernel/archive/rockchip64-6.18/media-0001-Add-rkvdec-Support-v5.patchpatch/kernel/archive/rockchip64-6.18/rk3399-usbc-usb-dwc3-Track-the-power-state-of-usb3_generic_phy.patchpatch/kernel/archive/rockchip64-6.18/rk3399-usbc-usb-typec-tcpm-Fix-PD-devices-capabilities-registrat.patchpatch/kernel/archive/rockchip64-6.18/rk3528-10-phy-rockchip-inno-usb2-Add-support-for-RK3528.patchpatch/kernel/archive/rockchip64-6.18/rk3528-13-phy-rockchip-inno-usb2-fix-otg-timer-cleanup.patchpatch/kernel/archive/rockchip64-6.18/rk3576-0008-arm64-dts-rk3576-add-pwm-nodes.patchpatch/kernel/archive/rockchip64-7.0/general-drm-panel-add-yixian-yx0345-panel.patchpatch/kernel/archive/rockchip64-7.0/rk3399-usbc-usb-typec-tcpm-Fix-PD-devices-capabilities-registrat.patchpatch/kernel/archive/rockchip64-7.0/rk3528-10-phy-rockchip-inno-usb2-Add-support-for-RK3528.patchpatch/kernel/archive/rockchip64-7.0/rk3528-13-phy-rockchip-inno-usb2-fix-otg-timer-cleanup.patchpatch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun55i-a527-cubie-a5e-enable-usbc-pcie-combophy.patchpatch/kernel/archive/sunxi-6.18/patches.armbian/arm64-dts-sun55i-dtsi-add-iommu-usbc-pcie-combophy-nodes.patchpatch/kernel/archive/sunxi-6.18/patches.armbian/drm-sun4i-use-backend-mixer-as-dedicated-dma-device.patchpatch/kernel/archive/sunxi-6.18/patches.backports/21-Enable-uart1-on-Radxa-Cubie-A5E.patchpatch/kernel/archive/sunxi-6.18/patches.backports/22-Enable-wifi-on-Radxa-Cubie-A5E.patchpatch/kernel/archive/sunxi-6.18/patches.backports/30-allwinner-a523-support-spi-controllers.patchpatch/kernel/archive/sunxi-6.18/patches.backports/32-pinctrl-sunxi-a523-Remove_unneeded_IRQ_remuxing_flag.patchpatch/kernel/archive/sunxi-6.18/patches.backports/33-arm64-dts-allwinner-a523-Add_missing_GPIO_interrupt.patchpatch/kernel/archive/sunxi-6.18/patches.backports/34-fix-wifi-regulator-cubie-a5e.patchpatch/kernel/archive/sunxi-6.18/patches.megous/fixes-6.18/0024-Revert-usb-dwc3-Abort-suspend-on-soft-disconnect-fai.patchpatch/kernel/archive/sunxi-6.18/patches.megous/private-6.18/0004-mtd-spi-nor-Add-Alliance-memory-support.patchpatch/kernel/archive/sunxi-6.18/patches.megous/tcpm-6.18/0004-usb-typec-tcpm-Fix-PD-devices-capabilities-registrat.patchpatch/kernel/archive/sunxi-6.18/patches.megous/tcpm-6.18/0005-usb-typec-tcpm-Improve-logs.patchpatch/kernel/archive/sunxi-7.0/patches.armbian/3401-net-wireless-backport-aic8800-sdio-v2025_0926_91c9dae5-mm2.patchpatch/kernel/archive/sunxi-7.0/patches.armbian/arm64-dts-sun55i-a527-cubie-a5e-enable-usbc-pcie-combophy.patchpatch/kernel/archive/sunxi-7.0/patches.armbian/drm-sun4i-use-backend-mixer-as-dedicated-dma-device.patchpatch/kernel/archive/sunxi-7.0/patches.backports/21-Enable-uart1-on-Radxa-Cubie-A5E.patchpatch/kernel/archive/sunxi-7.0/patches.backports/22-Enable-wifi-on-Radxa-Cubie-A5E.patchpatch/kernel/archive/sunxi-7.0/patches.backports/23-fix-wifi-regulator-cubie-a5e.patchpatch/kernel/archive/sunxi-7.0/patches.drm/0038-drm-sun4i-switch-DE33-to-new-bindings.patchpatch/kernel/archive/sunxi-7.0/patches.megous/tcpm-7.0/0004-usb-typec-tcpm-Fix-PD-devices-capabilities-registrat.patchpatch/kernel/archive/sunxi-7.0/patches.megous/tcpm-7.0/0005-usb-typec-tcpm-Improve-logs.patch
👮 Files not reviewed due to content moderation or server errors (1)
- patch/kernel/archive/rockchip64-6.18/media-0001-Add-rkvdec-Support-v5.patch
|
✅ This PR has been reviewed and approved — all set for merge! |
Description
Rewrite of these patchsets to bring them back into good shape:
sunxi-6.18
sunxi-7.0
rockchip64-7.0
rockchip64-6.18
meson64-7.0
meson64-6.18
How Has This Been Tested?
Checklist:
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Device Tree Updates