drm/sti: add display support on stih418 family
Subsystems (5)
cover drm/sti: add display support on stih418 family
This serie adds support for graphic display features on the stih418 soc.
Major differences compare to the already supported stih407 are
- a new HDMI PHY to support 4K resolutions
- updated mixer to support the higher number of planes available on the stih418
- updated GDP (graphic planes), called here gdpplus
Alain Volmat (14):
drm/sti: add hdmi tx6g0c28 phy for STi platform
dt-bindings: display: add st,stih418-vtg compatible for sti vtg drm/sti: add support for VTG on the stih418 platform drm/sti: add STih418 platform support in sti mixer drm/sti: add support for stih418 in tvout
drm/sti: remove VTG_SYNC_ID_HDMI from sti_vtg.h drm/sti: add more possible GDP / VID planes entries in sti_plane drm/sti: add more planes supports in sti_mixer drm/sti: add support for GDPPLUS / stih418 GDPs drm/sti: add compositor support for stih418 platform
ARM: dts: sti: move vtg_main / vtg_aux into stih407/stih410 dtsi
ARM: dts: sti: addition of display nodes for stih418 platform
ARM: dts: sti: add the gpu node for the MALI-400 on stih418.dtsi
ARM: dts: sti: enable basic display on stih418-b2264 board
.../bindings/display/st,stih4xx.txt | 2 +- arch/arm/boot/dts/st/stih407-family.dtsi | 13 - arch/arm/boot/dts/st/stih407.dtsi | 12 + arch/arm/boot/dts/st/stih410.dtsi | 12 + arch/arm/boot/dts/st/stih418-b2264.dts | 34 ++ arch/arm/boot/dts/st/stih418-clock.dtsi | 2 +- arch/arm/boot/dts/st/stih418.dtsi | 188 +++++++++++ drivers/gpu/drm/sti/Makefile | 1 + drivers/gpu/drm/sti/sti_compositor.c | 30 ++ drivers/gpu/drm/sti/sti_compositor.h | 3 + drivers/gpu/drm/sti/sti_crtc.c | 11 + drivers/gpu/drm/sti/sti_gdp.c | 250 +++++++++------ drivers/gpu/drm/sti/sti_gdp.h | 8 +- drivers/gpu/drm/sti/sti_hdmi.c | 4 + drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c | 292 ++++++++++++++++++ drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.h | 13 + drivers/gpu/drm/sti/sti_mixer.c | 133 ++++++-- drivers/gpu/drm/sti/sti_mixer.h | 3 +- drivers/gpu/drm/sti/sti_plane.c | 8 + drivers/gpu/drm/sti/sti_plane.h | 8 +- drivers/gpu/drm/sti/sti_tvout.c | 35 ++- drivers/gpu/drm/sti/sti_vtg.c | 62 +++- drivers/gpu/drm/sti/sti_vtg.h | 1 - 23 files changed, 967 insertions(+), 158 deletions(-) create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.h
Signature · 1 line
2.34.1
PATCH 1/14 drm/sti: add hdmi tx6g0c28 phy for STi platform
Addition of the HDMI TX PHY driver for use in the STiH418 SoC platform and more especially the 4KOpen (B2264) board.
--- drivers/gpu/drm/sti/Makefile | 1 + drivers/gpu/drm/sti/sti_hdmi.c | 4 + drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c | 292 +++++++++++++++++++++ drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.h | 13 + 4 files changed, 310 insertions(+) create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.h
drivers/gpu/drm/sti/Makefile +1 -0
@@ -11,6 +11,7 @@ sti-drm-y := \ sti_plane.o \ sti_hdmi.o \ sti_hdmi_tx3g4c28phy.o \ + sti_hdmi_tx6g0c28phy.o \ sti_dvo.o \ sti_awg_utils.o \ sti_vtg.o \
drivers/gpu/drm/sti/sti_hdmi.c +4 -0
@@ -27,6 +27,7 @@#include "sti_hdmi.h" #include "sti_hdmi_tx3g4c28phy.h" +#include "sti_hdmi_tx6g0c28phy.h" #include "sti_vtg.h" #define HDMI_CFG 0x0000
@@ -1363,6 +1364,9 @@ static const struct of_device_id hdmi_of_match[] = { { .compatible = "st,stih407-hdmi", .data = &tx3g4c28phy_ops, + }, { + .compatible = "st,stih418-hdmi", + .data = &tx6g0c28phy_ops, }, { /* end node */ }
drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c new file +292 -0
292 lines not on this page · raw message
drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.h new file +13 -0
@@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Author: Alain Volmat <[email protected]> +*/ + +#ifndef _STI_HDMI_TX6G0C28PHY_H_ +#define _STI_HDMI_TX6G0C28PHY_H_ + +#include "sti_hdmi.h" + +extern struct hdmi_phy_ops tx6g0c28phy_ops; + +#endif
Signature · 1 line
2.34.1
PATCH 2/14 dt-bindings: display: add st,stih418-vtg compatible for sti vtg
In reply to Alain VolmatAdd a new compatible in st,stih4xx.txt in order to support sti vtg on stih418 platforms.
--- Documentation/devicetree/bindings/display/st,stih4xx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/display/st,stih4xx.txt +1 -1
@@ -2,7 +2,7 @@ STMicroelectronics stih4xx platforms - sti-vtg: video timing generator Required properties: - - compatible: "st,vtg" + - compatible: "st,vtg" or "st,stih418-vtg" - reg: Physical base address of the IP registers and length of memory mapped region. Optional properties: - interrupts : VTG interrupt number to the CPU.
Signature · 1 line
2.34.1
Re: [PATCH 02/14] dt-bindings: display: add st,stih418-vtg compatible for sti vtg
Quoted 4 lines · Alain Volmat
Add a new compatible in st,stih4xx.txt in order to support sti vtg on stih418 platforms.
Signed-off-by Alain Volmat <[email protected]>
Best regards,
Krzysztof
PATCH 3/14 drm/sti: add support for VTG on the stih418 platform
In reply to Alain VolmatVTG integrated into the STiH418 differ in the number of outputs available and allocation of each output. Indeed on STiH418, there are 6 outputs (4 on the STiH407/STiH410) and HDMI is connected to the 5th output in case of STiH418 while it is on the 1st output in case of STiH407/STiH410.
A new compatible st,stih418-vtg is added to differentiate that.
--- drivers/gpu/drm/sti/sti_vtg.c | 62 +++++++++++++++++++++++++++++------ 1 file changed, 52 insertions(+), 10 deletions(-)
drivers/gpu/drm/sti/sti_vtg.c +52 -10
@@ -60,6 +60,18 @@#define VTG_TOP_V_HD_4 0x012c#define VTG_BOT_V_HD_4 0x0130 +#define VTG_H_HD_5 0x0140 +#define VTG_TOP_V_VD_5 0x0144 +#define VTG_BOT_V_VD_5 0x0148 +#define VTG_TOP_V_HD_5 0x014c +#define VTG_BOT_V_HD_5 0x0150 + +#define VTG_H_HD_6 0x0160 +#define VTG_TOP_V_VD_6 0x0164 +#define VTG_BOT_V_VD_6 0x0168 +#define VTG_TOP_V_HD_6 0x016c +#define VTG_BOT_V_HD_6 0x0170 +#define VTG_IRQ_BOTTOM BIT(0)#define VTG_IRQ_TOP BIT(1)#define VTG_IRQ_MASK (VTG_IRQ_TOP | VTG_IRQ_BOTTOM)
@@ -92,7 +104,12 @@ struct sti_vtg_regs_offs {u32 bot_v_hd; }; -#define VTG_MAX_SYNC_OUTPUT 4 +struct sti_vtg_data { +unsigned int nb_sync_output; +unsigned int hdmi_sync_id; +}; + +#define VTG_MAX_SYNC_OUTPUT 6static const struct sti_vtg_regs_offs vtg_regs_offs[VTG_MAX_SYNC_OUTPUT ] = { {VTG_H_HD_1 ,VTG_TOP_V_VD_1 ,VTG_BOT_V_VD_1 ,VTG_TOP_V_HD_1 ,VTG_BOT_V_HD_1 },
@@ -101,7 +118,11 @@ static const struct sti_vtg_regs_offs vtg_regs_offs[VTG_MAX_SYNC_OUTPUT] = { {VTG_H_HD_3 , VTG_TOP_V_VD_3, VTG_BOT_V_VD_3, VTG_TOP_V_HD_3, VTG_BOT_V_HD_3 }, { VTG_H_HD_4, - VTG_TOP_V_VD_4, VTG_BOT_V_VD_4, VTG_TOP_V_HD_4, VTG_BOT_V_HD_4 } + VTG_TOP_V_VD_4, VTG_BOT_V_VD_4, VTG_TOP_V_HD_4, VTG_BOT_V_HD_4 }, + { VTG_H_HD_5, + VTG_TOP_V_VD_5, VTG_BOT_V_VD_5, VTG_TOP_V_HD_5, VTG_BOT_V_HD_5 }, + { VTG_H_HD_6, + VTG_TOP_V_VD_6, VTG_BOT_V_VD_6, VTG_TOP_V_HD_6, VTG_BOT_V_HD_6 } };/*
@@ -138,6 +159,7 @@ struct sti_vtg {u32 irq_status;struct raw_notifier_head notifier_list;struct drm_crtc *crtc; +struct sti_vtg_data data; };struct sti_vtg *of_vtg_find (struct device_node *np)
@@ -252,7 +274,7 @@ static void vtg_set_mode(struct sti_vtg *vtg,vtg_set_output_window (vtg->regs, mode);/* Set hsync and vsync position for HDMI */ -vtg_set_hsync_vsync_pos (&sync[VTG_SYNC_ID_HDMI -1 ],HDMI_DELAY , mode); +vtg_set_hsync_vsync_pos (&sync[vtg->data.hdmi_sync_id -1 ],HDMI_DELAY , mode);/* Set hsync and vsync position for HD DCS */ vtg_set_hsync_vsync_pos (&sync[VTG_SYNC_ID_HDDCS -1 ],0 , mode);
@@ -264,7 +286,7 @@ static void vtg_set_mode(struct sti_vtg *vtg,vtg_set_hsync_vsync_pos (&sync[VTG_SYNC_ID_DVO -1 ],DVO_DELAY , mode);/* Progam the syncs outputs */ -for (i =0 ; i <VTG_MAX_SYNC_OUTPUT ; i++) { +for (i =0 ; i < vtg->data.nb_sync_output ; i++) {writel (sync[i].hsync, vtg->regs + vtg_regs_offs[i].h_hd); writel(sync[i].vsync_line_top,
@@ -376,9 +398,27 @@ static irqreturn_t vtg_irq(int irq, void *arg)return IRQ_WAKE_THREAD ; } +static const struct sti_vtg_data stih407_vtg_data = { + .nb_sync_output =4 , + .hdmi_sync_id =1 , +}; + +static const struct sti_vtg_data stih418_vtg_data = { + .nb_sync_output =6 , + .hdmi_sync_id =5 , +}; + +static const struct of_device_id vtg_of_match[] = { + { .compatible ="st,vtg" , .data = &stih407_vtg_data, }, + { .compatible ="st,stih418-vtg" , .data = &stih418_vtg_data, }, + {/* sentinel */ } +}; +MODULE_DEVICE_TABLE (of, vtg_of_match); +static int vtg_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev; +struct device_node *np = dev->of_node;struct sti_vtg *vtg;struct resource *res;int ret;
@@ -387,6 +427,14 @@ static int vtg_probe(struct platform_device *pdev)if (!vtg)return -ENOMEM ; +memcpy (&vtg->data,of_match_node (vtg_of_match, np)->data, +sizeof (struct sti_vtg_data )); + +if (vtg->data.nb_sync_output >VTG_MAX_SYNC_OUTPUT ) { +dev_err (dev,"Invalid number of VTG sync output\n" ); +return -EINVAL ; + } +/* Get Memory ressources */ res =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!res) {
@@ -422,12 +470,6 @@ static int vtg_probe(struct platform_device *pdev)return 0 ; } -static const struct of_device_id vtg_of_match[] = { - { .compatible ="st,vtg" , }, - {/* sentinel */ } -}; -MODULE_DEVICE_TABLE (of, vtg_of_match); -struct platform_driver sti_vtg_driver = { .driver = { .name ="sti-vtg" ,
Signature · 1 line
2.34.1
PATCH 4/14 drm/sti: add STih418 platform support in sti mixer
In reply to Alain VolmatOn the STiH418, since there are more planes attached to the mixer, the bit field for each depth of is now coded using 4 bits instead of 3 bits. Some registers as well differ between STiH407 and STiH418 leading on relying on the st,stih418-compositor compatible to distinguish proper behavior.
--- drivers/gpu/drm/sti/sti_mixer.c | 71 ++++++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 14 deletions(-)
drivers/gpu/drm/sti/sti_mixer.c +57 -14
@@ -7,6 +7,7 @@*/ #include <linux/moduleparam.h> +#include <linux/of.h> #include <linux/seq_file.h> #include <drm/drm_print.h>
@@ -23,10 +24,12 @@ module_param_named(bkgcolor, bkg_color, int, 0644);/* regs offset */ #define GAM_MIXER_CTL 0x00#define GAM_MIXER_BKC 0x04 +#define GAM_MIXER_OFF 0x08/* Only for STiH418 */ #define GAM_MIXER_BCO 0x0C#define GAM_MIXER_BCS 0x10#define GAM_MIXER_AVO 0x28#define GAM_MIXER_AVS 0x2C +#define GAM_MIXER_CRB2 0x30/* Only for STiH418 */ #define GAM_MIXER_CRB 0x34#define GAM_MIXER_ACT 0x38#define GAM_MIXER_MBP 0x3C
@@ -102,13 +105,22 @@ static void mixer_dbg_ctl(struct seq_file *s, int val)seq_puts (s,"Nothing" ); } -static void mixer_dbg_crb (struct seq_file *s,int val) +static void mixer_dbg_crb (struct seq_file *s,struct sti_mixer *mixer,u64 val) {int i; +u32 shift, mask_id; + +if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) { + shift =4 ; + mask_id =0x0f ; + }else { + shift =3 ; + mask_id =0x07 ; + }seq_puts (s,"\tDepth: " );for (i =0 ; i <GAM_MIXER_NB_DEPTH_LEVEL ; i++) { -switch (val &GAM_DEPTH_MASK_ID ) { +switch (val & mask_id) {case GAM_DEPTH_VID0_ID :seq_puts (s,"VID0" );break ;
@@ -133,7 +145,7 @@ static void mixer_dbg_crb(struct seq_file *s, int val)if (i <GAM_MIXER_NB_DEPTH_LEVEL -1 )seq_puts (s," < " ); - val = val >>3 ; + val = val >> shift; } }
@@ -149,6 +161,7 @@ static int mixer_dbg_show(struct seq_file *s, void *arg) {struct drm_info_node *node = s->private;struct sti_mixer *mixer = (struct sti_mixer *)node->info_ent->data; +u64 val;seq_printf (s,"%s: (vaddr = 0x%p)" ,sti_mixer_to_str (mixer), mixer->regs);
@@ -161,11 +174,18 @@ static int mixer_dbg_show(struct seq_file *s, void *arg)DBGFS_DUMP (GAM_MIXER_AVO );DBGFS_DUMP (GAM_MIXER_AVS );DBGFS_DUMP (GAM_MIXER_CRB ); -mixer_dbg_crb (s,sti_mixer_reg_read (mixer,GAM_MIXER_CRB )); + val =sti_mixer_reg_read (mixer,GAM_MIXER_CRB ); +if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) { +DBGFS_DUMP (GAM_MIXER_CRB2 ); + val |= ((u64 )sti_mixer_reg_read (mixer,GAM_MIXER_CRB2 ) <<32 ); + } +mixer_dbg_crb (s, mixer, val);DBGFS_DUMP (GAM_MIXER_ACT ); -DBGFS_DUMP (GAM_MIXER_MBP ); -DBGFS_DUMP (GAM_MIXER_MX0 ); -mixer_dbg_mxn (s, mixer->regs +GAM_MIXER_MX0 ); +if (of_device_is_compatible (mixer->dev->of_node,"st,stih407-compositor" )) { +DBGFS_DUMP (GAM_MIXER_MBP ); +DBGFS_DUMP (GAM_MIXER_MX0 ); +mixer_dbg_mxn (s, mixer->regs +GAM_MIXER_MX0 ); + }seq_putc (s,'\n' );return 0 ; }
@@ -238,7 +258,16 @@ int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane) {int plane_id, depth = plane->drm_plane.state->normalized_zpos;unsigned int i; -u32 mask, val; +u64 mask, val; +u32 shift, mask_id; + +if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) { + shift =4 ; + mask_id =0x0f ; + }else { + shift =3 ; + mask_id =0x07 ; + }switch (plane->desc) {case STI_GDP_0 :
@@ -266,26 +295,37 @@ int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane)/* Search if a previous depth was already assigned to the plane */ val =sti_mixer_reg_read (mixer,GAM_MIXER_CRB ); +if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) + val |= ((u64 )sti_mixer_reg_read (mixer,GAM_MIXER_CRB2 ) <<32 );for (i =0 ; i <GAM_MIXER_NB_DEPTH_LEVEL ; i++) { - mask =GAM_DEPTH_MASK_ID << (3 * i); -if ((val & mask) == plane_id << (3 * i)) + mask = mask_id << (shift * i); +if ((val & mask) == plane_id << (shift * i))break ; } - mask |=GAM_DEPTH_MASK_ID << (3 * depth); - plane_id = plane_id << (3 * depth); + mask |= mask_id << (shift * depth); + plane_id = plane_id << (shift * depth);DRM_DEBUG_DRIVER ("%s %s depth=%d\n" ,sti_mixer_to_str (mixer),sti_plane_to_str (plane), depth);dev_dbg (mixer->dev,"GAM_MIXER_CRB val 0x%x mask 0x%x\n" , - plane_id, mask); + plane_id, (u32)(mask &0xffffffff )); +if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) +dev_dbg (mixer->dev,"GAM_MIXER_CRB2 val 0x%x mask 0x%x\n" , + plane_id, (u32)(mask >>32 )); val &= ~mask; val |= plane_id; -sti_mixer_reg_write (mixer,GAM_MIXER_CRB , val); +sti_mixer_reg_write (mixer,GAM_MIXER_CRB , val &0xffffffff ); +if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) +sti_mixer_reg_write (mixer,GAM_MIXER_CRB2 , val >>32 );dev_dbg (mixer->dev,"Read GAM_MIXER_CRB 0x%x\n" ,sti_mixer_reg_read (mixer,GAM_MIXER_CRB )); +if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) +dev_dbg (mixer->dev,"Read GAM_MIXER_CRB2 0x%x\n" , +sti_mixer_reg_read (mixer,GAM_MIXER_CRB2 )); +return 0 ; }
@@ -352,6 +392,9 @@ int sti_mixer_set_plane_status(struct sti_mixer *mixer, val |= status ? mask :0 ;sti_mixer_reg_write (mixer,GAM_MIXER_CTL , val); +if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) +sti_mixer_reg_write (mixer,GAM_MIXER_OFF ,0x02 ); +return 0 ; }
Signature · 1 line
2.34.1
PATCH 5/14 drm/sti: add support for stih418 in tvout
In reply to Alain VolmatThe tvout for stih407 and stih418 differ in the connection with the vtg regarding to the hdmi output. In order to cop with that, introduce a new compatible st,stih418-tvout in order to have the hdmi_sync_id being part of the data attached to each compatible.
--- drivers/gpu/drm/sti/sti_tvout.c | 35 +++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-)
drivers/gpu/drm/sti/sti_tvout.c +27 -8
@@ -118,6 +118,7 @@ struct sti_tvout {struct drm_encoder *hda;struct drm_encoder *dvo;bool debugfs_registered; +unsigned int hdmi_sync_id; };struct sti_tvout_encoder {
@@ -130,6 +131,10 @@ struct sti_tvout_encoder {#define to_sti_tvout (x) to_sti_tvout_encoder(x)->tvout +struct sti_tvout_data { +unsigned int hdmi_sync_id; +}; +/* preformatter conversion matrix */ static const u32 rgb_to_ycbcr_601[8 ] = {0xF927082E ,0x04C9FEAB ,0x01D30964 ,0xFA95FD3D ,
@@ -359,14 +364,14 @@ static void tvout_hdmi_start(struct sti_tvout *tvout, bool main_path)DRM_DEBUG_DRIVER ("main vip for hdmi\n" );/* select the input sync for hdmi */ tvout_write (tvout, -TVO_SYNC_MAIN_VTG_SET_REF |VTG_SYNC_ID_HDMI , +TVO_SYNC_MAIN_VTG_SET_REF | tvout->hdmi_sync_id,TVO_HDMI_SYNC_SEL ); tvo_in_vid_format =TVO_MAIN_IN_VID_FORMAT ; }else {DRM_DEBUG_DRIVER ("aux vip for hdmi\n" );/* select the input sync for hdmi */ tvout_write (tvout, -TVO_SYNC_AUX_VTG_SET_REF |VTG_SYNC_ID_HDMI , +TVO_SYNC_AUX_VTG_SET_REF | tvout->hdmi_sync_id,TVO_HDMI_SYNC_SEL ); tvo_in_vid_format =TVO_AUX_IN_VID_FORMAT ; }
@@ -833,10 +838,26 @@ static const struct component_ops sti_tvout_ops = { .unbind = sti_tvout_unbind, }; +static const struct sti_tvout_data stih407_tvout_data = { + .hdmi_sync_id =1 , +}; + +static const struct sti_tvout_data stih418_tvout_data = { + .hdmi_sync_id =5 , +}; + +static const struct of_device_id tvout_of_match[] = { + { .compatible ="st,stih407-tvout" , .data = &stih407_tvout_data, }, + { .compatible ="st,stih418-tvout" , .data = &stih418_tvout_data, }, + {/* end node */ } +}; +MODULE_DEVICE_TABLE (of, tvout_of_match); +static int sti_tvout_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;struct device_node *node = dev->of_node; +const struct sti_tvout_data *data;struct sti_tvout *tvout;struct resource *res;
@@ -851,6 +872,10 @@ static int sti_tvout_probe(struct platform_device *pdev) tvout->dev = dev; +/* populate data structure depending on compatibility */ + data =of_match_node (tvout_of_match, node)->data; + tvout->hdmi_sync_id = data->hdmi_sync_id; +/* get memory resources */ res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"tvout-reg" );if (!res) {
@@ -877,12 +902,6 @@ static void sti_tvout_remove(struct platform_device *pdev)component_del (&pdev->dev, &sti_tvout_ops); } -static const struct of_device_id tvout_of_match[] = { - { .compatible ="st,stih407-tvout" , }, - {/* end node */ } -}; -MODULE_DEVICE_TABLE (of, tvout_of_match); -struct platform_driver sti_tvout_driver = { .driver = { .name ="sti-tvout" ,
Signature · 1 line
2.34.1
PATCH 6/14 drm/sti: remove VTG_SYNC_ID_HDMI from sti_vtg.h
In reply to Alain VolmatSince the synchro signal used for hdmi output and coming from the VTG differs between the stih407 and stih418 platforms, we cannot rely anymore on hardcoded value and involve drivers use compatible to figure out the value.
The macro VTG_SYNC_ID_HDMI can thus be removed.
--- drivers/gpu/drm/sti/sti_vtg.h | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/sti/sti_vtg.h +0 -1
@@ -10,7 +10,6 @@#define VTG_TOP_FIELD_EVENT 1#define VTG_BOTTOM_FIELD_EVENT 2 -#define VTG_SYNC_ID_HDMI 1#define VTG_SYNC_ID_HDDCS 2#define VTG_SYNC_ID_HDF 3#define VTG_SYNC_ID_DVO 4
Signature · 1 line
2.34.1
PATCH 7/14 drm/sti: add more possible GDP / VID planes entries in sti_plane
In reply to Alain VolmatIn order to address the STiH418, add more entries in sti_plane
--- drivers/gpu/drm/sti/sti_plane.c | 8 ++++++++ drivers/gpu/drm/sti/sti_plane.h | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-)
drivers/gpu/drm/sti/sti_plane.c +8 -0
@@ -28,8 +28,16 @@ const char *sti_plane_to_str(struct sti_plane *plane)return "GDP2" ;case STI_GDP_3 :return "GDP3" ; +case STI_GDP_4 : +return "GDP4" ; +case STI_GDP_5 : +return "GDP5" ;case STI_HQVDP_0 :return "HQVDP0" ; +case STI_HQVDP_1 : +return "HQVDP1" ; +case STI_HQVDP_2 : +return "HQVDP2" ;case STI_CURSOR :return "CURSOR" ;default :
drivers/gpu/drm/sti/sti_plane.h +7 -1
@@ -25,7 +25,9 @@ enum sti_plane_id_of_type {STI_ID_0 =0 ,STI_ID_1 =1 ,STI_ID_2 =2 , -STI_ID_3 =3 +STI_ID_3 =3 , +STI_ID_4 =4 , + STI_ID_5 = 5, }; enum sti_plane_desc {
@@ -33,7 +35,11 @@ enum sti_plane_desc {STI_GDP_1 =STI_GDP |STI_ID_1 ,STI_GDP_2 =STI_GDP |STI_ID_2 ,STI_GDP_3 =STI_GDP |STI_ID_3 , +STI_GDP_4 =STI_GDP |STI_ID_4 , +STI_GDP_5 =STI_GDP |STI_ID_5 ,STI_HQVDP_0 =STI_VDP |STI_ID_0 , +STI_HQVDP_1 =STI_VDP |STI_ID_1 , +STI_HQVDP_2 =STI_VDP |STI_ID_2 ,STI_CURSOR =STI_CUR ,STI_BACK =STI_BCK };
Signature · 1 line
2.34.1
PATCH 8/14 drm/sti: add more planes supports in sti_mixer
In reply to Alain VolmatOn STiH418, the mixer is able to driver more layers of planes. For this purpose, add those new possible entries and allow it to work in either STiH407 or STiH418 mode.
--- drivers/gpu/drm/sti/sti_mixer.c | 66 ++++++++++++++++++++++++++++----- drivers/gpu/drm/sti/sti_mixer.h | 3 +- 2 files changed, 58 insertions(+), 11 deletions(-)
drivers/gpu/drm/sti/sti_mixer.c +56 -10
@@ -42,7 +42,9 @@ module_param_named(bkgcolor, bkg_color, int, 0644);#define GAM_DEPTH_GDP1_ID 4#define GAM_DEPTH_GDP2_ID 5#define GAM_DEPTH_GDP3_ID 6 -#define GAM_DEPTH_MASK_ID 7 +#define GAM_DEPTH_GDP4_ID 7 +#define GAM_DEPTH_GDP5_ID 8 +#define GAM_DEPTH_VID2_ID 9/* mask in CTL reg */ #define GAM_CTL_BACK_MASK BIT(0)
@@ -52,6 +54,10 @@ module_param_named(bkgcolor, bkg_color, int, 0644);#define GAM_CTL_GDP1_MASK BIT(4)#define GAM_CTL_GDP2_MASK BIT(5)#define GAM_CTL_GDP3_MASK BIT(6) +#define GAM_CTL_GDP4_MASK BIT(7) +#define GAM_CTL_GDP5_MASK BIT(8) +/* CURSOR doesn't exist on STiH418 where VID2 exist */ +#define GAM_CTL_VID2_MASK BIT(9)#define GAM_CTL_CURSOR_MASK BIT(9)const char *sti_mixer_to_str (struct sti_mixer *mixer)
@@ -80,15 +86,16 @@ static inline void sti_mixer_reg_write(struct sti_mixer *mixer,#define DBGFS_DUMP (reg) seq_printf(s, "\n %-25s 0x%08X", #reg, \ sti_mixer_reg_read(mixer, reg)) -static void mixer_dbg_ctl (struct seq_file *s,int val) +static void mixer_dbg_ctl (struct seq_file *s,int val,int depth) {unsigned int i;int count =0 ;char *const disp_layer[] = {"BKG" ,"VID0" ,"VID1" ,"GDP0" , -"GDP1" ,"GDP2" ,"GDP3" }; +"GDP1" ,"GDP2" ,"GDP3" ,"GDP4" , +"GDP5" ,"VID2" };seq_puts (s,"\tEnabled: " ); -for (i =0 ; i <7 ; i++) { +for (i =0 ; i < depth; i++) {if (val &1 ) {seq_printf (s,"%s " , disp_layer[i]); count++;
@@ -108,18 +115,20 @@ static void mixer_dbg_ctl(struct seq_file *s, int val)static void mixer_dbg_crb (struct seq_file *s,struct sti_mixer *mixer,u64 val) {int i; -u32 shift, mask_id; +u32 shift, mask_id, mixer_depth;if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) { shift =4 ; mask_id =0x0f ; + mixer_depth =GAM_MIXER_NB_DEPTH_LEVEL_STIH418 ; }else { shift =3 ; mask_id =0x07 ; + mixer_depth =GAM_MIXER_NB_DEPTH_LEVEL_STIH407 ; }seq_puts (s,"\tDepth: " ); -for (i =0 ; i <GAM_MIXER_NB_DEPTH_LEVEL ; i++) { +for (i =0 ; i < mixer_depth; i++) {switch (val & mask_id) {case GAM_DEPTH_VID0_ID :seq_puts (s,"VID0" );
@@ -139,11 +148,20 @@ static void mixer_dbg_crb(struct seq_file *s, struct sti_mixer *mixer, u64 val)case GAM_DEPTH_GDP3_ID :seq_puts (s,"GDP3" );break ; +case GAM_DEPTH_GDP4_ID : +seq_puts (s,"GDP4" ); +break ; +case GAM_DEPTH_GDP5_ID : +seq_puts (s,"GDP5" ); +break ; +case GAM_DEPTH_VID2_ID : +seq_puts (s,"VID2" ); +break ;default :seq_puts (s,"---" ); } -if (i <GAM_MIXER_NB_DEPTH_LEVEL -1 ) +if (i < mixer_depth -1 )seq_puts (s," < " ); val = val >> shift; }
@@ -161,13 +179,19 @@ static int mixer_dbg_show(struct seq_file *s, void *arg) {struct drm_info_node *node = s->private;struct sti_mixer *mixer = (struct sti_mixer *)node->info_ent->data; +int depth;u64 val; +if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) + depth =GAM_MIXER_NB_DEPTH_LEVEL_STIH418 +1 ; +else + depth =GAM_MIXER_NB_DEPTH_LEVEL_STIH407 +1 ; +seq_printf (s,"%s: (vaddr = 0x%p)" ,sti_mixer_to_str (mixer), mixer->regs);DBGFS_DUMP (GAM_MIXER_CTL ); -mixer_dbg_ctl (s,sti_mixer_reg_read (mixer,GAM_MIXER_CTL )); +mixer_dbg_ctl (s,sti_mixer_reg_read (mixer,GAM_MIXER_CTL ), depth);DBGFS_DUMP (GAM_MIXER_BKC );DBGFS_DUMP (GAM_MIXER_BCO );DBGFS_DUMP (GAM_MIXER_BCS );
@@ -259,14 +283,16 @@ int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane)int plane_id, depth = plane->drm_plane.state->normalized_zpos;unsigned int i;u64 mask, val; -u32 shift, mask_id; +u32 shift, mask_id, mixer_depth;if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) { shift =4 ; mask_id =0x0f ; + mixer_depth =GAM_MIXER_NB_DEPTH_LEVEL_STIH418 ; }else { shift =3 ; mask_id =0x07 ; + mixer_depth =GAM_MIXER_NB_DEPTH_LEVEL_STIH407 ; }switch (plane->desc) {
@@ -285,6 +311,18 @@ int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane)case STI_HQVDP_0 : plane_id =GAM_DEPTH_VID0_ID ;break ; +case STI_HQVDP_1 : + plane_id =GAM_DEPTH_VID1_ID ; +break ; +case STI_GDP_4 : + plane_id =GAM_DEPTH_GDP4_ID ; +break ; +case STI_GDP_5 : + plane_id =GAM_DEPTH_GDP5_ID ; +break ; +case STI_HQVDP_2 : + plane_id =GAM_DEPTH_VID2_ID ; +break ;case STI_CURSOR :/* no need to set depth for cursor */ return 0 ;
@@ -297,7 +335,7 @@ int sti_mixer_set_plane_depth(struct sti_mixer *mixer, struct sti_plane *plane) val =sti_mixer_reg_read (mixer,GAM_MIXER_CRB );if (of_device_is_compatible (mixer->dev->of_node,"st,stih418-compositor" )) val |= ((u64 )sti_mixer_reg_read (mixer,GAM_MIXER_CRB2 ) <<32 ); -for (i =0 ; i <GAM_MIXER_NB_DEPTH_LEVEL ; i++) { +for (i =0 ; i < mixer_depth; i++) { mask = mask_id << (shift * i);if ((val & mask) == plane_id << (shift * i))break ;
@@ -366,6 +404,14 @@ static u32 sti_mixer_get_plane_mask(struct sti_plane *plane)return GAM_CTL_GDP3_MASK ;case STI_HQVDP_0 :return GAM_CTL_VID0_MASK ; +case STI_HQVDP_1 : +return GAM_CTL_VID1_MASK ; +case STI_GDP_4 : +return GAM_CTL_GDP4_MASK ; +case STI_GDP_5 : +return GAM_CTL_GDP5_MASK ; +case STI_HQVDP_2 : +return GAM_CTL_VID2_MASK ;case STI_CURSOR :return GAM_CTL_CURSOR_MASK ;default :
drivers/gpu/drm/sti/sti_mixer.h +2 -1
@@ -61,7 +61,8 @@ void sti_mixer_set_background_status(struct sti_mixer *mixer, bool enable);void sti_mixer_debugfs_init (struct sti_mixer *mixer,struct drm_minor *minor);/* depth in Cross-bar control = z order */ -#define GAM_MIXER_NB_DEPTH_LEVEL 6 +#define GAM_MIXER_NB_DEPTH_LEVEL_STIH407 6 +#define GAM_MIXER_NB_DEPTH_LEVEL_STIH418 9#define STI_MIXER_MAIN 0#define STI_MIXER_AUX 1
Signature · 1 line
2.34.1
PATCH 9/14 drm/sti: add support for GDPPLUS / stih418 GDPs
In reply to Alain VolmatThe STiH418 platform embeds two kinds of graphical planes (GDP), so called GDPPLUS which has additional (yet unimplemented) features compared to the GDP, and also the GDP. Register map of GDPPLUS slightly differ from the GDP even if, for common functionalities registers name and behavior are the same (but not at same addresses). For that purpose, this commit rework the way of addressing the GDP(PLUS) registers.
--- drivers/gpu/drm/sti/sti_compositor.c | 4 + drivers/gpu/drm/sti/sti_compositor.h | 1 + drivers/gpu/drm/sti/sti_gdp.c | 250 ++++++++++++++++----------- drivers/gpu/drm/sti/sti_gdp.h | 8 +- 4 files changed, 163 insertions(+), 100 deletions(-)
drivers/gpu/drm/sti/sti_compositor.c +4 -0
@@ -87,6 +87,7 @@ static int sti_compositor_bind(struct device *dev, compo->regs + desc[i].offset);break ;case STI_GPD_SUBDEV : +case STI_GPDPLUS_SUBDEV :case STI_CURSOR_SUBDEV :/* Nothing to do, wait for the second round */ break ;
@@ -120,7 +121,10 @@ static int sti_compositor_bind(struct device *dev, }break ;case STI_GPD_SUBDEV : +case STI_GPDPLUS_SUBDEV : primary = sti_gdp_create(drm_dev, compo->dev, + desc[i].type == STI_GPD_SUBDEV ? + STI_GDP_TYPE_GDP : STI_GDP_TYPE_GDPPLUS, desc[i].id, compo->regs + desc[i].offset, (1 << mixer_id) - 1,
drivers/gpu/drm/sti/sti_compositor.h +1 -0
@@ -24,6 +24,7 @@ enum sti_compositor_subdev_type {STI_MIXER_MAIN_SUBDEV ,STI_MIXER_AUX_SUBDEV ,STI_GPD_SUBDEV , +STI_GPDPLUS_SUBDEV ,STI_VID_SUBDEV , STI_CURSOR_SUBDEV, };
drivers/gpu/drm/sti/sti_gdp.c +151 -99
441 lines not on this page · raw message
drivers/gpu/drm/sti/sti_gdp.h +7 -1
@@ -16,8 +16,14 @@struct drm_device ;struct device ; +enum sti_gdp_type { +STI_GDP_TYPE_GDP , +STI_GDP_TYPE_GDPPLUS , +}; +struct drm_plane *sti_gdp_create (struct drm_device *drm_dev, -struct device *dev,int desc, +struct device *dev,enum sti_gdp_type gdp_type, +int desc,void __iomem *baseaddr,unsigned int possible_crtcs,enum drm_plane_type type);
Signature · 1 line
2.34.1
PATCH 10/14 drm/sti: add compositor support for stih418 platform
In reply to Alain VolmatOn the STiH418, a new clock (proc_mixer) must be enabled in order to have the plane mixers properly behaving. Add a new st,stih418-compositor in order to describe the planes/mixers available on this platform.
--- drivers/gpu/drm/sti/sti_compositor.c | 26 ++++++++++++++++++++++++++ drivers/gpu/drm/sti/sti_compositor.h | 2 ++ drivers/gpu/drm/sti/sti_crtc.c | 11 +++++++++++ 3 files changed, 39 insertions(+)
drivers/gpu/drm/sti/sti_compositor.c +26 -0
@@ -43,6 +43,23 @@ static const struct sti_compositor_data stih407_compositor_data = { }, }; +/* +* stiH418 compositor properties +*/ +static const struct sti_compositor_data stih418_compositor_data = { + .nb_subdev =8 , + .subdev_desc = { + {STI_GPDPLUS_SUBDEV , (int )STI_GDP_0 ,0x00000 }, + {STI_GPDPLUS_SUBDEV , (int )STI_GDP_1 ,0x10000 }, + {STI_GPDPLUS_SUBDEV , (int )STI_GDP_2 ,0x20000 }, + {STI_GPDPLUS_SUBDEV , (int )STI_GDP_3 ,0x30000 }, + {STI_GPD_SUBDEV , (int )STI_GDP_4 ,0x40000 }, + {STI_GPD_SUBDEV , (int )STI_GDP_5 ,0x50000 }, + {STI_MIXER_MAIN_SUBDEV ,STI_MIXER_MAIN ,0x100000 }, + {STI_MIXER_AUX_SUBDEV ,STI_MIXER_AUX ,0x110000 }, + }, +}; +void sti_compositor_debugfs_init (struct sti_compositor *compo,struct drm_minor *minor) {
@@ -169,6 +186,9 @@ static const struct of_device_id compositor_of_match[] = { { .compatible = "st,stih407-compositor", .data = &stih407_compositor_data, + }, { + .compatible = "st,stih418-compositor", + .data = &stih418_compositor_data, }, { /* end node */ }
@@ -236,6 +256,12 @@ static int sti_compositor_probe(struct platform_device *pdev)return PTR_ERR (compo->clk_pix_aux); } + compo->clk_proc_mixer =devm_clk_get_optional (dev,"proc_mixer" ); +if (IS_ERR (compo->clk_proc_mixer)) { +DRM_ERROR ("Cannot get proc_mixer clock\n" ); +return PTR_ERR (compo->clk_proc_mixer); + } +/* Get reset resources */ compo->rst_main =devm_reset_control_get_shared (dev,"compo-main" );/* Take compo main out of reset */
drivers/gpu/drm/sti/sti_compositor.h +2 -0
@@ -57,6 +57,7 @@ struct sti_compositor_data {* @clk_compo_aux: clock for aux compo * @clk_pix_main: pixel clock for main path * @clk_pix_aux: pixel clock for aux path +* @clk_proc_mixer: clock for the mixers * @rst_main: reset control of the main path * @rst_aux: reset control of the aux path * @mixer: array of mixers
@@ -72,6 +73,7 @@ struct sti_compositor {struct clk *clk_compo_aux;struct clk *clk_pix_main;struct clk *clk_pix_aux; +struct clk *clk_proc_mixer;struct reset_control *rst_main;struct reset_control *rst_aux;struct sti_mixer *mixer[STI_MAX_MIXER ];
drivers/gpu/drm/sti/sti_crtc.c +11 -0
@@ -67,6 +67,12 @@ sti_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode) pix_clk = compo->clk_pix_aux; } +/* Enable the mixer processing clock (if applicable) */ +if (clk_prepare_enable (compo->clk_proc_mixer)) { +DRM_INFO ("Failed to prepare/enable processing mixer clk\n" ); + goto proc_mixer_error; + } +/* Prepare and enable the compo IP clock */ if (clk_prepare_enable (compo_clk)) {DRM_INFO ("Failed to prepare/enable compositor clk\n" );
@@ -97,6 +103,8 @@ sti_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode) pix_error:clk_disable_unprepare (compo_clk); compo_error: +clk_disable_unprepare (compo->clk_proc_mixer); +proc_mixer_error:return -EINVAL ; }
@@ -122,6 +130,9 @@ static void sti_crtc_disable(struct drm_crtc *crtc)clk_disable_unprepare (compo->clk_compo_aux); } +/* Disable the mixer clock (if applicable) */ +clk_disable_unprepare (compo->clk_proc_mixer); + mixer->status =STI_MIXER_DISABLED ; }
Signature · 1 line
2.34.1
PATCH 11/14 ARM: dts: sti: move vtg_main / vtg_aux into stih407/stih410 dtsi
In reply to Alain VolmatIn preparation of introduction of display support in stih418, move the vtg nodes into stih407.dtsi and stih410.dtsi since vtg nodes will differ in case of the stih418 and thus cannot be kept as part of the stih407-family.dtsi.
--- arch/arm/boot/dts/st/stih407-family.dtsi | 13 ------------- arch/arm/boot/dts/st/stih407.dtsi | 12 ++++++++++++ arch/arm/boot/dts/st/stih410.dtsi | 12 ++++++++++++ 3 files changed, 24 insertions(+), 13 deletions(-)
arch/arm/boot/dts/st/stih407-family.dtsi +0 -13
@@ -292,19 +292,6 @@ syscfg_lpm: lpm-syscfg@94b5100 { reg = <0x94b5100 0x1000>; }; - /* Display */ - vtg_main: sti-vtg-main@8d02800 { - compatible = "st,vtg"; - reg = <0x8d02800 0x200>; - interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; - }; - - vtg_aux: sti-vtg-aux@8d00200 { - compatible = "st,vtg"; - reg = <0x8d00200 0x100>; - interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>; - }; - serial@9830000 { compatible = "st,asc"; reg = <0x9830000 0x2c>;
arch/arm/boot/dts/st/stih407.dtsi +12 -0
@@ -8,6 +8,18 @@ #include <dt-bindings/gpio/gpio.h> / { soc { + vtg_main: sti-vtg-main@8d02800 { + compatible = "st,vtg"; + reg = <0x8d02800 0x200>; + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; + }; + + vtg_aux: sti-vtg-aux@8d00200 { + compatible = "st,vtg"; + reg = <0x8d00200 0x100>; + interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>; + }; + sti-display-subsystem@0 { compatible = "st,sti-display-subsystem"; #address-cells = <1>;
arch/arm/boot/dts/st/stih410.dtsi +12 -0
@@ -99,6 +99,18 @@ ehci1: usb@9a83e00 { status = "disabled"; }; + vtg_main: sti-vtg-main@8d02800 { + compatible = "st,vtg"; + reg = <0x8d02800 0x200>; + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; + }; + + vtg_aux: sti-vtg-aux@8d00200 { + compatible = "st,vtg"; + reg = <0x8d00200 0x100>; + interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>; + }; + sti-display-subsystem@0 { compatible = "st,sti-display-subsystem"; #address-cells = <1>;
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 12/14 ARM: dts: sti: addition of display nodes for stih418 platform
In reply to Alain VolmatAddition of a first set of nodes (compositor/tvout/hdmi/dvo) in order to allow graphic plane usage via HDMI or DVO on the stih418 based boards.
--- arch/arm/boot/dts/st/stih418-clock.dtsi | 2 +- arch/arm/boot/dts/st/stih418.dtsi | 154 ++++++++++++++++++++++++ 2 files changed, 155 insertions(+), 1 deletion(-)
arch/arm/boot/dts/st/stih418-clock.dtsi +1 -1
@@ -17,7 +17,7 @@ clk_sysin: clk-sysin { clk_tmdsout_hdmi: clk-tmdsout-hdmi { #clock-cells = <0>; compatible = "fixed-clock"; - clock-frequency = <0>; + clock-frequency = <594000000>; }; clocks {
arch/arm/boot/dts/st/stih418.dtsi +154 -0
165 lines not on this page · raw message
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 12/14] ARM: dts: sti: addition of display nodes for stih418 platform
Quoted 35 lines · Alain Volmat
Addition of a first set of nodes (compositor/tvout/hdmi/dvo) in order to allow graphic plane usage via HDMI or DVO on the stih418 based boards.
Signed-off-by Alain Volmat <[email protected]>--- arch/arm/boot/dts/st/stih418-clock.dtsi | 2 +- arch/arm/boot/dts/st/stih418.dtsi | 154 ++++++++++++++++++++++++ 2 files changed, 155 insertions(+), 1 deletion(-)arch/arm/boot/dts/st/stih418-clock.dtsi +1
-1@@ -17,7 +17,7 @@ clk_sysin: clk-sysin { clk_tmdsout_hdmi: clk-tmdsout-hdmi { #clock-cells = <0>; compatible = "fixed-clock"; - clock-frequency = <0>; + clock-frequency = <594000000>; }; clocks {arch/arm/boot/dts/st/stih418.dtsi +1
-0@@ -6,6 +6,7 @@ #include "stih418-clock.dtsi" #include "stih407-family.dtsi" #include "stih410-pinctrl.dtsi" +#include <dt-bindings/gpio/gpio.h> / { cpus { #address-cells = <1>;
arch/arm/boot/dts/st/stih418.dtsi thermal@91a0000 { · line 119
Quoted 5 lines
arch/arm/boot/dts/st/stih418.dtsi +2
-0@@ -114,5 +115,158 @@ thermal@91a0000 { clocks = <&clk_sysin>; interrupts = <GIC_SPI 205 IRQ_TYPE_EDGE_RISING>; }; + + sti-display-subsystem@0 {
display-subsystem@
or display-controller@
Although 0 is a bit weird address... are you sure this is correct?
Quoted 31 lines
arch/arm/boot/dts/st/stih418.dtsi +31
-0+ compatible = "st,sti-display-subsystem"; + #address-cells = <1>; + #size-cells = <1>; + + reg = <0 0>; + assigned-clocks = <&clk_s_d2_quadfs 0>, + <&clk_s_d2_quadfs 1>, + <&clk_s_d2_flexgen CLK_TMDS_HDMI_DIV2>, + <&clk_s_d2_flexgen CLK_TMDS_HDMI>, + <&clk_s_d2_flexgen CLK_PIX_MAIN_DISP>, + <&clk_s_d2_flexgen CLK_PIX_AUX_DISP>, + <&clk_s_c0_flexgen CLK_MAIN_DISP>, + <&clk_s_c0_flexgen CLK_AUX_DISP>, + <&clk_s_c0_flexgen CLK_COMPO_DVP>, + <&clk_s_c0_flexgen CLK_PROC_MIXER>; + + assigned-clock-parents = <0>, + <0>, + <&clk_tmdsout_hdmi>, + <&clk_tmdsout_hdmi>, + <&clk_s_d2_quadfs 0>, + <&clk_s_d2_quadfs 1>, + <&clk_s_c0_pll1 0>, + <&clk_s_c0_pll1 0>, + <&clk_s_c0_pll0 0>, + <&clk_s_c0_pll0 0>; + + assigned-clock-rates = <297000000>, + <108000000>, + <297000000>, + <0>,
arch/arm/boot/dts/st/stih418.dtsi thermal@91a0000 { · line 160
Quoted 10 lines
arch/arm/boot/dts/st/stih418.dtsi +10
-0+ <74250000>, + <13500000>, + <400000000>, + <400000000>, + <355000000>, + <355000000>; + + ranges; + + sti_compo: sti-compositor@a600000 {
compositor@
Quoted 14 lines
arch/arm/boot/dts/st/stih418.dtsi +14
-0+ compatible = "st,stih418-compositor"; + reg = <0xa600000 0x200000>; + + clock-names = "compo_main", + "compo_aux", + "pix_main", + "pix_aux", + "proc_mixer"; + + clocks = <&clk_s_c0_flexgen CLK_COMPO_DVP>, + <&clk_s_c0_flexgen CLK_COMPO_DVP>, + <&clk_s_d2_flexgen CLK_PIX_MAIN_DISP>, + <&clk_s_d2_flexgen CLK_PIX_AUX_DISP>, + <&clk_s_c0_flexgen CLK_PROC_MIXER>;
arch/arm/boot/dts/st/stih418.dtsi thermal@91a0000 { · line 184
Quoted 10 lines
arch/arm/boot/dts/st/stih418.dtsi +10
-0+ + reset-names = "compo-main", "compo-aux"; + resets = <&softreset STIH407_COMPO_SOFTRESET>, + <&softreset STIH407_COMPO_SOFTRESET>; + st,vtg = <&vtg_main>, <&vtg_aux>; + + status = "disabled"; + }; + + sti_tvout: sti-tvout@a900000 {
hdmi@
or something else
Quoted 21 lines
arch/arm/boot/dts/st/stih418.dtsi +21
-0+ compatible = "st,stih418-tvout"; + reg = <0xa900000 0x1000>; + reg-names = "tvout-reg"; + reset-names = "tvout"; + resets = <&softreset STIH407_HDTVOUT_SOFTRESET>; + #address-cells = <1>; + #size-cells = <1>; + assigned-clocks = <&clk_s_d2_flexgen CLK_PIX_HDMI>, + <&clk_s_d2_flexgen CLK_TMDS_HDMI>, + <&clk_s_d2_flexgen CLK_REF_HDMIPHY>, + <&clk_s_d0_flexgen CLK_PCM_0>, + <&clk_s_d2_flexgen CLK_PIX_HDDAC>, + <&clk_s_d2_flexgen CLK_HDDAC>; + + assigned-clock-parents = <&clk_s_d2_quadfs 0>, + <&clk_tmdsout_hdmi>, + <&clk_s_d2_quadfs 0>, + <&clk_s_d0_quadfs 0>, + <&clk_s_d2_quadfs 0>, + <&clk_s_d2_quadfs 0>; + assigned-clock-rates = <74250000>,
arch/arm/boot/dts/st/stih418.dtsi thermal@91a0000 { · line 215
Quoted 10 lines
arch/arm/boot/dts/st/stih418.dtsi +10
-0+ <0>, + <74250000>, + <0>, + <74250000>, + <148500000>; + + status = "disabled"; + }; + + sti_dvo: sti-dvo@a800400 {
I don't know, but definitely sti is not a generic name.
arch/arm/boot/dts/st/stih418.dtsi thermal@91a0000 { · line 227
Quoted 12 lines
arch/arm/boot/dts/st/stih418.dtsi +12
-0+ compatible = "st,stih407-dvo"; + reg = <0xa800400 0x200>; + reg-names = "dvo-reg"; + clock-names = "dvo_pix", "dvo", + "main_parent", "aux_parent"; + clocks = <&clk_s_d2_flexgen CLK_PIX_DVO>, + <&clk_s_d2_flexgen CLK_DVO>, + <&clk_s_d2_quadfs 0>, <&clk_s_d2_quadfs 1>; + status = "disabled"; + }; + + sti_hdmi: sti-hdmi@a804000 {
hdmi@
Quoted 17 lines
arch/arm/boot/dts/st/stih418.dtsi +17
-0+ compatible = "st,stih418-hdmi"; + reg = <0xa804000 0x1000>; + reg-names = "hdmi-reg"; + #sound-dai-cells = <0>; + interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "irq"; + clock-names = "pix", + "tmds", + "phy", + "audio", + "main_parent", + "aux_parent"; + + clocks = <&clk_s_d2_flexgen CLK_PIX_HDMI>, + <&clk_s_d2_flexgen CLK_TMDS_HDMI>, + <&clk_s_d2_flexgen CLK_REF_HDMIPHY>, + <&clk_s_d0_flexgen CLK_PCM_0>,
arch/arm/boot/dts/st/stih418.dtsi thermal@91a0000 { · line 254
Quoted 10 lines
arch/arm/boot/dts/st/stih418.dtsi +10
-0+ <&clk_s_d2_quadfs 0>, + <&clk_s_d2_quadfs 1>; + + hdmi,hpd-gpio = <&pio5 3 GPIO_ACTIVE_LOW>; + reset-names = "hdmi"; + resets = <&softreset STIH407_HDMI_TX_PHY_SOFTRESET>; + + status = "disabled"; + }; + };
Best regards,
Krzysztof
PATCH 13/14 ARM: dts: sti: add the gpu node for the MALI-400 on stih418.dtsi
In reply to Alain VolmatAdd the gpu node for the MALI-400 found on stih418 soc.
--- arch/arm/boot/dts/st/stih418.dtsi | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
arch/arm/boot/dts/st/stih418.dtsi +34 -0
@@ -268,5 +268,39 @@ vtg_aux: sti-vtg-aux@a800200 { status = "disabled"; }; + + gpu: gpu@9f00000 { + compatible = "arm,mali-400"; + reg = <0x9f00000 0x10000>; + /* LIMA driver needs 2 clocks, use the same for both */ + clocks = <&clk_s_c0_flexgen CLK_ICN_GPU>, + <&clk_s_c0_flexgen CLK_ICN_GPU>; + clock-names = "bus", "core"; + assigned-clocks = <&clk_s_c0_flexgen CLK_ICN_GPU>; + assigned-clock-rates = <400000000>; + resets = <&softreset STIH407_GPU_SOFTRESET>; + interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "gp", + "gpmmu", + "pp0", + "ppmmu0", + "pp1", + "ppmmu1", + "pp2", + "ppmmu2", + "pp3", + "ppmmu3"; + + status = "disabled"; + }; }; };
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 14/14 ARM: dts: sti: enable basic display on stih418-b2264 board
In reply to Alain VolmatEnable the compositor, tvout, hdmi and gpu on the B2264 board.
--- arch/arm/boot/dts/st/stih418-b2264.dts | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
arch/arm/boot/dts/st/stih418-b2264.dts +34 -0
@@ -96,6 +96,14 @@ st,pins { }; }; + hdmiddc: i2c@9541000 { + /* HDMI V1.3a supports Standard mode only */ + clock-frequency = <100000>; + st,i2c-min-scl-pulse-width-us = <0>; + st,i2c-min-sda-pulse-width-us = <5>; + + status = "okay"; + }; }; };
@@ -149,3 +157,29 @@ &spifsm { &st_dwc3 { status = "okay"; }; + +&sti_compo { + status = "okay"; +}; + +&sti_tvout { + status = "okay"; +}; + +&sti_hdmi { + ddc = <&hdmiddc>; + + status = "okay"; +}; + +&vtg_main { + status = "okay"; +}; + +&vtg_aux { + status = "okay"; +}; + +&gpu { + status = "okay"; +};
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 14/14] ARM: dts: sti: enable basic display on stih418-b2264 board
Quoted 12 lines · Alain Volmat
Enable the compositor, tvout, hdmi and gpu on the B2264 board.
Signed-off-by Alain Volmat <[email protected]>--- arch/arm/boot/dts/st/stih418-b2264.dts | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)arch/arm/boot/dts/st/stih418-b2264.dts +0
-0
arch/arm/boot/dts/st/stih418-b2264.dts st,pins { · line 99
Quoted 4 lines
arch/arm/boot/dts/st/stih418-b2264.dts +1
-0@@ -96,6 +96,14 @@ st,pins { }; }; + hdmiddc: i2c@9541000 {
You should really override by labels/phandles...
Best regards,
Krzysztof