Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The schema incorrectly uses `additionalProperties: false` at the top level, rejecting inherited properties from referenced schemas and breaking altmode support for the PS5170 variant.
- [Medium] The `ports` object lacks an `unevaluatedProperties: false` constraint, rendering the `if-then` restriction ineffective and silently allowing `port@2` on the PS5169 variant.
--
--- Patch [1]: [PATCH 1/2] dt-bindings: usb: Add Parade PS5169 redriver bindings ---
commit dc85f2d66c6d67f68f982e513db1687e5793eecf
Author: Esteban Urrutia [off-list ref]
dt-bindings: usb: Add Parade PS5169 redriver bindings
Add bindings for the Parade PS5169 and PS5170 USB Type-C linear redrivers.
The difference between PS5169 and PS5170 is that PS5170 features an
embedded AUX switch, while PS5169 does not.
Future-proof the binding by adding PS5170 as well.
diff --git a/Documentation/devicetree/bindings/usb/parade,ps5169.yaml b/Documentation/devicetree/bindings/usb/parade,ps5169.yaml
new file mode 100644
index 0000000000000..23ca8e6c0491f
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/parade,ps5169.yaml
[ ... ]
quoted hunk ↗ jump to hunk
+ parade,usb-tx-set-gain:
+ type: boolean
+ description:
+ If this property is specified a gain of -0.9 dB will be applied on the USB transmit channels.
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+ properties:
[Severity: Medium]
Should this ports definition include unevaluatedProperties: false?
Without it, any unlisted extra properties are permitted by default.
This means the if-then block later in the schema will successfully define
port@2 for PS5170, but it won't prevent port@2 from being silently accepted
for the base PS5169 device that lacks an AUX switch.
quoted hunk ↗ jump to hunk
+ port@0:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Super Speed (SS) Output endpoint to the Type-C connector
[ ... ]
quoted hunk ↗ jump to hunk
+allOf:
+ - $ref: usb-switch.yaml#
+ - $ref: usb-switch-ports.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: parade,ps5170
+ then:
+ properties:
+ ports:
+ properties:
+ port@2:
+ $ref: /schemas/graph.yaml#/properties/port
+ description:
+ Sideband Use (SBU) AUX lines endpoint to the Type-C connector for the purpose of
+ handling altmode muxing and orientation switching.
+
+additionalProperties: false
[Severity: Medium]
Does this need to be unevaluatedProperties: false instead of
additionalProperties: false?
In JSON schema, additionalProperties only considers the explicitly listed
local properties and ignores properties imported via $ref in allOf.
Because mode-switch (inherited from usb-switch.yaml) is omitted from the
local properties list, additionalProperties: false will reject it. This
might break validation for the PS5170 variant acting as an altmode switch.
quoted hunk ↗ jump to hunk
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260727-ps5169-bup-v1-0-c76a8ef3b239@proton.me?part=1