From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Herman van Hazendonk <github.com@herrie.org>,
Georgi Djakov <djakov@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/2] interconnect: qcom: add MSM8x60 NoC driver
Date: Mon, 8 Jun 2026 10:55:32 +0200 [thread overview]
Message-ID: <e0faf562-f882-454a-8719-1d5716ba6fac@oss.qualcomm.com> (raw)
In-Reply-To: <20260606-submit-interconnect-msm8660-v4-2-6e1e5c5efa26@herrie.org>
On 6/6/26 3:00 PM, Herman van Hazendonk wrote:
> Add a Qualcomm interconnect driver for the MSM8x60 family modelling the
> four NoC fabrics (APPSS, System, MMSS, Daytona) that connect masters
> and slaves on these Scorpion-class SoCs. The driver implements the
> interconnect-provider API to manage bandwidth between specific masters
> and slaves via the RPM arbitration tables.
[...]
I'll skip the bulk of this for now, as Dmitry asked you to drop the
clock interface (and do rpm writes directly from this driver, see
icc-rpm-clocks.c and smd-rpm.c)
> +/*
> + * Minimum fabric clock rate to prevent bus starvation.
> + *
> + * When no consumers request bandwidth, the rate calculation yields 0,
> + * causing fabric clocks to drop to minimum. This creates bimodal
> + * performance: fast when other subsystems (like display) happen to
> + * request bandwidth, slow otherwise.
> + *
> + * 384 MHz keeps fabric fast during concurrent MDP display scanout
> + * and USB gadget traffic. legacy vendor kernel docs: "AXI bus frequency needs to be
> + * kept at maximum value while USB data transfers are happening."
> + * 266 MHz was insufficient - USB crashed during display activity.
> + */
> +#define MSM8660_FABRIC_MIN_RATE 384000000UL /* 384 MHz */
So, are there any issues if the USB controller is offline, can we go to
the aforementioned 266 MHz rate then?
> +
> +/*
> + * Maximum RPM ARB buffer size across all fabrics.
> + * MM fabric is largest at 23 u32 words.
> + */
> +#define MSM8660_MAX_RPM_BUF 23
> +
> +/*
> + * RPM fabric arbitration data format (from legacy vendor kernel msm_bus_fabric.c):
> + *
> + * Each u16 arb entry: bit 15 = tier (1=TIER1 high priority), bits 14-0 = BW
> + * Bandwidth is in 128KB units (bytes >> 17).
> + * Two u16 values are packed into each u32 RPM register word.
> + *
> + * Buffer layout: [bwsum pairs] [arb pairs]
> + * bwsum[slave_port] = total bandwidth to that slave
> + * arb[(tier-1)*nmasters + master_port] = per-master arbitration entry
> + */
> +#define ARB_BWMASK 0x7FFF
GENMASK(14, 0)
> +#define ARB_TIERMASK 0x8000
BIT(15)
[...]
> +/*
> + * =========================================================================
Let's drop the =s
[...]
> +/*
> + * Pack bwsum[] and arb[] arrays into the u32 RPM buffer.
> + *
> + * Two u16 values are packed per u32 word: lower 16 bits first, upper 16 next.
> + * Layout: [bwsum pairs] then [arb pairs], handling odd boundaries.
> + *
> + * This matches the legacy vendor kernel msm_bus_fabric_rpm_commit() packing algorithm.
> + */
> +static void msm8660_pack_rpm_data(const u16 *bwsum, int nslaves,
> + const u16 *arb, int arb_size,
> + u32 *buf)
> +{
> + int i, index = 0;
> +
> + /* Pack bwsum pairs */
> + for (i = 0; i + 1 < nslaves; i += 2) {
> + buf[index] = ((u32)bwsum[i + 1] << 16) | bwsum[i];
> + index++;
> + }
FIELD_PREP(GENMASK(31, 16), bwmon[i + 1])) |
FIELD_PREP(GENMASK(15, 0), bwsum[i]);
> +
> + /*
> + * Handle boundary between bwsum and arb for odd nslaves. When the
> + * fabric has no master ports (arb_size == 0) the arb[0] access would
> + * read out of bounds; pad the lone bwsum into the low half of the
> + * word instead.
> + */
> + if (nslaves & 1) {
& BIT (0)
> + if (arb_size > 0) {
> + buf[index] = ((u32)arb[0] << 16) | bwsum[i];
> + i = 1;
> + } else {
> + buf[index] = bwsum[i];
> + i = 0;
> + }
similarly as above
[...]
> +static int msm8660_get_bw(struct icc_node *node, u32 *avg, u32 *peak)
> +{
> + *avg = 0;
> + *peak = 0;
> + return 0;
> +}
I think we can drop this
Konrad
prev parent reply other threads:[~2026-06-08 8:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-06 13:00 [PATCH v4 0/2] " Herman van Hazendonk
2026-06-06 13:00 ` [PATCH v4 1/2] dt-bindings: interconnect: qcom: add msm8660 NoC Herman van Hazendonk
2026-06-07 8:22 ` Krzysztof Kozlowski
2026-06-06 13:00 ` [PATCH v4 2/2] interconnect: qcom: add MSM8x60 NoC driver Herman van Hazendonk
2026-06-07 8:24 ` Krzysztof Kozlowski
2026-06-08 8:55 ` Konrad Dybcio [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e0faf562-f882-454a-8719-1d5716ba6fac@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=djakov@kernel.org \
--cc=github.com@herrie.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®