Tool/software: Linux
Hi,
i wan't to connect a second device to the GPMC Interface of the AM335x
and need support to write the correct device tree file.
The first memory is a nand flash,
the second is a PowerLine Phy which is connected by a synchronous FIFO Interface as a "memory".
DAT[7:0] <-> GPMC_AD0-7
TXEN <- GPIO0_18
CRS -> GPIO2_8
/BUFWR <- GPMC_WE
RXDV -> GPIO1_17
RXER -> GPIO0_31
/BUFRD <- GPMC_RE
/BUFCS <- GPMC_CS1
CLK <- GPMC_CLK
I started this way, but got problems by starting the kernel:
&gpmc {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&nandflash_pins>;
ranges = <0 0 0x08000000 0x1000000>, /* CS0: NAND */
<1 0 0x18000000 0x1000000>; /* CS1: phy_mem */
nandflash: nand@0,0 {
compatible = "ti,omap2-nand";
reg = <0 0 4>; /* 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 */
nand-bus-width = <8>;
ti,nand-ecc-opt = "bch8";
gpmc,device-nand = "true";
gpmc,device-width = <1>;
gpmc,sync-clk-ps = <0>;
gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <30>;
gpmc,cs-wr-off-ns = <30>;
gpmc,adv-on-ns = <0>;
gpmc,adv-rd-off-ns = <30>;
gpmc,adv-wr-off-ns = <30>;
gpmc,we-on-ns = <0>;
gpmc,we-off-ns = <20>;
gpmc,oe-on-ns = <10>;
gpmc,oe-off-ns = <30>;
gpmc,access-ns = <30>;
gpmc,rd-cycle-ns = <30>;
gpmc,wr-cycle-ns = <30>;
gpmc,bus-turnaround-ns = <0>;
gpmc,cycle2cycle-delay-ns = <50>;
gpmc,cycle2cycle-diffcsen;
gpmc,clk-activation-ns = <0>;
gpmc,wr-access-ns = <30>;
gpmc,wr-data-mux-bus-ns = <0>;
ti,elm-id = <&elm>;
#address-cells = <1>;
#size-cells = <1>;
};
phy_ram: phy_ram@1,0 {
compatible = "phy_ram";
reg = <1 0 0x01000000>; /* CS1, offset 0, IO size 4 */
//clock-frequency = <40000000>;
///*gpmc,burst-write;*/
///*gpmc,burst-read;*/
///*gpmc,burst-wrap;*/
gpmc,sync-read; /* GPMC_CONFIG1_READTYPE_ASYNC */
gpmc,sync-write; /* GPMC_CONFIG1_WRITETYPE_ASYNC */
////gpmc,clk-activation-ns = <0>; /* GPMC_CONFIG1_CLKACTIVATIONTIME(2) */
////gpmc,burst-length = <16>; /* GPMC_CONFIG1_PAGE_LEN(2) */
////gpmc,mux-add-data = <2>; /* GPMC_CONFIG1_MUXTYPE(2) */
//gpmc,device-width = <1>;
gpmc,sync-clk-ps = <20000>; /* CONFIG2 */
//rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
//gpmc,cs-on-ns = <0>;
//gpmc,cs-rd-off-ns = <100>;
//gpmc,cs-wr-off-ns = <40>;
//gpmc,adv-on-ns = <0>; /* CONFIG3 */
//gpmc,adv-rd-off-ns = <20>;
//gpmc,adv-wr-off-ns = <20>;
//gpmc,we-on-ns = <20>; /* CONFIG4 */
//gpmc,we-off-ns = <40>;
//gpmc,oe-on-ns = <20>;
//gpmc,oe-off-ns = <100>;
//gpmc,page-burst-access-ns = <20>; /* CONFIG 5 */
//gpmc,access-ns = <80>;
//gpmc,rd-cycle-ns = <120>;
//gpmc,wr-cycle-ns = <60>;
//gpmc,wr-access-ns = <40>; /* CONFIG 6 */
//gpmc,wr-data-mux-bus-ns = <20>;
///*gpmc,bus-turnaround-ns = <40>;*/ /* CONFIG6:3:0 = 4 */
//gpmc,cycle2cycle-samecsen; /* CONFIG6:7 = 1 */
//gpmc,cycle2cycle-delay-ns = <20>; /* CONFIG6:11:8 = 4 */
gpmc,wait-on-read = "true"; /* wait operation enabling for read operation */
gpmc,wait-on-write = "true"; /* wait operation enabling for write operation */
};
};
Can someone give me some hints what i have to do for a correct configuration?
Thanks
DSP-SB