dt-bindings: i3c: dw: add resets and reset-names
Subsystems (3)
PATCH v2 1/2 dt-bindings: i3c: dw: add resets and reset-names
The DW I3C driver is already getting the "core_rst" reset name, but it has not been documented.
---
v2: Added this patch
--- .../devicetree/bindings/i3c/snps,dw-i3c-master.yaml | 8 ++++++++ 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml +8 -0
@@ -35,6 +35,14 @@ properties: - const: core - const: apb + resets: + items: + - description: Core reset signal + + reset-names: + items: + - const: core_rst + interrupts: maxItems: 1
Signature · 1 line
2.42.0.411.g813d9a9188
PATCH v2 2/2 arm64: dts: socfpga: agilex5: popuplate reset properties for I3C
The I3C nodes are missing the resets and reset-name properties that are needed to bring the IP out of reset.
---
v2: add reset-names, remove reset property for NAND
--- arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +4 -0
@@ -244,6 +244,8 @@ i3c0: i3c@10da0000 { reg = <0x10da0000 0x1000>; #address-cells = <3>; #size-cells = <0>; + resets = <&rst I3C0_RESET>; + reset-names = "core_rst"; interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkmgr AGILEX5_L4_MP_CLK>; status = "disabled";
@@ -255,6 +257,8 @@ i3c1: i3c@10da1000 { reg = <0x10da1000 0x1000>; #address-cells = <3>; #size-cells = <0>; + resets = <&rst I3C1_RESET>; + reset-names = "core_rst"; interrupts = <GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkmgr AGILEX5_L4_MP_CLK>; status = "disabled";
Signature · 1 line
2.42.0.411.g813d9a9188
[email protected]
AI reviewRe: [PATCHv2 2/2] arm64: dts: socfpga: agilex5: popuplate reset properties for I3C
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Undocumented 'resets' and 'reset-names' properties added to the I3C nodes without corresponding…
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Undocumented 'resets' and 'reset-names' properties added to the I3C nodes without corresponding YAML binding schema update. --
commit ebac99bb72bcfe3b4b8a0fa7c960df7984ddf40d
Author: Dinh Nguyen <[email protected]>
arm64: dts: socfpga: agilex5: popuplate reset properties for I3C
This commit adds resets and reset-names properties to the I3C nodes in the Agilex5 device tree to bring the IP out of reset.
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi i3c0: i3c@10da0000 { · line 248
Quoted 10 lines
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +2
-0@@ -244,6 +244,8 @@ i3c0: i3c@10da0000 { reg = <0x10da0000 0x1000>; #address-cells = <3>; #size-cells = <0>; + resets = <&rst I3C0_RESET>; + reset-names = "core_rst";
[Severity: Low]
Will adding these properties without an accompanying binding update cause dtbs_check to fail?
It looks like the bindings for these nodes validate against Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml, which enforces unevaluatedProperties: false. However, neither that schema nor the schemas it includes appear to declare the resets or reset-names properties.
Should the YAML binding schema be updated to document these capabilities and prevent validation errors?
Quoted 3 lines
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +0
-0interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkmgr AGILEX5_L4_MP_CLK>; status = "disabled";
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The commit documents reset-names for a single-entry reset, which violates DT binding guidelines and codifies a brittle pattern in the driver that causes silent hardware failures if the name is omitted in the DTS. --
commit 5db0a7d3c21cf60d537f37725a5d5312d88c8c4f
Author: Dinh Nguyen <[email protected]>
dt-bindings: i3c: dw: add resets and reset-names
This commit updates the snps,dw-i3c-master binding to document the core reset signal. It adds both the resets and reset-names properties to match what the driver currently expects.
Quoted 6 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml +0
-0@@ -35,6 +35,14 @@ properties: - const: core
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml properties: · line 45
Quoted 10 lines
Documentation/devicetree/bindings/i3c/snps,dw-i3c-master.yaml +8
-0- const: apb + resets: + items: + - description: Core reset signal + + reset-names: + items: + - const: core_rst +
[Severity: High]
This is a pre-existing issue, but documenting reset-names for a single-entry reset codifies a brittle pattern in the driver that can cause silent hardware failures.
DT binding guidelines recommend skipping *-names for single-entry lists. Because reset-names is not marked as required, a DTS author could provide a valid resets property without reset-names.
If this happens, the driver's call to request "core_rst" will fail to find the name. Since the request is optional, it returns a NULL reset handle instead of an error. The driver will silently proceed, but calls to assert the reset will be no-ops, potentially leading to hardware lockups.
Should we drop reset-names from this binding and instead update the driver to request the single reset by passing NULL instead of "core_rst"?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 9 lines · Dinh Nguyen
The DW I3C driver is already getting the "
core_rst" reset name, but it has not been documented.Signed-off-by Dinh Nguyen <[email protected]>---
v2: Added this patch--- .../devicetree/bindings/i3c/snps,dw-i3c-master.yaml | 8 ++++++++ 1 file changed, 8 insertions(+)
This was already sent by Jisheng, I believe.
Best regards,
Krzysztof