From patchwork Fri Mar 31 19:59:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 77961 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp809464vqo; Fri, 31 Mar 2023 13:09:57 -0700 (PDT) X-Google-Smtp-Source: AKy350ZXrc7ZG2E6ZVHp28A9Zpgnn56UFdoP1CbvGzSs00gSlhq2kRbeqwzdgtG4bGyXFch/zRdB X-Received: by 2002:a17:907:25c8:b0:947:72ad:e14d with SMTP id ae8-20020a17090725c800b0094772ade14dmr6860882ejc.68.1680293397467; Fri, 31 Mar 2023 13:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680293397; cv=none; d=google.com; s=arc-20160816; b=Fq+eZdaC24C8Pbp6w55UfqmMsvbTQe3yHufTFOvVcJhjAsScE0mxgK2EX8/iVlElGO gkoFh5F8AEVN7wgVzM+mtk6+t8zqQrMQP5FwBMlm7Es5c0D/I4xC4nfghKR+DNwB4Hhb xicjS5XmhV0J4h1RxNgddpKTWvVW+UnU25K1KXyMadTUfLWadWuU9pk4IYreHmAx5DDB UQYXraCTkotSKQms+5QsEeCqcQ7GY8z7Apc3/A2LKZ0bvsqKVtsPBA7bySbzKYslZIia RWVuIfm9Vnaa9LS+nSA+R22cdZZv49G7SJ5Ww9XSUaFeFdkJljgcCZtntGFRMM++Xc5X 3Ghg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0fthu4cbJuS/uLvSEiZqvZyqG03DhDKwpcohAdcCNaA=; b=fJyIIc6AhBsAs/yNCw4fPpAAiuWM7lgFMUNtN+D7epnWY4DOaZ6EOQyQJWxBxOySrh 4nVwmayR8UlrEv5nFnD4t9lcvZqOSBeELGiLCHE+QPPYrtHuzbik6I4brSMBwedxf27A oVXeYqq3zxw+ugkwHmcOPtV7oma66E+GWX4G8Sj4Dm8/AJ0W9SNkql+5JX2B+je/cyDs qbBkvDiByt3LMkawEyfK5Ys5vOZac+Ks/YfTwVXSXSf3va75wI21izjLT7Qe4/ovb3hY ST5ZGwVKaJL5rnBp4aKzpQ90C8UOmdDpUMQ3Syp/1icLZjuQKzokzoodmVd0L+X003MA RSuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=VU2WVN1v; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k14-20020a17090666ce00b0093035faa90bsi2672284ejp.79.2023.03.31.13.09.33; Fri, 31 Mar 2023 13:09:57 -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=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=VU2WVN1v; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232396AbjCaT7s (ORCPT + 99 others); Fri, 31 Mar 2023 15:59:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232341AbjCaT7h (ORCPT ); Fri, 31 Mar 2023 15:59:37 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9670FAF11 for ; Fri, 31 Mar 2023 12:59:35 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id r11so23562552wrr.12 for ; Fri, 31 Mar 2023 12:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; t=1680292774; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0fthu4cbJuS/uLvSEiZqvZyqG03DhDKwpcohAdcCNaA=; b=VU2WVN1vgP+NTNn1Uvx7/DpTd9Tv1Vtg0p0PKnY5rhSAh10/mvrkj+fGH4oumch1/A rH3cteopkCW/wmEh/b65lAT4JXkClniFRAJgANUuZi0ZQ6rskDIhIZ388jpUdWBjRWBR aSR6JiBeZ7t6MqzhszMcCDpwCnmAVsnuS5ryo8VoZHTUTzdlPf1iWChCMpJYsteYiHZ6 449Y2AqE3juVWa3+AQkSC1DIa8gqS5wwRKqtmehtl8eBxC3ZTwlrVylEWzD4eFII5s/g lIKDgVnaptr+YnVRkWjFHLu3h4f9T9gZpnOnBR2IFz5tj90sX3eXsHSTVO6oXwwU/HKE KlSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680292774; 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:message-id:reply-to; bh=0fthu4cbJuS/uLvSEiZqvZyqG03DhDKwpcohAdcCNaA=; b=atVe4mkIamFgpAM/DspYabuWUhCCPzyNSTuxuPz6dLQSJXoLHT/q3DJexRclhmFMSB SQsVTnCqLNWp4DSNoXJunip/d9sGhiCuN/rkeakAoScEXFuGkKe0mK7NudR3mHLsbQjj gZl5k3wDtzhfHdZwG9LKf6nNhxdtiUChyk+sYu5WbLN7vRugLxEXo+b1ybKf2qhLdg95 NO+tV5dCSs9nhAcDMOCsMzYzNZq/LSvZdg1QhiEUYlKRncICdVs2dePLvYtmBkJ7/XGa 4DrU/o/Kxlar+FnuI7ERtYmUa/94zh7+gn0DYtr1KHVr32/RPPnajz7/0ts1SaI3KDw6 DcRQ== X-Gm-Message-State: AAQBX9fm0d3EpjAoS2aOqsoAh04d3imNTAyVWBRGMb0YDQDB5ChE4VUx r0dLYL1mBMwgKd0EXB9X2Hr2dg== X-Received: by 2002:a05:6000:1044:b0:2e4:c9ac:c49c with SMTP id c4-20020a056000104400b002e4c9acc49cmr5485342wrx.26.1680292774097; Fri, 31 Mar 2023 12:59:34 -0700 (PDT) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:1dc:d1f:e44f:2a1d]) by smtp.gmail.com with ESMTPSA id c13-20020a5d4ccd000000b002cff0e213ddsm2990286wrt.14.2023.03.31.12.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 12:59:33 -0700 (PDT) From: Bartosz Golaszewski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Manivannan Sadhasivam , Alim Akhtar , Avri Altman , Bart Van Assche Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 3/5] phy: qualcomm: phy-qcom-qmp-ufs: add definitions for sa8775p Date: Fri, 31 Mar 2023 21:59:18 +0200 Message-Id: <20230331195920.582620-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230331195920.582620-1-brgl@bgdev.pl> References: <20230331195920.582620-1-brgl@bgdev.pl> MIME-Version: 1.0 X-Spam-Status: No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761915329334577001?= X-GMAIL-MSGID: =?utf-8?q?1761915329334577001?= From: Bartosz Golaszewski Add QMP PHY config for sa8775p and add support for the new compatible. Signed-off-by: Bartosz Golaszewski --- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 38 +++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c index 994ddd5d4a81..126bd47c3fa0 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -823,6 +823,41 @@ static const struct qmp_phy_cfg msm8996_ufsphy_cfg = { .no_pcs_sw_reset = true, }; + +static const struct qmp_phy_cfg sa8775p_ufsphy_cfg = { + .lanes = 2, + + .offsets = &qmp_ufs_offsets, + + .tbls = { + .serdes = sm8350_ufsphy_serdes, + .serdes_num = ARRAY_SIZE(sm8350_ufsphy_serdes), + .tx = sm8350_ufsphy_tx, + .tx_num = ARRAY_SIZE(sm8350_ufsphy_tx), + .rx = sm8350_ufsphy_rx, + .rx_num = ARRAY_SIZE(sm8350_ufsphy_rx), + .pcs = sm8350_ufsphy_pcs, + .pcs_num = ARRAY_SIZE(sm8350_ufsphy_pcs), + }, + .tbls_hs_b = { + .serdes = sm8350_ufsphy_hs_b_serdes, + .serdes_num = ARRAY_SIZE(sm8350_ufsphy_hs_b_serdes), + }, + .tbls_hs_g4 = { + .tx = sm8350_ufsphy_g4_tx, + .tx_num = ARRAY_SIZE(sm8350_ufsphy_g4_tx), + .rx = sm8350_ufsphy_g4_rx, + .rx_num = ARRAY_SIZE(sm8350_ufsphy_g4_rx), + .pcs = sm8350_ufsphy_g4_pcs, + .pcs_num = ARRAY_SIZE(sm8350_ufsphy_g4_pcs), + }, + .clk_list = sm8450_ufs_phy_clk_l, + .num_clks = ARRAY_SIZE(sm8450_ufs_phy_clk_l), + .vreg_list = qmp_phy_vreg_l, + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), + .regs = ufsphy_v5_regs_layout, +}; + static const struct qmp_phy_cfg sc8280xp_ufsphy_cfg = { .lanes = 2, @@ -1542,6 +1577,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = { }, { .compatible = "qcom,msm8998-qmp-ufs-phy", .data = &sdm845_ufsphy_cfg, + }, { + .compatible = "qcom,sa8775p-qmp-ufs-phy", + .data = &sa8775p_ufsphy_cfg, }, { .compatible = "qcom,sc8180x-qmp-ufs-phy", .data = &sm8150_ufsphy_cfg,