Add support for SM8150 and SM8250 DSI.
Subsystems (5)
v2 cover Add support for SM8150 and SM8250 DSI.
Note I haven't tested SM8150 recently, but DSI is almost identical to SM8250.
v2:
- added workaround for 5GHz max_rate overflowing in 32-bit builds (based on robclark's suggestion)
- Updated Kconfig option to mention SM8250 and not just SM8150
Jonathan Marek (3):
drm/msm/dsi: remove unused clk_pre/clk_post in msm_dsi_dphy_timing drm/msm/dsi: add DSI config for sm8150 and sm8250 drm/msm/dsi: add support for 7nm DSI PHY/PLL
.../devicetree/bindings/display/msm/dsi.txt | 6 +- drivers/gpu/drm/msm/Kconfig | 8 + drivers/gpu/drm/msm/Makefile | 2 + drivers/gpu/drm/msm/dsi/dsi.h | 2 + drivers/gpu/drm/msm/dsi/dsi.xml.h | 423 ++++++++ drivers/gpu/drm/msm/dsi/dsi_cfg.c | 5 +- drivers/gpu/drm/msm/dsi/dsi_cfg.h | 2 + drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 102 ++ drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 6 +- drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 255 +++++ drivers/gpu/drm/msm/dsi/pll/dsi_pll.c | 4 + drivers/gpu/drm/msm/dsi/pll/dsi_pll.h | 10 + drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c | 904 ++++++++++++++++++ 13 files changed, 1724 insertions(+), 5 deletions(-) create mode 100644 drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c create mode 100644 drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c
Signature · 1 line
2.26.1
PATCH v2 1/3 drm/msm/dsi: remove unused clk_pre/clk_post in msm_dsi_dphy_timing
The clk_pre/clk_post values in shared_timings are used instead, and these are unused.
--- drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/msm/dsi/phy/dsi_phy.h +0 -2
@@ -50,8 +50,6 @@ extern const struct msm_dsi_phy_cfg dsi_phy_10nm_cfgs;extern const struct msm_dsi_phy_cfg dsi_phy_10nm_8998_cfgs;struct msm_dsi_dphy_timing { -u32 clk_pre; -u32 clk_post;u32 clk_zero;u32 clk_trail;u32 clk_prepare;
Signature · 1 line
2.26.1
PATCH v2 2/3 drm/msm/dsi: add DSI config for sm8150 and sm8250
In reply to Jonathan MarekThis allows DSI driver to work with sm8150 and sm8250. The sdm845 config is re-used as the config is the same.
--- drivers/gpu/drm/msm/dsi/dsi_cfg.c | 5 ++++- drivers/gpu/drm/msm/dsi/dsi_cfg.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/msm/dsi/dsi_cfg.c +4 -1
@@ -265,9 +265,12 @@ static const struct msm_dsi_cfg_handler dsi_cfg_handlers[] = { &msm8998_dsi_cfg, &msm_dsi_6g_v2_host_ops}, {MSM_DSI_VER_MAJOR_6G ,MSM_DSI_6G_VER_MINOR_V2_2_1 , &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_3_0, + &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, + {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_0, + &sdm845_dsi_cfg, &msm_dsi_6g_v2_host_ops}, {MSM_DSI_VER_MAJOR_6G, MSM_DSI_6G_VER_MINOR_V2_4_1, &sc7180_dsi_cfg, &msm_dsi_6g_v2_host_ops}, - };const struct msm_dsi_cfg_handler *msm_dsi_cfg_get (u32 major,u32 minor)
drivers/gpu/drm/msm/dsi/dsi_cfg.h +2 -0
@@ -21,6 +21,8 @@#define MSM_DSI_6G_VER_MINOR_V2_1_0 0x20010000#define MSM_DSI_6G_VER_MINOR_V2_2_0 0x20000000#define MSM_DSI_6G_VER_MINOR_V2_2_1 0x20020001 +#define MSM_DSI_6G_VER_MINOR_V2_3_0 0x20030000 +#define MSM_DSI_6G_VER_MINOR_V2_4_0 0x20040000#define MSM_DSI_6G_VER_MINOR_V2_4_1 0x20040001#define MSM_DSI_V2_VER_MINOR_8064 0x0
Signature · 1 line
2.26.1
PATCH v2 3/3 drm/msm/dsi: add support for 7nm DSI PHY/PLL
In reply to Jonathan MarekThis adds support for the 7nm ("V4") DSI PHY/PLL for sm8150 and sm8250.
Implementation is based on 10nm driver, but updated based on the downstream 7nm driver.
--- .../devicetree/bindings/display/msm/dsi.txt | 6 +- drivers/gpu/drm/msm/Kconfig | 8 + drivers/gpu/drm/msm/Makefile | 2 + drivers/gpu/drm/msm/dsi/dsi.h | 2 + drivers/gpu/drm/msm/dsi/dsi.xml.h | 423 ++++++++ drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 102 ++ drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 4 + drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c | 255 +++++ drivers/gpu/drm/msm/dsi/pll/dsi_pll.c | 4 + drivers/gpu/drm/msm/dsi/pll/dsi_pll.h | 10 + drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c | 904 ++++++++++++++++++ 11 files changed, 1718 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c create mode 100644 drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c
Documentation/devicetree/bindings/display/msm/dsi.txt +4 -2
@@ -90,6 +90,8 @@ Required properties: * "qcom,dsi-phy-14nm-660" * "qcom,dsi-phy-10nm" * "qcom,dsi-phy-10nm-8998" + * "qcom,dsi-phy-7nm" + * "qcom,dsi-phy-7nm-8150" - reg: Physical base address and length of the registers of PLL, PHY. Some revisions require the PHY regulator base address, whereas others require the PHY lane base address. See below for each PHY revision.
@@ -98,7 +100,7 @@ Required properties: * "dsi_pll" * "dsi_phy" * "dsi_phy_regulator" - For DSI 14nm and 10nm PHYs: + For DSI 14nm, 10nm and 7nm PHYs: * "dsi_pll" * "dsi_phy" * "dsi_phy_lane"
@@ -116,7 +118,7 @@ Required properties: - vcca-supply: phandle to vcca regulator device node For 14nm PHY: - vcca-supply: phandle to vcca regulator device node - For 10nm PHY: + For 10nm and 7nm PHY: - vdds-supply: phandle to vdds regulator device node Optional properties:
drivers/gpu/drm/msm/Kconfig +8 -0
@@ -110,3 +110,11 @@ config DRM_MSM_DSI_10NM_PHY default y help Choose this option if DSI PHY on SDM845 is used on the platform. + +config DRM_MSM_DSI_7NM_PHY + bool "Enable DSI 7nm PHY driver in MSM DRM (used by SM8150/SM8250)" + depends on DRM_MSM_DSI + default y + help + Choose this option if DSI PHY on SM8150/SM8250 is used on the + platform.
drivers/gpu/drm/msm/Makefile +2 -0
@@ -119,6 +119,7 @@ msm-$(CONFIG_DRM_MSM_DSI_20NM_PHY) += dsi/phy/dsi_phy_20nm.o msm-$(CONFIG_DRM_MSM_DSI_28NM_8960_PHY) += dsi/phy/dsi_phy_28nm_8960.o msm-$(CONFIG_DRM_MSM_DSI_14NM_PHY) += dsi/phy/dsi_phy_14nm.o msm-$(CONFIG_DRM_MSM_DSI_10NM_PHY) += dsi/phy/dsi_phy_10nm.o +msm-$(CONFIG_DRM_MSM_DSI_7NM_PHY) += dsi/phy/dsi_phy_7nm.o ifeq ($(CONFIG_DRM_MSM_DSI_PLL),y) msm-y += dsi/pll/dsi_pll.o
@@ -126,6 +127,7 @@ msm-$(CONFIG_DRM_MSM_DSI_28NM_PHY) += dsi/pll/dsi_pll_28nm.o msm-$(CONFIG_DRM_MSM_DSI_28NM_8960_PHY) += dsi/pll/dsi_pll_28nm_8960.o msm-$(CONFIG_DRM_MSM_DSI_14NM_PHY) += dsi/pll/dsi_pll_14nm.o msm-$(CONFIG_DRM_MSM_DSI_10NM_PHY) += dsi/pll/dsi_pll_10nm.o +msm-$(CONFIG_DRM_MSM_DSI_7NM_PHY) += dsi/pll/dsi_pll_7nm.o endif obj-$(CONFIG_DRM_MSM) += msm.o
drivers/gpu/drm/msm/dsi/dsi.h +2 -0
@@ -30,6 +30,8 @@ enum msm_dsi_phy_type {MSM_DSI_PHY_28NM_8960 ,MSM_DSI_PHY_14NM ,MSM_DSI_PHY_10NM , +MSM_DSI_PHY_7NM , +MSM_DSI_PHY_7NM_V4_1 , MSM_DSI_PHY_MAX };
drivers/gpu/drm/msm/dsi/dsi.xml.h +423 -0
428 lines not on this page · raw message
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +102 -0
114 lines not on this page · raw message
drivers/gpu/drm/msm/dsi/phy/dsi_phy.h +4 -0
@@ -48,6 +48,8 @@ extern const struct msm_dsi_phy_cfg dsi_phy_14nm_cfgs;extern const struct msm_dsi_phy_cfg dsi_phy_14nm_660_cfgs;extern const struct msm_dsi_phy_cfg dsi_phy_10nm_cfgs;extern const struct msm_dsi_phy_cfg dsi_phy_10nm_8998_cfgs; +extern const struct msm_dsi_phy_cfg dsi_phy_7nm_cfgs; +extern const struct msm_dsi_phy_cfg dsi_phy_7nm_8150_cfgs;struct msm_dsi_dphy_timing {u32 clk_zero;
@@ -100,6 +102,8 @@ int msm_dsi_dphy_timing_calc_v2(struct msm_dsi_dphy_timing *timing, struct msm_dsi_phy_clk_request *clk_req);int msm_dsi_dphy_timing_calc_v3 (struct msm_dsi_dphy_timing *timing,struct msm_dsi_phy_clk_request *clk_req); +int msm_dsi_dphy_timing_calc_v4 (struct msm_dsi_dphy_timing *timing, +struct msm_dsi_phy_clk_request *clk_req);void msm_dsi_phy_set_src_pll (struct msm_dsi_phy *phy,int pll_id,u32 reg,u32 bit_mask);int msm_dsi_phy_init_common (struct msm_dsi_phy *phy);
drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c new file +255 -0
255 lines not on this page · raw message
drivers/gpu/drm/msm/dsi/pll/dsi_pll.c +4 -0
@@ -161,6 +161,10 @@ struct msm_dsi_pll *msm_dsi_pll_init(struct platform_device *pdev,case MSM_DSI_PHY_10NM : pll =msm_dsi_pll_10nm_init (pdev, id);break ; +case MSM_DSI_PHY_7NM : +case MSM_DSI_PHY_7NM_V4_1 : + pll =msm_dsi_pll_7nm_init (pdev, id); +break ;default : pll =ERR_PTR (-ENXIO );break ;
drivers/gpu/drm/msm/dsi/pll/dsi_pll.h +10 -0
@@ -116,5 +116,15 @@ msm_dsi_pll_10nm_init(struct platform_device *pdev, int id)return ERR_PTR (-ENODEV ); }#endif +#ifdef CONFIG_DRM_MSM_DSI_7NM_PHY +struct msm_dsi_pll *msm_dsi_pll_7nm_init (struct platform_device *pdev,int id); +#else +static inline struct msm_dsi_pll * +msm_dsi_pll_7nm_init (struct platform_device *pdev,int id) +{ +return ERR_PTR (-ENODEV ); +} +#endif +#endif /* __DSI_PLL_H__ */
drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c new file +904 -0
904 lines not on this page · raw message
Signature · 1 line
2.26.1