Skip to content
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

Orange Pi 5 Max support for 6.12 and 6.13 kernel #7783

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion config/boards/orangepi5-max.csc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BOARDFAMILY="rockchip-rk3588"
BOARD_MAINTAINER=""
BOOTCONFIG="orangepi-5-max-rk3588_defconfig" # vendor name, not standard, see hook below, set BOOT_SOC below to compensate
BOOT_SOC="rk3588"
KERNEL_TARGET="vendor"
KERNEL_TARGET="vendor,current,edge"
KERNEL_TEST_TARGET="vendor"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
Expand All @@ -15,6 +15,9 @@ BOOT_SPI_RKSPI_LOADER="yes"
IMAGE_PARTITION_TABLE="gpt"
enable_extension "bcmdhd"
BCMDHD_TYPE="sdio"
# It is ok to use Armbian repo for Ubuntu 24.04, but for Debian 12 you should skip it, otherwise the board is not booting
SKIP_ARMBIAN_REPO="yes"


function post_family_tweaks__orangepi5max_naming_audios() {
display_alert "$BOARD" "Renaming orangepi5max audios" "info"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From b37359e8465822a72d6295a4f66eb4feb011cac6 Mon Sep 17 00:00:00 2001
From: Jimmy Hon <[email protected]>
Date: Sun, 10 Nov 2024 22:53:23 -0600
Subject: [PATCH 1/3] arm64: dts: rockchip: refactor common
rk3588-orangepi-5.dtsi

for Orange Pi 5 Plus/Max/Ultra and AI Max

Signed-off-by: Jimmy Hon <[email protected]>
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 86cc418a2255..83ad11650f0b 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -142,6 +142,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-jaguar.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nanopc-t6.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nanopc-t6-lts.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ok3588-c.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-orangepi-5-max.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-orangepi-5-plus.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-quartzpro64.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5-itx.dtb
--
2.34.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3588-orangepi-5.dtsi"

/ {
model = "Xunlong Orange Pi 5 Max";
compatible = "xunlong,orangepi-5-max", "rockchip,rk3588";

vcc5v0_usb30_otg: vcc5v0-usb30-otg-regulator {
compatible = "regulator-fixed";
enable-active-high;
/* USB_OTG_PWREN */
gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb_otg_pwren>;
regulator-name = "vcc5v0_usb30_otg";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_sys>;
};
};

&headphone_amp {
/* PHONE_CTL */
enable-gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
};

&analog_sound {
pinctrl-names = "default";
pinctrl-0 = <&hp_detect>;
simple-audio-card,aux-devs = <&headphone_amp>;
simple-audio-card,hp-det-gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>;

simple-audio-card,routing =
"Headphones", "LOUT1",
"Headphones", "ROUT1",
"LINPUT1", "Microphone Jack",
"RINPUT1", "Microphone Jack",
"LINPUT2", "Onboard Microphone",
"RINPUT2", "Onboard Microphone";
simple-audio-card,widgets =
"Microphone", "Microphone Jack",
"Microphone", "Onboard Microphone",
"Headphone", "Headphones";
};

&fan {
/* FAN_CTL_H */
pwms = <&pwm9 0 50000 0>;
};

&hym8563 {
interrupt-parent = <&gpio0>;
interrupts = <RK_PC4 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&rtc_int_l>;
};

&led_blue_pwm {
/* PWM_LED1 */
pwms = <&pwm4 0 25000 0>;
status = "okay";
};

&led_green_pwm {
/* PWM_LED2 */
pwms = <&pwm5 0 25000 0>;
};

/* phy2 */
&pcie2x1l1 {
reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc3v3_pcie_eth>;
status = "okay";
};

&pinctrl {
hym8563 {
rtc_int_l: hym8563-int {
rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};

sound {
hp_detect: hp-detect {
rockchip,pins = <3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
};
};

usb {
usb_host_pwren: usb-host-pwren {
rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};

&pwm4 {
pinctrl-names = "default";
pinctrl-0 = <&pwm4m0_pins>;
status = "okay";
};

&pwm5 {
pinctrl-names = "default";
pinctrl-0 = <&pwm5m1_pins>;
status = "okay";
};

&pwm9 {
pinctrl-names = "default";
pinctrl-0 = <&pwm9m2_pins>;
status = "okay";
};

&sfc {
pinctrl-names = "default";
pinctrl-0 = <&fspim2_pins>;
};

&u2phy0_otg {
phy-supply = <&vcc5v0_usb30_otg>;
};

&u2phy1_otg {
phy-supply = <&vcc5v0_usb20>;
};

&usb_host0_xhci {
dr_mode = "host";
};

/* pcie eth. not a real regulator. 33VAUX */
&vcc3v3_pcie_eth {
/* Ethernet_power_en */
gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_LOW>;
};

/*
* Represents the vcc5v0_usb20 and vcc5v0_usb30 in the schematic,
* both regulators share the same enable gpio
*/
&vcc5v0_usb20 {
/* USB_HOST_PWREN */
gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb_host_pwren>;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/soc/rockchip,vop2.h>
#include "rk3588-orangepi-5-compact.dtsi"

/ {
model = "Xunlong Orange Pi 5 Max";
compatible = "xunlong,orangepi-5-max", "rockchip,rk3588";

hdmi0-con {
compatible = "hdmi-connector";
type = "a";

port {
hdmi0_con_in: endpoint {
remote-endpoint = <&hdmi0_out_con>;
};
};
};
};

&hdmi0 {
status = "okay";
};

&hdmi0_in {
hdmi0_in_vp0: endpoint {
remote-endpoint = <&vp0_out_hdmi0>;
};
};

&hdmi0_out {
hdmi0_out_con: endpoint {
remote-endpoint = <&hdmi0_con_in>;
};
};

&hdptxphy_hdmi0 {
status = "okay";
};

&pinctrl {

usb {
usb_otg_pwren: usb-otg-pwren {
rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};

&vp0 {
vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
reg = <ROCKCHIP_VOP2_EP_HDMI0>;
remote-endpoint = <&hdmi0_in_vp0>;
};
};
Loading
Loading