* [PATCH 01/15] dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 17:58 ` Krzysztof Kozlowski
2024-10-26 9:48 ` [PATCH 02/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (13 subsequent siblings)
14 siblings, 1 reply; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Add devicetree binding for the Xunlong Orange Pi 5 Max board.
The Orange Pi 5 Max is a single board computer powered by the Rockchip
RK3588.
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
Documentation/devicetree/bindings/arm/rockchip.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index 1ef09fbfdfaf..8998cfe34fda 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -1001,6 +1001,11 @@ properties:
- const: xunlong,orangepi-3b
- const: rockchip,rk3566
+ - description: Xunlong Orange Pi 5 Max
+ items:
+ - const: xunlong,orangepi-5-max
+ - const: rockchip,rk3588
+
- description: Xunlong Orange Pi 5 Plus
items:
- const: xunlong,orangepi-5-plus
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 01/15] dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Max
2024-10-26 9:48 ` [PATCH 01/15] dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Max Jimmy Hon
@ 2024-10-26 17:58 ` Krzysztof Kozlowski
0 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-26 17:58 UTC (permalink / raw)
To: Jimmy Hon, Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman
On 26/10/2024 11:48, Jimmy Hon wrote:
> Add devicetree binding for the Xunlong Orange Pi 5 Max board.
>
> The Orange Pi 5 Max is a single board computer powered by the Rockchip
> RK3588.
>
> Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
The list of Cc is supposed to be taken by tools, not manually edited to
strip something.
<form letter>
Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.
Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline) or work on fork of kernel
(don't, instead use mainline). Just use b4 and everything should be
fine, although remember about `b4 prep --auto-to-cc` if you added new
patches to the patchset.
You missed at least devicetree list (maybe more), so this won't be
tested by automated tooling. Performing review on untested code might be
a waste of time.
Please kindly resend and include all necessary To/Cc entries.
</form letter>
Best regards,
Krzysztof
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 02/15] arm64: dts: rockchip: Add Orange Pi 5 Max board
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
2024-10-26 9:48 ` [PATCH 01/15] dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Max Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 03/15] arm64: dts: rockchip: add status LED to opi5max Jimmy Hon
` (12 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Add board file for the RK3588 Orange Pi 5 Max board. While the hardware
offers plenty of peripherals and connectivity this basic implementation
just handles things required to access eMMC and UART (i.e.
enough to successfully boot Linux).
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../dts/rockchip/rk3588-orangepi-5-max.dts | 497 ++++++++++++++++++
2 files changed, 498 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index fda1b980eb4b..f910414f0b34 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -129,6 +129,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-friendlyelec-cm3588-nas.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-jaguar.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nanopc-t6.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
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
new file mode 100644
index 000000000000..53a34cb37487
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -0,0 +1,497 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+#include "rk3588.dtsi"
+
+/ {
+ model = "Xunlong Orange Pi 5 Max";
+ compatible = "xunlong,orangepi-5-max", "rockchip,rk3588";
+
+ aliases {
+ mmc0 = &sdhci;
+ mmc1 = &sdmmc;
+ };
+
+ chosen {
+ stdout-path = "serial2:1500000n8";
+ };
+
+ /* PMIC_EXT_EN */
+ vcc_1v1_nldo_s3: vcc-1v1-ndlo-s3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_1v1_nldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1100000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
+ /* Regulator is enabled whenever vcc_1v8_s0 is on */
+ vcc_3v3_s0: vcc-3v3-s0-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc_3v3_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vcc_3v3_s3>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc5v0_sys: vcc5v0-sys-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vcc5v0_sys";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ };
+};
+
+&cpu_b0 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b1 {
+ cpu-supply = <&vdd_cpu_big0_s0>;
+};
+
+&cpu_b2 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_b3 {
+ cpu-supply = <&vdd_cpu_big1_s0>;
+};
+
+&cpu_l0 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l1 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l2 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&cpu_l3 {
+ cpu-supply = <&vdd_cpu_lit_s0>;
+};
+
+&i2c0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c0m2_xfer>;
+ status = "okay";
+
+ vdd_cpu_big0_s0: regulator@42 {
+ compatible = "rockchip,rk8602";
+ reg = <0x42>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big0_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_big1_s0: regulator@43 {
+ compatible = "rockchip,rk8603", "rockchip,rk8602";
+ reg = <0x43>;
+ fcs,suspend-voltage-selector = <1>;
+ regulator-name = "vdd_cpu_big1_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <1050000>;
+ regulator-ramp-delay = <2300>;
+ vin-supply = <&vcc5v0_sys>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+};
+
+&saradc {
+ vref-supply = <&vcca_1v8_s0>;
+ status = "okay";
+};
+
+&sdhci {
+ bus-width = <8>;
+ no-sdio;
+ no-sd;
+ non-removable;
+ max-frequency = <200000000>;
+ mmc-hs400-1_8v;
+ mmc-hs400-enhanced-strobe;
+ status = "okay";
+};
+
+&sdmmc {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ /* SDMMC_DET_L */
+ cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
+ disable-wp;
+ max-frequency = <150000000>;
+ no-sdio;
+ no-mmc;
+ sd-uhs-sdr104;
+ vmmc-supply = <&vcc_3v3_s3>;
+ vqmmc-supply = <&vccio_sd_s0>;
+ status = "okay";
+};
+
+&spi2 {
+ assigned-clocks = <&cru CLK_SPI2>;
+ assigned-clock-rates = <200000000>;
+ num-cs = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
+ status = "okay";
+
+ pmic@0 {
+ compatible = "rockchip,rk806";
+ reg = <0x0>;
+ interrupt-parent = <&gpio0>;
+ interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
+ <&rk806_dvs2_null>, <&rk806_dvs3_null>;
+ spi-max-frequency = <1000000>;
+ system-power-controller;
+
+ vcc1-supply = <&vcc5v0_sys>;
+ vcc2-supply = <&vcc5v0_sys>;
+ vcc3-supply = <&vcc5v0_sys>;
+ vcc4-supply = <&vcc5v0_sys>;
+ vcc5-supply = <&vcc5v0_sys>;
+ vcc6-supply = <&vcc5v0_sys>;
+ vcc7-supply = <&vcc5v0_sys>;
+ vcc8-supply = <&vcc5v0_sys>;
+ vcc9-supply = <&vcc5v0_sys>;
+ vcc10-supply = <&vcc5v0_sys>;
+ vcc11-supply = <&vcc_2v0_pldo_s3>;
+ vcc12-supply = <&vcc5v0_sys>;
+ vcc13-supply = <&vcc_1v1_nldo_s3>;
+ vcc14-supply = <&vcc_1v1_nldo_s3>;
+ vcca-supply = <&vcc5v0_sys>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ rk806_dvs1_null: dvs1-null-pins {
+ pins = "gpio_pwrctrl1";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs2_null: dvs2-null-pins {
+ pins = "gpio_pwrctrl2";
+ function = "pin_fun0";
+ };
+
+ rk806_dvs3_null: dvs3-null-pins {
+ pins = "gpio_pwrctrl3";
+ function = "pin_fun0";
+ };
+
+ regulators {
+ vdd_gpu_s0: dcdc-reg1 {
+ regulator-name = "vdd_gpu_s0";
+ regulator-boot-on;
+ regulator-enable-ramp-delay = <400>;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_cpu_lit_s0: dcdc-reg2 {
+ regulator-name = "vdd_cpu_lit_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <950000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_log_s0: dcdc-reg3 {
+ regulator-name = "vdd_log_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <825000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_vdenc_s0: dcdc-reg4 {
+ regulator-name = "vdd_vdenc_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <550000>;
+ regulator-max-microvolt = <825000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_ddr_s0: dcdc-reg5 {
+ regulator-name = "vdd_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <675000>;
+ regulator-max-microvolt = <900000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ vdd2_ddr_s3: dcdc-reg6 {
+ regulator-name = "vdd2_ddr_s3";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ };
+ };
+
+ vcc_2v0_pldo_s3: dcdc-reg7 {
+ regulator-name = "vdd_2v0_pldo_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <2000000>;
+ regulator-max-microvolt = <2000000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <2000000>;
+ };
+ };
+
+ vcc_3v3_s3: dcdc-reg8 {
+ regulator-name = "vcc_3v3_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <3300000>;
+ };
+ };
+
+ vddq_ddr_s0: dcdc-reg9 {
+ regulator-name = "vddq_ddr_s0";
+ regulator-always-on;
+ regulator-boot-on;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3: dcdc-reg10 {
+ regulator-name = "vcc_1v8_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vcca_1v8_s0: pldo-reg1 {
+ regulator-name = "vcca_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vcc_1v8_s0: pldo-reg2 {
+ regulator-name = "vcc_1v8_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdda_1v2_s0: pldo-reg3 {
+ regulator-name = "vdda_1v2_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcca_3v3_s0: pldo-reg4 {
+ regulator-name = "vcca_3v3_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vccio_sd_s0: pldo-reg5 {
+ regulator-name = "vccio_sd_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-ramp-delay = <12500>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vcc_1v8_s3_pldo6: pldo-reg6 {
+ regulator-name = "vcc_1v8_s3_pldo6";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <1800000>;
+ };
+ };
+
+ vdd_0v75_s3: nldo-reg1 {
+ regulator-name = "vdd_0v75_s3";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-on-in-suspend;
+ regulator-suspend-microvolt = <750000>;
+ };
+ };
+
+ vdd_ddr_pll_s0: nldo-reg2 {
+ regulator-name = "vdd_ddr_pll_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ regulator-suspend-microvolt = <850000>;
+ };
+ };
+
+ hdmi_vdda0v85_s0: nldo-reg3 {
+ regulator-name = "hdmi_vdda0v85_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ /*
+ * The schematic mentions that actual setting
+ * should be 0.8375V. RK3588 datasheet specifies
+ * maximum as 0.825V. So we set datasheet max
+ * here.
+ */
+ regulator-min-microvolt = <825000>;
+ regulator-max-microvolt = <825000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdda_0v85_s0: nldo-reg4 {
+ regulator-name = "vdda_0v85_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <850000>;
+ regulator-max-microvolt = <850000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+
+ vdd_0v75_s0: nldo-reg5 {
+ regulator-name = "vdd_0v75_s0";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <750000>;
+ regulator-max-microvolt = <750000>;
+
+ regulator-state-mem {
+ regulator-off-in-suspend;
+ };
+ };
+ };
+ };
+};
+
+&tsadc {
+ status = "okay";
+};
+
+&uart2 {
+ pinctrl-0 = <&uart2m0_xfer>;
+ status = "okay";
+};
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 03/15] arm64: dts: rockchip: add status LED to opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
2024-10-26 9:48 ` [PATCH 01/15] dt-bindings: arm: rockchip: Add Xunlong Orange Pi 5 Max Jimmy Hon
2024-10-26 9:48 ` [PATCH 02/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 17:59 ` Krzysztof Kozlowski
2024-10-26 9:48 ` [PATCH 04/15] arm64: dts: rockchip: Enable RTC support for opi5max Jimmy Hon
` (11 subsequent siblings)
14 siblings, 1 reply; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Describe the Orange Pi 5 Max 2 status LEDs in its device tree.
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../dts/rockchip/rk3588-orangepi-5-max.dts | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 53a34cb37487..83a118e52bb0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -3,6 +3,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3588.dtsi"
@@ -19,6 +20,28 @@ chosen {
stdout-path = "serial2:1500000n8";
};
+ pwm-leds {
+ compatible = "pwm-leds";
+
+ blue_led: led-1 {
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_STATUS;
+ linux,default-trigger = "heartbeat";
+ max-brightness = <255>;
+ /* PWM_LED1 */
+ pwms = <&pwm4 0 25000 0>;
+ };
+
+ green_led: led-2 {
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_STATUS;
+ linux,default-trigger = "heartbeat";
+ max-brightness = <255>;
+ /* PWM_LED2 */
+ pwms = <&pwm5 0 25000 0>;
+ };
+ };
+
/* PMIC_EXT_EN */
vcc_1v1_nldo_s3: vcc-1v1-ndlo-s3-regulator {
compatible = "regulator-fixed";
@@ -127,6 +150,18 @@ regulator-state-mem {
};
};
+&pwm4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm4m0_pins>;
+ status = "okay";
+};
+
+&pwm5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pwm5m1_pins>;
+ status = "okay";
+};
+
&saradc {
vref-supply = <&vcca_1v8_s0>;
status = "okay";
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 03/15] arm64: dts: rockchip: add status LED to opi5max
2024-10-26 9:48 ` [PATCH 03/15] arm64: dts: rockchip: add status LED to opi5max Jimmy Hon
@ 2024-10-26 17:59 ` Krzysztof Kozlowski
2024-10-26 20:17 ` Jimmy Hon
0 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-26 17:59 UTC (permalink / raw)
To: Jimmy Hon, Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman
On 26/10/2024 11:48, Jimmy Hon wrote:
> Describe the Orange Pi 5 Max 2 status LEDs in its device tree.
>
> Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
> ---
> .../dts/rockchip/rk3588-orangepi-5-max.dts | 35 +++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
> index 53a34cb37487..83a118e52bb0 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
This is a new board. Why do you add incomplete board in first patch?
Best regards,
Krzysztof
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 03/15] arm64: dts: rockchip: add status LED to opi5max
2024-10-26 17:59 ` Krzysztof Kozlowski
@ 2024-10-26 20:17 ` Jimmy Hon
2024-10-27 19:45 ` Krzysztof Kozlowski
0 siblings, 1 reply; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 20:17 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-rockchip, Ondrej Jirman
On Sat, Oct 26, 2024 at 12:59 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 26/10/2024 11:48, Jimmy Hon wrote:
> > Describe the Orange Pi 5 Max 2 status LEDs in its device tree.
> >
> > Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
> > ---
> > .../dts/rockchip/rk3588-orangepi-5-max.dts | 35 +++++++++++++++++++
> > 1 file changed, 35 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
> > index 53a34cb37487..83a118e52bb0 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
>
> This is a new board. Why do you add incomplete board in first patch?
That's an artifact of the development process. It's easier for git to
keep track of which nodes in the DTS goes with which function.
I originally started this 6-weeks ago. But the schematic was only
published this week. So I was hoping the Orange Pi 5 Max was a subset
of the Orange Pi 5 Plus (which both use full RK3588). However, I was
wrong, a lot of pins are different. I compared the differences in the
vendor kernel between the two boards [1][2], and applied it to the
mainline Orange Pi 5 Plus dts [3]
So in the process of trimming the nodes down to the ones actually used
by the OPI5Max,I got it down to the first patch and had a working
board using microSD.
For the LED functionality in particular. I originally just used
leds-gpio like the vendor kernel [2]. However, when the schematic came
out [4] page 26, I noticed the pins were called PWM_LED1 and PWM_LED2,
so I did the same thing as the mainline OPI5Plus, and used leds-pwm.
Luckily, PWM4 and PWM5 are not available from the 40-pin GPIO header.
[5] So there's not much downside. On other boards, the PWM used to
drive the LED could have been used to drive a pin on the GPIO header.
But basically, if I was told it would be better to revert back to
using gpio-leds like the vendor kernel, it was simpler to keep track
of the nodes in the same commit.
Side Note: since it's actually an RGB led, and not three individual
leds, it's tempting to use the leds-pwm-multicolor. However, the RED
portion is hardwired on when the power is on and not connected to PWM.
I still have some more functions that I'm working on (i.e. WIFi), so
those commits are not ready. I'm afraid that the Android BCMDHD driver
may need DTS nodes that are different from the DTS nodes the bcrmfmac
driver would use.
Anyways, should I squash the commits together in the new revision? I
was able to test the majority of the functionality, I don't have the
additional hardware to test fan, rtc, and eMMC.
[1] https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.1-rk35xx/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts#L18-L37
[2] https://github.com/orangepi-xunlong/linux-orangepi/blob/orange-pi-6.1-rk35xx/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts#L394-L413
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts#n96
[4] http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-5-Max.html
[5] http://www.orangepi.org/img/pi5-max/max-15.png
>
> Best regards,
> Krzysztof
>
Jimmy
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 03/15] arm64: dts: rockchip: add status LED to opi5max
2024-10-26 20:17 ` Jimmy Hon
@ 2024-10-27 19:45 ` Krzysztof Kozlowski
0 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-27 19:45 UTC (permalink / raw)
To: Jimmy Hon
Cc: Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-rockchip, Ondrej Jirman
On 26/10/2024 22:17, Jimmy Hon wrote:
> leds, it's tempting to use the leds-pwm-multicolor. However, the RED
> portion is hardwired on when the power is on and not connected to PWM.
>
> I still have some more functions that I'm working on (i.e. WIFi), so
> those commits are not ready. I'm afraid that the Android BCMDHD driver
> may need DTS nodes that are different from the DTS nodes the bcrmfmac
> driver would use.
>
> Anyways, should I squash the commits together in the new revision? I
> was able to test the majority of the functionality, I don't have the
> additional hardware to test fan, rtc, and eMMC.
That's what I would expect. Look at qcom commits. First publish of new
SoC is one commit, new board is another one. Feel free to grow it later
(release early, release often), but that's not the case here.
Best regards,
Krzysztof
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 04/15] arm64: dts: rockchip: Enable RTC support for opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (2 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 03/15] arm64: dts: rockchip: add status LED to opi5max Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 05/15] arm64: dts: rockchip: add PCIe network controller to opi5max Jimmy Hon
` (10 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Add DT node to enable RTC support for Orange Pi 5 Max
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../dts/rockchip/rk3588-orangepi-5-max.dts | 26 +++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 83a118e52bb0..961f9271d0f0 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -150,6 +150,32 @@ regulator-state-mem {
};
};
+&i2c6 {
+ clock-frequency = <400000>;
+ status = "okay";
+
+ hym8563: rtc@51 {
+ compatible = "haoyu,hym8563";
+ reg = <0x51>;
+ /* RTC_INT_L */
+ interrupt-parent = <&gpio0>;
+ interrupts = <RK_PC4 IRQ_TYPE_LEVEL_LOW>;
+ #clock-cells = <0>;
+ clock-output-names = "hym8563";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hym8563_int>;
+ wakeup-source;
+ };
+};
+
+&pinctrl {
+ hym8563 {
+ hym8563_int: hym8563-int {
+ rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
&pwm4 {
pinctrl-names = "default";
pinctrl-0 = <&pwm4m0_pins>;
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 05/15] arm64: dts: rockchip: add PCIe network controller to opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (3 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 04/15] arm64: dts: rockchip: Enable RTC support for opi5max Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 20:29 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 06/15] arm64: dts: rockchip: add PCIe for M.2 M-key " Jimmy Hon
` (9 subsequent siblings)
14 siblings, 1 reply; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Enable the RTL8125 network controller, which is connected via
PCIe 2.0x1.
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../dts/rockchip/rk3588-orangepi-5-max.dts | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 961f9271d0f0..591ba2af25d7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -53,6 +53,18 @@ vcc_1v1_nldo_s3: vcc-1v1-ndlo-s3-regulator {
vin-supply = <&vcc5v0_sys>;
};
+ /* pcie eth. not a real regulator. 33VAUX */
+ vcc_3v3_aux: vcc-3v3-aux-regulator {
+ compatible = "regulator-fixed";
+ /* Ethernet_power_en */
+ gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_LOW>;
+ regulator-name = "33vaux";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <50000>;
+ vin-supply = <&vcc_3v3_s3>;
+ };
+
/* Regulator is enabled whenever vcc_1v8_s0 is on */
vcc_3v3_s0: vcc-3v3-s0-regulator {
compatible = "regulator-fixed";
@@ -78,6 +90,10 @@ vcc5v0_sys: vcc5v0-sys-regulator {
};
};
+&combphy2_psu {
+ status = "okay";
+};
+
&cpu_b0 {
cpu-supply = <&vdd_cpu_big0_s0>;
};
@@ -168,6 +184,13 @@ hym8563: rtc@51 {
};
};
+/* phy2 */
+&pcie2x1l1 {
+ reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc_3v3_aux>;
+ status = "okay";
+};
+
&pinctrl {
hym8563 {
hym8563_int: hym8563-int {
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 05/15] arm64: dts: rockchip: add PCIe network controller to opi5max
2024-10-26 9:48 ` [PATCH 05/15] arm64: dts: rockchip: add PCIe network controller to opi5max Jimmy Hon
@ 2024-10-26 20:29 ` Jimmy Hon
0 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 20:29 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman
On Sat, Oct 26, 2024 at 5:03 AM Jimmy Hon <honyuenkwun@gmail.com> wrote:
>
> + /* pcie eth. not a real regulator. 33VAUX */
> + vcc_3v3_aux: vcc-3v3-aux-regulator {
> + compatible = "regulator-fixed";
> + /* Ethernet_power_en */
> + gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_LOW>;
> + regulator-name = "33vaux";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + startup-delay-us = <50000>;
> + vin-supply = <&vcc_3v3_s3>;
> + };
> +
What's the best way to treat this? In the schematic [1] page 21, it
doesn't look like a normal regulator with IN, VOUT, and EN pins.
At least the OPI5Max schematic mentions how the 33VAUX and
Ethernet_power_en pin are connected.
The OPI5Plus schematic doesn't mention where the Ethernet_power_en pin
goes. However, it's modeled in the mainline DTS as a regulator. [2]
Regarding the name, I can't have the node id called "33vaux", so
what's the alternative. Should I use vcc3v3_pcie_eth like the
OPI5Plus?
[1] http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-5-Max.html
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts#n179
Jimmy
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 06/15] arm64: dts: rockchip: add PCIe for M.2 M-key to opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (4 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 05/15] arm64: dts: rockchip: add PCIe network controller to opi5max Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 07/15] arm64: dts: rockchip: add fan support " Jimmy Hon
` (8 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
The Orange Pi 5 Max has PCIe 3.0x4 routed to its M.2 M-key connector
on the board's back.
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../dts/rockchip/rk3588-orangepi-5-max.dts | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 591ba2af25d7..5c4390ac3f8e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -65,6 +65,18 @@ vcc_3v3_aux: vcc-3v3-aux-regulator {
vin-supply = <&vcc_3v3_s3>;
};
+ vcc3v3_pcie30: vcc3v3-pcie30-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ /* PCIE_PWREN_H */
+ gpios = <&gpio2 RK_PB6 GPIO_ACTIVE_HIGH>;
+ regulator-name = "vcc3v3_pcie30";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ startup-delay-us = <5000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
+
/* Regulator is enabled whenever vcc_1v8_s0 is on */
vcc_3v3_s0: vcc-3v3-s0-regulator {
compatible = "regulator-fixed";
@@ -191,6 +203,16 @@ &pcie2x1l1 {
status = "okay";
};
+&pcie30phy {
+ status = "okay";
+};
+
+&pcie3x4 {
+ reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
+ vpcie3v3-supply = <&vcc3v3_pcie30>;
+ status = "okay";
+};
+
&pinctrl {
hym8563 {
hym8563_int: hym8563-int {
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 07/15] arm64: dts: rockchip: add fan support to opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (5 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 06/15] arm64: dts: rockchip: add PCIe for M.2 M-key " Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 08/15] arm64: dts: rockchip: add USB2 " Jimmy Hon
` (7 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Add changes for the Orange Pi 5 Max board to enable support for the PWM
controlled heat sink fan.
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../boot/dts/rockchip/rk3588-orangepi-5-max.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 5c4390ac3f8e..03ae3564b8f4 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -20,6 +20,15 @@ chosen {
stdout-path = "serial2:1500000n8";
};
+ fan: pwm-fan {
+ compatible = "pwm-fan";
+ cooling-levels = <0 70 75 80 100>;
+ fan-supply = <&vcc5v0_sys>;
+ /* FAN_CTL_H */
+ pwms = <&pwm9 0 50000 0>;
+ #cooling-cells = <2>;
+ };
+
pwm-leds {
compatible = "pwm-leds";
@@ -233,6 +242,12 @@ &pwm5 {
status = "okay";
};
+&pwm9 {
+ pinctrl-names = "active";
+ pinctrl-0 = <&pwm9m2_pins>;
+ status = "okay";
+};
+
&saradc {
vref-supply = <&vcca_1v8_s0>;
status = "okay";
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 08/15] arm64: dts: rockchip: add USB2 to opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (6 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 07/15] arm64: dts: rockchip: add fan support " Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 09/15] arm64: dts: rockchip: add lower USB3 port " Jimmy Hon
` (6 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Enable USB2 (EHCI and OCHI mode) support for the Orange Pi 5 Max
This adds USB support for the two USB2 ports.
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../dts/rockchip/rk3588-orangepi-5-max.dts | 56 +++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 03ae3564b8f4..be4af5006d69 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -109,6 +109,22 @@ vcc5v0_sys: vcc5v0-sys-regulator {
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
};
+
+ /* Represents the vcc5v0_usb20 in the schematic */
+ vcc5v0_host: vcc5v0-host-regulator {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ /* USB_HOST_PWREN */
+ gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_host_pwren>;
+ regulator-name = "vcc5v0_host";
+ regulator-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
};
&combphy2_psu {
@@ -228,6 +244,12 @@ hym8563_int: hym8563-int {
rockchip,pins = <0 RK_PC4 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 {
@@ -612,7 +634,41 @@ &tsadc {
status = "okay";
};
+&u2phy2 {
+ status = "okay";
+};
+
+&u2phy2_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
+&u2phy3 {
+ status = "okay";
+};
+
+&u2phy3_host {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
&uart2 {
pinctrl-0 = <&uart2m0_xfer>;
status = "okay";
};
+
+&usb_host0_ehci {
+ status = "okay";
+};
+
+&usb_host0_ohci {
+ status = "okay";
+};
+
+&usb_host1_ehci {
+ status = "okay";
+};
+
+&usb_host1_ohci {
+ status = "okay";
+};
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 09/15] arm64: dts: rockchip: add lower USB3 port to opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (7 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 08/15] arm64: dts: rockchip: add USB2 " Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 20:40 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 10/15] arm64: dts: rockchip: add upper " Jimmy Hon
` (5 subsequent siblings)
14 siblings, 1 reply; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Enable full support (XHCI) for the lower USB3 port from Orange Pi 5 Max.
the vcc5v0_usb30 regulator shares the same enable gpio pin as the
vcc5v0_usb20 regulator.
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../dts/rockchip/rk3588-orangepi-5-max.dts | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index be4af5006d69..f32e5827dce6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -111,6 +111,8 @@ vcc5v0_sys: vcc5v0-sys-regulator {
};
/* Represents the vcc5v0_usb20 in the schematic */
+ /* Also represents the vcc5v0_usb30 in the schematic,
+ both regulators share the same enable gpio */
vcc5v0_host: vcc5v0-host-regulator {
compatible = "regulator-fixed";
enable-active-high;
@@ -634,6 +636,15 @@ &tsadc {
status = "okay";
};
+&u2phy1 {
+ status = "okay";
+};
+
+&u2phy1_otg {
+ phy-supply = <&vcc5v0_host>;
+ status = "okay";
+};
+
&u2phy2 {
status = "okay";
};
@@ -657,6 +668,10 @@ &uart2 {
status = "okay";
};
+&usbdp_phy1 {
+ status = "okay";
+};
+
&usb_host0_ehci {
status = "okay";
};
@@ -672,3 +687,8 @@ &usb_host1_ehci {
&usb_host1_ohci {
status = "okay";
};
+
+&usb_host1_xhci {
+ dr_mode = "host";
+ status = "okay";
+};
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [PATCH 09/15] arm64: dts: rockchip: add lower USB3 port to opi5max
2024-10-26 9:48 ` [PATCH 09/15] arm64: dts: rockchip: add lower USB3 port " Jimmy Hon
@ 2024-10-26 20:40 ` Jimmy Hon
2024-10-26 20:49 ` Jimmy Hon
0 siblings, 1 reply; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 20:40 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman
On Sat, Oct 26, 2024 at 5:03 AM Jimmy Hon <honyuenkwun@gmail.com> wrote:
>
> Enable full support (XHCI) for the lower USB3 port from Orange Pi 5 Max.
>v0
> the vcc5v0_usb30 regulator shares the same enable gpio pin as the
> vcc5v0_usb20 regulator.
> --- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
> @@ -111,6 +111,8 @@ vcc5v0_sys: vcc5v0-sys-regulator {
> };
>
> /* Represents the vcc5v0_usb20 in the schematic */
> + /* Also represents the vcc5v0_usb30 in the schematic,
> + both regulators share the same enable gpio */
> vcc5v0_host: vcc5v0-host-regulator {
> compatible = "regulator-fixed";
> enable-active-high;
Is there a better way to represent the two USB host regulators? In the
schematic [1] page 14, there's two regulators vcc5v0_usb20 and
vcc5v0_usb30, however they both use USB_HOST_PWREN as the EN pin.
In the case of the OPI5Plus [2] page 16, it uses a different EN pin
for vcc5v0_usb30. However, in the mainline OPI5Plus, it left
vcc5v0_usb30 regulator out of the dts [3].
[1] http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-5-Max.html
[2] http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-5-plus.html
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts#n209
Jimmy
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [PATCH 09/15] arm64: dts: rockchip: add lower USB3 port to opi5max
2024-10-26 20:40 ` Jimmy Hon
@ 2024-10-26 20:49 ` Jimmy Hon
0 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 20:49 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman
On Sat, Oct 26, 2024 at 3:40 PM Jimmy Hon <honyuenkwun@gmail.com> wrote:
>
> In the case of the OPI5Plus [2] page 16, it uses a different EN pin
> for vcc5v0_usb30. However, in the mainline OPI5Plus, it left
> vcc5v0_usb30 regulator out of the dts [3].
>
> [1] http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-5-Max.html
> [2] http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-5-plus.html
> [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts#n209
>
> Jimmy
Wait, I'm wrong about the USB 3 functionality on the Orange Pi 5 Plus.
The Orange Pi 5 Plus is only enabling usb_host1_xhci now [1]. However,
it's only adding the Type C regulator without the usb30 regulator.
[1] https://lore.kernel.org/all/20241025175415.887368-1-wens@kernel.org/
Jimmy
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 10/15] arm64: dts: rockchip: add upper USB3 port to opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (8 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 09/15] arm64: dts: rockchip: add lower USB3 port " Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 11/15] arm64: dts: rockchip: Enable GPU on opi5max Jimmy Hon
` (4 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Enable full support (XHCI) for the upper USB3 port from Orange Pi 5 Max.
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../dts/rockchip/rk3588-orangepi-5-max.dts | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index f32e5827dce6..39d2a38710df 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -127,6 +127,21 @@ vcc5v0_host: vcc5v0-host-regulator {
regulator-max-microvolt = <5000000>;
vin-supply = <&vcc5v0_sys>;
};
+
+ 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-always-on;
+ regulator-boot-on;
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vcc5v0_sys>;
+ };
};
&combphy2_psu {
@@ -251,6 +266,10 @@ usb {
usb_host_pwren: usb-host-pwren {
rockchip,pins = <3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
};
+
+ usb_otg_pwren: usb-otg-pwren {
+ rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
};
};
@@ -636,6 +655,15 @@ &tsadc {
status = "okay";
};
+&u2phy0 {
+ status = "okay";
+};
+
+&u2phy0_otg {
+ phy-supply = <&vcc5v0_usb30_otg>;
+ status = "okay";
+};
+
&u2phy1 {
status = "okay";
};
@@ -668,6 +696,10 @@ &uart2 {
status = "okay";
};
+&usbdp_phy0 {
+ status = "okay";
+};
+
&usbdp_phy1 {
status = "okay";
};
@@ -680,6 +712,11 @@ &usb_host0_ohci {
status = "okay";
};
+&usb_host0_xhci {
+ dr_mode = "host";
+ status = "okay";
+};
+
&usb_host1_ehci {
status = "okay";
};
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 11/15] arm64: dts: rockchip: Enable GPU on opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (9 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 10/15] arm64: dts: rockchip: add upper " Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 12/15] arm64: dts: rockchip: add SFC support for opi5max Jimmy Hon
` (3 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Enable the Mali GPU in the Orange Pi 5 Max
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 39d2a38710df..71b2d891a2bb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -180,6 +180,11 @@ &cpu_l3 {
cpu-supply = <&vdd_cpu_lit_s0>;
};
+&gpu {
+ mali-supply = <&vdd_gpu_s0>;
+ status = "okay";
+};
+
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0m2_xfer>;
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 12/15] arm64: dts: rockchip: add SFC support for opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (10 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 11/15] arm64: dts: rockchip: Enable GPU on opi5max Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 13/15] arm64: dts: rockchip: ADC button " Jimmy Hon
` (2 subsequent siblings)
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
This commit adds support for SPI NOR flash on Orange Pi 5 Max
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../boot/dts/rockchip/rk3588-orangepi-5-max.dts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 71b2d891a2bb..0cf0e30a503a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -327,6 +327,20 @@ &sdmmc {
status = "okay";
};
+&sfc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&fspim2_pins>;
+ status = "okay";
+
+ spi_flash: flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0x0>;
+ spi-max-frequency = <100000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <1>;
+ };
+};
+
&spi2 {
assigned-clocks = <&cru CLK_SPI2>;
assigned-clock-rates = <200000000>;
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 13/15] arm64: dts: rockchip: ADC button for opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (11 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 12/15] arm64: dts: rockchip: add SFC support for opi5max Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 14/15] arm64: dts: rockchip: analog audio on opi5max Jimmy Hon
2024-10-26 9:48 ` [PATCH 15/15] arm64: dts: rockchip: Enable HDMI0 " Jimmy Hon
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Mask Rom button for the Orange Pi 5 Max
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../boot/dts/rockchip/rk3588-orangepi-5-max.dts | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 0cf0e30a503a..dc5de21cddd1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -3,6 +3,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3588.dtsi"
@@ -20,6 +21,21 @@ chosen {
stdout-path = "serial2:1500000n8";
};
+ adc-keys-0 {
+ compatible = "adc-keys";
+ /* BOOT_SARADC_IN0 */
+ io-channels = <&saradc 0>;
+ io-channel-names = "buttons";
+ keyup-threshold-microvolt = <1800000>;
+ poll-interval = <100>;
+
+ button-maskrom {
+ label = "Mask Rom";
+ linux,code = <KEY_SETUP>;
+ press-threshold-microvolt = <2000>;
+ };
+ };
+
fan: pwm-fan {
compatible = "pwm-fan";
cooling-levels = <0 70 75 80 100>;
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 14/15] arm64: dts: rockchip: analog audio on opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (12 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 13/15] arm64: dts: rockchip: ADC button " Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
2024-10-26 9:48 ` [PATCH 15/15] arm64: dts: rockchip: Enable HDMI0 " Jimmy Hon
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Analog audio using es8388 codec via the headset jack and onboard mic for
the Orange Pi 5 Max
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../dts/rockchip/rk3588-orangepi-5-max.dts | 74 +++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index dc5de21cddd1..b98514ea62d1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -36,6 +36,47 @@ button-maskrom {
};
};
+ amp_audio: audio-amplifier {
+ compatible = "simple-audio-amplifier";
+ /* PHONE_CTL */
+ enable-gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
+ };
+
+ analog-sound {
+ compatible = "simple-audio-card";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_detect>;
+ simple-audio-card,name = "rockchip,es8388";
+ simple-audio-card,aux-devs = <&_audio>;
+ simple-audio-card,bitclock-master = <&masterdai>;
+ simple-audio-card,format = "i2s";
+ simple-audio-card,frame-master = <&masterdai>;
+ simple-audio-card,hp-det-gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_HIGH>;
+ simple-audio-card,mclk-fs = <256>;
+ /*TODO: SARADC_VIN3_HP_HOOK is used as MIC detection / key input */
+
+ 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";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s0_8ch>;
+ };
+
+ masterdai: simple-audio-card,codec {
+ sound-dai = <&es8388>;
+ system-clock-frequency = <12288000>;
+ };
+ };
+
fan: pwm-fan {
compatible = "pwm-fan";
cooling-levels = <0 70 75 80 100>;
@@ -259,6 +300,33 @@ hym8563: rtc@51 {
};
};
+&i2c7 {
+ status = "okay";
+
+ es8388: audio-codec@11 {
+ compatible = "everest,es8388";
+ reg = <0x11>;
+ clocks = <&cru I2S0_8CH_MCLKOUT>;
+ AVDD-supply = <&vcc_3v3_s0>;
+ DVDD-supply = <&vcc_1v8_s0>;
+ HPVDD-supply = <&vcc_3v3_s0>;
+ PVDD-supply = <&vcc_1v8_s0>;
+ assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
+ assigned-clock-rates = <12288000>;
+ #sound-dai-cells = <0>;
+ };
+};
+
+&i2s0_8ch {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s0_lrck
+ &i2s0_mclk
+ &i2s0_sclk
+ &i2s0_sdi0
+ &i2s0_sdo0>;
+ status = "okay";
+};
+
/* phy2 */
&pcie2x1l1 {
reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>;
@@ -283,6 +351,12 @@ hym8563_int: hym8563-int {
};
};
+ 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>;
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread* [PATCH 15/15] arm64: dts: rockchip: Enable HDMI0 on opi5max
2024-10-26 9:48 [PATCH v1 0/15] arm64: dts: rockchip: Add Orange Pi 5 Max board Jimmy Hon
` (13 preceding siblings ...)
2024-10-26 9:48 ` [PATCH 14/15] arm64: dts: rockchip: analog audio on opi5max Jimmy Hon
@ 2024-10-26 9:48 ` Jimmy Hon
14 siblings, 0 replies; 23+ messages in thread
From: Jimmy Hon @ 2024-10-26 9:48 UTC (permalink / raw)
To: Heiko Stuebner
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-rockchip,
Ondrej Jirman, Jimmy Hon
Add the necessary DT changes to enable HDMI0 on Orange Pi 5 Max
Signed-off-by: Jimmy Hon <honyuenkwun@gmail.com>
---
.../dts/rockchip/rk3588-orangepi-5-max.dts | 47 +++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index b98514ea62d1..d31b13f99fdc 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -6,6 +6,7 @@
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/rockchip.h>
+#include <dt-bindings/soc/rockchip,vop2.h>
#include "rk3588.dtsi"
/ {
@@ -86,6 +87,17 @@ fan: pwm-fan {
#cooling-cells = <2>;
};
+ hdmi0-con {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi0_con_in: endpoint {
+ remote-endpoint = <&hdmi0_out_con>;
+ };
+ };
+ };
+
pwm-leds {
compatible = "pwm-leds";
@@ -242,6 +254,26 @@ &gpu {
status = "okay";
};
+&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";
+};
+
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0m2_xfer>;
@@ -838,3 +870,18 @@ &usb_host1_xhci {
dr_mode = "host";
status = "okay";
};
+
+&vop_mmu {
+ status = "okay";
+};
+
+&vop {
+ status = "okay";
+};
+
+&vp0 {
+ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
+ remote-endpoint = <&hdmi0_in_vp0>;
+ };
+};
--
2.47.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 23+ messages in thread