* [PATCH v4 03/10] dt-bindings: display/msm: Document Nord MDSS
2026-12-03 10:36 [PATCH v4 00/10] Add Qualcomm Nord display and eDP PHY support Nabige Aala
2026-12-03 10:36 ` [PATCH v4 01/10] dt-bindings: phy: qcom,edp-phy: Add DP PHY compatible for Nord Nabige Aala
2026-12-03 10:36 ` [PATCH v4 02/10] dt-bindings: display: msm: dp-controller: Document Nord DisplayPort Controller Nabige Aala
@ 2026-12-03 10:36 ` Nabige Aala
2026-12-03 10:55 ` sashiko-bot
2026-12-03 10:36 ` [PATCH v4 04/10] dt-bindings: display/msm: qcom,sm8650-dpu: Add Qualcomm Nord Soc Nabige Aala
` (6 subsequent siblings)
9 siblings, 1 reply; 17+ messages in thread
From: Nabige Aala @ 2026-12-03 10:36 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Kuogee Hsieh,
Shawn Guo
Cc: Ritesh Kumar, Mahadevan P, Nabige Aala, linux-arm-msm, linux-phy,
devicetree, linux-kernel, dri-devel, freedreno
From: Mahadevan P <mahadevan.p@oss.qualcomm.com>
Nord has a new MDSS 12.1 revision with DPU 1499A and two independent,
DP-only display interface controllers (no DSI), which no existing
schema describes. Add a dedicated qcom,nord-mdss binding to document.
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
Signed-off-by: Nabige Aala <nabige.aala@oss.qualcomm.com>
---
.../bindings/display/msm/qcom,nord-mdss.yaml | 403 +++++++++++++++++++++
1 file changed, 403 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/msm/qcom,nord-mdss.yaml b/Documentation/devicetree/bindings/display/msm/qcom,nord-mdss.yaml
new file mode 100644
index 000000000000..203678dae683
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/msm/qcom,nord-mdss.yaml
@@ -0,0 +1,403 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/msm/qcom,nord-mdss.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Nord display subsystem (MDSS)
+
+maintainers:
+ - Mahadevan P <mahadevan.p@oss.qualcomm.com>
+
+description:
+ Nord display subsystem consists of MDSS (display controller), DPU 1499A
+ (display processing unit), and display interface controllers (DP only, no DSI).
+ This is MDSS 12.1, DP-only, with 2 independent DP controllers.
+
+$ref: /schemas/display/msm/mdss-common.yaml#
+
+properties:
+ compatible:
+ const: qcom,nord-mdss
+
+ clocks:
+ items:
+ - description: Display AHB
+ - description: Display hf AXI
+ - description: Display core
+
+ clock-names:
+ items:
+ - const: iface
+ - const: bus
+ - const: core
+
+ iommus:
+ maxItems: 1
+
+ interconnects:
+ items:
+ - description: Interconnect path from mdp0 port to the data bus
+ - description: Interconnect path from CPU to the reg bus
+
+ interconnect-names:
+ items:
+ - const: mdp0-mem
+ - const: cpu-cfg
+
+patternProperties:
+ "^display-controller@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+ properties:
+ compatible:
+ const: qcom,nord-dpu
+ required:
+ - compatible
+
+ "^displayport-controller@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+ properties:
+ compatible:
+ contains:
+ const: qcom,nord-dp
+ required:
+ - compatible
+
+ "^phy@[0-9a-f]+$":
+ type: object
+ additionalProperties: true
+ properties:
+ compatible:
+ const: qcom,nord-dp-phy
+ required:
+ - compatible
+
+required:
+ - compatible
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,nord-dispcc.h>
+ #include <dt-bindings/clock/qcom,nord-nwgcc.h>
+ #include <dt-bindings/clock/qcom,nord-tcsrcc.h>
+ #include <dt-bindings/interconnect/qcom,icc.h>
+ #include <dt-bindings/interconnect/qcom,nord-rpmh.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/power/qcom,rpmhpd.h>
+
+ display-subsystem@ae00000 {
+ compatible = "qcom,nord-mdss";
+ reg = <0x0ae00000 0x1000>;
+ reg-names = "mdss";
+
+ power-domains = <&dispcc0 MDSS_DISP_CC_MDSS_CORE_GDSC>;
+ clocks = <&dispcc0 MDSS_DISP_CC_MDSS_AHB_CLK>,
+ <&nwgcc NW_GCC_DISP_0_HF_AXI_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_MDP_CLK>;
+ clock-names = "iface", "bus", "core";
+ resets = <&dispcc0 MDSS_DISP_CC_MDSS_CORE_BCR>;
+
+ interconnects = <&mmss_noc MASTER_MDP0 QCOM_ICC_TAG_ALWAYS
+ &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>,
+ <&hscnoc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY
+ &config_noc SLAVE_DISPLAY_CFG QCOM_ICC_TAG_ACTIVE_ONLY>;
+ interconnect-names = "mdp0-mem", "cpu-cfg";
+
+ interrupts = <GIC_SPI 930 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ iommus = <&apps_smmu_1 0x3e0 0x2>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ display-controller@ae01000 {
+ compatible = "qcom,nord-dpu";
+ reg = <0x0ae01000 0x8f000>,
+ <0x0aeb0000 0x3000>;
+ reg-names = "mdp", "vbif";
+
+ clocks = <&nwgcc NW_GCC_DISP_0_HF_AXI_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_MDP_LUT_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_MDP_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_VSYNC_CLK>;
+ clock-names = "nrt_bus", "iface", "lut", "core", "vsync";
+
+ assigned-clocks = <&dispcc0 MDSS_DISP_CC_MDSS_VSYNC_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ operating-points-v2 = <&mdp_opp_table>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ dpu_intf0_out: endpoint {
+ remote-endpoint = <&mdss_dp0_in>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ dpu_intf4_out: endpoint {
+ remote-endpoint = <&mdss_dp1_in>;
+ };
+ };
+ };
+
+ mdp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-417000000 {
+ opp-hz = /bits/ 64 <417000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-532000000 {
+ opp-hz = /bits/ 64 <532000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+
+ opp-650000000 {
+ opp-hz = /bits/ 64 <650000000>;
+ required-opps = <&rpmhpd_opp_turbo>;
+ };
+
+ opp-710000000 {
+ opp-hz = /bits/ 64 <710000000>;
+ required-opps = <&rpmhpd_opp_turbo_l1>;
+ };
+ };
+ };
+
+ displayport-controller@af54000 {
+ compatible = "qcom,nord-dp", "qcom,sa8775p-dp";
+
+ reg = <0xaf54000 0x200>,
+ <0xaf54200 0x200>,
+ <0xaf55000 0xc00>,
+ <0xaf56000 0x400>,
+ <0xaf57000 0x400>,
+ <0xaf58000 0x400>,
+ <0xaf59000 0x400>,
+ <0xaf5a000 0x600>,
+ <0xaf5b000 0x600>;
+
+ clocks = <&dispcc0 MDSS_DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_AUX_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_LINK_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_LINK_INTF_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_PIXEL0_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_PIXEL1_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_PIXEL2_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_PIXEL3_CLK>;
+ clock-names = "core_iface", "core_aux",
+ "ctrl_link", "ctrl_link_iface",
+ "stream_pixel", "stream_1_pixel",
+ "stream_2_pixel", "stream_3_pixel";
+
+ assigned-clocks = <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_LINK_CLK_SRC>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_PIXEL0_CLK_SRC>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_PIXEL1_CLK_SRC>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_PIXEL2_CLK_SRC>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_PIXEL3_CLK_SRC>;
+ assigned-clock-parents = <&dp0_phy 0>,
+ <&dp0_phy 1>,
+ <&dp0_phy 1>,
+ <&dp0_phy 1>,
+ <&dp0_phy 1>;
+
+ interrupt-parent = <&mdss>;
+ interrupts = <12>;
+
+ phys = <&dp0_phy>;
+ phy-names = "dp";
+
+ operating-points-v2 = <&dp_opp_table>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ #sound-dai-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dp0_in: endpoint {
+ remote-endpoint = <&dpu_intf0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ mdss_dp0_out: endpoint { };
+ };
+ };
+
+ dp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-162000000 {
+ opp-hz = /bits/ 64 <162000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-270000000 {
+ opp-hz = /bits/ 64 <270000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-540000000 {
+ opp-hz = /bits/ 64 <540000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-810000000 {
+ opp-hz = /bits/ 64 <810000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+ };
+
+ displayport-controller@af5c000 {
+ compatible = "qcom,nord-dp", "qcom,sa8775p-dp";
+
+ reg = <0xaf5c000 0x200>,
+ <0xaf5c200 0x200>,
+ <0xaf5d000 0xc00>,
+ <0xaf5e000 0x400>,
+ <0xaf5f000 0x400>,
+ <0xaf60000 0x400>,
+ <0xaf61000 0x400>,
+ <0xaf62000 0x600>,
+ <0xaf63000 0x600>;
+
+ clocks = <&dispcc0 MDSS_DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_AUX_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_LINK_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_LINK_INTF_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_PIXEL0_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_PIXEL1_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_PIXEL2_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_PIXEL3_CLK>;
+ clock-names = "core_iface", "core_aux",
+ "ctrl_link", "ctrl_link_iface",
+ "stream_pixel", "stream_1_pixel",
+ "stream_2_pixel", "stream_3_pixel";
+
+ assigned-clocks = <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_LINK_CLK_SRC>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_PIXEL0_CLK_SRC>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_PIXEL1_CLK_SRC>;
+ assigned-clock-parents = <&dp1_phy 0>,
+ <&dp1_phy 1>,
+ <&dp1_phy 1>;
+
+ interrupt-parent = <&mdss>;
+ interrupts = <13>;
+
+ phys = <&dp1_phy>;
+ phy-names = "dp";
+
+ operating-points-v2 = <&dp1_opp_table>;
+ power-domains = <&rpmhpd RPMHPD_MMCX>;
+
+ #sound-dai-cells = <0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ mdss_dp1_in: endpoint {
+ remote-endpoint = <&dpu_intf4_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ mdss_dp1_out: endpoint { };
+ };
+ };
+
+ dp1_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-162000000 {
+ opp-hz = /bits/ 64 <162000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-270000000 {
+ opp-hz = /bits/ 64 <270000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-540000000 {
+ opp-hz = /bits/ 64 <540000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-810000000 {
+ opp-hz = /bits/ 64 <810000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+ };
+ };
+
+ dp0_phy: phy@fc3a00 {
+ compatible = "qcom,nord-dp-phy";
+
+ reg = <0xfc3a00 0x1d0>,
+ <0xfc3200 0x128>,
+ <0xfc3600 0x128>,
+ <0xfc3000 0x200>;
+
+ clocks = <&dispcc0 MDSS_DISP_CC_MDSS_DPTX0_AUX_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_AHB_CLK>,
+ <&tcsrcc TCSR_DP_TX_0_CLKREF_EN>;
+ clock-names = "aux", "cfg_ahb", "ref";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ power-domains = <&rpmhpd RPMHPD_MX>;
+ };
+
+ dp1_phy: phy@fc6a00 {
+ compatible = "qcom,nord-dp-phy";
+
+ reg = <0xfc6a00 0x200>,
+ <0xfc6200 0xd0>,
+ <0xfc6600 0xd0>,
+ <0xfc6000 0x1c8>;
+
+ clocks = <&dispcc0 MDSS_DISP_CC_MDSS_DPTX1_AUX_CLK>,
+ <&dispcc0 MDSS_DISP_CC_MDSS_AHB_CLK>,
+ <&tcsrcc TCSR_DP_TX_1_CLKREF_EN>;
+ clock-names = "aux", "cfg_ahb", "ref";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ power-domains = <&rpmhpd RPMHPD_MX>;
+ };
+ };
--
2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v4 06/10] drm/msm/dpu: Add support for DPU 12.1 on Nord
2026-12-03 10:36 [PATCH v4 00/10] Add Qualcomm Nord display and eDP PHY support Nabige Aala
` (4 preceding siblings ...)
2026-12-03 10:36 ` [PATCH v4 05/10] drm/msm/dpu: Add missing INTF_9/INTF_10 interrupts Nabige Aala
@ 2026-12-03 10:36 ` Nabige Aala
2026-12-03 10:59 ` sashiko-bot
2026-12-03 10:36 ` [PATCH v4 09/10] phy: qcom: edp: Generalize power-on path for per-SoC overrides Nabige Aala
` (3 subsequent siblings)
9 siblings, 1 reply; 17+ messages in thread
From: Nabige Aala @ 2026-12-03 10:36 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Kuogee Hsieh,
Shawn Guo
Cc: Ritesh Kumar, Mahadevan P, Nabige Aala, linux-arm-msm, linux-phy,
devicetree, linux-kernel, dri-devel, freedreno
From: Mahadevan P <mahadevan.p@oss.qualcomm.com>
Add the DPU catalog entry for the Qualcomm Nord SoC (MDSS 12.1, DPU
1499A). Nord is DP-only with no DSI, and provides 8 DSPP blocks, 2
writeback blocks, 8 interfaces and 2 DP controllers.
Signed-off-by: Mahadevan P <mahadevan.p@oss.qualcomm.com>
Signed-off-by: Nabige Aala <nabige.aala@oss.qualcomm.com>
---
.../gpu/drm/msm/disp/dpu1/catalog/dpu_12_1_nord.h | 544 +++++++++++++++++++++
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 1 +
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 1 +
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 +
4 files changed, 547 insertions(+)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_1_nord.h b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_1_nord.h
new file mode 100644
index 000000000000..333eccb5c603
--- /dev/null
+++ b/drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_12_1_nord.h
@@ -0,0 +1,544 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2026 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#ifndef _DPU_12_1_NORD_H
+#define _DPU_12_1_NORD_H
+
+
+static const struct dpu_caps nord_dpu_caps = {
+ .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
+ .max_mixer_blendstages = 0xb,
+ .has_src_split = true,
+ .has_dim_layer = true,
+ .has_idle_pc = true,
+ .has_3d_merge = true,
+ .max_linewidth = 8192,
+ .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
+};
+
+static const struct dpu_mdp_cfg nord_mdp = {
+ .name = "top_0",
+ .base = 0, .len = 0x494,
+ .clk_ctrls = {
+ [DPU_CLK_CTRL_REG_DMA] = { .reg_off = 0x2bc, .bit_off = 20 },
+ },
+};
+
+static const struct dpu_ctl_cfg nord_ctl[] = {
+ {
+ .name = "ctl_0", .id = CTL_0,
+ .base = 0x15000, .len = 0x1000,
+ .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 9),
+ }, {
+ .name = "ctl_1", .id = CTL_1,
+ .base = 0x16000, .len = 0x1000,
+ .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 10),
+ }, {
+ .name = "ctl_2", .id = CTL_2,
+ .base = 0x17000, .len = 0x1000,
+ .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 11),
+ }, {
+ .name = "ctl_3", .id = CTL_3,
+ .base = 0x18000, .len = 0x1000,
+ .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 12),
+ }, {
+ .name = "ctl_4", .id = CTL_4,
+ .base = 0x19000, .len = 0x1000,
+ .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 13),
+ }, {
+ .name = "ctl_5", .id = CTL_5,
+ .base = 0x1a000, .len = 0x1000,
+ .intr_start = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 23),
+ },
+};
+
+static const struct dpu_sspp_cfg nord_sspp[] = {
+ {
+ .name = "sspp_0", .id = SSPP_VIG0,
+ .base = 0x4000, .len = 0x344,
+ .features = VIG_SDM845_MASK_SDMA,
+ .sblk = &dpu_vig_sblk_qseed3_3_4,
+ .xin_id = 0,
+ .type = SSPP_TYPE_VIG,
+ }, {
+ .name = "sspp_1", .id = SSPP_VIG1,
+ .base = 0x6000, .len = 0x344,
+ .features = VIG_SDM845_MASK_SDMA,
+ .sblk = &dpu_vig_sblk_qseed3_3_4,
+ .xin_id = 4,
+ .type = SSPP_TYPE_VIG,
+ }, {
+ .name = "sspp_2", .id = SSPP_VIG2,
+ .base = 0x8000, .len = 0x344,
+ .features = VIG_SDM845_MASK_SDMA,
+ .sblk = &dpu_vig_sblk_qseed3_3_4,
+ .xin_id = 8,
+ .type = SSPP_TYPE_VIG,
+ }, {
+ .name = "sspp_3", .id = SSPP_VIG3,
+ .base = 0xa000, .len = 0x344,
+ .features = VIG_SDM845_MASK_SDMA,
+ .sblk = &dpu_vig_sblk_qseed3_3_4,
+ .xin_id = 12,
+ .type = SSPP_TYPE_VIG,
+ }, {
+ .name = "sspp_8", .id = SSPP_DMA0,
+ .base = 0x24000, .len = 0x344,
+ .features = DMA_SDM845_MASK_SDMA,
+ .sblk = &dpu_dma_sblk,
+ .xin_id = 1,
+ .type = SSPP_TYPE_DMA,
+ }, {
+ .name = "sspp_9", .id = SSPP_DMA1,
+ .base = 0x26000, .len = 0x344,
+ .features = DMA_SDM845_MASK_SDMA,
+ .sblk = &dpu_dma_sblk,
+ .xin_id = 5,
+ .type = SSPP_TYPE_DMA,
+ }, {
+ .name = "sspp_10", .id = SSPP_DMA2,
+ .base = 0x28000, .len = 0x344,
+ .features = DMA_SDM845_MASK_SDMA,
+ .sblk = &dpu_dma_sblk,
+ .xin_id = 9,
+ .type = SSPP_TYPE_DMA,
+ }, {
+ .name = "sspp_11", .id = SSPP_DMA3,
+ .base = 0x2a000, .len = 0x344,
+ .features = DMA_SDM845_MASK_SDMA,
+ .sblk = &dpu_dma_sblk,
+ .xin_id = 13,
+ .type = SSPP_TYPE_DMA,
+ }, {
+ .name = "sspp_12", .id = SSPP_DMA4,
+ .base = 0x2c000, .len = 0x344,
+ .features = DMA_CURSOR_SDM845_MASK_SDMA,
+ .sblk = &dpu_dma_sblk,
+ .xin_id = 14,
+ .type = SSPP_TYPE_DMA,
+ }, {
+ .name = "sspp_13", .id = SSPP_DMA5,
+ .base = 0x2e000, .len = 0x344,
+ .features = DMA_CURSOR_SDM845_MASK_SDMA,
+ .sblk = &dpu_dma_sblk,
+ .xin_id = 15,
+ .type = SSPP_TYPE_DMA,
+ },
+};
+
+static const struct dpu_lm_cfg nord_lm[] = {
+ {
+ .name = "lm_0", .id = LM_0,
+ .base = 0x44000, .len = 0x400,
+ .features = MIXER_MSM8998_MASK,
+ .sblk = &sm8750_lm_sblk,
+ .lm_pair = LM_1,
+ .pingpong = PINGPONG_0,
+ .dspp = DSPP_0,
+ }, {
+ .name = "lm_1", .id = LM_1,
+ .base = 0x45000, .len = 0x400,
+ .features = MIXER_MSM8998_MASK,
+ .sblk = &sm8750_lm_sblk,
+ .lm_pair = LM_0,
+ .pingpong = PINGPONG_1,
+ .dspp = DSPP_1,
+ }, {
+ .name = "lm_2", .id = LM_2,
+ .base = 0x46000, .len = 0x400,
+ .features = MIXER_MSM8998_MASK,
+ .sblk = &sm8750_lm_sblk,
+ .lm_pair = LM_3,
+ .pingpong = PINGPONG_2,
+ .dspp = DSPP_2,
+ }, {
+ .name = "lm_3", .id = LM_3,
+ .base = 0x47000, .len = 0x400,
+ .features = MIXER_MSM8998_MASK,
+ .sblk = &sm8750_lm_sblk,
+ .lm_pair = LM_2,
+ .pingpong = PINGPONG_3,
+ .dspp = DSPP_3,
+ }, {
+ .name = "lm_4", .id = LM_4,
+ .base = 0x48000, .len = 0x400,
+ .features = MIXER_MSM8998_MASK,
+ .sblk = &sm8750_lm_sblk,
+ .lm_pair = LM_5,
+ .pingpong = PINGPONG_4,
+ .dspp = DSPP_4,
+ }, {
+ .name = "lm_5", .id = LM_5,
+ .base = 0x49000, .len = 0x400,
+ .features = MIXER_MSM8998_MASK,
+ .sblk = &sm8750_lm_sblk,
+ .lm_pair = LM_4,
+ .pingpong = PINGPONG_5,
+ .dspp = DSPP_5,
+ }, {
+ .name = "lm_6", .id = LM_6,
+ .base = 0x4a000, .len = 0x400,
+ .features = MIXER_MSM8998_MASK,
+ .sblk = &sm8750_lm_sblk,
+ .lm_pair = LM_7,
+ .pingpong = PINGPONG_6,
+ .dspp = DSPP_6,
+ }, {
+ .name = "lm_7", .id = LM_7,
+ .base = 0x4b000, .len = 0x400,
+ .features = MIXER_MSM8998_MASK,
+ .sblk = &sm8750_lm_sblk,
+ .lm_pair = LM_6,
+ .pingpong = PINGPONG_7,
+ .dspp = DSPP_7,
+ },
+};
+
+static const struct dpu_dspp_cfg nord_dspp[] = {
+ {
+ .name = "dspp_0", .id = DSPP_0,
+ .base = 0x54000, .len = 0x1800,
+ .sblk = &sm8750_dspp_sblk,
+ }, {
+ .name = "dspp_1", .id = DSPP_1,
+ .base = 0x56000, .len = 0x1800,
+ .sblk = &sm8750_dspp_sblk,
+ }, {
+ .name = "dspp_2", .id = DSPP_2,
+ .base = 0x58000, .len = 0x1800,
+ .sblk = &sm8750_dspp_sblk,
+ }, {
+ .name = "dspp_3", .id = DSPP_3,
+ .base = 0x5a000, .len = 0x1800,
+ .sblk = &sm8750_dspp_sblk,
+ }, {
+ .name = "dspp_4", .id = DSPP_4,
+ .base = 0x5c000, .len = 0x1800,
+ .sblk = &sm8750_dspp_sblk,
+ }, {
+ .name = "dspp_5", .id = DSPP_5,
+ .base = 0x5e000, .len = 0x1800,
+ .sblk = &sm8750_dspp_sblk,
+ }, {
+ .name = "dspp_6", .id = DSPP_6,
+ .base = 0x60000, .len = 0x1800,
+ .sblk = &sm8750_dspp_sblk,
+ }, {
+ .name = "dspp_7", .id = DSPP_7,
+ .base = 0x62000, .len = 0x1800,
+ .sblk = &sm8750_dspp_sblk,
+ },
+};
+
+static const struct dpu_pingpong_cfg nord_pp[] = {
+ {
+ .name = "pingpong_0", .id = PINGPONG_0,
+ .base = 0x69000, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_0,
+ .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 8),
+ }, {
+ .name = "pingpong_1", .id = PINGPONG_1,
+ .base = 0x6a000, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_0,
+ .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 9),
+ }, {
+ .name = "pingpong_2", .id = PINGPONG_2,
+ .base = 0x6b000, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_1,
+ .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 10),
+ }, {
+ .name = "pingpong_3", .id = PINGPONG_3,
+ .base = 0x6c000, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_1,
+ .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 11),
+ }, {
+ .name = "pingpong_4", .id = PINGPONG_4,
+ .base = 0x6d000, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_2,
+ .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 30),
+ }, {
+ .name = "pingpong_5", .id = PINGPONG_5,
+ .base = 0x6e000, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_2,
+ .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 31),
+ }, {
+ .name = "pingpong_6", .id = PINGPONG_6,
+ .base = 0x6f000, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_3,
+ .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 20),
+ }, {
+ .name = "pingpong_7", .id = PINGPONG_7,
+ .base = 0x70000, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_3,
+ .intr_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 21),
+ }, {
+ .name = "pingpong_cwb_0", .id = PINGPONG_CWB_0,
+ .base = 0x66000, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_4,
+ }, {
+ .name = "pingpong_cwb_1", .id = PINGPONG_CWB_1,
+ .base = 0x66400, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_4,
+ }, {
+ .name = "pingpong_cwb_2", .id = PINGPONG_CWB_2,
+ .base = 0x7e000, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_5,
+ }, {
+ .name = "pingpong_cwb_3", .id = PINGPONG_CWB_3,
+ .base = 0x7e400, .len = 0,
+ .sblk = &sc7280_pp_sblk,
+ .merge_3d = MERGE_3D_5,
+ },
+};
+
+static const struct dpu_merge_3d_cfg nord_merge_3d[] = {
+ {
+ .name = "merge_3d_0", .id = MERGE_3D_0,
+ .base = 0x4e000, .len = 0x1c,
+ }, {
+ .name = "merge_3d_1", .id = MERGE_3D_1,
+ .base = 0x4f000, .len = 0x1c,
+ }, {
+ .name = "merge_3d_2", .id = MERGE_3D_2,
+ .base = 0x50000, .len = 0x1c,
+ }, {
+ .name = "merge_3d_3", .id = MERGE_3D_3,
+ .base = 0x51000, .len = 0x1c,
+ }, {
+ .name = "merge_3d_4", .id = MERGE_3D_4,
+ .base = 0x66700, .len = 0x1c,
+ }, {
+ .name = "merge_3d_5", .id = MERGE_3D_5,
+ .base = 0x7e700, .len = 0x1c,
+ },
+};
+
+static const struct dpu_dsc_cfg nord_dsc[] = {
+ {
+ .name = "dce_0_0", .id = DSC_0,
+ .base = 0x80000, .len = 0x8,
+ .features = BIT(DPU_DSC_NATIVE_42x_EN),
+ .sblk = &sm8750_dsc_sblk_0,
+ }, {
+ .name = "dce_0_1", .id = DSC_1,
+ .base = 0x80000, .len = 0x8,
+ .features = BIT(DPU_DSC_NATIVE_42x_EN),
+ .sblk = &sm8750_dsc_sblk_1,
+ }, {
+ .name = "dce_1_0", .id = DSC_2,
+ .base = 0x81000, .len = 0x8,
+ .features = BIT(DPU_DSC_NATIVE_42x_EN),
+ .sblk = &sm8750_dsc_sblk_0,
+ }, {
+ .name = "dce_1_1", .id = DSC_3,
+ .base = 0x81000, .len = 0x8,
+ .features = BIT(DPU_DSC_NATIVE_42x_EN),
+ .sblk = &sm8750_dsc_sblk_1,
+ }, {
+ .name = "dce_2_0", .id = DSC_4,
+ .base = 0x82000, .len = 0x8,
+ .features = BIT(DPU_DSC_NATIVE_42x_EN),
+ .sblk = &sm8750_dsc_sblk_0,
+ }, {
+ .name = "dce_2_1", .id = DSC_5,
+ .base = 0x82000, .len = 0x8,
+ .features = BIT(DPU_DSC_NATIVE_42x_EN),
+ .sblk = &sm8750_dsc_sblk_1,
+ }, {
+ .name = "dce_3_0", .id = DSC_6,
+ .base = 0x83000, .len = 0x8,
+ .features = BIT(DPU_DSC_NATIVE_42x_EN),
+ .sblk = &sm8750_dsc_sblk_0,
+ }, {
+ .name = "dce_3_1", .id = DSC_7,
+ .base = 0x83000, .len = 0x8,
+ .features = BIT(DPU_DSC_NATIVE_42x_EN),
+ .sblk = &sm8750_dsc_sblk_1,
+ },
+};
+
+static const struct dpu_wb_cfg nord_wb[] = {
+ {
+ .name = "wb_1", .id = WB_1,
+ .base = 0x64800, .len = 0x2c8,
+ .features = WB_SDM845_MASK,
+ .format_list = wb2_formats_rgb_yuv,
+ .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv),
+ .xin_id = 7,
+ .maxlinewidth = 4096,
+ .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 3),
+ }, {
+ .name = "wb_2", .id = WB_2,
+ .base = 0x65000, .len = 0x2c8,
+ .features = WB_SDM845_MASK,
+ .format_list = wb2_formats_rgb_yuv,
+ .num_formats = ARRAY_SIZE(wb2_formats_rgb_yuv),
+ .xin_id = 6,
+ .maxlinewidth = 4096,
+ .intr_wb_done = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 4),
+ },
+};
+
+static const struct dpu_cwb_cfg nord_cwb[] = {
+ {
+ .name = "cwb_0", .id = CWB_0,
+ .base = 0x66200, .len = 0x20,
+ },
+ {
+ .name = "cwb_1", .id = CWB_1,
+ .base = 0x66600, .len = 0x20,
+ },
+ {
+ .name = "cwb_2", .id = CWB_2,
+ .base = 0x7e200, .len = 0x20,
+ },
+ {
+ .name = "cwb_3", .id = CWB_3,
+ .base = 0x7e600, .len = 0x20,
+ },
+};
+
+static const struct dpu_intf_cfg nord_intf[] = {
+ {
+ .name = "intf_0", .id = INTF_0,
+ .base = 0x34000, .len = 0x4bc,
+ .type = INTF_DP,
+ .controller_id = MSM_DP_CONTROLLER_0,
+ .prog_fetch_lines_worst_case = 24,
+ .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 24),
+ .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 25),
+ }, {
+ .name = "intf_3", .id = INTF_3,
+ .base = 0x37000, .len = 0x4bc,
+ .type = INTF_DP,
+ .controller_id = MSM_DP_CONTROLLER_0,
+ .prog_fetch_lines_worst_case = 24,
+ .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 30),
+ .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 31),
+ }, {
+ .name = "intf_4", .id = INTF_4,
+ .base = 0x38000, .len = 0x4bc,
+ .type = INTF_DP,
+ .controller_id = MSM_DP_CONTROLLER_1,
+ .prog_fetch_lines_worst_case = 24,
+ .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 20),
+ .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 21),
+ }, {
+ .name = "intf_6", .id = INTF_6,
+ .base = 0x3a000, .len = 0x4bc,
+ .type = INTF_DP,
+ .controller_id = MSM_DP_CONTROLLER_0,
+ .prog_fetch_lines_worst_case = 24,
+ .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 22),
+ .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR, 23),
+ }, {
+ .name = "intf_7", .id = INTF_7,
+ .base = 0x3b000, .len = 0x4bc,
+ .type = INTF_DP,
+ .controller_id = MSM_DP_CONTROLLER_0,
+ .prog_fetch_lines_worst_case = 24,
+ .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 0),
+ .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 1),
+ }, {
+ .name = "intf_8", .id = INTF_8,
+ .base = 0x3c000, .len = 0x4bc,
+ .type = INTF_DP,
+ .controller_id = MSM_DP_CONTROLLER_1,
+ .prog_fetch_lines_worst_case = 24,
+ .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 2),
+ .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 3),
+ }, {
+ .name = "intf_9", .id = INTF_9,
+ .base = 0x3d000, .len = 0x4bc,
+ .type = INTF_DP,
+ .controller_id = MSM_DP_CONTROLLER_1,
+ .prog_fetch_lines_worst_case = 24,
+ .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 4),
+ .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 5),
+ }, {
+ .name = "intf_10", .id = INTF_10,
+ .base = 0x3e000, .len = 0x4bc,
+ .type = INTF_DP,
+ .controller_id = MSM_DP_CONTROLLER_1,
+ .prog_fetch_lines_worst_case = 24,
+ .intr_underrun = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 6),
+ .intr_vsync = DPU_IRQ_IDX(MDP_SSPP_TOP0_INTR2, 7),
+ },
+};
+
+static const struct dpu_perf_cfg nord_perf_data = {
+ .max_bw_low = 18900000,
+ .max_bw_high = 28500000,
+ .min_core_ib = 2500000,
+ .min_llcc_ib = 0,
+ .min_dram_ib = 800000,
+ .min_prefill_lines = 35,
+ .danger_lut_tbl = {0x3ffff, 0x3ffff, 0x0},
+ .safe_lut_tbl = {0xfe00, 0xfe00, 0xffff},
+ .qos_lut_tbl = {
+ {.nentry = ARRAY_SIZE(sc7180_qos_linear),
+ .entries = sc7180_qos_linear
+ },
+ {.nentry = ARRAY_SIZE(sc7180_qos_macrotile),
+ .entries = sc7180_qos_macrotile
+ },
+ {.nentry = ARRAY_SIZE(sc7180_qos_nrt),
+ .entries = sc7180_qos_nrt
+ },
+ },
+ .cdp_cfg = {
+ {.rd_enable = 1, .wr_enable = 1},
+ {.rd_enable = 1, .wr_enable = 0}
+ },
+ .clk_inefficiency_factor = 105,
+ .bw_inefficiency_factor = 120,
+};
+
+static const struct dpu_mdss_version nord_mdss_ver = {
+ .core_major_ver = 12,
+ .core_minor_ver = 1,
+};
+
+const struct dpu_mdss_cfg dpu_nord_cfg = {
+ .mdss_ver = &nord_mdss_ver,
+ .caps = &nord_dpu_caps,
+ .mdp = &nord_mdp,
+ .cdm = &dpu_cdm_5_x,
+ .ctl_count = ARRAY_SIZE(nord_ctl),
+ .ctl = nord_ctl,
+ .sspp_count = ARRAY_SIZE(nord_sspp),
+ .sspp = nord_sspp,
+ .mixer_count = ARRAY_SIZE(nord_lm),
+ .mixer = nord_lm,
+ .dspp_count = ARRAY_SIZE(nord_dspp),
+ .dspp = nord_dspp,
+ .pingpong_count = ARRAY_SIZE(nord_pp),
+ .pingpong = nord_pp,
+ .dsc_count = ARRAY_SIZE(nord_dsc),
+ .dsc = nord_dsc,
+ .merge_3d_count = ARRAY_SIZE(nord_merge_3d),
+ .merge_3d = nord_merge_3d,
+ .wb_count = ARRAY_SIZE(nord_wb),
+ .wb = nord_wb,
+ .cwb_count = ARRAY_SIZE(nord_cwb),
+ .cwb = nord_cwb,
+ .intf_count = ARRAY_SIZE(nord_intf),
+ .intf = nord_intf,
+ .vbif = &sm8650_vbif,
+ .perf = &nord_perf_data,
+};
+
+#endif
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
index 9a993cdfab85..63f3029d09fa 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
@@ -796,6 +796,7 @@ static const struct dpu_qos_lut_entry sc7180_qos_nrt[] = {
#include "catalog/dpu_10_2_milos.h"
#include "catalog/dpu_12_0_sm8750.h"
+#include "catalog/dpu_12_1_nord.h"
#include "catalog/dpu_12_2_glymur.h"
#include "catalog/dpu_12_4_eliza.h"
#include "catalog/dpu_13_0_kaanapali.h"
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
index f45faf87333e..bfbc8207ad9a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
@@ -772,6 +772,7 @@ extern const struct dpu_mdss_cfg dpu_msm8937_cfg;
extern const struct dpu_mdss_cfg dpu_msm8953_cfg;
extern const struct dpu_mdss_cfg dpu_msm8996_cfg;
extern const struct dpu_mdss_cfg dpu_msm8998_cfg;
+extern const struct dpu_mdss_cfg dpu_nord_cfg;
extern const struct dpu_mdss_cfg dpu_sar2130p_cfg;
extern const struct dpu_mdss_cfg dpu_sdm630_cfg;
extern const struct dpu_mdss_cfg dpu_sdm660_cfg;
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index da3556eb6ecc..a91d4a1af94e 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -1489,6 +1489,7 @@ static const struct of_device_id dpu_dt_match[] = {
{ .compatible = "qcom,msm8953-mdp5", .data = &dpu_msm8953_cfg, },
{ .compatible = "qcom,msm8996-mdp5", .data = &dpu_msm8996_cfg, },
{ .compatible = "qcom,msm8998-dpu", .data = &dpu_msm8998_cfg, },
+ { .compatible = "qcom,nord-dpu", .data = &dpu_nord_cfg, },
{ .compatible = "qcom,qcm2290-dpu", .data = &dpu_qcm2290_cfg, },
{ .compatible = "qcom,sa8775p-dpu", .data = &dpu_sa8775p_cfg, },
{ .compatible = "qcom,sar2130p-dpu", .data = &dpu_sar2130p_cfg, },
--
2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v4 09/10] phy: qcom: edp: Generalize power-on path for per-SoC overrides
2026-12-03 10:36 [PATCH v4 00/10] Add Qualcomm Nord display and eDP PHY support Nabige Aala
` (5 preceding siblings ...)
2026-12-03 10:36 ` [PATCH v4 06/10] drm/msm/dpu: Add support for DPU 12.1 on Nord Nabige Aala
@ 2026-12-03 10:36 ` Nabige Aala
2026-12-03 11:03 ` sashiko-bot
2026-12-03 10:36 ` [PATCH v4 10/10] phy: qcom: edp: Add Nord DP PHY support Nabige Aala
` (2 subsequent siblings)
9 siblings, 1 reply; 17+ messages in thread
From: Nabige Aala @ 2026-12-03 10:36 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Kuogee Hsieh,
Shawn Guo
Cc: Ritesh Kumar, Mahadevan P, Nabige Aala, linux-arm-msm, linux-phy,
devicetree, linux-kernel, dri-devel, freedreno, Balaji Kalkonda
From: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>
Add tx_res_config() and set_voltages() callbacks to phy_ver_ops so SoCs
with different register layouts can override TX resistor calibration and
TX drive-level writes independently.
Move the TX_BAND and RES_CODE/TX_EMP writes out of the common power-on
path into qcom_edp_tx_res_config_default(), which is assigned to all
existing SoC operations tables. Likewise, dispatch set_voltages()
through the operations pointer before falling back to the default
TXn_TX_DRV_LVL writes.
Add phy_status_reg, tx2_tx3_lane_ctl and bias1_en_2lane fields to
qcom_edp_phy_cfg so the power-on path takes register offsets and the
two-lane bias value from the per-SoC configuration instead of using
hardcoded constants. Populate the fields for all existing SoCs with the
current values to preserve their behavior.
[BK: added per-SoC voltage and DCC hooks, with calibration performed
after PHY readiness and before clock setup]
Signed-off-by: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>
Signed-off-by: Nabige Aala <nabige.aala@oss.qualcomm.com>
Signed-off-by: Balaji Kalkonda <balaji.kalkonda@oss.qualcomm.com>
---
drivers/phy/qualcomm/phy-qcom-edp.c | 66 +++++++++++++++++++++++++++++--------
1 file changed, 53 insertions(+), 13 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
index a3c893f72908..11d9d55b1e73 100644
--- a/drivers/phy/qualcomm/phy-qcom-edp.c
+++ b/drivers/phy/qualcomm/phy-qcom-edp.c
@@ -82,6 +82,9 @@ struct phy_ver_ops {
int (*com_configure_pll)(const struct qcom_edp *edp);
int (*com_configure_ssc)(const struct qcom_edp *edp);
int (*com_ldo_config)(const struct qcom_edp *edp);
+ int (*tx_res_config)(const struct qcom_edp *edp);
+ int (*set_voltages)(struct qcom_edp *edp, u8 swing, u8 emph);
+ int (*dcc_calibrate)(const struct qcom_edp *edp);
};
struct qcom_edp_phy_cfg {
@@ -91,6 +94,9 @@ struct qcom_edp_phy_cfg {
const struct qcom_edp_swing_pre_emph_cfg *dp_swing_pre_emph_cfg;
const struct qcom_edp_swing_pre_emph_cfg *edp_swing_pre_emph_cfg;
const struct phy_ver_ops *ver_ops;
+ u32 phy_status_reg;
+ u8 bias1_en_2lane;
+ u32 tx2_tx3_lane_ctl;
};
struct qcom_edp {
@@ -383,6 +389,9 @@ static int qcom_edp_set_voltages(struct qcom_edp *edp, const struct phy_configur
if (ret)
return ret;
+ if (edp->cfg->ver_ops->set_voltages)
+ return edp->cfg->ver_ops->set_voltages(edp, swing, emph);
+
writel(swing, edp->tx0 + TXn_TX_DRV_LVL);
writel(emph, edp->tx0 + TXn_TX_EMP_POST1_LVL);
@@ -645,6 +654,20 @@ static int qcom_edp_ldo_config_v4(const struct qcom_edp *edp)
return 0;
}
+static int qcom_edp_tx_res_config_default(const struct qcom_edp *edp)
+{
+ writel(0x04, edp->tx0 + TXn_TX_BAND);
+ writel(0x04, edp->tx1 + TXn_TX_BAND);
+ writel(0x11, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX0);
+ writel(0x11, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX1);
+ writel(0x11, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX0);
+ writel(0x11, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX1);
+ writel(0x10, edp->tx0 + TXn_TX_EMP_POST1_LVL);
+ writel(0x10, edp->tx1 + TXn_TX_EMP_POST1_LVL);
+
+ return 0;
+}
+
static const struct phy_ver_ops qcom_edp_phy_ops_v3 = {
.com_power_on = qcom_edp_phy_power_on_v4,
.com_resetsm_cntrl = qcom_edp_phy_com_resetsm_cntrl_v4,
@@ -653,6 +676,7 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v3 = {
.com_configure_pll = qcom_edp_com_configure_pll_v4,
.com_configure_ssc = qcom_edp_com_configure_ssc_v4,
.com_ldo_config = qcom_edp_ldo_config_v3,
+ .tx_res_config = qcom_edp_tx_res_config_default,
};
static const struct phy_ver_ops qcom_edp_phy_ops_v4 = {
@@ -663,6 +687,7 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v4 = {
.com_configure_pll = qcom_edp_com_configure_pll_v4,
.com_configure_ssc = qcom_edp_com_configure_ssc_v4,
.com_ldo_config = qcom_edp_ldo_config_v4,
+ .tx_res_config = qcom_edp_tx_res_config_default,
};
static const struct qcom_edp_phy_cfg sa8775p_dp_phy_cfg = {
@@ -672,6 +697,8 @@ static const struct qcom_edp_phy_cfg sa8775p_dp_phy_cfg = {
.dp_swing_pre_emph_cfg = &dp_phy_swing_pre_emph_cfg,
.edp_swing_pre_emph_cfg = &edp_phy_swing_pre_emph_cfg,
.ver_ops = &qcom_edp_phy_ops_v4,
+ .phy_status_reg = DP_PHY_STATUS,
+ .tx2_tx3_lane_ctl = DP_PHY_TX2_TX3_LANE_CTL,
};
static const struct qcom_edp_phy_cfg sc7280_dp_phy_cfg = {
@@ -680,6 +707,8 @@ static const struct qcom_edp_phy_cfg sc7280_dp_phy_cfg = {
.dp_swing_pre_emph_cfg = &dp_phy_swing_pre_emph_cfg,
.edp_swing_pre_emph_cfg = &edp_phy_swing_pre_emph_cfg_v3,
.ver_ops = &qcom_edp_phy_ops_v3,
+ .phy_status_reg = DP_PHY_STATUS,
+ .tx2_tx3_lane_ctl = DP_PHY_TX2_TX3_LANE_CTL,
};
static const struct qcom_edp_phy_cfg sc8180x_dp_phy_cfg = {
@@ -688,6 +717,8 @@ static const struct qcom_edp_phy_cfg sc8180x_dp_phy_cfg = {
.dp_swing_pre_emph_cfg = &dp_phy_swing_pre_emph_cfg_v2,
.edp_swing_pre_emph_cfg = &edp_phy_swing_pre_emph_cfg_v2,
.ver_ops = &qcom_edp_phy_ops_v3,
+ .phy_status_reg = DP_PHY_STATUS,
+ .tx2_tx3_lane_ctl = DP_PHY_TX2_TX3_LANE_CTL,
};
static const struct qcom_edp_phy_cfg sc8280xp_dp_phy_cfg = {
@@ -696,6 +727,8 @@ static const struct qcom_edp_phy_cfg sc8280xp_dp_phy_cfg = {
.dp_swing_pre_emph_cfg = &dp_phy_swing_pre_emph_cfg,
.edp_swing_pre_emph_cfg = &edp_phy_swing_pre_emph_cfg,
.ver_ops = &qcom_edp_phy_ops_v4,
+ .phy_status_reg = DP_PHY_STATUS,
+ .tx2_tx3_lane_ctl = DP_PHY_TX2_TX3_LANE_CTL,
};
static const struct qcom_edp_phy_cfg sc8280xp_edp_phy_cfg = {
@@ -705,6 +738,8 @@ static const struct qcom_edp_phy_cfg sc8280xp_edp_phy_cfg = {
.dp_swing_pre_emph_cfg = &dp_phy_swing_pre_emph_cfg,
.edp_swing_pre_emph_cfg = &edp_phy_swing_pre_emph_cfg,
.ver_ops = &qcom_edp_phy_ops_v4,
+ .phy_status_reg = DP_PHY_STATUS,
+ .tx2_tx3_lane_ctl = DP_PHY_TX2_TX3_LANE_CTL,
};
static int qcom_edp_phy_power_on_v6(const struct qcom_edp *edp)
@@ -898,6 +933,7 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v6 = {
.com_configure_pll = qcom_edp_com_configure_pll_v6,
.com_configure_ssc = qcom_edp_com_configure_ssc_v6,
.com_ldo_config = qcom_edp_ldo_config_v6,
+ .tx_res_config = qcom_edp_tx_res_config_default,
};
static struct qcom_edp_phy_cfg x1e80100_phy_cfg = {
@@ -906,6 +942,8 @@ static struct qcom_edp_phy_cfg x1e80100_phy_cfg = {
.dp_swing_pre_emph_cfg = &dp_phy_swing_pre_emph_cfg,
.edp_swing_pre_emph_cfg = &edp_phy_swing_pre_emph_cfg,
.ver_ops = &qcom_edp_phy_ops_v6,
+ .phy_status_reg = DP_PHY_STATUS,
+ .tx2_tx3_lane_ctl = DP_PHY_TX2_TX3_LANE_CTL,
};
static int qcom_edp_com_configure_ssc_v8(const struct qcom_edp *edp)
@@ -1031,7 +1069,6 @@ static int qcom_edp_com_configure_pll_v8(const struct qcom_edp *edp)
return 0;
}
-
static int qcom_edp_phy_com_resetsm_cntrl_v8(const struct qcom_edp *edp)
{
u32 val;
@@ -1079,6 +1116,7 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v8 = {
.com_configure_pll = qcom_edp_com_configure_pll_v8,
.com_configure_ssc = qcom_edp_com_configure_ssc_v8,
.com_ldo_config = qcom_edp_ldo_config_v6,
+ .tx_res_config = qcom_edp_tx_res_config_default,
};
static struct qcom_edp_phy_cfg glymur_phy_cfg = {
@@ -1087,6 +1125,8 @@ static struct qcom_edp_phy_cfg glymur_phy_cfg = {
.dp_swing_pre_emph_cfg = &dp_phy_swing_pre_emph_cfg_v8,
.edp_swing_pre_emph_cfg = &edp_phy_swing_pre_emph_cfg,
.ver_ops = &qcom_edp_phy_ops_v8,
+ .phy_status_reg = DP_PHY_STATUS,
+ .tx2_tx3_lane_ctl = DP_PHY_TX2_TX3_LANE_CTL,
};
static int qcom_edp_phy_power_on(struct phy *phy)
@@ -1121,21 +1161,19 @@ static int qcom_edp_phy_power_on(struct phy *phy)
/* TX Lane configuration */
writel(0x05, edp->edp + DP_PHY_TX0_TX1_LANE_CTL);
- writel(0x05, edp->edp + DP_PHY_TX2_TX3_LANE_CTL);
+ writel(0x05, edp->edp + edp->cfg->tx2_tx3_lane_ctl);
/* TX-0 register configuration */
writel(0x03, edp->tx0 + TXn_TRANSCEIVER_BIAS_EN);
writel(0x0f, edp->tx0 + TXn_CLKBUF_ENABLE);
writel(0x03, edp->tx0 + TXn_RESET_TSYNC_EN);
writel(0x01, edp->tx0 + TXn_TRAN_DRVR_EMP_EN);
- writel(0x04, edp->tx0 + TXn_TX_BAND);
/* TX-1 register configuration */
writel(0x03, edp->tx1 + TXn_TRANSCEIVER_BIAS_EN);
writel(0x0f, edp->tx1 + TXn_CLKBUF_ENABLE);
writel(0x03, edp->tx1 + TXn_RESET_TSYNC_EN);
writel(0x01, edp->tx1 + TXn_TRAN_DRVR_EMP_EN);
- writel(0x04, edp->tx1 + TXn_TX_BAND);
ret = qcom_edp_set_vco_div(edp, &pixel_freq);
if (ret)
@@ -1159,13 +1197,9 @@ static int qcom_edp_phy_power_on(struct phy *phy)
writel(0x00, edp->tx1 + TXn_TX_POL_INV);
writel(0x10, edp->tx0 + TXn_TX_DRV_LVL_OFFSET);
writel(0x10, edp->tx1 + TXn_TX_DRV_LVL_OFFSET);
- writel(0x11, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX0);
- writel(0x11, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX1);
- writel(0x11, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX0);
- writel(0x11, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX1);
-
- writel(0x10, edp->tx0 + TXn_TX_EMP_POST1_LVL);
- writel(0x10, edp->tx1 + TXn_TX_EMP_POST1_LVL);
+ ret = edp->cfg->ver_ops->tx_res_config(edp);
+ if (ret)
+ return ret;
writel(0x1f, edp->tx0 + TXn_TX_DRV_LVL);
writel(0x1f, edp->tx1 + TXn_TX_DRV_LVL);
@@ -1177,7 +1211,7 @@ static int qcom_edp_phy_power_on(struct phy *phy)
cfg1 = 0x1;
} else if (edp->dp_opts.lanes == 2) {
bias0_en = 0x03;
- bias1_en = 0x00;
+ bias1_en = edp->cfg->bias1_en_2lane;
drvr0_en = 0x04;
drvr1_en = 0x07;
cfg1 = 0x3;
@@ -1200,11 +1234,17 @@ static int qcom_edp_phy_power_on(struct phy *phy)
writel(0x19, edp->edp + DP_PHY_CFG);
- ret = readl_poll_timeout(edp->edp + DP_PHY_STATUS,
+ ret = readl_poll_timeout(edp->edp + edp->cfg->phy_status_reg,
val, val & BIT(1), 500, 10000);
if (ret)
return ret;
+ if (edp->cfg->ver_ops->dcc_calibrate) {
+ ret = edp->cfg->ver_ops->dcc_calibrate(edp);
+ if (ret)
+ return ret;
+ }
+
clk_set_rate(edp->dp_link_hw.clk, edp->dp_opts.link_rate * 100000);
clk_set_rate(edp->dp_pixel_hw.clk, pixel_freq);
--
2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v4 10/10] phy: qcom: edp: Add Nord DP PHY support
2026-12-03 10:36 [PATCH v4 00/10] Add Qualcomm Nord display and eDP PHY support Nabige Aala
` (6 preceding siblings ...)
2026-12-03 10:36 ` [PATCH v4 09/10] phy: qcom: edp: Generalize power-on path for per-SoC overrides Nabige Aala
@ 2026-12-03 10:36 ` Nabige Aala
2026-12-03 11:06 ` sashiko-bot
[not found] ` <20261203-nord-drv-dt-v4-7-a899d23af07a@oss.qualcomm.com>
[not found] ` <20261203-nord-drv-dt-v4-8-a899d23af07a@oss.qualcomm.com>
9 siblings, 1 reply; 17+ messages in thread
From: Nabige Aala @ 2026-12-03 10:36 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson, Rob Clark,
Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang, Sean Paul,
Marijn Suijten, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Kuogee Hsieh,
Shawn Guo
Cc: Ritesh Kumar, Mahadevan P, Nabige Aala, linux-arm-msm, linux-phy,
devicetree, linux-kernel, dri-devel, freedreno, Balaji Kalkonda
From: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>
Add DP PHY support for the Qualcomm Nord SoC. Nord's QSERDES COM block
shares the same register layout as the v6 QSERDES COM, so reuse the
existing QSERDES_V6_COM_* definitions from phy-qcom-qmp-qserdes-com-v6.h
instead of introducing a Nord-specific header.
Add SSC and PLL programming using v6 COM register macros, relocated COM
status polling (DP_PHY_STATUS_NORD, QSERDES_V6_COM_C_READY_STATUS),
voltage-swing and pre-emphasis tables, TX resistor and TX band
configuration, AUX/VCO tables, and the qcom,nord-dp-phy compatible.
Make com_ldo_config optional in the ver_ops dispatch so Nord (which does
not need LDO programming) can leave it NULL without breaking the common
power-on and set-voltages paths.
[BK: integrated Nord-specific DCC handling and link-rate-specific
AUX_CFG2/TX band values]
Signed-off-by: Ritesh Kumar <ritesh.kumar@oss.qualcomm.com>
Signed-off-by: Nabige Aala <nabige.aala@oss.qualcomm.com>
Signed-off-by: Balaji Kalkonda <balaji.kalkonda@oss.qualcomm.com>
---
drivers/phy/qualcomm/phy-qcom-edp.c | 310 +++++++++++++++++++++++++++++++++++-
1 file changed, 304 insertions(+), 6 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
index 11d9d55b1e73..44b2858b2db3 100644
--- a/drivers/phy/qualcomm/phy-qcom-edp.c
+++ b/drivers/phy/qualcomm/phy-qcom-edp.c
@@ -385,9 +385,11 @@ static int qcom_edp_set_voltages(struct qcom_edp *edp, const struct phy_configur
if (swing == 0xff || emph == 0xff)
return -EINVAL;
- ret = edp->cfg->ver_ops->com_ldo_config(edp);
- if (ret)
- return ret;
+ if (edp->cfg->ver_ops->com_ldo_config) {
+ ret = edp->cfg->ver_ops->com_ldo_config(edp);
+ if (ret)
+ return ret;
+ }
if (edp->cfg->ver_ops->set_voltages)
return edp->cfg->ver_ops->set_voltages(edp, swing, emph);
@@ -1142,9 +1144,11 @@ static int qcom_edp_phy_power_on(struct phy *phy)
if (ret)
return ret;
- ret = edp->cfg->ver_ops->com_ldo_config(edp);
- if (ret)
- return ret;
+ if (edp->cfg->ver_ops->com_ldo_config) {
+ ret = edp->cfg->ver_ops->com_ldo_config(edp);
+ if (ret)
+ return ret;
+ }
writel(0x00, edp->tx0 + TXn_LANE_MODE_1);
writel(0x00, edp->tx1 + TXn_LANE_MODE_1);
@@ -1521,6 +1525,299 @@ static int qcom_edp_phy_probe(struct platform_device *pdev)
return PTR_ERR_OR_ZERO(phy_provider);
}
+static const u8 nord_dp_pre_emp_hbr_rbr[4][4] = {
+ { 0x00, 0x0e, 0x15, 0x1a },
+ { 0x00, 0x0e, 0x15, 0xff },
+ { 0x00, 0x0e, 0xff, 0xff },
+ { 0x02, 0xff, 0xff, 0xff },
+};
+
+static const struct qcom_edp_swing_pre_emph_cfg nord_dp_swing_pre_emph_cfg = {
+ .swing_hbr_rbr = &dp_swing_hbr_rbr,
+ .swing_hbr3_hbr2 = &dp_swing_hbr2_hbr3,
+ .pre_emphasis_hbr_rbr = &nord_dp_pre_emp_hbr_rbr,
+ .pre_emphasis_hbr3_hbr2 = &dp_pre_emp_hbr2_hbr3,
+};
+
+/* Nord DP PHY register offsets (relocated from v8 base) */
+#define DP_PHY_TX2_TX3_LANE_CTL_NORD 0x00c0
+#define DP_PHY_STATUS_NORD 0x0110
+#define DP_PHY_TX_LN0_DRV_LVL_NORD 0x00e4
+#define DP_PHY_TX_LN1_DRV_LVL_NORD 0x00e8
+#define TXn_TX_BAND_NORD 0x0024
+#define TXn_DCC0_CTRL_NORD 0x00c8
+#define TXn_DCC1_CTRL_NORD 0x00d0
+#define TXn_DCC_DONE_NORD 0x00e0
+
+static int qcom_edp_com_configure_ssc_nord(const struct qcom_edp *edp)
+{
+ const struct phy_configure_opts_dp *dp_opts = &edp->dp_opts;
+ u32 step1;
+ u32 step2;
+
+ switch (dp_opts->link_rate) {
+ case 1620:
+ step1 = 0x83;
+ step2 = 0x02;
+ break;
+
+ case 2700:
+ case 5400:
+ step1 = 0x18;
+ step2 = 0x02;
+ break;
+
+ case 8100:
+ step1 = 0x5b;
+ step2 = 0x02;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+
+ writel(0x01, edp->pll + QSERDES_V6_COM_SSC_EN_CENTER);
+ writel(0x00, edp->pll + QSERDES_V6_COM_SSC_ADJ_PER1);
+ writel(0x6b, edp->pll + QSERDES_V6_COM_SSC_PER1);
+ writel(0x02, edp->pll + QSERDES_V6_COM_SSC_PER2);
+ writel(step1, edp->pll + QSERDES_V6_COM_SSC_STEP_SIZE1_MODE0);
+ writel(step2, edp->pll + QSERDES_V6_COM_SSC_STEP_SIZE2_MODE0);
+
+ return 0;
+}
+
+static int qcom_edp_com_configure_pll_nord(const struct qcom_edp *edp)
+{
+ const struct phy_configure_opts_dp *dp_opts = &edp->dp_opts;
+ u32 div_frac_start2_mode0;
+ u32 div_frac_start3_mode0;
+ u32 dec_start_mode0;
+ u32 lock_cmp1_mode0;
+ u32 lock_cmp2_mode0;
+ u32 lock_cmp_en;
+ u32 hsclk_sel;
+ u32 code1_mode0;
+ u32 code2_mode0;
+ u32 core_clk_div_mode0 = 0x14;
+
+ switch (dp_opts->link_rate) {
+ case 1620:
+ hsclk_sel = 0x0c;
+ dec_start_mode0 = 0x54;
+ div_frac_start2_mode0 = 0x00;
+ div_frac_start3_mode0 = 0x06;
+ lock_cmp1_mode0 = 0x37;
+ lock_cmp2_mode0 = 0x04;
+ lock_cmp_en = 0x04;
+ code1_mode0 = 0x8d;
+ code2_mode0 = 0x27;
+ break;
+
+ case 2700:
+ hsclk_sel = 0x04;
+ dec_start_mode0 = 0x46;
+ div_frac_start2_mode0 = 0x00;
+ div_frac_start3_mode0 = 0x05;
+ lock_cmp1_mode0 = 0x07;
+ lock_cmp2_mode0 = 0x07;
+ lock_cmp_en = 0x08;
+ code1_mode0 = 0xf6;
+ code2_mode0 = 0x20;
+ break;
+
+ case 5400:
+ hsclk_sel = 0x01;
+ dec_start_mode0 = 0x46;
+ div_frac_start2_mode0 = 0x00;
+ div_frac_start3_mode0 = 0x05;
+ lock_cmp1_mode0 = 0x0f;
+ lock_cmp2_mode0 = 0x0e;
+ lock_cmp_en = 0x08;
+ code1_mode0 = 0xf6;
+ code2_mode0 = 0x20;
+ break;
+
+ case 8100:
+ hsclk_sel = 0x03;
+ dec_start_mode0 = 0x4f;
+ div_frac_start2_mode0 = 0xa0;
+ div_frac_start3_mode0 = 0x01;
+ lock_cmp1_mode0 = 0x17;
+ lock_cmp2_mode0 = 0x15;
+ lock_cmp_en = 0x08;
+ code1_mode0 = 0x14;
+ code2_mode0 = 0x25;
+ core_clk_div_mode0 = 0x0a;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+
+ writel(0x01, edp->pll + QSERDES_V6_COM_SVS_MODE_CLK_SEL);
+ writel(0x0b, edp->pll + QSERDES_V6_COM_SYSCLK_EN_SEL);
+ writel(0x02, edp->pll + QSERDES_V6_COM_SYS_CLK_CTRL);
+ writel(0x0c, edp->pll + QSERDES_V6_COM_CLK_ENABLE1);
+ writel(0x06, edp->pll + QSERDES_V6_COM_SYSCLK_BUF_ENABLE);
+ writel(0x30, edp->pll + QSERDES_V6_COM_CLK_SELECT);
+ writel(hsclk_sel, edp->pll + QSERDES_V6_COM_HSCLK_SEL_1);
+ writel(0x07, edp->pll + QSERDES_V6_COM_PLL_IVCO);
+ writel(lock_cmp_en, edp->pll + QSERDES_V6_COM_LOCK_CMP_EN);
+ writel(0x36, edp->pll + QSERDES_V6_COM_PLL_CCTRL_MODE0);
+ writel(0x16, edp->pll + QSERDES_V6_COM_PLL_RCTRL_MODE0);
+ writel(0x06, edp->pll + QSERDES_V6_COM_CP_CTRL_MODE0);
+ writel(dec_start_mode0, edp->pll + QSERDES_V6_COM_DEC_START_MODE0);
+ writel(0x00, edp->pll + QSERDES_V6_COM_DIV_FRAC_START1_MODE0);
+ writel(div_frac_start2_mode0, edp->pll + QSERDES_V6_COM_DIV_FRAC_START2_MODE0);
+ writel(div_frac_start3_mode0, edp->pll + QSERDES_V6_COM_DIV_FRAC_START3_MODE0);
+ writel(0x12, edp->pll + QSERDES_V6_COM_CMN_CONFIG_1);
+ writel(0x3f, edp->pll + QSERDES_V6_COM_INTEGLOOP_GAIN0_MODE0);
+ writel(0x00, edp->pll + QSERDES_V6_COM_INTEGLOOP_GAIN1_MODE0);
+ writel(0x00, edp->pll + QSERDES_V6_COM_VCO_TUNE_MAP);
+ writel(lock_cmp1_mode0, edp->pll + QSERDES_V6_COM_LOCK_CMP1_MODE0);
+ writel(lock_cmp2_mode0, edp->pll + QSERDES_V6_COM_LOCK_CMP2_MODE0);
+ writel(0x0a, edp->pll + QSERDES_V6_COM_BG_TIMER);
+ writel(core_clk_div_mode0, edp->pll + QSERDES_V6_COM_PLL_CORE_CLK_DIV_MODE0);
+ writel(0x00, edp->pll + QSERDES_V6_COM_VCO_TUNE_CTRL);
+ writel(0x1f, edp->pll + QSERDES_V6_COM_PLL_BIAS_EN_CLK_BUFLR_EN);
+ writel(0x0f, edp->pll + QSERDES_V6_COM_CORE_CLK_EN);
+ writel(0xa0, edp->pll + QSERDES_V6_COM_VCO_TUNE1_MODE0);
+ writel(0x01, edp->pll + QSERDES_V6_COM_VCO_TUNE2_MODE0);
+ writel(code1_mode0, edp->pll + QSERDES_V6_COM_BIN_VCOCAL_CMP_CODE1_MODE0);
+ writel(code2_mode0, edp->pll + QSERDES_V6_COM_BIN_VCOCAL_CMP_CODE2_MODE0);
+
+ return 0;
+}
+
+static const u8 edp_phy_aux_cfg_nord[DP_AUX_CFG_SIZE] = {
+ 0x00, 0x13, 0xa4, 0x00, 0x0a, 0x26, 0x0a, 0x03, 0x37, 0x03, 0x02, 0x02, 0x04,
+};
+
+static const u8 edp_phy_vco_div_cfg_nord[4] = {
+ 0x00, 0x00, 0x02, 0x01,
+};
+
+static int qcom_edp_tx_res_config_nord(const struct qcom_edp *edp)
+{
+ u32 aux_cfg2;
+ u32 tx_band;
+
+ if (edp->dp_opts.link_rate == 8100) {
+ aux_cfg2 = 0xa0;
+ tx_band = 0x07;
+ } else {
+ aux_cfg2 = 0xa4;
+ tx_band = 0x05;
+ }
+
+ writel(aux_cfg2, edp->edp + DP_PHY_AUX_CFG(2));
+ writel(0x06, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX0);
+ writel(0x06, edp->tx0 + TXn_RES_CODE_LANE_OFFSET_TX1);
+ writel(0x06, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX0);
+ writel(0x06, edp->tx1 + TXn_RES_CODE_LANE_OFFSET_TX1);
+ writel(0x06, edp->tx0 + TXn_TX_EMP_POST1_LVL);
+ writel(0x06, edp->tx1 + TXn_TX_EMP_POST1_LVL);
+ writel(tx_band, edp->tx0 + TXn_TX_BAND_NORD);
+ writel(tx_band, edp->tx1 + TXn_TX_BAND_NORD);
+ writel(0x12, edp->edp + DP_PHY_TX_LN0_DRV_LVL_NORD);
+ writel(0x12, edp->edp + DP_PHY_TX_LN1_DRV_LVL_NORD);
+
+ return 0;
+}
+
+static void qcom_edp_dcc_disable_nord(const struct qcom_edp *edp)
+{
+ writel(0x06, edp->tx0 + TXn_DCC0_CTRL_NORD);
+ writel(0x06, edp->tx0 + TXn_DCC1_CTRL_NORD);
+ writel(0x06, edp->tx1 + TXn_DCC0_CTRL_NORD);
+ writel(0x06, edp->tx1 + TXn_DCC1_CTRL_NORD);
+}
+
+static int qcom_edp_dcc_calibrate_nord(const struct qcom_edp *edp)
+{
+ u32 tx0_done = 0;
+ u32 tx1_done = 0;
+ int tx0_ret;
+ int tx1_ret;
+
+ writel(0x07, edp->tx0 + TXn_DCC0_CTRL_NORD);
+ writel(0x07, edp->tx0 + TXn_DCC1_CTRL_NORD);
+ writel(0x07, edp->tx1 + TXn_DCC0_CTRL_NORD);
+ writel(0x07, edp->tx1 + TXn_DCC1_CTRL_NORD);
+
+ usleep_range(200, 250);
+
+ tx0_ret = readl_poll_timeout(edp->tx0 + TXn_DCC_DONE_NORD, tx0_done,
+ (tx0_done & 0x03) == 0x03, 50, 10000);
+ tx1_ret = readl_poll_timeout(edp->tx1 + TXn_DCC_DONE_NORD, tx1_done,
+ (tx1_done & 0x03) == 0x03, 50, 10000);
+
+ qcom_edp_dcc_disable_nord(edp);
+
+ return tx0_ret ?: tx1_ret;
+}
+
+static int qcom_edp_phy_power_on_nord(const struct qcom_edp *edp)
+{
+ u32 val;
+
+ writel(DP_PHY_PD_CTL_PWRDN | DP_PHY_PD_CTL_AUX_PWRDN |
+ DP_PHY_PD_CTL_LANE_0_1_PWRDN | DP_PHY_PD_CTL_LANE_2_3_PWRDN |
+ DP_PHY_PD_CTL_PLL_PWRDN | DP_PHY_PD_CTL_DP_CLAMP_EN,
+ edp->edp + DP_PHY_PD_CTL);
+ writel(0xfc, edp->edp + DP_PHY_MODE);
+
+ qcom_edp_dcc_disable_nord(edp);
+
+ return readl_poll_timeout(edp->pll + QSERDES_V6_COM_CMN_STATUS,
+ val, val & BIT(7), 5, 200);
+}
+
+static int qcom_edp_phy_com_resetsm_cntrl_nord(const struct qcom_edp *edp)
+{
+ u32 val;
+
+ writel(0x20, edp->pll + QSERDES_V6_COM_RESETSM_CNTRL);
+
+ return readl_poll_timeout(edp->pll + QSERDES_V6_COM_C_READY_STATUS,
+ val, val & BIT(0), 500, 10000);
+}
+
+static int qcom_edp_set_voltages_nord(struct qcom_edp *edp, u8 swing, u8 emph)
+{
+ writel(swing, edp->edp + DP_PHY_TX_LN0_DRV_LVL_NORD);
+ writel(emph, edp->tx0 + TXn_TX_EMP_POST1_LVL);
+
+ writel(swing, edp->edp + DP_PHY_TX_LN1_DRV_LVL_NORD);
+ writel(emph, edp->tx1 + TXn_TX_EMP_POST1_LVL);
+
+ return 0;
+}
+
+static const struct phy_ver_ops qcom_edp_phy_ops_nord = {
+ .com_power_on = qcom_edp_phy_power_on_nord,
+ .com_resetsm_cntrl = qcom_edp_phy_com_resetsm_cntrl_nord,
+ .com_bias_en_clkbuflr = qcom_edp_com_bias_en_clkbuflr_v8,
+ .com_clk_fwd_cfg = qcom_edp_com_clk_fwd_cfg_v4,
+ .com_configure_pll = qcom_edp_com_configure_pll_nord,
+ .com_configure_ssc = qcom_edp_com_configure_ssc_nord,
+ .tx_res_config = qcom_edp_tx_res_config_nord,
+ .set_voltages = qcom_edp_set_voltages_nord,
+ .dcc_calibrate = qcom_edp_dcc_calibrate_nord,
+};
+
+static const struct qcom_edp_phy_cfg nord_edp_phy_cfg = {
+ .is_edp = false,
+ .aux_cfg = edp_phy_aux_cfg_nord,
+ .vco_div_cfg = edp_phy_vco_div_cfg_nord,
+ .dp_swing_pre_emph_cfg = &nord_dp_swing_pre_emph_cfg,
+ .edp_swing_pre_emph_cfg = &edp_phy_swing_pre_emph_cfg,
+ .ver_ops = &qcom_edp_phy_ops_nord,
+ .phy_status_reg = DP_PHY_STATUS_NORD,
+ .bias1_en_2lane = 0x03,
+ .tx2_tx3_lane_ctl = DP_PHY_TX2_TX3_LANE_CTL_NORD,
+};
+
static const struct of_device_id qcom_edp_phy_match_table[] = {
{ .compatible = "qcom,glymur-dp-phy", .data = &glymur_phy_cfg, },
{ .compatible = "qcom,sa8775p-edp-phy", .data = &sa8775p_dp_phy_cfg, },
@@ -1529,6 +1826,7 @@ static const struct of_device_id qcom_edp_phy_match_table[] = {
{ .compatible = "qcom,sc8280xp-dp-phy", .data = &sc8280xp_dp_phy_cfg, },
{ .compatible = "qcom,sc8280xp-edp-phy", .data = &sc8280xp_edp_phy_cfg, },
{ .compatible = "qcom,x1e80100-dp-phy", .data = &x1e80100_phy_cfg, },
+ { .compatible = "qcom,nord-dp-phy", .data = &nord_edp_phy_cfg, },
{ }
};
MODULE_DEVICE_TABLE(of, qcom_edp_phy_match_table);
--
2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 17+ messages in thread