mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
rockchip64-6.15: HACK: drop stuff that doesnt apply to 6.15-rc1 (predatory)
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
||||
Date: Mon, 22 Aug 2022 20:51:22 +0000
|
||||
Subject: remove usb2phy extcon initialization causing kernel oops
|
||||
|
||||
---
|
||||
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
|
||||
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
|
||||
@@ -1323,11 +1323,6 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy,
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if (!of_property_read_bool(rphy->dev->of_node, "extcon")) {
|
||||
- /* do initial sync of usb state */
|
||||
- id = property_enabled(rphy->grf, &rport->port_cfg->utmi_id);
|
||||
- extcon_set_state_sync(rphy->edev, EXTCON_USB_HOST, !id);
|
||||
- }
|
||||
}
|
||||
|
||||
out:
|
||||
--
|
||||
Armbian
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,123 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Sat, 7 Dec 2024 21:45:12 +0200
|
||||
Subject: arm64: dts: rockchip: Add PHY node for HDMI1 TX port on RK3588
|
||||
|
||||
In preparation to enable the second HDMI output port found on RK3588
|
||||
SoC, add the related PHY node. This requires a GRF, hence add the
|
||||
dependent node as well.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi | 21 ++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
@@ -90,6 +90,11 @@ u2phy1_otg: otg-port {
|
||||
};
|
||||
};
|
||||
|
||||
+ hdptxphy1_grf: syscon@fd5e4000 {
|
||||
+ compatible = "rockchip,rk3588-hdptxphy-grf", "syscon";
|
||||
+ reg = <0x0 0xfd5e4000 0x0 0x100>;
|
||||
+ };
|
||||
+
|
||||
i2s8_8ch: i2s@fddc8000 {
|
||||
compatible = "rockchip,rk3588-i2s-tdm";
|
||||
reg = <0x0 0xfddc8000 0x0 0x1000>;
|
||||
@@ -454,6 +459,22 @@ sata-port@0 {
|
||||
};
|
||||
};
|
||||
|
||||
+ hdptxphy1: phy@fed70000 {
|
||||
+ compatible = "rockchip,rk3588-hdptx-phy";
|
||||
+ reg = <0x0 0xfed70000 0x0 0x2000>;
|
||||
+ clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX1>;
|
||||
+ clock-names = "ref", "apb";
|
||||
+ #phy-cells = <0>;
|
||||
+ resets = <&cru SRST_HDPTX1>, <&cru SRST_P_HDPTX1>,
|
||||
+ <&cru SRST_HDPTX1_INIT>, <&cru SRST_HDPTX1_CMN>,
|
||||
+ <&cru SRST_HDPTX1_LANE>, <&cru SRST_HDPTX1_ROPLL>,
|
||||
+ <&cru SRST_HDPTX1_LCPLL>;
|
||||
+ reset-names = "phy", "apb", "init", "cmn", "lane", "ropll",
|
||||
+ "lcpll";
|
||||
+ rockchip,grf = <&hdptxphy1_grf>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
usbdp_phy1: phy@fed90000 {
|
||||
compatible = "rockchip,rk3588-usbdp-phy";
|
||||
reg = <0x0 0xfed90000 0x0 0x10000>;
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Sat, 7 Dec 2024 21:53:07 +0200
|
||||
Subject: arm64: dts: rockchip: Add HDMI1 node on RK3588
|
||||
|
||||
Add support for the second HDMI TX port found on RK3588 SoC.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi | 41 ++++++++++
|
||||
1 file changed, 41 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
@@ -196,6 +196,47 @@ hdmi_receiver: hdmi_receiver@fdee0000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ hdmi1: hdmi@fdea0000 {
|
||||
+ compatible = "rockchip,rk3588-dw-hdmi-qp";
|
||||
+ reg = <0x0 0xfdea0000 0x0 0x20000>;
|
||||
+ clocks = <&cru PCLK_HDMITX1>,
|
||||
+ <&cru CLK_HDMITX1_EARC>,
|
||||
+ <&cru CLK_HDMITX1_REF>,
|
||||
+ <&cru MCLK_I2S6_8CH_TX>,
|
||||
+ <&cru CLK_HDMIHDP1>,
|
||||
+ <&cru HCLK_VO1>;
|
||||
+ clock-names = "pclk", "earc", "ref", "aud", "hdp", "hclk_vo1";
|
||||
+ interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 175 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 176 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
+ <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
+ interrupt-names = "avp", "cec", "earc", "main", "hpd";
|
||||
+ phys = <&hdptxphy1>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hdmim2_tx1_cec &hdmim0_tx1_hpd
|
||||
+ &hdmim1_tx1_scl &hdmim1_tx1_sda>;
|
||||
+ power-domains = <&power RK3588_PD_VO1>;
|
||||
+ resets = <&cru SRST_HDMITX1_REF>, <&cru SRST_HDMIHDP1>;
|
||||
+ reset-names = "ref", "hdp";
|
||||
+ rockchip,grf = <&sys_grf>;
|
||||
+ rockchip,vo-grf = <&vo1_grf>;
|
||||
+ status = "disabled";
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ hdmi1_in: port@0 {
|
||||
+ reg = <0>;
|
||||
+ };
|
||||
+
|
||||
+ hdmi1_out: port@1 {
|
||||
+ reg = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
pcie3x4: pcie@fe150000 {
|
||||
compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
|
||||
#address-cells = <3>;
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1,252 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Sat, 16 Nov 2024 03:19:43 +0200
|
||||
Subject: dt-bindings: display: vop2: Add optional PLL clock properties
|
||||
|
||||
On RK3588, HDMI PHY PLL can be used as an alternative and more accurate
|
||||
pixel clock source for VOP2 video ports 0, 1 and 2.
|
||||
|
||||
Document the optional PLL clock properties corresponding to the two HDMI
|
||||
PHYs available on the SoC.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml
|
||||
+++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-vop2.yaml
|
||||
@@ -53,6 +53,8 @@ properties:
|
||||
- description: Pixel clock for video port 2.
|
||||
- description: Pixel clock for video port 3.
|
||||
- description: Peripheral(vop grf/dsi) clock.
|
||||
+ - description: Alternative pixel clock provided by HDMI0 PHY PLL.
|
||||
+ - description: Alternative pixel clock provided by HDMI1 PHY PLL.
|
||||
|
||||
clock-names:
|
||||
minItems: 5
|
||||
@@ -64,6 +66,8 @@ properties:
|
||||
- const: dclk_vp2
|
||||
- const: dclk_vp3
|
||||
- const: pclk_vop
|
||||
+ - const: pll_hdmiphy0
|
||||
+ - const: pll_hdmiphy1
|
||||
|
||||
rockchip,grf:
|
||||
$ref: /schemas/types.yaml#/definitions/phandle
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Tue, 12 Nov 2024 02:27:35 +0200
|
||||
Subject: drm/rockchip: vop2: Drop unnecessary if_pixclk_rate computation
|
||||
|
||||
The if_pixclk_rate variable is not being used outside of the if-block in
|
||||
rk3588_calc_cru_cfg(), hence move the superfluous assignment from the
|
||||
first branch to the inner comment-block.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
@@ -1905,8 +1905,8 @@ static unsigned long rk3588_calc_cru_cfg(struct vop2_video_port *vp, int id,
|
||||
K = 2;
|
||||
}
|
||||
|
||||
- if_pixclk_rate = (dclk_core_rate << 1) / K;
|
||||
/*
|
||||
+ * if_pixclk_rate = (dclk_core_rate << 1) / K;
|
||||
* if_dclk_rate = dclk_core_rate / K;
|
||||
* *if_pixclk_div = dclk_rate / if_pixclk_rate;
|
||||
* *if_dclk_div = dclk_rate / if_dclk_rate;
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Fri, 3 Nov 2023 19:58:02 +0200
|
||||
Subject: drm/rockchip: vop2: Improve display modes handling on RK3588 HDMI0
|
||||
|
||||
The RK3588 specific implementation is currently quite limited in terms
|
||||
of handling the full range of display modes supported by the connected
|
||||
screens, e.g. 2560x1440@75Hz, 2048x1152@60Hz, 1024x768@60Hz are just a
|
||||
few of them.
|
||||
|
||||
Additionally, it doesn't cope well with non-integer refresh rates like
|
||||
59.94, 29.97, 23.98, etc.
|
||||
|
||||
Make use of HDMI0 PHY PLL as a more accurate DCLK source to handle
|
||||
all display modes up to 4K@60Hz.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 34 ++++++++++
|
||||
1 file changed, 34 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
@@ -159,6 +159,7 @@ struct vop2_video_port {
|
||||
struct drm_crtc crtc;
|
||||
struct vop2 *vop2;
|
||||
struct clk *dclk;
|
||||
+ struct clk *dclk_src;
|
||||
unsigned int id;
|
||||
const struct vop2_video_port_data *data;
|
||||
|
||||
@@ -214,6 +215,7 @@ struct vop2 {
|
||||
struct clk *hclk;
|
||||
struct clk *aclk;
|
||||
struct clk *pclk;
|
||||
+ struct clk *pll_hdmiphy0;
|
||||
|
||||
/* optional internal rgb encoder */
|
||||
struct rockchip_rgb *rgb;
|
||||
@@ -222,6 +224,8 @@ struct vop2 {
|
||||
struct vop2_win win[];
|
||||
};
|
||||
|
||||
+#define VOP2_MAX_DCLK_RATE 600000000
|
||||
+
|
||||
#define vop2_output_if_is_hdmi(x) ((x) == ROCKCHIP_VOP2_EP_HDMI0 || \
|
||||
(x) == ROCKCHIP_VOP2_EP_HDMI1)
|
||||
|
||||
@@ -1155,6 +1159,9 @@ static void vop2_crtc_atomic_disable(struct drm_crtc *crtc,
|
||||
|
||||
vop2_crtc_disable_irq(vp, VP_INT_DSP_HOLD_VALID);
|
||||
|
||||
+ if (vp->dclk_src)
|
||||
+ clk_set_parent(vp->dclk, vp->dclk_src);
|
||||
+
|
||||
clk_disable_unprepare(vp->dclk);
|
||||
|
||||
vop2->enable_count--;
|
||||
@@ -2259,6 +2266,27 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
|
||||
vop2_vp_write(vp, RK3568_VP_MIPI_CTRL, 0);
|
||||
|
||||
+ /*
|
||||
+ * Switch to HDMI PHY PLL as DCLK source for display modes up
|
||||
+ * to 4K@60Hz, if available, otherwise keep using the system CRU.
|
||||
+ */
|
||||
+ if (vop2->pll_hdmiphy0 && clock <= VOP2_MAX_DCLK_RATE) {
|
||||
+ drm_for_each_encoder_mask(encoder, crtc->dev, crtc_state->encoder_mask) {
|
||||
+ struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);
|
||||
+
|
||||
+ if (rkencoder->crtc_endpoint_id == ROCKCHIP_VOP2_EP_HDMI0) {
|
||||
+ if (!vp->dclk_src)
|
||||
+ vp->dclk_src = clk_get_parent(vp->dclk);
|
||||
+
|
||||
+ ret = clk_set_parent(vp->dclk, vop2->pll_hdmiphy0);
|
||||
+ if (ret < 0)
|
||||
+ drm_warn(vop2->drm,
|
||||
+ "Could not switch to HDMI0 PHY PLL: %d\n", ret);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
clk_set_rate(vp->dclk, clock);
|
||||
|
||||
vop2_post_config(crtc);
|
||||
@@ -3699,6 +3727,12 @@ static int vop2_bind(struct device *dev, struct device *master, void *data)
|
||||
return PTR_ERR(vop2->pclk);
|
||||
}
|
||||
|
||||
+ vop2->pll_hdmiphy0 = devm_clk_get_optional(vop2->dev, "pll_hdmiphy0");
|
||||
+ if (IS_ERR(vop2->pll_hdmiphy0)) {
|
||||
+ drm_err(vop2->drm, "failed to get pll_hdmiphy0\n");
|
||||
+ return PTR_ERR(vop2->pll_hdmiphy0);
|
||||
+ }
|
||||
+
|
||||
vop2->irq = platform_get_irq(pdev, 0);
|
||||
if (vop2->irq < 0) {
|
||||
drm_err(vop2->drm, "cannot find irq for vop2\n");
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Tue, 16 Jan 2024 03:13:38 +0200
|
||||
Subject: arm64: dts: rockchip: Enable HDMI0 PHY clk provider on RK3588
|
||||
|
||||
Since commit c4b09c562086 ("phy: phy-rockchip-samsung-hdptx: Add clock
|
||||
provider support"), the HDMI PHY PLL can be used as an alternative and
|
||||
more accurate pixel clock source for VOP2 to improve display modes
|
||||
handling on RK3588 SoC.
|
||||
|
||||
Add the missing #clock-cells property to allow using the clock provider
|
||||
functionality of HDMI0 PHY.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
@@ -2812,6 +2812,7 @@ hdptxphy_hdmi0: phy@fed60000 {
|
||||
reg = <0x0 0xfed60000 0x0 0x2000>;
|
||||
clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX0>;
|
||||
clock-names = "ref", "apb";
|
||||
+ #clock-cells = <0>;
|
||||
#phy-cells = <0>;
|
||||
resets = <&cru SRST_HDPTX0>, <&cru SRST_P_HDPTX0>,
|
||||
<&cru SRST_HDPTX0_INIT>, <&cru SRST_HDPTX0_CMN>,
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Sat, 16 Nov 2024 04:33:46 +0200
|
||||
Subject: arm64: dts: rockchip: Add HDMI0 PHY PLL clock source to VOP2 on
|
||||
RK3588
|
||||
|
||||
VOP2 on RK3588 is able to use the HDMI PHY PLL as an alternative and
|
||||
more accurate pixel clock source to improve handling of display modes up
|
||||
to 4K@60Hz on video ports 0, 1 and 2.
|
||||
|
||||
For now only HDMI0 output is supported, hence add the related PLL clock.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
@@ -1261,14 +1261,16 @@ vop: vop@fdd90000 {
|
||||
<&cru DCLK_VOP1>,
|
||||
<&cru DCLK_VOP2>,
|
||||
<&cru DCLK_VOP3>,
|
||||
- <&cru PCLK_VOP_ROOT>;
|
||||
+ <&cru PCLK_VOP_ROOT>,
|
||||
+ <&hdptxphy_hdmi0>;
|
||||
clock-names = "aclk",
|
||||
"hclk",
|
||||
"dclk_vp0",
|
||||
"dclk_vp1",
|
||||
"dclk_vp2",
|
||||
"dclk_vp3",
|
||||
- "pclk_vop";
|
||||
+ "pclk_vop",
|
||||
+ "pll_hdmiphy0";
|
||||
iommus = <&vop_mmu>;
|
||||
power-domains = <&power RK3588_PD_VOP>;
|
||||
rockchip,grf = <&sys_grf>;
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1,318 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Damon Ding <damon.ding@rock-chips.com>
|
||||
Date: Thu, 6 Feb 2025 11:03:30 +0800
|
||||
Subject: arm64: dts: rockchip: Fix label name of hdptxphy for RK3588
|
||||
|
||||
The hdptxphy is a combo transmit-PHY for HDMI2.1 TMDS Link, FRL Link, DP
|
||||
and eDP Link. Therefore, it is better to name it hdptxphy0 other than
|
||||
hdptxphy_hdmi0, which will be referenced by both hdmi0 and edp0 nodes.
|
||||
|
||||
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
|
||||
Link: https://lore.kernel.org/r/20250206030330.680424-3-damon.ding@rock-chips.com
|
||||
[added armsom-sige7, where hdmi-support was added recently and also
|
||||
the hdptxphy0-as-dclk source I just added]
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 6 +++---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-evb.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-firefly-itx-3588j.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-coolpi-4b.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-odroid-m2.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 2 +-
|
||||
arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts | 2 +-
|
||||
20 files changed, 22 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
|
||||
@@ -1262,7 +1262,7 @@ vop: vop@fdd90000 {
|
||||
<&cru DCLK_VOP2>,
|
||||
<&cru DCLK_VOP3>,
|
||||
<&cru PCLK_VOP_ROOT>,
|
||||
- <&hdptxphy_hdmi0>;
|
||||
+ <&hdptxphy0>;
|
||||
clock-names = "aclk",
|
||||
"hclk",
|
||||
"dclk_vp0",
|
||||
@@ -1387,7 +1387,7 @@ hdmi0: hdmi@fde80000 {
|
||||
<GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH 0>,
|
||||
<GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH 0>;
|
||||
interrupt-names = "avp", "cec", "earc", "main", "hpd";
|
||||
- phys = <&hdptxphy_hdmi0>;
|
||||
+ phys = <&hdptxphy0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hdmim0_tx0_cec &hdmim0_tx0_hpd
|
||||
&hdmim0_tx0_scl &hdmim0_tx0_sda>;
|
||||
@@ -2809,7 +2809,7 @@ dmac2: dma-controller@fed10000 {
|
||||
#dma-cells = <1>;
|
||||
};
|
||||
|
||||
- hdptxphy_hdmi0: phy@fed60000 {
|
||||
+ hdptxphy0: phy@fed60000 {
|
||||
compatible = "rockchip,rk3588-hdptx-phy";
|
||||
reg = <0x0 0xfed60000 0x0 0x2000>;
|
||||
clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX0>;
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-evb.dts b/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-evb.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-evb.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-evb.dts
|
||||
@@ -129,7 +129,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts b/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-coolpi-cm5-genbook.dts
|
||||
@@ -166,7 +166,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
|
||||
@@ -364,7 +364,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-firefly-itx-3588j.dts b/arch/arm64/boot/dts/rockchip/rk3588-firefly-itx-3588j.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-firefly-itx-3588j.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-firefly-itx-3588j.dts
|
||||
@@ -337,7 +337,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts b/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-friendlyelec-cm3588-nas.dts
|
||||
@@ -335,7 +335,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts b/arch/arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-h96-max-v58.dts
|
||||
@@ -207,7 +207,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts
|
||||
@@ -303,7 +303,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
|
||||
@@ -360,7 +360,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
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 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
|
||||
@@ -39,7 +39,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-plus.dts
|
||||
@@ -125,7 +125,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -220,7 +220,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts b/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-tiger-haikou.dts
|
||||
@@ -189,7 +189,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-coolpi-4b.dts b/arch/arm64/boot/dts/rockchip/rk3588s-coolpi-4b.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-coolpi-4b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-coolpi-4b.dts
|
||||
@@ -236,7 +236,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts
|
||||
@@ -278,7 +278,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6.dtsi
|
||||
@@ -251,7 +251,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-odroid-m2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-odroid-m2.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-odroid-m2.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-odroid-m2.dts
|
||||
@@ -266,7 +266,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dtsi
|
||||
@@ -197,7 +197,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts
|
||||
@@ -334,7 +334,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5c.dts
|
||||
@@ -278,7 +278,7 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
-&hdptxphy_hdmi0 {
|
||||
+&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Sat, 15 Feb 2025 02:55:37 +0200
|
||||
Subject: drm/rockchip: vop2: Improve display modes handling on RK3588 HDMI1
|
||||
|
||||
The RK3588 specific implementation is currently quite limited in terms
|
||||
of handling the full range of display modes supported by the connected
|
||||
screens, e.g. 2560x1440@75Hz, 2048x1152@60Hz, 1024x768@60Hz are just a
|
||||
few of them.
|
||||
|
||||
Additionally, it doesn't cope well with non-integer refresh rates like
|
||||
59.94, 29.97, 23.98, etc.
|
||||
|
||||
Make use of HDMI1 PHY PLL as a more accurate DCLK source to handle
|
||||
all display modes up to 4K@60Hz.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 26 +++++++++-
|
||||
1 file changed, 25 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
|
||||
@@ -216,6 +216,7 @@ struct vop2 {
|
||||
struct clk *aclk;
|
||||
struct clk *pclk;
|
||||
struct clk *pll_hdmiphy0;
|
||||
+ struct clk *pll_hdmiphy1;
|
||||
|
||||
/* optional internal rgb encoder */
|
||||
struct rockchip_rgb *rgb;
|
||||
@@ -2270,11 +2271,14 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
* Switch to HDMI PHY PLL as DCLK source for display modes up
|
||||
* to 4K@60Hz, if available, otherwise keep using the system CRU.
|
||||
*/
|
||||
- if (vop2->pll_hdmiphy0 && clock <= VOP2_MAX_DCLK_RATE) {
|
||||
+ if ((vop2->pll_hdmiphy0 || vop2->pll_hdmiphy1) && clock <= VOP2_MAX_DCLK_RATE) {
|
||||
drm_for_each_encoder_mask(encoder, crtc->dev, crtc_state->encoder_mask) {
|
||||
struct rockchip_encoder *rkencoder = to_rockchip_encoder(encoder);
|
||||
|
||||
if (rkencoder->crtc_endpoint_id == ROCKCHIP_VOP2_EP_HDMI0) {
|
||||
+ if (!vop2->pll_hdmiphy0)
|
||||
+ break;
|
||||
+
|
||||
if (!vp->dclk_src)
|
||||
vp->dclk_src = clk_get_parent(vp->dclk);
|
||||
|
||||
@@ -2284,6 +2288,20 @@ static void vop2_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
"Could not switch to HDMI0 PHY PLL: %d\n", ret);
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ if (rkencoder->crtc_endpoint_id == ROCKCHIP_VOP2_EP_HDMI1) {
|
||||
+ if (!vop2->pll_hdmiphy1)
|
||||
+ break;
|
||||
+
|
||||
+ if (!vp->dclk_src)
|
||||
+ vp->dclk_src = clk_get_parent(vp->dclk);
|
||||
+
|
||||
+ ret = clk_set_parent(vp->dclk, vop2->pll_hdmiphy1);
|
||||
+ if (ret < 0)
|
||||
+ drm_warn(vop2->drm,
|
||||
+ "Could not switch to HDMI1 PHY PLL: %d\n", ret);
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3733,6 +3751,12 @@ static int vop2_bind(struct device *dev, struct device *master, void *data)
|
||||
return PTR_ERR(vop2->pll_hdmiphy0);
|
||||
}
|
||||
|
||||
+ vop2->pll_hdmiphy1 = devm_clk_get_optional(vop2->dev, "pll_hdmiphy1");
|
||||
+ if (IS_ERR(vop2->pll_hdmiphy1)) {
|
||||
+ drm_err(vop2->drm, "failed to get pll_hdmiphy1\n");
|
||||
+ return PTR_ERR(vop2->pll_hdmiphy1);
|
||||
+ }
|
||||
+
|
||||
vop2->irq = platform_get_irq(pdev, 0);
|
||||
if (vop2->irq < 0) {
|
||||
drm_err(vop2->drm, "cannot find irq for vop2\n");
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Sat, 15 Feb 2025 02:55:38 +0200
|
||||
Subject: arm64: dts: rockchip: Enable HDMI1 PHY clk provider on RK3588
|
||||
|
||||
Since commit c4b09c562086 ("phy: phy-rockchip-samsung-hdptx: Add clock
|
||||
provider support"), the HDMI PHY PLL can be used as an alternative and
|
||||
more accurate pixel clock source for VOP2 to improve display modes
|
||||
handling on RK3588 SoC.
|
||||
|
||||
Add the missing #clock-cells property to allow using the clock provider
|
||||
functionality of HDMI1 PHY.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
@@ -505,6 +505,7 @@ hdptxphy1: phy@fed70000 {
|
||||
reg = <0x0 0xfed70000 0x0 0x2000>;
|
||||
clocks = <&cru CLK_USB2PHY_HDPTXRXPHY_REF>, <&cru PCLK_HDPTX1>;
|
||||
clock-names = "ref", "apb";
|
||||
+ #clock-cells = <0>;
|
||||
#phy-cells = <0>;
|
||||
resets = <&cru SRST_HDPTX1>, <&cru SRST_P_HDPTX1>,
|
||||
<&cru SRST_HDPTX1_INIT>, <&cru SRST_HDPTX1_CMN>,
|
||||
--
|
||||
Armbian
|
||||
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
Date: Sat, 15 Feb 2025 02:55:39 +0200
|
||||
Subject: arm64: dts: rockchip: Add HDMI1 PHY PLL clock source to VOP2 on
|
||||
RK3588
|
||||
|
||||
VOP2 on RK3588 is able to use the HDMI PHY PLL as an alternative and
|
||||
more accurate pixel clock source to improve handling of display modes up
|
||||
to 4K@60Hz on video ports 0, 1 and 2.
|
||||
|
||||
The HDMI1 PHY PLL clock source cannot be added directly to vop node in
|
||||
rk3588-base.dtsi, along with the HDMI0 related one, because HDMI1 is an
|
||||
optional feature and its PHY node belongs to a separate (extra) DT file.
|
||||
|
||||
Therefore, add the HDMI1 PHY PLL clock source to VOP2 by overwriting its
|
||||
clocks & clock-names properties in the extra DT file.
|
||||
|
||||
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi | 21 ++++++++++
|
||||
1 file changed, 21 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-extra.dtsi
|
||||
@@ -568,3 +568,24 @@ pcie30phy: phy@fee80000 {
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
+
|
||||
+&vop {
|
||||
+ clocks = <&cru ACLK_VOP>,
|
||||
+ <&cru HCLK_VOP>,
|
||||
+ <&cru DCLK_VOP0>,
|
||||
+ <&cru DCLK_VOP1>,
|
||||
+ <&cru DCLK_VOP2>,
|
||||
+ <&cru DCLK_VOP3>,
|
||||
+ <&cru PCLK_VOP_ROOT>,
|
||||
+ <&hdptxphy0>,
|
||||
+ <&hdptxphy1>;
|
||||
+ clock-names = "aclk",
|
||||
+ "hclk",
|
||||
+ "dclk_vp0",
|
||||
+ "dclk_vp1",
|
||||
+ "dclk_vp2",
|
||||
+ "dclk_vp3",
|
||||
+ "pclk_vop",
|
||||
+ "pll_hdmiphy0",
|
||||
+ "pll_hdmiphy1";
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Heiko Stuebner <heiko@sntech.de>
|
||||
Date: Thu, 20 Feb 2025 23:54:48 +0100
|
||||
Subject: clk: check for disabled clock-provider in of_clk_get_hw_from_clkspec
|
||||
|
||||
of_clk_get_hw_from_clkspec checks all available clock-providers by
|
||||
compairing their of-nodes to the one from the clkspec. If no matching
|
||||
clock-provider is found, the function returns EPROBE_DEFER to cause a
|
||||
re-check at a later date.
|
||||
|
||||
If a matching clock-provider is found, a authoritative answer can be
|
||||
retrieved from it whether the clock exists or not.
|
||||
|
||||
This does not take into account that the clock-provider may never appear,
|
||||
because it's node is disabled. This can happen for example when a clock
|
||||
is optional, provided by a separate block which just never gets enabled.
|
||||
|
||||
One example of this happening is the rk3588's VOP, which has optional
|
||||
additional display-clock-supplies coming from PLLs inside the hdmiphy
|
||||
blocks. These can be used for better rates, but the system will also
|
||||
work without them.
|
||||
|
||||
The problem around that is described in the followups to:
|
||||
https://lore.kernel.org/dri-devel/20250215-vop2-hdmi1-disp-modes-v1-3-81962a7151d6@collabora.com/
|
||||
|
||||
As we already know the of-node of the presumed clock-provider, just add
|
||||
a check via of_device_is_available whether this is a "valid" device node.
|
||||
This prevents ethernal defer-loops.
|
||||
|
||||
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
|
||||
---
|
||||
drivers/clk/clk.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/clk/clk.c
|
||||
+++ b/drivers/clk/clk.c
|
||||
@@ -5258,6 +5258,10 @@ of_clk_get_hw_from_clkspec(struct of_phandle_args *clkspec)
|
||||
if (!clkspec)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
+ /* Check if node in clkspec is in disabled/fail state */
|
||||
+ if (!of_device_is_available(clkspec->np))
|
||||
+ return ERR_PTR(-ENOENT);
|
||||
+
|
||||
mutex_lock(&of_clk_mutex);
|
||||
list_for_each_entry(provider, &of_clk_providers, link) {
|
||||
if (provider->node == clkspec->np) {
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1,580 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: palachzzz <7zzzzzzz@mail.ru>
|
||||
Date: Thu, 27 Feb 2025 23:06:51 +0800
|
||||
Subject: [ARCHEOLOGY] RK3588 add HDMI sound, add support for OPi5 Max #7884
|
||||
|
||||
> X-Git-Archeology: - Revision 0b88561ec332114404ff8075ab6bc2419ca66a47: https://github.com/armbian/build/commit/0b88561ec332114404ff8075ab6bc2419ca66a47
|
||||
> X-Git-Archeology: Date: Thu, 27 Feb 2025 23:06:51 +0800
|
||||
> X-Git-Archeology: From: palachzzz <7zzzzzzz@mail.ru>
|
||||
> X-Git-Archeology: Subject: RK3588 add HDMI sound, add support for OPi5 Max #7884
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 489 ++++++++++
|
||||
1 file changed, 489 insertions(+)
|
||||
|
||||
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
|
||||
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
|
||||
@@ -36,6 +36,88 @@
|
||||
|
||||
#define SCRAMB_POLL_DELAY_MS 3000
|
||||
|
||||
+/*
|
||||
+ * Unless otherwise noted, entries in this table are 100% optimization.
|
||||
+ * Values can be obtained from dw_hdmi_qp_compute_n() but that function is
|
||||
+ * slow so we pre-compute values we expect to see.
|
||||
+ *
|
||||
+ * The values for TMDS 25175, 25200, 27000, 54000, 74250 and 148500 kHz are
|
||||
+ * the recommended N values specified in the Audio chapter of the HDMI
|
||||
+ * specification.
|
||||
+ */
|
||||
+static const struct dw_hdmi_audio_tmds_n {
|
||||
+ unsigned long tmds;
|
||||
+ unsigned int n_32k;
|
||||
+ unsigned int n_44k1;
|
||||
+ unsigned int n_48k;
|
||||
+} common_tmds_n_table[] = {
|
||||
+ { .tmds = 25175000, .n_32k = 4576, .n_44k1 = 7007, .n_48k = 6864, },
|
||||
+ { .tmds = 25200000, .n_32k = 4096, .n_44k1 = 6272, .n_48k = 6144, },
|
||||
+ { .tmds = 27000000, .n_32k = 4096, .n_44k1 = 6272, .n_48k = 6144, },
|
||||
+ { .tmds = 28320000, .n_32k = 4096, .n_44k1 = 5586, .n_48k = 6144, },
|
||||
+ { .tmds = 30240000, .n_32k = 4096, .n_44k1 = 5642, .n_48k = 6144, },
|
||||
+ { .tmds = 31500000, .n_32k = 4096, .n_44k1 = 5600, .n_48k = 6144, },
|
||||
+ { .tmds = 32000000, .n_32k = 4096, .n_44k1 = 5733, .n_48k = 6144, },
|
||||
+ { .tmds = 33750000, .n_32k = 4096, .n_44k1 = 6272, .n_48k = 6144, },
|
||||
+ { .tmds = 36000000, .n_32k = 4096, .n_44k1 = 5684, .n_48k = 6144, },
|
||||
+ { .tmds = 40000000, .n_32k = 4096, .n_44k1 = 5733, .n_48k = 6144, },
|
||||
+ { .tmds = 49500000, .n_32k = 4096, .n_44k1 = 5488, .n_48k = 6144, },
|
||||
+ { .tmds = 50000000, .n_32k = 4096, .n_44k1 = 5292, .n_48k = 6144, },
|
||||
+ { .tmds = 54000000, .n_32k = 4096, .n_44k1 = 6272, .n_48k = 6144, },
|
||||
+ { .tmds = 65000000, .n_32k = 4096, .n_44k1 = 7056, .n_48k = 6144, },
|
||||
+ { .tmds = 68250000, .n_32k = 4096, .n_44k1 = 5376, .n_48k = 6144, },
|
||||
+ { .tmds = 71000000, .n_32k = 4096, .n_44k1 = 7056, .n_48k = 6144, },
|
||||
+ { .tmds = 72000000, .n_32k = 4096, .n_44k1 = 5635, .n_48k = 6144, },
|
||||
+ { .tmds = 73250000, .n_32k = 11648, .n_44k1 = 14112, .n_48k = 6144, },
|
||||
+ { .tmds = 74250000, .n_32k = 4096, .n_44k1 = 6272, .n_48k = 6144, },
|
||||
+ { .tmds = 75000000, .n_32k = 4096, .n_44k1 = 5880, .n_48k = 6144, },
|
||||
+ { .tmds = 78750000, .n_32k = 4096, .n_44k1 = 5600, .n_48k = 6144, },
|
||||
+ { .tmds = 78800000, .n_32k = 4096, .n_44k1 = 5292, .n_48k = 6144, },
|
||||
+ { .tmds = 79500000, .n_32k = 4096, .n_44k1 = 4704, .n_48k = 6144, },
|
||||
+ { .tmds = 83500000, .n_32k = 4096, .n_44k1 = 7056, .n_48k = 6144, },
|
||||
+ { .tmds = 85500000, .n_32k = 4096, .n_44k1 = 5488, .n_48k = 6144, },
|
||||
+ { .tmds = 88750000, .n_32k = 4096, .n_44k1 = 14112, .n_48k = 6144, },
|
||||
+ { .tmds = 97750000, .n_32k = 4096, .n_44k1 = 14112, .n_48k = 6144, },
|
||||
+ { .tmds = 101000000, .n_32k = 4096, .n_44k1 = 7056, .n_48k = 6144, },
|
||||
+ { .tmds = 106500000, .n_32k = 4096, .n_44k1 = 4704, .n_48k = 6144, },
|
||||
+ { .tmds = 108000000, .n_32k = 4096, .n_44k1 = 5684, .n_48k = 6144, },
|
||||
+ { .tmds = 115500000, .n_32k = 4096, .n_44k1 = 5712, .n_48k = 6144, },
|
||||
+ { .tmds = 119000000, .n_32k = 4096, .n_44k1 = 5544, .n_48k = 6144, },
|
||||
+ { .tmds = 135000000, .n_32k = 4096, .n_44k1 = 5488, .n_48k = 6144, },
|
||||
+ { .tmds = 146250000, .n_32k = 11648, .n_44k1 = 6272, .n_48k = 6144, },
|
||||
+ { .tmds = 148500000, .n_32k = 4096, .n_44k1 = 6272, .n_48k = 6144, },
|
||||
+ { .tmds = 154000000, .n_32k = 4096, .n_44k1 = 5544, .n_48k = 6144, },
|
||||
+ { .tmds = 162000000, .n_32k = 4096, .n_44k1 = 5684, .n_48k = 6144, },
|
||||
+
|
||||
+ /* For 297 MHz+ HDMI spec have some other rule for setting N */
|
||||
+ { .tmds = 297000000, .n_32k = 3073, .n_44k1 = 4704, .n_48k = 5120, },
|
||||
+ { .tmds = 594000000, .n_32k = 3073, .n_44k1 = 9408, .n_48k = 10240,},
|
||||
+
|
||||
+ /* End of table */
|
||||
+ { .tmds = 0, .n_32k = 0, .n_44k1 = 0, .n_48k = 0, },
|
||||
+};
|
||||
+
|
||||
+/*
|
||||
+ * These are the CTS values as recommended in the Audio chapter of the HDMI
|
||||
+ * specification.
|
||||
+ */
|
||||
+static const struct dw_hdmi_audio_tmds_cts {
|
||||
+ unsigned long tmds;
|
||||
+ unsigned int cts_32k;
|
||||
+ unsigned int cts_44k1;
|
||||
+ unsigned int cts_48k;
|
||||
+} common_tmds_cts_table[] = {
|
||||
+ { .tmds = 25175000, .cts_32k = 28125, .cts_44k1 = 31250, .cts_48k = 28125, },
|
||||
+ { .tmds = 25200000, .cts_32k = 25200, .cts_44k1 = 28000, .cts_48k = 25200, },
|
||||
+ { .tmds = 27000000, .cts_32k = 27000, .cts_44k1 = 30000, .cts_48k = 27000, },
|
||||
+ { .tmds = 54000000, .cts_32k = 54000, .cts_44k1 = 60000, .cts_48k = 54000, },
|
||||
+ { .tmds = 74250000, .cts_32k = 74250, .cts_44k1 = 82500, .cts_48k = 74250, },
|
||||
+ { .tmds = 148500000, .cts_32k = 148500, .cts_44k1 = 165000, .cts_48k = 148500, },
|
||||
+
|
||||
+ /* End of table */
|
||||
+ { .tmds = 0, .cts_32k = 0, .cts_44k1 = 0, .cts_48k = 0, },
|
||||
+};
|
||||
+
|
||||
struct dw_hdmi_qp_i2c {
|
||||
struct i2c_adapter adap;
|
||||
|
||||
@@ -60,6 +142,8 @@ struct dw_hdmi_qp {
|
||||
} phy;
|
||||
|
||||
struct regmap *regm;
|
||||
+
|
||||
+ unsigned long tmds_char_rate;
|
||||
};
|
||||
|
||||
static void dw_hdmi_qp_write(struct dw_hdmi_qp *hdmi, unsigned int val,
|
||||
@@ -83,6 +167,346 @@ static void dw_hdmi_qp_mod(struct dw_hdmi_qp *hdmi, unsigned int data,
|
||||
regmap_update_bits(hdmi->regm, reg, mask, data);
|
||||
}
|
||||
|
||||
+static struct dw_hdmi_qp *dw_hdmi_qp_from_bridge(struct drm_bridge *bridge)
|
||||
+{
|
||||
+ return container_of(bridge, struct dw_hdmi_qp, bridge);
|
||||
+}
|
||||
+
|
||||
+static void dw_hdmi_qp_set_cts_n(struct dw_hdmi_qp *hdmi, unsigned int cts,
|
||||
+ unsigned int n)
|
||||
+{
|
||||
+ /* Set N */
|
||||
+ dw_hdmi_qp_mod(hdmi, n, AUDPKT_ACR_N_VALUE, AUDPKT_ACR_CONTROL0);
|
||||
+
|
||||
+ /* Set CTS */
|
||||
+ if (cts)
|
||||
+ dw_hdmi_qp_mod(hdmi, AUDPKT_ACR_CTS_OVR_EN, AUDPKT_ACR_CTS_OVR_EN_MSK,
|
||||
+ AUDPKT_ACR_CONTROL1);
|
||||
+ else
|
||||
+ dw_hdmi_qp_mod(hdmi, 0, AUDPKT_ACR_CTS_OVR_EN_MSK,
|
||||
+ AUDPKT_ACR_CONTROL1);
|
||||
+
|
||||
+ dw_hdmi_qp_mod(hdmi, AUDPKT_ACR_CTS_OVR_VAL(cts), AUDPKT_ACR_CTS_OVR_VAL_MSK,
|
||||
+ AUDPKT_ACR_CONTROL1);
|
||||
+}
|
||||
+
|
||||
+static int dw_hdmi_qp_match_tmds_n_table(struct dw_hdmi_qp *hdmi,
|
||||
+ unsigned long pixel_clk,
|
||||
+ unsigned long freq)
|
||||
+{
|
||||
+ const struct dw_hdmi_audio_tmds_n *tmds_n = NULL;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; common_tmds_n_table[i].tmds != 0; i++) {
|
||||
+ if (pixel_clk == common_tmds_n_table[i].tmds) {
|
||||
+ tmds_n = &common_tmds_n_table[i];
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!tmds_n)
|
||||
+ return -ENOENT;
|
||||
+
|
||||
+ switch (freq) {
|
||||
+ case 32000:
|
||||
+ return tmds_n->n_32k;
|
||||
+ case 44100:
|
||||
+ case 88200:
|
||||
+ case 176400:
|
||||
+ return (freq / 44100) * tmds_n->n_44k1;
|
||||
+ case 48000:
|
||||
+ case 96000:
|
||||
+ case 192000:
|
||||
+ return (freq / 48000) * tmds_n->n_48k;
|
||||
+ default:
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static u32 dw_hdmi_qp_audio_math_diff(unsigned int freq, unsigned int n,
|
||||
+ unsigned int pixel_clk)
|
||||
+{
|
||||
+ u64 cts = mul_u32_u32(pixel_clk, n);
|
||||
+
|
||||
+ return do_div(cts, 128 * freq);
|
||||
+}
|
||||
+
|
||||
+static unsigned int dw_hdmi_qp_compute_n(struct dw_hdmi_qp *hdmi,
|
||||
+ unsigned long pixel_clk,
|
||||
+ unsigned long freq)
|
||||
+{
|
||||
+ unsigned int min_n = DIV_ROUND_UP((128 * freq), 1500);
|
||||
+ unsigned int max_n = (128 * freq) / 300;
|
||||
+ unsigned int ideal_n = (128 * freq) / 1000;
|
||||
+ unsigned int best_n_distance = ideal_n;
|
||||
+ unsigned int best_n = 0;
|
||||
+ u64 best_diff = U64_MAX;
|
||||
+ int n;
|
||||
+
|
||||
+ /* If the ideal N could satisfy the audio math, then just take it */
|
||||
+ if (dw_hdmi_qp_audio_math_diff(freq, ideal_n, pixel_clk) == 0)
|
||||
+ return ideal_n;
|
||||
+
|
||||
+ for (n = min_n; n <= max_n; n++) {
|
||||
+ u64 diff = dw_hdmi_qp_audio_math_diff(freq, n, pixel_clk);
|
||||
+
|
||||
+ if (diff < best_diff ||
|
||||
+ (diff == best_diff && abs(n - ideal_n) < best_n_distance)) {
|
||||
+ best_n = n;
|
||||
+ best_diff = diff;
|
||||
+ best_n_distance = abs(best_n - ideal_n);
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * The best N already satisfy the audio math, and also be
|
||||
+ * the closest value to ideal N, so just cut the loop.
|
||||
+ */
|
||||
+ if (best_diff == 0 && (abs(n - ideal_n) > best_n_distance))
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return best_n;
|
||||
+}
|
||||
+
|
||||
+static unsigned int dw_hdmi_qp_find_n(struct dw_hdmi_qp *hdmi, unsigned long pixel_clk,
|
||||
+ unsigned long sample_rate)
|
||||
+{
|
||||
+ int n = dw_hdmi_qp_match_tmds_n_table(hdmi, pixel_clk, sample_rate);
|
||||
+
|
||||
+ if (n > 0)
|
||||
+ return n;
|
||||
+
|
||||
+ dev_warn(hdmi->dev, "Rate %lu missing; compute N dynamically\n",
|
||||
+ pixel_clk);
|
||||
+
|
||||
+ return dw_hdmi_qp_compute_n(hdmi, pixel_clk, sample_rate);
|
||||
+}
|
||||
+
|
||||
+static unsigned int dw_hdmi_qp_find_cts(struct dw_hdmi_qp *hdmi, unsigned long pixel_clk,
|
||||
+ unsigned long sample_rate)
|
||||
+{
|
||||
+ const struct dw_hdmi_audio_tmds_cts *tmds_cts = NULL;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; common_tmds_cts_table[i].tmds != 0; i++) {
|
||||
+ if (pixel_clk == common_tmds_cts_table[i].tmds) {
|
||||
+ tmds_cts = &common_tmds_cts_table[i];
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!tmds_cts)
|
||||
+ return 0;
|
||||
+
|
||||
+ switch (sample_rate) {
|
||||
+ case 32000:
|
||||
+ return tmds_cts->cts_32k;
|
||||
+ case 44100:
|
||||
+ case 88200:
|
||||
+ case 176400:
|
||||
+ return tmds_cts->cts_44k1;
|
||||
+ case 48000:
|
||||
+ case 96000:
|
||||
+ case 192000:
|
||||
+ return tmds_cts->cts_48k;
|
||||
+ default:
|
||||
+ return -ENOENT;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void dw_hdmi_qp_set_audio_interface(struct dw_hdmi_qp *hdmi,
|
||||
+ struct hdmi_codec_daifmt *fmt,
|
||||
+ struct hdmi_codec_params *hparms)
|
||||
+{
|
||||
+ u32 conf0 = 0;
|
||||
+
|
||||
+ /* Reset the audio data path of the AVP */
|
||||
+ dw_hdmi_qp_write(hdmi, AVP_DATAPATH_PACKET_AUDIO_SWINIT_P, GLOBAL_SWRESET_REQUEST);
|
||||
+
|
||||
+ /* Disable AUDS, ACR, AUDI */
|
||||
+ dw_hdmi_qp_mod(hdmi, 0,
|
||||
+ PKTSCHED_ACR_TX_EN | PKTSCHED_AUDS_TX_EN | PKTSCHED_AUDI_TX_EN,
|
||||
+ PKTSCHED_PKT_EN);
|
||||
+
|
||||
+ /* Clear the audio FIFO */
|
||||
+ dw_hdmi_qp_write(hdmi, AUDIO_FIFO_CLR_P, AUDIO_INTERFACE_CONTROL0);
|
||||
+
|
||||
+ /* Select I2S interface as the audio source */
|
||||
+ dw_hdmi_qp_mod(hdmi, AUD_IF_I2S, AUD_IF_SEL_MSK, AUDIO_INTERFACE_CONFIG0);
|
||||
+
|
||||
+ /* Enable the active i2s lanes */
|
||||
+ switch (hparms->channels) {
|
||||
+ case 7 ... 8:
|
||||
+ conf0 |= I2S_LINES_EN(3);
|
||||
+ fallthrough;
|
||||
+ case 5 ... 6:
|
||||
+ conf0 |= I2S_LINES_EN(2);
|
||||
+ fallthrough;
|
||||
+ case 3 ... 4:
|
||||
+ conf0 |= I2S_LINES_EN(1);
|
||||
+ fallthrough;
|
||||
+ default:
|
||||
+ conf0 |= I2S_LINES_EN(0);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ dw_hdmi_qp_mod(hdmi, conf0, I2S_LINES_EN_MSK, AUDIO_INTERFACE_CONFIG0);
|
||||
+
|
||||
+ /*
|
||||
+ * Enable bpcuv generated internally for L-PCM, or received
|
||||
+ * from stream for NLPCM/HBR.
|
||||
+ */
|
||||
+ switch (fmt->bit_fmt) {
|
||||
+ case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE:
|
||||
+ conf0 = (hparms->channels == 8) ? AUD_HBR : AUD_ASP;
|
||||
+ conf0 |= I2S_BPCUV_RCV_EN;
|
||||
+ break;
|
||||
+ default:
|
||||
+ conf0 = AUD_ASP | I2S_BPCUV_RCV_DIS;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ dw_hdmi_qp_mod(hdmi, conf0, I2S_BPCUV_RCV_MSK | AUD_FORMAT_MSK,
|
||||
+ AUDIO_INTERFACE_CONFIG0);
|
||||
+
|
||||
+ /* Enable audio FIFO auto clear when overflow */
|
||||
+ dw_hdmi_qp_mod(hdmi, AUD_FIFO_INIT_ON_OVF_EN, AUD_FIFO_INIT_ON_OVF_MSK,
|
||||
+ AUDIO_INTERFACE_CONFIG0);
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * When transmitting IEC60958 linear PCM audio, these registers allow to
|
||||
+ * configure the channel status information of all the channel status
|
||||
+ * bits in the IEC60958 frame. For the moment this configuration is only
|
||||
+ * used when the I2S audio interface, General Purpose Audio (GPA),
|
||||
+ * or AHB audio DMA (AHBAUDDMA) interface is active
|
||||
+ * (for S/PDIF interface this information comes from the stream).
|
||||
+ */
|
||||
+static void dw_hdmi_qp_set_channel_status(struct dw_hdmi_qp *hdmi,
|
||||
+ u8 *channel_status, bool ref2stream)
|
||||
+{
|
||||
+ /*
|
||||
+ * AUDPKT_CHSTATUS_OVR0: { RSV, RSV, CS1, CS0 }
|
||||
+ * AUDPKT_CHSTATUS_OVR1: { CS6, CS5, CS4, CS3 }
|
||||
+ *
|
||||
+ * | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|
||||
+ * CS0: | Mode | d | c | b | a |
|
||||
+ * CS1: | Category Code |
|
||||
+ * CS2: | Channel Number | Source Number |
|
||||
+ * CS3: | Clock Accuracy | Sample Freq |
|
||||
+ * CS4: | Ori Sample Freq | Word Length |
|
||||
+ * CS5: | | CGMS-A |
|
||||
+ * CS6~CS23: Reserved
|
||||
+ *
|
||||
+ * a: use of channel status block
|
||||
+ * b: linear PCM identification: 0 for lpcm, 1 for nlpcm
|
||||
+ * c: copyright information
|
||||
+ * d: additional format information
|
||||
+ */
|
||||
+
|
||||
+ if (ref2stream)
|
||||
+ channel_status[0] |= IEC958_AES0_NONAUDIO;
|
||||
+
|
||||
+ if ((dw_hdmi_qp_read(hdmi, AUDIO_INTERFACE_CONFIG0) & GENMASK(25, 24)) == AUD_HBR) {
|
||||
+ /* fixup cs for HBR */
|
||||
+ channel_status[3] = (channel_status[3] & 0xf0) | IEC958_AES3_CON_FS_768000;
|
||||
+ channel_status[4] = (channel_status[4] & 0x0f) | IEC958_AES4_CON_ORIGFS_NOTID;
|
||||
+ }
|
||||
+
|
||||
+ dw_hdmi_qp_write(hdmi, channel_status[0] | (channel_status[1] << 8),
|
||||
+ AUDPKT_CHSTATUS_OVR0);
|
||||
+
|
||||
+ regmap_bulk_write(hdmi->regm, AUDPKT_CHSTATUS_OVR1, &channel_status[3], 1);
|
||||
+
|
||||
+ if (ref2stream)
|
||||
+ dw_hdmi_qp_mod(hdmi, 0,
|
||||
+ AUDPKT_PBIT_FORCE_EN_MASK | AUDPKT_CHSTATUS_OVR_EN_MASK,
|
||||
+ AUDPKT_CONTROL0);
|
||||
+ else
|
||||
+ dw_hdmi_qp_mod(hdmi, AUDPKT_PBIT_FORCE_EN | AUDPKT_CHSTATUS_OVR_EN,
|
||||
+ AUDPKT_PBIT_FORCE_EN_MASK | AUDPKT_CHSTATUS_OVR_EN_MASK,
|
||||
+ AUDPKT_CONTROL0);
|
||||
+}
|
||||
+
|
||||
+static void dw_hdmi_qp_set_sample_rate(struct dw_hdmi_qp *hdmi, unsigned long long tmds_char_rate,
|
||||
+ unsigned int sample_rate)
|
||||
+{
|
||||
+ unsigned int n, cts;
|
||||
+
|
||||
+ n = dw_hdmi_qp_find_n(hdmi, tmds_char_rate, sample_rate);
|
||||
+ cts = dw_hdmi_qp_find_cts(hdmi, tmds_char_rate, sample_rate);
|
||||
+
|
||||
+ dw_hdmi_qp_set_cts_n(hdmi, cts, n);
|
||||
+}
|
||||
+
|
||||
+static int dw_hdmi_qp_audio_enable(struct drm_connector *connector,
|
||||
+ struct drm_bridge *bridge)
|
||||
+{
|
||||
+ struct dw_hdmi_qp *hdmi = dw_hdmi_qp_from_bridge(bridge);
|
||||
+
|
||||
+ if (hdmi->tmds_char_rate)
|
||||
+ dw_hdmi_qp_mod(hdmi, 0, AVP_DATAPATH_PACKET_AUDIO_SWDISABLE, GLOBAL_SWDISABLE);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int dw_hdmi_qp_audio_prepare(struct drm_connector *connector,
|
||||
+ struct drm_bridge *bridge,
|
||||
+ struct hdmi_codec_daifmt *fmt,
|
||||
+ struct hdmi_codec_params *hparms)
|
||||
+{
|
||||
+ struct dw_hdmi_qp *hdmi = dw_hdmi_qp_from_bridge(bridge);
|
||||
+ bool ref2stream = false;
|
||||
+
|
||||
+ if (!hdmi->tmds_char_rate)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ if (fmt->bit_clk_provider | fmt->frame_clk_provider) {
|
||||
+ dev_err(hdmi->dev, "unsupported clock settings\n");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+
|
||||
+ if (fmt->bit_fmt == SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE)
|
||||
+ ref2stream = true;
|
||||
+
|
||||
+ dw_hdmi_qp_set_audio_interface(hdmi, fmt, hparms);
|
||||
+ dw_hdmi_qp_set_sample_rate(hdmi, hdmi->tmds_char_rate, hparms->sample_rate);
|
||||
+ dw_hdmi_qp_set_channel_status(hdmi, hparms->iec.status, ref2stream);
|
||||
+ drm_atomic_helper_connector_hdmi_update_audio_infoframe(connector, &hparms->cea);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static void dw_hdmi_qp_audio_disable_regs(struct dw_hdmi_qp *hdmi)
|
||||
+{
|
||||
+ /*
|
||||
+ * Keep ACR, AUDI, AUDS packet always on to make SINK device
|
||||
+ * active for better compatibility and user experience.
|
||||
+ *
|
||||
+ * This also fix POP sound on some SINK devices which wakeup
|
||||
+ * from suspend to active.
|
||||
+ */
|
||||
+ dw_hdmi_qp_mod(hdmi, I2S_BPCUV_RCV_DIS, I2S_BPCUV_RCV_MSK,
|
||||
+ AUDIO_INTERFACE_CONFIG0);
|
||||
+ dw_hdmi_qp_mod(hdmi, AUDPKT_PBIT_FORCE_EN | AUDPKT_CHSTATUS_OVR_EN,
|
||||
+ AUDPKT_PBIT_FORCE_EN_MASK | AUDPKT_CHSTATUS_OVR_EN_MASK,
|
||||
+ AUDPKT_CONTROL0);
|
||||
+
|
||||
+ dw_hdmi_qp_mod(hdmi, AVP_DATAPATH_PACKET_AUDIO_SWDISABLE,
|
||||
+ AVP_DATAPATH_PACKET_AUDIO_SWDISABLE, GLOBAL_SWDISABLE);
|
||||
+}
|
||||
+
|
||||
+static void dw_hdmi_qp_audio_disable(struct drm_connector *connector,
|
||||
+ struct drm_bridge *bridge)
|
||||
+{
|
||||
+ struct dw_hdmi_qp *hdmi = dw_hdmi_qp_from_bridge(bridge);
|
||||
+
|
||||
+ drm_atomic_helper_connector_hdmi_clear_audio_infoframe(connector);
|
||||
+
|
||||
+ if (hdmi->tmds_char_rate)
|
||||
+ dw_hdmi_qp_audio_disable_regs(hdmi);
|
||||
+}
|
||||
+
|
||||
static int dw_hdmi_qp_i2c_read(struct dw_hdmi_qp *hdmi,
|
||||
unsigned char *buf, unsigned int length)
|
||||
{
|
||||
@@ -361,6 +785,51 @@ static int dw_hdmi_qp_config_drm_infoframe(struct dw_hdmi_qp *hdmi,
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Static values documented in the TRM
|
||||
+ * Different values are only used for debug purposes
|
||||
+ */
|
||||
+#define DW_HDMI_QP_AUDIO_INFOFRAME_HB1 0x1
|
||||
+#define DW_HDMI_QP_AUDIO_INFOFRAME_HB2 0xa
|
||||
+
|
||||
+static int dw_hdmi_qp_config_audio_infoframe(struct dw_hdmi_qp *hdmi,
|
||||
+ const u8 *buffer, size_t len)
|
||||
+{
|
||||
+ /*
|
||||
+ * AUDI_CONTENTS0: { RSV, HB2, HB1, RSV }
|
||||
+ * AUDI_CONTENTS1: { PB3, PB2, PB1, PB0 }
|
||||
+ * AUDI_CONTENTS2: { PB7, PB6, PB5, PB4 }
|
||||
+ *
|
||||
+ * PB0: CheckSum
|
||||
+ * PB1: | CT3 | CT2 | CT1 | CT0 | F13 | CC2 | CC1 | CC0 |
|
||||
+ * PB2: | F27 | F26 | F25 | SF2 | SF1 | SF0 | SS1 | SS0 |
|
||||
+ * PB3: | F37 | F36 | F35 | F34 | F33 | F32 | F31 | F30 |
|
||||
+ * PB4: | CA7 | CA6 | CA5 | CA4 | CA3 | CA2 | CA1 | CA0 |
|
||||
+ * PB5: | DM_INH | LSV3 | LSV2 | LSV1 | LSV0 | F52 | F51 | F50 |
|
||||
+ * PB6~PB10: Reserved
|
||||
+ *
|
||||
+ * AUDI_CONTENTS0 default value defined by HDMI specification,
|
||||
+ * and shall only be changed for debug purposes.
|
||||
+ */
|
||||
+ u32 header_bytes = (DW_HDMI_QP_AUDIO_INFOFRAME_HB1 << 8) |
|
||||
+ (DW_HDMI_QP_AUDIO_INFOFRAME_HB2 << 16);
|
||||
+
|
||||
+ regmap_bulk_write(hdmi->regm, PKT_AUDI_CONTENTS0, &header_bytes, 1);
|
||||
+ regmap_bulk_write(hdmi->regm, PKT_AUDI_CONTENTS1, &buffer[3], 1);
|
||||
+ regmap_bulk_write(hdmi->regm, PKT_AUDI_CONTENTS2, &buffer[4], 1);
|
||||
+
|
||||
+ /* Enable ACR, AUDI, AMD */
|
||||
+ dw_hdmi_qp_mod(hdmi,
|
||||
+ PKTSCHED_ACR_TX_EN | PKTSCHED_AUDI_TX_EN | PKTSCHED_AMD_TX_EN,
|
||||
+ PKTSCHED_ACR_TX_EN | PKTSCHED_AUDI_TX_EN | PKTSCHED_AMD_TX_EN,
|
||||
+ PKTSCHED_PKT_EN);
|
||||
+
|
||||
+ /* Enable AUDS */
|
||||
+ dw_hdmi_qp_mod(hdmi, PKTSCHED_AUDS_TX_EN, PKTSCHED_AUDS_TX_EN, PKTSCHED_PKT_EN);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void dw_hdmi_qp_bridge_atomic_enable(struct drm_bridge *bridge,
|
||||
struct drm_bridge_state *old_state)
|
||||
{
|
||||
@@ -382,6 +851,7 @@ static void dw_hdmi_qp_bridge_atomic_enable(struct drm_bridge *bridge,
|
||||
dev_dbg(hdmi->dev, "%s mode=HDMI rate=%llu\n",
|
||||
__func__, conn_state->hdmi.tmds_char_rate);
|
||||
op_mode = 0;
|
||||
+ hdmi->tmds_char_rate = conn_state->hdmi.tmds_char_rate;
|
||||
} else {
|
||||
dev_dbg(hdmi->dev, "%s mode=DVI\n", __func__);
|
||||
op_mode = OPMODE_DVI;
|
||||
@@ -400,6 +870,8 @@ static void dw_hdmi_qp_bridge_atomic_disable(struct drm_bridge *bridge,
|
||||
{
|
||||
struct dw_hdmi_qp *hdmi = bridge->driver_private;
|
||||
|
||||
+ hdmi->tmds_char_rate = 0;
|
||||
+
|
||||
hdmi->phy.ops->disable(hdmi, hdmi->phy.data);
|
||||
}
|
||||
|
||||
@@ -455,6 +927,13 @@ static int dw_hdmi_qp_bridge_clear_infoframe(struct drm_bridge *bridge,
|
||||
dw_hdmi_qp_mod(hdmi, 0, PKTSCHED_DRMI_TX_EN, PKTSCHED_PKT_EN);
|
||||
break;
|
||||
|
||||
+ case HDMI_INFOFRAME_TYPE_AUDIO:
|
||||
+ dw_hdmi_qp_mod(hdmi, 0,
|
||||
+ PKTSCHED_ACR_TX_EN |
|
||||
+ PKTSCHED_AUDS_TX_EN |
|
||||
+ PKTSCHED_AUDI_TX_EN,
|
||||
+ PKTSCHED_PKT_EN);
|
||||
+ break;
|
||||
default:
|
||||
dev_dbg(hdmi->dev, "Unsupported infoframe type %x\n", type);
|
||||
}
|
||||
@@ -477,6 +956,9 @@ static int dw_hdmi_qp_bridge_write_infoframe(struct drm_bridge *bridge,
|
||||
case HDMI_INFOFRAME_TYPE_DRM:
|
||||
return dw_hdmi_qp_config_drm_infoframe(hdmi, buffer, len);
|
||||
|
||||
+ case HDMI_INFOFRAME_TYPE_AUDIO:
|
||||
+ return dw_hdmi_qp_config_audio_infoframe(hdmi, buffer, len);
|
||||
+
|
||||
default:
|
||||
dev_dbg(hdmi->dev, "Unsupported infoframe type %x\n", type);
|
||||
return 0;
|
||||
@@ -494,6 +976,9 @@ static const struct drm_bridge_funcs dw_hdmi_qp_bridge_funcs = {
|
||||
.hdmi_tmds_char_rate_valid = dw_hdmi_qp_bridge_tmds_char_rate_valid,
|
||||
.hdmi_clear_infoframe = dw_hdmi_qp_bridge_clear_infoframe,
|
||||
.hdmi_write_infoframe = dw_hdmi_qp_bridge_write_infoframe,
|
||||
+ .hdmi_audio_startup = dw_hdmi_qp_audio_enable,
|
||||
+ .hdmi_audio_shutdown = dw_hdmi_qp_audio_disable,
|
||||
+ .hdmi_audio_prepare = dw_hdmi_qp_audio_prepare,
|
||||
};
|
||||
|
||||
static irqreturn_t dw_hdmi_qp_main_hardirq(int irq, void *dev_id)
|
||||
@@ -603,6 +1088,10 @@ struct dw_hdmi_qp *dw_hdmi_qp_bind(struct platform_device *pdev,
|
||||
if (IS_ERR(hdmi->bridge.ddc))
|
||||
return ERR_CAST(hdmi->bridge.ddc);
|
||||
|
||||
+ hdmi->bridge.hdmi_audio_max_i2s_playback_channels = 8;
|
||||
+ hdmi->bridge.hdmi_audio_dev = dev;
|
||||
+ hdmi->bridge.hdmi_audio_dai_port = 1;
|
||||
+
|
||||
ret = devm_drm_bridge_add(dev, &hdmi->bridge);
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: amazingfate <liujianfeng1994@gmail.com>
|
||||
Date: Thu, 26 Dec 2024 21:47:15 +0100
|
||||
Subject: [ARCHEOLOGY] rockchip64-6.13: add hdmi1 support to rock5b
|
||||
|
||||
> X-Git-Archeology: - Revision 12bb4ea7dfd695901aba31ae4b5260398c932a17: https://github.com/armbian/build/commit/12bb4ea7dfd695901aba31ae4b5260398c932a17
|
||||
> X-Git-Archeology: Date: Thu, 26 Dec 2024 21:47:15 +0100
|
||||
> X-Git-Archeology: From: amazingfate <liujianfeng1994@gmail.com>
|
||||
> X-Git-Archeology: Subject: rockchip64-6.13: add hdmi1 support to rock5b
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 44 +++++++++-
|
||||
1 file changed, 42 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -49,6 +49,17 @@ hdmi0_con_in: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
+ hdmi1-con {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi1_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi1_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
@@ -220,10 +231,32 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
+&hdmi1 {
|
||||
+ pinctrl-0 = <&hdmim0_tx1_cec &hdmim0_tx1_hpd
|
||||
+ &hdmim1_tx1_scl &hdmim1_tx1_sda>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi1_in {
|
||||
+ hdmi1_in_vp1: endpoint {
|
||||
+ remote-endpoint = <&vp1_out_hdmi1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi1_out {
|
||||
+ hdmi1_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi1_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hdptxphy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
@@ -896,11 +929,11 @@ &usb_host2_xhci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&vop_mmu {
|
||||
+&vop {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
-&vop {
|
||||
+&vop_mmu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -910,3 +943,10 @@ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
remote-endpoint = <&hdmi0_in_vp0>;
|
||||
};
|
||||
};
|
||||
+
|
||||
+&vp1 {
|
||||
+ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI1>;
|
||||
+ remote-endpoint = <&hdmi1_in_vp1>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jianfeng Liu <liujianfeng1994@gmail.com>
|
||||
Date: Sat, 15 Feb 2025 23:10:42 +0800
|
||||
Subject: arm64: dts: rockchip: add hdmi1 support to ROCK 5 ITX
|
||||
|
||||
Enable the HDMI port next to ethernet port.
|
||||
|
||||
Signed-off-by: Jianfeng Liu <liujianfeng1994@gmail.com>
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts | 49 ++++++++++
|
||||
1 file changed, 49 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5-itx.dts
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/pinctrl/rockchip.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "dt-bindings/usb/pd.h"
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
@@ -89,6 +90,17 @@ fan0: pwm-fan {
|
||||
pwms = <&pwm14 0 10000 0>;
|
||||
};
|
||||
|
||||
+ hdmi1-con {
|
||||
+ compatible = "hdmi-connector";
|
||||
+ type = "a";
|
||||
+
|
||||
+ port {
|
||||
+ hdmi1_con_in: endpoint {
|
||||
+ remote-endpoint = <&hdmi1_out_con>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
/* M.2 E-KEY */
|
||||
sdio_pwrseq: sdio-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
@@ -261,6 +273,28 @@ &gpu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hdmi1 {
|
||||
+ pinctrl-0 = <&hdmim0_tx1_cec &hdmim0_tx1_hpd
|
||||
+ &hdmim1_tx1_scl &hdmim1_tx1_sda>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi1_in {
|
||||
+ hdmi1_in_vp1: endpoint {
|
||||
+ remote-endpoint = <&vp1_out_hdmi1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi1_out {
|
||||
+ hdmi1_out_con: endpoint {
|
||||
+ remote-endpoint = <&hdmi1_con_in>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdptxphy1 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
@@ -1208,3 +1242,18 @@ &usbdp_phy1 {
|
||||
rockchip,dp-lane-mux = <2 3>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&vop {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp1 {
|
||||
+ vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI1>;
|
||||
+ remote-endpoint = <&hdmi1_in_vp1>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jianfeng Liu <liujianfeng1994@gmail.com>
|
||||
Date: Thu, 6 Jun 2024 23:28:01 +0800
|
||||
Subject: arm64: dts: rockchip: Add HDMI support to ArmSoM Sige7
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts | 30 ++++++++++
|
||||
1 file changed, 30 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
+#include <dt-bindings/soc/rockchip,vop2.h>
|
||||
#include "rk3588.dtsi"
|
||||
|
||||
/ {
|
||||
@@ -164,6 +165,20 @@ &gpu {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&hdmi0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&hdmi0_in {
|
||||
+ hdmi0_in_vp0: endpoint {
|
||||
+ remote-endpoint = <&vp0_out_hdmi0>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdptxphy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&i2c0 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&i2c0m2_xfer>;
|
||||
@@ -723,3 +738,18 @@ &usb_host1_xhci {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&vop {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vop_mmu {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&vp0 {
|
||||
+ vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
|
||||
+ reg = <ROCKCHIP_VOP2_EP_HDMI0>;
|
||||
+ remote-endpoint = <&hdmi0_in_vp0>;
|
||||
+ };
|
||||
+};
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jianfeng Liu <liujianfeng1994@gmail.com>
|
||||
Date: Thu, 6 Jun 2024 23:29:39 +0800
|
||||
Subject: arm64: dts: rockchip: Add ap6275p wireless support to ArmSoM Sige7
|
||||
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts | 16 ++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-armsom-sige7.dts
|
||||
@@ -283,6 +283,22 @@ &pcie2x1l0 {
|
||||
&pcie2x1l1 {
|
||||
reset-gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
+
|
||||
+ pcie@0,0 {
|
||||
+ reg = <0x300000 0 0 0 0>;
|
||||
+ #address-cells = <3>;
|
||||
+ #size-cells = <2>;
|
||||
+ ranges;
|
||||
+ device_type = "pci";
|
||||
+ bus-range = <0x30 0x3f>;
|
||||
+
|
||||
+ wifi: wifi@0,0 {
|
||||
+ compatible = "pci14e4,449d";
|
||||
+ reg = <0x310000 0 0 0 0>;
|
||||
+ clocks = <&hym8563>;
|
||||
+ clock-names = "lpo";
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
/* phy0 - left ethernet port */
|
||||
--
|
||||
Armbian
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aleksey Komarov <q4arus@ya.ru>
|
||||
Date: Sat, 8 Mar 2025 19:43:05 +0100
|
||||
Subject: [ARCHEOLOGY] Enable HDMI audio outputs for Rock 5B by
|
||||
detlev.casanova@collabora.com
|
||||
|
||||
> X-Git-Archeology: > recovered message: > https://lore.kernel.org/all/20250217215641.372723-4-detlev.casanova@collabora.com/
|
||||
> X-Git-Archeology: - Revision bf9ffa6eedd5df804e3f9a86c84e00607289cd59: https://github.com/armbian/build/commit/bf9ffa6eedd5df804e3f9a86c84e00607289cd59
|
||||
> X-Git-Archeology: Date: Sat, 08 Mar 2025 19:43:05 +0100
|
||||
> X-Git-Archeology: From: Aleksey Komarov <q4arus@ya.ru>
|
||||
> X-Git-Archeology: Subject: Enable HDMI audio outputs for Rock 5B by detlev.casanova@collabora.com
|
||||
> X-Git-Archeology:
|
||||
---
|
||||
arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 16 ++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
index 111111111111..222222222222 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
|
||||
@@ -231,6 +231,10 @@ hdmi0_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
+&hdmi0_sound {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&hdmi1 {
|
||||
pinctrl-0 = <&hdmim0_tx1_cec &hdmim0_tx1_hpd
|
||||
&hdmim1_tx1_scl &hdmim1_tx1_sda>;
|
||||
@@ -249,6 +253,10 @@ hdmi1_out_con: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
+&hdmi1_sound {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&hdptxphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -351,6 +359,14 @@ i2s0_8ch_p0_0: endpoint {
|
||||
};
|
||||
};
|
||||
|
||||
+&i2s5_8ch {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&i2s6_8ch {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
&package_thermal {
|
||||
polling-delay = <1000>;
|
||||
|
||||
--
|
||||
Armbian
|
||||
|
||||
Reference in New Issue
Block a user