From patchwork Thu Feb 11 18:09:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 12083833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 280A2C433E0 for ; Thu, 11 Feb 2021 18:25:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E642F64E5F for ; Thu, 11 Feb 2021 18:25:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231758AbhBKSOA (ORCPT ); Thu, 11 Feb 2021 13:14:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232607AbhBKSLn (ORCPT ); Thu, 11 Feb 2021 13:11:43 -0500 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 918B4C06178B for ; Thu, 11 Feb 2021 10:11:02 -0800 (PST) Received: by mail-qk1-x732.google.com with SMTP id f17so2828076qkl.5 for ; Thu, 11 Feb 2021 10:11:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VFjJmq0Au97vKEfgrOVE/VaVkFx8gpBh2nvbd9qF3qo=; b=oLsfKtdBHgllepKJH+vCG8ut+yPBNLBuIoJxElvlb/FuPzcilauZ/SmNL6X5o5UsRt 7kgMYEisLa3F6ekLvZS0hKkit4uEnWNYGoZN51/8t6V7wRzntCT08ZURW8fVnqtINRDe GCEE1RwttUoNIuzNv/9nLugzzoGR5F3XOdhjCbBX5EWpoiiQMBcC5+LYFm3JFd9WaVBJ BgEdSnczRdO8p/cG0vx3NHGkZS61JVd4N+YdbVLA8Zhbdk8HDY1QEUfUOXv+/KTde2HV ZWwZwRdcbZRinUwpKnkckinczIHGV1qs+/yejTNURBpRBDvNgfKZ/y93LNfsNWS83m6y ogNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VFjJmq0Au97vKEfgrOVE/VaVkFx8gpBh2nvbd9qF3qo=; b=nzRrUjM2qWL2Ze/PiU9cZsGhF9s152nUVDKsDxYvpqTmRRreQWxUHGRuw9yecHRD40 JmgkDEEzhId1MBCiDhVIF+JplLLlwsKuKqXWY4MHeTIAeNYr+T6G7lQ8zRxYQo5zrr+6 SZjGYSAwreRz51MaY7Y4jmIhT8WYZAQ+GqRx/x6thopS6cED+Yt/sdM0xrNgNDYzxVfa LORyNZiHqTJPZlFYe3AfTd5wHf4sosGDBJ8DeBB8zwjxv8fRZWDhfE7TAa2Ulhd8ZqYt YVbIcqggLBqJAw1NzsJCpRP3czv260eEV155G1fzy/yDWw6GSXFBPYIYz0+CQy8IkWVS GjuA== X-Gm-Message-State: AOAM533EcfuFR2ZUh9YvAKD20YbePDBqShMj1m0oSoLRWD2ALCG/BQVR ALsSV9TKZ4OPwkfzd/K6v/XsnyWEDIpRaVI1nO0= X-Google-Smtp-Source: ABdhPJwGeYIMl8RtZKOdfKhuiF+eJt//mE53X4FrP9+Ds8+LpqwJVfthU5hhps7b9Knm+Ahd3Dorvg== X-Received: by 2002:a05:620a:1315:: with SMTP id o21mr7456372qkj.3.1613067061549; Thu, 11 Feb 2021 10:11:01 -0800 (PST) Received: from localhost.localdomain (modemcable068.184-131-66.mc.videotron.ca. [66.131.184.68]) by smtp.gmail.com with ESMTPSA id 11sm4615412qkm.25.2021.02.11.10.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 10:11:01 -0800 (PST) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Cc: Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Rob Herring , Jordan Crouse , Kalyan Thota , Tanmay Shah , Eric Anholt , Drew Davenport , Jeykumar Sankaran , Rajendra Nayak , tongtiangen , Qinglang Miao , dri-devel@lists.freedesktop.org (open list:DRM DRIVER FOR MSM ADRENO GPU), freedreno@lists.freedesktop.org (open list:DRM DRIVER FOR MSM ADRENO GPU), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] drm/msm: add compatibles for sm8150/sm8250 display Date: Thu, 11 Feb 2021 13:09:58 -0500 Message-Id: <20210211181002.22922-2-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20210211181002.22922-1-jonathan@marek.ca> References: <20210211181002.22922-1-jonathan@marek.ca> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The driver already has support for sm8150/sm8250, but the compatibles were never added. Also inverse the non-mdp4 condition in add_display_components() to avoid having to check every new compatible in the condition. Signed-off-by: Jonathan Marek --- Documentation/devicetree/bindings/display/msm/dpu.txt | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 ++ drivers/gpu/drm/msm/msm_drv.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/display/msm/dpu.txt b/Documentation/devicetree/bindings/display/msm/dpu.txt index 551ae26f60da..5763f43200a0 100644 --- a/Documentation/devicetree/bindings/display/msm/dpu.txt +++ b/Documentation/devicetree/bindings/display/msm/dpu.txt @@ -8,7 +8,7 @@ The DPU display controller is found in SDM845 SoC. MDSS: Required properties: -- compatible: "qcom,sdm845-mdss", "qcom,sc7180-mdss" +- compatible: "qcom,sdm845-mdss", "qcom,sc7180-mdss", "qcom,sm8150-mdss", "qcom,sm8250-mdss" - reg: physical base address and length of contoller's registers. - reg-names: register region names. The following region is required: * "mdss" @@ -41,7 +41,7 @@ Optional properties: MDP: Required properties: -- compatible: "qcom,sdm845-dpu", "qcom,sc7180-dpu" +- compatible: "qcom,sdm845-dpu", "qcom,sc7180-dpu", "qcom,sm8150-dpu", "qcom,sm8250-dpu" - reg: physical base address and length of controller's registers. - reg-names : register region names. The following region is required: * "mdp" diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 5a8e3e1fc48c..fff12a4c8bfc 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -1219,6 +1219,8 @@ static const struct dev_pm_ops dpu_pm_ops = { static const struct of_device_id dpu_dt_match[] = { { .compatible = "qcom,sdm845-dpu", }, { .compatible = "qcom,sc7180-dpu", }, + { .compatible = "qcom,sm8150-dpu", }, + { .compatible = "qcom,sm8250-dpu", }, {} }; MODULE_DEVICE_TABLE(of, dpu_dt_match); diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 94525ac76d4e..928f13d4bfbc 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1185,9 +1185,7 @@ static int add_display_components(struct device *dev, * Populate the children devices, find the MDP5/DPU node, and then add * the interfaces to our components list. */ - if (of_device_is_compatible(dev->of_node, "qcom,mdss") || - of_device_is_compatible(dev->of_node, "qcom,sdm845-mdss") || - of_device_is_compatible(dev->of_node, "qcom,sc7180-mdss")) { + if (!of_device_is_compatible(dev->of_node, "qcom,mdp4")) { ret = of_platform_populate(dev->of_node, NULL, NULL, dev); if (ret) { DRM_DEV_ERROR(dev, "failed to populate children devices\n"); @@ -1320,6 +1318,8 @@ static const struct of_device_id dt_match[] = { { .compatible = "qcom,mdss", .data = (void *)KMS_MDP5 }, { .compatible = "qcom,sdm845-mdss", .data = (void *)KMS_DPU }, { .compatible = "qcom,sc7180-mdss", .data = (void *)KMS_DPU }, + { .compatible = "qcom,sm8150-mdss", .data = (void *)KMS_DPU }, + { .compatible = "qcom,sm8250-mdss", .data = (void *)KMS_DPU }, {} }; MODULE_DEVICE_TABLE(of, dt_match); From patchwork Thu Feb 11 18:09:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Marek X-Patchwork-Id: 12083831 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB7B7C433DB for ; Thu, 11 Feb 2021 18:25:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85B4764E5F for ; Thu, 11 Feb 2021 18:25:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231948AbhBKSNz (ORCPT ); Thu, 11 Feb 2021 13:13:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231758AbhBKSLp (ORCPT ); Thu, 11 Feb 2021 13:11:45 -0500 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74549C061794 for ; Thu, 11 Feb 2021 10:11:04 -0800 (PST) Received: by mail-qk1-x729.google.com with SMTP id t63so6128310qkc.1 for ; Thu, 11 Feb 2021 10:11:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marek-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y4RC940/J5vqsaVIPUQNgWPR3nZvZ8dS+NWG2FVApHg=; b=zCo1c5051LK4hPwO4DWPdGWEhVsMvHQD93HMbDG5V0p/liAldRQVl2FAKPAwJwQ/L2 QiuhOeVKK9lt1VxO4bVCm33ZVecybl0tOhgn9PHq0xlYJkAymO1y7lWsHKDNbMV3a0e4 8k0q4pF01J8Y1+UM13ZrIQ0bQ0eiGl/0Napz+EGBobm+YZwZg135Ak81EtkAN2BeosS7 pwm1Vk3TxWjGSb7HAfMsbAtWgoJ50Y7rzImMEhHJcooKMUlFhC3s9O1NjWbejB38ipHh f8mhRNeZsZ5mJgKrT5AvK2ffsorP2fjNYvFklgDqgxm00VRYkm3X4W8OpPo35hOsR8Dv TaFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Y4RC940/J5vqsaVIPUQNgWPR3nZvZ8dS+NWG2FVApHg=; b=MXxjctoh5S1uB2llR03EPEpBSDmzqppNwGNgOCVRmF72n64TAXDXcHsXluuiN/WrSd 4QnYvfi41tZ7gszwdPR5qTzkCOhn2hiRKLKK6MhhB/uTihbnhkXkvkS/NXUsP3dxBn8B 5Z7HDrDEyg9wV691W1qKkHEMI3oBjtGhuiYd2GYa3cMNxAh5s6jC2axaCdMdgpG5gYJB xf0tCB1uL1CvgmQsFBP8cl+Cs9pw4F3d2/0+k1cx57EN12wa8NP6DxZpnmelVvzWH1e/ 86x+AZ+bv6rZH/shJqkbrrY2WV8P3sWQEnNUCBsOHqJEp+uiuEJ/Dqp78JjV14TE0vbv A7TA== X-Gm-Message-State: AOAM532HliHKpcXNB4u/rlxPBTx49ekXtJuBYclmnf+V2dvAmjV0CeUo GHhosRiDQSJm1gOL8P2SzkPd+jyq0ZHbIG3B X-Google-Smtp-Source: ABdhPJz9waq/K9FzbyVnTjZ8KBEHlAtEWbEq4NxPq8Fm77HgPGqQvzF1ENDhDdTgTCxuGOk+VAQduQ== X-Received: by 2002:a37:478a:: with SMTP id u132mr9692463qka.135.1613067063249; Thu, 11 Feb 2021 10:11:03 -0800 (PST) Received: from localhost.localdomain (modemcable068.184-131-66.mc.videotron.ca. [66.131.184.68]) by smtp.gmail.com with ESMTPSA id 11sm4615412qkm.25.2021.02.11.10.11.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 10:11:02 -0800 (PST) From: Jonathan Marek To: linux-arm-msm@vger.kernel.org Cc: Andy Gross , Bjorn Andersson , Rob Herring , Dmitry Baryshkov , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] arm64: dts: qcom: sm8250: fix display nodes Date: Thu, 11 Feb 2021 13:09:59 -0500 Message-Id: <20210211181002.22922-3-jonathan@marek.ca> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20210211181002.22922-1-jonathan@marek.ca> References: <20210211181002.22922-1-jonathan@marek.ca> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Apply these fixes to the newly added sm8250 display ndoes - Use sm8250 compatibles instead of sdm845 compatibles - Remove "notused" interconnect (which apparently was blindly copied from my old patches) - Use dispcc node example from dt-bindings, removing clocks which aren't documented or used by the driver and fixing the region size. Note: also removed the mmcx-supply for dispcc which wasn't documented when it was added. I would have left it there but it is also breaking my use-case (setting a lower power level than what the bootloader sets?). Fixes: 7c1dffd471b1 ("arm64: dts: qcom: sm8250.dtsi: add display system nodes") Signed-off-by: Jonathan Marek Reported-by: kernel test robot --- arch/arm64/boot/dts/qcom/sm8250.dtsi | 34 ++++++++-------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi index 947e1accae3a..20a3ff30e924 100644 --- a/arch/arm64/boot/dts/qcom/sm8250.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi @@ -2323,14 +2323,13 @@ usb_2_dwc3: dwc3@a800000 { }; mdss: mdss@ae00000 { - compatible = "qcom,sdm845-mdss"; + compatible = "qcom,sm8250-mdss"; reg = <0 0x0ae00000 0 0x1000>; reg-names = "mdss"; - interconnects = <&gem_noc MASTER_AMPSS_M0 &config_noc SLAVE_DISPLAY_CFG>, - <&mmss_noc MASTER_MDP_PORT0 &mc_virt SLAVE_EBI_CH0>, + interconnects = <&mmss_noc MASTER_MDP_PORT0 &mc_virt SLAVE_EBI_CH0>, <&mmss_noc MASTER_MDP_PORT1 &mc_virt SLAVE_EBI_CH0>; - interconnect-names = "notused", "mdp0-mem", "mdp1-mem"; + interconnect-names = "mdp0-mem", "mdp1-mem"; power-domains = <&dispcc MDSS_GDSC>; @@ -2356,7 +2355,7 @@ mdss: mdss@ae00000 { ranges; mdss_mdp: mdp@ae01000 { - compatible = "qcom,sdm845-dpu"; + compatible = "qcom,sm8250-dpu"; reg = <0 0x0ae01000 0 0x8f000>, <0 0x0aeb0000 0 0x2008>; reg-names = "mdp", "vbif"; @@ -2580,36 +2579,21 @@ opp-358000000 { dispcc: clock-controller@af00000 { compatible = "qcom,sm8250-dispcc"; - reg = <0 0x0af00000 0 0x20000>; - mmcx-supply = <&mmcx_reg>; + reg = <0 0x0af00000 0 0x10000>; clocks = <&rpmhcc RPMH_CXO_CLK>, <&dsi0_phy 0>, <&dsi0_phy 1>, <&dsi1_phy 0>, <&dsi1_phy 1>, - <0>, - <0>, - <0>, - <0>, - <0>, - <0>, - <0>, - <0>, - <&sleep_clk>; + <&dp_phy 0>, + <&dp_phy 1>; clock-names = "bi_tcxo", "dsi0_phy_pll_out_byteclk", "dsi0_phy_pll_out_dsiclk", "dsi1_phy_pll_out_byteclk", "dsi1_phy_pll_out_dsiclk", - "dp_link_clk_divsel_ten", - "dp_vco_divided_clk_src_mux", - "dptx1_phy_pll_link_clk", - "dptx1_phy_pll_vco_div_clk", - "dptx2_phy_pll_link_clk", - "dptx2_phy_pll_vco_div_clk", - "edp_phy_pll_link_clk", - "edp_phy_pll_vco_div_clk", - "sleep_clk"; + "dp_phy_pll_link_clk", + "dp_phy_pll_vco_div_clk"; #clock-cells = <1>; #reset-cells = <1>; #power-domain-cells = <1>;