Re: [PATCH v16 1/7] dt-bindings: arm: Add support for Qualcomm TGU trace
"Songwei.Chai" <[email protected]> Fri, 31 Jul 2026 10:48:12 +0800
| Newsgroups | dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
On 7/30/2026 4:15 PM, [email protected] wrote: > Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: > - [Medium] The binding schema omits the `interrupts` property despite the hardware description explicitly stating it can generate interrupts. Clarification: The current driver/DTS does not actually use an interrupt line (it only uses CTI trigger outputs), so there is no need for the binding to define an |interrupts| property. > - [Low] The schema claims `arm,primecell` compatibility but uses `additionalProperties: false` without referencing the standard Primecell schema, incorrectly blocking valid Primecell properties. > -- Clarification: 1. I checked the format of the |arm,coresight-*.yaml| files under |Documentation/devicetree/bindings/arm/| and found that they all claim |arm,primecell| compatibility, yet none of them reference |/schemas/arm/primecell.yaml|. 2. In actual DTS files, properties defined by the PrimeCell schema, such as |arm,primecell-periphid|, do not normally appear. Therefore, referencing |/schemas/arm/primecell.yaml| is not mandatory. > > --- Patch [1]: [PATCH v16 1/7] dt-bindings: arm: Add support for Qualcomm TGU trace --- > commit 1cb0b1557ad8efca643aa36dee2d1b84f9c415b0 > Author: Songwei Chai <[email protected]> > > dt-bindings: arm: Add support for Qualcomm TGU trace > > This commit introduces the device tree binding schema for the Qualcomm > Trigger Generation Unit (TGU). The TGU monitors signals to identify issues > and can generate a trigger into the CTI or interrupts to processors. > >> diff --git a/Documentation/devicetree/bindings/arm/qcom,tgu.yaml b/Documentation/devicetree/bindings/arm/qcom,tgu.yaml >> new file mode 100644 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/arm/qcom,tgu.yaml > [ ... ] >> +description: | >> + The Trigger Generation Unit (TGU) is a Data Engine which can be utilized >> + to sense a plurality of signals and create a trigger into the CTI or >> + generate interrupts to processors. The TGU is like the trigger circuit > [ ... ] >> + preprogrammed state/sequence and then produce a trigger or interrupt. > [ ... ] >> +properties: >> + compatible: >> + items: >> + - const: qcom,tgu >> + - const: arm,primecell > [Severity: Low] > Since this device claims arm,primecell compatibility, shouldn't there be a > schema reference to /schemas/arm/primecell.yaml# included to properly > inherit standard PrimeCell properties? > >> + >> + reg: >> + maxItems: 1 >> + >> + clocks: >> + maxItems: 1 >> + >> + clock-names: >> + items: >> + - const: apb_pclk > [Severity: Medium] > The description above mentions the hardware can "produce a trigger or > interrupt", but an interrupts property is missing from this list. > > Will device trees that legitimately specify the hardware's interrupt line > fail schema validation when additionalProperties: false is enforced below? > >> + >> +required: >> + - compatible >> + - reg >> + - clocks >> + - clock-names >> + >> +additionalProperties: false > [Severity: Low] > Because arm,primecell compatibility is claimed, should this use > unevaluatedProperties: false instead? > > Using additionalProperties: false without inheriting the PrimeCell schema > will block valid inherited properties like arm,primecell-periphid from > being used in the device tree without validation errors. >