Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15930392rwd; Mon, 26 Jun 2023 03:28:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ52vdqQaYSuM439V4F0cbWP0ocEBODyHWKXgr6zYp4k/wEbJ7AACUsDVPV3nnJujlMrD+ic X-Received: by 2002:a05:622a:60d:b0:3f9:c8a1:36cc with SMTP id z13-20020a05622a060d00b003f9c8a136ccmr34680492qta.4.1687775328650; Mon, 26 Jun 2023 03:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687775328; cv=none; d=google.com; s=arc-20160816; b=xqKvyPZIv2QJ05Bi2f4ofs2Hm40mQINUjkfE7cYCn4lSI3oaADJloEiVZ2J5JTHnjI i2DYFSnxgxhbN863nPHjXiQ2nsSmw8CNuJWZ960XVNxTe9GxBntWzqUniqMTA5diSE7G /mPYVNMkfk3Jhdr9W2VrosQnZnM5jYJ1U15WBH7GeGdwnbrPjgvjglOFOEaw1U7zZST9 shzyCvnUKlVKoy+ph1Z5420KbTJShMyc11/IjtubllwQb33LzSVx6fUN5RE1jt1OCzkY PvYvGaYXJI74Jz9V54V+gS/vi4EltntldJaaR2P8KahKTYArg59qHj4Qb2pibKY1UlYX jTvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=r48qhWy74bZBBa7bMcUvYWqc1h0+KVW4IUCOHacmlpM=; fh=ZKeJxF8NKmly4ekDocD9UfUIvncSbW0VzQkx28GmKCg=; b=BXLZne6VkKY+uHD/ZoYG+BHLpKMf1C9mS7bT5S8pY+wULtIOFp7vS7/8GuX0+DBQvB HDdm5JzU/Ai+1sElYqJv074PO1g5sRqMBMHM1UiK/7Jui6jrzanDSkHq/50muK03xLKj GAQMcwppcDifQQfV2jVPzKKbr3Mq31H7/9p0Sl5b6ue+vNAABD19T0BhTegXUvXlO1gs 4zxBncT6A3ZpzLXt/t9+CCBmqls4x2/HYxMh+i7QqqT4/MeMs7wy3jjURN+SRZUNFDuo npdAx1upPDVoEPgwI6qy4ft/gZe1TkoIhEL+o+Z2BW0vepF4njzoEzhKxbCe5CvKRIDU p0tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qV1mIEwH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx16-20020a056a00429000b006632ef0dcf8si4593460pfb.53.2023.06.26.03.28.36; Mon, 26 Jun 2023 03:28:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qV1mIEwH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229811AbjFZJuJ (ORCPT + 99 others); Mon, 26 Jun 2023 05:50:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229828AbjFZJuH (ORCPT ); Mon, 26 Jun 2023 05:50:07 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A108CAF for ; Mon, 26 Jun 2023 02:50:05 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4f86dbce369so3873928e87.0 for ; Mon, 26 Jun 2023 02:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687773004; x=1690365004; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=r48qhWy74bZBBa7bMcUvYWqc1h0+KVW4IUCOHacmlpM=; b=qV1mIEwHOGw5gY7390ETBIZaF9GKYobrrLXpVWevs0+byXiuoEJ29jFm+B8QBsbsdS je7AB1mQGEjNSC6D1F4+N4MDLnvU4O3A2+1cggsJ9iHtgYJNQtpdyp9iaLVjfl+Ni8kG hjMr+lBP0T7MJ9Xd5ZlNRrJR7Be6IwtJcSaCKgy5YggT8aa4LclwAPufocODFHNFJl28 +pPg90W4dj/VcooFn0qJAuCrfRPKnkJgIwgVh1XAdDhLKOaO/CN1IR2blqHpCi0cTgA4 ywYwlcltNY6GyxCUt8Fd6HywhS9Ogi7l/RCpndLwfapJdGbd0ABGJ21JlHCBQQaqW1WU HL6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687773004; x=1690365004; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=r48qhWy74bZBBa7bMcUvYWqc1h0+KVW4IUCOHacmlpM=; b=fdOyfuWnmwvHLB0YbLnYhiItowIAr2vAoSJg1EV4OkH0rg06jauYjLaf16URrxNnP9 q8aspWEVydsO7WlTyxL/rrwSMM996GnyUKRpsdvtfjUvIfjjog8KCJiX2NV8tD1Y6fnG U4i7wRFLig3KN8vTkioZtmn4hoI00f+f6gn55+PNY1P+2ijuaS8ixUswqcbDP89kba1y 5yE45rXrmWH8u57K0T6vKGRE6QIW8PsbkqejHD0Db9GsAGFPmjveFPAiKUB7rEzBdWha dlKQTw54VREPb8BscWlZWowYMc8WdTPRAut+UeLb23YYNovzeAfPOHp/95C5SsWarlhe BCBQ== X-Gm-Message-State: AC+VfDyTFAIiz9234Una6dqtF8f/oacSTI/kO9Wweq1TB4SJY8r6AVtE Xurabc31tRkF24rTHMZXrpzGbQ== X-Received: by 2002:a19:3813:0:b0:4f8:7697:5207 with SMTP id f19-20020a193813000000b004f876975207mr11276238lfa.23.1687773003856; Mon, 26 Jun 2023 02:50:03 -0700 (PDT) Received: from [192.168.1.101] (abyk179.neoplus.adsl.tpnet.pl. [83.9.30.179]) by smtp.gmail.com with ESMTPSA id b2-20020a056512024200b004f87726f531sm1033542lfo.174.2023.06.26.02.50.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Jun 2023 02:50:03 -0700 (PDT) Message-ID: <72915ade-7bd5-2f82-b294-e96fd1e71569@linaro.org> Date: Mon, 26 Jun 2023 11:50:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 11/15] drm/msm/dsi: Add 14nm phy configuration for SM6125 Content-Language: en-US To: Marijn Suijten Cc: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Turquette , Stephen Boyd , Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , David Airlie , Daniel Vetter , Krishna Manikandan , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Martin Botka , Jami Kettunen , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Lux Aliaga References: <20230624-sm6125-dpu-v1-0-1d5a638cebf2@somainline.org> <20230624-sm6125-dpu-v1-11-1d5a638cebf2@somainline.org> <18d969bb-69b5-0d42-1518-e8a3b92859b7@linaro.org> From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25.06.2023 22:23, Marijn Suijten wrote: > On 2023-06-24 03:49:25, Konrad Dybcio wrote: >> On 24.06.2023 02:41, Marijn Suijten wrote: >>> SM6125 features only a single PHY (despite a secondary PHY PLL source >>> being available to the disp_cc_mdss_pclk0_clk_src clock), and downstream >>> sources for this "trinket" SoC do not define the typical "vcca" >>> regulator to be available nor used. >>> >>> Signed-off-by: Marijn Suijten >>> --- >> The introduced ops are identical to 2290, modulo regulator.. > > Sure, I can create a "drop unused regulators from 14nm qcm2290 config" > and a second "reuse qcm2290 14nm dsi phy for sm6125" patch, instead of > this one. Please do. > >> But the regulator is absent on both (VDD_MX powers it instead), so > > In the DT patch you requested me to use CX instead of MX... Which one is > it? You're confusing DSI host with DSI PHY. > > Also note that I moved it from DSI PHY to DSI0 because that's where the > rpmpd opps reside. Both of them need their separate power lines to be active! Also, OPP is not necessary for genpd activation. Konrad > > - Marijn > >> feel free to clean that up and reuse it ;) > >> >> Konrad >>> 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 | 15 +++++++++++++++ >>> 3 files changed, 18 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c >>> index 9d5795c58a98..8688ed502dcf 100644 >>> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c >>> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c >>> @@ -559,6 +559,8 @@ static const struct of_device_id dsi_phy_dt_match[] = { >>> .data = &dsi_phy_14nm_2290_cfgs }, >>> { .compatible = "qcom,dsi-phy-14nm-660", >>> .data = &dsi_phy_14nm_660_cfgs }, >>> + { .compatible = "qcom,dsi-phy-14nm-6125", >>> + .data = &dsi_phy_14nm_6125_cfgs }, >>> { .compatible = "qcom,dsi-phy-14nm-8953", >>> .data = &dsi_phy_14nm_8953_cfgs }, >>> #endif >>> diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h >>> index 8b640d174785..ebf915f5e6c6 100644 >>> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h >>> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.h >>> @@ -52,6 +52,7 @@ extern const struct msm_dsi_phy_cfg dsi_phy_20nm_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_6125_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 3ce45b023e63..5d43c9ec69ae 100644 >>> --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c >>> +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy_14nm.c >>> @@ -1068,6 +1068,21 @@ const struct msm_dsi_phy_cfg dsi_phy_14nm_660_cfgs = { >>> .num_dsi_phy = 2, >>> }; >>> >>> +const struct msm_dsi_phy_cfg dsi_phy_14nm_6125_cfgs = { >>> + .has_phy_lane = true, >>> + .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, >>> +}; >>> + >>> const struct msm_dsi_phy_cfg dsi_phy_14nm_8953_cfgs = { >>> .has_phy_lane = true, >>> .regulator_data = dsi_phy_14nm_17mA_regulators, >>>