Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a1c6231
board: photonicat2: add u-boot patches
HackingGate Sep 20, 2025
7b14bf4
board: photonicat2: add initial support
HackingGate Sep 20, 2025
2d71562
board: photonicat2: add dts in rockchip64-6.18
HackingGate Sep 27, 2025
b318ca5
board: photonicat2: add PWM device nodes for rk3576
HackingGate Sep 27, 2025
1e4a135
board: photonicat2: add device tree source for rk3576 support
HackingGate Sep 27, 2025
a49c5a0
board: photonicat2: add photonicat power manager driver
HackingGate Oct 3, 2025
2638571
board: photonicat2: add kernel config
HackingGate Oct 3, 2025
8ae804c
board: photonicat2: rebase photonicat power manager driver
HackingGate Oct 4, 2025
52a3fa2
board: photonicat2: improve photonicat power manager styling
HackingGate Oct 4, 2025
e08ad99
board: photonicat2: add photonicat usb watchdog driver
HackingGate Oct 25, 2025
b9b8c84
board: photonicat2: enable USB watchdog
HackingGate Oct 25, 2025
92bd8e2
board: photonicat2: enable PWM
HackingGate Oct 25, 2025
16bac61
arm64: rockchip: rk3576: add more patches to support photonicat2
HackingGate Oct 25, 2025
3c82c5b
board: photonicat2: enable PWM_ROCKCHIP_V4
HackingGate Oct 25, 2025
21a523f
board: photonicat2: fix typo and duplicates
HackingGate Oct 26, 2025
85e8858
arm64: rockchip: rk3576: extended PCI Wi-Fi reset timing and bus mast…
HackingGate Oct 26, 2025
084b290
board: photonicat2: move pwm nodes to device tree and remove wrong pw…
HackingGate Oct 8, 2025
b05683d
config: rockchip64: edge: update kernel configs
HackingGate Nov 12, 2025
a7d6907
board: photonicat2: migrate kernel configs
HackingGate Nov 12, 2025
bba19ba
board: photonicat2: move MFPWM to csc and comment fix
HackingGate Nov 14, 2025
ee13ecb
board: photonicat2: move kernel configs completely away from csc
HackingGate Nov 14, 2025
f652a74
board: photonicat2: clean up photonicat2 device tree
HackingGate Nov 18, 2025
1d1caf7
config: rockchip64: edge: remove duplicate QRTR_MHI
HackingGate Nov 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions config/boards/photonicat2.csc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Rockchip RK3576 octa core 4-16GB 2x GbE eMMC HDMI WiFi USB3 3x M.2 (B/E/M-Key)

BOARD_NAME="Photonicat2"
BOARDFAMILY="rk35xx"
Copy link
Contributor

@coderabbitai coderabbitai bot Oct 26, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Use rockchip64 family for edge kernel, not rk35xx.

Per EvilOlaf's comment in the PR, rk35xx is only relevant for vendor kernel. Since this board targets the edge kernel, it should use BOARDFAMILY="rockchip64" instead to align with the merged rockchip64 family for current and edge kernels.

Based on learnings

Apply this diff:

-BOARDFAMILY="rk35xx"
+BOARDFAMILY="rockchip64"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
BOARDFAMILY="rk35xx"
BOARDFAMILY="rockchip64"
🤖 Prompt for AI Agents
In config/boards/photonicat2.csc around line 4, BOARDFAMILY is set to "rk35xx"
but this board targets the edge kernel and should use the merged rockchip64
family; change the assignment to BOARDFAMILY="rockchip64" so the board is
associated with the rockchip64 family used for current and edge kernels.

Copy link
Contributor Author

@HackingGate HackingGate Oct 26, 2025

Choose a reason for hiding this comment

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

