From 3058d11c513124f99875d15754deb3d381665c88 Mon Sep 17 00:00:00 2001 From: retro98boy Date: Fri, 3 Oct 2025 15:45:04 +0800 Subject: [PATCH] SMART AM40: Enable native HDMI interface in OPS slot --- .../archive/rockchip64-6.12/dt/rk3399-am40.dts | 11 ++++++++--- .../archive/rockchip64-6.17/dt/rk3399-am40.dts | 11 ++++++++--- .../board_smart-am40/add-board-smart-am40.patch | 15 ++++++++++----- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/patch/kernel/archive/rockchip64-6.12/dt/rk3399-am40.dts b/patch/kernel/archive/rockchip64-6.12/dt/rk3399-am40.dts index 555b661bb9..195ad79464 100644 --- a/patch/kernel/archive/rockchip64-6.12/dt/rk3399-am40.dts +++ b/patch/kernel/archive/rockchip64-6.12/dt/rk3399-am40.dts @@ -199,6 +199,7 @@ /* sound-dai = <&i2s2>; */ sound-dai = <&spdif>; }; + simple-audio-card,codec { /* sound-dai = <&cdn_dp 0>; */ sound-dai = <&cdn_dp 1>; @@ -273,11 +274,11 @@ ddc-i2c-bus = <&i2c3>; pinctrl-names = "default"; pinctrl-0 = <&hdmi_cec>; - status = "disabled"; + status = "okay"; }; &hdmi_sound { - status = "disabled"; + status = "okay"; }; &i2c0 { @@ -501,6 +502,10 @@ }; }; +&i2c3 { + status = "okay"; +}; + &i2c4 { status = "okay"; i2c-scl-rising-time-ns = <300>; @@ -607,7 +612,7 @@ }; }; - usb2 { + usb { vcc5v0_host_en: vcc5v0-hots-en { rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; }; diff --git a/patch/kernel/archive/rockchip64-6.17/dt/rk3399-am40.dts b/patch/kernel/archive/rockchip64-6.17/dt/rk3399-am40.dts index 555b661bb9..195ad79464 100644 --- a/patch/kernel/archive/rockchip64-6.17/dt/rk3399-am40.dts +++ b/patch/kernel/archive/rockchip64-6.17/dt/rk3399-am40.dts @@ -199,6 +199,7 @@ /* sound-dai = <&i2s2>; */ sound-dai = <&spdif>; }; + simple-audio-card,codec { /* sound-dai = <&cdn_dp 0>; */ sound-dai = <&cdn_dp 1>; @@ -273,11 +274,11 @@ ddc-i2c-bus = <&i2c3>; pinctrl-names = "default"; pinctrl-0 = <&hdmi_cec>; - status = "disabled"; + status = "okay"; }; &hdmi_sound { - status = "disabled"; + status = "okay"; }; &i2c0 { @@ -501,6 +502,10 @@ }; }; +&i2c3 { + status = "okay"; +}; + &i2c4 { status = "okay"; i2c-scl-rising-time-ns = <300>; @@ -607,7 +612,7 @@ }; }; - usb2 { + usb { vcc5v0_host_en: vcc5v0-hots-en { rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; }; diff --git a/patch/u-boot/v2025.04/board_smart-am40/add-board-smart-am40.patch b/patch/u-boot/v2025.04/board_smart-am40/add-board-smart-am40.patch index 8f332394cb..b0485e9eca 100644 --- a/patch/u-boot/v2025.04/board_smart-am40/add-board-smart-am40.patch +++ b/patch/u-boot/v2025.04/board_smart-am40/add-board-smart-am40.patch @@ -94,10 +94,10 @@ index 00000000..8ea5266f +CONFIG_ERRNO_STR=y diff --git a/dts/upstream/src/arm64/rockchip/rk3399-am40.dts b/dts/upstream/src/arm64/rockchip/rk3399-am40.dts new file mode 100644 -index 00000000..555b661b +index 00000000..195ad794 --- /dev/null +++ b/dts/upstream/src/arm64/rockchip/rk3399-am40.dts -@@ -0,0 +1,787 @@ +@@ -0,0 +1,792 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd. @@ -299,6 +299,7 @@ index 00000000..555b661b + /* sound-dai = <&i2s2>; */ + sound-dai = <&spdif>; + }; ++ + simple-audio-card,codec { + /* sound-dai = <&cdn_dp 0>; */ + sound-dai = <&cdn_dp 1>; @@ -373,11 +374,11 @@ index 00000000..555b661b + ddc-i2c-bus = <&i2c3>; + pinctrl-names = "default"; + pinctrl-0 = <&hdmi_cec>; -+ status = "disabled"; ++ status = "okay"; +}; + +&hdmi_sound { -+ status = "disabled"; ++ status = "okay"; +}; + +&i2c0 { @@ -601,6 +602,10 @@ index 00000000..555b661b + }; +}; + ++&i2c3 { ++ status = "okay"; ++}; ++ +&i2c4 { + status = "okay"; + i2c-scl-rising-time-ns = <300>; @@ -707,7 +712,7 @@ index 00000000..555b661b + }; + }; + -+ usb2 { ++ usb { + vcc5v0_host_en: vcc5v0-hots-en { + rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; + };