* [PATCH v2 00/11] riscv: dts: Miscellaneous fixes @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven Hi Paul, Palmer, Albert, This patch series contains miscellaneous fixes for the DTS files for RISC-V platforms. Changes compared to v1[1]: - Add Reviewed-by, Tested-by, - Move mpfs refclk clock-frequency to board DTS, - New patches "[PATCH v2 06/11] riscv: dts: microchip: mpfs: Fix clock controller node" and "[PATCH v2 11/11] riscv: dts: sifive: fu540-c000: Fix PLIC node". Thanks for applying! [1] https://lore.kernel.org/r/20211125153131.163533-1-geert@linux-m68k.org Geert Uytterhoeven (11): riscv: dts: canaan: Fix SPI FLASH node names riscv: dts: canaan: Group tuples in interrupt properties riscv: dts: microchip: mpfs: Drop empty chosen node riscv: dts: microchip: mpfs: Fix PLIC node riscv: dts: microchip: mpfs: Fix reference clock node riscv: dts: microchip: mpfs: Fix clock controller node riscv: dts: microchip: mpfs: Group tuples in interrupt properties riscv: dts: sifive: Group tuples in interrupt properties riscv: dts: sifive: Group tuples in register properties riscv: dts: sifive: fu540-c000: Drop bogus soc node compatible values riscv: dts: sifive: fu540-c000: Fix PLIC node arch/riscv/boot/dts/canaan/k210.dtsi | 23 +++---- .../riscv/boot/dts/canaan/sipeed_maix_bit.dts | 2 +- .../boot/dts/canaan/sipeed_maix_dock.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maix_go.dts | 2 +- .../boot/dts/canaan/sipeed_maixduino.dts | 2 +- .../microchip/microchip-mpfs-icicle-kit.dts | 4 ++ .../boot/dts/microchip/microchip-mpfs.dtsi | 60 ++++++++----------- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 40 +++++++------ arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 14 ++--- 9 files changed, 72 insertions(+), 77 deletions(-) -- 2.25.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 00/11] riscv: dts: Miscellaneous fixes @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven Hi Paul, Palmer, Albert, This patch series contains miscellaneous fixes for the DTS files for RISC-V platforms. Changes compared to v1[1]: - Add Reviewed-by, Tested-by, - Move mpfs refclk clock-frequency to board DTS, - New patches "[PATCH v2 06/11] riscv: dts: microchip: mpfs: Fix clock controller node" and "[PATCH v2 11/11] riscv: dts: sifive: fu540-c000: Fix PLIC node". Thanks for applying! [1] https://lore.kernel.org/r/20211125153131.163533-1-geert@linux-m68k.org Geert Uytterhoeven (11): riscv: dts: canaan: Fix SPI FLASH node names riscv: dts: canaan: Group tuples in interrupt properties riscv: dts: microchip: mpfs: Drop empty chosen node riscv: dts: microchip: mpfs: Fix PLIC node riscv: dts: microchip: mpfs: Fix reference clock node riscv: dts: microchip: mpfs: Fix clock controller node riscv: dts: microchip: mpfs: Group tuples in interrupt properties riscv: dts: sifive: Group tuples in interrupt properties riscv: dts: sifive: Group tuples in register properties riscv: dts: sifive: fu540-c000: Drop bogus soc node compatible values riscv: dts: sifive: fu540-c000: Fix PLIC node arch/riscv/boot/dts/canaan/k210.dtsi | 23 +++---- .../riscv/boot/dts/canaan/sipeed_maix_bit.dts | 2 +- .../boot/dts/canaan/sipeed_maix_dock.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maix_go.dts | 2 +- .../boot/dts/canaan/sipeed_maixduino.dts | 2 +- .../microchip/microchip-mpfs-icicle-kit.dts | 4 ++ .../boot/dts/microchip/microchip-mpfs.dtsi | 60 ++++++++----------- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 40 +++++++------ arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 14 ++--- 9 files changed, 72 insertions(+), 77 deletions(-) -- 2.25.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-08 10:40 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-08 10:40 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Rob Herring Cc: Biju Das, dri-devel, devicetree, Alyssa Rosenzweig, Steven Price, tomeu.vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, linux-renesas-soc RZ/G2L SoC embeds Mali-G31 bifrost GPU. This patch series aims to add support for the same It is tested with latest drm-misc-next + mesa 21.3.0 + out of tree patch for (du + DSI) + platform specific mesa configuration for RZ/G2L. Tested the kmscube application. test logs:- root@smarc-rzg2l:~# kmscube Using display 0xaaaadb6e7d30 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" .... =================================== ^C root@smarc-rzg2l:~# cat /proc/interrupts | grep panfrost 82: 587287 0 GICv3 186 Level panfrost-job 83: 2 0 GICv3 187 Level panfrost-mmu 84: 8 0 GICv3 185 Level panfrost-gpu root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 0 72 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 0 0 125000000: 0 0 0 0 0 0 0 1 68 200000000: 0 0 0 0 0 0 0 1 68 250000000: 1 0 0 0 0 0 0 0 84 400000000: 0 0 0 0 0 0 0 0 0 500000000: 0 0 0 1 1 1 0 0 736 Total transition : 6 root@smarc-rzg2l:~# kmscube Using display 0xaaaaf7a421b0 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" ...... =================================== root@smarc-rzg2l:~# root@smarc-rzg2l:~# root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 1 144 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 9 524 125000000: 0 0 9 0 0 0 0 3 2544 200000000: 0 0 0 11 0 0 0 46 3304 250000000: 1 0 0 0 33 0 0 0 7496 400000000: 0 0 0 0 16 19 0 0 2024 500000000: 1 0 0 1 8 15 35 0 4032 Total transition : 208 Platform specific mesa configuration patch for RZ/G2L --------------------- src/gallium/targets/dri/meson.build + 'rcar-du_dri.so', src/gallium/targets/dri/target.c +DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du) V2->V3: * Moved optional clock-names and reset-names to SoC-specific conditional schemas. * minimum number of reset for the generic GPU is set to 1. * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L SoC-specific conditional schemas. * Updated commit description for patch#3 V1->V2: * Removed clock patches from this seies, as it is accepted for 5.17 * Added Rb tag from Geert * Added reset-names required property for RZ/G2L and updated the board dtsi. Biju Das (3): dt-bindings: gpu: mali-bifrost: Document RZ/G2L support arm64: dts: renesas: r9a07g044: Add Mali-G31 GPU node arm64: dts: renesas: rzg2l-smarc-som: Add vdd core regulator .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 65 +++++++++++++++++++ .../boot/dts/renesas/rzg2l-smarc-som.dtsi | 13 ++++ 3 files changed, 121 insertions(+), 2 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-08 10:40 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:43 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel, David Airlie, Daniel Vetter Cc: linux-kernel, devicetree, linux-riscv, Biju Das, dri-devel, Alyssa Rosenzweig, Steven Price, tomeu.vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, linux-renesas-soc From: Biju Das <biju.das.jz@bp.renesas.com> RZ/G2L SoC embeds Mali-G31 bifrost GPU. This patch series aims to add support for the same It is tested with latest drm-misc-next + mesa 21.3.0 + out of tree patch for (du + DSI) + platform specific mesa configuration for RZ/G2L. Tested the kmscube application. test logs:- root@smarc-rzg2l:~# kmscube Using display 0xaaaadb6e7d30 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" .... =================================== ^C root@smarc-rzg2l:~# cat /proc/interrupts | grep panfrost 82: 587287 0 GICv3 186 Level panfrost-job 83: 2 0 GICv3 187 Level panfrost-mmu 84: 8 0 GICv3 185 Level panfrost-gpu root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 0 72 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 0 0 125000000: 0 0 0 0 0 0 0 1 68 200000000: 0 0 0 0 0 0 0 1 68 250000000: 1 0 0 0 0 0 0 0 84 400000000: 0 0 0 0 0 0 0 0 0 500000000: 0 0 0 1 1 1 0 0 736 Total transition : 6 root@smarc-rzg2l:~# kmscube Using display 0xaaaaf7a421b0 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" ...... =================================== root@smarc-rzg2l:~# root@smarc-rzg2l:~# root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 1 144 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 9 524 125000000: 0 0 9 0 0 0 0 3 2544 200000000: 0 0 0 11 0 0 0 46 3304 250000000: 1 0 0 0 33 0 0 0 7496 400000000: 0 0 0 0 16 19 0 0 2024 500000000: 1 0 0 1 8 15 35 0 4032 Total transition : 208 Platform specific mesa configuration patch for RZ/G2L --------------------- src/gallium/targets/dri/meson.build + 'rcar-du_dri.so', src/gallium/targets/dri/target.c +DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du) V2->V3: * Moved optional clock-names and reset-names to SoC-specific conditional schemas. * minimum number of reset for the generic GPU is set to 1. * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L SoC-specific conditional schemas. * Updated commit description for patch#3 V1->V2: * Removed clock patches from this seies, as it is accepted for 5.17 * Added Rb tag from Geert * Added reset-names required property for RZ/G2L and updated the board dtsi. Biju Das (3): dt-bindings: gpu: mali-bifrost: Document RZ/G2L support arm64: dts: renesas: r9a07g044: Add Mali-G31 GPU node arm64: dts: renesas: rzg2l-smarc-som: Add vdd core regulator .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 65 +++++++++++++++++++ .../boot/dts/renesas/rzg2l-smarc-som.dtsi | 13 ++++ 3 files changed, 121 insertions(+), 2 deletions(-) -- 2.17.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-08 10:40 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:43 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel, David Airlie, Daniel Vetter Cc: devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, Prabhakar Mahadev Lad, linux-kernel, dri-devel, Steven Price, linux-renesas-soc, Alyssa Rosenzweig, Biju Das, linux-riscv, Biju Das, Robin Murphy From: Biju Das <biju.das.jz@bp.renesas.com> RZ/G2L SoC embeds Mali-G31 bifrost GPU. This patch series aims to add support for the same It is tested with latest drm-misc-next + mesa 21.3.0 + out of tree patch for (du + DSI) + platform specific mesa configuration for RZ/G2L. Tested the kmscube application. test logs:- root@smarc-rzg2l:~# kmscube Using display 0xaaaadb6e7d30 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" .... =================================== ^C root@smarc-rzg2l:~# cat /proc/interrupts | grep panfrost 82: 587287 0 GICv3 186 Level panfrost-job 83: 2 0 GICv3 187 Level panfrost-mmu 84: 8 0 GICv3 185 Level panfrost-gpu root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 0 72 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 0 0 125000000: 0 0 0 0 0 0 0 1 68 200000000: 0 0 0 0 0 0 0 1 68 250000000: 1 0 0 0 0 0 0 0 84 400000000: 0 0 0 0 0 0 0 0 0 500000000: 0 0 0 1 1 1 0 0 736 Total transition : 6 root@smarc-rzg2l:~# kmscube Using display 0xaaaaf7a421b0 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" ...... =================================== root@smarc-rzg2l:~# root@smarc-rzg2l:~# root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 1 144 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 9 524 125000000: 0 0 9 0 0 0 0 3 2544 200000000: 0 0 0 11 0 0 0 46 3304 250000000: 1 0 0 0 33 0 0 0 7496 400000000: 0 0 0 0 16 19 0 0 2024 500000000: 1 0 0 1 8 15 35 0 4032 Total transition : 208 Platform specific mesa configuration patch for RZ/G2L --------------------- src/gallium/targets/dri/meson.build + 'rcar-du_dri.so', src/gallium/targets/dri/target.c +DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du) V2->V3: * Moved optional clock-names and reset-names to SoC-specific conditional schemas. * minimum number of reset for the generic GPU is set to 1. * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L SoC-specific conditional schemas. * Updated commit description for patch#3 V1->V2: * Removed clock patches from this seies, as it is accepted for 5.17 * Added Rb tag from Geert * Added reset-names required property for RZ/G2L and updated the board dtsi. Biju Das (3): dt-bindings: gpu: mali-bifrost: Document RZ/G2L support arm64: dts: renesas: r9a07g044: Add Mali-G31 GPU node arm64: dts: renesas: rzg2l-smarc-som: Add vdd core regulator .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 65 +++++++++++++++++++ .../boot/dts/renesas/rzg2l-smarc-som.dtsi | 13 ++++ 3 files changed, 121 insertions(+), 2 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-08 10:40 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:41 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, David Airlie, Daniel Vetter Cc: linux-kernel, devicetree, linux-riscv, Biju Das, dri-devel, Alyssa Rosenzweig, Steven Price, tomeu.vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, linux-renesas-soc From: Biju Das <biju.das.jz@bp.renesas.com> RZ/G2L SoC embeds Mali-G31 bifrost GPU. This patch series aims to add support for the same It is tested with latest drm-misc-next + mesa 21.3.0 + out of tree patch for (du + DSI) + platform specific mesa configuration for RZ/G2L. Tested the kmscube application. test logs:- root@smarc-rzg2l:~# kmscube Using display 0xaaaadb6e7d30 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" .... =================================== ^C root@smarc-rzg2l:~# cat /proc/interrupts | grep panfrost 82: 587287 0 GICv3 186 Level panfrost-job 83: 2 0 GICv3 187 Level panfrost-mmu 84: 8 0 GICv3 185 Level panfrost-gpu root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 0 72 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 0 0 125000000: 0 0 0 0 0 0 0 1 68 200000000: 0 0 0 0 0 0 0 1 68 250000000: 1 0 0 0 0 0 0 0 84 400000000: 0 0 0 0 0 0 0 0 0 500000000: 0 0 0 1 1 1 0 0 736 Total transition : 6 root@smarc-rzg2l:~# kmscube Using display 0xaaaaf7a421b0 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" ...... =================================== root@smarc-rzg2l:~# root@smarc-rzg2l:~# root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 1 144 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 9 524 125000000: 0 0 9 0 0 0 0 3 2544 200000000: 0 0 0 11 0 0 0 46 3304 250000000: 1 0 0 0 33 0 0 0 7496 400000000: 0 0 0 0 16 19 0 0 2024 500000000: 1 0 0 1 8 15 35 0 4032 Total transition : 208 Platform specific mesa configuration patch for RZ/G2L --------------------- src/gallium/targets/dri/meson.build + 'rcar-du_dri.so', src/gallium/targets/dri/target.c +DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du) V2->V3: * Moved optional clock-names and reset-names to SoC-specific conditional schemas. * minimum number of reset for the generic GPU is set to 1. * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L SoC-specific conditional schemas. * Updated commit description for patch#3 V1->V2: * Removed clock patches from this seies, as it is accepted for 5.17 * Added Rb tag from Geert * Added reset-names required property for RZ/G2L and updated the board dtsi. Biju Das (3): dt-bindings: gpu: mali-bifrost: Document RZ/G2L support arm64: dts: renesas: r9a07g044: Add Mali-G31 GPU node arm64: dts: renesas: rzg2l-smarc-som: Add vdd core regulator .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 65 +++++++++++++++++++ .../boot/dts/renesas/rzg2l-smarc-som.dtsi | 13 ++++ 3 files changed, 121 insertions(+), 2 deletions(-) -- 2.17.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-08 10:40 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:41 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, David Airlie, Daniel Vetter Cc: devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, Prabhakar Mahadev Lad, linux-kernel, dri-devel, Steven Price, linux-renesas-soc, Alyssa Rosenzweig, Biju Das, linux-riscv, Biju Das, Robin Murphy From: Biju Das <biju.das.jz@bp.renesas.com> RZ/G2L SoC embeds Mali-G31 bifrost GPU. This patch series aims to add support for the same It is tested with latest drm-misc-next + mesa 21.3.0 + out of tree patch for (du + DSI) + platform specific mesa configuration for RZ/G2L. Tested the kmscube application. test logs:- root@smarc-rzg2l:~# kmscube Using display 0xaaaadb6e7d30 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" .... =================================== ^C root@smarc-rzg2l:~# cat /proc/interrupts | grep panfrost 82: 587287 0 GICv3 186 Level panfrost-job 83: 2 0 GICv3 187 Level panfrost-mmu 84: 8 0 GICv3 185 Level panfrost-gpu root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 0 72 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 0 0 125000000: 0 0 0 0 0 0 0 1 68 200000000: 0 0 0 0 0 0 0 1 68 250000000: 1 0 0 0 0 0 0 0 84 400000000: 0 0 0 0 0 0 0 0 0 500000000: 0 0 0 1 1 1 0 0 736 Total transition : 6 root@smarc-rzg2l:~# kmscube Using display 0xaaaaf7a421b0 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" ...... =================================== root@smarc-rzg2l:~# root@smarc-rzg2l:~# root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 1 144 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 9 524 125000000: 0 0 9 0 0 0 0 3 2544 200000000: 0 0 0 11 0 0 0 46 3304 250000000: 1 0 0 0 33 0 0 0 7496 400000000: 0 0 0 0 16 19 0 0 2024 500000000: 1 0 0 1 8 15 35 0 4032 Total transition : 208 Platform specific mesa configuration patch for RZ/G2L --------------------- src/gallium/targets/dri/meson.build + 'rcar-du_dri.so', src/gallium/targets/dri/target.c +DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du) V2->V3: * Moved optional clock-names and reset-names to SoC-specific conditional schemas. * minimum number of reset for the generic GPU is set to 1. * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L SoC-specific conditional schemas. * Updated commit description for patch#3 V1->V2: * Removed clock patches from this seies, as it is accepted for 5.17 * Added Rb tag from Geert * Added reset-names required property for RZ/G2L and updated the board dtsi. Biju Das (3): dt-bindings: gpu: mali-bifrost: Document RZ/G2L support arm64: dts: renesas: r9a07g044: Add Mali-G31 GPU node arm64: dts: renesas: rzg2l-smarc-som: Add vdd core regulator .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 65 +++++++++++++++++++ .../boot/dts/renesas/rzg2l-smarc-som.dtsi | 13 ++++ 3 files changed, 121 insertions(+), 2 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-08 10:40 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, David Airlie, Daniel Vetter, Rob Herring Cc: Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Biju Das, dri-devel, Alyssa Rosenzweig, Steven Price, tomeu.vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, linux-renesas-soc From: Biju Das <biju.das.jz@bp.renesas.com> RZ/G2L SoC embeds Mali-G31 bifrost GPU. This patch series aims to add support for the same It is tested with latest drm-misc-next + mesa 21.3.0 + out of tree patch for (du + DSI) + platform specific mesa configuration for RZ/G2L. Tested the kmscube application. test logs:- root@smarc-rzg2l:~# kmscube Using display 0xaaaadb6e7d30 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" .... =================================== ^C root@smarc-rzg2l:~# cat /proc/interrupts | grep panfrost 82: 587287 0 GICv3 186 Level panfrost-job 83: 2 0 GICv3 187 Level panfrost-mmu 84: 8 0 GICv3 185 Level panfrost-gpu root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 0 72 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 0 0 125000000: 0 0 0 0 0 0 0 1 68 200000000: 0 0 0 0 0 0 0 1 68 250000000: 1 0 0 0 0 0 0 0 84 400000000: 0 0 0 0 0 0 0 0 0 500000000: 0 0 0 1 1 1 0 0 736 Total transition : 6 root@smarc-rzg2l:~# kmscube Using display 0xaaaaf7a421b0 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" ...... =================================== root@smarc-rzg2l:~# root@smarc-rzg2l:~# root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 1 144 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 9 524 125000000: 0 0 9 0 0 0 0 3 2544 200000000: 0 0 0 11 0 0 0 46 3304 250000000: 1 0 0 0 33 0 0 0 7496 400000000: 0 0 0 0 16 19 0 0 2024 500000000: 1 0 0 1 8 15 35 0 4032 Total transition : 208 Platform specific mesa configuration patch for RZ/G2L --------------------- src/gallium/targets/dri/meson.build + 'rcar-du_dri.so', src/gallium/targets/dri/target.c +DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du) V2->V3: * Moved optional clock-names and reset-names to SoC-specific conditional schemas. * minimum number of reset for the generic GPU is set to 1. * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L SoC-specific conditional schemas. * Updated commit description for patch#3 V1->V2: * Removed clock patches from this seies, as it is accepted for 5.17 * Added Rb tag from Geert * Added reset-names required property for RZ/G2L and updated the board dtsi. Biju Das (3): dt-bindings: gpu: mali-bifrost: Document RZ/G2L support arm64: dts: renesas: r9a07g044: Add Mali-G31 GPU node arm64: dts: renesas: rzg2l-smarc-som: Add vdd core regulator .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 65 +++++++++++++++++++ .../boot/dts/renesas/rzg2l-smarc-som.dtsi | 13 ++++ 3 files changed, 121 insertions(+), 2 deletions(-) -- 2.17.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-08 10:40 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, David Airlie, Daniel Vetter, Rob Herring Cc: devicetree, Damien Le Moal, Lewis Hanly, Geert Uytterhoeven, tomeu.vizoso, Krzysztof Kozlowski, Prabhakar Mahadev Lad, Chris Paterson, dri-devel, Steven Price, linux-renesas-soc, Conor Dooley, Alyssa Rosenzweig, Biju Das, linux-riscv, Biju Das, Robin Murphy From: Biju Das <biju.das.jz@bp.renesas.com> RZ/G2L SoC embeds Mali-G31 bifrost GPU. This patch series aims to add support for the same It is tested with latest drm-misc-next + mesa 21.3.0 + out of tree patch for (du + DSI) + platform specific mesa configuration for RZ/G2L. Tested the kmscube application. test logs:- root@smarc-rzg2l:~# kmscube Using display 0xaaaadb6e7d30 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" .... =================================== ^C root@smarc-rzg2l:~# cat /proc/interrupts | grep panfrost 82: 587287 0 GICv3 186 Level panfrost-job 83: 2 0 GICv3 187 Level panfrost-mmu 84: 8 0 GICv3 185 Level panfrost-gpu root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 0 72 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 0 0 125000000: 0 0 0 0 0 0 0 1 68 200000000: 0 0 0 0 0 0 0 1 68 250000000: 1 0 0 0 0 0 0 0 84 400000000: 0 0 0 0 0 0 0 0 0 500000000: 0 0 0 1 1 1 0 0 736 Total transition : 6 root@smarc-rzg2l:~# kmscube Using display 0xaaaaf7a421b0 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" ...... =================================== root@smarc-rzg2l:~# root@smarc-rzg2l:~# root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 1 144 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 9 524 125000000: 0 0 9 0 0 0 0 3 2544 200000000: 0 0 0 11 0 0 0 46 3304 250000000: 1 0 0 0 33 0 0 0 7496 400000000: 0 0 0 0 16 19 0 0 2024 500000000: 1 0 0 1 8 15 35 0 4032 Total transition : 208 Platform specific mesa configuration patch for RZ/G2L --------------------- src/gallium/targets/dri/meson.build + 'rcar-du_dri.so', src/gallium/targets/dri/target.c +DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du) V2->V3: * Moved optional clock-names and reset-names to SoC-specific conditional schemas. * minimum number of reset for the generic GPU is set to 1. * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L SoC-specific conditional schemas. * Updated commit description for patch#3 V1->V2: * Removed clock patches from this seies, as it is accepted for 5.17 * Added Rb tag from Geert * Added reset-names required property for RZ/G2L and updated the board dtsi. Biju Das (3): dt-bindings: gpu: mali-bifrost: Document RZ/G2L support arm64: dts: renesas: r9a07g044: Add Mali-G31 GPU node arm64: dts: renesas: rzg2l-smarc-som: Add vdd core regulator .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 65 +++++++++++++++++++ .../boot/dts/renesas/rzg2l-smarc-som.dtsi | 13 ++++ 3 files changed, 121 insertions(+), 2 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-08 10:40 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-08 10:40 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Rob Herring Cc: devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, Prabhakar Mahadev Lad, dri-devel, Steven Price, linux-renesas-soc, Alyssa Rosenzweig, Biju Das, Biju Das, Robin Murphy RZ/G2L SoC embeds Mali-G31 bifrost GPU. This patch series aims to add support for the same It is tested with latest drm-misc-next + mesa 21.3.0 + out of tree patch for (du + DSI) + platform specific mesa configuration for RZ/G2L. Tested the kmscube application. test logs:- root@smarc-rzg2l:~# kmscube Using display 0xaaaadb6e7d30 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" .... =================================== ^C root@smarc-rzg2l:~# cat /proc/interrupts | grep panfrost 82: 587287 0 GICv3 186 Level panfrost-job 83: 2 0 GICv3 187 Level panfrost-mmu 84: 8 0 GICv3 185 Level panfrost-gpu root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 0 72 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 0 0 125000000: 0 0 0 0 0 0 0 1 68 200000000: 0 0 0 0 0 0 0 1 68 250000000: 1 0 0 0 0 0 0 0 84 400000000: 0 0 0 0 0 0 0 0 0 500000000: 0 0 0 1 1 1 0 0 736 Total transition : 6 root@smarc-rzg2l:~# kmscube Using display 0xaaaaf7a421b0 with EGL version 1.4 =================================== EGL information: version: "1.4" vendor: "Mesa Project" ..... =================================== OpenGL ES 2.x information: version: "OpenGL ES 3.1 Mesa 21.3.0" shading language version: "OpenGL ES GLSL ES 3.10" vendor: "Panfrost" renderer: "Mali-G31 (Panfrost)" ...... =================================== root@smarc-rzg2l:~# root@smarc-rzg2l:~# root@smarc-rzg2l:~# cat /sys/class/devfreq/11840000.gpu/trans_stat From : To : 50000000 62500000 100000000 125000000 200000000 250000000 400000000 500000000 time(ms) * 50000000: 0 0 0 0 0 0 0 1 144 62500000: 0 0 0 0 0 0 0 0 0 100000000: 0 0 0 0 0 0 0 9 524 125000000: 0 0 9 0 0 0 0 3 2544 200000000: 0 0 0 11 0 0 0 46 3304 250000000: 1 0 0 0 33 0 0 0 7496 400000000: 0 0 0 0 16 19 0 0 2024 500000000: 1 0 0 1 8 15 35 0 4032 Total transition : 208 Platform specific mesa configuration patch for RZ/G2L --------------------- src/gallium/targets/dri/meson.build + 'rcar-du_dri.so', src/gallium/targets/dri/target.c +DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du) V2->V3: * Moved optional clock-names and reset-names to SoC-specific conditional schemas. * minimum number of reset for the generic GPU is set to 1. * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L SoC-specific conditional schemas. * Updated commit description for patch#3 V1->V2: * Removed clock patches from this seies, as it is accepted for 5.17 * Added Rb tag from Geert * Added reset-names required property for RZ/G2L and updated the board dtsi. Biju Das (3): dt-bindings: gpu: mali-bifrost: Document RZ/G2L support arm64: dts: renesas: r9a07g044: Add Mali-G31 GPU node arm64: dts: renesas: rzg2l-smarc-som: Add vdd core regulator .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 65 +++++++++++++++++++ .../boot/dts/renesas/rzg2l-smarc-som.dtsi | 13 ++++ 3 files changed, 121 insertions(+), 2 deletions(-) -- 2.17.1 ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support 2021-12-08 10:40 ` Biju Das @ 2021-12-08 10:40 ` Biju Das -1 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-08 10:40 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Rob Herring Cc: Biju Das, dri-devel, devicetree, Alyssa Rosenzweig, Steven Price, tomeu.vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, linux-renesas-soc The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost Mali-G31 GPU, add a compatible string for it. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> --- v2->v3: * Moved optional clock-names and reset-names to SoC-specific conditional schemas. * minimum number of reset for the generic GPU is set to 1. * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L SoC-specific conditional schemas. v1->v2: * Updated minItems for resets as 2 * Documented optional property reset-names * Documented reset-names as required property for RZ/G2L SoC. --- .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 6f98dd55fb4c..63a08f3f321d 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -19,6 +19,7 @@ properties: - amlogic,meson-g12a-mali - mediatek,mt8183-mali - realtek,rtd1619-mali + - renesas,r9a07g044-mali - rockchip,px30-mali - rockchip,rk3568-mali - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable @@ -27,19 +28,26 @@ properties: maxItems: 1 interrupts: + minItems: 3 items: - description: Job interrupt - description: MMU interrupt - description: GPU interrupt + - description: Event interrupt interrupt-names: + minItems: 3 items: - const: job - const: mmu - const: gpu + - const: event clocks: - maxItems: 1 + minItems: 1 + maxItems: 3 + + clock-names: true mali-supply: true @@ -52,7 +60,10 @@ properties: maxItems: 3 resets: - maxItems: 2 + minItems: 1 + maxItems: 3 + + reset-names: true "#cooling-cells": const: 2 @@ -94,6 +105,36 @@ allOf: then: required: - resets + - if: + properties: + compatible: + contains: + const: renesas,r9a07g044-mali + then: + properties: + interrupts: + minItems: 4 + interrupt-names: + minItems: 4 + clocks: + minItems: 3 + clock-names: + items: + - const: gpu + - const: bus + - const: bus_ace + resets: + minItems: 3 + reset-names: + items: + - const: rst + - const: axi_rst + - const: ace_rst + required: + - clock-names + - power-domains + - resets + - reset-names - if: properties: compatible: -- 2.17.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support @ 2021-12-08 10:40 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-08 10:40 UTC (permalink / raw) To: David Airlie, Daniel Vetter, Rob Herring Cc: devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, Prabhakar Mahadev Lad, dri-devel, Steven Price, linux-renesas-soc, Alyssa Rosenzweig, Biju Das, Biju Das, Robin Murphy The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost Mali-G31 GPU, add a compatible string for it. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> --- v2->v3: * Moved optional clock-names and reset-names to SoC-specific conditional schemas. * minimum number of reset for the generic GPU is set to 1. * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L SoC-specific conditional schemas. v1->v2: * Updated minItems for resets as 2 * Documented optional property reset-names * Documented reset-names as required property for RZ/G2L SoC. --- .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml index 6f98dd55fb4c..63a08f3f321d 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml @@ -19,6 +19,7 @@ properties: - amlogic,meson-g12a-mali - mediatek,mt8183-mali - realtek,rtd1619-mali + - renesas,r9a07g044-mali - rockchip,px30-mali - rockchip,rk3568-mali - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable @@ -27,19 +28,26 @@ properties: maxItems: 1 interrupts: + minItems: 3 items: - description: Job interrupt - description: MMU interrupt - description: GPU interrupt + - description: Event interrupt interrupt-names: + minItems: 3 items: - const: job - const: mmu - const: gpu + - const: event clocks: - maxItems: 1 + minItems: 1 + maxItems: 3 + + clock-names: true mali-supply: true @@ -52,7 +60,10 @@ properties: maxItems: 3 resets: - maxItems: 2 + minItems: 1 + maxItems: 3 + + reset-names: true "#cooling-cells": const: 2 @@ -94,6 +105,36 @@ allOf: then: required: - resets + - if: + properties: + compatible: + contains: + const: renesas,r9a07g044-mali + then: + properties: + interrupts: + minItems: 4 + interrupt-names: + minItems: 4 + clocks: + minItems: 3 + clock-names: + items: + - const: gpu + - const: bus + - const: bus_ace + resets: + minItems: 3 + reset-names: + items: + - const: rst + - const: axi_rst + - const: ace_rst + required: + - clock-names + - power-domains + - resets + - reset-names - if: properties: compatible: -- 2.17.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* RE: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support 2021-12-08 10:40 ` Biju Das @ 2021-12-10 14:44 ` Biju Das -1 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-10 14:44 UTC (permalink / raw) To: Biju Das, David Airlie, Daniel Vetter, Rob Herring Cc: dri-devel, devicetree, Alyssa Rosenzweig, Steven Price, tomeu.vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, linux-renesas-soc Hi All, Gentle ping. Cheers, Biju > Subject: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L > support > > The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost Mali-G31 GPU, > add a compatible string for it. > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > --- > v2->v3: > * Moved optional clock-names and reset-names to SoC-specific conditional > schemas. > * minimum number of reset for the generic GPU is set to 1. > * Documented number of clocks, resets, interrupts and interrupt-names in > RZ/G2L > SoC-specific conditional schemas. > v1->v2: > * Updated minItems for resets as 2 > * Documented optional property reset-names > * Documented reset-names as required property for RZ/G2L SoC. > --- > .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++++++++- > 1 file changed, 43 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > index 6f98dd55fb4c..63a08f3f321d 100644 > --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > @@ -19,6 +19,7 @@ properties: > - amlogic,meson-g12a-mali > - mediatek,mt8183-mali > - realtek,rtd1619-mali > + - renesas,r9a07g044-mali > - rockchip,px30-mali > - rockchip,rk3568-mali > - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is > fully discoverable @@ -27,19 +28,26 @@ properties: > maxItems: 1 > > interrupts: > + minItems: 3 > items: > - description: Job interrupt > - description: MMU interrupt > - description: GPU interrupt > + - description: Event interrupt > > interrupt-names: > + minItems: 3 > items: > - const: job > - const: mmu > - const: gpu > + - const: event > > clocks: > - maxItems: 1 > + minItems: 1 > + maxItems: 3 > + > + clock-names: true > > mali-supply: true > > @@ -52,7 +60,10 @@ properties: > maxItems: 3 > > resets: > - maxItems: 2 > + minItems: 1 > + maxItems: 3 > + > + reset-names: true > > "#cooling-cells": > const: 2 > @@ -94,6 +105,36 @@ allOf: > then: > required: > - resets > + - if: > + properties: > + compatible: > + contains: > + const: renesas,r9a07g044-mali > + then: > + properties: > + interrupts: > + minItems: 4 > + interrupt-names: > + minItems: 4 > + clocks: > + minItems: 3 > + clock-names: > + items: > + - const: gpu > + - const: bus > + - const: bus_ace > + resets: > + minItems: 3 > + reset-names: > + items: > + - const: rst > + - const: axi_rst > + - const: ace_rst > + required: > + - clock-names > + - power-domains > + - resets > + - reset-names > - if: > properties: > compatible: > -- > 2.17.1 ^ permalink raw reply [flat|nested] 123+ messages in thread
* RE: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support @ 2021-12-10 14:44 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-10 14:44 UTC (permalink / raw) To: Biju Das, David Airlie, Daniel Vetter, Rob Herring Cc: devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, Prabhakar Mahadev Lad, dri-devel, Steven Price, linux-renesas-soc, Alyssa Rosenzweig, Biju Das, Robin Murphy Hi All, Gentle ping. Cheers, Biju > Subject: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L > support > > The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost Mali-G31 GPU, > add a compatible string for it. > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > --- > v2->v3: > * Moved optional clock-names and reset-names to SoC-specific conditional > schemas. > * minimum number of reset for the generic GPU is set to 1. > * Documented number of clocks, resets, interrupts and interrupt-names in > RZ/G2L > SoC-specific conditional schemas. > v1->v2: > * Updated minItems for resets as 2 > * Documented optional property reset-names > * Documented reset-names as required property for RZ/G2L SoC. > --- > .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++++++++- > 1 file changed, 43 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > index 6f98dd55fb4c..63a08f3f321d 100644 > --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > @@ -19,6 +19,7 @@ properties: > - amlogic,meson-g12a-mali > - mediatek,mt8183-mali > - realtek,rtd1619-mali > + - renesas,r9a07g044-mali > - rockchip,px30-mali > - rockchip,rk3568-mali > - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is > fully discoverable @@ -27,19 +28,26 @@ properties: > maxItems: 1 > > interrupts: > + minItems: 3 > items: > - description: Job interrupt > - description: MMU interrupt > - description: GPU interrupt > + - description: Event interrupt > > interrupt-names: > + minItems: 3 > items: > - const: job > - const: mmu > - const: gpu > + - const: event > > clocks: > - maxItems: 1 > + minItems: 1 > + maxItems: 3 > + > + clock-names: true > > mali-supply: true > > @@ -52,7 +60,10 @@ properties: > maxItems: 3 > > resets: > - maxItems: 2 > + minItems: 1 > + maxItems: 3 > + > + reset-names: true > > "#cooling-cells": > const: 2 > @@ -94,6 +105,36 @@ allOf: > then: > required: > - resets > + - if: > + properties: > + compatible: > + contains: > + const: renesas,r9a07g044-mali > + then: > + properties: > + interrupts: > + minItems: 4 > + interrupt-names: > + minItems: 4 > + clocks: > + minItems: 3 > + clock-names: > + items: > + - const: gpu > + - const: bus > + - const: bus_ace > + resets: > + minItems: 3 > + reset-names: > + items: > + - const: rst > + - const: axi_rst > + - const: ace_rst > + required: > + - clock-names > + - power-domains > + - resets > + - reset-names > - if: > properties: > compatible: > -- > 2.17.1 ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support 2021-12-10 14:44 ` Biju Das @ 2021-12-14 19:21 ` Rob Herring -1 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-14 19:21 UTC (permalink / raw) To: Biju Das Cc: David Airlie, Daniel Vetter, dri-devel, devicetree, Alyssa Rosenzweig, Steven Price, tomeu.vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, linux-renesas-soc On Fri, Dec 10, 2021 at 02:44:06PM +0000, Biju Das wrote: > Hi All, > > Gentle ping. 2 days later is not a gentle ping. If you want to check status, go look at PW[1]. If it is in there, it's in my queue (only about 100 patches ATM). Rob [1] https://patchwork.ozlabs.org/project/devicetree-bindings/list/ > > Cheers, > Biju > > > Subject: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L > > support > > > > The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost Mali-G31 GPU, > > add a compatible string for it. > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > --- > > v2->v3: > > * Moved optional clock-names and reset-names to SoC-specific conditional > > schemas. > > * minimum number of reset for the generic GPU is set to 1. > > * Documented number of clocks, resets, interrupts and interrupt-names in > > RZ/G2L > > SoC-specific conditional schemas. > > v1->v2: > > * Updated minItems for resets as 2 > > * Documented optional property reset-names > > * Documented reset-names as required property for RZ/G2L SoC. > > --- > > .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++++++++- > > 1 file changed, 43 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > index 6f98dd55fb4c..63a08f3f321d 100644 > > --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > @@ -19,6 +19,7 @@ properties: > > - amlogic,meson-g12a-mali > > - mediatek,mt8183-mali > > - realtek,rtd1619-mali > > + - renesas,r9a07g044-mali > > - rockchip,px30-mali > > - rockchip,rk3568-mali > > - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is > > fully discoverable @@ -27,19 +28,26 @@ properties: > > maxItems: 1 > > > > interrupts: > > + minItems: 3 > > items: > > - description: Job interrupt > > - description: MMU interrupt > > - description: GPU interrupt > > + - description: Event interrupt > > > > interrupt-names: > > + minItems: 3 > > items: > > - const: job > > - const: mmu > > - const: gpu > > + - const: event > > > > clocks: > > - maxItems: 1 > > + minItems: 1 > > + maxItems: 3 > > + > > + clock-names: true > > > > mali-supply: true > > > > @@ -52,7 +60,10 @@ properties: > > maxItems: 3 > > > > resets: > > - maxItems: 2 > > + minItems: 1 > > + maxItems: 3 > > + > > + reset-names: true > > > > "#cooling-cells": > > const: 2 > > @@ -94,6 +105,36 @@ allOf: > > then: > > required: > > - resets > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: renesas,r9a07g044-mali > > + then: > > + properties: > > + interrupts: > > + minItems: 4 > > + interrupt-names: > > + minItems: 4 > > + clocks: > > + minItems: 3 > > + clock-names: > > + items: > > + - const: gpu > > + - const: bus > > + - const: bus_ace > > + resets: > > + minItems: 3 > > + reset-names: > > + items: > > + - const: rst > > + - const: axi_rst > > + - const: ace_rst > > + required: > > + - clock-names > > + - power-domains > > + - resets > > + - reset-names > > - if: > > properties: > > compatible: > > -- > > 2.17.1 > > ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support @ 2021-12-14 19:21 ` Rob Herring 0 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-14 19:21 UTC (permalink / raw) To: Biju Das Cc: devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, David Airlie, Prabhakar Mahadev Lad, dri-devel, Steven Price, linux-renesas-soc, Alyssa Rosenzweig, Biju Das, Robin Murphy On Fri, Dec 10, 2021 at 02:44:06PM +0000, Biju Das wrote: > Hi All, > > Gentle ping. 2 days later is not a gentle ping. If you want to check status, go look at PW[1]. If it is in there, it's in my queue (only about 100 patches ATM). Rob [1] https://patchwork.ozlabs.org/project/devicetree-bindings/list/ > > Cheers, > Biju > > > Subject: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L > > support > > > > The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost Mali-G31 GPU, > > add a compatible string for it. > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > --- > > v2->v3: > > * Moved optional clock-names and reset-names to SoC-specific conditional > > schemas. > > * minimum number of reset for the generic GPU is set to 1. > > * Documented number of clocks, resets, interrupts and interrupt-names in > > RZ/G2L > > SoC-specific conditional schemas. > > v1->v2: > > * Updated minItems for resets as 2 > > * Documented optional property reset-names > > * Documented reset-names as required property for RZ/G2L SoC. > > --- > > .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++++++++- > > 1 file changed, 43 insertions(+), 2 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > index 6f98dd55fb4c..63a08f3f321d 100644 > > --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > @@ -19,6 +19,7 @@ properties: > > - amlogic,meson-g12a-mali > > - mediatek,mt8183-mali > > - realtek,rtd1619-mali > > + - renesas,r9a07g044-mali > > - rockchip,px30-mali > > - rockchip,rk3568-mali > > - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is > > fully discoverable @@ -27,19 +28,26 @@ properties: > > maxItems: 1 > > > > interrupts: > > + minItems: 3 > > items: > > - description: Job interrupt > > - description: MMU interrupt > > - description: GPU interrupt > > + - description: Event interrupt > > > > interrupt-names: > > + minItems: 3 > > items: > > - const: job > > - const: mmu > > - const: gpu > > + - const: event > > > > clocks: > > - maxItems: 1 > > + minItems: 1 > > + maxItems: 3 > > + > > + clock-names: true > > > > mali-supply: true > > > > @@ -52,7 +60,10 @@ properties: > > maxItems: 3 > > > > resets: > > - maxItems: 2 > > + minItems: 1 > > + maxItems: 3 > > + > > + reset-names: true > > > > "#cooling-cells": > > const: 2 > > @@ -94,6 +105,36 @@ allOf: > > then: > > required: > > - resets > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: renesas,r9a07g044-mali > > + then: > > + properties: > > + interrupts: > > + minItems: 4 > > + interrupt-names: > > + minItems: 4 > > + clocks: > > + minItems: 3 > > + clock-names: > > + items: > > + - const: gpu > > + - const: bus > > + - const: bus_ace > > + resets: > > + minItems: 3 > > + reset-names: > > + items: > > + - const: rst > > + - const: axi_rst > > + - const: ace_rst > > + required: > > + - clock-names > > + - power-domains > > + - resets > > + - reset-names > > - if: > > properties: > > compatible: > > -- > > 2.17.1 > > ^ permalink raw reply [flat|nested] 123+ messages in thread
* RE: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support 2021-12-14 19:21 ` Rob Herring @ 2021-12-14 19:31 ` Biju Das -1 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-14 19:31 UTC (permalink / raw) To: Rob Herring Cc: David Airlie, Daniel Vetter, dri-devel, devicetree, Alyssa Rosenzweig, Steven Price, tomeu.vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, linux-renesas-soc Hi Rob, > Subject: Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document > RZ/G2L support > > On Fri, Dec 10, 2021 at 02:44:06PM +0000, Biju Das wrote: > > Hi All, > > > > Gentle ping. > > 2 days later is not a gentle ping. If you want to check status, go look at > PW[1]. If it is in there, it's in my queue (only about 100 patches ATM). Sorry. Next time will take care. Cheers, Biju > > [1] > https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwor > k.ozlabs.org%2Fproject%2Fdevicetree- > bindings%2Flist%2F&data=04%7C01%7Cbiju.das.jz%40bp.renesas.com%7C4c2f7 > b12ae0c4fd541d608d9bf36f549%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C6 > 37751065028707898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2lu > MzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1rccc5jxHMAu111IJrebdW > PwTP%2BrQj8uG9iSuMO58EM%3D&reserved=0 > > > > Cheers, > > Biju > > > > > Subject: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document > > > RZ/G2L support > > > > > > The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost > > > Mali-G31 GPU, add a compatible string for it. > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > --- > > > v2->v3: > > > * Moved optional clock-names and reset-names to SoC-specific > > > conditional schemas. > > > * minimum number of reset for the generic GPU is set to 1. > > > * Documented number of clocks, resets, interrupts and > > > interrupt-names in RZ/G2L > > > SoC-specific conditional schemas. > > > v1->v2: > > > * Updated minItems for resets as 2 > > > * Documented optional property reset-names > > > * Documented reset-names as required property for RZ/G2L SoC. > > > --- > > > .../bindings/gpu/arm,mali-bifrost.yaml | 45 > ++++++++++++++++++- > > > 1 file changed, 43 insertions(+), 2 deletions(-) > > > > > > diff --git > > > a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > > b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > > index 6f98dd55fb4c..63a08f3f321d 100644 > > > --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > > @@ -19,6 +19,7 @@ properties: > > > - amlogic,meson-g12a-mali > > > - mediatek,mt8183-mali > > > - realtek,rtd1619-mali > > > + - renesas,r9a07g044-mali > > > - rockchip,px30-mali > > > - rockchip,rk3568-mali > > > - const: arm,mali-bifrost # Mali Bifrost GPU model/revision > > > is fully discoverable @@ -27,19 +28,26 @@ properties: > > > maxItems: 1 > > > > > > interrupts: > > > + minItems: 3 > > > items: > > > - description: Job interrupt > > > - description: MMU interrupt > > > - description: GPU interrupt > > > + - description: Event interrupt > > > > > > interrupt-names: > > > + minItems: 3 > > > items: > > > - const: job > > > - const: mmu > > > - const: gpu > > > + - const: event > > > > > > clocks: > > > - maxItems: 1 > > > + minItems: 1 > > > + maxItems: 3 > > > + > > > + clock-names: true > > > > > > mali-supply: true > > > > > > @@ -52,7 +60,10 @@ properties: > > > maxItems: 3 > > > > > > resets: > > > - maxItems: 2 > > > + minItems: 1 > > > + maxItems: 3 > > > + > > > + reset-names: true > > > > > > "#cooling-cells": > > > const: 2 > > > @@ -94,6 +105,36 @@ allOf: > > > then: > > > required: > > > - resets > > > + - if: > > > + properties: > > > + compatible: > > > + contains: > > > + const: renesas,r9a07g044-mali > > > + then: > > > + properties: > > > + interrupts: > > > + minItems: 4 > > > + interrupt-names: > > > + minItems: 4 > > > + clocks: > > > + minItems: 3 > > > + clock-names: > > > + items: > > > + - const: gpu > > > + - const: bus > > > + - const: bus_ace > > > + resets: > > > + minItems: 3 > > > + reset-names: > > > + items: > > > + - const: rst > > > + - const: axi_rst > > > + - const: ace_rst > > > + required: > > > + - clock-names > > > + - power-domains > > > + - resets > > > + - reset-names > > > - if: > > > properties: > > > compatible: > > > -- > > > 2.17.1 > > > > ^ permalink raw reply [flat|nested] 123+ messages in thread
* RE: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support @ 2021-12-14 19:31 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-14 19:31 UTC (permalink / raw) To: Rob Herring Cc: devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, David Airlie, Prabhakar Mahadev Lad, dri-devel, Steven Price, linux-renesas-soc, Alyssa Rosenzweig, Biju Das, Robin Murphy Hi Rob, > Subject: Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document > RZ/G2L support > > On Fri, Dec 10, 2021 at 02:44:06PM +0000, Biju Das wrote: > > Hi All, > > > > Gentle ping. > > 2 days later is not a gentle ping. If you want to check status, go look at > PW[1]. If it is in there, it's in my queue (only about 100 patches ATM). Sorry. Next time will take care. Cheers, Biju > > [1] > https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwor > k.ozlabs.org%2Fproject%2Fdevicetree- > bindings%2Flist%2F&data=04%7C01%7Cbiju.das.jz%40bp.renesas.com%7C4c2f7 > b12ae0c4fd541d608d9bf36f549%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C6 > 37751065028707898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2lu > MzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1rccc5jxHMAu111IJrebdW > PwTP%2BrQj8uG9iSuMO58EM%3D&reserved=0 > > > > Cheers, > > Biju > > > > > Subject: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document > > > RZ/G2L support > > > > > > The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost > > > Mali-G31 GPU, add a compatible string for it. > > > > > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > > > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > --- > > > v2->v3: > > > * Moved optional clock-names and reset-names to SoC-specific > > > conditional schemas. > > > * minimum number of reset for the generic GPU is set to 1. > > > * Documented number of clocks, resets, interrupts and > > > interrupt-names in RZ/G2L > > > SoC-specific conditional schemas. > > > v1->v2: > > > * Updated minItems for resets as 2 > > > * Documented optional property reset-names > > > * Documented reset-names as required property for RZ/G2L SoC. > > > --- > > > .../bindings/gpu/arm,mali-bifrost.yaml | 45 > ++++++++++++++++++- > > > 1 file changed, 43 insertions(+), 2 deletions(-) > > > > > > diff --git > > > a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > > b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > > index 6f98dd55fb4c..63a08f3f321d 100644 > > > --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > > > @@ -19,6 +19,7 @@ properties: > > > - amlogic,meson-g12a-mali > > > - mediatek,mt8183-mali > > > - realtek,rtd1619-mali > > > + - renesas,r9a07g044-mali > > > - rockchip,px30-mali > > > - rockchip,rk3568-mali > > > - const: arm,mali-bifrost # Mali Bifrost GPU model/revision > > > is fully discoverable @@ -27,19 +28,26 @@ properties: > > > maxItems: 1 > > > > > > interrupts: > > > + minItems: 3 > > > items: > > > - description: Job interrupt > > > - description: MMU interrupt > > > - description: GPU interrupt > > > + - description: Event interrupt > > > > > > interrupt-names: > > > + minItems: 3 > > > items: > > > - const: job > > > - const: mmu > > > - const: gpu > > > + - const: event > > > > > > clocks: > > > - maxItems: 1 > > > + minItems: 1 > > > + maxItems: 3 > > > + > > > + clock-names: true > > > > > > mali-supply: true > > > > > > @@ -52,7 +60,10 @@ properties: > > > maxItems: 3 > > > > > > resets: > > > - maxItems: 2 > > > + minItems: 1 > > > + maxItems: 3 > > > + > > > + reset-names: true > > > > > > "#cooling-cells": > > > const: 2 > > > @@ -94,6 +105,36 @@ allOf: > > > then: > > > required: > > > - resets > > > + - if: > > > + properties: > > > + compatible: > > > + contains: > > > + const: renesas,r9a07g044-mali > > > + then: > > > + properties: > > > + interrupts: > > > + minItems: 4 > > > + interrupt-names: > > > + minItems: 4 > > > + clocks: > > > + minItems: 3 > > > + clock-names: > > > + items: > > > + - const: gpu > > > + - const: bus > > > + - const: bus_ace > > > + resets: > > > + minItems: 3 > > > + reset-names: > > > + items: > > > + - const: rst > > > + - const: axi_rst > > > + - const: ace_rst > > > + required: > > > + - clock-names > > > + - power-domains > > > + - resets > > > + - reset-names > > > - if: > > > properties: > > > compatible: > > > -- > > > 2.17.1 > > > > ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support 2021-12-08 10:40 ` Biju Das @ 2021-12-13 16:46 ` Steven Price -1 siblings, 0 replies; 123+ messages in thread From: Steven Price @ 2021-12-13 16:46 UTC (permalink / raw) To: Biju Das, David Airlie, Daniel Vetter, Rob Herring Cc: devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, Prabhakar Mahadev Lad, dri-devel, linux-renesas-soc, Alyssa Rosenzweig, Biju Das, Robin Murphy On 08/12/2021 10:40, Biju Das wrote: > The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost Mali-G31 GPU, > add a compatible string for it. > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > --- > v2->v3: > * Moved optional clock-names and reset-names to SoC-specific conditional schemas. > * minimum number of reset for the generic GPU is set to 1. > * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L > SoC-specific conditional schemas. > v1->v2: > * Updated minItems for resets as 2 > * Documented optional property reset-names > * Documented reset-names as required property for RZ/G2L SoC. > --- > .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++++++++- > 1 file changed, 43 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > index 6f98dd55fb4c..63a08f3f321d 100644 > --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > @@ -19,6 +19,7 @@ properties: > - amlogic,meson-g12a-mali > - mediatek,mt8183-mali > - realtek,rtd1619-mali > + - renesas,r9a07g044-mali > - rockchip,px30-mali > - rockchip,rk3568-mali > - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable > @@ -27,19 +28,26 @@ properties: > maxItems: 1 > > interrupts: > + minItems: 3 > items: > - description: Job interrupt > - description: MMU interrupt > - description: GPU interrupt > + - description: Event interrupt > > interrupt-names: > + minItems: 3 > items: > - const: job > - const: mmu > - const: gpu > + - const: event FWIW: I think it's fair to add the "event" interrupt even if it isn't included in the bindings for kbase. While pretty much useless on Bifrost it is a hardware feature and in theory it could be used. Reviewed-by: Steven Price <steven.price@arm.com> Steve > > clocks: > - maxItems: 1 > + minItems: 1 > + maxItems: 3 > + > + clock-names: true > > mali-supply: true > > @@ -52,7 +60,10 @@ properties: > maxItems: 3 > > resets: > - maxItems: 2 > + minItems: 1 > + maxItems: 3 > + > + reset-names: true > > "#cooling-cells": > const: 2 > @@ -94,6 +105,36 @@ allOf: > then: > required: > - resets > + - if: > + properties: > + compatible: > + contains: > + const: renesas,r9a07g044-mali > + then: > + properties: > + interrupts: > + minItems: 4 > + interrupt-names: > + minItems: 4 > + clocks: > + minItems: 3 > + clock-names: > + items: > + - const: gpu > + - const: bus > + - const: bus_ace > + resets: > + minItems: 3 > + reset-names: > + items: > + - const: rst > + - const: axi_rst > + - const: ace_rst > + required: > + - clock-names > + - power-domains > + - resets > + - reset-names > - if: > properties: > compatible: > ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support @ 2021-12-13 16:46 ` Steven Price 0 siblings, 0 replies; 123+ messages in thread From: Steven Price @ 2021-12-13 16:46 UTC (permalink / raw) To: Biju Das, David Airlie, Daniel Vetter, Rob Herring Cc: devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, Prabhakar Mahadev Lad, dri-devel, Biju Das, linux-renesas-soc, Alyssa Rosenzweig, Robin Murphy On 08/12/2021 10:40, Biju Das wrote: > The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost Mali-G31 GPU, > add a compatible string for it. > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > --- > v2->v3: > * Moved optional clock-names and reset-names to SoC-specific conditional schemas. > * minimum number of reset for the generic GPU is set to 1. > * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L > SoC-specific conditional schemas. > v1->v2: > * Updated minItems for resets as 2 > * Documented optional property reset-names > * Documented reset-names as required property for RZ/G2L SoC. > --- > .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++++++++- > 1 file changed, 43 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > index 6f98dd55fb4c..63a08f3f321d 100644 > --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml > @@ -19,6 +19,7 @@ properties: > - amlogic,meson-g12a-mali > - mediatek,mt8183-mali > - realtek,rtd1619-mali > + - renesas,r9a07g044-mali > - rockchip,px30-mali > - rockchip,rk3568-mali > - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable > @@ -27,19 +28,26 @@ properties: > maxItems: 1 > > interrupts: > + minItems: 3 > items: > - description: Job interrupt > - description: MMU interrupt > - description: GPU interrupt > + - description: Event interrupt > > interrupt-names: > + minItems: 3 > items: > - const: job > - const: mmu > - const: gpu > + - const: event FWIW: I think it's fair to add the "event" interrupt even if it isn't included in the bindings for kbase. While pretty much useless on Bifrost it is a hardware feature and in theory it could be used. Reviewed-by: Steven Price <steven.price@arm.com> Steve > > clocks: > - maxItems: 1 > + minItems: 1 > + maxItems: 3 > + > + clock-names: true > > mali-supply: true > > @@ -52,7 +60,10 @@ properties: > maxItems: 3 > > resets: > - maxItems: 2 > + minItems: 1 > + maxItems: 3 > + > + reset-names: true > > "#cooling-cells": > const: 2 > @@ -94,6 +105,36 @@ allOf: > then: > required: > - resets > + - if: > + properties: > + compatible: > + contains: > + const: renesas,r9a07g044-mali > + then: > + properties: > + interrupts: > + minItems: 4 > + interrupt-names: > + minItems: 4 > + clocks: > + minItems: 3 > + clock-names: > + items: > + - const: gpu > + - const: bus > + - const: bus_ace > + resets: > + minItems: 3 > + reset-names: > + items: > + - const: rst > + - const: axi_rst > + - const: ace_rst > + required: > + - clock-names > + - power-domains > + - resets > + - reset-names > - if: > properties: > compatible: > ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support 2021-12-08 10:40 ` Biju Das @ 2021-12-14 19:25 ` Rob Herring -1 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-14 19:25 UTC (permalink / raw) To: Biju Das Cc: Robin Murphy, dri-devel, Daniel Vetter, tomeu.vizoso, Geert Uytterhoeven, Prabhakar Mahadev Lad, Alyssa Rosenzweig, devicetree, David Airlie, Chris Paterson, linux-renesas-soc, Rob Herring, Biju Das, Steven Price On Wed, 08 Dec 2021 10:40:24 +0000, Biju Das wrote: > The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost Mali-G31 GPU, > add a compatible string for it. > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > --- > v2->v3: > * Moved optional clock-names and reset-names to SoC-specific conditional schemas. > * minimum number of reset for the generic GPU is set to 1. > * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L > SoC-specific conditional schemas. > v1->v2: > * Updated minItems for resets as 2 > * Documented optional property reset-names > * Documented reset-names as required property for RZ/G2L SoC. > --- > .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++++++++- > 1 file changed, 43 insertions(+), 2 deletions(-) > Applied, thanks! ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support @ 2021-12-14 19:25 ` Rob Herring 0 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-14 19:25 UTC (permalink / raw) To: Biju Das Cc: devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, David Airlie, Prabhakar Mahadev Lad, dri-devel, Biju Das, linux-renesas-soc, Rob Herring, Alyssa Rosenzweig, Steven Price, Robin Murphy On Wed, 08 Dec 2021 10:40:24 +0000, Biju Das wrote: > The Renesas RZ/G2{L, LC} SoC (a.k.a R9A07G044) has a Bifrost Mali-G31 GPU, > add a compatible string for it. > > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> > Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > --- > v2->v3: > * Moved optional clock-names and reset-names to SoC-specific conditional schemas. > * minimum number of reset for the generic GPU is set to 1. > * Documented number of clocks, resets, interrupts and interrupt-names in RZ/G2L > SoC-specific conditional schemas. > v1->v2: > * Updated minItems for resets as 2 > * Documented optional property reset-names > * Documented reset-names as required property for RZ/G2L SoC. > --- > .../bindings/gpu/arm,mali-bifrost.yaml | 45 ++++++++++++++++++- > 1 file changed, 43 insertions(+), 2 deletions(-) > Applied, thanks! ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v3 2/3] arm64: dts: renesas: r9a07g044: Add Mali-G31 GPU node 2021-12-08 10:40 ` Biju Das ` (7 preceding siblings ...) (?) @ 2021-12-08 10:40 ` Biju Das -1 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-08 10:40 UTC (permalink / raw) To: Rob Herring Cc: Biju Das, Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree, Chris Paterson, Biju Das, Prabhakar Mahadev Lad Add Mali-G31 GPU node to SoC DTSI. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> --- v2->v3: * No change. v1->v2: * Added reset-names. * Added Rb tag from Geert --- arch/arm64/boot/dts/renesas/r9a07g044.dtsi | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r9a07g044.dtsi b/arch/arm64/boot/dts/renesas/r9a07g044.dtsi index f39265e51445..ea1bda166273 100644 --- a/arch/arm64/boot/dts/renesas/r9a07g044.dtsi +++ b/arch/arm64/boot/dts/renesas/r9a07g044.dtsi @@ -111,6 +111,50 @@ }; }; + gpu_opp_table: opp-table-1 { + compatible = "operating-points-v2"; + + opp-500000000 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <1100000>; + }; + + opp-400000000 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <1100000>; + }; + + opp-250000000 { + opp-hz = /bits/ 64 <250000000>; + opp-microvolt = <1100000>; + }; + + opp-200000000 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <1100000>; + }; + + opp-125000000 { + opp-hz = /bits/ 64 <125000000>; + opp-microvolt = <1100000>; + }; + + opp-100000000 { + opp-hz = /bits/ 64 <100000000>; + opp-microvolt = <1100000>; + }; + + opp-62500000 { + opp-hz = /bits/ 64 <62500000>; + opp-microvolt = <1100000>; + }; + + opp-50000000 { + opp-hz = /bits/ 64 <50000000>; + opp-microvolt = <1100000>; + }; + }; + psci { compatible = "arm,psci-1.0", "arm,psci-0.2"; method = "smc"; @@ -637,6 +681,27 @@ dma-channels = <16>; }; + gpu: gpu@11840000 { + compatible = "renesas,r9a07g044-mali", + "arm,mali-bifrost"; + reg = <0x0 0x11840000 0x0 0x10000>; + interrupts = <GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "job", "mmu", "gpu", "event"; + clocks = <&cpg CPG_MOD R9A07G044_GPU_CLK>, + <&cpg CPG_MOD R9A07G044_GPU_AXI_CLK>, + <&cpg CPG_MOD R9A07G044_GPU_ACE_CLK>; + clock-names = "gpu", "bus", "bus_ace"; + power-domains = <&cpg>; + resets = <&cpg R9A07G044_GPU_RESETN>, + <&cpg R9A07G044_GPU_AXI_RESETN>, + <&cpg R9A07G044_GPU_ACE_RESETN>; + reset-names = "rst", "axi_rst", "ace_rst"; + operating-points-v2 = <&gpu_opp_table>; + }; + gic: interrupt-controller@11900000 { compatible = "arm,gic-v3"; #interrupt-cells = <3>; -- 2.17.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v3 3/3] arm64: dts: renesas: rzg2l-smarc-som: Add vdd core regulator 2021-12-08 10:40 ` Biju Das ` (8 preceding siblings ...) (?) @ 2021-12-08 10:40 ` Biju Das -1 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-08 10:40 UTC (permalink / raw) To: Rob Herring Cc: Biju Das, Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree, Chris Paterson, Biju Das, Prabhakar Mahadev Lad Add vdd core regulator (1.1 V). This patch add regulator support for gpu. The H/W manual mentions nothing about a gpu regulator. So using vdd core regulator for gpu. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> --- v2->v3: * Updated the commit description. Thanks to Sergey Shtylyov. v1->v2: * Added Rb tag from Geert. --- arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi index a4fc9517a0de..4ce799314f0f 100644 --- a/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi @@ -52,6 +52,15 @@ regulator-always-on; }; + reg_1p1v: regulator-vdd-core { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.1V"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-boot-on; + regulator-always-on; + }; + vccq_sdhi0: regulator-vccq-sdhi0 { compatible = "regulator-gpio"; @@ -130,6 +139,10 @@ clock-frequency = <24000000>; }; +&gpu { + mali-supply = <®_1p1v>; +}; + &ostm1 { status = "okay"; }; -- 2.17.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC 2021-12-08 10:40 ` Biju Das (?) @ 2021-12-16 13:46 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:46 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, David Airlie, Daniel Vetter, Rob Herring Cc: Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Biju Das, DRI Development, Alyssa Rosenzweig, Steven Price, Tomeu Vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, Linux-Renesas On Thu, Dec 16, 2021 at 2:37 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Biju Das <biju.das.jz@bp.renesas.com> > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-16 13:46 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:46 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, David Airlie, Daniel Vetter, Rob Herring Cc: Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Biju Das, DRI Development, Alyssa Rosenzweig, Steven Price, Tomeu Vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, Linux-Renesas On Thu, Dec 16, 2021 at 2:37 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Biju Das <biju.das.jz@bp.renesas.com> > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-16 13:46 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:46 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, David Airlie, Daniel Vetter, Rob Herring Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Damien Le Moal, Lewis Hanly, Geert Uytterhoeven, Tomeu Vizoso, Krzysztof Kozlowski, Prabhakar Mahadev Lad, Chris Paterson, DRI Development, Steven Price, Linux-Renesas, Conor Dooley, Alyssa Rosenzweig, Biju Das, linux-riscv, Biju Das, Robin Murphy On Thu, Dec 16, 2021 at 2:37 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Biju Das <biju.das.jz@bp.renesas.com> > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC 2021-12-08 10:40 ` Biju Das (?) @ 2021-12-16 13:47 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:47 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, David Airlie, Daniel Vetter Cc: Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv, Biju Das, DRI Development, Alyssa Rosenzweig, Steven Price, Tomeu Vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, Linux-Renesas On Thu, Dec 16, 2021 at 2:41 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Biju Das <biju.das.jz@bp.renesas.com> > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-16 13:47 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:47 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, David Airlie, Daniel Vetter Cc: Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv, Biju Das, DRI Development, Alyssa Rosenzweig, Steven Price, Tomeu Vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, Linux-Renesas On Thu, Dec 16, 2021 at 2:41 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Biju Das <biju.das.jz@bp.renesas.com> > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-16 13:47 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:47 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, David Airlie, Daniel Vetter Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Chris Paterson, Geert Uytterhoeven, Tomeu Vizoso, Prabhakar Mahadev Lad, Linux Kernel Mailing List, DRI Development, Steven Price, Linux-Renesas, Alyssa Rosenzweig, Biju Das, linux-riscv, Biju Das, Robin Murphy On Thu, Dec 16, 2021 at 2:41 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Biju Das <biju.das.jz@bp.renesas.com> > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC 2021-12-08 10:40 ` Biju Das (?) @ 2021-12-16 13:47 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:47 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel, David Airlie, Daniel Vetter Cc: Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv, Biju Das, DRI Development, Alyssa Rosenzweig, Steven Price, Tomeu Vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, Linux-Renesas On Thu, Dec 16, 2021 at 2:44 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Biju Das <biju.das.jz@bp.renesas.com> > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-16 13:47 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:47 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel, David Airlie, Daniel Vetter Cc: Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv, Biju Das, DRI Development, Alyssa Rosenzweig, Steven Price, Tomeu Vizoso, Robin Murphy, Geert Uytterhoeven, Chris Paterson, Biju Das, Prabhakar Mahadev Lad, Linux-Renesas On Thu, Dec 16, 2021 at 2:44 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Biju Das <biju.das.jz@bp.renesas.com> > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-16 13:47 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:47 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel, David Airlie, Daniel Vetter Cc: open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Chris Paterson, Geert Uytterhoeven, Tomeu Vizoso, Prabhakar Mahadev Lad, Linux Kernel Mailing List, DRI Development, Steven Price, Linux-Renesas, Alyssa Rosenzweig, Biju Das, linux-riscv, Biju Das, Robin Murphy On Thu, Dec 16, 2021 at 2:44 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Biju Das <biju.das.jz@bp.renesas.com> > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC 2021-12-08 10:40 ` Biju Das @ 2021-12-16 14:00 ` Daniel Stone -1 siblings, 0 replies; 123+ messages in thread From: Daniel Stone @ 2021-12-16 14:00 UTC (permalink / raw) To: Biju Das Cc: David Airlie, Daniel Vetter, Rob Herring, devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, Prabhakar Mahadev Lad, dri-devel, Steven Price, linux-renesas-soc, Alyssa Rosenzweig, Biju Das, Robin Murphy Hi Biju, On Wed, 8 Dec 2021 at 10:40, Biju Das <biju.das.jz@bp.renesas.com> wrote: > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same > > It is tested with latest drm-misc-next + mesa 21.3.0 + > out of tree patch for (du + DSI) + > platform specific mesa configuration for RZ/G2L. Could you please post the 'platform-specific Mesa configuration' patches as a merge request to Mesa? Thanks. Cheers, Daniel ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-16 14:00 ` Daniel Stone 0 siblings, 0 replies; 123+ messages in thread From: Daniel Stone @ 2021-12-16 14:00 UTC (permalink / raw) To: Biju Das Cc: devicetree, Chris Paterson, tomeu.vizoso, Geert Uytterhoeven, David Airlie, Prabhakar Mahadev Lad, dri-devel, Steven Price, linux-renesas-soc, Rob Herring, Alyssa Rosenzweig, Biju Das, Robin Murphy Hi Biju, On Wed, 8 Dec 2021 at 10:40, Biju Das <biju.das.jz@bp.renesas.com> wrote: > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > This patch series aims to add support for the same > > It is tested with latest drm-misc-next + mesa 21.3.0 + > out of tree patch for (du + DSI) + > platform specific mesa configuration for RZ/G2L. Could you please post the 'platform-specific Mesa configuration' patches as a merge request to Mesa? Thanks. Cheers, Daniel ^ permalink raw reply [flat|nested] 123+ messages in thread
* RE: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC 2021-12-16 14:00 ` Daniel Stone @ 2021-12-16 14:02 ` Biju Das -1 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-16 14:02 UTC (permalink / raw) To: Daniel Stone Cc: David Airlie, Daniel Vetter, Rob Herring, devicetree, Chris Paterson, Geert Uytterhoeven, tomeu.vizoso, Prabhakar Mahadev Lad, dri-devel, Steven Price, linux-renesas-soc, Alyssa Rosenzweig, Biju Das, Robin Murphy Hi Daniel Stone, Thanks for the feedback. > Subject: Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC > > Hi Biju, > > On Wed, 8 Dec 2021 at 10:40, Biju Das <biju.das.jz@bp.renesas.com> wrote: > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > > This patch series aims to add support for the same > > > > It is tested with latest drm-misc-next + mesa 21.3.0 + out of tree > > patch for (du + DSI) + platform specific mesa configuration for > > RZ/G2L. > > Could you please post the 'platform-specific Mesa configuration' > patches as a merge request to Mesa? Sure will send a merge request to Mesa. Regards, Biju ^ permalink raw reply [flat|nested] 123+ messages in thread
* RE: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC @ 2021-12-16 14:02 ` Biju Das 0 siblings, 0 replies; 123+ messages in thread From: Biju Das @ 2021-12-16 14:02 UTC (permalink / raw) To: Daniel Stone Cc: devicetree, Chris Paterson, tomeu.vizoso, Geert Uytterhoeven, David Airlie, Prabhakar Mahadev Lad, dri-devel, Steven Price, linux-renesas-soc, Rob Herring, Alyssa Rosenzweig, Biju Das, Robin Murphy Hi Daniel Stone, Thanks for the feedback. > Subject: Re: [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC > > Hi Biju, > > On Wed, 8 Dec 2021 at 10:40, Biju Das <biju.das.jz@bp.renesas.com> wrote: > > RZ/G2L SoC embeds Mali-G31 bifrost GPU. > > This patch series aims to add support for the same > > > > It is tested with latest drm-misc-next + mesa 21.3.0 + out of tree > > patch for (du + DSI) + platform specific mesa configuration for > > RZ/G2L. > > Could you please post the 'platform-specific Mesa configuration' > patches as a merge request to Mesa? Sure will send a merge request to Mesa. Regards, Biju ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Miquel Raynal @ 2021-12-15 15:46 UTC (permalink / raw) To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, devicetree, Miquel Raynal Hello, Here is a short series bringing support for Renesas RZ/N1 NAND controller. This time the driver has been tested with a fully-upstream device tree on top of a v5.16-rc4. The DT used is very close to the r9a06g032-db. Cheers, Miquèl Changes in v4: * Set unevaluatedProperties set to false in the bindings. * Change the clock names by removing the nand_ prefix which is redundant, even though the clocks are named like this in the spec. The name remains clear enough anyway. Changes in v3: * Rebased on top of a fully-upstream recent kernel. * Renamed the clocks in the bindings and the driver to match the documentation (lower-cased): nand_hclk & nand_eclk. * Added a new commit describing the NAND controller in the r9a06g032 DTSI. * Added the Reviewed-by and Tested-by tags received. Changes in v2: * Added the family-specific rzn1 compatible as suggested by Geert. Updated the bindings, the binding file name, the compatible used in the driver, the MAINTAINERS entry, etc. * Added an ARCH_RENESAS Kconfig dependency. * Changed the type (to unsigned) of a couple of variables. * Returned earlier when possible to reduce indentation. * Used platform_get_irq_optional() instead of platform_get_irq() to avoid a useless warning. * Handled probe deferral correctly. * Applied a massive s/nfc/nandc/ as suggested by Geert to avoid confusions with the near-field-communication device. * Mentioned Evatronix as original authors of the IP in the commit log and in the header. * Added an additional check on the validity of the child nodes reg property. * A couple of style fixes. Miquel Raynal (4): dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller mtd: rawnand: rzn1: Add new NAND controller driver MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller ARM: dts: r9a06g032: Describe NAND controller .../mtd/renesas,rzn1-nand-controller.yaml | 64 + MAINTAINERS | 7 + arch/arm/boot/dts/r9a06g032.dtsi | 12 + drivers/mtd/nand/raw/Kconfig | 6 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/rzn1-nand-controller.c | 1422 +++++++++++++++++ 6 files changed, 1512 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml create mode 100644 drivers/mtd/nand/raw/rzn1-nand-controller.c -- 2.27.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:43 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-kernel, devicetree, linux-riscv, Miquel Raynal, linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande From: Miquel Raynal <miquel.raynal@bootlin.com> Hello, Here is a short series bringing support for Renesas RZ/N1 NAND controller. This time the driver has been tested with a fully-upstream device tree on top of a v5.16-rc4. The DT used is very close to the r9a06g032-db. Cheers, Miquèl Changes in v4: * Set unevaluatedProperties set to false in the bindings. * Change the clock names by removing the nand_ prefix which is redundant, even though the clocks are named like this in the spec. The name remains clear enough anyway. Changes in v3: * Rebased on top of a fully-upstream recent kernel. * Renamed the clocks in the bindings and the driver to match the documentation (lower-cased): nand_hclk & nand_eclk. * Added a new commit describing the NAND controller in the r9a06g032 DTSI. * Added the Reviewed-by and Tested-by tags received. Changes in v2: * Added the family-specific rzn1 compatible as suggested by Geert. Updated the bindings, the binding file name, the compatible used in the driver, the MAINTAINERS entry, etc. * Added an ARCH_RENESAS Kconfig dependency. * Changed the type (to unsigned) of a couple of variables. * Returned earlier when possible to reduce indentation. * Used platform_get_irq_optional() instead of platform_get_irq() to avoid a useless warning. * Handled probe deferral correctly. * Applied a massive s/nfc/nandc/ as suggested by Geert to avoid confusions with the near-field-communication device. * Mentioned Evatronix as original authors of the IP in the commit log and in the header. * Added an additional check on the validity of the child nodes reg property. * A couple of style fixes. Miquel Raynal (4): dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller mtd: rawnand: rzn1: Add new NAND controller driver MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller ARM: dts: r9a06g032: Describe NAND controller .../mtd/renesas,rzn1-nand-controller.yaml | 64 + MAINTAINERS | 7 + arch/arm/boot/dts/r9a06g032.dtsi | 12 + drivers/mtd/nand/raw/Kconfig | 6 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/rzn1-nand-controller.c | 1422 +++++++++++++++++ 6 files changed, 1512 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml create mode 100644 drivers/mtd/nand/raw/rzn1-nand-controller.c -- 2.27.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:43 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-kernel, devicetree, linux-riscv, Miquel Raynal, linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande From: Miquel Raynal <miquel.raynal@bootlin.com> Hello, Here is a short series bringing support for Renesas RZ/N1 NAND controller. This time the driver has been tested with a fully-upstream device tree on top of a v5.16-rc4. The DT used is very close to the r9a06g032-db. Cheers, Miquèl Changes in v4: * Set unevaluatedProperties set to false in the bindings. * Change the clock names by removing the nand_ prefix which is redundant, even though the clocks are named like this in the spec. The name remains clear enough anyway. Changes in v3: * Rebased on top of a fully-upstream recent kernel. * Renamed the clocks in the bindings and the driver to match the documentation (lower-cased): nand_hclk & nand_eclk. * Added a new commit describing the NAND controller in the r9a06g032 DTSI. * Added the Reviewed-by and Tested-by tags received. Changes in v2: * Added the family-specific rzn1 compatible as suggested by Geert. Updated the bindings, the binding file name, the compatible used in the driver, the MAINTAINERS entry, etc. * Added an ARCH_RENESAS Kconfig dependency. * Changed the type (to unsigned) of a couple of variables. * Returned earlier when possible to reduce indentation. * Used platform_get_irq_optional() instead of platform_get_irq() to avoid a useless warning. * Handled probe deferral correctly. * Applied a massive s/nfc/nandc/ as suggested by Geert to avoid confusions with the near-field-communication device. * Mentioned Evatronix as original authors of the IP in the commit log and in the header. * Added an additional check on the validity of the child nodes reg property. * A couple of style fixes. Miquel Raynal (4): dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller mtd: rawnand: rzn1: Add new NAND controller driver MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller ARM: dts: r9a06g032: Describe NAND controller .../mtd/renesas,rzn1-nand-controller.yaml | 64 + MAINTAINERS | 7 + arch/arm/boot/dts/r9a06g032.dtsi | 12 + drivers/mtd/nand/raw/Kconfig | 6 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/rzn1-nand-controller.c | 1422 +++++++++++++++++ 6 files changed, 1512 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml create mode 100644 drivers/mtd/nand/raw/rzn1-nand-controller.c -- 2.27.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:41 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-kernel, devicetree, linux-riscv, Miquel Raynal, linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande From: Miquel Raynal <miquel.raynal@bootlin.com> Hello, Here is a short series bringing support for Renesas RZ/N1 NAND controller. This time the driver has been tested with a fully-upstream device tree on top of a v5.16-rc4. The DT used is very close to the r9a06g032-db. Cheers, Miquèl Changes in v4: * Set unevaluatedProperties set to false in the bindings. * Change the clock names by removing the nand_ prefix which is redundant, even though the clocks are named like this in the spec. The name remains clear enough anyway. Changes in v3: * Rebased on top of a fully-upstream recent kernel. * Renamed the clocks in the bindings and the driver to match the documentation (lower-cased): nand_hclk & nand_eclk. * Added a new commit describing the NAND controller in the r9a06g032 DTSI. * Added the Reviewed-by and Tested-by tags received. Changes in v2: * Added the family-specific rzn1 compatible as suggested by Geert. Updated the bindings, the binding file name, the compatible used in the driver, the MAINTAINERS entry, etc. * Added an ARCH_RENESAS Kconfig dependency. * Changed the type (to unsigned) of a couple of variables. * Returned earlier when possible to reduce indentation. * Used platform_get_irq_optional() instead of platform_get_irq() to avoid a useless warning. * Handled probe deferral correctly. * Applied a massive s/nfc/nandc/ as suggested by Geert to avoid confusions with the near-field-communication device. * Mentioned Evatronix as original authors of the IP in the commit log and in the header. * Added an additional check on the validity of the child nodes reg property. * A couple of style fixes. Miquel Raynal (4): dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller mtd: rawnand: rzn1: Add new NAND controller driver MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller ARM: dts: r9a06g032: Describe NAND controller .../mtd/renesas,rzn1-nand-controller.yaml | 64 + MAINTAINERS | 7 + arch/arm/boot/dts/r9a06g032.dtsi | 12 + drivers/mtd/nand/raw/Kconfig | 6 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/rzn1-nand-controller.c | 1422 +++++++++++++++++ 6 files changed, 1512 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml create mode 100644 drivers/mtd/nand/raw/rzn1-nand-controller.c -- 2.27.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:41 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-kernel, devicetree, linux-riscv, Miquel Raynal, linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande From: Miquel Raynal <miquel.raynal@bootlin.com> Hello, Here is a short series bringing support for Renesas RZ/N1 NAND controller. This time the driver has been tested with a fully-upstream device tree on top of a v5.16-rc4. The DT used is very close to the r9a06g032-db. Cheers, Miquèl Changes in v4: * Set unevaluatedProperties set to false in the bindings. * Change the clock names by removing the nand_ prefix which is redundant, even though the clocks are named like this in the spec. The name remains clear enough anyway. Changes in v3: * Rebased on top of a fully-upstream recent kernel. * Renamed the clocks in the bindings and the driver to match the documentation (lower-cased): nand_hclk & nand_eclk. * Added a new commit describing the NAND controller in the r9a06g032 DTSI. * Added the Reviewed-by and Tested-by tags received. Changes in v2: * Added the family-specific rzn1 compatible as suggested by Geert. Updated the bindings, the binding file name, the compatible used in the driver, the MAINTAINERS entry, etc. * Added an ARCH_RENESAS Kconfig dependency. * Changed the type (to unsigned) of a couple of variables. * Returned earlier when possible to reduce indentation. * Used platform_get_irq_optional() instead of platform_get_irq() to avoid a useless warning. * Handled probe deferral correctly. * Applied a massive s/nfc/nandc/ as suggested by Geert to avoid confusions with the near-field-communication device. * Mentioned Evatronix as original authors of the IP in the commit log and in the header. * Added an additional check on the validity of the child nodes reg property. * A couple of style fixes. Miquel Raynal (4): dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller mtd: rawnand: rzn1: Add new NAND controller driver MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller ARM: dts: r9a06g032: Describe NAND controller .../mtd/renesas,rzn1-nand-controller.yaml | 64 + MAINTAINERS | 7 + arch/arm/boot/dts/r9a06g032.dtsi | 12 + drivers/mtd/nand/raw/Kconfig | 6 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/rzn1-nand-controller.c | 1422 +++++++++++++++++ 6 files changed, 1512 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml create mode 100644 drivers/mtd/nand/raw/rzn1-nand-controller.c -- 2.27.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Miquel Raynal, linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande From: Miquel Raynal <miquel.raynal@bootlin.com> Hello, Here is a short series bringing support for Renesas RZ/N1 NAND controller. This time the driver has been tested with a fully-upstream device tree on top of a v5.16-rc4. The DT used is very close to the r9a06g032-db. Cheers, Miquèl Changes in v4: * Set unevaluatedProperties set to false in the bindings. * Change the clock names by removing the nand_ prefix which is redundant, even though the clocks are named like this in the spec. The name remains clear enough anyway. Changes in v3: * Rebased on top of a fully-upstream recent kernel. * Renamed the clocks in the bindings and the driver to match the documentation (lower-cased): nand_hclk & nand_eclk. * Added a new commit describing the NAND controller in the r9a06g032 DTSI. * Added the Reviewed-by and Tested-by tags received. Changes in v2: * Added the family-specific rzn1 compatible as suggested by Geert. Updated the bindings, the binding file name, the compatible used in the driver, the MAINTAINERS entry, etc. * Added an ARCH_RENESAS Kconfig dependency. * Changed the type (to unsigned) of a couple of variables. * Returned earlier when possible to reduce indentation. * Used platform_get_irq_optional() instead of platform_get_irq() to avoid a useless warning. * Handled probe deferral correctly. * Applied a massive s/nfc/nandc/ as suggested by Geert to avoid confusions with the near-field-communication device. * Mentioned Evatronix as original authors of the IP in the commit log and in the header. * Added an additional check on the validity of the child nodes reg property. * A couple of style fixes. Miquel Raynal (4): dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller mtd: rawnand: rzn1: Add new NAND controller driver MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller ARM: dts: r9a06g032: Describe NAND controller .../mtd/renesas,rzn1-nand-controller.yaml | 64 + MAINTAINERS | 7 + arch/arm/boot/dts/r9a06g032.dtsi | 12 + drivers/mtd/nand/raw/Kconfig | 6 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/rzn1-nand-controller.c | 1422 +++++++++++++++++ 6 files changed, 1512 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml create mode 100644 drivers/mtd/nand/raw/rzn1-nand-controller.c -- 2.27.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Miquel Raynal, linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande From: Miquel Raynal <miquel.raynal@bootlin.com> Hello, Here is a short series bringing support for Renesas RZ/N1 NAND controller. This time the driver has been tested with a fully-upstream device tree on top of a v5.16-rc4. The DT used is very close to the r9a06g032-db. Cheers, Miquèl Changes in v4: * Set unevaluatedProperties set to false in the bindings. * Change the clock names by removing the nand_ prefix which is redundant, even though the clocks are named like this in the spec. The name remains clear enough anyway. Changes in v3: * Rebased on top of a fully-upstream recent kernel. * Renamed the clocks in the bindings and the driver to match the documentation (lower-cased): nand_hclk & nand_eclk. * Added a new commit describing the NAND controller in the r9a06g032 DTSI. * Added the Reviewed-by and Tested-by tags received. Changes in v2: * Added the family-specific rzn1 compatible as suggested by Geert. Updated the bindings, the binding file name, the compatible used in the driver, the MAINTAINERS entry, etc. * Added an ARCH_RENESAS Kconfig dependency. * Changed the type (to unsigned) of a couple of variables. * Returned earlier when possible to reduce indentation. * Used platform_get_irq_optional() instead of platform_get_irq() to avoid a useless warning. * Handled probe deferral correctly. * Applied a massive s/nfc/nandc/ as suggested by Geert to avoid confusions with the near-field-communication device. * Mentioned Evatronix as original authors of the IP in the commit log and in the header. * Added an additional check on the validity of the child nodes reg property. * A couple of style fixes. Miquel Raynal (4): dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller mtd: rawnand: rzn1: Add new NAND controller driver MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller ARM: dts: r9a06g032: Describe NAND controller .../mtd/renesas,rzn1-nand-controller.yaml | 64 + MAINTAINERS | 7 + arch/arm/boot/dts/r9a06g032.dtsi | 12 + drivers/mtd/nand/raw/Kconfig | 6 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/rzn1-nand-controller.c | 1422 +++++++++++++++++ 6 files changed, 1512 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml create mode 100644 drivers/mtd/nand/raw/rzn1-nand-controller.c -- 2.27.0 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Miquel Raynal @ 2021-12-15 15:46 UTC (permalink / raw) To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, devicetree, Miquel Raynal Hello, Here is a short series bringing support for Renesas RZ/N1 NAND controller. This time the driver has been tested with a fully-upstream device tree on top of a v5.16-rc4. The DT used is very close to the r9a06g032-db. Cheers, Miquèl Changes in v4: * Set unevaluatedProperties set to false in the bindings. * Change the clock names by removing the nand_ prefix which is redundant, even though the clocks are named like this in the spec. The name remains clear enough anyway. Changes in v3: * Rebased on top of a fully-upstream recent kernel. * Renamed the clocks in the bindings and the driver to match the documentation (lower-cased): nand_hclk & nand_eclk. * Added a new commit describing the NAND controller in the r9a06g032 DTSI. * Added the Reviewed-by and Tested-by tags received. Changes in v2: * Added the family-specific rzn1 compatible as suggested by Geert. Updated the bindings, the binding file name, the compatible used in the driver, the MAINTAINERS entry, etc. * Added an ARCH_RENESAS Kconfig dependency. * Changed the type (to unsigned) of a couple of variables. * Returned earlier when possible to reduce indentation. * Used platform_get_irq_optional() instead of platform_get_irq() to avoid a useless warning. * Handled probe deferral correctly. * Applied a massive s/nfc/nandc/ as suggested by Geert to avoid confusions with the near-field-communication device. * Mentioned Evatronix as original authors of the IP in the commit log and in the header. * Added an additional check on the validity of the child nodes reg property. * A couple of style fixes. Miquel Raynal (4): dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller mtd: rawnand: rzn1: Add new NAND controller driver MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller ARM: dts: r9a06g032: Describe NAND controller .../mtd/renesas,rzn1-nand-controller.yaml | 64 + MAINTAINERS | 7 + arch/arm/boot/dts/r9a06g032.dtsi | 12 + drivers/mtd/nand/raw/Kconfig | 6 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/rzn1-nand-controller.c | 1422 +++++++++++++++++ 6 files changed, 1512 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml create mode 100644 drivers/mtd/nand/raw/rzn1-nand-controller.c -- 2.27.0 ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 1/4] dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller 2021-12-15 15:46 ` Miquel Raynal @ 2021-12-15 15:46 ` Miquel Raynal -1 siblings, 0 replies; 123+ messages in thread From: Miquel Raynal @ 2021-12-15 15:46 UTC (permalink / raw) To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, devicetree, Miquel Raynal, Geert Uytterhoeven Add a Yaml description for this Renesas NAND controller bindings. Provide a family-specific "rzn1" compatible and a more specific "r9a06g032" one. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> --- .../mtd/renesas,rzn1-nand-controller.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml diff --git a/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml b/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml new file mode 100644 index 000000000000..03a4e99b4d89 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/renesas,rzn1-nand-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas RZ/N1x NAND flash controller device tree bindings + +maintainers: + - Miquel Raynal <miquel.raynal@bootlin.com> + +allOf: + - $ref: "nand-controller.yaml" + +properties: + compatible: + items: + - enum: + - renesas,r9a06g032-nand-controller + - const: renesas,rzn1-nand-controller + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: APB host controller clock + - description: External NAND bus clock + + clock-names: + items: + - const: hclk + - const: eclk + + "#address-cells": true + "#size-cells": true + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/r9a06g032-sysctrl.h> + + nand-controller@40102000 { + compatible = "renesas,r9a06g032-nand-controller", + "renesas,rzn1-nand-controller"; + reg = <0x40102000 0x2000>; + interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sysctrl R9A06G032_HCLK_NAND>, <&sysctrl R9A06G032_CLK_NAND>; + clock-names = "hclk", "eclk"; + #address-cells = <1>; + #size-cells = <0>; + }; -- 2.27.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v4 1/4] dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Miquel Raynal @ 2021-12-15 15:46 UTC (permalink / raw) To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, devicetree, Miquel Raynal, Geert Uytterhoeven Add a Yaml description for this Renesas NAND controller bindings. Provide a family-specific "rzn1" compatible and a more specific "r9a06g032" one. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> --- .../mtd/renesas,rzn1-nand-controller.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml diff --git a/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml b/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml new file mode 100644 index 000000000000..03a4e99b4d89 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mtd/renesas,rzn1-nand-controller.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas RZ/N1x NAND flash controller device tree bindings + +maintainers: + - Miquel Raynal <miquel.raynal@bootlin.com> + +allOf: + - $ref: "nand-controller.yaml" + +properties: + compatible: + items: + - enum: + - renesas,r9a06g032-nand-controller + - const: renesas,rzn1-nand-controller + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: APB host controller clock + - description: External NAND bus clock + + clock-names: + items: + - const: hclk + - const: eclk + + "#address-cells": true + "#size-cells": true + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/clock/r9a06g032-sysctrl.h> + + nand-controller@40102000 { + compatible = "renesas,r9a06g032-nand-controller", + "renesas,rzn1-nand-controller"; + reg = <0x40102000 0x2000>; + interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sysctrl R9A06G032_HCLK_NAND>, <&sysctrl R9A06G032_CLK_NAND>; + clock-names = "hclk", "eclk"; + #address-cells = <1>; + #size-cells = <0>; + }; -- 2.27.0 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller 2021-12-15 15:46 ` Miquel Raynal @ 2021-12-16 20:23 ` Rob Herring -1 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 20:23 UTC (permalink / raw) To: Miquel Raynal Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd, linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, devicetree, Geert Uytterhoeven On Wed, Dec 15, 2021 at 04:46:16PM +0100, Miquel Raynal wrote: > Add a Yaml description for this Renesas NAND controller bindings. > > Provide a family-specific "rzn1" compatible and a more specific > "r9a06g032" one. > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > .../mtd/renesas,rzn1-nand-controller.yaml | 64 +++++++++++++++++++ > 1 file changed, 64 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml > > diff --git a/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml b/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml > new file mode 100644 > index 000000000000..03a4e99b4d89 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml > @@ -0,0 +1,64 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mtd/renesas,rzn1-nand-controller.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Renesas RZ/N1x NAND flash controller device tree bindings > + > +maintainers: > + - Miquel Raynal <miquel.raynal@bootlin.com> > + > +allOf: > + - $ref: "nand-controller.yaml" > + > +properties: > + compatible: > + items: > + - enum: > + - renesas,r9a06g032-nand-controller > + - const: renesas,rzn1-nand-controller > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + items: > + - description: APB host controller clock > + - description: External NAND bus clock > + > + clock-names: > + items: > + - const: hclk > + - const: eclk > + > + "#address-cells": true > + "#size-cells": true You can drop these 2 as nand-controller.yaml should cover them. Reviewed-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller @ 2021-12-16 20:23 ` Rob Herring 0 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 20:23 UTC (permalink / raw) To: Miquel Raynal Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd, linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, devicetree, Geert Uytterhoeven On Wed, Dec 15, 2021 at 04:46:16PM +0100, Miquel Raynal wrote: > Add a Yaml description for this Renesas NAND controller bindings. > > Provide a family-specific "rzn1" compatible and a more specific > "r9a06g032" one. > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > --- > .../mtd/renesas,rzn1-nand-controller.yaml | 64 +++++++++++++++++++ > 1 file changed, 64 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml > > diff --git a/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml b/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml > new file mode 100644 > index 000000000000..03a4e99b4d89 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml > @@ -0,0 +1,64 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mtd/renesas,rzn1-nand-controller.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Renesas RZ/N1x NAND flash controller device tree bindings > + > +maintainers: > + - Miquel Raynal <miquel.raynal@bootlin.com> > + > +allOf: > + - $ref: "nand-controller.yaml" > + > +properties: > + compatible: > + items: > + - enum: > + - renesas,r9a06g032-nand-controller > + - const: renesas,rzn1-nand-controller > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + items: > + - description: APB host controller clock > + - description: External NAND bus clock > + > + clock-names: > + items: > + - const: hclk > + - const: eclk > + > + "#address-cells": true > + "#size-cells": true You can drop these 2 as nand-controller.yaml should cover them. Reviewed-by: Rob Herring <robh@kernel.org> ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 2/4] mtd: rawnand: rzn1: Add new NAND controller driver 2021-12-15 15:46 ` Miquel Raynal @ 2021-12-15 15:46 ` Miquel Raynal -1 siblings, 0 replies; 123+ messages in thread From: Miquel Raynal @ 2021-12-15 15:46 UTC (permalink / raw) To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, devicetree, Miquel Raynal, Ralph Siemsen Introduce Renesas RZ/N1x NAND controller driver which supports: - All ONFI timing modes - Different configurations of its internal ECC controller - On-die (not tested) and software ECC support - Several chips (not tested) - Subpage accesses - DMA and PIO This controller was originally provided by Evatronix before being bought by Cadence. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Ralph Siemsen <ralph.siemsen@linaro.org> --- drivers/mtd/nand/raw/Kconfig | 6 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/rzn1-nand-controller.c | 1422 +++++++++++++++++++ 3 files changed, 1429 insertions(+) create mode 100644 drivers/mtd/nand/raw/rzn1-nand-controller.c diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index 67b7cb67c030..e436b74f6f68 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -461,6 +461,12 @@ config MTD_NAND_PL35X Enables support for PrimeCell SMC PL351 and PL353 NAND controller found on Zynq7000. +config MTD_NAND_RZN1 + tristate "Renesas RZ/N1D, RZ/N1S, RZ/N1L NAND controller" + depends on ARCH_RENESAS || COMPILE_TEST + help + Enables support for Renesas RZ/N1x SoC family NAND controller. + comment "Misc" config MTD_SM_COMMON diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile index 2f97958c3a33..05e6dc80a45d 100644 --- a/drivers/mtd/nand/raw/Makefile +++ b/drivers/mtd/nand/raw/Makefile @@ -58,6 +58,7 @@ obj-$(CONFIG_MTD_NAND_ARASAN) += arasan-nand-controller.o obj-$(CONFIG_MTD_NAND_INTEL_LGM) += intel-nand-controller.o obj-$(CONFIG_MTD_NAND_ROCKCHIP) += rockchip-nand-controller.o obj-$(CONFIG_MTD_NAND_PL35X) += pl35x-nand-controller.o +obj-$(CONFIG_MTD_NAND_RZN1) += rzn1-nand-controller.o nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o nand-objs += nand_onfi.o diff --git a/drivers/mtd/nand/raw/rzn1-nand-controller.c b/drivers/mtd/nand/raw/rzn1-nand-controller.c new file mode 100644 index 000000000000..1d4f5ae057d9 --- /dev/null +++ b/drivers/mtd/nand/raw/rzn1-nand-controller.c @@ -0,0 +1,1422 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Evatronix/Renesas RZ/N1D, RZ/N1S, RZ/N1L NAND flash controller driver + * + * Copyright (C) 2021 Schneider Electric + * Author: Miquel RAYNAL <miquel.raynal@bootlin.com> + */ + +#include <linux/bitfield.h> +#include <linux/clk.h> +#include <linux/dma-mapping.h> +#include <linux/interrupt.h> +#include <linux/iopoll.h> +#include <linux/module.h> +#include <linux/mtd/mtd.h> +#include <linux/mtd/rawnand.h> +#include <linux/of.h> +#include <linux/platform_device.h> +#include <linux/slab.h> + +#define COMMAND_REG 0x00 +#define COMMAND_SEQ(x) FIELD_PREP(GENMASK(5, 0), (x)) +#define COMMAND_SEQ_10 COMMAND_SEQ(0x2A) +#define COMMAND_SEQ_12 COMMAND_SEQ(0x0C) +#define COMMAND_SEQ_18 COMMAND_SEQ(0x32) +#define COMMAND_SEQ_19 COMMAND_SEQ(0x13) +#define COMMAND_SEQ_GEN_IN COMMAND_SEQ_18 +#define COMMAND_SEQ_GEN_OUT COMMAND_SEQ_19 +#define COMMAND_SEQ_READ_PAGE COMMAND_SEQ_10 +#define COMMAND_SEQ_WRITE_PAGE COMMAND_SEQ_12 +#define COMMAND_INPUT_SEL_AHBS 0 +#define COMMAND_INPUT_SEL_DMA BIT(6) +#define COMMAND_FIFO_SEL 0 +#define COMMAND_DATA_SEL BIT(7) +#define COMMAND_0(x) FIELD_PREP(GENMASK(15, 8), (x)) +#define COMMAND_1(x) FIELD_PREP(GENMASK(23, 16), (x)) +#define COMMAND_2(x) FIELD_PREP(GENMASK(31, 24), (x)) + +#define CONTROL_REG 0x04 +#define CONTROL_CHECK_RB_LINE 0 +#define CONTROL_ECC_BLOCK_SIZE(x) FIELD_PREP(GENMASK(2, 1), (x)) +#define CONTROL_ECC_BLOCK_SIZE_256 CONTROL_ECC_BLOCK_SIZE(0) +#define CONTROL_ECC_BLOCK_SIZE_512 CONTROL_ECC_BLOCK_SIZE(1) +#define CONTROL_ECC_BLOCK_SIZE_1024 CONTROL_ECC_BLOCK_SIZE(2) +#define CONTROL_INT_EN BIT(4) +#define CONTROL_ECC_EN BIT(5) +#define CONTROL_BLOCK_SIZE(x) FIELD_PREP(GENMASK(7, 6), (x)) +#define CONTROL_BLOCK_SIZE_32P CONTROL_BLOCK_SIZE(0) +#define CONTROL_BLOCK_SIZE_64P CONTROL_BLOCK_SIZE(1) +#define CONTROL_BLOCK_SIZE_128P CONTROL_BLOCK_SIZE(2) +#define CONTROL_BLOCK_SIZE_256P CONTROL_BLOCK_SIZE(3) + +#define STATUS_REG 0x8 +#define MEM_RDY(cs, reg) (FIELD_GET(GENMASK(3, 0), (reg)) & BIT(cs)) +#define CTRL_RDY(reg) (FIELD_GET(BIT(8), (reg)) == 0) + +#define ECC_CTRL_REG 0x18 +#define ECC_CTRL_CAP(x) FIELD_PREP(GENMASK(2, 0), (x)) +#define ECC_CTRL_CAP_2B ECC_CTRL_CAP(0) +#define ECC_CTRL_CAP_4B ECC_CTRL_CAP(1) +#define ECC_CTRL_CAP_8B ECC_CTRL_CAP(2) +#define ECC_CTRL_CAP_16B ECC_CTRL_CAP(3) +#define ECC_CTRL_CAP_24B ECC_CTRL_CAP(4) +#define ECC_CTRL_CAP_32B ECC_CTRL_CAP(5) +#define ECC_CTRL_ERR_THRESHOLD(x) FIELD_PREP(GENMASK(13, 8), (x)) + +#define INT_MASK_REG 0x10 +#define INT_STATUS_REG 0x14 +#define INT_CMD_END BIT(1) +#define INT_DMA_END BIT(3) +#define INT_MEM_RDY(cs) FIELD_PREP(GENMASK(11, 8), BIT(cs)) +#define INT_DMA_ENDED BIT(3) +#define MEM_IS_RDY(cs, reg) (FIELD_GET(GENMASK(11, 8), (reg)) & BIT(cs)) +#define DMA_HAS_ENDED(reg) FIELD_GET(BIT(3), (reg)) + +#define ECC_OFFSET_REG 0x1C +#define ECC_OFFSET(x) FIELD_PREP(GENMASK(15, 0), (x)) + +#define ECC_STAT_REG 0x20 +#define ECC_STAT_CORRECTABLE(cs, reg) (FIELD_GET(GENMASK(3, 0), (reg)) & BIT(cs)) +#define ECC_STAT_UNCORRECTABLE(cs, reg) (FIELD_GET(GENMASK(11, 8), (reg)) & BIT(cs)) + +#define ADDR0_COL_REG 0x24 +#define ADDR0_COL(x) FIELD_PREP(GENMASK(15, 0), (x)) + +#define ADDR0_ROW_REG 0x28 +#define ADDR0_ROW(x) FIELD_PREP(GENMASK(23, 0), (x)) + +#define ADDR1_COL_REG 0x2C +#define ADDR1_COL(x) FIELD_PREP(GENMASK(15, 0), (x)) + +#define ADDR1_ROW_REG 0x30 +#define ADDR1_ROW(x) FIELD_PREP(GENMASK(23, 0), (x)) + +#define FIFO_DATA_REG 0x38 + +#define DATA_REG 0x3C + +#define DATA_REG_SIZE_REG 0x40 + +#define DMA_ADDR_LOW_REG 0x64 + +#define DMA_ADDR_HIGH_REG 0x68 + +#define DMA_CNT_REG 0x6C + +#define DMA_CTRL_REG 0x70 +#define DMA_CTRL_INCREMENT_BURST_4 0 +#define DMA_CTRL_REGISTER_MANAGED_MODE 0 +#define DMA_CTRL_START BIT(7) + +#define MEM_CTRL_REG 0x80 +#define MEM_CTRL_CS(cs) FIELD_PREP(GENMASK(1, 0), (cs)) +#define MEM_CTRL_DIS_WP(cs) FIELD_PREP(GENMASK(11, 8), BIT((cs))) + +#define DATA_SIZE_REG 0x84 +#define DATA_SIZE(x) FIELD_PREP(GENMASK(14, 0), (x)) + +#define TIMINGS_ASYN_REG 0x88 +#define TIMINGS_ASYN_TRWP(x) FIELD_PREP(GENMASK(3, 0), max((x), 1U) - 1) +#define TIMINGS_ASYN_TRWH(x) FIELD_PREP(GENMASK(7, 4), max((x), 1U) - 1) + +#define TIM_SEQ0_REG 0x90 +#define TIM_SEQ0_TCCS(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) +#define TIM_SEQ0_TADL(x) FIELD_PREP(GENMASK(13, 8), max((x), 1U) - 1) +#define TIM_SEQ0_TRHW(x) FIELD_PREP(GENMASK(21, 16), max((x), 1U) - 1) +#define TIM_SEQ0_TWHR(x) FIELD_PREP(GENMASK(29, 24), max((x), 1U) - 1) + +#define TIM_SEQ1_REG 0x94 +#define TIM_SEQ1_TWB(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) +#define TIM_SEQ1_TRR(x) FIELD_PREP(GENMASK(13, 8), max((x), 1U) - 1) +#define TIM_SEQ1_TWW(x) FIELD_PREP(GENMASK(21, 16), max((x), 1U) - 1) + +#define TIM_GEN_SEQ0_REG 0x98 +#define TIM_GEN_SEQ0_D0(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) +#define TIM_GEN_SEQ0_D1(x) FIELD_PREP(GENMASK(13, 8), max((x), 1U) - 1) +#define TIM_GEN_SEQ0_D2(x) FIELD_PREP(GENMASK(21, 16), max((x), 1U) - 1) +#define TIM_GEN_SEQ0_D3(x) FIELD_PREP(GENMASK(29, 24), max((x), 1U) - 1) + +#define TIM_GEN_SEQ1_REG 0x9c +#define TIM_GEN_SEQ1_D4(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) +#define TIM_GEN_SEQ1_D5(x) FIELD_PREP(GENMASK(13, 8), max((x), 1U) - 1) +#define TIM_GEN_SEQ1_D6(x) FIELD_PREP(GENMASK(21, 16), max((x), 1U) - 1) +#define TIM_GEN_SEQ1_D7(x) FIELD_PREP(GENMASK(29, 24), max((x), 1U) - 1) + +#define TIM_GEN_SEQ2_REG 0xA0 +#define TIM_GEN_SEQ2_D8(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) +#define TIM_GEN_SEQ2_D9(x) FIELD_PREP(GENMASK(13, 8), max((x), 1U) - 1) +#define TIM_GEN_SEQ2_D10(x) FIELD_PREP(GENMASK(21, 16), max((x), 1U) - 1) +#define TIM_GEN_SEQ2_D11(x) FIELD_PREP(GENMASK(29, 24), max((x), 1U) - 1) + +#define FIFO_INIT_REG 0xB4 +#define FIFO_INIT BIT(0) + +#define FIFO_STATE_REG 0xB4 +#define FIFO_STATE_R_EMPTY(reg) FIELD_GET(BIT(0), (reg)) +#define FIFO_STATE_W_FULL(reg) FIELD_GET(BIT(1), (reg)) +#define FIFO_STATE_C_EMPTY(reg) FIELD_GET(BIT(2), (reg)) +#define FIFO_STATE_R_FULL(reg) FIELD_GET(BIT(6), (reg)) +#define FIFO_STATE_W_EMPTY(reg) FIELD_GET(BIT(7), (reg)) + +#define GEN_SEQ_CTRL_REG 0xB8 +#define GEN_SEQ_CMD0_EN BIT(0) +#define GEN_SEQ_CMD1_EN BIT(1) +#define GEN_SEQ_CMD2_EN BIT(2) +#define GEN_SEQ_CMD3_EN BIT(3) +#define GEN_SEQ_COL_A0(x) FIELD_PREP(GENMASK(5, 4), min((x), 2U)) +#define GEN_SEQ_COL_A1(x) FIELD_PREP(GENMASK(7, 6), min((x), 2U)) +#define GEN_SEQ_ROW_A0(x) FIELD_PREP(GENMASK(9, 8), min((x), 3U)) +#define GEN_SEQ_ROW_A1(x) FIELD_PREP(GENMASK(11, 10), min((x), 3U)) +#define GEN_SEQ_DATA_EN BIT(12) +#define GEN_SEQ_DELAY_EN(x) FIELD_PREP(GENMASK(14, 13), (x)) +#define GEN_SEQ_DELAY0_EN GEN_SEQ_DELAY_EN(1) +#define GEN_SEQ_DELAY1_EN GEN_SEQ_DELAY_EN(2) +#define GEN_SEQ_IMD_SEQ BIT(15) +#define GEN_SEQ_COMMAND_3(x) FIELD_PREP(GENMASK(26, 16), (x)) + +#define DMA_TLVL_REG 0x114 +#define DMA_TLVL(x) FIELD_PREP(GENMASK(7, 0), (x)) +#define DMA_TLVL_MAX DMA_TLVL(0xFF) + +#define TIM_GEN_SEQ3_REG 0x134 +#define TIM_GEN_SEQ3_D12(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) + +#define ECC_CNT_REG 0x14C +#define ECC_CNT(cs, reg) FIELD_GET(GENMASK(5, 0), (reg) >> ((cs) * 8)) + +#define RZN1_CS_NUM 4 + +#define TO_CYCLES64(ps, period_ns) ((unsigned int)DIV_ROUND_UP_ULL(div_u64(ps, 1000), \ + period_ns)) + +struct rzn1_nand_chip_sel { + unsigned int cs; +}; + +struct rzn1_nand_chip { + struct nand_chip chip; + struct list_head node; + int selected_die; + u32 ctrl; + unsigned int nsels; + u32 control; + u32 ecc_ctrl; + u32 timings_asyn; + u32 tim_seq0; + u32 tim_seq1; + u32 tim_gen_seq0; + u32 tim_gen_seq1; + u32 tim_gen_seq2; + u32 tim_gen_seq3; + struct rzn1_nand_chip_sel sels[]; +}; + +struct rzn1_nandc { + struct nand_controller controller; + struct device *dev; + void __iomem *regs; + struct clk *hclk; + struct clk *eclk; + unsigned long assigned_cs; + struct list_head chips; + struct nand_chip *selected_chip; + struct completion complete; + bool use_polling; + u8 *buf; + unsigned int buf_sz; +}; + +struct rzn1_op { + u32 command; + u32 addr0_col; + u32 addr0_row; + u32 addr1_col; + u32 addr1_row; + u32 data_size; + u32 ecc_offset; + u32 gen_seq_ctrl; + u8 *buf; + bool read; + unsigned int len; +}; + +static inline struct rzn1_nandc *to_rzn1_nandc(struct nand_controller *ctrl) +{ + return container_of(ctrl, struct rzn1_nandc, controller); +} + +static inline struct rzn1_nand_chip *to_rzn1_nand(struct nand_chip *chip) +{ + return container_of(chip, struct rzn1_nand_chip, chip); +} + +static inline unsigned int to_nandc_cs(struct rzn1_nand_chip *nand) +{ + return nand->sels[nand->selected_die].cs; +} + +static void rzn1_nandc_dis_correction(struct rzn1_nandc *nandc) +{ + u32 control; + + control = readl_relaxed(nandc->regs + CONTROL_REG); + control &= ~CONTROL_ECC_EN; + writel_relaxed(control, nandc->regs + CONTROL_REG); +} + +static void rzn1_nandc_en_correction(struct rzn1_nandc *nandc) +{ + u32 control; + + control = readl_relaxed(nandc->regs + CONTROL_REG); + control |= CONTROL_ECC_EN; + writel_relaxed(control, nandc->regs + CONTROL_REG); +} + +static void rzn1_nandc_clear_status(struct rzn1_nandc *nandc) +{ + writel_relaxed(0, nandc->regs + INT_STATUS_REG); + writel_relaxed(0, nandc->regs + ECC_STAT_REG); + writel_relaxed(0, nandc->regs + ECC_CNT_REG); +} + +static void rzn1_nandc_dis_interrupts(struct rzn1_nandc *nandc) +{ + writel_relaxed(0, nandc->regs + INT_MASK_REG); +} + +static void rzn1_nandc_en_interrupts(struct rzn1_nandc *nandc, u32 val) +{ + if (!nandc->use_polling) + writel_relaxed(val, nandc->regs + INT_MASK_REG); +} + +static void rzn1_nandc_clear_fifo(struct rzn1_nandc *nandc) +{ + writel_relaxed(FIFO_INIT, nandc->regs + FIFO_INIT_REG); +} + +static void rzn1_nandc_select_target(struct nand_chip *chip, int die_nr) +{ + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + unsigned int cs = rzn1_nand->sels[die_nr].cs; + + if (chip == nandc->selected_chip && die_nr == rzn1_nand->selected_die) + return; + + rzn1_nandc_clear_status(nandc); + writel_relaxed(MEM_CTRL_CS(cs) | MEM_CTRL_DIS_WP(cs), nandc->regs + MEM_CTRL_REG); + writel_relaxed(rzn1_nand->control, nandc->regs + CONTROL_REG); + writel_relaxed(rzn1_nand->ecc_ctrl, nandc->regs + ECC_CTRL_REG); + writel_relaxed(rzn1_nand->timings_asyn, nandc->regs + TIMINGS_ASYN_REG); + writel_relaxed(rzn1_nand->tim_seq0, nandc->regs + TIM_SEQ0_REG); + writel_relaxed(rzn1_nand->tim_seq1, nandc->regs + TIM_SEQ1_REG); + writel_relaxed(rzn1_nand->tim_gen_seq0, nandc->regs + TIM_GEN_SEQ0_REG); + writel_relaxed(rzn1_nand->tim_gen_seq1, nandc->regs + TIM_GEN_SEQ1_REG); + writel_relaxed(rzn1_nand->tim_gen_seq2, nandc->regs + TIM_GEN_SEQ2_REG); + writel_relaxed(rzn1_nand->tim_gen_seq3, nandc->regs + TIM_GEN_SEQ3_REG); + + nandc->selected_chip = chip; + rzn1_nand->selected_die = die_nr; +} + +static void rzn1_nandc_trigger_op(struct rzn1_nandc *nandc, struct rzn1_op *rop) +{ + writel_relaxed(rop->addr0_col, nandc->regs + ADDR0_COL_REG); + writel_relaxed(rop->addr0_row, nandc->regs + ADDR0_ROW_REG); + writel_relaxed(rop->addr1_col, nandc->regs + ADDR1_COL_REG); + writel_relaxed(rop->addr1_row, nandc->regs + ADDR1_ROW_REG); + writel_relaxed(rop->ecc_offset, nandc->regs + ECC_OFFSET_REG); + writel_relaxed(rop->gen_seq_ctrl, nandc->regs + GEN_SEQ_CTRL_REG); + writel_relaxed(DATA_SIZE(rop->len), nandc->regs + DATA_SIZE_REG); + writel_relaxed(rop->command, nandc->regs + COMMAND_REG); +} + +static void rzn1_nandc_trigger_dma(struct rzn1_nandc *nandc) +{ + writel_relaxed(DMA_CTRL_INCREMENT_BURST_4 | + DMA_CTRL_REGISTER_MANAGED_MODE | + DMA_CTRL_START, nandc->regs + DMA_CTRL_REG); +} + +static irqreturn_t rzn1_nandc_irq_handler(int irq, void *private) +{ + struct rzn1_nandc *nandc = private; + + rzn1_nandc_dis_interrupts(nandc); + complete(&nandc->complete); + + return IRQ_HANDLED; +} + +static int rzn1_nandc_wait_end_of_op(struct rzn1_nandc *nandc, + struct nand_chip *chip) +{ + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + unsigned int cs = to_nandc_cs(rzn1_nand); + u32 status; + int ret; + + ret = readl_poll_timeout(nandc->regs + STATUS_REG, status, + MEM_RDY(cs, status) && CTRL_RDY(status), + 1, 100000); + if (ret) + dev_err(nandc->dev, "Operation timed out, status: 0x%08x\n", + status); + + return ret; +} + +static int rzn1_nandc_wait_end_of_io(struct rzn1_nandc *nandc, + struct nand_chip *chip) +{ + int timeout_ms = 1000; + int ret; + + if (nandc->use_polling) { + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + unsigned int cs = to_nandc_cs(rzn1_nand); + u32 status; + + ret = readl_poll_timeout(nandc->regs + INT_STATUS_REG, status, + MEM_IS_RDY(cs, status) & + DMA_HAS_ENDED(status), + 0, timeout_ms * 1000); + } else { + ret = wait_for_completion_timeout(&nandc->complete, + msecs_to_jiffies(timeout_ms)); + if (!ret) + ret = -ETIMEDOUT; + else + ret = 0; + } + + return ret; +} + +static int rzn1_read_page_hw_ecc(struct nand_chip *chip, u8 *buf, + int oob_required, int page) +{ + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + struct mtd_info *mtd = nand_to_mtd(chip); + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + unsigned int cs = to_nandc_cs(rzn1_nand); + struct rzn1_op rop = { + .command = COMMAND_INPUT_SEL_DMA | COMMAND_0(NAND_CMD_READ0) | + COMMAND_2(NAND_CMD_READSTART) | COMMAND_FIFO_SEL | + COMMAND_SEQ_READ_PAGE, + .addr0_row = page, + .len = mtd->writesize, + .ecc_offset = ECC_OFFSET(mtd->writesize + 2), + }; + unsigned int max_bitflips = 0; + dma_addr_t dma_addr; + u32 ecc_stat; + int bf, ret, i; + + /* Prepare controller */ + rzn1_nandc_select_target(chip, chip->cur_cs); + rzn1_nandc_clear_status(nandc); + reinit_completion(&nandc->complete); + rzn1_nandc_en_interrupts(nandc, INT_DMA_ENDED); + rzn1_nandc_en_correction(nandc); + + /* Configure DMA */ + dma_addr = dma_map_single(nandc->dev, nandc->buf, mtd->writesize, + DMA_FROM_DEVICE); + writel(dma_addr, nandc->regs + DMA_ADDR_LOW_REG); + writel(mtd->writesize, nandc->regs + DMA_CNT_REG); + writel(DMA_TLVL_MAX, nandc->regs + DMA_TLVL_REG); + + rzn1_nandc_trigger_op(nandc, &rop); + rzn1_nandc_trigger_dma(nandc); + + ret = rzn1_nandc_wait_end_of_io(nandc, chip); + dma_unmap_single(nandc->dev, dma_addr, mtd->writesize, DMA_FROM_DEVICE); + rzn1_nandc_dis_correction(nandc); + if (ret) { + dev_err(nandc->dev, "Read page operation never ending\n"); + return ret; + } + + ecc_stat = readl_relaxed(nandc->regs + ECC_STAT_REG); + + if (oob_required || ECC_STAT_UNCORRECTABLE(cs, ecc_stat)) { + ret = nand_change_read_column_op(chip, mtd->writesize, + chip->oob_poi, mtd->oobsize, + false); + if (ret) + return ret; + } + + if (ECC_STAT_UNCORRECTABLE(cs, ecc_stat)) { + for (i = 0; i < chip->ecc.steps; i++) { + unsigned int off = i * chip->ecc.size; + unsigned int eccoff = i * chip->ecc.bytes; + + bf = nand_check_erased_ecc_chunk(nandc->buf + off, + chip->ecc.size, + chip->oob_poi + 2 + eccoff, + chip->ecc.bytes, + NULL, 0, + chip->ecc.strength); + if (bf < 0) { + mtd->ecc_stats.failed++; + } else { + mtd->ecc_stats.corrected += bf; + max_bitflips = max_t(unsigned int, max_bitflips, bf); + } + } + } else if (ECC_STAT_CORRECTABLE(cs, ecc_stat)) { + bf = ECC_CNT(cs, readl_relaxed(nandc->regs + ECC_CNT_REG)); + /* + * The number of bitflips is an approximation given the fact + * that this controller does not provide per-chunk details but + * only gives statistics on the entire page. + */ + mtd->ecc_stats.corrected += bf; + } + + memcpy(buf, nandc->buf, mtd->writesize); + + return 0; +} + +static int rzn1_read_subpage_hw_ecc(struct nand_chip *chip, u32 req_offset, + u32 req_len, u8 *bufpoi, int page) +{ + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + struct mtd_info *mtd = nand_to_mtd(chip); + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + unsigned int cs = to_nandc_cs(rzn1_nand); + unsigned int page_off = round_down(req_offset, chip->ecc.size); + unsigned int real_len = round_up(req_offset + req_len - page_off, + chip->ecc.size); + unsigned int start_chunk = page_off / chip->ecc.size; + unsigned int nchunks = real_len / chip->ecc.size; + unsigned int ecc_off = 2 + (start_chunk * chip->ecc.bytes); + struct rzn1_op rop = { + .command = COMMAND_INPUT_SEL_AHBS | COMMAND_0(NAND_CMD_READ0) | + COMMAND_2(NAND_CMD_READSTART) | COMMAND_FIFO_SEL | + COMMAND_SEQ_READ_PAGE, + .addr0_row = page, + .addr0_col = page_off, + .len = real_len, + .ecc_offset = ECC_OFFSET(mtd->writesize + ecc_off), + }; + unsigned int max_bitflips = 0, i; + u32 ecc_stat; + int bf, ret; + + /* Prepare controller */ + rzn1_nandc_select_target(chip, chip->cur_cs); + rzn1_nandc_clear_status(nandc); + rzn1_nandc_en_correction(nandc); + rzn1_nandc_trigger_op(nandc, &rop); + + while (!FIFO_STATE_C_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + while (FIFO_STATE_R_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + ioread32_rep(nandc->regs + FIFO_DATA_REG, bufpoi + page_off, + real_len / 4); + + if (!FIFO_STATE_R_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) { + dev_err(nandc->dev, "Clearing residual data in the read FIFO\n"); + rzn1_nandc_clear_fifo(nandc); + } + + ret = rzn1_nandc_wait_end_of_op(nandc, chip); + rzn1_nandc_dis_correction(nandc); + if (ret) { + dev_err(nandc->dev, "Read subpage operation never ending\n"); + return ret; + } + + ecc_stat = readl_relaxed(nandc->regs + ECC_STAT_REG); + + if (ECC_STAT_UNCORRECTABLE(cs, ecc_stat)) { + ret = nand_change_read_column_op(chip, mtd->writesize, + chip->oob_poi, mtd->oobsize, + false); + if (ret) + return ret; + + for (i = start_chunk; i < nchunks; i++) { + unsigned int dataoff = i * chip->ecc.size; + unsigned int eccoff = 2 + (i * chip->ecc.bytes); + + bf = nand_check_erased_ecc_chunk(bufpoi + dataoff, + chip->ecc.size, + chip->oob_poi + eccoff, + chip->ecc.bytes, + NULL, 0, + chip->ecc.strength); + if (bf < 0) { + mtd->ecc_stats.failed++; + } else { + mtd->ecc_stats.corrected += bf; + max_bitflips = max_t(unsigned int, max_bitflips, bf); + } + } + } else if (ECC_STAT_CORRECTABLE(cs, ecc_stat)) { + bf = ECC_CNT(cs, readl_relaxed(nandc->regs + ECC_CNT_REG)); + /* + * The number of bitflips is an approximation given the fact + * that this controller does not provide per-chunk details but + * only gives statistics on the entire page. + */ + mtd->ecc_stats.corrected += bf; + } + + return 0; +} + +static int rzn1_write_page_hw_ecc(struct nand_chip *chip, const u8 *buf, + int oob_required, int page) +{ + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + struct mtd_info *mtd = nand_to_mtd(chip); + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + unsigned int cs = to_nandc_cs(rzn1_nand); + struct rzn1_op rop = { + .command = COMMAND_INPUT_SEL_DMA | COMMAND_0(NAND_CMD_SEQIN) | + COMMAND_1(NAND_CMD_PAGEPROG) | COMMAND_FIFO_SEL | + COMMAND_SEQ_WRITE_PAGE, + .addr0_row = page, + .len = mtd->writesize, + .ecc_offset = ECC_OFFSET(mtd->writesize + 2), + }; + dma_addr_t dma_addr; + int ret; + + memcpy(nandc->buf, buf, mtd->writesize); + + /* Prepare controller */ + rzn1_nandc_select_target(chip, chip->cur_cs); + rzn1_nandc_clear_status(nandc); + reinit_completion(&nandc->complete); + rzn1_nandc_en_interrupts(nandc, INT_MEM_RDY(cs)); + rzn1_nandc_en_correction(nandc); + + /* Configure DMA */ + dma_addr = dma_map_single(nandc->dev, (void *)nandc->buf, mtd->writesize, + DMA_TO_DEVICE); + writel(dma_addr, nandc->regs + DMA_ADDR_LOW_REG); + writel(mtd->writesize, nandc->regs + DMA_CNT_REG); + writel(DMA_TLVL_MAX, nandc->regs + DMA_TLVL_REG); + + rzn1_nandc_trigger_op(nandc, &rop); + rzn1_nandc_trigger_dma(nandc); + + ret = rzn1_nandc_wait_end_of_io(nandc, chip); + dma_unmap_single(nandc->dev, dma_addr, mtd->writesize, DMA_TO_DEVICE); + rzn1_nandc_dis_correction(nandc); + if (ret) { + dev_err(nandc->dev, "Write page operation never ending\n"); + return ret; + } + + if (!oob_required) + return 0; + + return nand_change_write_column_op(chip, mtd->writesize, chip->oob_poi, + mtd->oobsize, false); +} + +static int rzn1_write_subpage_hw_ecc(struct nand_chip *chip, u32 req_offset, + u32 req_len, const u8 *bufpoi, + int oob_required, int page) +{ + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + struct mtd_info *mtd = nand_to_mtd(chip); + unsigned int page_off = round_down(req_offset, chip->ecc.size); + unsigned int real_len = round_up(req_offset + req_len - page_off, + chip->ecc.size); + unsigned int start_chunk = page_off / chip->ecc.size; + unsigned int ecc_off = 2 + (start_chunk * chip->ecc.bytes); + struct rzn1_op rop = { + .command = COMMAND_INPUT_SEL_AHBS | COMMAND_0(NAND_CMD_SEQIN) | + COMMAND_1(NAND_CMD_PAGEPROG) | COMMAND_FIFO_SEL | + COMMAND_SEQ_WRITE_PAGE, + .addr0_row = page, + .addr0_col = page_off, + .len = real_len, + .ecc_offset = ECC_OFFSET(mtd->writesize + ecc_off), + }; + int ret; + + /* Prepare controller */ + rzn1_nandc_select_target(chip, chip->cur_cs); + rzn1_nandc_clear_status(nandc); + rzn1_nandc_en_correction(nandc); + rzn1_nandc_trigger_op(nandc, &rop); + + while (FIFO_STATE_W_FULL(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + iowrite32_rep(nandc->regs + FIFO_DATA_REG, bufpoi + page_off, + real_len / 4); + + while (!FIFO_STATE_W_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + ret = rzn1_nandc_wait_end_of_op(nandc, chip); + rzn1_nandc_dis_correction(nandc); + if (ret) { + dev_err(nandc->dev, "Write subpage operation never ending\n"); + return ret; + } + + return 0; +} + +/* + * This controller is simple enough and thus does not need to use the parser + * provided by the core, instead, handle every situation here. + */ +static int rzn1_nandc_exec_op(struct nand_chip *chip, + const struct nand_operation *op, bool check_only) +{ + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + const struct nand_op_instr *instr = NULL; + struct rzn1_op rop = { + .command = COMMAND_INPUT_SEL_AHBS, + .gen_seq_ctrl = GEN_SEQ_IMD_SEQ, + }; + unsigned int cmd_phase = 0, addr_phase = 0, data_phase = 0, + delay_phase = 0, delays = 0; + unsigned int op_id, col_addrs, row_addrs, naddrs, remainder, words, i; + const u8 *addrs; + u32 last_bytes; + int ret; + + if (!check_only) + rzn1_nandc_select_target(chip, op->cs); + + for (op_id = 0; op_id < op->ninstrs; op_id++) { + instr = &op->instrs[op_id]; + + nand_op_trace(" ", instr); + + switch (instr->type) { + case NAND_OP_CMD_INSTR: + switch (cmd_phase++) { + case 0: + rop.command |= COMMAND_0(instr->ctx.cmd.opcode); + rop.gen_seq_ctrl |= GEN_SEQ_CMD0_EN; + break; + case 1: + rop.gen_seq_ctrl |= GEN_SEQ_COMMAND_3(instr->ctx.cmd.opcode); + rop.gen_seq_ctrl |= GEN_SEQ_CMD3_EN; + if (addr_phase == 0) + addr_phase = 1; + break; + case 2: + rop.command |= COMMAND_2(instr->ctx.cmd.opcode); + rop.gen_seq_ctrl |= GEN_SEQ_CMD2_EN; + if (addr_phase <= 1) + addr_phase = 2; + break; + case 3: + rop.command |= COMMAND_1(instr->ctx.cmd.opcode); + rop.gen_seq_ctrl |= GEN_SEQ_CMD1_EN; + if (addr_phase <= 1) + addr_phase = 2; + if (delay_phase == 0) + delay_phase = 1; + if (data_phase == 0) + data_phase = 1; + break; + default: + return -EOPNOTSUPP; + } + break; + + case NAND_OP_ADDR_INSTR: + addrs = instr->ctx.addr.addrs; + naddrs = instr->ctx.addr.naddrs; + if (naddrs > 5) + return -EOPNOTSUPP; + + col_addrs = min(2U, naddrs); + row_addrs = naddrs > 2 ? naddrs - col_addrs : 0; + + switch (addr_phase++) { + case 0: + for (i = 0; i < col_addrs; i++) + rop.addr0_col |= addrs[i] << (i * 8); + rop.gen_seq_ctrl |= GEN_SEQ_COL_A0(col_addrs); + + for (i = 0; i < row_addrs; i++) + rop.addr0_row |= addrs[2 + i] << (i * 8); + rop.gen_seq_ctrl |= GEN_SEQ_ROW_A0(row_addrs); + + if (cmd_phase == 0) + cmd_phase = 1; + break; + case 1: + for (i = 0; i < col_addrs; i++) + rop.addr1_col |= addrs[i] << (i * 8); + rop.gen_seq_ctrl |= GEN_SEQ_COL_A1(col_addrs); + + for (i = 0; i < row_addrs; i++) + rop.addr1_row |= addrs[2 + i] << (i * 8); + rop.gen_seq_ctrl |= GEN_SEQ_ROW_A1(row_addrs); + + if (cmd_phase <= 1) + cmd_phase = 2; + break; + default: + return -EOPNOTSUPP; + } + break; + + case NAND_OP_DATA_IN_INSTR: + rop.read = true; + fallthrough; + case NAND_OP_DATA_OUT_INSTR: + rop.gen_seq_ctrl |= GEN_SEQ_DATA_EN; + rop.buf = instr->ctx.data.buf.in; + rop.len = instr->ctx.data.len; + rop.command |= COMMAND_FIFO_SEL; + + switch (data_phase++) { + case 0: + if (cmd_phase <= 2) + cmd_phase = 3; + if (addr_phase <= 1) + addr_phase = 2; + if (delay_phase == 0) + delay_phase = 1; + break; + default: + return -EOPNOTSUPP; + } + break; + + case NAND_OP_WAITRDY_INSTR: + switch (delay_phase++) { + case 0: + rop.gen_seq_ctrl |= GEN_SEQ_DELAY0_EN; + + if (cmd_phase <= 2) + cmd_phase = 3; + break; + case 1: + rop.gen_seq_ctrl |= GEN_SEQ_DELAY1_EN; + + if (cmd_phase <= 3) + cmd_phase = 4; + if (data_phase == 0) + data_phase = 1; + break; + default: + return -EOPNOTSUPP; + } + break; + } + } + + /* + * Sequence 19 is generic and dedicated to write operations. + * Sequence 18 is also generic and works for all other operations. + */ + if (rop.buf && !rop.read) + rop.command |= COMMAND_SEQ_GEN_OUT; + else + rop.command |= COMMAND_SEQ_GEN_IN; + + if (delays > 1) { + dev_err(nandc->dev, "Cannot handle more than one wait delay\n"); + return -EOPNOTSUPP; + } + + if (check_only) + return 0; + + rzn1_nandc_trigger_op(nandc, &rop); + + words = rop.len / sizeof(u32); + remainder = rop.len % sizeof(u32); + if (rop.buf && rop.read) { + while (!FIFO_STATE_C_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + while (FIFO_STATE_R_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + ioread32_rep(nandc->regs + FIFO_DATA_REG, rop.buf, words); + if (remainder) { + last_bytes = readl_relaxed(nandc->regs + FIFO_DATA_REG); + memcpy(rop.buf + (words * sizeof(u32)), &last_bytes, + remainder); + } + + if (!FIFO_STATE_R_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) { + dev_warn(nandc->dev, + "Clearing residual data in the read FIFO\n"); + rzn1_nandc_clear_fifo(nandc); + } + } else if (rop.len && !rop.read) { + while (FIFO_STATE_W_FULL(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + iowrite32_rep(nandc->regs + FIFO_DATA_REG, rop.buf, + DIV_ROUND_UP(rop.len, 4)); + + if (remainder) { + last_bytes = 0; + memcpy(&last_bytes, rop.buf + (words * sizeof(u32)), remainder); + writel_relaxed(last_bytes, nandc->regs + FIFO_DATA_REG); + } + + while (!FIFO_STATE_W_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + } + + ret = rzn1_nandc_wait_end_of_op(nandc, chip); + if (ret) + return ret; + + return 0; +} + +static int rzn1_nandc_setup_interface(struct nand_chip *chip, int chipnr, + const struct nand_interface_config *conf) +{ + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + unsigned int period_ns = 1000000000 / clk_get_rate(nandc->eclk); + const struct nand_sdr_timings *sdr; + unsigned int cyc, cle, ale, bef_dly, ca_to_data; + + sdr = nand_get_sdr_timings(conf); + if (IS_ERR(sdr)) + return PTR_ERR(sdr); + + if (sdr->tRP_min != sdr->tWP_min || sdr->tREH_min != sdr->tWH_min) { + dev_err(nandc->dev, "Read and write hold times must be identical\n"); + return -EINVAL; + } + + if (chipnr < 0) + return 0; + + rzn1_nand->timings_asyn = + TIMINGS_ASYN_TRWP(TO_CYCLES64(sdr->tRP_min, period_ns)) | + TIMINGS_ASYN_TRWH(TO_CYCLES64(sdr->tREH_min, period_ns)); + rzn1_nand->tim_seq0 = + TIM_SEQ0_TCCS(TO_CYCLES64(sdr->tCCS_min, period_ns)) | + TIM_SEQ0_TADL(TO_CYCLES64(sdr->tADL_min, period_ns)) | + TIM_SEQ0_TRHW(TO_CYCLES64(sdr->tRHW_min, period_ns)) | + TIM_SEQ0_TWHR(TO_CYCLES64(sdr->tWHR_min, period_ns)); + rzn1_nand->tim_seq1 = + TIM_SEQ1_TWB(TO_CYCLES64(sdr->tWB_max, period_ns)) | + TIM_SEQ1_TRR(TO_CYCLES64(sdr->tRR_min, period_ns)) | + TIM_SEQ1_TWW(TO_CYCLES64(sdr->tWW_min, period_ns)); + + cyc = sdr->tDS_min + sdr->tDH_min; + cle = sdr->tCLH_min + sdr->tCLS_min; + ale = sdr->tALH_min + sdr->tALS_min; + bef_dly = sdr->tWB_max - sdr->tDH_min; + ca_to_data = sdr->tWHR_min + sdr->tREA_max - sdr->tDH_min; + + /* + * D0 = CMD -> ADDR = tCLH + tCLS - 1 cycle + * D1 = CMD -> CMD = tCLH + tCLS - 1 cycle + * D2 = CMD -> DLY = tWB - tDH + * D3 = CMD -> DATA = tWHR + tREA - tDH + */ + rzn1_nand->tim_gen_seq0 = + TIM_GEN_SEQ0_D0(TO_CYCLES64(cle - cyc, period_ns)) | + TIM_GEN_SEQ0_D1(TO_CYCLES64(cle - cyc, period_ns)) | + TIM_GEN_SEQ0_D2(TO_CYCLES64(bef_dly, period_ns)) | + TIM_GEN_SEQ0_D3(TO_CYCLES64(ca_to_data, period_ns)); + + /* + * D4 = ADDR -> CMD = tALH + tALS - 1 cyle + * D5 = ADDR -> ADDR = tALH + tALS - 1 cyle + * D6 = ADDR -> DLY = tWB - tDH + * D7 = ADDR -> DATA = tWHR + tREA - tDH + */ + rzn1_nand->tim_gen_seq1 = + TIM_GEN_SEQ1_D4(TO_CYCLES64(ale - cyc, period_ns)) | + TIM_GEN_SEQ1_D5(TO_CYCLES64(ale - cyc, period_ns)) | + TIM_GEN_SEQ1_D6(TO_CYCLES64(bef_dly, period_ns)) | + TIM_GEN_SEQ1_D7(TO_CYCLES64(ca_to_data, period_ns)); + + /* + * D8 = DLY -> DATA = tRR + tREA + * D9 = DLY -> CMD = tRR + * D10 = DATA -> CMD = tCLH + tCLS - 1 cycle + * D11 = DATA -> DLY = tWB - tDH + */ + rzn1_nand->tim_gen_seq2 = + TIM_GEN_SEQ2_D8(TO_CYCLES64(sdr->tRR_min + sdr->tREA_max, period_ns)) | + TIM_GEN_SEQ2_D9(TO_CYCLES64(sdr->tRR_min, period_ns)) | + TIM_GEN_SEQ2_D10(TO_CYCLES64(cle - cyc, period_ns)) | + TIM_GEN_SEQ2_D11(TO_CYCLES64(bef_dly, period_ns)); + + /* D12 = DATA -> END = tCLH - tDH */ + rzn1_nand->tim_gen_seq3 = + TIM_GEN_SEQ3_D12(TO_CYCLES64(sdr->tCLH_min - sdr->tDH_min, period_ns)); + + return 0; +} + +static int rzn1_nandc_ooblayout_ecc(struct mtd_info *mtd, int section, + struct mtd_oob_region *oobregion) +{ + struct nand_chip *chip = mtd_to_nand(mtd); + unsigned int eccbytes = round_up(chip->ecc.bytes, 4) * chip->ecc.steps; + + if (section) + return -ERANGE; + + oobregion->offset = 2; + oobregion->length = eccbytes; + + return 0; +} + +static int rzn1_nandc_ooblayout_free(struct mtd_info *mtd, int section, + struct mtd_oob_region *oobregion) +{ + struct nand_chip *chip = mtd_to_nand(mtd); + unsigned int eccbytes = round_up(chip->ecc.bytes, 4) * chip->ecc.steps; + + if (section) + return -ERANGE; + + oobregion->offset = 2 + eccbytes; + oobregion->length = mtd->oobsize - oobregion->offset; + + return 0; +} + +static const struct mtd_ooblayout_ops rzn1_nandc_ooblayout_ops = { + .ecc = rzn1_nandc_ooblayout_ecc, + .free = rzn1_nandc_ooblayout_free, +}; + +static int rzn1_nandc_hw_ecc_controller_init(struct nand_chip *chip) +{ + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + struct mtd_info *mtd = nand_to_mtd(chip); + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + + if (mtd->writesize > SZ_16K) { + dev_err(nandc->dev, "Unsupported page size\n"); + return -EINVAL; + } + + switch (chip->ecc.size) { + case SZ_256: + rzn1_nand->control |= CONTROL_ECC_BLOCK_SIZE_256; + break; + case SZ_512: + rzn1_nand->control |= CONTROL_ECC_BLOCK_SIZE_512; + break; + case SZ_1K: + rzn1_nand->control |= CONTROL_ECC_BLOCK_SIZE_1024; + break; + default: + dev_err(nandc->dev, "Unsupported ECC chunk size\n"); + return -EINVAL; + } + + switch (chip->ecc.strength) { + case 2: + chip->ecc.bytes = 4; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_2B; + break; + case 4: + chip->ecc.bytes = 7; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_4B; + break; + case 8: + chip->ecc.bytes = 14; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_8B; + break; + case 16: + chip->ecc.bytes = 28; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_16B; + break; + case 24: + chip->ecc.bytes = 42; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_24B; + break; + case 32: + chip->ecc.bytes = 56; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_32B; + break; + default: + dev_err(nandc->dev, "Unsupported ECC strength\n"); + return -EINVAL; + } + + rzn1_nand->ecc_ctrl |= ECC_CTRL_ERR_THRESHOLD(chip->ecc.strength); + + mtd_set_ooblayout(mtd, &rzn1_nandc_ooblayout_ops); + chip->ecc.steps = mtd->writesize / chip->ecc.size; + chip->ecc.read_page = rzn1_read_page_hw_ecc; + chip->ecc.read_subpage = rzn1_read_subpage_hw_ecc; + chip->ecc.write_page = rzn1_write_page_hw_ecc; + chip->ecc.write_subpage = rzn1_write_subpage_hw_ecc; + + return 0; +} + +static int rzn1_nandc_ecc_init(struct nand_chip *chip) +{ + struct nand_ecc_ctrl *ecc = &chip->ecc; + const struct nand_ecc_props *requirements = + nanddev_get_ecc_requirements(&chip->base); + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + int ret; + + if (ecc->engine_type != NAND_ECC_ENGINE_TYPE_NONE && + (!ecc->size || !ecc->strength)) { + if (requirements->step_size && requirements->strength) { + ecc->size = requirements->step_size; + ecc->strength = requirements->strength; + } else { + dev_err(nandc->dev, "No minimum ECC strength\n"); + return -EINVAL; + } + } + + switch (ecc->engine_type) { + case NAND_ECC_ENGINE_TYPE_ON_HOST: + ret = rzn1_nandc_hw_ecc_controller_init(chip); + if (ret) + return ret; + break; + case NAND_ECC_ENGINE_TYPE_NONE: + case NAND_ECC_ENGINE_TYPE_SOFT: + case NAND_ECC_ENGINE_TYPE_ON_DIE: + break; + default: + return -EINVAL; + } + + return 0; +} + +static int rzn1_nandc_attach_chip(struct nand_chip *chip) +{ + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + struct mtd_info *mtd = nand_to_mtd(chip); + struct nand_memory_organization *memorg = nanddev_get_memorg(&chip->base); + int ret; + + /* Do not store BBT bits in the OOB section as it is not protected */ + if (chip->bbt_options & NAND_BBT_USE_FLASH) + chip->bbt_options |= NAND_BBT_NO_OOB; + + if (mtd->writesize <= 512) { + dev_err(nandc->dev, "Small page devices not supported\n"); + return -EINVAL; + } + + rzn1_nand->control |= CONTROL_CHECK_RB_LINE | CONTROL_INT_EN; + + switch (memorg->pages_per_eraseblock) { + case 32: + rzn1_nand->control |= CONTROL_BLOCK_SIZE_32P; + break; + case 64: + rzn1_nand->control |= CONTROL_BLOCK_SIZE_64P; + break; + case 128: + rzn1_nand->control |= CONTROL_BLOCK_SIZE_128P; + break; + case 256: + rzn1_nand->control |= CONTROL_BLOCK_SIZE_256P; + break; + default: + dev_err(nandc->dev, "Unsupported memory organization\n"); + return -EINVAL; + } + + chip->options |= NAND_SUBPAGE_READ; + + ret = rzn1_nandc_ecc_init(chip); + if (ret) { + dev_err(nandc->dev, "ECC initialization failed (%d)\n", ret); + return ret; + } + + /* Force an update of the configuration registers */ + rzn1_nand->selected_die = -1; + + return 0; +} + +static const struct nand_controller_ops rzn1_nandc_ops = { + .attach_chip = rzn1_nandc_attach_chip, + .exec_op = rzn1_nandc_exec_op, + .setup_interface = rzn1_nandc_setup_interface, +}; + +static int rzn1_nandc_alloc_dma_buf(struct rzn1_nandc *nandc, + struct mtd_info *new_mtd) +{ + unsigned int max_len = new_mtd->writesize + new_mtd->oobsize; + struct rzn1_nand_chip *entry, *temp; + struct nand_chip *chip; + struct mtd_info *mtd; + + list_for_each_entry_safe(entry, temp, &nandc->chips, node) { + chip = &entry->chip; + mtd = nand_to_mtd(chip); + max_len = max(max_len, mtd->writesize + mtd->oobsize); + } + + if (nandc->buf && nandc->buf_sz < max_len) { + devm_kfree(nandc->dev, nandc->buf); + nandc->buf = NULL; + } + + if (!nandc->buf) { + nandc->buf_sz = max_len; + nandc->buf = devm_kmalloc(nandc->dev, max_len, GFP_KERNEL | GFP_DMA); + if (!nandc->buf) + return -ENOMEM; + } + + return 0; +} + +static int rzn1_nandc_chip_init(struct rzn1_nandc *nandc, struct device_node *np) +{ + struct rzn1_nand_chip *rzn1_nand; + struct mtd_info *mtd; + struct nand_chip *chip; + int nsels, ret, i; + u32 cs; + + nsels = of_property_count_elems_of_size(np, "reg", sizeof(u32)); + if (nsels <= 0) { + ret = (nsels < 0) ? nsels : -EINVAL; + dev_err(nandc->dev, "Invalid reg property (%d)\n", ret); + return ret; + } + + /* Alloc the driver's NAND chip structure */ + rzn1_nand = devm_kzalloc(nandc->dev, struct_size(rzn1_nand, sels, nsels), + GFP_KERNEL); + if (!rzn1_nand) + return -ENOMEM; + + rzn1_nand->nsels = nsels; + rzn1_nand->selected_die = -1; + + for (i = 0; i < nsels; i++) { + ret = of_property_read_u32_index(np, "reg", i, &cs); + if (ret) { + dev_err(nandc->dev, "Incomplete reg property (%d)\n", ret); + return ret; + } + + if (cs >= RZN1_CS_NUM) { + dev_err(nandc->dev, "Invalid reg property (%d)\n", cs); + return -EINVAL; + } + + if (test_and_set_bit(cs, &nandc->assigned_cs)) { + dev_err(nandc->dev, "CS %d already assigned\n", cs); + return -EINVAL; + } + + /* + * No need to check for RB or WP properties, there is a 1:1 + * mandatory mapping with the CS. + */ + rzn1_nand->sels[i].cs = cs; + } + + chip = &rzn1_nand->chip; + chip->controller = &nandc->controller; + nand_set_flash_node(chip, np); + + mtd = nand_to_mtd(chip); + mtd->dev.parent = nandc->dev; + if (!mtd->name) { + dev_err(nandc->dev, "Missing MTD label\n"); + return -EINVAL; + } + + ret = nand_scan(chip, rzn1_nand->nsels); + if (ret) { + dev_err(nandc->dev, "Failed to scan the NAND chip (%d)\n", ret); + return ret; + } + + ret = rzn1_nandc_alloc_dma_buf(nandc, mtd); + if (ret) + goto cleanup_nand; + + ret = mtd_device_register(mtd, NULL, 0); + if (ret) { + dev_err(nandc->dev, "Failed to register MTD device (%d)\n", ret); + goto cleanup_nand; + } + + list_add_tail(&rzn1_nand->node, &nandc->chips); + + return 0; + +cleanup_nand: + nand_cleanup(chip); + + return ret; +} + +static void rzn1_nandc_chips_cleanup(struct rzn1_nandc *nandc) +{ + struct rzn1_nand_chip *entry, *temp; + struct nand_chip *chip; + int ret; + + list_for_each_entry_safe(entry, temp, &nandc->chips, node) { + chip = &entry->chip; + ret = mtd_device_unregister(nand_to_mtd(chip)); + WARN_ON(ret); + nand_cleanup(chip); + list_del(&entry->node); + } +} + +static int rzn1_nandc_chips_init(struct rzn1_nandc *nandc) +{ + struct device_node *np; + int ret; + + for_each_child_of_node(nandc->dev->of_node, np) { + ret = rzn1_nandc_chip_init(nandc, np); + if (ret) { + of_node_put(np); + goto cleanup_chips; + } + } + + return 0; + +cleanup_chips: + rzn1_nandc_chips_cleanup(nandc); + + return ret; +} + +static int rzn1_nandc_probe(struct platform_device *pdev) +{ + struct rzn1_nandc *nandc; + int irq, ret; + + nandc = devm_kzalloc(&pdev->dev, sizeof(*nandc), GFP_KERNEL); + if (!nandc) + return -ENOMEM; + + nandc->dev = &pdev->dev; + nand_controller_init(&nandc->controller); + nandc->controller.ops = &rzn1_nandc_ops; + INIT_LIST_HEAD(&nandc->chips); + init_completion(&nandc->complete); + + nandc->regs = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(nandc->regs)) + return PTR_ERR(nandc->regs); + + /* APB clock */ + nandc->hclk = devm_clk_get(&pdev->dev, "hclk"); + if (IS_ERR(nandc->hclk)) + return PTR_ERR(nandc->hclk); + + /* External NAND bus clock */ + nandc->eclk = devm_clk_get(&pdev->dev, "eclk"); + if (IS_ERR(nandc->eclk)) + return PTR_ERR(nandc->eclk); + + ret = clk_prepare_enable(nandc->hclk); + if (ret) + return ret; + + ret = clk_prepare_enable(nandc->eclk); + if (ret) + goto disable_hclk; + + rzn1_nandc_dis_interrupts(nandc); + irq = platform_get_irq_optional(pdev, 0); + if (irq == -EPROBE_DEFER) { + ret = irq; + goto disable_eclk; + } else if (irq < 0) { + dev_info(&pdev->dev, "No IRQ found, fallback to polling\n"); + nandc->use_polling = true; + } else { + ret = devm_request_irq(&pdev->dev, irq, rzn1_nandc_irq_handler, 0, + "rzn1-nand-controller", nandc); + if (ret < 0) + goto disable_eclk; + } + + ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); + if (ret) + goto disable_eclk; + + rzn1_nandc_clear_fifo(nandc); + + platform_set_drvdata(pdev, nandc); + + ret = rzn1_nandc_chips_init(nandc); + if (ret) + goto disable_eclk; + + return 0; + +disable_eclk: + clk_disable_unprepare(nandc->eclk); +disable_hclk: + clk_disable_unprepare(nandc->hclk); + + return ret; +} + +static int rzn1_nandc_remove(struct platform_device *pdev) +{ + struct rzn1_nandc *nandc = platform_get_drvdata(pdev); + + rzn1_nandc_chips_cleanup(nandc); + + clk_disable_unprepare(nandc->eclk); + clk_disable_unprepare(nandc->hclk); + + return 0; +} + +static const struct of_device_id rzn1_nandc_id_table[] = { + { .compatible = "renesas,rzn1-nand-controller" }, + {} /* sentinel */ +}; +MODULE_DEVICE_TABLE(of, nandc_id_table); + +static struct platform_driver rzn1_nandc_driver = { + .driver = { + .name = "renesas-nandc", + .of_match_table = of_match_ptr(rzn1_nandc_id_table), + }, + .probe = rzn1_nandc_probe, + .remove = rzn1_nandc_remove, +}; +module_platform_driver(rzn1_nandc_driver); + +MODULE_AUTHOR("Miquel Raynal <miquel.raynal@bootlin.com>"); +MODULE_DESCRIPTION("Renesas RZ/N1x NAND flash controller driver"); +MODULE_LICENSE("GPL"); -- 2.27.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v4 2/4] mtd: rawnand: rzn1: Add new NAND controller driver @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Miquel Raynal @ 2021-12-15 15:46 UTC (permalink / raw) To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, devicetree, Miquel Raynal, Ralph Siemsen Introduce Renesas RZ/N1x NAND controller driver which supports: - All ONFI timing modes - Different configurations of its internal ECC controller - On-die (not tested) and software ECC support - Several chips (not tested) - Subpage accesses - DMA and PIO This controller was originally provided by Evatronix before being bought by Cadence. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Tested-by: Ralph Siemsen <ralph.siemsen@linaro.org> --- drivers/mtd/nand/raw/Kconfig | 6 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/rzn1-nand-controller.c | 1422 +++++++++++++++++++ 3 files changed, 1429 insertions(+) create mode 100644 drivers/mtd/nand/raw/rzn1-nand-controller.c diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index 67b7cb67c030..e436b74f6f68 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -461,6 +461,12 @@ config MTD_NAND_PL35X Enables support for PrimeCell SMC PL351 and PL353 NAND controller found on Zynq7000. +config MTD_NAND_RZN1 + tristate "Renesas RZ/N1D, RZ/N1S, RZ/N1L NAND controller" + depends on ARCH_RENESAS || COMPILE_TEST + help + Enables support for Renesas RZ/N1x SoC family NAND controller. + comment "Misc" config MTD_SM_COMMON diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile index 2f97958c3a33..05e6dc80a45d 100644 --- a/drivers/mtd/nand/raw/Makefile +++ b/drivers/mtd/nand/raw/Makefile @@ -58,6 +58,7 @@ obj-$(CONFIG_MTD_NAND_ARASAN) += arasan-nand-controller.o obj-$(CONFIG_MTD_NAND_INTEL_LGM) += intel-nand-controller.o obj-$(CONFIG_MTD_NAND_ROCKCHIP) += rockchip-nand-controller.o obj-$(CONFIG_MTD_NAND_PL35X) += pl35x-nand-controller.o +obj-$(CONFIG_MTD_NAND_RZN1) += rzn1-nand-controller.o nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o nand-objs += nand_onfi.o diff --git a/drivers/mtd/nand/raw/rzn1-nand-controller.c b/drivers/mtd/nand/raw/rzn1-nand-controller.c new file mode 100644 index 000000000000..1d4f5ae057d9 --- /dev/null +++ b/drivers/mtd/nand/raw/rzn1-nand-controller.c @@ -0,0 +1,1422 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Evatronix/Renesas RZ/N1D, RZ/N1S, RZ/N1L NAND flash controller driver + * + * Copyright (C) 2021 Schneider Electric + * Author: Miquel RAYNAL <miquel.raynal@bootlin.com> + */ + +#include <linux/bitfield.h> +#include <linux/clk.h> +#include <linux/dma-mapping.h> +#include <linux/interrupt.h> +#include <linux/iopoll.h> +#include <linux/module.h> +#include <linux/mtd/mtd.h> +#include <linux/mtd/rawnand.h> +#include <linux/of.h> +#include <linux/platform_device.h> +#include <linux/slab.h> + +#define COMMAND_REG 0x00 +#define COMMAND_SEQ(x) FIELD_PREP(GENMASK(5, 0), (x)) +#define COMMAND_SEQ_10 COMMAND_SEQ(0x2A) +#define COMMAND_SEQ_12 COMMAND_SEQ(0x0C) +#define COMMAND_SEQ_18 COMMAND_SEQ(0x32) +#define COMMAND_SEQ_19 COMMAND_SEQ(0x13) +#define COMMAND_SEQ_GEN_IN COMMAND_SEQ_18 +#define COMMAND_SEQ_GEN_OUT COMMAND_SEQ_19 +#define COMMAND_SEQ_READ_PAGE COMMAND_SEQ_10 +#define COMMAND_SEQ_WRITE_PAGE COMMAND_SEQ_12 +#define COMMAND_INPUT_SEL_AHBS 0 +#define COMMAND_INPUT_SEL_DMA BIT(6) +#define COMMAND_FIFO_SEL 0 +#define COMMAND_DATA_SEL BIT(7) +#define COMMAND_0(x) FIELD_PREP(GENMASK(15, 8), (x)) +#define COMMAND_1(x) FIELD_PREP(GENMASK(23, 16), (x)) +#define COMMAND_2(x) FIELD_PREP(GENMASK(31, 24), (x)) + +#define CONTROL_REG 0x04 +#define CONTROL_CHECK_RB_LINE 0 +#define CONTROL_ECC_BLOCK_SIZE(x) FIELD_PREP(GENMASK(2, 1), (x)) +#define CONTROL_ECC_BLOCK_SIZE_256 CONTROL_ECC_BLOCK_SIZE(0) +#define CONTROL_ECC_BLOCK_SIZE_512 CONTROL_ECC_BLOCK_SIZE(1) +#define CONTROL_ECC_BLOCK_SIZE_1024 CONTROL_ECC_BLOCK_SIZE(2) +#define CONTROL_INT_EN BIT(4) +#define CONTROL_ECC_EN BIT(5) +#define CONTROL_BLOCK_SIZE(x) FIELD_PREP(GENMASK(7, 6), (x)) +#define CONTROL_BLOCK_SIZE_32P CONTROL_BLOCK_SIZE(0) +#define CONTROL_BLOCK_SIZE_64P CONTROL_BLOCK_SIZE(1) +#define CONTROL_BLOCK_SIZE_128P CONTROL_BLOCK_SIZE(2) +#define CONTROL_BLOCK_SIZE_256P CONTROL_BLOCK_SIZE(3) + +#define STATUS_REG 0x8 +#define MEM_RDY(cs, reg) (FIELD_GET(GENMASK(3, 0), (reg)) & BIT(cs)) +#define CTRL_RDY(reg) (FIELD_GET(BIT(8), (reg)) == 0) + +#define ECC_CTRL_REG 0x18 +#define ECC_CTRL_CAP(x) FIELD_PREP(GENMASK(2, 0), (x)) +#define ECC_CTRL_CAP_2B ECC_CTRL_CAP(0) +#define ECC_CTRL_CAP_4B ECC_CTRL_CAP(1) +#define ECC_CTRL_CAP_8B ECC_CTRL_CAP(2) +#define ECC_CTRL_CAP_16B ECC_CTRL_CAP(3) +#define ECC_CTRL_CAP_24B ECC_CTRL_CAP(4) +#define ECC_CTRL_CAP_32B ECC_CTRL_CAP(5) +#define ECC_CTRL_ERR_THRESHOLD(x) FIELD_PREP(GENMASK(13, 8), (x)) + +#define INT_MASK_REG 0x10 +#define INT_STATUS_REG 0x14 +#define INT_CMD_END BIT(1) +#define INT_DMA_END BIT(3) +#define INT_MEM_RDY(cs) FIELD_PREP(GENMASK(11, 8), BIT(cs)) +#define INT_DMA_ENDED BIT(3) +#define MEM_IS_RDY(cs, reg) (FIELD_GET(GENMASK(11, 8), (reg)) & BIT(cs)) +#define DMA_HAS_ENDED(reg) FIELD_GET(BIT(3), (reg)) + +#define ECC_OFFSET_REG 0x1C +#define ECC_OFFSET(x) FIELD_PREP(GENMASK(15, 0), (x)) + +#define ECC_STAT_REG 0x20 +#define ECC_STAT_CORRECTABLE(cs, reg) (FIELD_GET(GENMASK(3, 0), (reg)) & BIT(cs)) +#define ECC_STAT_UNCORRECTABLE(cs, reg) (FIELD_GET(GENMASK(11, 8), (reg)) & BIT(cs)) + +#define ADDR0_COL_REG 0x24 +#define ADDR0_COL(x) FIELD_PREP(GENMASK(15, 0), (x)) + +#define ADDR0_ROW_REG 0x28 +#define ADDR0_ROW(x) FIELD_PREP(GENMASK(23, 0), (x)) + +#define ADDR1_COL_REG 0x2C +#define ADDR1_COL(x) FIELD_PREP(GENMASK(15, 0), (x)) + +#define ADDR1_ROW_REG 0x30 +#define ADDR1_ROW(x) FIELD_PREP(GENMASK(23, 0), (x)) + +#define FIFO_DATA_REG 0x38 + +#define DATA_REG 0x3C + +#define DATA_REG_SIZE_REG 0x40 + +#define DMA_ADDR_LOW_REG 0x64 + +#define DMA_ADDR_HIGH_REG 0x68 + +#define DMA_CNT_REG 0x6C + +#define DMA_CTRL_REG 0x70 +#define DMA_CTRL_INCREMENT_BURST_4 0 +#define DMA_CTRL_REGISTER_MANAGED_MODE 0 +#define DMA_CTRL_START BIT(7) + +#define MEM_CTRL_REG 0x80 +#define MEM_CTRL_CS(cs) FIELD_PREP(GENMASK(1, 0), (cs)) +#define MEM_CTRL_DIS_WP(cs) FIELD_PREP(GENMASK(11, 8), BIT((cs))) + +#define DATA_SIZE_REG 0x84 +#define DATA_SIZE(x) FIELD_PREP(GENMASK(14, 0), (x)) + +#define TIMINGS_ASYN_REG 0x88 +#define TIMINGS_ASYN_TRWP(x) FIELD_PREP(GENMASK(3, 0), max((x), 1U) - 1) +#define TIMINGS_ASYN_TRWH(x) FIELD_PREP(GENMASK(7, 4), max((x), 1U) - 1) + +#define TIM_SEQ0_REG 0x90 +#define TIM_SEQ0_TCCS(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) +#define TIM_SEQ0_TADL(x) FIELD_PREP(GENMASK(13, 8), max((x), 1U) - 1) +#define TIM_SEQ0_TRHW(x) FIELD_PREP(GENMASK(21, 16), max((x), 1U) - 1) +#define TIM_SEQ0_TWHR(x) FIELD_PREP(GENMASK(29, 24), max((x), 1U) - 1) + +#define TIM_SEQ1_REG 0x94 +#define TIM_SEQ1_TWB(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) +#define TIM_SEQ1_TRR(x) FIELD_PREP(GENMASK(13, 8), max((x), 1U) - 1) +#define TIM_SEQ1_TWW(x) FIELD_PREP(GENMASK(21, 16), max((x), 1U) - 1) + +#define TIM_GEN_SEQ0_REG 0x98 +#define TIM_GEN_SEQ0_D0(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) +#define TIM_GEN_SEQ0_D1(x) FIELD_PREP(GENMASK(13, 8), max((x), 1U) - 1) +#define TIM_GEN_SEQ0_D2(x) FIELD_PREP(GENMASK(21, 16), max((x), 1U) - 1) +#define TIM_GEN_SEQ0_D3(x) FIELD_PREP(GENMASK(29, 24), max((x), 1U) - 1) + +#define TIM_GEN_SEQ1_REG 0x9c +#define TIM_GEN_SEQ1_D4(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) +#define TIM_GEN_SEQ1_D5(x) FIELD_PREP(GENMASK(13, 8), max((x), 1U) - 1) +#define TIM_GEN_SEQ1_D6(x) FIELD_PREP(GENMASK(21, 16), max((x), 1U) - 1) +#define TIM_GEN_SEQ1_D7(x) FIELD_PREP(GENMASK(29, 24), max((x), 1U) - 1) + +#define TIM_GEN_SEQ2_REG 0xA0 +#define TIM_GEN_SEQ2_D8(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) +#define TIM_GEN_SEQ2_D9(x) FIELD_PREP(GENMASK(13, 8), max((x), 1U) - 1) +#define TIM_GEN_SEQ2_D10(x) FIELD_PREP(GENMASK(21, 16), max((x), 1U) - 1) +#define TIM_GEN_SEQ2_D11(x) FIELD_PREP(GENMASK(29, 24), max((x), 1U) - 1) + +#define FIFO_INIT_REG 0xB4 +#define FIFO_INIT BIT(0) + +#define FIFO_STATE_REG 0xB4 +#define FIFO_STATE_R_EMPTY(reg) FIELD_GET(BIT(0), (reg)) +#define FIFO_STATE_W_FULL(reg) FIELD_GET(BIT(1), (reg)) +#define FIFO_STATE_C_EMPTY(reg) FIELD_GET(BIT(2), (reg)) +#define FIFO_STATE_R_FULL(reg) FIELD_GET(BIT(6), (reg)) +#define FIFO_STATE_W_EMPTY(reg) FIELD_GET(BIT(7), (reg)) + +#define GEN_SEQ_CTRL_REG 0xB8 +#define GEN_SEQ_CMD0_EN BIT(0) +#define GEN_SEQ_CMD1_EN BIT(1) +#define GEN_SEQ_CMD2_EN BIT(2) +#define GEN_SEQ_CMD3_EN BIT(3) +#define GEN_SEQ_COL_A0(x) FIELD_PREP(GENMASK(5, 4), min((x), 2U)) +#define GEN_SEQ_COL_A1(x) FIELD_PREP(GENMASK(7, 6), min((x), 2U)) +#define GEN_SEQ_ROW_A0(x) FIELD_PREP(GENMASK(9, 8), min((x), 3U)) +#define GEN_SEQ_ROW_A1(x) FIELD_PREP(GENMASK(11, 10), min((x), 3U)) +#define GEN_SEQ_DATA_EN BIT(12) +#define GEN_SEQ_DELAY_EN(x) FIELD_PREP(GENMASK(14, 13), (x)) +#define GEN_SEQ_DELAY0_EN GEN_SEQ_DELAY_EN(1) +#define GEN_SEQ_DELAY1_EN GEN_SEQ_DELAY_EN(2) +#define GEN_SEQ_IMD_SEQ BIT(15) +#define GEN_SEQ_COMMAND_3(x) FIELD_PREP(GENMASK(26, 16), (x)) + +#define DMA_TLVL_REG 0x114 +#define DMA_TLVL(x) FIELD_PREP(GENMASK(7, 0), (x)) +#define DMA_TLVL_MAX DMA_TLVL(0xFF) + +#define TIM_GEN_SEQ3_REG 0x134 +#define TIM_GEN_SEQ3_D12(x) FIELD_PREP(GENMASK(5, 0), max((x), 1U) - 1) + +#define ECC_CNT_REG 0x14C +#define ECC_CNT(cs, reg) FIELD_GET(GENMASK(5, 0), (reg) >> ((cs) * 8)) + +#define RZN1_CS_NUM 4 + +#define TO_CYCLES64(ps, period_ns) ((unsigned int)DIV_ROUND_UP_ULL(div_u64(ps, 1000), \ + period_ns)) + +struct rzn1_nand_chip_sel { + unsigned int cs; +}; + +struct rzn1_nand_chip { + struct nand_chip chip; + struct list_head node; + int selected_die; + u32 ctrl; + unsigned int nsels; + u32 control; + u32 ecc_ctrl; + u32 timings_asyn; + u32 tim_seq0; + u32 tim_seq1; + u32 tim_gen_seq0; + u32 tim_gen_seq1; + u32 tim_gen_seq2; + u32 tim_gen_seq3; + struct rzn1_nand_chip_sel sels[]; +}; + +struct rzn1_nandc { + struct nand_controller controller; + struct device *dev; + void __iomem *regs; + struct clk *hclk; + struct clk *eclk; + unsigned long assigned_cs; + struct list_head chips; + struct nand_chip *selected_chip; + struct completion complete; + bool use_polling; + u8 *buf; + unsigned int buf_sz; +}; + +struct rzn1_op { + u32 command; + u32 addr0_col; + u32 addr0_row; + u32 addr1_col; + u32 addr1_row; + u32 data_size; + u32 ecc_offset; + u32 gen_seq_ctrl; + u8 *buf; + bool read; + unsigned int len; +}; + +static inline struct rzn1_nandc *to_rzn1_nandc(struct nand_controller *ctrl) +{ + return container_of(ctrl, struct rzn1_nandc, controller); +} + +static inline struct rzn1_nand_chip *to_rzn1_nand(struct nand_chip *chip) +{ + return container_of(chip, struct rzn1_nand_chip, chip); +} + +static inline unsigned int to_nandc_cs(struct rzn1_nand_chip *nand) +{ + return nand->sels[nand->selected_die].cs; +} + +static void rzn1_nandc_dis_correction(struct rzn1_nandc *nandc) +{ + u32 control; + + control = readl_relaxed(nandc->regs + CONTROL_REG); + control &= ~CONTROL_ECC_EN; + writel_relaxed(control, nandc->regs + CONTROL_REG); +} + +static void rzn1_nandc_en_correction(struct rzn1_nandc *nandc) +{ + u32 control; + + control = readl_relaxed(nandc->regs + CONTROL_REG); + control |= CONTROL_ECC_EN; + writel_relaxed(control, nandc->regs + CONTROL_REG); +} + +static void rzn1_nandc_clear_status(struct rzn1_nandc *nandc) +{ + writel_relaxed(0, nandc->regs + INT_STATUS_REG); + writel_relaxed(0, nandc->regs + ECC_STAT_REG); + writel_relaxed(0, nandc->regs + ECC_CNT_REG); +} + +static void rzn1_nandc_dis_interrupts(struct rzn1_nandc *nandc) +{ + writel_relaxed(0, nandc->regs + INT_MASK_REG); +} + +static void rzn1_nandc_en_interrupts(struct rzn1_nandc *nandc, u32 val) +{ + if (!nandc->use_polling) + writel_relaxed(val, nandc->regs + INT_MASK_REG); +} + +static void rzn1_nandc_clear_fifo(struct rzn1_nandc *nandc) +{ + writel_relaxed(FIFO_INIT, nandc->regs + FIFO_INIT_REG); +} + +static void rzn1_nandc_select_target(struct nand_chip *chip, int die_nr) +{ + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + unsigned int cs = rzn1_nand->sels[die_nr].cs; + + if (chip == nandc->selected_chip && die_nr == rzn1_nand->selected_die) + return; + + rzn1_nandc_clear_status(nandc); + writel_relaxed(MEM_CTRL_CS(cs) | MEM_CTRL_DIS_WP(cs), nandc->regs + MEM_CTRL_REG); + writel_relaxed(rzn1_nand->control, nandc->regs + CONTROL_REG); + writel_relaxed(rzn1_nand->ecc_ctrl, nandc->regs + ECC_CTRL_REG); + writel_relaxed(rzn1_nand->timings_asyn, nandc->regs + TIMINGS_ASYN_REG); + writel_relaxed(rzn1_nand->tim_seq0, nandc->regs + TIM_SEQ0_REG); + writel_relaxed(rzn1_nand->tim_seq1, nandc->regs + TIM_SEQ1_REG); + writel_relaxed(rzn1_nand->tim_gen_seq0, nandc->regs + TIM_GEN_SEQ0_REG); + writel_relaxed(rzn1_nand->tim_gen_seq1, nandc->regs + TIM_GEN_SEQ1_REG); + writel_relaxed(rzn1_nand->tim_gen_seq2, nandc->regs + TIM_GEN_SEQ2_REG); + writel_relaxed(rzn1_nand->tim_gen_seq3, nandc->regs + TIM_GEN_SEQ3_REG); + + nandc->selected_chip = chip; + rzn1_nand->selected_die = die_nr; +} + +static void rzn1_nandc_trigger_op(struct rzn1_nandc *nandc, struct rzn1_op *rop) +{ + writel_relaxed(rop->addr0_col, nandc->regs + ADDR0_COL_REG); + writel_relaxed(rop->addr0_row, nandc->regs + ADDR0_ROW_REG); + writel_relaxed(rop->addr1_col, nandc->regs + ADDR1_COL_REG); + writel_relaxed(rop->addr1_row, nandc->regs + ADDR1_ROW_REG); + writel_relaxed(rop->ecc_offset, nandc->regs + ECC_OFFSET_REG); + writel_relaxed(rop->gen_seq_ctrl, nandc->regs + GEN_SEQ_CTRL_REG); + writel_relaxed(DATA_SIZE(rop->len), nandc->regs + DATA_SIZE_REG); + writel_relaxed(rop->command, nandc->regs + COMMAND_REG); +} + +static void rzn1_nandc_trigger_dma(struct rzn1_nandc *nandc) +{ + writel_relaxed(DMA_CTRL_INCREMENT_BURST_4 | + DMA_CTRL_REGISTER_MANAGED_MODE | + DMA_CTRL_START, nandc->regs + DMA_CTRL_REG); +} + +static irqreturn_t rzn1_nandc_irq_handler(int irq, void *private) +{ + struct rzn1_nandc *nandc = private; + + rzn1_nandc_dis_interrupts(nandc); + complete(&nandc->complete); + + return IRQ_HANDLED; +} + +static int rzn1_nandc_wait_end_of_op(struct rzn1_nandc *nandc, + struct nand_chip *chip) +{ + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + unsigned int cs = to_nandc_cs(rzn1_nand); + u32 status; + int ret; + + ret = readl_poll_timeout(nandc->regs + STATUS_REG, status, + MEM_RDY(cs, status) && CTRL_RDY(status), + 1, 100000); + if (ret) + dev_err(nandc->dev, "Operation timed out, status: 0x%08x\n", + status); + + return ret; +} + +static int rzn1_nandc_wait_end_of_io(struct rzn1_nandc *nandc, + struct nand_chip *chip) +{ + int timeout_ms = 1000; + int ret; + + if (nandc->use_polling) { + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + unsigned int cs = to_nandc_cs(rzn1_nand); + u32 status; + + ret = readl_poll_timeout(nandc->regs + INT_STATUS_REG, status, + MEM_IS_RDY(cs, status) & + DMA_HAS_ENDED(status), + 0, timeout_ms * 1000); + } else { + ret = wait_for_completion_timeout(&nandc->complete, + msecs_to_jiffies(timeout_ms)); + if (!ret) + ret = -ETIMEDOUT; + else + ret = 0; + } + + return ret; +} + +static int rzn1_read_page_hw_ecc(struct nand_chip *chip, u8 *buf, + int oob_required, int page) +{ + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + struct mtd_info *mtd = nand_to_mtd(chip); + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + unsigned int cs = to_nandc_cs(rzn1_nand); + struct rzn1_op rop = { + .command = COMMAND_INPUT_SEL_DMA | COMMAND_0(NAND_CMD_READ0) | + COMMAND_2(NAND_CMD_READSTART) | COMMAND_FIFO_SEL | + COMMAND_SEQ_READ_PAGE, + .addr0_row = page, + .len = mtd->writesize, + .ecc_offset = ECC_OFFSET(mtd->writesize + 2), + }; + unsigned int max_bitflips = 0; + dma_addr_t dma_addr; + u32 ecc_stat; + int bf, ret, i; + + /* Prepare controller */ + rzn1_nandc_select_target(chip, chip->cur_cs); + rzn1_nandc_clear_status(nandc); + reinit_completion(&nandc->complete); + rzn1_nandc_en_interrupts(nandc, INT_DMA_ENDED); + rzn1_nandc_en_correction(nandc); + + /* Configure DMA */ + dma_addr = dma_map_single(nandc->dev, nandc->buf, mtd->writesize, + DMA_FROM_DEVICE); + writel(dma_addr, nandc->regs + DMA_ADDR_LOW_REG); + writel(mtd->writesize, nandc->regs + DMA_CNT_REG); + writel(DMA_TLVL_MAX, nandc->regs + DMA_TLVL_REG); + + rzn1_nandc_trigger_op(nandc, &rop); + rzn1_nandc_trigger_dma(nandc); + + ret = rzn1_nandc_wait_end_of_io(nandc, chip); + dma_unmap_single(nandc->dev, dma_addr, mtd->writesize, DMA_FROM_DEVICE); + rzn1_nandc_dis_correction(nandc); + if (ret) { + dev_err(nandc->dev, "Read page operation never ending\n"); + return ret; + } + + ecc_stat = readl_relaxed(nandc->regs + ECC_STAT_REG); + + if (oob_required || ECC_STAT_UNCORRECTABLE(cs, ecc_stat)) { + ret = nand_change_read_column_op(chip, mtd->writesize, + chip->oob_poi, mtd->oobsize, + false); + if (ret) + return ret; + } + + if (ECC_STAT_UNCORRECTABLE(cs, ecc_stat)) { + for (i = 0; i < chip->ecc.steps; i++) { + unsigned int off = i * chip->ecc.size; + unsigned int eccoff = i * chip->ecc.bytes; + + bf = nand_check_erased_ecc_chunk(nandc->buf + off, + chip->ecc.size, + chip->oob_poi + 2 + eccoff, + chip->ecc.bytes, + NULL, 0, + chip->ecc.strength); + if (bf < 0) { + mtd->ecc_stats.failed++; + } else { + mtd->ecc_stats.corrected += bf; + max_bitflips = max_t(unsigned int, max_bitflips, bf); + } + } + } else if (ECC_STAT_CORRECTABLE(cs, ecc_stat)) { + bf = ECC_CNT(cs, readl_relaxed(nandc->regs + ECC_CNT_REG)); + /* + * The number of bitflips is an approximation given the fact + * that this controller does not provide per-chunk details but + * only gives statistics on the entire page. + */ + mtd->ecc_stats.corrected += bf; + } + + memcpy(buf, nandc->buf, mtd->writesize); + + return 0; +} + +static int rzn1_read_subpage_hw_ecc(struct nand_chip *chip, u32 req_offset, + u32 req_len, u8 *bufpoi, int page) +{ + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + struct mtd_info *mtd = nand_to_mtd(chip); + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + unsigned int cs = to_nandc_cs(rzn1_nand); + unsigned int page_off = round_down(req_offset, chip->ecc.size); + unsigned int real_len = round_up(req_offset + req_len - page_off, + chip->ecc.size); + unsigned int start_chunk = page_off / chip->ecc.size; + unsigned int nchunks = real_len / chip->ecc.size; + unsigned int ecc_off = 2 + (start_chunk * chip->ecc.bytes); + struct rzn1_op rop = { + .command = COMMAND_INPUT_SEL_AHBS | COMMAND_0(NAND_CMD_READ0) | + COMMAND_2(NAND_CMD_READSTART) | COMMAND_FIFO_SEL | + COMMAND_SEQ_READ_PAGE, + .addr0_row = page, + .addr0_col = page_off, + .len = real_len, + .ecc_offset = ECC_OFFSET(mtd->writesize + ecc_off), + }; + unsigned int max_bitflips = 0, i; + u32 ecc_stat; + int bf, ret; + + /* Prepare controller */ + rzn1_nandc_select_target(chip, chip->cur_cs); + rzn1_nandc_clear_status(nandc); + rzn1_nandc_en_correction(nandc); + rzn1_nandc_trigger_op(nandc, &rop); + + while (!FIFO_STATE_C_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + while (FIFO_STATE_R_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + ioread32_rep(nandc->regs + FIFO_DATA_REG, bufpoi + page_off, + real_len / 4); + + if (!FIFO_STATE_R_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) { + dev_err(nandc->dev, "Clearing residual data in the read FIFO\n"); + rzn1_nandc_clear_fifo(nandc); + } + + ret = rzn1_nandc_wait_end_of_op(nandc, chip); + rzn1_nandc_dis_correction(nandc); + if (ret) { + dev_err(nandc->dev, "Read subpage operation never ending\n"); + return ret; + } + + ecc_stat = readl_relaxed(nandc->regs + ECC_STAT_REG); + + if (ECC_STAT_UNCORRECTABLE(cs, ecc_stat)) { + ret = nand_change_read_column_op(chip, mtd->writesize, + chip->oob_poi, mtd->oobsize, + false); + if (ret) + return ret; + + for (i = start_chunk; i < nchunks; i++) { + unsigned int dataoff = i * chip->ecc.size; + unsigned int eccoff = 2 + (i * chip->ecc.bytes); + + bf = nand_check_erased_ecc_chunk(bufpoi + dataoff, + chip->ecc.size, + chip->oob_poi + eccoff, + chip->ecc.bytes, + NULL, 0, + chip->ecc.strength); + if (bf < 0) { + mtd->ecc_stats.failed++; + } else { + mtd->ecc_stats.corrected += bf; + max_bitflips = max_t(unsigned int, max_bitflips, bf); + } + } + } else if (ECC_STAT_CORRECTABLE(cs, ecc_stat)) { + bf = ECC_CNT(cs, readl_relaxed(nandc->regs + ECC_CNT_REG)); + /* + * The number of bitflips is an approximation given the fact + * that this controller does not provide per-chunk details but + * only gives statistics on the entire page. + */ + mtd->ecc_stats.corrected += bf; + } + + return 0; +} + +static int rzn1_write_page_hw_ecc(struct nand_chip *chip, const u8 *buf, + int oob_required, int page) +{ + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + struct mtd_info *mtd = nand_to_mtd(chip); + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + unsigned int cs = to_nandc_cs(rzn1_nand); + struct rzn1_op rop = { + .command = COMMAND_INPUT_SEL_DMA | COMMAND_0(NAND_CMD_SEQIN) | + COMMAND_1(NAND_CMD_PAGEPROG) | COMMAND_FIFO_SEL | + COMMAND_SEQ_WRITE_PAGE, + .addr0_row = page, + .len = mtd->writesize, + .ecc_offset = ECC_OFFSET(mtd->writesize + 2), + }; + dma_addr_t dma_addr; + int ret; + + memcpy(nandc->buf, buf, mtd->writesize); + + /* Prepare controller */ + rzn1_nandc_select_target(chip, chip->cur_cs); + rzn1_nandc_clear_status(nandc); + reinit_completion(&nandc->complete); + rzn1_nandc_en_interrupts(nandc, INT_MEM_RDY(cs)); + rzn1_nandc_en_correction(nandc); + + /* Configure DMA */ + dma_addr = dma_map_single(nandc->dev, (void *)nandc->buf, mtd->writesize, + DMA_TO_DEVICE); + writel(dma_addr, nandc->regs + DMA_ADDR_LOW_REG); + writel(mtd->writesize, nandc->regs + DMA_CNT_REG); + writel(DMA_TLVL_MAX, nandc->regs + DMA_TLVL_REG); + + rzn1_nandc_trigger_op(nandc, &rop); + rzn1_nandc_trigger_dma(nandc); + + ret = rzn1_nandc_wait_end_of_io(nandc, chip); + dma_unmap_single(nandc->dev, dma_addr, mtd->writesize, DMA_TO_DEVICE); + rzn1_nandc_dis_correction(nandc); + if (ret) { + dev_err(nandc->dev, "Write page operation never ending\n"); + return ret; + } + + if (!oob_required) + return 0; + + return nand_change_write_column_op(chip, mtd->writesize, chip->oob_poi, + mtd->oobsize, false); +} + +static int rzn1_write_subpage_hw_ecc(struct nand_chip *chip, u32 req_offset, + u32 req_len, const u8 *bufpoi, + int oob_required, int page) +{ + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + struct mtd_info *mtd = nand_to_mtd(chip); + unsigned int page_off = round_down(req_offset, chip->ecc.size); + unsigned int real_len = round_up(req_offset + req_len - page_off, + chip->ecc.size); + unsigned int start_chunk = page_off / chip->ecc.size; + unsigned int ecc_off = 2 + (start_chunk * chip->ecc.bytes); + struct rzn1_op rop = { + .command = COMMAND_INPUT_SEL_AHBS | COMMAND_0(NAND_CMD_SEQIN) | + COMMAND_1(NAND_CMD_PAGEPROG) | COMMAND_FIFO_SEL | + COMMAND_SEQ_WRITE_PAGE, + .addr0_row = page, + .addr0_col = page_off, + .len = real_len, + .ecc_offset = ECC_OFFSET(mtd->writesize + ecc_off), + }; + int ret; + + /* Prepare controller */ + rzn1_nandc_select_target(chip, chip->cur_cs); + rzn1_nandc_clear_status(nandc); + rzn1_nandc_en_correction(nandc); + rzn1_nandc_trigger_op(nandc, &rop); + + while (FIFO_STATE_W_FULL(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + iowrite32_rep(nandc->regs + FIFO_DATA_REG, bufpoi + page_off, + real_len / 4); + + while (!FIFO_STATE_W_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + ret = rzn1_nandc_wait_end_of_op(nandc, chip); + rzn1_nandc_dis_correction(nandc); + if (ret) { + dev_err(nandc->dev, "Write subpage operation never ending\n"); + return ret; + } + + return 0; +} + +/* + * This controller is simple enough and thus does not need to use the parser + * provided by the core, instead, handle every situation here. + */ +static int rzn1_nandc_exec_op(struct nand_chip *chip, + const struct nand_operation *op, bool check_only) +{ + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + const struct nand_op_instr *instr = NULL; + struct rzn1_op rop = { + .command = COMMAND_INPUT_SEL_AHBS, + .gen_seq_ctrl = GEN_SEQ_IMD_SEQ, + }; + unsigned int cmd_phase = 0, addr_phase = 0, data_phase = 0, + delay_phase = 0, delays = 0; + unsigned int op_id, col_addrs, row_addrs, naddrs, remainder, words, i; + const u8 *addrs; + u32 last_bytes; + int ret; + + if (!check_only) + rzn1_nandc_select_target(chip, op->cs); + + for (op_id = 0; op_id < op->ninstrs; op_id++) { + instr = &op->instrs[op_id]; + + nand_op_trace(" ", instr); + + switch (instr->type) { + case NAND_OP_CMD_INSTR: + switch (cmd_phase++) { + case 0: + rop.command |= COMMAND_0(instr->ctx.cmd.opcode); + rop.gen_seq_ctrl |= GEN_SEQ_CMD0_EN; + break; + case 1: + rop.gen_seq_ctrl |= GEN_SEQ_COMMAND_3(instr->ctx.cmd.opcode); + rop.gen_seq_ctrl |= GEN_SEQ_CMD3_EN; + if (addr_phase == 0) + addr_phase = 1; + break; + case 2: + rop.command |= COMMAND_2(instr->ctx.cmd.opcode); + rop.gen_seq_ctrl |= GEN_SEQ_CMD2_EN; + if (addr_phase <= 1) + addr_phase = 2; + break; + case 3: + rop.command |= COMMAND_1(instr->ctx.cmd.opcode); + rop.gen_seq_ctrl |= GEN_SEQ_CMD1_EN; + if (addr_phase <= 1) + addr_phase = 2; + if (delay_phase == 0) + delay_phase = 1; + if (data_phase == 0) + data_phase = 1; + break; + default: + return -EOPNOTSUPP; + } + break; + + case NAND_OP_ADDR_INSTR: + addrs = instr->ctx.addr.addrs; + naddrs = instr->ctx.addr.naddrs; + if (naddrs > 5) + return -EOPNOTSUPP; + + col_addrs = min(2U, naddrs); + row_addrs = naddrs > 2 ? naddrs - col_addrs : 0; + + switch (addr_phase++) { + case 0: + for (i = 0; i < col_addrs; i++) + rop.addr0_col |= addrs[i] << (i * 8); + rop.gen_seq_ctrl |= GEN_SEQ_COL_A0(col_addrs); + + for (i = 0; i < row_addrs; i++) + rop.addr0_row |= addrs[2 + i] << (i * 8); + rop.gen_seq_ctrl |= GEN_SEQ_ROW_A0(row_addrs); + + if (cmd_phase == 0) + cmd_phase = 1; + break; + case 1: + for (i = 0; i < col_addrs; i++) + rop.addr1_col |= addrs[i] << (i * 8); + rop.gen_seq_ctrl |= GEN_SEQ_COL_A1(col_addrs); + + for (i = 0; i < row_addrs; i++) + rop.addr1_row |= addrs[2 + i] << (i * 8); + rop.gen_seq_ctrl |= GEN_SEQ_ROW_A1(row_addrs); + + if (cmd_phase <= 1) + cmd_phase = 2; + break; + default: + return -EOPNOTSUPP; + } + break; + + case NAND_OP_DATA_IN_INSTR: + rop.read = true; + fallthrough; + case NAND_OP_DATA_OUT_INSTR: + rop.gen_seq_ctrl |= GEN_SEQ_DATA_EN; + rop.buf = instr->ctx.data.buf.in; + rop.len = instr->ctx.data.len; + rop.command |= COMMAND_FIFO_SEL; + + switch (data_phase++) { + case 0: + if (cmd_phase <= 2) + cmd_phase = 3; + if (addr_phase <= 1) + addr_phase = 2; + if (delay_phase == 0) + delay_phase = 1; + break; + default: + return -EOPNOTSUPP; + } + break; + + case NAND_OP_WAITRDY_INSTR: + switch (delay_phase++) { + case 0: + rop.gen_seq_ctrl |= GEN_SEQ_DELAY0_EN; + + if (cmd_phase <= 2) + cmd_phase = 3; + break; + case 1: + rop.gen_seq_ctrl |= GEN_SEQ_DELAY1_EN; + + if (cmd_phase <= 3) + cmd_phase = 4; + if (data_phase == 0) + data_phase = 1; + break; + default: + return -EOPNOTSUPP; + } + break; + } + } + + /* + * Sequence 19 is generic and dedicated to write operations. + * Sequence 18 is also generic and works for all other operations. + */ + if (rop.buf && !rop.read) + rop.command |= COMMAND_SEQ_GEN_OUT; + else + rop.command |= COMMAND_SEQ_GEN_IN; + + if (delays > 1) { + dev_err(nandc->dev, "Cannot handle more than one wait delay\n"); + return -EOPNOTSUPP; + } + + if (check_only) + return 0; + + rzn1_nandc_trigger_op(nandc, &rop); + + words = rop.len / sizeof(u32); + remainder = rop.len % sizeof(u32); + if (rop.buf && rop.read) { + while (!FIFO_STATE_C_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + while (FIFO_STATE_R_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + ioread32_rep(nandc->regs + FIFO_DATA_REG, rop.buf, words); + if (remainder) { + last_bytes = readl_relaxed(nandc->regs + FIFO_DATA_REG); + memcpy(rop.buf + (words * sizeof(u32)), &last_bytes, + remainder); + } + + if (!FIFO_STATE_R_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) { + dev_warn(nandc->dev, + "Clearing residual data in the read FIFO\n"); + rzn1_nandc_clear_fifo(nandc); + } + } else if (rop.len && !rop.read) { + while (FIFO_STATE_W_FULL(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + + iowrite32_rep(nandc->regs + FIFO_DATA_REG, rop.buf, + DIV_ROUND_UP(rop.len, 4)); + + if (remainder) { + last_bytes = 0; + memcpy(&last_bytes, rop.buf + (words * sizeof(u32)), remainder); + writel_relaxed(last_bytes, nandc->regs + FIFO_DATA_REG); + } + + while (!FIFO_STATE_W_EMPTY(readl(nandc->regs + FIFO_STATE_REG))) + cpu_relax(); + } + + ret = rzn1_nandc_wait_end_of_op(nandc, chip); + if (ret) + return ret; + + return 0; +} + +static int rzn1_nandc_setup_interface(struct nand_chip *chip, int chipnr, + const struct nand_interface_config *conf) +{ + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + unsigned int period_ns = 1000000000 / clk_get_rate(nandc->eclk); + const struct nand_sdr_timings *sdr; + unsigned int cyc, cle, ale, bef_dly, ca_to_data; + + sdr = nand_get_sdr_timings(conf); + if (IS_ERR(sdr)) + return PTR_ERR(sdr); + + if (sdr->tRP_min != sdr->tWP_min || sdr->tREH_min != sdr->tWH_min) { + dev_err(nandc->dev, "Read and write hold times must be identical\n"); + return -EINVAL; + } + + if (chipnr < 0) + return 0; + + rzn1_nand->timings_asyn = + TIMINGS_ASYN_TRWP(TO_CYCLES64(sdr->tRP_min, period_ns)) | + TIMINGS_ASYN_TRWH(TO_CYCLES64(sdr->tREH_min, period_ns)); + rzn1_nand->tim_seq0 = + TIM_SEQ0_TCCS(TO_CYCLES64(sdr->tCCS_min, period_ns)) | + TIM_SEQ0_TADL(TO_CYCLES64(sdr->tADL_min, period_ns)) | + TIM_SEQ0_TRHW(TO_CYCLES64(sdr->tRHW_min, period_ns)) | + TIM_SEQ0_TWHR(TO_CYCLES64(sdr->tWHR_min, period_ns)); + rzn1_nand->tim_seq1 = + TIM_SEQ1_TWB(TO_CYCLES64(sdr->tWB_max, period_ns)) | + TIM_SEQ1_TRR(TO_CYCLES64(sdr->tRR_min, period_ns)) | + TIM_SEQ1_TWW(TO_CYCLES64(sdr->tWW_min, period_ns)); + + cyc = sdr->tDS_min + sdr->tDH_min; + cle = sdr->tCLH_min + sdr->tCLS_min; + ale = sdr->tALH_min + sdr->tALS_min; + bef_dly = sdr->tWB_max - sdr->tDH_min; + ca_to_data = sdr->tWHR_min + sdr->tREA_max - sdr->tDH_min; + + /* + * D0 = CMD -> ADDR = tCLH + tCLS - 1 cycle + * D1 = CMD -> CMD = tCLH + tCLS - 1 cycle + * D2 = CMD -> DLY = tWB - tDH + * D3 = CMD -> DATA = tWHR + tREA - tDH + */ + rzn1_nand->tim_gen_seq0 = + TIM_GEN_SEQ0_D0(TO_CYCLES64(cle - cyc, period_ns)) | + TIM_GEN_SEQ0_D1(TO_CYCLES64(cle - cyc, period_ns)) | + TIM_GEN_SEQ0_D2(TO_CYCLES64(bef_dly, period_ns)) | + TIM_GEN_SEQ0_D3(TO_CYCLES64(ca_to_data, period_ns)); + + /* + * D4 = ADDR -> CMD = tALH + tALS - 1 cyle + * D5 = ADDR -> ADDR = tALH + tALS - 1 cyle + * D6 = ADDR -> DLY = tWB - tDH + * D7 = ADDR -> DATA = tWHR + tREA - tDH + */ + rzn1_nand->tim_gen_seq1 = + TIM_GEN_SEQ1_D4(TO_CYCLES64(ale - cyc, period_ns)) | + TIM_GEN_SEQ1_D5(TO_CYCLES64(ale - cyc, period_ns)) | + TIM_GEN_SEQ1_D6(TO_CYCLES64(bef_dly, period_ns)) | + TIM_GEN_SEQ1_D7(TO_CYCLES64(ca_to_data, period_ns)); + + /* + * D8 = DLY -> DATA = tRR + tREA + * D9 = DLY -> CMD = tRR + * D10 = DATA -> CMD = tCLH + tCLS - 1 cycle + * D11 = DATA -> DLY = tWB - tDH + */ + rzn1_nand->tim_gen_seq2 = + TIM_GEN_SEQ2_D8(TO_CYCLES64(sdr->tRR_min + sdr->tREA_max, period_ns)) | + TIM_GEN_SEQ2_D9(TO_CYCLES64(sdr->tRR_min, period_ns)) | + TIM_GEN_SEQ2_D10(TO_CYCLES64(cle - cyc, period_ns)) | + TIM_GEN_SEQ2_D11(TO_CYCLES64(bef_dly, period_ns)); + + /* D12 = DATA -> END = tCLH - tDH */ + rzn1_nand->tim_gen_seq3 = + TIM_GEN_SEQ3_D12(TO_CYCLES64(sdr->tCLH_min - sdr->tDH_min, period_ns)); + + return 0; +} + +static int rzn1_nandc_ooblayout_ecc(struct mtd_info *mtd, int section, + struct mtd_oob_region *oobregion) +{ + struct nand_chip *chip = mtd_to_nand(mtd); + unsigned int eccbytes = round_up(chip->ecc.bytes, 4) * chip->ecc.steps; + + if (section) + return -ERANGE; + + oobregion->offset = 2; + oobregion->length = eccbytes; + + return 0; +} + +static int rzn1_nandc_ooblayout_free(struct mtd_info *mtd, int section, + struct mtd_oob_region *oobregion) +{ + struct nand_chip *chip = mtd_to_nand(mtd); + unsigned int eccbytes = round_up(chip->ecc.bytes, 4) * chip->ecc.steps; + + if (section) + return -ERANGE; + + oobregion->offset = 2 + eccbytes; + oobregion->length = mtd->oobsize - oobregion->offset; + + return 0; +} + +static const struct mtd_ooblayout_ops rzn1_nandc_ooblayout_ops = { + .ecc = rzn1_nandc_ooblayout_ecc, + .free = rzn1_nandc_ooblayout_free, +}; + +static int rzn1_nandc_hw_ecc_controller_init(struct nand_chip *chip) +{ + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + struct mtd_info *mtd = nand_to_mtd(chip); + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + + if (mtd->writesize > SZ_16K) { + dev_err(nandc->dev, "Unsupported page size\n"); + return -EINVAL; + } + + switch (chip->ecc.size) { + case SZ_256: + rzn1_nand->control |= CONTROL_ECC_BLOCK_SIZE_256; + break; + case SZ_512: + rzn1_nand->control |= CONTROL_ECC_BLOCK_SIZE_512; + break; + case SZ_1K: + rzn1_nand->control |= CONTROL_ECC_BLOCK_SIZE_1024; + break; + default: + dev_err(nandc->dev, "Unsupported ECC chunk size\n"); + return -EINVAL; + } + + switch (chip->ecc.strength) { + case 2: + chip->ecc.bytes = 4; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_2B; + break; + case 4: + chip->ecc.bytes = 7; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_4B; + break; + case 8: + chip->ecc.bytes = 14; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_8B; + break; + case 16: + chip->ecc.bytes = 28; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_16B; + break; + case 24: + chip->ecc.bytes = 42; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_24B; + break; + case 32: + chip->ecc.bytes = 56; + rzn1_nand->ecc_ctrl |= ECC_CTRL_CAP_32B; + break; + default: + dev_err(nandc->dev, "Unsupported ECC strength\n"); + return -EINVAL; + } + + rzn1_nand->ecc_ctrl |= ECC_CTRL_ERR_THRESHOLD(chip->ecc.strength); + + mtd_set_ooblayout(mtd, &rzn1_nandc_ooblayout_ops); + chip->ecc.steps = mtd->writesize / chip->ecc.size; + chip->ecc.read_page = rzn1_read_page_hw_ecc; + chip->ecc.read_subpage = rzn1_read_subpage_hw_ecc; + chip->ecc.write_page = rzn1_write_page_hw_ecc; + chip->ecc.write_subpage = rzn1_write_subpage_hw_ecc; + + return 0; +} + +static int rzn1_nandc_ecc_init(struct nand_chip *chip) +{ + struct nand_ecc_ctrl *ecc = &chip->ecc; + const struct nand_ecc_props *requirements = + nanddev_get_ecc_requirements(&chip->base); + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + int ret; + + if (ecc->engine_type != NAND_ECC_ENGINE_TYPE_NONE && + (!ecc->size || !ecc->strength)) { + if (requirements->step_size && requirements->strength) { + ecc->size = requirements->step_size; + ecc->strength = requirements->strength; + } else { + dev_err(nandc->dev, "No minimum ECC strength\n"); + return -EINVAL; + } + } + + switch (ecc->engine_type) { + case NAND_ECC_ENGINE_TYPE_ON_HOST: + ret = rzn1_nandc_hw_ecc_controller_init(chip); + if (ret) + return ret; + break; + case NAND_ECC_ENGINE_TYPE_NONE: + case NAND_ECC_ENGINE_TYPE_SOFT: + case NAND_ECC_ENGINE_TYPE_ON_DIE: + break; + default: + return -EINVAL; + } + + return 0; +} + +static int rzn1_nandc_attach_chip(struct nand_chip *chip) +{ + struct rzn1_nand_chip *rzn1_nand = to_rzn1_nand(chip); + struct rzn1_nandc *nandc = to_rzn1_nandc(chip->controller); + struct mtd_info *mtd = nand_to_mtd(chip); + struct nand_memory_organization *memorg = nanddev_get_memorg(&chip->base); + int ret; + + /* Do not store BBT bits in the OOB section as it is not protected */ + if (chip->bbt_options & NAND_BBT_USE_FLASH) + chip->bbt_options |= NAND_BBT_NO_OOB; + + if (mtd->writesize <= 512) { + dev_err(nandc->dev, "Small page devices not supported\n"); + return -EINVAL; + } + + rzn1_nand->control |= CONTROL_CHECK_RB_LINE | CONTROL_INT_EN; + + switch (memorg->pages_per_eraseblock) { + case 32: + rzn1_nand->control |= CONTROL_BLOCK_SIZE_32P; + break; + case 64: + rzn1_nand->control |= CONTROL_BLOCK_SIZE_64P; + break; + case 128: + rzn1_nand->control |= CONTROL_BLOCK_SIZE_128P; + break; + case 256: + rzn1_nand->control |= CONTROL_BLOCK_SIZE_256P; + break; + default: + dev_err(nandc->dev, "Unsupported memory organization\n"); + return -EINVAL; + } + + chip->options |= NAND_SUBPAGE_READ; + + ret = rzn1_nandc_ecc_init(chip); + if (ret) { + dev_err(nandc->dev, "ECC initialization failed (%d)\n", ret); + return ret; + } + + /* Force an update of the configuration registers */ + rzn1_nand->selected_die = -1; + + return 0; +} + +static const struct nand_controller_ops rzn1_nandc_ops = { + .attach_chip = rzn1_nandc_attach_chip, + .exec_op = rzn1_nandc_exec_op, + .setup_interface = rzn1_nandc_setup_interface, +}; + +static int rzn1_nandc_alloc_dma_buf(struct rzn1_nandc *nandc, + struct mtd_info *new_mtd) +{ + unsigned int max_len = new_mtd->writesize + new_mtd->oobsize; + struct rzn1_nand_chip *entry, *temp; + struct nand_chip *chip; + struct mtd_info *mtd; + + list_for_each_entry_safe(entry, temp, &nandc->chips, node) { + chip = &entry->chip; + mtd = nand_to_mtd(chip); + max_len = max(max_len, mtd->writesize + mtd->oobsize); + } + + if (nandc->buf && nandc->buf_sz < max_len) { + devm_kfree(nandc->dev, nandc->buf); + nandc->buf = NULL; + } + + if (!nandc->buf) { + nandc->buf_sz = max_len; + nandc->buf = devm_kmalloc(nandc->dev, max_len, GFP_KERNEL | GFP_DMA); + if (!nandc->buf) + return -ENOMEM; + } + + return 0; +} + +static int rzn1_nandc_chip_init(struct rzn1_nandc *nandc, struct device_node *np) +{ + struct rzn1_nand_chip *rzn1_nand; + struct mtd_info *mtd; + struct nand_chip *chip; + int nsels, ret, i; + u32 cs; + + nsels = of_property_count_elems_of_size(np, "reg", sizeof(u32)); + if (nsels <= 0) { + ret = (nsels < 0) ? nsels : -EINVAL; + dev_err(nandc->dev, "Invalid reg property (%d)\n", ret); + return ret; + } + + /* Alloc the driver's NAND chip structure */ + rzn1_nand = devm_kzalloc(nandc->dev, struct_size(rzn1_nand, sels, nsels), + GFP_KERNEL); + if (!rzn1_nand) + return -ENOMEM; + + rzn1_nand->nsels = nsels; + rzn1_nand->selected_die = -1; + + for (i = 0; i < nsels; i++) { + ret = of_property_read_u32_index(np, "reg", i, &cs); + if (ret) { + dev_err(nandc->dev, "Incomplete reg property (%d)\n", ret); + return ret; + } + + if (cs >= RZN1_CS_NUM) { + dev_err(nandc->dev, "Invalid reg property (%d)\n", cs); + return -EINVAL; + } + + if (test_and_set_bit(cs, &nandc->assigned_cs)) { + dev_err(nandc->dev, "CS %d already assigned\n", cs); + return -EINVAL; + } + + /* + * No need to check for RB or WP properties, there is a 1:1 + * mandatory mapping with the CS. + */ + rzn1_nand->sels[i].cs = cs; + } + + chip = &rzn1_nand->chip; + chip->controller = &nandc->controller; + nand_set_flash_node(chip, np); + + mtd = nand_to_mtd(chip); + mtd->dev.parent = nandc->dev; + if (!mtd->name) { + dev_err(nandc->dev, "Missing MTD label\n"); + return -EINVAL; + } + + ret = nand_scan(chip, rzn1_nand->nsels); + if (ret) { + dev_err(nandc->dev, "Failed to scan the NAND chip (%d)\n", ret); + return ret; + } + + ret = rzn1_nandc_alloc_dma_buf(nandc, mtd); + if (ret) + goto cleanup_nand; + + ret = mtd_device_register(mtd, NULL, 0); + if (ret) { + dev_err(nandc->dev, "Failed to register MTD device (%d)\n", ret); + goto cleanup_nand; + } + + list_add_tail(&rzn1_nand->node, &nandc->chips); + + return 0; + +cleanup_nand: + nand_cleanup(chip); + + return ret; +} + +static void rzn1_nandc_chips_cleanup(struct rzn1_nandc *nandc) +{ + struct rzn1_nand_chip *entry, *temp; + struct nand_chip *chip; + int ret; + + list_for_each_entry_safe(entry, temp, &nandc->chips, node) { + chip = &entry->chip; + ret = mtd_device_unregister(nand_to_mtd(chip)); + WARN_ON(ret); + nand_cleanup(chip); + list_del(&entry->node); + } +} + +static int rzn1_nandc_chips_init(struct rzn1_nandc *nandc) +{ + struct device_node *np; + int ret; + + for_each_child_of_node(nandc->dev->of_node, np) { + ret = rzn1_nandc_chip_init(nandc, np); + if (ret) { + of_node_put(np); + goto cleanup_chips; + } + } + + return 0; + +cleanup_chips: + rzn1_nandc_chips_cleanup(nandc); + + return ret; +} + +static int rzn1_nandc_probe(struct platform_device *pdev) +{ + struct rzn1_nandc *nandc; + int irq, ret; + + nandc = devm_kzalloc(&pdev->dev, sizeof(*nandc), GFP_KERNEL); + if (!nandc) + return -ENOMEM; + + nandc->dev = &pdev->dev; + nand_controller_init(&nandc->controller); + nandc->controller.ops = &rzn1_nandc_ops; + INIT_LIST_HEAD(&nandc->chips); + init_completion(&nandc->complete); + + nandc->regs = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(nandc->regs)) + return PTR_ERR(nandc->regs); + + /* APB clock */ + nandc->hclk = devm_clk_get(&pdev->dev, "hclk"); + if (IS_ERR(nandc->hclk)) + return PTR_ERR(nandc->hclk); + + /* External NAND bus clock */ + nandc->eclk = devm_clk_get(&pdev->dev, "eclk"); + if (IS_ERR(nandc->eclk)) + return PTR_ERR(nandc->eclk); + + ret = clk_prepare_enable(nandc->hclk); + if (ret) + return ret; + + ret = clk_prepare_enable(nandc->eclk); + if (ret) + goto disable_hclk; + + rzn1_nandc_dis_interrupts(nandc); + irq = platform_get_irq_optional(pdev, 0); + if (irq == -EPROBE_DEFER) { + ret = irq; + goto disable_eclk; + } else if (irq < 0) { + dev_info(&pdev->dev, "No IRQ found, fallback to polling\n"); + nandc->use_polling = true; + } else { + ret = devm_request_irq(&pdev->dev, irq, rzn1_nandc_irq_handler, 0, + "rzn1-nand-controller", nandc); + if (ret < 0) + goto disable_eclk; + } + + ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); + if (ret) + goto disable_eclk; + + rzn1_nandc_clear_fifo(nandc); + + platform_set_drvdata(pdev, nandc); + + ret = rzn1_nandc_chips_init(nandc); + if (ret) + goto disable_eclk; + + return 0; + +disable_eclk: + clk_disable_unprepare(nandc->eclk); +disable_hclk: + clk_disable_unprepare(nandc->hclk); + + return ret; +} + +static int rzn1_nandc_remove(struct platform_device *pdev) +{ + struct rzn1_nandc *nandc = platform_get_drvdata(pdev); + + rzn1_nandc_chips_cleanup(nandc); + + clk_disable_unprepare(nandc->eclk); + clk_disable_unprepare(nandc->hclk); + + return 0; +} + +static const struct of_device_id rzn1_nandc_id_table[] = { + { .compatible = "renesas,rzn1-nand-controller" }, + {} /* sentinel */ +}; +MODULE_DEVICE_TABLE(of, nandc_id_table); + +static struct platform_driver rzn1_nandc_driver = { + .driver = { + .name = "renesas-nandc", + .of_match_table = of_match_ptr(rzn1_nandc_id_table), + }, + .probe = rzn1_nandc_probe, + .remove = rzn1_nandc_remove, +}; +module_platform_driver(rzn1_nandc_driver); + +MODULE_AUTHOR("Miquel Raynal <miquel.raynal@bootlin.com>"); +MODULE_DESCRIPTION("Renesas RZ/N1x NAND flash controller driver"); +MODULE_LICENSE("GPL"); -- 2.27.0 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* Re: [PATCH v4 2/4] mtd: rawnand: rzn1: Add new NAND controller driver 2021-12-15 15:46 ` Miquel Raynal (?) @ 2021-12-15 20:35 ` kernel test robot -1 siblings, 0 replies; 123+ messages in thread From: kernel test robot @ 2021-12-15 20:35 UTC (permalink / raw) To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: kbuild-all, linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy Hi Miquel, I love your patch! Yet something to improve: [auto build test ERROR on mtd/nand/next] [also build test ERROR on geert-renesas-devel/next mtd/mtd/next mtd/mtd/fixes linus/master v5.16-rc5 next-20211214] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Miquel-Raynal/Renesas-RZ-N1-NAND-controller-support/20211215-234825 base: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20211216/202112160417.TvfPZeKJ-lkp@intel.com/config) compiler: sh4-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/4899a382aebedd2033aba1a8c662767c86c8d74d git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Miquel-Raynal/Renesas-RZ-N1-NAND-controller-support/20211215-234825 git checkout 4899a382aebedd2033aba1a8c662767c86c8d74d # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/mtd/nand/raw/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): In file included from drivers/mtd/nand/raw/rzn1-nand-controller.c:14: >> drivers/mtd/nand/raw/rzn1-nand-controller.c:1408:25: error: 'nandc_id_table' undeclared here (not in a function); did you mean 'rzn1_nandc_id_table'? 1408 | MODULE_DEVICE_TABLE(of, nandc_id_table); | ^~~~~~~~~~~~~~ include/linux/module.h:244:15: note: in definition of macro 'MODULE_DEVICE_TABLE' 244 | extern typeof(name) __mod_##type##__##name##_device_table \ | ^~~~ >> include/linux/module.h:244:21: error: '__mod_of__nandc_id_table_device_table' aliased to undefined symbol 'nandc_id_table' 244 | extern typeof(name) __mod_##type##__##name##_device_table \ | ^~~~~~ drivers/mtd/nand/raw/rzn1-nand-controller.c:1408:1: note: in expansion of macro 'MODULE_DEVICE_TABLE' 1408 | MODULE_DEVICE_TABLE(of, nandc_id_table); | ^~~~~~~~~~~~~~~~~~~ vim +1408 drivers/mtd/nand/raw/rzn1-nand-controller.c 1403 1404 static const struct of_device_id rzn1_nandc_id_table[] = { 1405 { .compatible = "renesas,rzn1-nand-controller" }, 1406 {} /* sentinel */ 1407 }; > 1408 MODULE_DEVICE_TABLE(of, nandc_id_table); 1409 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 2/4] mtd: rawnand: rzn1: Add new NAND controller driver @ 2021-12-15 20:35 ` kernel test robot 0 siblings, 0 replies; 123+ messages in thread From: kernel test robot @ 2021-12-15 20:35 UTC (permalink / raw) To: kbuild-all [-- Attachment #1: Type: text/plain, Size: 3033 bytes --] Hi Miquel, I love your patch! Yet something to improve: [auto build test ERROR on mtd/nand/next] [also build test ERROR on geert-renesas-devel/next mtd/mtd/next mtd/mtd/fixes linus/master v5.16-rc5 next-20211214] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Miquel-Raynal/Renesas-RZ-N1-NAND-controller-support/20211215-234825 base: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20211216/202112160417.TvfPZeKJ-lkp(a)intel.com/config) compiler: sh4-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/4899a382aebedd2033aba1a8c662767c86c8d74d git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Miquel-Raynal/Renesas-RZ-N1-NAND-controller-support/20211215-234825 git checkout 4899a382aebedd2033aba1a8c662767c86c8d74d # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/mtd/nand/raw/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): In file included from drivers/mtd/nand/raw/rzn1-nand-controller.c:14: >> drivers/mtd/nand/raw/rzn1-nand-controller.c:1408:25: error: 'nandc_id_table' undeclared here (not in a function); did you mean 'rzn1_nandc_id_table'? 1408 | MODULE_DEVICE_TABLE(of, nandc_id_table); | ^~~~~~~~~~~~~~ include/linux/module.h:244:15: note: in definition of macro 'MODULE_DEVICE_TABLE' 244 | extern typeof(name) __mod_##type##__##name##_device_table \ | ^~~~ >> include/linux/module.h:244:21: error: '__mod_of__nandc_id_table_device_table' aliased to undefined symbol 'nandc_id_table' 244 | extern typeof(name) __mod_##type##__##name##_device_table \ | ^~~~~~ drivers/mtd/nand/raw/rzn1-nand-controller.c:1408:1: note: in expansion of macro 'MODULE_DEVICE_TABLE' 1408 | MODULE_DEVICE_TABLE(of, nandc_id_table); | ^~~~~~~~~~~~~~~~~~~ vim +1408 drivers/mtd/nand/raw/rzn1-nand-controller.c 1403 1404 static const struct of_device_id rzn1_nandc_id_table[] = { 1405 { .compatible = "renesas,rzn1-nand-controller" }, 1406 {} /* sentinel */ 1407 }; > 1408 MODULE_DEVICE_TABLE(of, nandc_id_table); 1409 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 2/4] mtd: rawnand: rzn1: Add new NAND controller driver @ 2021-12-15 20:35 ` kernel test robot 0 siblings, 0 replies; 123+ messages in thread From: kernel test robot @ 2021-12-15 20:35 UTC (permalink / raw) To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: kbuild-all, linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy Hi Miquel, I love your patch! Yet something to improve: [auto build test ERROR on mtd/nand/next] [also build test ERROR on geert-renesas-devel/next mtd/mtd/next mtd/mtd/fixes linus/master v5.16-rc5 next-20211214] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Miquel-Raynal/Renesas-RZ-N1-NAND-controller-support/20211215-234825 base: https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20211216/202112160417.TvfPZeKJ-lkp@intel.com/config) compiler: sh4-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/4899a382aebedd2033aba1a8c662767c86c8d74d git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Miquel-Raynal/Renesas-RZ-N1-NAND-controller-support/20211215-234825 git checkout 4899a382aebedd2033aba1a8c662767c86c8d74d # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/mtd/nand/raw/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): In file included from drivers/mtd/nand/raw/rzn1-nand-controller.c:14: >> drivers/mtd/nand/raw/rzn1-nand-controller.c:1408:25: error: 'nandc_id_table' undeclared here (not in a function); did you mean 'rzn1_nandc_id_table'? 1408 | MODULE_DEVICE_TABLE(of, nandc_id_table); | ^~~~~~~~~~~~~~ include/linux/module.h:244:15: note: in definition of macro 'MODULE_DEVICE_TABLE' 244 | extern typeof(name) __mod_##type##__##name##_device_table \ | ^~~~ >> include/linux/module.h:244:21: error: '__mod_of__nandc_id_table_device_table' aliased to undefined symbol 'nandc_id_table' 244 | extern typeof(name) __mod_##type##__##name##_device_table \ | ^~~~~~ drivers/mtd/nand/raw/rzn1-nand-controller.c:1408:1: note: in expansion of macro 'MODULE_DEVICE_TABLE' 1408 | MODULE_DEVICE_TABLE(of, nandc_id_table); | ^~~~~~~~~~~~~~~~~~~ vim +1408 drivers/mtd/nand/raw/rzn1-nand-controller.c 1403 1404 static const struct of_device_id rzn1_nandc_id_table[] = { 1405 { .compatible = "renesas,rzn1-nand-controller" }, 1406 {} /* sentinel */ 1407 }; > 1408 MODULE_DEVICE_TABLE(of, nandc_id_table); 1409 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v4 3/4] MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller 2021-12-15 15:46 ` Miquel Raynal @ 2021-12-15 15:46 ` Miquel Raynal -1 siblings, 0 replies; 123+ messages in thread From: Miquel Raynal @ 2021-12-15 15:46 UTC (permalink / raw) To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, devicetree, Miquel Raynal Point to the driver and the bindings. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 43007f2d29e0..48be4107d05e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16287,6 +16287,13 @@ S: Supported F: Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml F: drivers/iio/adc/rzg2l_adc.c +RENESAS RZ/N1X NAND CONTROLLER DRIVER +M: Miquel Raynal <miquel.raynal@bootlin.com> +L: linux-mtd@lists.infradead.org +S: Maintained +F: Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml +F: drivers/mtd/nand/raw/rzn1-nand-controller.c + RESET CONTROLLER FRAMEWORK M: Philipp Zabel <p.zabel@pengutronix.de> S: Maintained -- 2.27.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v4 3/4] MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Miquel Raynal @ 2021-12-15 15:46 UTC (permalink / raw) To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, devicetree, Miquel Raynal Point to the driver and the bindings. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 43007f2d29e0..48be4107d05e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16287,6 +16287,13 @@ S: Supported F: Documentation/devicetree/bindings/iio/adc/renesas,rzg2l-adc.yaml F: drivers/iio/adc/rzg2l_adc.c +RENESAS RZ/N1X NAND CONTROLLER DRIVER +M: Miquel Raynal <miquel.raynal@bootlin.com> +L: linux-mtd@lists.infradead.org +S: Maintained +F: Documentation/devicetree/bindings/mtd/renesas,rzn1-nand-controller.yaml +F: drivers/mtd/nand/raw/rzn1-nand-controller.c + RESET CONTROLLER FRAMEWORK M: Philipp Zabel <p.zabel@pengutronix.de> S: Maintained -- 2.27.0 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v4 4/4] ARM: dts: r9a06g032: Describe NAND controller 2021-12-15 15:46 ` Miquel Raynal @ 2021-12-15 15:46 ` Miquel Raynal -1 siblings, 0 replies; 123+ messages in thread From: Miquel Raynal @ 2021-12-15 15:46 UTC (permalink / raw) To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, devicetree, Miquel Raynal Describe the NAND controller contained in r9a06g032 SoCs. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- arch/arm/boot/dts/r9a06g032.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/r9a06g032.dtsi b/arch/arm/boot/dts/r9a06g032.dtsi index c47896e4ab58..0df5687273c1 100644 --- a/arch/arm/boot/dts/r9a06g032.dtsi +++ b/arch/arm/boot/dts/r9a06g032.dtsi @@ -173,6 +173,18 @@ pinctrl: pinctrl@40067000 { status = "okay"; }; + nand_controller: nand-controller@40102000 { + compatible = "renesas,r9a06g032-nand-controller", + "renesas,rzn1-nand-controller"; + reg = <0x40102000 0x2000>; + interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sysctrl R9A06G032_HCLK_NAND>, <&sysctrl R9A06G032_CLK_NAND>; + clock-names = "hclk", "eclk"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + gic: interrupt-controller@44101000 { compatible = "arm,gic-400", "arm,cortex-a7-gic"; interrupt-controller; -- 2.27.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v4 4/4] ARM: dts: r9a06g032: Describe NAND controller @ 2021-12-15 15:46 ` Miquel Raynal 0 siblings, 0 replies; 123+ messages in thread From: Miquel Raynal @ 2021-12-15 15:46 UTC (permalink / raw) To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd Cc: linux-renesas-soc, Magnus Damm, Gareth Williams, Phil Edworthy, Geert Uytterhoeven, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, devicetree, Miquel Raynal Describe the NAND controller contained in r9a06g032 SoCs. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- arch/arm/boot/dts/r9a06g032.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/r9a06g032.dtsi b/arch/arm/boot/dts/r9a06g032.dtsi index c47896e4ab58..0df5687273c1 100644 --- a/arch/arm/boot/dts/r9a06g032.dtsi +++ b/arch/arm/boot/dts/r9a06g032.dtsi @@ -173,6 +173,18 @@ pinctrl: pinctrl@40067000 { status = "okay"; }; + nand_controller: nand-controller@40102000 { + compatible = "renesas,r9a06g032-nand-controller", + "renesas,rzn1-nand-controller"; + reg = <0x40102000 0x2000>; + interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&sysctrl R9A06G032_HCLK_NAND>, <&sysctrl R9A06G032_CLK_NAND>; + clock-names = "hclk", "eclk"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + gic: interrupt-controller@44101000 { compatible = "arm,gic-400", "arm,cortex-a7-gic"; interrupt-controller; -- 2.27.0 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* Re: [PATCH v4 4/4] ARM: dts: r9a06g032: Describe NAND controller 2021-12-15 15:46 ` Miquel Raynal @ 2021-12-16 9:13 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 9:13 UTC (permalink / raw) To: Miquel Raynal Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS On Wed, Dec 15, 2021 at 4:46 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote: > Describe the NAND controller contained in r9a06g032 SoCs. > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> i.e. will queue in renesas-devel once the bindings have been accepted in linux-next. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 4/4] ARM: dts: r9a06g032: Describe NAND controller @ 2021-12-16 9:13 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 9:13 UTC (permalink / raw) To: Miquel Raynal Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande, Rob Herring, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS On Wed, Dec 15, 2021 at 4:46 PM Miquel Raynal <miquel.raynal@bootlin.com> wrote: > Describe the NAND controller contained in r9a06g032 SoCs. > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> i.e. will queue in renesas-devel once the bindings have been accepted in linux-next. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 0/4] Renesas RZ/N1 NAND controller support 2021-12-15 15:46 ` Miquel Raynal (?) @ 2021-12-16 13:47 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:47 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Miquel Raynal, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande On Thu, Dec 16, 2021 at 2:37 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Miquel Raynal <miquel.raynal@bootlin.com> > > Hello, > > Here is a short series bringing support for Renesas RZ/N1 NAND > controller. Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-16 13:47 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:47 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Miquel Raynal, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande On Thu, Dec 16, 2021 at 2:37 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Miquel Raynal <miquel.raynal@bootlin.com> > > Hello, > > Here is a short series bringing support for Renesas RZ/N1 NAND > controller. Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-16 13:47 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:47 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, Miquel Raynal, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande On Thu, Dec 16, 2021 at 2:37 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Miquel Raynal <miquel.raynal@bootlin.com> > > Hello, > > Here is a short series bringing support for Renesas RZ/N1 NAND > controller. Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 0/4] Renesas RZ/N1 NAND controller support 2021-12-15 15:46 ` Miquel Raynal (?) @ 2021-12-16 13:48 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:48 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List Cc: Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv, Miquel Raynal, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande On Thu, Dec 16, 2021 at 2:41 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Miquel Raynal <miquel.raynal@bootlin.com> > > Hello, > > Here is a short series bringing support for Renesas RZ/N1 NAND > controller. Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-16 13:48 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:48 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List Cc: Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv, Miquel Raynal, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande On Thu, Dec 16, 2021 at 2:41 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Miquel Raynal <miquel.raynal@bootlin.com> > > Hello, > > Here is a short series bringing support for Renesas RZ/N1 NAND > controller. Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-16 13:48 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:48 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List Cc: Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv, Miquel Raynal, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande On Thu, Dec 16, 2021 at 2:41 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > From: Miquel Raynal <miquel.raynal@bootlin.com> > > Hello, > > Here is a short series bringing support for Renesas RZ/N1 NAND > controller. Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 0/4] Renesas RZ/N1 NAND controller support 2021-12-15 15:46 ` Miquel Raynal (?) @ 2021-12-16 13:48 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:48 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List Cc: Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv, Miquel Raynal, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande On Thu, Dec 16, 2021 at 2:44 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > From: Miquel Raynal <miquel.raynal@bootlin.com> > > Hello, > > Here is a short series bringing support for Renesas RZ/N1 NAND > controller. Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-16 13:48 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:48 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List Cc: Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv, Miquel Raynal, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande On Thu, Dec 16, 2021 at 2:44 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > From: Miquel Raynal <miquel.raynal@bootlin.com> > > Hello, > > Here is a short series bringing support for Renesas RZ/N1 NAND > controller. Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v4 0/4] Renesas RZ/N1 NAND controller support @ 2021-12-16 13:48 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:48 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel, Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus, Pratyush Yadav, Michael Walle, MTD Maling List Cc: Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv, Miquel Raynal, Linux-Renesas, Magnus Damm, Gareth Williams, Phil Edworthy, Thomas Petazzoni, Milan Stevanovic, Jimmy Lalande On Thu, Dec 16, 2021 at 2:44 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > From: Miquel Raynal <miquel.raynal@bootlin.com> > > Hello, > > Here is a short series bringing support for Renesas RZ/N1 NAND > controller. Oops, please ignore this email. Sorry for the noise. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 01/11] riscv: dts: canaan: Fix SPI FLASH node names 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven, Damien Le Moal "make dtbs_check": arch/riscv/boot/dts/canaan/sipeed_maix_bit.dt.yaml: spi-flash@0: $nodename:0: 'spi-flash@0' does not match '^flash(@.*)?$' From schema: Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml Fix this by renaming all SPI FLASH nodes to "flash". Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> --- v2: - Add Reviewed-by, Tested-by. --- arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maix_go.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maixduino.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts index 0bcaf35045e795ed..984872f3d3a9b9ea 100644 --- a/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts +++ b/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts @@ -199,7 +199,7 @@ slot@0 { }; &spi3 { - spi-flash@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts index ac8a03f5867adbd0..7ba99b4da304218e 100644 --- a/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts +++ b/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts @@ -201,7 +201,7 @@ slot@0 { }; &spi3 { - spi-flash@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts index 623998194bc18aab..be9b12c9b374acb3 100644 --- a/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts +++ b/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts @@ -209,7 +209,7 @@ slot@0 { }; &spi3 { - spi-flash@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; diff --git a/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts b/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts index cf605ba0d67e43cd..031c0c28f8195777 100644 --- a/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts +++ b/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts @@ -174,7 +174,7 @@ slot@0 { }; &spi3 { - spi-flash@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 01/11] riscv: dts: canaan: Fix SPI FLASH node names @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven, Damien Le Moal "make dtbs_check": arch/riscv/boot/dts/canaan/sipeed_maix_bit.dt.yaml: spi-flash@0: $nodename:0: 'spi-flash@0' does not match '^flash(@.*)?$' From schema: Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml Fix this by renaming all SPI FLASH nodes to "flash". Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> --- v2: - Add Reviewed-by, Tested-by. --- arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maix_go.dts | 2 +- arch/riscv/boot/dts/canaan/sipeed_maixduino.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts index 0bcaf35045e795ed..984872f3d3a9b9ea 100644 --- a/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts +++ b/arch/riscv/boot/dts/canaan/sipeed_maix_bit.dts @@ -199,7 +199,7 @@ slot@0 { }; &spi3 { - spi-flash@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts index ac8a03f5867adbd0..7ba99b4da304218e 100644 --- a/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts +++ b/arch/riscv/boot/dts/canaan/sipeed_maix_dock.dts @@ -201,7 +201,7 @@ slot@0 { }; &spi3 { - spi-flash@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; diff --git a/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts b/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts index 623998194bc18aab..be9b12c9b374acb3 100644 --- a/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts +++ b/arch/riscv/boot/dts/canaan/sipeed_maix_go.dts @@ -209,7 +209,7 @@ slot@0 { }; &spi3 { - spi-flash@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; diff --git a/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts b/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts index cf605ba0d67e43cd..031c0c28f8195777 100644 --- a/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts +++ b/arch/riscv/boot/dts/canaan/sipeed_maixduino.dts @@ -174,7 +174,7 @@ slot@0 { }; &spi3 { - spi-flash@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 02/11] riscv: dts: canaan: Group tuples in interrupt properties 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven, Damien Le Moal To improve human readability and enable automatic validation, the tuples in the various properties containing interrupt specifiers should be grouped. Fix this by grouping the tuples of "interrupts" and "interrupts-extended" properties using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> --- v2: - Add Reviewed-by, Tested-by. --- arch/riscv/boot/dts/canaan/k210.dtsi | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi index 5e8ca8142482153b..56f57118c633b91a 100644 --- a/arch/riscv/boot/dts/canaan/k210.dtsi +++ b/arch/riscv/boot/dts/canaan/k210.dtsi @@ -103,8 +103,8 @@ rom0: nvmem@1000 { clint0: timer@2000000 { compatible = "canaan,k210-clint", "sifive,clint0"; reg = <0x2000000 0xC000>; - interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7 - &cpu1_intc 3 &cpu1_intc 7>; + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, + <&cpu1_intc 3>, <&cpu1_intc 7>; }; plic0: interrupt-controller@c000000 { @@ -113,7 +113,7 @@ plic0: interrupt-controller@c000000 { compatible = "canaan,k210-plic", "sifive,plic-1.0.0"; reg = <0xC000000 0x4000000>; interrupt-controller; - interrupts-extended = <&cpu0_intc 11 &cpu1_intc 11>; + interrupts-extended = <&cpu0_intc 11>, <&cpu1_intc 11>; riscv,ndev = <65>; }; @@ -130,10 +130,11 @@ gpio0: gpio-controller@38001000 { compatible = "canaan,k210-gpiohs", "sifive,gpio0"; reg = <0x38001000 0x1000>; interrupt-controller; - interrupts = <34 35 36 37 38 39 40 41 - 42 43 44 45 46 47 48 49 - 50 51 52 53 54 55 56 57 - 58 59 60 61 62 63 64 65>; + interrupts = <34>, <35>, <36>, <37>, <38>, <39>, <40>, + <41>, <42>, <43>, <44>, <45>, <46>, <47>, + <48>, <49>, <50>, <51>, <52>, <53>, <54>, + <55>, <56>, <57>, <58>, <59>, <60>, <61>, + <62>, <63>, <64>, <65>; gpio-controller; ngpios = <32>; }; @@ -141,7 +142,7 @@ gpio0: gpio-controller@38001000 { dmac0: dma-controller@50000000 { compatible = "snps,axi-dma-1.01a"; reg = <0x50000000 0x1000>; - interrupts = <27 28 29 30 31 32>; + interrupts = <27>, <28>, <29>, <30>, <31>, <32>; #dma-cells = <1>; clocks = <&sysclk K210_CLK_DMA>, <&sysclk K210_CLK_DMA>; clock-names = "core-clk", "cfgr-clk"; @@ -316,7 +317,7 @@ fpioa: pinmux@502b0000 { timer0: timer@502d0000 { compatible = "snps,dw-apb-timer"; reg = <0x502D0000 0x100>; - interrupts = <14 15>; + interrupts = <14>, <15>; clocks = <&sysclk K210_CLK_TIMER0>, <&sysclk K210_CLK_APB0>; clock-names = "timer", "pclk"; @@ -326,7 +327,7 @@ timer0: timer@502d0000 { timer1: timer@502e0000 { compatible = "snps,dw-apb-timer"; reg = <0x502E0000 0x100>; - interrupts = <16 17>; + interrupts = <16>, <17>; clocks = <&sysclk K210_CLK_TIMER1>, <&sysclk K210_CLK_APB0>; clock-names = "timer", "pclk"; @@ -336,7 +337,7 @@ timer1: timer@502e0000 { timer2: timer@502f0000 { compatible = "snps,dw-apb-timer"; reg = <0x502F0000 0x100>; - interrupts = <18 19>; + interrupts = <18>, <19>; clocks = <&sysclk K210_CLK_TIMER2>, <&sysclk K210_CLK_APB0>; clock-names = "timer", "pclk"; -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 02/11] riscv: dts: canaan: Group tuples in interrupt properties @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven, Damien Le Moal To improve human readability and enable automatic validation, the tuples in the various properties containing interrupt specifiers should be grouped. Fix this by grouping the tuples of "interrupts" and "interrupts-extended" properties using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> --- v2: - Add Reviewed-by, Tested-by. --- arch/riscv/boot/dts/canaan/k210.dtsi | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi index 5e8ca8142482153b..56f57118c633b91a 100644 --- a/arch/riscv/boot/dts/canaan/k210.dtsi +++ b/arch/riscv/boot/dts/canaan/k210.dtsi @@ -103,8 +103,8 @@ rom0: nvmem@1000 { clint0: timer@2000000 { compatible = "canaan,k210-clint", "sifive,clint0"; reg = <0x2000000 0xC000>; - interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7 - &cpu1_intc 3 &cpu1_intc 7>; + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, + <&cpu1_intc 3>, <&cpu1_intc 7>; }; plic0: interrupt-controller@c000000 { @@ -113,7 +113,7 @@ plic0: interrupt-controller@c000000 { compatible = "canaan,k210-plic", "sifive,plic-1.0.0"; reg = <0xC000000 0x4000000>; interrupt-controller; - interrupts-extended = <&cpu0_intc 11 &cpu1_intc 11>; + interrupts-extended = <&cpu0_intc 11>, <&cpu1_intc 11>; riscv,ndev = <65>; }; @@ -130,10 +130,11 @@ gpio0: gpio-controller@38001000 { compatible = "canaan,k210-gpiohs", "sifive,gpio0"; reg = <0x38001000 0x1000>; interrupt-controller; - interrupts = <34 35 36 37 38 39 40 41 - 42 43 44 45 46 47 48 49 - 50 51 52 53 54 55 56 57 - 58 59 60 61 62 63 64 65>; + interrupts = <34>, <35>, <36>, <37>, <38>, <39>, <40>, + <41>, <42>, <43>, <44>, <45>, <46>, <47>, + <48>, <49>, <50>, <51>, <52>, <53>, <54>, + <55>, <56>, <57>, <58>, <59>, <60>, <61>, + <62>, <63>, <64>, <65>; gpio-controller; ngpios = <32>; }; @@ -141,7 +142,7 @@ gpio0: gpio-controller@38001000 { dmac0: dma-controller@50000000 { compatible = "snps,axi-dma-1.01a"; reg = <0x50000000 0x1000>; - interrupts = <27 28 29 30 31 32>; + interrupts = <27>, <28>, <29>, <30>, <31>, <32>; #dma-cells = <1>; clocks = <&sysclk K210_CLK_DMA>, <&sysclk K210_CLK_DMA>; clock-names = "core-clk", "cfgr-clk"; @@ -316,7 +317,7 @@ fpioa: pinmux@502b0000 { timer0: timer@502d0000 { compatible = "snps,dw-apb-timer"; reg = <0x502D0000 0x100>; - interrupts = <14 15>; + interrupts = <14>, <15>; clocks = <&sysclk K210_CLK_TIMER0>, <&sysclk K210_CLK_APB0>; clock-names = "timer", "pclk"; @@ -326,7 +327,7 @@ timer0: timer@502d0000 { timer1: timer@502e0000 { compatible = "snps,dw-apb-timer"; reg = <0x502E0000 0x100>; - interrupts = <16 17>; + interrupts = <16>, <17>; clocks = <&sysclk K210_CLK_TIMER1>, <&sysclk K210_CLK_APB0>; clock-names = "timer", "pclk"; @@ -336,7 +337,7 @@ timer1: timer@502e0000 { timer2: timer@502f0000 { compatible = "snps,dw-apb-timer"; reg = <0x502F0000 0x100>; - interrupts = <18 19>; + interrupts = <18>, <19>; clocks = <&sysclk K210_CLK_TIMER2>, <&sysclk K210_CLK_APB0>; clock-names = "timer", "pclk"; -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 03/11] riscv: dts: microchip: mpfs: Drop empty chosen node 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven It does not make sense to have an (empty) chosen node in an SoC-specific .dtsi, as chosen is meant for system-specific configuration. It is already provided in microchip-mpfs-icicle-kit.dts anyway. Fixes: 0fa6107eca4186ad ("RISC-V: Initial DTS for Microchip ICICLE board") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> --- v2: - Add Reviewed-by. --- arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi index c9f6d205d2ba1a5e..794da883acb19256 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi @@ -9,9 +9,6 @@ / { model = "Microchip PolarFire SoC"; compatible = "microchip,mpfs"; - chosen { - }; - cpus { #address-cells = <1>; #size-cells = <0>; -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 03/11] riscv: dts: microchip: mpfs: Drop empty chosen node @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven It does not make sense to have an (empty) chosen node in an SoC-specific .dtsi, as chosen is meant for system-specific configuration. It is already provided in microchip-mpfs-icicle-kit.dts anyway. Fixes: 0fa6107eca4186ad ("RISC-V: Initial DTS for Microchip ICICLE board") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> --- v2: - Add Reviewed-by. --- arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi index c9f6d205d2ba1a5e..794da883acb19256 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi @@ -9,9 +9,6 @@ / { model = "Microchip PolarFire SoC"; compatible = "microchip,mpfs"; - chosen { - }; - cpus { #address-cells = <1>; #size-cells = <0>; -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 04/11] riscv: dts: microchip: mpfs: Fix PLIC node 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven Fix the device node for the Platform-Level Interrupt Controller (PLIC): - Add missing "#address-cells" property, - Sort properties according to DT bindings. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> --- v2: - Add Reviewed-by. --- arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi index 794da883acb19256..ee59751544a0d3bc 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi @@ -168,16 +168,17 @@ &cpu3_intc 3 &cpu3_intc 7 }; plic: interrupt-controller@c000000 { - #interrupt-cells = <1>; compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0"; reg = <0x0 0xc000000 0x0 0x4000000>; - riscv,ndev = <186>; + #address-cells = <0>; + #interrupt-cells = <1>; interrupt-controller; interrupts-extended = <&cpu0_intc 11 &cpu1_intc 11 &cpu1_intc 9 &cpu2_intc 11 &cpu2_intc 9 &cpu3_intc 11 &cpu3_intc 9 &cpu4_intc 11 &cpu4_intc 9>; + riscv,ndev = <186>; }; dma@3000000 { -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 04/11] riscv: dts: microchip: mpfs: Fix PLIC node @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven Fix the device node for the Platform-Level Interrupt Controller (PLIC): - Add missing "#address-cells" property, - Sort properties according to DT bindings. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> --- v2: - Add Reviewed-by. --- arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi index 794da883acb19256..ee59751544a0d3bc 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi @@ -168,16 +168,17 @@ &cpu3_intc 3 &cpu3_intc 7 }; plic: interrupt-controller@c000000 { - #interrupt-cells = <1>; compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0"; reg = <0x0 0xc000000 0x0 0x4000000>; - riscv,ndev = <186>; + #address-cells = <0>; + #interrupt-cells = <1>; interrupt-controller; interrupts-extended = <&cpu0_intc 11 &cpu1_intc 11 &cpu1_intc 9 &cpu2_intc 11 &cpu2_intc 9 &cpu3_intc 11 &cpu3_intc 9 &cpu4_intc 11 &cpu4_intc 9>; + riscv,ndev = <186>; }; dma@3000000 { -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 05/11] riscv: dts: microchip: mpfs: Fix reference clock node 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven "make dtbs_check" reports: arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dt.yaml: soc: refclk: {'compatible': ['fixed-clock'], '#clock-cells': [[0]], 'clock-frequency': [[600000000]], 'clock-output-names': ['msspllclk'], 'phandle': [[7]]} should not be valid under {'type': 'object'} From schema: dtschema/schemas/simple-bus.yaml Fix this by moving the node out of the "soc" subnode. While at it, rename it to "msspllclk", and drop the now superfluous "clock-output-names" property. Move the actual clock-frequency value to the board DTS, since it is not set until bitstream programming time. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- v2: - Add Acked-by, - Move clock-frequency to board DTS. --- .../boot/dts/microchip/microchip-mpfs-icicle-kit.dts | 4 ++++ arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 12 +++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts index fc1e5869df1b9fc5..0c748ae1b0068df7 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts @@ -35,6 +35,10 @@ memory@80000000 { }; }; +&refclk { + clock-frequency = <600000000>; +}; + &serial0 { status = "okay"; }; diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi index ee59751544a0d3bc..b372bc6459bf163a 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi @@ -139,6 +139,11 @@ cpu4_intc: interrupt-controller { }; }; + refclk: msspllclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + soc { #address-cells = <2>; #size-cells = <2>; @@ -189,13 +194,6 @@ dma@3000000 { #dma-cells = <1>; }; - refclk: refclk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <600000000>; - clock-output-names = "msspllclk"; - }; - clkcfg: clkcfg@20002000 { compatible = "microchip,mpfs-clkcfg"; reg = <0x0 0x20002000 0x0 0x1000>; -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 05/11] riscv: dts: microchip: mpfs: Fix reference clock node @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven "make dtbs_check" reports: arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dt.yaml: soc: refclk: {'compatible': ['fixed-clock'], '#clock-cells': [[0]], 'clock-frequency': [[600000000]], 'clock-output-names': ['msspllclk'], 'phandle': [[7]]} should not be valid under {'type': 'object'} From schema: dtschema/schemas/simple-bus.yaml Fix this by moving the node out of the "soc" subnode. While at it, rename it to "msspllclk", and drop the now superfluous "clock-output-names" property. Move the actual clock-frequency value to the board DTS, since it is not set until bitstream programming time. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- v2: - Add Acked-by, - Move clock-frequency to board DTS. --- .../boot/dts/microchip/microchip-mpfs-icicle-kit.dts | 4 ++++ arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 12 +++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts index fc1e5869df1b9fc5..0c748ae1b0068df7 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts @@ -35,6 +35,10 @@ memory@80000000 { }; }; +&refclk { + clock-frequency = <600000000>; +}; + &serial0 { status = "okay"; }; diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi index ee59751544a0d3bc..b372bc6459bf163a 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi @@ -139,6 +139,11 @@ cpu4_intc: interrupt-controller { }; }; + refclk: msspllclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + }; + soc { #address-cells = <2>; #size-cells = <2>; @@ -189,13 +194,6 @@ dma@3000000 { #dma-cells = <1>; }; - refclk: refclk { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <600000000>; - clock-output-names = "msspllclk"; - }; - clkcfg: clkcfg@20002000 { compatible = "microchip,mpfs-clkcfg"; reg = <0x0 0x20002000 0x0 0x1000>; -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* Re: [PATCH v2 05/11] riscv: dts: microchip: mpfs: Fix reference clock node 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 14:39 ` Conor.Dooley -1 siblings, 0 replies; 123+ messages in thread From: Conor.Dooley @ 2021-12-16 14:39 UTC (permalink / raw) To: geert, paul.walmsley, palmer, aou Cc: robh+dt, damien.lemoal, Lewis.Hanly, krzysztof.kozlowski, linux-riscv, devicetree On 16/12/2021 13:37, Geert Uytterhoeven wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > "make dtbs_check" reports: > > arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dt.yaml: soc: refclk: {'compatible': ['fixed-clock'], '#clock-cells': [[0]], 'clock-frequency': [[600000000]], 'clock-output-names': ['msspllclk'], 'phandle': [[7]]} should not be valid under {'type': 'object'} > From schema: dtschema/schemas/simple-bus.yaml > > Fix this by moving the node out of the "soc" subnode. > While at it, rename it to "msspllclk", and drop the now superfluous > "clock-output-names" property. > Move the actual clock-frequency value to the board DTS, since it is not > set until bitstream programming time. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Looks good to me. Reviewed-by: Conor Dooley <conor.dooley@microchip.com> > --- > v2: > - Add Acked-by, > - Move clock-frequency to board DTS. > --- > .../boot/dts/microchip/microchip-mpfs-icicle-kit.dts | 4 ++++ > arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 12 +++++------- > 2 files changed, 9 insertions(+), 7 deletions(-) > > diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts > index fc1e5869df1b9fc5..0c748ae1b0068df7 100644 > --- a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts > +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts > @@ -35,6 +35,10 @@ memory@80000000 { > }; > }; > > +&refclk { > + clock-frequency = <600000000>; > +}; > + > &serial0 { > status = "okay"; > }; > diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > index ee59751544a0d3bc..b372bc6459bf163a 100644 > --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > @@ -139,6 +139,11 @@ cpu4_intc: interrupt-controller { > }; > }; > > + refclk: msspllclk { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + }; > + > soc { > #address-cells = <2>; > #size-cells = <2>; > @@ -189,13 +194,6 @@ dma@3000000 { > #dma-cells = <1>; > }; > > - refclk: refclk { > - compatible = "fixed-clock"; > - #clock-cells = <0>; > - clock-frequency = <600000000>; > - clock-output-names = "msspllclk"; > - }; > - > clkcfg: clkcfg@20002000 { > compatible = "microchip,mpfs-clkcfg"; > reg = <0x0 0x20002000 0x0 0x1000>; > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 05/11] riscv: dts: microchip: mpfs: Fix reference clock node @ 2021-12-16 14:39 ` Conor.Dooley 0 siblings, 0 replies; 123+ messages in thread From: Conor.Dooley @ 2021-12-16 14:39 UTC (permalink / raw) To: geert, paul.walmsley, palmer, aou Cc: robh+dt, damien.lemoal, Lewis.Hanly, krzysztof.kozlowski, linux-riscv, devicetree On 16/12/2021 13:37, Geert Uytterhoeven wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > "make dtbs_check" reports: > > arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dt.yaml: soc: refclk: {'compatible': ['fixed-clock'], '#clock-cells': [[0]], 'clock-frequency': [[600000000]], 'clock-output-names': ['msspllclk'], 'phandle': [[7]]} should not be valid under {'type': 'object'} > From schema: dtschema/schemas/simple-bus.yaml > > Fix this by moving the node out of the "soc" subnode. > While at it, rename it to "msspllclk", and drop the now superfluous > "clock-output-names" property. > Move the actual clock-frequency value to the board DTS, since it is not > set until bitstream programming time. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Looks good to me. Reviewed-by: Conor Dooley <conor.dooley@microchip.com> > --- > v2: > - Add Acked-by, > - Move clock-frequency to board DTS. > --- > .../boot/dts/microchip/microchip-mpfs-icicle-kit.dts | 4 ++++ > arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 12 +++++------- > 2 files changed, 9 insertions(+), 7 deletions(-) > > diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts > index fc1e5869df1b9fc5..0c748ae1b0068df7 100644 > --- a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts > +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts > @@ -35,6 +35,10 @@ memory@80000000 { > }; > }; > > +&refclk { > + clock-frequency = <600000000>; > +}; > + > &serial0 { > status = "okay"; > }; > diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > index ee59751544a0d3bc..b372bc6459bf163a 100644 > --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > @@ -139,6 +139,11 @@ cpu4_intc: interrupt-controller { > }; > }; > > + refclk: msspllclk { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + }; > + > soc { > #address-cells = <2>; > #size-cells = <2>; > @@ -189,13 +194,6 @@ dma@3000000 { > #dma-cells = <1>; > }; > > - refclk: refclk { > - compatible = "fixed-clock"; > - #clock-cells = <0>; > - clock-frequency = <600000000>; > - clock-output-names = "msspllclk"; > - }; > - > clkcfg: clkcfg@20002000 { > compatible = "microchip,mpfs-clkcfg"; > reg = <0x0 0x20002000 0x0 0x1000>; > -- > 2.25.1 > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 06/11] riscv: dts: microchip: mpfs: Fix clock controller node 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven Fix the device node for the clock controller: - Remove bogus "reg-names" property, - Remove unneeded "clock-output-names" property. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - New. --- arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 9 --------- 1 file changed, 9 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi index b372bc6459bf163a..d9c1dee3fb25beb8 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi @@ -197,17 +197,8 @@ dma@3000000 { clkcfg: clkcfg@20002000 { compatible = "microchip,mpfs-clkcfg"; reg = <0x0 0x20002000 0x0 0x1000>; - reg-names = "mss_sysreg"; clocks = <&refclk>; #clock-cells = <1>; - clock-output-names = "cpu", "axi", "ahb", "envm", /* 0-3 */ - "mac0", "mac1", "mmc", "timer", /* 4-7 */ - "mmuart0", "mmuart1", "mmuart2", "mmuart3", /* 8-11 */ - "mmuart4", "spi0", "spi1", "i2c0", /* 12-15 */ - "i2c1", "can0", "can1", "usb", /* 16-19 */ - "rsvd", "rtc", "qspi", "gpio0", /* 20-23 */ - "gpio1", "gpio2", "ddrc", "fic0", /* 24-27 */ - "fic1", "fic2", "fic3", "athena", "cfm"; /* 28-32 */ }; serial0: serial@20000000 { -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 06/11] riscv: dts: microchip: mpfs: Fix clock controller node @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven Fix the device node for the clock controller: - Remove bogus "reg-names" property, - Remove unneeded "clock-output-names" property. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - New. --- arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 9 --------- 1 file changed, 9 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi index b372bc6459bf163a..d9c1dee3fb25beb8 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi @@ -197,17 +197,8 @@ dma@3000000 { clkcfg: clkcfg@20002000 { compatible = "microchip,mpfs-clkcfg"; reg = <0x0 0x20002000 0x0 0x1000>; - reg-names = "mss_sysreg"; clocks = <&refclk>; #clock-cells = <1>; - clock-output-names = "cpu", "axi", "ahb", "envm", /* 0-3 */ - "mac0", "mac1", "mmc", "timer", /* 4-7 */ - "mmuart0", "mmuart1", "mmuart2", "mmuart3", /* 8-11 */ - "mmuart4", "spi0", "spi1", "i2c0", /* 12-15 */ - "i2c1", "can0", "can1", "usb", /* 16-19 */ - "rsvd", "rtc", "qspi", "gpio0", /* 20-23 */ - "gpio1", "gpio2", "ddrc", "fic0", /* 24-27 */ - "fic1", "fic2", "fic3", "athena", "cfm"; /* 28-32 */ }; serial0: serial@20000000 { -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* Re: [PATCH v2 06/11] riscv: dts: microchip: mpfs: Fix clock controller node 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 14:47 ` Conor.Dooley -1 siblings, 0 replies; 123+ messages in thread From: Conor.Dooley @ 2021-12-16 14:47 UTC (permalink / raw) To: geert, paul.walmsley, palmer, aou Cc: robh+dt, damien.lemoal, Lewis.Hanly, krzysztof.kozlowski, linux-riscv, devicetree On 16/12/2021 13:37, Geert Uytterhoeven wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > Fix the device node for the clock controller: > - Remove bogus "reg-names" property, > - Remove unneeded "clock-output-names" property. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Ha, doing my job for me again - was hoping to send my v2 tomorrow too so good timing on your part. Reviewed-by: Conor Dooley <conor.dooley@microchip.com> (I have booted the 5 patches for the polarfire on my board, so Tested-by: Conor Dooley <conor.dooley@microchip.com> too?) > --- > v2: > - New. > --- > arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 9 --------- > 1 file changed, 9 deletions(-) > > diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > index b372bc6459bf163a..d9c1dee3fb25beb8 100644 > --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > @@ -197,17 +197,8 @@ dma@3000000 { > clkcfg: clkcfg@20002000 { > compatible = "microchip,mpfs-clkcfg"; > reg = <0x0 0x20002000 0x0 0x1000>; > - reg-names = "mss_sysreg"; > clocks = <&refclk>; > #clock-cells = <1>; > - clock-output-names = "cpu", "axi", "ahb", "envm", /* 0-3 */ > - "mac0", "mac1", "mmc", "timer", /* 4-7 */ > - "mmuart0", "mmuart1", "mmuart2", "mmuart3", /* 8-11 */ > - "mmuart4", "spi0", "spi1", "i2c0", /* 12-15 */ > - "i2c1", "can0", "can1", "usb", /* 16-19 */ > - "rsvd", "rtc", "qspi", "gpio0", /* 20-23 */ > - "gpio1", "gpio2", "ddrc", "fic0", /* 24-27 */ > - "fic1", "fic2", "fic3", "athena", "cfm"; /* 28-32 */ > }; > > serial0: serial@20000000 { > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 06/11] riscv: dts: microchip: mpfs: Fix clock controller node @ 2021-12-16 14:47 ` Conor.Dooley 0 siblings, 0 replies; 123+ messages in thread From: Conor.Dooley @ 2021-12-16 14:47 UTC (permalink / raw) To: geert, paul.walmsley, palmer, aou Cc: robh+dt, damien.lemoal, Lewis.Hanly, krzysztof.kozlowski, linux-riscv, devicetree On 16/12/2021 13:37, Geert Uytterhoeven wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > Fix the device node for the clock controller: > - Remove bogus "reg-names" property, > - Remove unneeded "clock-output-names" property. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Ha, doing my job for me again - was hoping to send my v2 tomorrow too so good timing on your part. Reviewed-by: Conor Dooley <conor.dooley@microchip.com> (I have booted the 5 patches for the polarfire on my board, so Tested-by: Conor Dooley <conor.dooley@microchip.com> too?) > --- > v2: > - New. > --- > arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 9 --------- > 1 file changed, 9 deletions(-) > > diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > index b372bc6459bf163a..d9c1dee3fb25beb8 100644 > --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi > @@ -197,17 +197,8 @@ dma@3000000 { > clkcfg: clkcfg@20002000 { > compatible = "microchip,mpfs-clkcfg"; > reg = <0x0 0x20002000 0x0 0x1000>; > - reg-names = "mss_sysreg"; > clocks = <&refclk>; > #clock-cells = <1>; > - clock-output-names = "cpu", "axi", "ahb", "envm", /* 0-3 */ > - "mac0", "mac1", "mmc", "timer", /* 4-7 */ > - "mmuart0", "mmuart1", "mmuart2", "mmuart3", /* 8-11 */ > - "mmuart4", "spi0", "spi1", "i2c0", /* 12-15 */ > - "i2c1", "can0", "can1", "usb", /* 16-19 */ > - "rsvd", "rtc", "qspi", "gpio0", /* 20-23 */ > - "gpio1", "gpio2", "ddrc", "fic0", /* 24-27 */ > - "fic1", "fic2", "fic3", "athena", "cfm"; /* 28-32 */ > }; > > serial0: serial@20000000 { > -- > 2.25.1 > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 07/11] riscv: dts: microchip: mpfs: Group tuples in interrupt properties 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven To improve human readability and enable automatic validation, the tuples in the various properties containing interrupt specifiers should be grouped. Fix this by grouping the tuples of "interrupts" and "interrupts-extended" properties using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> --- v2: - Add Reviewed-by. --- .../boot/dts/microchip/microchip-mpfs.dtsi | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi index d9c1dee3fb25beb8..869aaf0d5c066c9d 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi @@ -158,18 +158,18 @@ cache-controller@2010000 { cache-size = <2097152>; cache-unified; interrupt-parent = <&plic>; - interrupts = <1 2 3>; + interrupts = <1>, <2>, <3>; reg = <0x0 0x2010000 0x0 0x1000>; }; clint@2000000 { compatible = "sifive,fu540-c000-clint", "sifive,clint0"; reg = <0x0 0x2000000 0x0 0xC000>; - interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7 - &cpu1_intc 3 &cpu1_intc 7 - &cpu2_intc 3 &cpu2_intc 7 - &cpu3_intc 3 &cpu3_intc 7 - &cpu4_intc 3 &cpu4_intc 7>; + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, + <&cpu1_intc 3>, <&cpu1_intc 7>, + <&cpu2_intc 3>, <&cpu2_intc 7>, + <&cpu3_intc 3>, <&cpu3_intc 7>, + <&cpu4_intc 3>, <&cpu4_intc 7>; }; plic: interrupt-controller@c000000 { @@ -178,11 +178,11 @@ plic: interrupt-controller@c000000 { #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller; - interrupts-extended = <&cpu0_intc 11 - &cpu1_intc 11 &cpu1_intc 9 - &cpu2_intc 11 &cpu2_intc 9 - &cpu3_intc 11 &cpu3_intc 9 - &cpu4_intc 11 &cpu4_intc 9>; + interrupts-extended = <&cpu0_intc 11>, + <&cpu1_intc 11>, <&cpu1_intc 9>, + <&cpu2_intc 11>, <&cpu2_intc 9>, + <&cpu3_intc 11>, <&cpu3_intc 9>, + <&cpu4_intc 11>, <&cpu4_intc 9>; riscv,ndev = <186>; }; @@ -190,7 +190,8 @@ dma@3000000 { compatible = "sifive,fu540-c000-pdma"; reg = <0x0 0x3000000 0x0 0x8000>; interrupt-parent = <&plic>; - interrupts = <23 24 25 26 27 28 29 30>; + interrupts = <23>, <24>, <25>, <26>, <27>, <28>, <29>, + <30>; #dma-cells = <1>; }; @@ -254,7 +255,7 @@ mmc: mmc@20008000 { compatible = "microchip,mpfs-sd4hc", "cdns,sd4hc"; reg = <0x0 0x20008000 0x0 0x1000>; interrupt-parent = <&plic>; - interrupts = <88 89>; + interrupts = <88>, <89>; clocks = <&clkcfg 6>; max-frequency = <200000000>; status = "disabled"; @@ -264,7 +265,7 @@ emac0: ethernet@20110000 { compatible = "cdns,macb"; reg = <0x0 0x20110000 0x0 0x2000>; interrupt-parent = <&plic>; - interrupts = <64 65 66 67>; + interrupts = <64>, <65>, <66>, <67>; local-mac-address = [00 00 00 00 00 00]; clocks = <&clkcfg 4>, <&clkcfg 2>; clock-names = "pclk", "hclk"; @@ -277,7 +278,7 @@ emac1: ethernet@20112000 { compatible = "cdns,macb"; reg = <0x0 0x20112000 0x0 0x2000>; interrupt-parent = <&plic>; - interrupts = <70 71 72 73>; + interrupts = <70>, <71>, <72>, <73>; local-mac-address = [00 00 00 00 00 00]; clocks = <&clkcfg 5>, <&clkcfg 2>; status = "disabled"; -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 07/11] riscv: dts: microchip: mpfs: Group tuples in interrupt properties @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven To improve human readability and enable automatic validation, the tuples in the various properties containing interrupt specifiers should be grouped. Fix this by grouping the tuples of "interrupts" and "interrupts-extended" properties using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Conor Dooley <conor.dooley@microchip.com> --- v2: - Add Reviewed-by. --- .../boot/dts/microchip/microchip-mpfs.dtsi | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi index d9c1dee3fb25beb8..869aaf0d5c066c9d 100644 --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi @@ -158,18 +158,18 @@ cache-controller@2010000 { cache-size = <2097152>; cache-unified; interrupt-parent = <&plic>; - interrupts = <1 2 3>; + interrupts = <1>, <2>, <3>; reg = <0x0 0x2010000 0x0 0x1000>; }; clint@2000000 { compatible = "sifive,fu540-c000-clint", "sifive,clint0"; reg = <0x0 0x2000000 0x0 0xC000>; - interrupts-extended = <&cpu0_intc 3 &cpu0_intc 7 - &cpu1_intc 3 &cpu1_intc 7 - &cpu2_intc 3 &cpu2_intc 7 - &cpu3_intc 3 &cpu3_intc 7 - &cpu4_intc 3 &cpu4_intc 7>; + interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>, + <&cpu1_intc 3>, <&cpu1_intc 7>, + <&cpu2_intc 3>, <&cpu2_intc 7>, + <&cpu3_intc 3>, <&cpu3_intc 7>, + <&cpu4_intc 3>, <&cpu4_intc 7>; }; plic: interrupt-controller@c000000 { @@ -178,11 +178,11 @@ plic: interrupt-controller@c000000 { #address-cells = <0>; #interrupt-cells = <1>; interrupt-controller; - interrupts-extended = <&cpu0_intc 11 - &cpu1_intc 11 &cpu1_intc 9 - &cpu2_intc 11 &cpu2_intc 9 - &cpu3_intc 11 &cpu3_intc 9 - &cpu4_intc 11 &cpu4_intc 9>; + interrupts-extended = <&cpu0_intc 11>, + <&cpu1_intc 11>, <&cpu1_intc 9>, + <&cpu2_intc 11>, <&cpu2_intc 9>, + <&cpu3_intc 11>, <&cpu3_intc 9>, + <&cpu4_intc 11>, <&cpu4_intc 9>; riscv,ndev = <186>; }; @@ -190,7 +190,8 @@ dma@3000000 { compatible = "sifive,fu540-c000-pdma"; reg = <0x0 0x3000000 0x0 0x8000>; interrupt-parent = <&plic>; - interrupts = <23 24 25 26 27 28 29 30>; + interrupts = <23>, <24>, <25>, <26>, <27>, <28>, <29>, + <30>; #dma-cells = <1>; }; @@ -254,7 +255,7 @@ mmc: mmc@20008000 { compatible = "microchip,mpfs-sd4hc", "cdns,sd4hc"; reg = <0x0 0x20008000 0x0 0x1000>; interrupt-parent = <&plic>; - interrupts = <88 89>; + interrupts = <88>, <89>; clocks = <&clkcfg 6>; max-frequency = <200000000>; status = "disabled"; @@ -264,7 +265,7 @@ emac0: ethernet@20110000 { compatible = "cdns,macb"; reg = <0x0 0x20110000 0x0 0x2000>; interrupt-parent = <&plic>; - interrupts = <64 65 66 67>; + interrupts = <64>, <65>, <66>, <67>; local-mac-address = [00 00 00 00 00 00]; clocks = <&clkcfg 4>, <&clkcfg 2>; clock-names = "pclk", "hclk"; @@ -277,7 +278,7 @@ emac1: ethernet@20112000 { compatible = "cdns,macb"; reg = <0x0 0x20112000 0x0 0x2000>; interrupt-parent = <&plic>; - interrupts = <70 71 72 73>; + interrupts = <70>, <71>, <72>, <73>; local-mac-address = [00 00 00 00 00 00]; clocks = <&clkcfg 5>, <&clkcfg 2>; status = "disabled"; -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 08/11] riscv: dts: sifive: Group tuples in interrupt properties 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven To improve human readability and enable automatic validation, the tuples in the various properties containing interrupt specifiers should be grouped. Fix this by grouping the tuples of "interrupts" and "interrupts-extended" properties using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- v2: - Add Reviewed-by. --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 21 +++++++++++---------- arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 14 +++++++------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi index 0655b5c4201d9f71..0caca0ccf6711ded 100644 --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi @@ -145,12 +145,12 @@ plic0: interrupt-controller@c000000 { reg = <0x0 0xc000000 0x0 0x4000000>; riscv,ndev = <53>; interrupt-controller; - interrupts-extended = < - &cpu0_intc 0xffffffff - &cpu1_intc 0xffffffff &cpu1_intc 9 - &cpu2_intc 0xffffffff &cpu2_intc 9 - &cpu3_intc 0xffffffff &cpu3_intc 9 - &cpu4_intc 0xffffffff &cpu4_intc 9>; + interrupts-extended = + <&cpu0_intc 0xffffffff>, + <&cpu1_intc 0xffffffff>, <&cpu1_intc 9>, + <&cpu2_intc 0xffffffff>, <&cpu2_intc 9>, + <&cpu3_intc 0xffffffff>, <&cpu3_intc 9>, + <&cpu4_intc 0xffffffff>, <&cpu4_intc 9>; }; prci: clock-controller@10000000 { compatible = "sifive,fu540-c000-prci"; @@ -170,7 +170,8 @@ dma: dma@3000000 { compatible = "sifive,fu540-c000-pdma"; reg = <0x0 0x3000000 0x0 0x8000>; interrupt-parent = <&plic0>; - interrupts = <23 24 25 26 27 28 29 30>; + interrupts = <23>, <24>, <25>, <26>, <27>, <28>, <29>, + <30>; #dma-cells = <1>; }; uart1: serial@10011000 { @@ -243,7 +244,7 @@ pwm0: pwm@10020000 { compatible = "sifive,fu540-c000-pwm", "sifive,pwm0"; reg = <0x0 0x10020000 0x0 0x1000>; interrupt-parent = <&plic0>; - interrupts = <42 43 44 45>; + interrupts = <42>, <43>, <44>, <45>; clocks = <&prci PRCI_CLK_TLCLK>; #pwm-cells = <3>; status = "disabled"; @@ -252,7 +253,7 @@ pwm1: pwm@10021000 { compatible = "sifive,fu540-c000-pwm", "sifive,pwm0"; reg = <0x0 0x10021000 0x0 0x1000>; interrupt-parent = <&plic0>; - interrupts = <46 47 48 49>; + interrupts = <46>, <47>, <48>, <49>; clocks = <&prci PRCI_CLK_TLCLK>; #pwm-cells = <3>; status = "disabled"; @@ -265,7 +266,7 @@ l2cache: cache-controller@2010000 { cache-size = <2097152>; cache-unified; interrupt-parent = <&plic0>; - interrupts = <1 2 3>; + interrupts = <1>, <2>, <3>; reg = <0x0 0x2010000 0x0 0x1000>; }; gpio: gpio@10060000 { diff --git a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi index abbb960f90a00ac2..8464b0e3c88791e1 100644 --- a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi @@ -147,12 +147,12 @@ plic0: interrupt-controller@c000000 { reg = <0x0 0xc000000 0x0 0x4000000>; riscv,ndev = <69>; interrupt-controller; - interrupts-extended = < - &cpu0_intc 0xffffffff - &cpu1_intc 0xffffffff &cpu1_intc 9 - &cpu2_intc 0xffffffff &cpu2_intc 9 - &cpu3_intc 0xffffffff &cpu3_intc 9 - &cpu4_intc 0xffffffff &cpu4_intc 9>; + interrupts-extended = + <&cpu0_intc 0xffffffff>, + <&cpu1_intc 0xffffffff>, <&cpu1_intc 9>, + <&cpu2_intc 0xffffffff>, <&cpu2_intc 9>, + <&cpu3_intc 0xffffffff>, <&cpu3_intc 9>, + <&cpu4_intc 0xffffffff>, <&cpu4_intc 9>; }; prci: clock-controller@10000000 { compatible = "sifive,fu740-c000-prci"; @@ -273,7 +273,7 @@ ccache: cache-controller@2010000 { cache-size = <2097152>; cache-unified; interrupt-parent = <&plic0>; - interrupts = <19 21 22 20>; + interrupts = <19>, <21>, <22>, <20>; reg = <0x0 0x2010000 0x0 0x1000>; }; gpio: gpio@10060000 { -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 08/11] riscv: dts: sifive: Group tuples in interrupt properties @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven To improve human readability and enable automatic validation, the tuples in the various properties containing interrupt specifiers should be grouped. Fix this by grouping the tuples of "interrupts" and "interrupts-extended" properties using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- v2: - Add Reviewed-by. --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 21 +++++++++++---------- arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 14 +++++++------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi index 0655b5c4201d9f71..0caca0ccf6711ded 100644 --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi @@ -145,12 +145,12 @@ plic0: interrupt-controller@c000000 { reg = <0x0 0xc000000 0x0 0x4000000>; riscv,ndev = <53>; interrupt-controller; - interrupts-extended = < - &cpu0_intc 0xffffffff - &cpu1_intc 0xffffffff &cpu1_intc 9 - &cpu2_intc 0xffffffff &cpu2_intc 9 - &cpu3_intc 0xffffffff &cpu3_intc 9 - &cpu4_intc 0xffffffff &cpu4_intc 9>; + interrupts-extended = + <&cpu0_intc 0xffffffff>, + <&cpu1_intc 0xffffffff>, <&cpu1_intc 9>, + <&cpu2_intc 0xffffffff>, <&cpu2_intc 9>, + <&cpu3_intc 0xffffffff>, <&cpu3_intc 9>, + <&cpu4_intc 0xffffffff>, <&cpu4_intc 9>; }; prci: clock-controller@10000000 { compatible = "sifive,fu540-c000-prci"; @@ -170,7 +170,8 @@ dma: dma@3000000 { compatible = "sifive,fu540-c000-pdma"; reg = <0x0 0x3000000 0x0 0x8000>; interrupt-parent = <&plic0>; - interrupts = <23 24 25 26 27 28 29 30>; + interrupts = <23>, <24>, <25>, <26>, <27>, <28>, <29>, + <30>; #dma-cells = <1>; }; uart1: serial@10011000 { @@ -243,7 +244,7 @@ pwm0: pwm@10020000 { compatible = "sifive,fu540-c000-pwm", "sifive,pwm0"; reg = <0x0 0x10020000 0x0 0x1000>; interrupt-parent = <&plic0>; - interrupts = <42 43 44 45>; + interrupts = <42>, <43>, <44>, <45>; clocks = <&prci PRCI_CLK_TLCLK>; #pwm-cells = <3>; status = "disabled"; @@ -252,7 +253,7 @@ pwm1: pwm@10021000 { compatible = "sifive,fu540-c000-pwm", "sifive,pwm0"; reg = <0x0 0x10021000 0x0 0x1000>; interrupt-parent = <&plic0>; - interrupts = <46 47 48 49>; + interrupts = <46>, <47>, <48>, <49>; clocks = <&prci PRCI_CLK_TLCLK>; #pwm-cells = <3>; status = "disabled"; @@ -265,7 +266,7 @@ l2cache: cache-controller@2010000 { cache-size = <2097152>; cache-unified; interrupt-parent = <&plic0>; - interrupts = <1 2 3>; + interrupts = <1>, <2>, <3>; reg = <0x0 0x2010000 0x0 0x1000>; }; gpio: gpio@10060000 { diff --git a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi index abbb960f90a00ac2..8464b0e3c88791e1 100644 --- a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi @@ -147,12 +147,12 @@ plic0: interrupt-controller@c000000 { reg = <0x0 0xc000000 0x0 0x4000000>; riscv,ndev = <69>; interrupt-controller; - interrupts-extended = < - &cpu0_intc 0xffffffff - &cpu1_intc 0xffffffff &cpu1_intc 9 - &cpu2_intc 0xffffffff &cpu2_intc 9 - &cpu3_intc 0xffffffff &cpu3_intc 9 - &cpu4_intc 0xffffffff &cpu4_intc 9>; + interrupts-extended = + <&cpu0_intc 0xffffffff>, + <&cpu1_intc 0xffffffff>, <&cpu1_intc 9>, + <&cpu2_intc 0xffffffff>, <&cpu2_intc 9>, + <&cpu3_intc 0xffffffff>, <&cpu3_intc 9>, + <&cpu4_intc 0xffffffff>, <&cpu4_intc 9>; }; prci: clock-controller@10000000 { compatible = "sifive,fu740-c000-prci"; @@ -273,7 +273,7 @@ ccache: cache-controller@2010000 { cache-size = <2097152>; cache-unified; interrupt-parent = <&plic0>; - interrupts = <19 21 22 20>; + interrupts = <19>, <21>, <22>, <20>; reg = <0x0 0x2010000 0x0 0x1000>; }; gpio: gpio@10060000 { -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 09/11] riscv: dts: sifive: Group tuples in register properties 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven To improve human readability and enable automatic validation, the tuples in "reg" properties containing register blocks should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- v2: - Add Reviewed-by. --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi index 0caca0ccf6711ded..e2efcf08210926f8 100644 --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi @@ -196,8 +196,8 @@ i2c0: i2c@10030000 { }; qspi0: spi@10040000 { compatible = "sifive,fu540-c000-spi", "sifive,spi0"; - reg = <0x0 0x10040000 0x0 0x1000 - 0x0 0x20000000 0x0 0x10000000>; + reg = <0x0 0x10040000 0x0 0x1000>, + <0x0 0x20000000 0x0 0x10000000>; interrupt-parent = <&plic0>; interrupts = <51>; clocks = <&prci PRCI_CLK_TLCLK>; @@ -207,8 +207,8 @@ qspi0: spi@10040000 { }; qspi1: spi@10041000 { compatible = "sifive,fu540-c000-spi", "sifive,spi0"; - reg = <0x0 0x10041000 0x0 0x1000 - 0x0 0x30000000 0x0 0x10000000>; + reg = <0x0 0x10041000 0x0 0x1000>, + <0x0 0x30000000 0x0 0x10000000>; interrupt-parent = <&plic0>; interrupts = <52>; clocks = <&prci PRCI_CLK_TLCLK>; @@ -230,8 +230,8 @@ eth0: ethernet@10090000 { compatible = "sifive,fu540-c000-gem"; interrupt-parent = <&plic0>; interrupts = <53>; - reg = <0x0 0x10090000 0x0 0x2000 - 0x0 0x100a0000 0x0 0x1000>; + reg = <0x0 0x10090000 0x0 0x2000>, + <0x0 0x100a0000 0x0 0x1000>; local-mac-address = [00 00 00 00 00 00]; clock-names = "pclk", "hclk"; clocks = <&prci PRCI_CLK_GEMGXLPLL>, -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 09/11] riscv: dts: sifive: Group tuples in register properties @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven To improve human readability and enable automatic validation, the tuples in "reg" properties containing register blocks should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- v2: - Add Reviewed-by. --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi index 0caca0ccf6711ded..e2efcf08210926f8 100644 --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi @@ -196,8 +196,8 @@ i2c0: i2c@10030000 { }; qspi0: spi@10040000 { compatible = "sifive,fu540-c000-spi", "sifive,spi0"; - reg = <0x0 0x10040000 0x0 0x1000 - 0x0 0x20000000 0x0 0x10000000>; + reg = <0x0 0x10040000 0x0 0x1000>, + <0x0 0x20000000 0x0 0x10000000>; interrupt-parent = <&plic0>; interrupts = <51>; clocks = <&prci PRCI_CLK_TLCLK>; @@ -207,8 +207,8 @@ qspi0: spi@10040000 { }; qspi1: spi@10041000 { compatible = "sifive,fu540-c000-spi", "sifive,spi0"; - reg = <0x0 0x10041000 0x0 0x1000 - 0x0 0x30000000 0x0 0x10000000>; + reg = <0x0 0x10041000 0x0 0x1000>, + <0x0 0x30000000 0x0 0x10000000>; interrupt-parent = <&plic0>; interrupts = <52>; clocks = <&prci PRCI_CLK_TLCLK>; @@ -230,8 +230,8 @@ eth0: ethernet@10090000 { compatible = "sifive,fu540-c000-gem"; interrupt-parent = <&plic0>; interrupts = <53>; - reg = <0x0 0x10090000 0x0 0x2000 - 0x0 0x100a0000 0x0 0x1000>; + reg = <0x0 0x10090000 0x0 0x2000>, + <0x0 0x100a0000 0x0 0x1000>; local-mac-address = [00 00 00 00 00 00]; clock-names = "pclk", "hclk"; clocks = <&prci PRCI_CLK_GEMGXLPLL>, -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 10/11] riscv: dts: sifive: fu540-c000: Drop bogus soc node compatible values 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven "make dtbs_check": arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dt.yaml: soc: $nodename:0: '/' was expected From schema: Documentation/devicetree/bindings/riscv/sifive.yaml arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dt.yaml: soc: compatible: 'oneOf' conditional failed, one must be fixed: 'sifive,fu540-c000' is not one of ['sifive,hifive-unleashed-a00'] 'sifive,fu540-c000' is not one of ['sifive,hifive-unmatched-a00'] 'sifive,fu540-c000' was expected 'sifive,fu740-c000' was expected 'sifive,fu540' was expected 'sifive,fu740' was expected From schema: Documentation/devicetree/bindings/riscv/sifive.yaml This happens because the "soc" subnode declares compatibility with "sifive,fu540-c000" and "sifive,fu540", while these are only intended for the root node. Fix this by removing the bogus compatible values from the "soc" node. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- v2: - Add Reviewed-by. --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi index e2efcf08210926f8..b1250c16816f5c9d 100644 --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi @@ -137,7 +137,7 @@ cpu4_intc: interrupt-controller { soc { #address-cells = <2>; #size-cells = <2>; - compatible = "sifive,fu540-c000", "sifive,fu540", "simple-bus"; + compatible = "simple-bus"; ranges; plic0: interrupt-controller@c000000 { #interrupt-cells = <1>; -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 10/11] riscv: dts: sifive: fu540-c000: Drop bogus soc node compatible values @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven "make dtbs_check": arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dt.yaml: soc: $nodename:0: '/' was expected From schema: Documentation/devicetree/bindings/riscv/sifive.yaml arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dt.yaml: soc: compatible: 'oneOf' conditional failed, one must be fixed: 'sifive,fu540-c000' is not one of ['sifive,hifive-unleashed-a00'] 'sifive,fu540-c000' is not one of ['sifive,hifive-unmatched-a00'] 'sifive,fu540-c000' was expected 'sifive,fu740-c000' was expected 'sifive,fu540' was expected 'sifive,fu740' was expected From schema: Documentation/devicetree/bindings/riscv/sifive.yaml This happens because the "soc" subnode declares compatibility with "sifive,fu540-c000" and "sifive,fu540", while these are only intended for the root node. Fix this by removing the bogus compatible values from the "soc" node. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> --- v2: - Add Reviewed-by. --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi index e2efcf08210926f8..b1250c16816f5c9d 100644 --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi @@ -137,7 +137,7 @@ cpu4_intc: interrupt-controller { soc { #address-cells = <2>; #size-cells = <2>; - compatible = "sifive,fu540-c000", "sifive,fu540", "simple-bus"; + compatible = "simple-bus"; ranges; plic0: interrupt-controller@c000000 { #interrupt-cells = <1>; -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 11/11] riscv: dts: sifive: fu540-c000: Fix PLIC node 2021-12-16 13:37 ` Geert Uytterhoeven @ 2021-12-16 13:37 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven Fix the device node for the Platform-Level Interrupt Controller (PLIC): - Add missing "#address-cells" property, - Sort properties according to DT bindings. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - New. --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi index b1250c16816f5c9d..3eef52b1a59b5cb4 100644 --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi @@ -140,10 +140,10 @@ soc { compatible = "simple-bus"; ranges; plic0: interrupt-controller@c000000 { - #interrupt-cells = <1>; compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0"; reg = <0x0 0xc000000 0x0 0x4000000>; - riscv,ndev = <53>; + #address-cells = <0>; + #interrupt-cells = <1>; interrupt-controller; interrupts-extended = <&cpu0_intc 0xffffffff>, @@ -151,6 +151,7 @@ plic0: interrupt-controller@c000000 { <&cpu2_intc 0xffffffff>, <&cpu2_intc 9>, <&cpu3_intc 0xffffffff>, <&cpu3_intc 9>, <&cpu4_intc 0xffffffff>, <&cpu4_intc 9>; + riscv,ndev = <53>; }; prci: clock-controller@10000000 { compatible = "sifive,fu540-c000-prci"; -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 11/11] riscv: dts: sifive: fu540-c000: Fix PLIC node @ 2021-12-16 13:37 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:37 UTC (permalink / raw) To: Paul Walmsley, Palmer Dabbelt, Albert Ou Cc: Rob Herring, Damien Le Moal, Lewis Hanly, Krzysztof Kozlowski, Conor Dooley, linux-riscv, devicetree, Geert Uytterhoeven Fix the device node for the Platform-Level Interrupt Controller (PLIC): - Add missing "#address-cells" property, - Sort properties according to DT bindings. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - New. --- arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi index b1250c16816f5c9d..3eef52b1a59b5cb4 100644 --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi @@ -140,10 +140,10 @@ soc { compatible = "simple-bus"; ranges; plic0: interrupt-controller@c000000 { - #interrupt-cells = <1>; compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0"; reg = <0x0 0xc000000 0x0 0x4000000>; - riscv,ndev = <53>; + #address-cells = <0>; + #interrupt-cells = <1>; interrupt-controller; interrupts-extended = <&cpu0_intc 0xffffffff>, @@ -151,6 +151,7 @@ plic0: interrupt-controller@c000000 { <&cpu2_intc 0xffffffff>, <&cpu2_intc 9>, <&cpu3_intc 0xffffffff>, <&cpu3_intc 9>, <&cpu4_intc 0xffffffff>, <&cpu4_intc 9>; + riscv,ndev = <53>; }; prci: clock-controller@10000000 { compatible = "sifive,fu540-c000-prci"; -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive,plic: Miscellaneous improvements @ 2021-12-16 13:41 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:41 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven Hi all, This patch series contains two improvements for the SiFive PLIC DT bindings. Changes compared to v1[1]: - Split in two patches, - Improve patch description and document limit rationale. Thanks! [1] https://lore.kernel.org/r/20211125152233.162868-1-geert@linux-m68k.org Geert Uytterhoeven (2): dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples .../interrupt-controller/sifive,plic-1.0.0.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.25.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive, plic: Miscellaneous improvements @ 2021-12-16 13:41 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:41 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven Hi all, This patch series contains two improvements for the SiFive PLIC DT bindings. Changes compared to v1[1]: - Split in two patches, - Improve patch description and document limit rationale. Thanks! [1] https://lore.kernel.org/r/20211125152233.162868-1-geert@linux-m68k.org Geert Uytterhoeven (2): dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples .../interrupt-controller/sifive,plic-1.0.0.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.25.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 1/2] dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts 2021-12-16 13:41 ` [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive, plic: " Geert Uytterhoeven @ 2021-12-16 13:41 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:41 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven The number of interrupts lacks an upper bound, thus assuming one, causing properly grouped "interrupts-extended" properties to be flagged as an error by "make dtbs_check". Fix this by adding the missing "maxItems". As the architectural maximum is 15872 interrupts, using that as the limit would be unpractical. Hence limit it to 9 interrupts (one interrupt for a system management core, and two interrupts per core for other cores). This should be sufficient for now, and the limit can always be increased when the need arises. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - Split in two patches, - Improve patch description and document limit rationale. --- .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml index 28b6b17fe4b26778..0c6687511457413e 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml @@ -62,6 +62,7 @@ properties: interrupts-extended: minItems: 1 + maxItems: 9 description: Specifies which contexts are connected to the PLIC, with "-1" specifying that a context is not present. Each node pointed to should be a -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 1/2] dt-bindings: interrupt-controller: sifive, plic: Fix number of interrupts @ 2021-12-16 13:41 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:41 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven The number of interrupts lacks an upper bound, thus assuming one, causing properly grouped "interrupts-extended" properties to be flagged as an error by "make dtbs_check". Fix this by adding the missing "maxItems". As the architectural maximum is 15872 interrupts, using that as the limit would be unpractical. Hence limit it to 9 interrupts (one interrupt for a system management core, and two interrupts per core for other cores). This should be sufficient for now, and the limit can always be increased when the need arises. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - Split in two patches, - Improve patch description and document limit rationale. --- .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml index 28b6b17fe4b26778..0c6687511457413e 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml @@ -62,6 +62,7 @@ properties: interrupts-extended: minItems: 1 + maxItems: 9 description: Specifies which contexts are connected to the PLIC, with "-1" specifying that a context is not present. Each node pointed to should be a -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts 2021-12-16 13:41 ` [PATCH v2 1/2] dt-bindings: interrupt-controller: sifive, plic: " Geert Uytterhoeven @ 2021-12-16 21:29 ` Rob Herring -1 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 21:29 UTC (permalink / raw) To: Geert Uytterhoeven Cc: linux-riscv, Thomas Gleixner, linux-kernel, devicetree, Sagar Kadam, Rob Herring, Palmer Dabbelt, Paul Walmsley, Marc Zyngier On Thu, 16 Dec 2021 14:41:21 +0100, Geert Uytterhoeven wrote: > The number of interrupts lacks an upper bound, thus assuming one, > causing properly grouped "interrupts-extended" properties to be flagged > as an error by "make dtbs_check". > > Fix this by adding the missing "maxItems". As the architectural maximum > is 15872 interrupts, using that as the limit would be unpractical. > Hence limit it to 9 interrupts (one interrupt for a system management > core, and two interrupts per core for other cores). This should be > sufficient for now, and the limit can always be increased when the need > arises. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > v2: > - Split in two patches, > - Improve patch description and document limit rationale. > --- > .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts @ 2021-12-16 21:29 ` Rob Herring 0 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 21:29 UTC (permalink / raw) To: Geert Uytterhoeven Cc: linux-riscv, Thomas Gleixner, linux-kernel, devicetree, Sagar Kadam, Rob Herring, Palmer Dabbelt, Paul Walmsley, Marc Zyngier On Thu, 16 Dec 2021 14:41:21 +0100, Geert Uytterhoeven wrote: > The number of interrupts lacks an upper bound, thus assuming one, > causing properly grouped "interrupts-extended" properties to be flagged > as an error by "make dtbs_check". > > Fix this by adding the missing "maxItems". As the architectural maximum > is 15872 interrupts, using that as the limit would be unpractical. > Hence limit it to 9 interrupts (one interrupt for a system management > core, and two interrupts per core for other cores). This should be > sufficient for now, and the limit can always be increased when the need > arises. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > v2: > - Split in two patches, > - Improve patch description and document limit rationale. > --- > .../bindings/interrupt-controller/sifive,plic-1.0.0.yaml | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Rob Herring <robh@kernel.org> _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 2/2] dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples 2021-12-16 13:41 ` [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive, plic: " Geert Uytterhoeven @ 2021-12-16 13:41 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:41 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven To improve human readability and enable automatic validation, the tuples in "interrupts-extended" properties should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - Split in two patches. --- .../interrupt-controller/sifive,plic-1.0.0.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml index 0c6687511457413e..52a3bc31a2c19c5d 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml @@ -91,12 +91,11 @@ examples: #interrupt-cells = <1>; compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0"; interrupt-controller; - interrupts-extended = < - &cpu0_intc 11 - &cpu1_intc 11 &cpu1_intc 9 - &cpu2_intc 11 &cpu2_intc 9 - &cpu3_intc 11 &cpu3_intc 9 - &cpu4_intc 11 &cpu4_intc 9>; + interrupts-extended = <&cpu0_intc 11>, + <&cpu1_intc 11>, <&cpu1_intc 9>, + <&cpu2_intc 11>, <&cpu2_intc 9>, + <&cpu3_intc 11>, <&cpu3_intc 9>, + <&cpu4_intc 11>, <&cpu4_intc 9>; reg = <0xc000000 0x4000000>; riscv,ndev = <10>; }; -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 2/2] dt-bindings: interrupt-controller: sifive, plic: Group interrupt tuples @ 2021-12-16 13:41 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:41 UTC (permalink / raw) To: Thomas Gleixner, Marc Zyngier, Rob Herring, Palmer Dabbelt, Paul Walmsley, Sagar Kadam Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven To improve human readability and enable automatic validation, the tuples in "interrupts-extended" properties should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - Split in two patches. --- .../interrupt-controller/sifive,plic-1.0.0.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml index 0c6687511457413e..52a3bc31a2c19c5d 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml @@ -91,12 +91,11 @@ examples: #interrupt-cells = <1>; compatible = "sifive,fu540-c000-plic", "sifive,plic-1.0.0"; interrupt-controller; - interrupts-extended = < - &cpu0_intc 11 - &cpu1_intc 11 &cpu1_intc 9 - &cpu2_intc 11 &cpu2_intc 9 - &cpu3_intc 11 &cpu3_intc 9 - &cpu4_intc 11 &cpu4_intc 9>; + interrupts-extended = <&cpu0_intc 11>, + <&cpu1_intc 11>, <&cpu1_intc 9>, + <&cpu2_intc 11>, <&cpu2_intc 9>, + <&cpu3_intc 11>, <&cpu3_intc 9>, + <&cpu4_intc 11>, <&cpu4_intc 9>; reg = <0xc000000 0x4000000>; riscv,ndev = <10>; }; -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples 2021-12-16 13:41 ` [PATCH v2 2/2] dt-bindings: interrupt-controller: sifive, plic: " Geert Uytterhoeven @ 2021-12-16 21:29 ` Rob Herring -1 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 21:29 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Paul Walmsley, linux-riscv, linux-kernel, devicetree, Palmer Dabbelt, Sagar Kadam, Thomas Gleixner, Marc Zyngier, Rob Herring On Thu, 16 Dec 2021 14:41:22 +0100, Geert Uytterhoeven wrote: > To improve human readability and enable automatic validation, the tuples > in "interrupts-extended" properties should be grouped using angle > brackets. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > v2: > - Split in two patches. > --- > .../interrupt-controller/sifive,plic-1.0.0.yaml | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > Reviewed-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples @ 2021-12-16 21:29 ` Rob Herring 0 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 21:29 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Paul Walmsley, linux-riscv, linux-kernel, devicetree, Palmer Dabbelt, Sagar Kadam, Thomas Gleixner, Marc Zyngier, Rob Herring On Thu, 16 Dec 2021 14:41:22 +0100, Geert Uytterhoeven wrote: > To improve human readability and enable automatic validation, the tuples > in "interrupts-extended" properties should be grouped using angle > brackets. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > v2: > - Split in two patches. > --- > .../interrupt-controller/sifive,plic-1.0.0.yaml | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > Reviewed-by: Rob Herring <robh@kernel.org> _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive,plic: Miscellaneous improvements 2021-12-16 13:41 ` [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive, plic: " Geert Uytterhoeven @ 2021-12-16 21:28 ` Rob Herring -1 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 21:28 UTC (permalink / raw) To: Geert Uytterhoeven, Konstantin Ryabitsev Cc: Thomas Gleixner, Marc Zyngier, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, linux-kernel, devicetree, linux-riscv + Konstantin On Thu, Dec 16, 2021 at 02:41:20PM +0100, Geert Uytterhoeven wrote: > Hi all, > > This patch series contains two improvements for the SiFive PLIC DT > bindings. Lore is thoroughly confused with this and several other series. It seems to be doing subject matching and pretty loosely. Rob > > Changes compared to v1[1]: > - Split in two patches, > - Improve patch description and document limit rationale. > > Thanks! > > [1] https://lore.kernel.org/r/20211125152233.162868-1-geert@linux-m68k.org > > Geert Uytterhoeven (2): > dt-bindings: interrupt-controller: sifive,plic: Fix number of > interrupts > dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples > > .../interrupt-controller/sifive,plic-1.0.0.yaml | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > -- > 2.25.1 > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds > ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive,plic: Miscellaneous improvements @ 2021-12-16 21:28 ` Rob Herring 0 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 21:28 UTC (permalink / raw) To: Geert Uytterhoeven, Konstantin Ryabitsev Cc: Thomas Gleixner, Marc Zyngier, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, linux-kernel, devicetree, linux-riscv + Konstantin On Thu, Dec 16, 2021 at 02:41:20PM +0100, Geert Uytterhoeven wrote: > Hi all, > > This patch series contains two improvements for the SiFive PLIC DT > bindings. Lore is thoroughly confused with this and several other series. It seems to be doing subject matching and pretty loosely. Rob > > Changes compared to v1[1]: > - Split in two patches, > - Improve patch description and document limit rationale. > > Thanks! > > [1] https://lore.kernel.org/r/20211125152233.162868-1-geert@linux-m68k.org > > Geert Uytterhoeven (2): > dt-bindings: interrupt-controller: sifive,plic: Fix number of > interrupts > dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples > > .../interrupt-controller/sifive,plic-1.0.0.yaml | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > -- > 2.25.1 > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive,plic: Miscellaneous improvements 2021-12-16 21:28 ` Rob Herring @ 2021-12-17 8:02 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-17 8:02 UTC (permalink / raw) To: Rob Herring Cc: Konstantin Ryabitsev, Thomas Gleixner, Marc Zyngier, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv Hi Rob, On Thu, Dec 16, 2021 at 10:28 PM Rob Herring <robh@kernel.org> wrote: > On Thu, Dec 16, 2021 at 02:41:20PM +0100, Geert Uytterhoeven wrote: > > This patch series contains two improvements for the SiFive PLIC DT > > bindings. > > Lore is thoroughly confused with this and several other series. It seems > to be doing subject matching and pretty loosely. My apologies, that's purely due to a silly mistake on my side. I sent out 3 patch series without noticing I still had two cover letters from previous "b4 am" sessions in my working dir, so they were mailed out as part of the series, too :-( Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive,plic: Miscellaneous improvements @ 2021-12-17 8:02 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-17 8:02 UTC (permalink / raw) To: Rob Herring Cc: Konstantin Ryabitsev, Thomas Gleixner, Marc Zyngier, Palmer Dabbelt, Paul Walmsley, Sagar Kadam, Linux Kernel Mailing List, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, linux-riscv Hi Rob, On Thu, Dec 16, 2021 at 10:28 PM Rob Herring <robh@kernel.org> wrote: > On Thu, Dec 16, 2021 at 02:41:20PM +0100, Geert Uytterhoeven wrote: > > This patch series contains two improvements for the SiFive PLIC DT > > bindings. > > Lore is thoroughly confused with this and several other series. It seems > to be doing subject matching and pretty loosely. My apologies, that's purely due to a silly mistake on my side. I sent out 3 patch series without noticing I still had two cover letters from previous "b4 am" sessions in my working dir, so they were mailed out as part of the series, too :-( Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 0/2] dt-bindings: timer: sifive,clint: Miscellaneous improvements @ 2021-12-16 13:43 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:43 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven Hi all, This patch series contains two improvements for the SiFive PLIC DT bindings. Changes compared to v1[1]: - Split in two patches, - Improve patch description and document limit rationale. Thanks! [1] https://lore.kernel.org/r/20211125152317.162958-1-geert@linux-m68k.org Geert Uytterhoeven (2): dt-bindings: timer: sifive,clint: Fix number of interrupts dt-bindings: timer: sifive,clint: Group interrupt tuples .../devicetree/bindings/timer/sifive,clint.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.25.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 0/2] dt-bindings: timer: sifive, clint: Miscellaneous improvements @ 2021-12-16 13:43 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:43 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven Hi all, This patch series contains two improvements for the SiFive PLIC DT bindings. Changes compared to v1[1]: - Split in two patches, - Improve patch description and document limit rationale. Thanks! [1] https://lore.kernel.org/r/20211125152317.162958-1-geert@linux-m68k.org Geert Uytterhoeven (2): dt-bindings: timer: sifive,clint: Fix number of interrupts dt-bindings: timer: sifive,clint: Group interrupt tuples .../devicetree/bindings/timer/sifive,clint.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.25.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 1/2] dt-bindings: timer: sifive,clint: Fix number of interrupts 2021-12-16 13:43 ` [PATCH v2 0/2] dt-bindings: timer: sifive, clint: " Geert Uytterhoeven @ 2021-12-16 13:43 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:43 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven The number of interrupts lacks an upper bound, thus assuming one, causing properly grouped "interrupts-extended" properties to be flagged as an error by "make dtbs_check". Fix this by adding the missing "maxItems". As the architectural maximum is 4095 interrupts, using that as the limit would be unpractical. Hence limit it to 10 interrupts (two interrupts for a system management core, and two interrupts per core for other cores). This should be sufficient for now, and the limit can always be increased when the need arises. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - Split in two patches, - Improve patch description and document limit rationale. --- Documentation/devicetree/bindings/timer/sifive,clint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml index 8d5f4687add9e81e..b75fd6f982b1ecb3 100644 --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml @@ -44,6 +44,7 @@ properties: interrupts-extended: minItems: 1 + maxItems: 10 additionalProperties: false -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 1/2] dt-bindings: timer: sifive, clint: Fix number of interrupts @ 2021-12-16 13:43 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:43 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven The number of interrupts lacks an upper bound, thus assuming one, causing properly grouped "interrupts-extended" properties to be flagged as an error by "make dtbs_check". Fix this by adding the missing "maxItems". As the architectural maximum is 4095 interrupts, using that as the limit would be unpractical. Hence limit it to 10 interrupts (two interrupts for a system management core, and two interrupts per core for other cores). This should be sufficient for now, and the limit can always be increased when the need arises. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - Split in two patches, - Improve patch description and document limit rationale. --- Documentation/devicetree/bindings/timer/sifive,clint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml index 8d5f4687add9e81e..b75fd6f982b1ecb3 100644 --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml @@ -44,6 +44,7 @@ properties: interrupts-extended: minItems: 1 + maxItems: 10 additionalProperties: false -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: timer: sifive,clint: Fix number of interrupts 2021-12-16 13:43 ` [PATCH v2 1/2] dt-bindings: timer: sifive, clint: " Geert Uytterhoeven @ 2021-12-16 21:30 ` Rob Herring -1 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 21:30 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Thomas Gleixner, Paul Walmsley, linux-riscv, Daniel Lezcano, Rob Herring, linux-kernel, devicetree, Palmer Dabbelt, Anup Patel On Thu, 16 Dec 2021 14:43:47 +0100, Geert Uytterhoeven wrote: > The number of interrupts lacks an upper bound, thus assuming one, > causing properly grouped "interrupts-extended" properties to be flagged > as an error by "make dtbs_check". > > Fix this by adding the missing "maxItems". As the architectural maximum > is 4095 interrupts, using that as the limit would be unpractical. Hence > limit it to 10 interrupts (two interrupts for a system management core, > and two interrupts per core for other cores). This should be sufficient > for now, and the limit can always be increased when the need arises. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > v2: > - Split in two patches, > - Improve patch description and document limit rationale. > --- > Documentation/devicetree/bindings/timer/sifive,clint.yaml | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: timer: sifive,clint: Fix number of interrupts @ 2021-12-16 21:30 ` Rob Herring 0 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 21:30 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Thomas Gleixner, Paul Walmsley, linux-riscv, Daniel Lezcano, Rob Herring, linux-kernel, devicetree, Palmer Dabbelt, Anup Patel On Thu, 16 Dec 2021 14:43:47 +0100, Geert Uytterhoeven wrote: > The number of interrupts lacks an upper bound, thus assuming one, > causing properly grouped "interrupts-extended" properties to be flagged > as an error by "make dtbs_check". > > Fix this by adding the missing "maxItems". As the architectural maximum > is 4095 interrupts, using that as the limit would be unpractical. Hence > limit it to 10 interrupts (two interrupts for a system management core, > and two interrupts per core for other cores). This should be sufficient > for now, and the limit can always be increased when the need arises. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > v2: > - Split in two patches, > - Improve patch description and document limit rationale. > --- > Documentation/devicetree/bindings/timer/sifive,clint.yaml | 1 + > 1 file changed, 1 insertion(+) > Acked-by: Rob Herring <robh@kernel.org> _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* [PATCH v2 2/2] dt-bindings: timer: sifive,clint: Group interrupt tuples 2021-12-16 13:43 ` [PATCH v2 0/2] dt-bindings: timer: sifive, clint: " Geert Uytterhoeven @ 2021-12-16 13:43 ` Geert Uytterhoeven -1 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:43 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven To improve human readability and enable automatic validation, the tuples in "interrupts-extended" properties should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - Split in two patches. --- Documentation/devicetree/bindings/timer/sifive,clint.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml index b75fd6f982b1ecb3..3b25ec37d81159cb 100644 --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml @@ -57,10 +57,10 @@ examples: - | timer@2000000 { compatible = "sifive,fu540-c000-clint", "sifive,clint0"; - interrupts-extended = <&cpu1intc 3 &cpu1intc 7 - &cpu2intc 3 &cpu2intc 7 - &cpu3intc 3 &cpu3intc 7 - &cpu4intc 3 &cpu4intc 7>; + interrupts-extended = <&cpu1intc 3>, <&cpu1intc 7>, + <&cpu2intc 3>, <&cpu2intc 7>, + <&cpu3intc 3>, <&cpu3intc 7>, + <&cpu4intc 3>, <&cpu4intc 7>; reg = <0x2000000 0x10000>; }; ... -- 2.25.1 ^ permalink raw reply related [flat|nested] 123+ messages in thread
* [PATCH v2 2/2] dt-bindings: timer: sifive, clint: Group interrupt tuples @ 2021-12-16 13:43 ` Geert Uytterhoeven 0 siblings, 0 replies; 123+ messages in thread From: Geert Uytterhoeven @ 2021-12-16 13:43 UTC (permalink / raw) To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel Cc: linux-kernel, devicetree, linux-riscv, Geert Uytterhoeven To improve human readability and enable automatic validation, the tuples in "interrupts-extended" properties should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- v2: - Split in two patches. --- Documentation/devicetree/bindings/timer/sifive,clint.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/timer/sifive,clint.yaml b/Documentation/devicetree/bindings/timer/sifive,clint.yaml index b75fd6f982b1ecb3..3b25ec37d81159cb 100644 --- a/Documentation/devicetree/bindings/timer/sifive,clint.yaml +++ b/Documentation/devicetree/bindings/timer/sifive,clint.yaml @@ -57,10 +57,10 @@ examples: - | timer@2000000 { compatible = "sifive,fu540-c000-clint", "sifive,clint0"; - interrupts-extended = <&cpu1intc 3 &cpu1intc 7 - &cpu2intc 3 &cpu2intc 7 - &cpu3intc 3 &cpu3intc 7 - &cpu4intc 3 &cpu4intc 7>; + interrupts-extended = <&cpu1intc 3>, <&cpu1intc 7>, + <&cpu2intc 3>, <&cpu2intc 7>, + <&cpu3intc 3>, <&cpu3intc 7>, + <&cpu4intc 3>, <&cpu4intc 7>; reg = <0x2000000 0x10000>; }; ... -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply related [flat|nested] 123+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: timer: sifive,clint: Group interrupt tuples 2021-12-16 13:43 ` [PATCH v2 2/2] dt-bindings: timer: sifive, clint: " Geert Uytterhoeven @ 2021-12-16 21:30 ` Rob Herring -1 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 21:30 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Daniel Lezcano, Paul Walmsley, linux-kernel, linux-riscv, Palmer Dabbelt, Anup Patel, Rob Herring, Thomas Gleixner, devicetree On Thu, 16 Dec 2021 14:43:48 +0100, Geert Uytterhoeven wrote: > To improve human readability and enable automatic validation, the tuples > in "interrupts-extended" properties should be grouped using angle > brackets. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > v2: > - Split in two patches. > --- > Documentation/devicetree/bindings/timer/sifive,clint.yaml | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > Reviewed-by: Rob Herring <robh@kernel.org> ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: timer: sifive, clint: Group interrupt tuples @ 2021-12-16 21:30 ` Rob Herring 0 siblings, 0 replies; 123+ messages in thread From: Rob Herring @ 2021-12-16 21:30 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Daniel Lezcano, Paul Walmsley, linux-kernel, linux-riscv, Palmer Dabbelt, Anup Patel, Rob Herring, Thomas Gleixner, devicetree On Thu, 16 Dec 2021 14:43:48 +0100, Geert Uytterhoeven wrote: > To improve human readability and enable automatic validation, the tuples > in "interrupts-extended" properties should be grouped using angle > brackets. > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > v2: > - Split in two patches. > --- > Documentation/devicetree/bindings/timer/sifive,clint.yaml | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > Reviewed-by: Rob Herring <robh@kernel.org> _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 0/2] dt-bindings: timer: sifive,clint: Miscellaneous improvements 2021-12-16 13:43 ` [PATCH v2 0/2] dt-bindings: timer: sifive, clint: " Geert Uytterhoeven @ 2021-12-20 12:20 ` Daniel Lezcano -1 siblings, 0 replies; 123+ messages in thread From: Daniel Lezcano @ 2021-12-20 12:20 UTC (permalink / raw) To: Geert Uytterhoeven, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel Cc: linux-kernel, devicetree, linux-riscv On 16/12/2021 14:43, Geert Uytterhoeven wrote: > Hi all, > > This patch series contains two improvements for the SiFive PLIC DT > bindings. > > Changes compared to v1[1]: > - Split in two patches, > - Improve patch description and document limit rationale. > > Thanks! > > [1] https://lore.kernel.org/r/20211125152317.162958-1-geert@linux-m68k.org > > Geert Uytterhoeven (2): > dt-bindings: timer: sifive,clint: Fix number of interrupts > dt-bindings: timer: sifive,clint: Group interrupt tuples > > .../devicetree/bindings/timer/sifive,clint.yaml | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) Please resend the timer bindings changes, the GPU and NAND controller series are confusing the b4 tools Thanks -- Daniel -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 0/2] dt-bindings: timer: sifive,clint: Miscellaneous improvements @ 2021-12-20 12:20 ` Daniel Lezcano 0 siblings, 0 replies; 123+ messages in thread From: Daniel Lezcano @ 2021-12-20 12:20 UTC (permalink / raw) To: Geert Uytterhoeven, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel Cc: linux-kernel, devicetree, linux-riscv On 16/12/2021 14:43, Geert Uytterhoeven wrote: > Hi all, > > This patch series contains two improvements for the SiFive PLIC DT > bindings. > > Changes compared to v1[1]: > - Split in two patches, > - Improve patch description and document limit rationale. > > Thanks! > > [1] https://lore.kernel.org/r/20211125152317.162958-1-geert@linux-m68k.org > > Geert Uytterhoeven (2): > dt-bindings: timer: sifive,clint: Fix number of interrupts > dt-bindings: timer: sifive,clint: Group interrupt tuples > > .../devicetree/bindings/timer/sifive,clint.yaml | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) Please resend the timer bindings changes, the GPU and NAND controller series are confusing the b4 tools Thanks -- Daniel -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 0/2] dt-bindings: timer: sifive,clint: Miscellaneous improvements 2021-12-20 12:20 ` Daniel Lezcano @ 2021-12-20 12:22 ` Daniel Lezcano -1 siblings, 0 replies; 123+ messages in thread From: Daniel Lezcano @ 2021-12-20 12:22 UTC (permalink / raw) To: Geert Uytterhoeven, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel Cc: linux-kernel, devicetree, linux-riscv On 20/12/2021 13:20, Daniel Lezcano wrote: > On 16/12/2021 14:43, Geert Uytterhoeven wrote: >> Hi all, >> >> This patch series contains two improvements for the SiFive PLIC DT >> bindings. >> >> Changes compared to v1[1]: >> - Split in two patches, >> - Improve patch description and document limit rationale. >> >> Thanks! >> >> [1] https://lore.kernel.org/r/20211125152317.162958-1-geert@linux-m68k.org >> >> Geert Uytterhoeven (2): >> dt-bindings: timer: sifive,clint: Fix number of interrupts >> dt-bindings: timer: sifive,clint: Group interrupt tuples >> >> .../devicetree/bindings/timer/sifive,clint.yaml | 9 +++++---- >> 1 file changed, 5 insertions(+), 4 deletions(-) > > Please resend the timer bindings changes, the GPU and NAND controller > series are confusing the b4 tools Never mind, I just noticed the V3 ;) -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog ^ permalink raw reply [flat|nested] 123+ messages in thread
* Re: [PATCH v2 0/2] dt-bindings: timer: sifive,clint: Miscellaneous improvements @ 2021-12-20 12:22 ` Daniel Lezcano 0 siblings, 0 replies; 123+ messages in thread From: Daniel Lezcano @ 2021-12-20 12:22 UTC (permalink / raw) To: Geert Uytterhoeven, Thomas Gleixner, Rob Herring, Palmer Dabbelt, Paul Walmsley, Anup Patel Cc: linux-kernel, devicetree, linux-riscv On 20/12/2021 13:20, Daniel Lezcano wrote: > On 16/12/2021 14:43, Geert Uytterhoeven wrote: >> Hi all, >> >> This patch series contains two improvements for the SiFive PLIC DT >> bindings. >> >> Changes compared to v1[1]: >> - Split in two patches, >> - Improve patch description and document limit rationale. >> >> Thanks! >> >> [1] https://lore.kernel.org/r/20211125152317.162958-1-geert@linux-m68k.org >> >> Geert Uytterhoeven (2): >> dt-bindings: timer: sifive,clint: Fix number of interrupts >> dt-bindings: timer: sifive,clint: Group interrupt tuples >> >> .../devicetree/bindings/timer/sifive,clint.yaml | 9 +++++---- >> 1 file changed, 5 insertions(+), 4 deletions(-) > > Please resend the timer bindings changes, the GPU and NAND controller > series are confusing the b4 tools Never mind, I just noticed the V3 ;) -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv ^ permalink raw reply [flat|nested] 123+ messages in thread
end of thread, other threads:[~2021-12-20 12:22 UTC | newest] Thread overview: 123+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-12-16 13:37 [PATCH v2 00/11] riscv: dts: Miscellaneous fixes Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-08 10:40 ` [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC Biju Das 2021-12-16 13:43 ` Geert Uytterhoeven 2021-12-16 13:43 ` Geert Uytterhoeven 2021-12-16 13:41 ` Geert Uytterhoeven 2021-12-16 13:41 ` Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-08 10:40 ` Biju Das 2021-12-08 10:40 ` [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Document RZ/G2L support Biju Das 2021-12-08 10:40 ` Biju Das 2021-12-10 14:44 ` Biju Das 2021-12-10 14:44 ` Biju Das 2021-12-14 19:21 ` Rob Herring 2021-12-14 19:21 ` Rob Herring 2021-12-14 19:31 ` Biju Das 2021-12-14 19:31 ` Biju Das 2021-12-13 16:46 ` Steven Price 2021-12-13 16:46 ` Steven Price 2021-12-14 19:25 ` Rob Herring 2021-12-14 19:25 ` Rob Herring 2021-12-08 10:40 ` [PATCH v3 2/3] arm64: dts: renesas: r9a07g044: Add Mali-G31 GPU node Biju Das 2021-12-08 10:40 ` [PATCH v3 3/3] arm64: dts: renesas: rzg2l-smarc-som: Add vdd core regulator Biju Das 2021-12-16 13:46 ` [PATCH v3 0/3] Add Mali-G31 GPU support for RZ/G2L SoC Geert Uytterhoeven 2021-12-16 13:46 ` Geert Uytterhoeven 2021-12-16 13:46 ` Geert Uytterhoeven 2021-12-16 13:47 ` Geert Uytterhoeven 2021-12-16 13:47 ` Geert Uytterhoeven 2021-12-16 13:47 ` Geert Uytterhoeven 2021-12-16 13:47 ` Geert Uytterhoeven 2021-12-16 13:47 ` Geert Uytterhoeven 2021-12-16 13:47 ` Geert Uytterhoeven 2021-12-16 14:00 ` Daniel Stone 2021-12-16 14:00 ` Daniel Stone 2021-12-16 14:02 ` Biju Das 2021-12-16 14:02 ` Biju Das 2021-12-15 15:46 ` [PATCH v4 0/4] Renesas RZ/N1 NAND controller support Miquel Raynal 2021-12-16 13:43 ` Geert Uytterhoeven 2021-12-16 13:43 ` Geert Uytterhoeven 2021-12-16 13:41 ` Geert Uytterhoeven 2021-12-16 13:41 ` Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-15 15:46 ` Miquel Raynal 2021-12-15 15:46 ` [PATCH v4 1/4] dt-bindings: mtd: rzn1: Describe Renesas RZ/N1 NAND controller Miquel Raynal 2021-12-15 15:46 ` Miquel Raynal 2021-12-16 20:23 ` Rob Herring 2021-12-16 20:23 ` Rob Herring 2021-12-15 15:46 ` [PATCH v4 2/4] mtd: rawnand: rzn1: Add new NAND controller driver Miquel Raynal 2021-12-15 15:46 ` Miquel Raynal 2021-12-15 20:35 ` kernel test robot 2021-12-15 20:35 ` kernel test robot 2021-12-15 20:35 ` kernel test robot 2021-12-15 15:46 ` [PATCH v4 3/4] MAINTAINERS: Add an entry for Renesas RZ/N1 NAND controller Miquel Raynal 2021-12-15 15:46 ` Miquel Raynal 2021-12-15 15:46 ` [PATCH v4 4/4] ARM: dts: r9a06g032: Describe " Miquel Raynal 2021-12-15 15:46 ` Miquel Raynal 2021-12-16 9:13 ` Geert Uytterhoeven 2021-12-16 9:13 ` Geert Uytterhoeven 2021-12-16 13:47 ` [PATCH v4 0/4] Renesas RZ/N1 NAND controller support Geert Uytterhoeven 2021-12-16 13:47 ` Geert Uytterhoeven 2021-12-16 13:47 ` Geert Uytterhoeven 2021-12-16 13:48 ` Geert Uytterhoeven 2021-12-16 13:48 ` Geert Uytterhoeven 2021-12-16 13:48 ` Geert Uytterhoeven 2021-12-16 13:48 ` Geert Uytterhoeven 2021-12-16 13:48 ` Geert Uytterhoeven 2021-12-16 13:48 ` Geert Uytterhoeven 2021-12-16 13:37 ` [PATCH v2 01/11] riscv: dts: canaan: Fix SPI FLASH node names Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:37 ` [PATCH v2 02/11] riscv: dts: canaan: Group tuples in interrupt properties Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:37 ` [PATCH v2 03/11] riscv: dts: microchip: mpfs: Drop empty chosen node Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:37 ` [PATCH v2 04/11] riscv: dts: microchip: mpfs: Fix PLIC node Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:37 ` [PATCH v2 05/11] riscv: dts: microchip: mpfs: Fix reference clock node Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 14:39 ` Conor.Dooley 2021-12-16 14:39 ` Conor.Dooley 2021-12-16 13:37 ` [PATCH v2 06/11] riscv: dts: microchip: mpfs: Fix clock controller node Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 14:47 ` Conor.Dooley 2021-12-16 14:47 ` Conor.Dooley 2021-12-16 13:37 ` [PATCH v2 07/11] riscv: dts: microchip: mpfs: Group tuples in interrupt properties Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:37 ` [PATCH v2 08/11] riscv: dts: sifive: " Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:37 ` [PATCH v2 09/11] riscv: dts: sifive: Group tuples in register properties Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:37 ` [PATCH v2 10/11] riscv: dts: sifive: fu540-c000: Drop bogus soc node compatible values Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:37 ` [PATCH v2 11/11] riscv: dts: sifive: fu540-c000: Fix PLIC node Geert Uytterhoeven 2021-12-16 13:37 ` Geert Uytterhoeven 2021-12-16 13:41 [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive,plic: Miscellaneous improvements Geert Uytterhoeven 2021-12-16 13:41 ` [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive, plic: " Geert Uytterhoeven 2021-12-16 13:41 ` [PATCH v2 1/2] dt-bindings: interrupt-controller: sifive,plic: Fix number of interrupts Geert Uytterhoeven 2021-12-16 13:41 ` [PATCH v2 1/2] dt-bindings: interrupt-controller: sifive, plic: " Geert Uytterhoeven 2021-12-16 21:29 ` [PATCH v2 1/2] dt-bindings: interrupt-controller: sifive,plic: " Rob Herring 2021-12-16 21:29 ` Rob Herring 2021-12-16 13:41 ` [PATCH v2 2/2] dt-bindings: interrupt-controller: sifive,plic: Group interrupt tuples Geert Uytterhoeven 2021-12-16 13:41 ` [PATCH v2 2/2] dt-bindings: interrupt-controller: sifive, plic: " Geert Uytterhoeven 2021-12-16 21:29 ` [PATCH v2 2/2] dt-bindings: interrupt-controller: sifive,plic: " Rob Herring 2021-12-16 21:29 ` Rob Herring 2021-12-16 21:28 ` [PATCH v2 0/2] dt-bindings: interrupt-controller: sifive,plic: Miscellaneous improvements Rob Herring 2021-12-16 21:28 ` Rob Herring 2021-12-17 8:02 ` Geert Uytterhoeven 2021-12-17 8:02 ` Geert Uytterhoeven 2021-12-16 13:43 [PATCH v2 0/2] dt-bindings: timer: sifive,clint: " Geert Uytterhoeven 2021-12-16 13:43 ` [PATCH v2 0/2] dt-bindings: timer: sifive, clint: " Geert Uytterhoeven 2021-12-16 13:43 ` [PATCH v2 1/2] dt-bindings: timer: sifive,clint: Fix number of interrupts Geert Uytterhoeven 2021-12-16 13:43 ` [PATCH v2 1/2] dt-bindings: timer: sifive, clint: " Geert Uytterhoeven 2021-12-16 21:30 ` [PATCH v2 1/2] dt-bindings: timer: sifive,clint: " Rob Herring 2021-12-16 21:30 ` Rob Herring 2021-12-16 13:43 ` [PATCH v2 2/2] dt-bindings: timer: sifive,clint: Group interrupt tuples Geert Uytterhoeven 2021-12-16 13:43 ` [PATCH v2 2/2] dt-bindings: timer: sifive, clint: " Geert Uytterhoeven 2021-12-16 21:30 ` [PATCH v2 2/2] dt-bindings: timer: sifive,clint: " Rob Herring 2021-12-16 21:30 ` [PATCH v2 2/2] dt-bindings: timer: sifive, clint: " Rob Herring 2021-12-20 12:20 ` [PATCH v2 0/2] dt-bindings: timer: sifive,clint: Miscellaneous improvements Daniel Lezcano 2021-12-20 12:20 ` Daniel Lezcano 2021-12-20 12:22 ` Daniel Lezcano 2021-12-20 12:22 ` Daniel Lezcano
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.