BOARDFAMILY="rk35xx" as all other rk3576 boards stay on.
If change to BOARDFAMILY="rockchip64", the build will switch to mainline u-boot from Radxa’s U-Boot fork, despite mainline's seems already supporting rk3576, as no other rk3576 boards on Armbian has migrated yet. I'd like to stay on Radxa's for ease for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find all board configs that reference rk3576
echo "=== All rk3576 board configurations ==="
rg -n --type=sh -C2 'rk3576' config/boards/ | head -100

echo ""
echo "=== Checking rk35xx family configuration ==="
cat config/sources/families/rk35xx.conf 2>/dev/null || echo "rk35xx.conf not found"

echo ""
echo "=== Checking rockchip64 family configuration ==="
cat config/sources/families/rockchip64.conf 2>/dev/null || echo "rockchip64.conf not found"

echo ""
echo "=== Checking rockchip64_common include ==="
cat config/sources/families/include/rockchip64_common.inc 2>/dev/null || echo "rockchip64_common.inc not found"

Length of output: 20652


🏁 Script executed:

#!/bin/bash
# Search for all boards that use BOARDFAMILY="rk35xx"
echo "=== All boards using BOARDFAMILY=\"rk35xx\" ==="
rg -n 'BOARDFAMILY="rk35xx"' config/boards/ -A2 -B2

echo ""
echo "=== All board config files ==="
fd -e csc -e conf . config/boards/ --exec echo {/}

echo ""
echo "=== Search for rk3576 across entire config directory ==="
rg -n 'rk3576' config/ --type=sh | head -50

echo ""
echo "=== Check BOOT_SOC assignments in board configs ==="
rg -n 'BOOT_SOC=' config/boards/ -A1 -B1

Length of output: 27886


@HackingGate, you're absolutely right, and I apologize for the confusion. After checking the codebase, I can confirm that all other rk3576 boards (radxa-rock-4d, radxa-cm4-io, nanopi-r76s, nanopi-m5, dshanpi-a1, armsom-sige5, armsom-cm5-rpi-cm4-io, armsom-cm5-io) use BOARDFAMILY="rk35xx", including several that target the edge kernel.

The key point I initially missed is that the rk35xx.conf family configuration sources rockchip64_common.inc at the beginning, which defines both the current and edge kernel branches with LINUXFAMILY=rockchip64. This means edge kernel support is available through the rk35xx family, even though it's not defined directly in rk35xx.conf itself.

You should keep BOARDFAMILY="rk35xx" as you have it—this follows the established pattern for all rk3576 boards in the codebase.

🐰
( ••)
/| |
|
___|
|| ||

learns from the codebase


✏️ Learnings added
Learnt from: HackingGate
PR: armbian/build#8665
File: config/boards/photonicat2.csc:4-4
Timestamp: 2025-10-26T10:41:35.107Z
Learning: In the Armbian build system, rk3576 boards consistently use BOARDFAMILY="rk35xx" for both vendor and edge kernel targets. The rk35xx family configuration sources rockchip64_common.inc, which provides edge and current kernel branch definitions, making these branches available even though they're not defined directly in rk35xx.conf.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


⛔ Learnings removed
Learnt from: SuperKali
PR: armbian/build#8609
File: config/boards/nanopi-r76s.conf:5-5
Timestamp: 2025-09-11T06:12:54.213Z
Learning: In the Armbian build system, board family configuration files (like config/sources/families/rk35xx.conf) can inherit kernel branch definitions from common include files (like config/sources/families/include/rockchip64_common.inc). Even if a branch like "edge" is not defined directly in the family conf file, it may be available through the sourced include file.

🧠 Learnings used
Learnt from: SuperKali
PR: armbian/build#8609
File: config/boards/nanopi-r76s.conf:5-5
Timestamp: 2025-09-11T06:12:54.213Z
Learning: In the Armbian build system, board family configuration files (like config/sources/families/rk35xx.conf) can inherit kernel branch definitions from common include files (like config/sources/families/include/rockchip64_common.inc). Even if a branch like "edge" is not defined directly in the family conf file, it may be available through the sourced include file.

