From patchwork Sat Sep 24 08:51:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 608864 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 27793C6FA90 for ; Sat, 24 Sep 2022 08:51:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233612AbiIXIvf (ORCPT ); Sat, 24 Sep 2022 04:51:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233505AbiIXIvd (ORCPT ); Sat, 24 Sep 2022 04:51:33 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89796F3135 for ; Sat, 24 Sep 2022 01:51:32 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id s6so3604946lfo.7 for ; Sat, 24 Sep 2022 01:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=xNoN7Rur629DmHYO6x8lTOQzMphVPPTOlrlp3Mu/xhg=; b=M+VYFsnT7wx332ngBy0fhnt5a9ykY3FoKYjc9sEAsNODehBiFX2kIpCpSbSxje//7M Lct5RwwYbJTPCmcHg0osNqEEQvk3VZ5Uo+j6XP2hRjc8aeFpEGijsyUBexntcEMU/Efq rhJ76SzVyIbjdOltIeLE5C9SzM0jT3YL8Fe0mRhfPwgxbQhDGEIzIQt7scHIgKAF6qVi ibHDxziuFZPcUzt0A5ZwpkvBym0USkKmfenHnwgIPe/OV79BCQjkfJU8PF2E9nj253h3 D/pSLUdWss/V+7L6nMnglx0lVShUFQTLWDu2he2NKoTxEsl4Gw/z9l8WNwQ+M4qT29dI y8AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=xNoN7Rur629DmHYO6x8lTOQzMphVPPTOlrlp3Mu/xhg=; b=f2EswcbScfpVsrxjrccOoJy/SC7tugjBlMbMDGlPKy100fPUAysWCQZHzu0hs7uBRm WUbg5sEaelXqgs0ElfA0JjoMplZ6eHCFItrGInjQSyF+GhWW0Zsue/PODaLEvIU9J3sF fiNzap2H339nxNPM77eNsVYYuCupwZbej5zhbVzazIdIPbVmLgntkmEDKgK1Wvwf5E7h IuI46z3tch2ihYxhcJtqK4iQF/n/cMp0bvoJmT8M4W0szJYdkix4xlrEIh1oaj7FDfaX TZkUQCBQC7bXAP/weIeZIwhVDuxD8OuqtZexsVXPIN61pp/qLkZfImI6boKYEx/2z5XP bYqg== X-Gm-Message-State: ACrzQf2rVnmi0wI8nNmb2rt+fPaxB3MySbOFNjQdKqSMZRP3neKvxGwP ouC0KQRQWwz3m2Sq3xe1plnkwQ== X-Google-Smtp-Source: AMsMyM66Uofz3Y3RoWQKzaoPo3wwTKaiclsITBOK1mBebDIaGOUt9+kbh72dpigvd21js3NSrIiS2Q== X-Received: by 2002:a05:6512:6c7:b0:49f:5491:3330 with SMTP id u7-20020a05651206c700b0049f54913330mr4821276lff.197.1664009490916; Sat, 24 Sep 2022 01:51:30 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id 129-20020a2e0987000000b0026acfbbcb7esm1717607ljj.12.2022.09.24.01.51.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Sep 2022 01:51:30 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Clark , Sean Paul , Abhinav Kumar , Rob Herring , Krzysztof Kozlowski Cc: Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Loic Poulain Subject: [PATCH v2 1/2] dt-bindings: display/msm: Add QCM2290 DSI phy Date: Sat, 24 Sep 2022 11:51:28 +0300 Message-Id: <20220924085129.161086-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220924085129.161086-1-dmitry.baryshkov@linaro.org> References: <20220924085129.161086-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Loic Poulain QCM2290 platform uses the 14nm DSI PHY driver. Signed-off-by: Loic Poulain [DB: changed compat to follow the agreed scheme] Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml b/Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml index bc3d0b4063c7..088a03ed5f80 100644 --- a/Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml +++ b/Documentation/devicetree/bindings/display/msm/dsi-phy-14nm.yaml @@ -17,6 +17,7 @@ properties: - qcom,dsi-phy-14nm - qcom,dsi-phy-14nm-660 - qcom,dsi-phy-14nm-8953 + - qcom,qcm2290-dsi-phy-14nm reg: items: From patchwork Sat Sep 24 08:51:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 609769 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0FF9C6FA86 for ; Sat, 24 Sep 2022 08:51:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233514AbiIXIvg (ORCPT ); Sat, 24 Sep 2022 04:51:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233550AbiIXIve (ORCPT ); Sat, 24 Sep 2022 04:51:34 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C41AF311F for ; Sat, 24 Sep 2022 01:51:33 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id a2so3619675lfb.6 for ; Sat, 24 Sep 2022 01:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=y804vYXnT9ULeC1CnYfjzy6Yc9O3b/jntIG9n83g1pg=; b=hbOexKNwYVFPWR36i6dlMhDCJMHsaKUiL7kKWpFft9Mzvp61ZQPgK/5ZdRkLGRMywg /U4GzquELJ6zOcLQbgFE6p8mtyJ61uciZ1NTcMFPbVC+Q5tQTeAs8HjQEtSlcAJgP9pz gatsKBuzGx5hsN2Melhy01pSj4rfgdc4DAK8uyD5cSs5yaztTyCL556Umd2E8JYRnuL5 zDy4L/fBWtMcGK0d5KgRFXMqqhtbYEcCnsubziokHxQcbb7UEzFoLmqfG3A/+bQ5ixg0 bNEk8iSe04PfpwoYCOLai9O65AWwG/VUlL4Fpp9XY3aqC7IsBLokJTd6dCT+P5J5UYT/ jtew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=y804vYXnT9ULeC1CnYfjzy6Yc9O3b/jntIG9n83g1pg=; b=3yVrdjZ4S2oiLsTVE937081FpyOA3P+8w3frEuCRGOTDWIkRBgJHPna7+szES+Dvg3 Le9msOcm6i/ivM1fw0XS1OD/vYFUwGjfXKWmSlvRARKXI6HO8o6kIztWXtrOJUBglsIS LntQvU5XCYodVjPMJddvvZw9lA/nHeJIxBUh/JLpXatalEzjRZ1323WYqvfTH6O/O2sb eN33T/XxSFG3oE5AVB253ikA0TZyQ43oceP3by2l7+XOYAdCWmucLaZTmuNfNTtYroPP ztzA6CJxZOVSWJ2WtNzdD4VActjDdUkesIrs4s+V3/a6Rp/Wbj0M5cuwJDolZp6/j9wa eHpw== X-Gm-Message-State: ACrzQf3pColXSYBaYdgYYDVolc3I0jFls1QzC8KdJWyXdF7ijwn7s3bE v5rNgK+vgpSFjWNPORPIdbaPTA== X-Google-Smtp-Source: AMsMyM6BIua/fMcQPIY9giKkgW9iHC/0YUTXF5zODgP30U6tAWOHB58Xo2k4IMbBn/hkKEDauYPcJw== X-Received: by 2002:ac2:53a1:0:b0:49f:6086:4868 with SMTP id j1-20020ac253a1000000b0049f60864868mr4940246lfh.518.1664009491826; Sat, 24 Sep 2022 01:51:31 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id 129-20020a2e0987000000b0026acfbbcb7esm1717607ljj.12.2022.09.24.01.51.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Sep 2022 01:51:31 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Clark , Sean Paul , Abhinav Kumar , Rob Herring , Krzysztof Kozlowski Cc: Stephen Boyd , David Airlie , Daniel Vetter , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Loic Poulain Subject: [PATCH v2 2/2] drm/msm/dsi: Add phy configuration for QCM2290 Date: Sat, 24 Sep 2022 11:51:29 +0300 Message-Id: <20220924085129.161086-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220924085129.161086-1-dmitry.baryshkov@linaro.org> References: <20220924085129.161086-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Loic Poulain The QCM2290 SoC a the 14nm (V2.0) single DSI phy. The platform is not fully compatible with the standard 14nm PHY, so it requires a separate compatible and config entry. Signed-off-by: Loic Poulain [DB: changed compat to follow the agreed scheme, rebased and updated commit msg] Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 2 ++ drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 1 + drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c index 7fc0975cb869..724d5fa0788a 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c @@ -553,6 +553,8 @@ static const struct of_device_id dsi_phy_dt_match[] = { .data = &dsi_phy_14nm_660_cfgs }, { .compatible = "qcom,dsi-phy-14nm-8953", .data = &dsi_phy_14nm_8953_cfgs }, + { .compatible = "qcom,qcm2290-dsi-phy-14nm", + .data = &dsi_phy_14nm_2290_cfgs }, #endif #ifdef CONFIG_DRM_MSM_DSI_10NM_PHY { .compatible = "qcom,dsi-phy-10nm", diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h index 60a99c6525b2..1096afedd616 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h @@ -50,6 +50,7 @@ extern const struct msm_dsi_phy_cfg dsi_phy_20nm_cfgs; extern const struct msm_dsi_phy_cfg dsi_phy_28nm_8960_cfgs; 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_14nm_2290_cfgs; extern const struct msm_dsi_phy_cfg dsi_phy_14nm_8953_cfgs; extern const struct msm_dsi_phy_cfg dsi_phy_10nm_cfgs; extern const struct msm_dsi_phy_cfg dsi_phy_10nm_8998_cfgs; diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c index 0f8f4ca46429..9f488adea7f5 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c @@ -1081,3 +1081,20 @@ const struct msm_dsi_phy_cfg dsi_phy_14nm_8953_cfgs = { .io_start = { 0x1a94400, 0x1a96400 }, .num_dsi_phy = 2, }; + +const struct msm_dsi_phy_cfg dsi_phy_14nm_2290_cfgs = { + .has_phy_lane = true, + .regulator_data = dsi_phy_14nm_17mA_regulators, + .num_regulators = ARRAY_SIZE(dsi_phy_14nm_17mA_regulators), + .ops = { + .enable = dsi_14nm_phy_enable, + .disable = dsi_14nm_phy_disable, + .pll_init = dsi_pll_14nm_init, + .save_pll_state = dsi_14nm_pll_save_state, + .restore_pll_state = dsi_14nm_pll_restore_state, + }, + .min_pll_rate = VCO_MIN_RATE, + .max_pll_rate = VCO_MAX_RATE, + .io_start = { 0x5e94400 }, + .num_dsi_phy = 1, +};