Message ID | 20250527-add-venus-for-qcs615-v7-2-cca26e2768e3@quicinc.com |
---|---|
State | New |
Headers | show |
Series | media: venus: enable venus on qcs615 | expand |
On 5/27/2025 9:57 PM, Konrad Dybcio wrote: > On 5/27/25 5:32 AM, Renjiang Han wrote: >> Add the venus node to the devicetree for the qcs615 platform to enable >> video functionality. The qcs615 platform currently lacks video >> functionality due to the absence of the venus node. Fallback to sc7180 due >> to the same video core. >> >> Signed-off-by: Renjiang Han <quic_renjiang@quicinc.com> >> --- > [...] > >> + interconnects = <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS >> + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, >> + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS >> + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ALWAYS>; > QCOM_ICC_TAG_ACTIVE_ONLY on the second path Thanks for your comment. I'll update it in next version. interconnects = <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ACTIVE_ONLY &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ACTIVE_ONLY>; >> + interconnect-names = "video-mem", >> + "cpu-cfg"; >> + >> + iommus = <&apps_smmu 0xe40 0x20>; > fwiw docs mention 0xe60 0x20 (which result in the exact same resulting sid) OK. Will update it with next version. >> + >> + memory-region = <&pil_video_mem>; >> + >> + status = "disabled"; >> + >> + venus_opp_table: opp-table { >> + compatible = "operating-points-v2"; >> + >> + opp-133330000 { >> + opp-hz = /bits/ 64 <133330000>; >> + required-opps = <&rpmhpd_opp_low_svs>; >> + }; >> + >> + opp-240000000 { >> + opp-hz = /bits/ 64 <240000000>; >> + required-opps = <&rpmhpd_opp_svs>; >> + }; >> + >> + opp-300000000 { >> + opp-hz = /bits/ 64 <300000000>; >> + required-opps = <&rpmhpd_opp_svs_l1>; >> + }; >> + >> + opp-380000000 { >> + opp-hz = /bits/ 64 <380000000>; >> + required-opps = <&rpmhpd_opp_nom>; >> + }; >> + >> + opp-410000000 { >> + opp-hz = /bits/ 64 <410000000>; >> + required-opps = <&rpmhpd_opp_turbo>; > nom_l1 > >> + }; >> + >> + opp-460000000 { >> + opp-hz = /bits/ 64 <460000000>; >> + required-opps = <&rpmhpd_opp_turbo_l1>; > turbo Thanks for your comment, will update like this in next version. opp-410000000 { opp-hz = /bits/ 64 <410000000>; required-opps = <&rpmhpd_opp_nom_l1>; }; opp-460000000 { opp-hz = /bits/ 64 <460000000>; required-opps = <&rpmhpd_opp_turbo>; }; > > Konrad
On 5/28/2025 7:04 PM, Dmitry Baryshkov wrote: > On Wed, May 28, 2025 at 05:13:06PM +0800, Renjiang Han wrote: >> On 5/27/2025 9:57 PM, Konrad Dybcio wrote: >>> On 5/27/25 5:32 AM, Renjiang Han wrote: >>>> Add the venus node to the devicetree for the qcs615 platform to enable >>>> video functionality. The qcs615 platform currently lacks video >>>> functionality due to the absence of the venus node. Fallback to sc7180 due >>>> to the same video core. >>>> >>>> Signed-off-by: Renjiang Han <quic_renjiang@quicinc.com> >>>> --- >>> [...] >>> >>>> + interconnect-names = "video-mem", >>>> + "cpu-cfg"; >>>> + >>>> + iommus = <&apps_smmu 0xe40 0x20>; >>> fwiw docs mention 0xe60 0x20 (which result in the exact same resulting sid) >> OK. Will update it with next version. > How would you update this? Thanks for your comments. I'll update it like this. iommus = <&apps_smmu 0xe60 0x20>; This 0xe40 SID was based on a previous project. However, after rechecking the documentation yesterday and confirming with colleagues, the correct SID value should be 0xe60. I’ve also validated it on local device, it works as expected. The reason 0xe40 seemed to work earlier is due to the mask value being 0x20, which causes the effective SID derived from 0xe40 to be the same as 0xe60. >
diff --git a/arch/arm64/boot/dts/qcom/qcs615.dtsi b/arch/arm64/boot/dts/qcom/qcs615.dtsi index 9befd9a40113245137779d96ac4e822cb9a142c5..a6cb7c5e4e76899a3c12f8c7656d0cf66db43895 100644 --- a/arch/arm64/boot/dts/qcom/qcs615.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs615.dtsi @@ -449,6 +449,11 @@ smem_region: smem@86000000 { no-map; hwlocks = <&tcsr_mutex 3>; }; + + pil_video_mem: pil-video@93400000 { + reg = <0x0 0x93400000 0x0 0x500000>; + no-map; + }; }; soc: soc@0 { @@ -3253,6 +3258,79 @@ gem_noc: interconnect@9680000 { qcom,bcm-voters = <&apps_bcm_voter>; }; + venus: video-codec@aa00000 { + compatible = "qcom,qcs615-venus", "qcom,sc7180-venus"; + reg = <0x0 0x0aa00000 0x0 0x100000>; + interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>; + + clocks = <&videocc VIDEO_CC_VENUS_CTL_CORE_CLK>, + <&videocc VIDEO_CC_VENUS_AHB_CLK>, + <&videocc VIDEO_CC_VENUS_CTL_AXI_CLK>, + <&videocc VIDEO_CC_VCODEC0_CORE_CLK>, + <&videocc VIDEO_CC_VCODEC0_AXI_CLK>; + clock-names = "core", + "iface", + "bus", + "vcodec0_core", + "vcodec0_bus"; + + power-domains = <&videocc VENUS_GDSC>, + <&videocc VCODEC0_GDSC>, + <&rpmhpd RPMHPD_CX>; + power-domain-names = "venus", + "vcodec0", + "cx"; + + operating-points-v2 = <&venus_opp_table>; + + interconnects = <&mmss_noc MASTER_VIDEO_P0 QCOM_ICC_TAG_ALWAYS + &mc_virt SLAVE_EBI1 QCOM_ICC_TAG_ALWAYS>, + <&gem_noc MASTER_APPSS_PROC QCOM_ICC_TAG_ALWAYS + &config_noc SLAVE_VENUS_CFG QCOM_ICC_TAG_ALWAYS>; + interconnect-names = "video-mem", + "cpu-cfg"; + + iommus = <&apps_smmu 0xe40 0x20>; + + memory-region = <&pil_video_mem>; + + status = "disabled"; + + venus_opp_table: opp-table { + compatible = "operating-points-v2"; + + opp-133330000 { + opp-hz = /bits/ 64 <133330000>; + required-opps = <&rpmhpd_opp_low_svs>; + }; + + opp-240000000 { + opp-hz = /bits/ 64 <240000000>; + required-opps = <&rpmhpd_opp_svs>; + }; + + opp-300000000 { + opp-hz = /bits/ 64 <300000000>; + required-opps = <&rpmhpd_opp_svs_l1>; + }; + + opp-380000000 { + opp-hz = /bits/ 64 <380000000>; + required-opps = <&rpmhpd_opp_nom>; + }; + + opp-410000000 { + opp-hz = /bits/ 64 <410000000>; + required-opps = <&rpmhpd_opp_turbo>; + }; + + opp-460000000 { + opp-hz = /bits/ 64 <460000000>; + required-opps = <&rpmhpd_opp_turbo_l1>; + }; + }; + }; + videocc: clock-controller@ab00000 { compatible = "qcom,qcs615-videocc"; reg = <0 0x0ab00000 0 0x10000>;
Add the venus node to the devicetree for the qcs615 platform to enable video functionality. The qcs615 platform currently lacks video functionality due to the absence of the venus node. Fallback to sc7180 due to the same video core. Signed-off-by: Renjiang Han <quic_renjiang@quicinc.com> --- arch/arm64/boot/dts/qcom/qcs615.dtsi | 78 ++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+)