From patchwork Mon Apr 25 18:22:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 12826044 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 2E7F6C4167D for ; Mon, 25 Apr 2022 18:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244372AbiDYS0W (ORCPT ); Mon, 25 Apr 2022 14:26:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243733AbiDYS0E (ORCPT ); Mon, 25 Apr 2022 14:26:04 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5F76111CB4; Mon, 25 Apr 2022 11:22:59 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id w16so10011781ejb.13; Mon, 25 Apr 2022 11:22:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gvu98N+OnM/luhCQReYWbF6uR2tYpArXdOPWVpsiRFE=; b=NCfMAGpyr61KewdUdbjWyMKju/GFaW1uLf0R5mbdIzKkrnjW/iySxCT0jLufknsz6m WMa0rxN3gY0PRUE6wq9FJgJY6gY1hzzgsvjiCm4l2HImfkBtpbgB5dZkri+HqoXpphAc Zu84I2CTWl4pIsltG9rVZUUn7swSf3SN2ipyU4wIhlVPKPJjryqD/69jUF4JZQjBDTaR QlBQRFO3XFSfMBFK3MVwKiHqIqujBYq66JK7Ybu1vmeKvP+zhwQqiWdZYKuCMMxkXceb OYA37jHbQuXidZeqbyEA72LmccSSVwdpThdVCTJzTMNMmA1+bJr//QJl7xwjgeXZrpxM rVdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gvu98N+OnM/luhCQReYWbF6uR2tYpArXdOPWVpsiRFE=; b=Nb4w68aR+fExecOomBiWGvrKGjYMZ48gN3SQt+wlwUz4ayZ3nN71O3AmHulgaNkTPy CaEB3HHl8IxMq0cJzJndPonKY52V3+IZSybFrhombV4PcjLAEpmo3TmkuM64MzNppP+C JmN2030jV/sLXuHIO/u7yM0R2tlZ2XXiGxjzOF79e61YOw8M8ALSfcPQYF4zx9AcgCZj KR9UxtfkKfBqL+pgm84KkYkNIT0yAWkZwnpskEPFFCG4Vq1rOB2fnE7NqcN7CKWqEYTH Y1jVLHM/eCQ8FJ0ypI0OpQ/jz2LLNs/tfq2CMW7whtnS67uTi0d6kSfywUC81SK+oAmo RG5w== X-Gm-Message-State: AOAM533ifLPv9mDBmNeX7XTGDdd5mcX2SvbsBDflaPuACoFzvxFfoEtJ w0wvXMpIE/DKxlDBMm7b35I= X-Google-Smtp-Source: ABdhPJxYeRdgw7s6UWLZspqRmHYG9DJMH7dAXUm9Tk3Tt7gyDGSAf5mgdfnntKNs12BqzpDn+zUiYg== X-Received: by 2002:a17:907:1686:b0:6f0:c0f:2773 with SMTP id hc6-20020a170907168600b006f00c0f2773mr17640149ejc.445.1650910978204; Mon, 25 Apr 2022 11:22:58 -0700 (PDT) Received: from fedora.robimarko.hr (cpe-94-253-165-91.zg.cable.xnet.hr. [94.253.165.91]) by smtp.googlemail.com with ESMTPSA id h13-20020a170906590d00b006f39021e683sm1677210ejq.12.2022.04.25.11.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Apr 2022 11:22:57 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, absahu@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Robert Marko Subject: [PATCH 4/7] clk: qcom: ipq8074: fix NSS port frequency tables Date: Mon, 25 Apr 2022 20:22:46 +0200 Message-Id: <20220425182249.2753690-4-robimarko@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220425182249.2753690-1-robimarko@gmail.com> References: <20220425182249.2753690-1-robimarko@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org NSS port 5 and 6 frequency tables are currently broken and are causing a wide ranges of issue like 1G not working at all on port 6 or port 5 being clocked with 312 instead of 125 MHz as UNIPHY1 gets selected. So, update the frequency tables with the ones from the downstream QCA 5.4 based kernel which has already fixed this. Fixes: 7117a51ed303 ("clk: qcom: ipq8074: add NSS ethernet port clocks") Signed-off-by: Robert Marko --- drivers/clk/qcom/gcc-ipq8074.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/clk/qcom/gcc-ipq8074.c b/drivers/clk/qcom/gcc-ipq8074.c index 969b38d4ba08..37af41d8b192 100644 --- a/drivers/clk/qcom/gcc-ipq8074.c +++ b/drivers/clk/qcom/gcc-ipq8074.c @@ -1788,8 +1788,10 @@ static struct clk_regmap_div nss_port4_tx_div_clk_src = { static const struct freq_tbl ftbl_nss_port5_rx_clk_src[] = { F(19200000, P_XO, 1, 0, 0), F(25000000, P_UNIPHY1_RX, 12.5, 0, 0), + F(25000000, P_UNIPHY0_RX, 5, 0, 0), F(78125000, P_UNIPHY1_RX, 4, 0, 0), F(125000000, P_UNIPHY1_RX, 2.5, 0, 0), + F(125000000, P_UNIPHY0_RX, 1, 0, 0), F(156250000, P_UNIPHY1_RX, 2, 0, 0), F(312500000, P_UNIPHY1_RX, 1, 0, 0), { } @@ -1828,8 +1830,10 @@ static struct clk_regmap_div nss_port5_rx_div_clk_src = { static const struct freq_tbl ftbl_nss_port5_tx_clk_src[] = { F(19200000, P_XO, 1, 0, 0), F(25000000, P_UNIPHY1_TX, 12.5, 0, 0), + F(25000000, P_UNIPHY0_TX, 5, 0, 0), F(78125000, P_UNIPHY1_TX, 4, 0, 0), F(125000000, P_UNIPHY1_TX, 2.5, 0, 0), + F(125000000, P_UNIPHY0_TX, 1, 0, 0), F(156250000, P_UNIPHY1_TX, 2, 0, 0), F(312500000, P_UNIPHY1_TX, 1, 0, 0), { } @@ -1867,8 +1871,10 @@ static struct clk_regmap_div nss_port5_tx_div_clk_src = { static const struct freq_tbl ftbl_nss_port6_rx_clk_src[] = { F(19200000, P_XO, 1, 0, 0), + F(25000000, P_UNIPHY2_RX, 5, 0, 0), F(25000000, P_UNIPHY2_RX, 12.5, 0, 0), F(78125000, P_UNIPHY2_RX, 4, 0, 0), + F(125000000, P_UNIPHY2_RX, 1, 0, 0), F(125000000, P_UNIPHY2_RX, 2.5, 0, 0), F(156250000, P_UNIPHY2_RX, 2, 0, 0), F(312500000, P_UNIPHY2_RX, 1, 0, 0), @@ -1907,8 +1913,10 @@ static struct clk_regmap_div nss_port6_rx_div_clk_src = { static const struct freq_tbl ftbl_nss_port6_tx_clk_src[] = { F(19200000, P_XO, 1, 0, 0), + F(25000000, P_UNIPHY2_TX, 5, 0, 0), F(25000000, P_UNIPHY2_TX, 12.5, 0, 0), F(78125000, P_UNIPHY2_TX, 4, 0, 0), + F(125000000, P_UNIPHY2_TX, 1, 0, 0), F(125000000, P_UNIPHY2_TX, 2.5, 0, 0), F(156250000, P_UNIPHY2_TX, 2, 0, 0), F(312500000, P_UNIPHY2_TX, 1, 0, 0),