Learnt from: amazingfate
PR: armbian/build#8619
File: config/sources/families/rockchip.conf:64-70
Timestamp: 2025-09-14T06:29:18.958Z
Learning: In the Armbian build system, vendor branch configurations in family files are designed to be shared across multiple SoCs within the same family that use the same vendor kernel tree. For example, rk35xx and rockchip-rk3588 families both use identical vendor branch settings (same KERNELSOURCE, KERNELBRANCH, and KERNELPATCHDIR), demonstrating that vendor branches are intentionally generic rather than SoC-specific.

BOOT_SOC="rk3576"
BOOTCONFIG="photonicat2-rk3576_defconfig"
KERNEL_TARGET="edge"
FULL_DESKTOP="no"
BOOT_FDT_FILE="rockchip/rk3576-photonicat2.dtb"
BOOT_SCENARIO="spl-blobs"
IMAGE_PARTITION_TABLE="gpt"
BOARD_FIRMWARE_INSTALL="-full"
ENABLE_EXTENSIONS="radxa-aic8800"
AIC8800_TYPE="usb"

# Add cellular modem support packages
function post_family_config__photonicat2_modem_packages() {
display_alert "$BOARD" "Adding cellular modem packages" "info"
add_packages_to_image "modemmanager"
add_packages_to_image "libqmi-utils"
add_packages_to_image "libmbim-utils"
add_packages_to_image "usb-modeswitch"
add_packages_to_image "libxml2-utils"
}
23 changes: 21 additions & 2 deletions config/kernel/linux-rockchip64-edge.config
Copy link
Contributor Author

Choose a reason for hiding this comment

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

CONFIG_PHOTONICAT_PM
CONFIG_PHOTONICAT_USB_WDT
are only for photonicat

CONFIG_PWM_ROCKCHIP_V4
CONFIG_ROCKCHIP_MFPWM
are originally from mailing list

These 4 are newly introduced in this PR, so should I have them default =n and change them to y or m in device csc?

