-
-
Couldn't load subscription status.
- Fork 2.7k
rockchip: Add Ariaboard Photonicat 2 support to edge kernel #8665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
HackingGate
wants to merge
15
commits into
armbian:main
Choose a base branch
from
HackingGate:add-photonicat2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2c94b3b
board: photonicat2: add u-boot patches
HackingGate ca7f626
board: photonicat2: add initial support
HackingGate 50ec2f8
board: photonicat2: add dts in rockchip64-6.18
HackingGate c29e3a2
board: photonicat2: add PWM device nodes for rk3576
HackingGate 44b5edf
board: photonicat2: add device tree source for rk3576 support
HackingGate a7179d8
board: photonicat2: add photonicat power manager driver
HackingGate 0097f26
board: photonicat2: add kernel config
HackingGate 332b803
board: photonicat2: rebase photonicat power manager driver
HackingGate 52e2e55
board: photonicat2: improve photonicat power manager styling
HackingGate 47a4c3a
board: photonicat2: add photonicat usb watchdog driver
HackingGate c4e69c6
board: photonicat2: enable USB watchdog
HackingGate 8c71479
board: photonicat2: enable PWM
HackingGate c3643a6
arm64: rockchip: rk3576: add more patches to support photonicat2
HackingGate 609cd7a
board: photonicat2: enable PWM_ROCKCHIP_V4
HackingGate fe72975
board: photonicat2: fix typo and duplicates
HackingGate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| # Rockchip RK3576 octa core 4-16GB 2x GbE eMMC HDMI WiFi USB3 3x M.2 (B/E/M-Key) | ||
|
|
||
| BOARD_NAME="Photonicat2" | ||
| BOARDFAMILY="rk35xx" | ||
| 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" | ||
|
|
||
| # Enable Photonicat2 power management and USB watchdog driver (requires SERIAL_DEV_BUS) | ||
| function custom_kernel_config__photonicat2_pm() { | ||
| kernel_config_modifying_hashes+=( | ||
| "CONFIG_SERIAL_DEV_BUS=y" | ||
| "CONFIG_SERIAL_DEV_CTRL_TTYPORT=y" | ||
| "CONFIG_PHOTONICAT_PM=y" | ||
| "CONFIG_PHOTONICAT_USB_WDT=m" | ||
| ) | ||
| if [[ -f .config ]]; then | ||
| kernel_config_set_y SERIAL_DEV_BUS | ||
| kernel_config_set_y SERIAL_DEV_CTRL_TTYPORT | ||
| kernel_config_set_y PHOTONICAT_PM | ||
| kernel_config_set_m PHOTONICAT_USB_WDT | ||
| fi | ||
| } | ||
|
|
||
| # Enable PWM subsystem for backlight, beeper, voltage regulation, LEDs | ||
| function custom_kernel_config__photonicat2_pwm() { | ||
| kernel_config_modifying_hashes+=( | ||
| "CONFIG_PWM=y" | ||
| "CONFIG_ROCKCHIP_MFPWM=y" | ||
| "CONFIG_PWM_ROCKCHIP_V4=y" | ||
| "CONFIG_ROCKCHIP_PWM_CAPTURE=y" | ||
| "CONFIG_INPUT_PWM_BEEPER=y" | ||
| "CONFIG_REGULATOR_PWM=y" | ||
| "CONFIG_LEDS_PWM=y" | ||
| ) | ||
| if [[ -f .config ]]; then | ||
| kernel_config_set_y PWM | ||
| kernel_config_set_y ROCKCHIP_MFPWM | ||
| kernel_config_set_y PWM_ROCKCHIP_V4 | ||
| kernel_config_set_y ROCKCHIP_PWM_CAPTURE | ||
| kernel_config_set_y INPUT_PWM_BEEPER | ||
| kernel_config_set_y REGULATOR_PWM | ||
| kernel_config_set_y LEDS_PWM | ||
| fi | ||
| } | ||
|
|
||
| # Enable LCD backlight control (depends on PWM subsystem) | ||
| function custom_kernel_config__photonicat2_backlight() { | ||
| kernel_config_modifying_hashes+=( | ||
| "CONFIG_BACKLIGHT_CLASS_DEVICE=y" | ||
| "CONFIG_BACKLIGHT_PWM=y" | ||
| "CONFIG_BACKLIGHT_GPIO=y" | ||
| ) | ||
| if [[ -f .config ]]; then | ||
| kernel_config_set_y BACKLIGHT_CLASS_DEVICE | ||
| kernel_config_set_y BACKLIGHT_PWM | ||
| kernel_config_set_y BACKLIGHT_GPIO | ||
| fi | ||
| } | ||
|
|
||
| # Enable STMMAC ethernet drivers for the 2x RJ45 Gigabit Ethernet ports | ||
| function custom_kernel_config__photonicat2_ethernet() { | ||
| kernel_config_modifying_hashes+=( | ||
| "CONFIG_STMMAC_ETH=y" | ||
| "CONFIG_STMMAC_PLATFORM=y" | ||
| ) | ||
| if [[ -f .config ]]; then | ||
| kernel_config_set_y STMMAC_ETH | ||
| kernel_config_set_y STMMAC_PLATFORM | ||
| fi | ||
| } | ||
|
|
||
| # 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" | ||
| } | ||
|
|
||
| # Enable WWAN subsystem and USB modem drivers for M.2 B-Key cellular modules over USB | ||
| # Supports 4G/5G modems (e.g., Quectel RM520N-GL) via QMI, MBIM, NCM | ||
| function custom_kernel_config__photonicat2_usb_modem() { | ||
| kernel_config_modifying_hashes+=( | ||
| "CONFIG_USB_WDM=m" | ||
| "CONFIG_USB_NET_QMI_WWAN=m" | ||
| "CONFIG_USB_NET_CDC_MBIM=m" | ||
| "CONFIG_USB_NET_CDC_NCM=m" | ||
| "CONFIG_USB_SERIAL=m" | ||
| "CONFIG_USB_SERIAL_OPTION=m" | ||
| "CONFIG_USB_SERIAL_WWAN=m" | ||
| "CONFIG_USB_SERIAL_QUALCOMM=m" | ||
| "CONFIG_QCOM_QMI_HELPERS=m" | ||
| ) | ||
| if [[ -f .config ]]; then | ||
| kernel_config_set_m USB_WDM | ||
| kernel_config_set_m USB_NET_QMI_WWAN | ||
| kernel_config_set_m USB_NET_CDC_MBIM | ||
| kernel_config_set_m USB_NET_CDC_NCM | ||
| kernel_config_set_m USB_SERIAL | ||
| kernel_config_set_m USB_SERIAL_OPTION | ||
| kernel_config_set_m USB_SERIAL_WWAN | ||
| kernel_config_set_m USB_SERIAL_QUALCOMM | ||
| kernel_config_set_m QCOM_QMI_HELPERS | ||
| fi | ||
| } | ||
|
|
||
| # Enable PCIe WiFi support (Qualcomm ath11k for QCNFA765/wcn6855) | ||
| # MHI_BUS and QRTR must be built-in to avoid race condition with ath11k probe | ||
| function custom_kernel_config__photonicat2_pcie_wifi() { | ||
| kernel_config_modifying_hashes+=( | ||
| "CONFIG_ATH11K=m" | ||
| "CONFIG_ATH11K_PCI=m" | ||
| "CONFIG_MHI_BUS=y" | ||
| "CONFIG_MHI_BUS_PCI_GENERIC=m" | ||
| "CONFIG_QRTR=y" | ||
| "CONFIG_QRTR_MHI=y" | ||
| "CONFIG_QRTR_TUN=m" | ||
| ) | ||
| if [[ -f .config ]]; then | ||
| kernel_config_set_m ATH11K | ||
| kernel_config_set_m ATH11K_PCI | ||
| kernel_config_set_y MHI_BUS | ||
| kernel_config_set_m MHI_BUS_PCI_GENERIC | ||
| kernel_config_set_y QRTR | ||
| kernel_config_set_y QRTR_MHI | ||
| kernel_config_set_m QRTR_TUN | ||
| fi | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:
📝 Committable suggestion
🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 20652
🏁 Script executed:
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.conffamily configuration sourcesrockchip64_common.incat the beginning, which defines both thecurrentandedgekernel branches withLINUXFAMILY=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
⛔ Learnings removed
🧠 Learnings used