[v10,20/26] dt-bindings: mtd: sunxi: require the H616 AHB reset

Message ID 20261105-submit-sunxi-nand-vendor-oob-layout-v1-v10-20-dca1f6ed29a8@gmail.com (mailing list archive)
State New
Headers
Series mtd: rawnand: sunxi: fix transfers and support randomized OOB |

Commit Message

James Hilliard Nov. 5, 2026, 6:55 p.m. UTC
The H616 NAND controller needs its AHB reset to stop internal DMA and
restore data ordering after an aborted transfer. The controller's soft
reset alone can leave the next read displaced.

Require resets and reset-names for the H616 compatible so the binding
describes the reset needed for recovery. The existing H616 SoC description
already provides the named AHB reset.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Krzysztof Kozlowski Nov. 6, 2026, 8:19 a.m. UTC | #1
On Thu, Nov 05, 2026 at 11:55:36AM -0700, James Hilliard wrote:
> The H616 NAND controller needs its AHB reset to stop internal DMA and

So was the device working or not? Be explicit, because this is an ABI
break.

Best regards,
Krzysztof
  
James Hilliard Nov. 6, 2026, 8:28 a.m. UTC | #2
On Fri, Nov 6, 2026 at 1:19 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Thu, Nov 05, 2026 at 11:55:36AM -0700, James Hilliard wrote:
> > The H616 NAND controller needs its AHB reset to stop internal DMA and
>
> So was the device working or not? Be explicit, because this is an ABI
> break.

Normal NAND reads and writes worked. The failure was in recovery after
aborting an active internal DMA transfer: the controller's soft reset
could leave the first subsequent read displaced, sometimes without an
ECC error. I reproduced this through fault injection, not ordinary I/O.

>
> Best regards,
> Krzysztof
>
  
Krzysztof Kozlowski Nov. 6, 2026, 8:30 a.m. UTC | #3
On 06/11/2026 09:28, James Hilliard wrote:
> On Fri, Nov 6, 2026 at 1:19 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On Thu, Nov 05, 2026 at 11:55:36AM -0700, James Hilliard wrote:
>>> The H616 NAND controller needs its AHB reset to stop internal DMA and
>>
>> So was the device working or not? Be explicit, because this is an ABI
>> break.
> 
> Normal NAND reads and writes worked. The failure was in recovery after
> aborting an active internal DMA transfer: the controller's soft reset
> could leave the first subsequent read displaced, sometimes without an
> ECC error. I reproduced this through fault injection, not ordinary I/O.
> 

Please place this in the commit msg.

Best regards,
Krzysztof
  

Patch

diff --git a/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml b/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
index 9d061e2216cb..ccf616fabc91 100644
--- a/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
@@ -119,6 +119,9 @@  allOf:
           minItems: 4
         clock-names:
           minItems: 4
+      required:
+        - resets
+        - reset-names
 
 examples:
   - |