Tool/software: Linux
Hi,
Our product was designed to work with one of many different NAND part numbers, all of which may have different timing requirements. To circumvent these differences, we modified u-boot so that it will read the memory's parameter page, extract the device's speed class information, and configure the GPMC peripheral accordingly.
We are currently using Linux 3.2, which we modified as well so that it will not try to override the configurations made by u-boot, and this is working quite well. We also have a beta version of the 4.9-ltsi kernel adapted to our board, but without this modification that stops the kernel from reconfiguring the GPMC peripheral. The .dts GPMC node is described as such:
&gpmc {
status = "okay";
ranges = <0 0 0x01000000 0x10000000>; /* CS0: 256MB */
nand@0,0 {
compatible = "ti,omap2-nand";
reg = <0 0 8>; /* CS0, offset 0, IO size 4 */
interrupt-parent = <&gpmc>;
interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
<1 IRQ_TYPE_NONE>; /* termcount */
rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
ti,nand-ecc-opt = "bch8";
ti,elm-id = <&elm>;
nand-bus-width = <8>;
gpmc,device-width = <1>;
gpmc,sync-clk-ps = <0>;
gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <25>;
gpmc,cs-wr-off-ns = <25>;
gpmc,adv-on-ns = <0>;
gpmc,adv-rd-off-ns = <25>;
gpmc,adv-wr-off-ns = <25>;
gpmc,we-on-ns = <0>;
gpmc,we-off-ns = <10>;
gpmc,oe-on-ns = <0>;
gpmc,oe-off-ns = <10>;
gpmc,access-ns = <20>;
gpmc,rd-cycle-ns = <25>;
gpmc,wr-cycle-ns = <25>;
gpmc,wr-access-ns = <0>;
gpmc,wr-data-mux-bus-ns = <0>;
/* MTD partition table */
/* All SPL-* partitions are sized to minimal length
* which can be independently programmable. For
* NAND flash this is equal to size of erase-block */
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "SPL";
reg = <0x00000000 0x000020000>;
};
partition@1 {
label = "SPL.backup1";
reg = <0x00020000 0x00020000>;
};
partition@2 {
label = "SPL.backup2";
reg = <0x00040000 0x00020000>;
};
partition@3 {
label = "SPL.backup3";
reg = <0x00060000 0x00020000>;
};
partition@4 {
label = "u-boot";
reg = <0x00080000 0x00080000>;
};
partition@5 {
label = "u-boot.backup1";
reg = <0x00100000 0x00080000>;
};
partition@6 {
label = "u-boot.backup2";
reg = <0x00180000 0x00080000>;
};
partition@7 {
label = "u-boot.backup3";
reg = <0x00200000 0x00080000>;
};
partition@8 {
label = "kernel";
reg = <0x00280000 0x00500000>;
};
partition@9 {
label = "fs";
reg = <0x00780000 0x01400000>;
};
partition@10 {
label = "drivers";
reg = <0x01b80000 0x004e0000>;
};
partition@11 {
label = "dtb";
reg = <0x02060000 0x00020000>;
};
partition@12 {
label = "app";
reg = <0x02080000 0x00a00000>;
};
partition@13 {
label = "upgd";
reg = <0x02a80000 0x00200000>;
};
partition@14 {
label = "hwinfo";
reg = <0x02c80000 0x00100000>;
};
partition@15 {
label = "dmin";
reg = <0x02d80000 0x00a00000>;
};
partition@16 {
label = "dgen";
reg = <0x03780000 0x0c880000>;
};
};
};
What I want is a way to avoid having to describe the GPMC timings, and let the kernel use the previously configured values.
Regards,
Guilherme