Other config changes in the diff also presents in other families with that value, so I assume it's OK.

Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,9 @@ CONFIG_NETLINK_DIAG=m
CONFIG_MPLS_ROUTING=m
CONFIG_MPLS_IPTUNNEL=m
CONFIG_HSR=m
CONFIG_QRTR_MHI=m
CONFIG_QRTR=y
CONFIG_QRTR_TUN=m
CONFIG_QRTR_MHI=y
CONFIG_CGROUP_NET_PRIO=y
CONFIG_BPF_STREAM_PARSER=y
CONFIG_NET_PKTGEN=m
Expand Down Expand Up @@ -631,6 +632,8 @@ CONFIG_UEVENT_HELPER=y
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_VEXPRESS_CONFIG=y
CONFIG_MHI_BUS=y
# CONFIG_MHI_BUS_DEBUG is not set
CONFIG_MHI_BUS_PCI_GENERIC=m
CONFIG_MHI_BUS_EP=m
CONFIG_ARM_SCMI_PROTOCOL=y
Expand Down Expand Up @@ -868,7 +871,10 @@ CONFIG_ROCKER=m
CONFIG_SFC_SIENA=m
CONFIG_SMC91X=y
CONFIG_SMSC911X=y
CONFIG_STMMAC_ETH=m
CONFIG_STMMAC_ETH=y
CONFIG_STMMAC_PLATFORM=y
# CONFIG_STMMAC_SELFTESTS is not set
# CONFIG_STMMAC_PCI is not set
CONFIG_MSE102X=m
CONFIG_XILINX_EMACLITE=m
CONFIG_XILINX_LL_TEMAC=m
Expand Down Expand Up @@ -969,6 +975,7 @@ CONFIG_USB_RTL8152=m
CONFIG_USB_LAN78XX=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_CDC_EEM=m
CONFIG_USB_NET_CDC_NCM=m
CONFIG_USB_NET_HUAWEI_CDC_NCM=m
CONFIG_USB_NET_CDC_MBIM=m
CONFIG_USB_NET_DM9601=m
Expand All @@ -980,6 +987,8 @@ CONFIG_USB_NET_GL620A=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_MCS7830=m
CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CDC_SUBSET=m
CONFIG_USB_NET_CDC_SUBSET_ENABLE=m
CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y
CONFIG_USB_EPSON2888=y
Expand Down Expand Up @@ -1017,6 +1026,8 @@ CONFIG_ATH10K_SDIO=m
CONFIG_ATH10K_USB=m
CONFIG_ATH11K=m
CONFIG_ATH11K_PCI=m
# CONFIG_ATH11K_DEBUG is not set
# CONFIG_ATH11K_TRACING is not set
CONFIG_ATH12K=m
CONFIG_AT76C50X_USB=m
CONFIG_B43=m
Expand Down Expand Up @@ -1292,6 +1303,7 @@ CONFIG_N_GSM=m
CONFIG_NOZOMI=m
CONFIG_NULL_TTY=m
CONFIG_SERIAL_DEV_BUS=y
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_HW_RANDOM_CN10K=m
CONFIG_XILLYUSB=m
Expand Down Expand Up @@ -2436,6 +2448,7 @@ CONFIG_USB_HCD_BCMA=m
CONFIG_USB_HCD_SSB=m
CONFIG_USB_XEN_HCD=m
CONFIG_USB_PRINTER=m
CONFIG_USB_WDM=m
CONFIG_USB_TMC=m
CONFIG_USB_STORAGE=y
CONFIG_USB_STORAGE_REALTEK=m
Expand Down Expand Up @@ -2511,6 +2524,7 @@ CONFIG_USB_SERIAL_SIERRAWIRELESS=m
CONFIG_USB_SERIAL_SYMBOL=m
CONFIG_USB_SERIAL_TI=m
CONFIG_USB_SERIAL_CYBERJACK=m
CONFIG_USB_SERIAL_WWAN=m
CONFIG_USB_SERIAL_OPTION=m
CONFIG_USB_SERIAL_OMNINET=m
CONFIG_USB_SERIAL_OPTICON=m
Expand Down Expand Up @@ -2808,6 +2822,8 @@ CONFIG_FB_TFT_TLS8204=m
CONFIG_FB_TFT_UC1611=m
CONFIG_FB_TFT_UC1701=m
CONFIG_FB_TFT_UPD161704=m
CONFIG_PHOTONICAT_PM=y
CONFIG_PHOTONICAT_USB_WDT=m
CONFIG_CLK_VEXPRESS_OSC=m
CONFIG_LMK04832=m
CONFIG_COMMON_CLK_RK808=y
Expand All @@ -2833,7 +2849,9 @@ CONFIG_IOMMUFD=m
CONFIG_ROCKCHIP_IOMMU=y
CONFIG_VIRTIO_IOMMU=m
CONFIG_LITEX_SOC_CONTROLLER=m
CONFIG_QCOM_QMI_HELPERS=m
CONFIG_ROCKCHIP_IODOMAIN=y
CONFIG_ROCKCHIP_MFPWM=y
CONFIG_DEVFREQ_GOV_PERFORMANCE=m
CONFIG_DEVFREQ_GOV_POWERSAVE=m
CONFIG_DEVFREQ_GOV_USERSPACE=m
Expand Down Expand Up @@ -3074,6 +3092,7 @@ CONFIG_PWM_DWC=m
CONFIG_PWM_GPIO=m
CONFIG_PWM_NTXEC=m
CONFIG_PWM_ROCKCHIP=y
CONFIG_PWM_ROCKCHIP_V4=y
CONFIG_PWM_XILINX=m
CONFIG_PHY_CAN_TRANSCEIVER=m
CONFIG_PHY_CADENCE_TORRENT=m
Expand Down
Loading