ARM: dts: at91: sama5d2: use the divided clock for SMC
authorRomain Izard <romain.izard.pro@gmail.com>
Tue, 20 Nov 2018 16:57:37 +0000 (17:57 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 21 Nov 2018 10:50:32 +0000 (11:50 +0100)
The SAMA5D2 is different from SAMA5D3 and SAMA5D4, as there are two
different clocks for the peripherals in the SoC. The Static Memory
controller is connected to the divided master clock.

Unfortunately, the device tree does not correctly show this and uses the
master clock directly. This clock is then used by the code for the NAND
controller to calculate the timings for the controller, and we end up with
slow NAND Flash access.

Fix the device tree, and the performance of Flash access is improved.

Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
arch/arm/boot/dts/sama5d2.dtsi

index 843052f14f1cff7d32cf9622ba1ea470c529aa2f..dd0dda6ed44b5ff9d7aec2574e10a0c34ed14130 100644 (file)
                                  0x1 0x0 0x60000000 0x10000000
                                  0x2 0x0 0x70000000 0x10000000
                                  0x3 0x0 0x80000000 0x10000000>;
-                       clocks = <&mck>;
+                       clocks = <&h32ck>;
                        status = "disabled";
 
                        nand_controller: nand-controller {