[PATCH v1 0/3] Add Qualcomm CAMNOC ICC provider
Atanas Filipov <[email protected]>
| Newsgroups | org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm |
|---|---|
| Message-ID | <[email protected]> |
This series adds a device tree binding and driver for a Qualcomm Camera Network-on-Chip (CAMNOC) interconnect provider. CAMNOC is the internal AXI interconnect within the camera subsystem that arbitrates bandwidth between camera sub-devices (IFE, JPEG, BPS, etc.) and the external memory interconnect. On current SoCs, each sub-device that shares the CAMNOC AXI clock calls clk_set_rate() directly on it. This is a last-writer-wins race: whichever consumer sets the rate last wins, regardless of what other active consumers actually require. This series introduces a lightweight ICC provider for CAMNOC that solves this by leveraging the existing ICC aggregation framework. Each consumer obtains an ICC path to the CAMNOC AXI slave node and votes for bandwidth via icc_set_bw(). The ICC core aggregates all active votes (max of peak_bw across consumers) and the provider's set() callback translates the aggregated result into a single clk_set_rate() call. Consumers encode the required clock frequency directly as peak_bw in kBps (e.g. 400000 for 400 MHz); the provider converts this back to Hz. This keeps the provider itself free of per-consumer bandwidth tables, while still allowing a consumer's operating-points-v2 table to select its CAMNOC bandwidth vote from the same OPP entry that selects its core clock rate and RPMh performance state, as shown in the binding example. Supported compatibles: - qcom,sm8250-cam-virt Scope of this series: - dt-bindings: interconnect provider binding, with a generic consumer example illustrating the interconnects/interconnect-names wiring and the optional OPP-driven bandwidth vote - driver: CAMNOC ICC provider (drivers/interconnect/qcom) - DTS: CAMNOC provider node for SM8250 This series intentionally adds the provider only, with no consumer wiring in this round. Existing camera sub-device drivers on this SoC will be migrated to vote through this provider in a follow-up series, once it has settled through review; that migration is what will let those drivers stop calling clk_set_rate() directly and avoid the shared clock race described above. Patch order follows binding -> driver -> DTS so that each patch is independently bisectable. Atanas Filipov (3): dt-bindings: interconnect: Add Qualcomm CAMNOC ICC binding interconnect: qcom: Add CAMNOC interconnect provider driver arm64: dts: qcom: sm8250: Add CAMNOC ICC provider node .../bindings/interconnect/qcom,camnoc.yaml | 98 ++++++++++ arch/arm64/boot/dts/qcom/sm8250.dtsi | 8 + drivers/interconnect/qcom/Kconfig | 10 + drivers/interconnect/qcom/Makefile | 2 + drivers/interconnect/qcom/qcom-camnoc.c | 184 ++++++++++++++++++ .../dt-bindings/interconnect/qcom,camnoc.h | 12 ++ 6 files changed, 314 insertions(+) create mode 100644 Documentation/devicetree/bindings/interconnect/qcom,camnoc.yaml create mode 100644 drivers/interconnect/qcom/qcom-camnoc.c create mode 100644 include/dt-bindings/interconnect/qcom,camnoc.h base-commit: f9a2394a23482bfd330911e9c8295b71724feacd -- 2.34.1