diff --git a/target/linux/qualcommax/patches-6.12/0170-clk-qcom-gcc-ipq8074-fix-broken-freq-table-for-nss_port6_tx_clk_src.patch b/target/linux/qualcommax/patches-6.12/0170-clk-qcom-gcc-ipq8074-fix-broken-freq-table-for-nss_port6_tx_clk_src.patch new file mode 100644 index 00000000000..1f4c0904e6d --- /dev/null +++ b/target/linux/qualcommax/patches-6.12/0170-clk-qcom-gcc-ipq8074-fix-broken-freq-table-for-nss_port6_tx_clk_src.patch @@ -0,0 +1,143 @@ +From patchwork Thu May 22 20:25:55 2025 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Christian Marangi +X-Patchwork-Id: 14097271 +Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com + [209.85.221.50]) + (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) + (No client certificate requested) + by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE1BF2B9A9; + Thu, 22 May 2025 20:26:28 +0000 (UTC) +Authentication-Results: smtp.subspace.kernel.org; + arc=none smtp.client-ip=209.85.221.50 +ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; + t=1747945590; cv=none; + b=SJyQKJEIm31L7OgiCxpH5eSDCvy3pwWfc5Tm5ylnbA62aIfHLr9TAaJ3qgIEhatEmg1tASNg/kuDmfqVkvTcCgfN89i5AC/I6gvQRguLThtK4NHh5SuCKdUd49BWXk1X+Ma5cEIKEKY+Me0pO1q2XeLvwuWTFN3RHUkygO2Cias= +ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; + s=arc-20240116; t=1747945590; c=relaxed/simple; + bh=RcOtjmSun1IwEL5Wb3PSql0fo4oAT/kf0BO04Ne0FWo=; + h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; + b=lOheyUFV/bVQ1HRRivMF7JOVhTelzBEnWB7rGJmANrNWl2gcgEf+xEHi3nWPULWal/ppIdrVL9LjC0v7KEKoHe6XJ/WmqmhJgrNKiUSUJQbnmUZgaser6iyO9XJUCjR3TlgdSnZ2A8dsLXVbiK2UPLe+GUdb0V5O5ZChOm6rVAM= +ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; + dmarc=pass (p=none dis=none) header.from=gmail.com; + spf=pass smtp.mailfrom=gmail.com; + dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com + header.b=U3Ibckvp; arc=none smtp.client-ip=209.85.221.50 +Authentication-Results: smtp.subspace.kernel.org; + dmarc=pass (p=none dis=none) header.from=gmail.com +Authentication-Results: smtp.subspace.kernel.org; + spf=pass smtp.mailfrom=gmail.com +Authentication-Results: smtp.subspace.kernel.org; + dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com + header.b="U3Ibckvp" +Received: by mail-wr1-f50.google.com with SMTP id + ffacd0b85a97d-3a367ec7840so3966539f8f.2; + Thu, 22 May 2025 13:26:28 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1747945587; x=1748550387; + darn=vger.kernel.org; + h=content-transfer-encoding:mime-version:message-id:date:subject:cc + :to:from:from:to:cc:subject:date:message-id:reply-to; + bh=xgvKtt5DybnIrKc6mWPJ7EZTeS6I4nUMUzu2bm2zMtQ=; + b=U3IbckvpuScfyKSdVLd02B1axIbs/9630TXWceGPzDNFU/YHi8PIALyMXNVBZ5/DGb + fSlmQmam2bC0j5pk1bg2xqWs7I9sCteTah3Ygxo9X1vXhD9PnqbhJfgvQJp3KrNoLwC4 + JdRzdVi/vjJIEEuMlveXpcanmLLn+BjOEYYMs8x3EZ3yLYQr7KkHtJ+V6HTWPsE47qA8 + mOdp/ysLZ2jLPihravIjN6BlUSGMz5EkdYudIljy3wYNiga385aw4aQsa79gd/J7RxjD + o9GAIcFAtoRp4Co7G632DYC+zoYQw1G10ZfIzT7kOCPRZxoevlaGeRVxsgh9bCnsQ9LT + 3aog== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1747945587; x=1748550387; + h=content-transfer-encoding:mime-version:message-id:date:subject:cc + :to:from:x-gm-message-state:from:to:cc:subject:date:message-id + :reply-to; + bh=xgvKtt5DybnIrKc6mWPJ7EZTeS6I4nUMUzu2bm2zMtQ=; + b=Fdp0DTSGLe7u0fvh/rW+co2BBsFkL9sH5Y4cVO/uEyWrOuDZY4wEIY3k7tT9z/qusu + qsBqrFaiXgv99S3sOK6e4buTvnX+yvbk5hBq7kKb+WUSdLnvo7am0NzjlVz3/8ksSosU + g/6WFJbxG/UEf7eQS5ze9cOtfag1nj3qpj/wf1od2RAE8KLaGt1yT2RKXrxvWswjVtWc + TVKIc5mEANR4fTG4AwfOVG6QBU1JfLpTBS41O9THoy/vk3BI9id6by4w3zsD8BSc4Z6W + njvleK+s7I7draMy3YYcYM3etzGD2P5AiJj0NxoyEZ8hCSswjCDIcfQniPRhfblicRBT + Bi+Q== +X-Forwarded-Encrypted: i=1; + AJvYcCU//xD5uHyFhB4sHqPQHkUS/SeqLIOqpGrEMtx0zyh2/T2x39VopI/PnTpe2ESaMCDbmRl8MurqOBOJ@vger.kernel.org, + AJvYcCWlko+5ICQgXGZZ6qZxD3WWDXE1EmkOd7Tw+6qOZDni1suR0Um5tG1VcHHtIJIp034hXQ7Tj5WK3veOVQgD@vger.kernel.org, + AJvYcCXnJcB9/SJexBqJAU7vPtjnJ2eKMHLPx+eHgLCSNvPKpkH7r5TU+eAOzfjqSPvmxKNRZXM/L/CxkyxDzp+n@vger.kernel.org +X-Gm-Message-State: AOJu0Ywgx5kKVjnck8zcNF5jiJmr1aap8FGVVIFxqqFyLqAdMsRpJ5RM + YGVflzDLCHubLU2D5IwFoaoiTDyGi/eHphmIPndSUeFP8moWY/T6O3Pd +X-Gm-Gg: ASbGncunHQP8921RyvQsddVmY7ua8h+QTVvMvQHB4kaRgHeeD58OPdZJCqc3cNVNIP1 + X/LZAzqXAmd7j1ls65igxC/kCtPSyDnS4zh1hu6AFlttxuOfgdWgiXbFyqdozanfhYDRhD11FD6 + aAseq7i2gRb72LDgkGGmwREbBnHgtugTuSboaAJnCaoVVhU53SdpG0XfrAJBxVVHKFRv+WLtktr + o0itJiaG5BklL3SQ7I36EqdExH7yo3mPByvwYI5zarwBqgENcIqxoMbum72iweT8YSB7p6h0iMo + /dPKuoYps8Nt9k6kkL6oF2SkVLjTvYDQ4kna9JVBqwP0UdjBgTo+FMZBNy6UNnEnJC+4gKrLnE+ + I1asottOJwbm+C7Ke4/O9 +X-Google-Smtp-Source: + AGHT+IE/fBAh0wuvEHRV8Pp3re+RzxCwE85Zo4u5IxHZMcKKHBmdPi+/PvNmPZSoI/27B1urc+XZXg== +X-Received: by 2002:a05:6000:2281:b0:3a3:7be3:cba9 with SMTP id + ffacd0b85a97d-3a37be3cebdmr9761395f8f.18.1747945586791; + Thu, 22 May 2025 13:26:26 -0700 (PDT) +Received: from localhost.localdomain (93-34-88-225.ip49.fastwebnet.it. + [93.34.88.225]) + by smtp.googlemail.com with ESMTPSA id + ffacd0b85a97d-3a35ca5a03fsm23883073f8f.22.2025.05.22.13.26.25 + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Thu, 22 May 2025 13:26:25 -0700 (PDT) +From: Christian Marangi +To: Bjorn Andersson , + Michael Turquette , + Stephen Boyd , + Christian Marangi , + linux-arm-msm@vger.kernel.org, + linux-clk@vger.kernel.org, + linux-kernel@vger.kernel.org +Cc: stable@vger.kernel.org +Subject: [PATCH] clk: qcom: gcc-ipq8074: fix broken freq table for + nss_port6_tx_clk_src +Date: Thu, 22 May 2025 22:25:55 +0200 +Message-ID: <20250522202600.4028-1-ansuelsmth@gmail.com> +X-Mailer: git-send-email 2.48.1 +Precedence: bulk +X-Mailing-List: linux-arm-msm@vger.kernel.org +List-Id: +List-Subscribe: +List-Unsubscribe: +MIME-Version: 1.0 + +With the conversion done by commit e88f03230dc0 ("clk: qcom: gcc-ipq8074: +rework nss_port5/6 clock to multiple conf") a Copy-Paste error was made +for the nss_port6_tx_clk_src frequency table. + +This was caused by the wrong setting of the parent in +ftbl_nss_port6_tx_clk_src that was wrongly set to P_UNIPHY1_RX instead +of P_UNIPHY2_TX. + +This cause the UNIPHY2 port to malfunction when it needs to be scaled to +higher clock. The malfunction was observed with the example scenario +with an Aquantia 10G PHY connected and a speed higher than 1G (example +2.5G) + +Fix the broken frequency table to restore original functionality. + +Cc: stable@vger.kernel.org +Fixes: e88f03230dc0 ("clk: qcom: gcc-ipq8074: rework nss_port5/6 clock to multiple conf") +Signed-off-by: Christian Marangi +--- + drivers/clk/qcom/gcc-ipq8074.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/clk/qcom/gcc-ipq8074.c ++++ b/drivers/clk/qcom/gcc-ipq8074.c +@@ -1895,10 +1895,10 @@ static const struct freq_conf ftbl_nss_p + static const struct freq_multi_tbl ftbl_nss_port6_tx_clk_src[] = { + FMS(19200000, P_XO, 1, 0, 0), + FM(25000000, ftbl_nss_port6_tx_clk_src_25), +- FMS(78125000, P_UNIPHY1_RX, 4, 0, 0), ++ FMS(78125000, P_UNIPHY2_TX, 4, 0, 0), + FM(125000000, ftbl_nss_port6_tx_clk_src_125), +- FMS(156250000, P_UNIPHY1_RX, 2, 0, 0), +- FMS(312500000, P_UNIPHY1_RX, 1, 0, 0), ++ FMS(156250000, P_UNIPHY2_TX, 2, 0, 0), ++ FMS(312500000, P_UNIPHY2_TX, 1, 0, 0), + { } + }; +