AnsweredAssumed Answered

imx6ul.the dts about the weim

Question asked by 益 李 on Apr 24, 2016
Latest reply on Apr 26, 2016 by 益 李


i went to use the weim driver,but i dont't know who to config the dts.

the kernel document have gave a Example:(kernel-source\Documentation\devicetree\bindings\bus\imx-weim.txt).

Example for an imx6q-sabreauto board, the NOR flash connected to the WEIM:

  weim: weim@021b8000 {

  compatible = "fsl,imx6q-weim";

  reg = <0x021b8000 0x4000>;

  clocks = <&clks 196>;

  #address-cells = <2>;

  #size-cells = <1>;

  ranges = <0 0 0x08000000 0x08000000>;

  nor@0,0 {

  compatible = "cfi-flash";

  reg = <0 0 0x02000000>;

  #address-cells = <1>;

  #size-cells = <1>;

  bank-width = <2>;

  fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000

  0x0000c000 0x1404a38e 0x00000000>;





mine :

weim: weim@021b8000 {

  compatible = "fsl,imx6ul-weim", "fsl,imx6q-weim";

  reg = <0x021b8000 0x4000>;

  interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;

  clocks = <&clks IMX6UL_CLK_EIM_SLOW_PODF>;

  };    //int the imx6ul.dtsi


&weim {

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_weim>;

  #address-cells = <2>;

  #size-cells = <1>;

  status = "okay";

  ranges = <0 0 0x50000000 0x08000000>;


  imx-weim@0,0 {

  compatible = "imx-weim";

  reg = <0 0 0x02000000>;

  #address-cells = <1>;

  #size-cells = <1>;

  bank-width = <2>;

  fsl,weim-cs-timing = <0x403304b1 0x00000001 0x0f010000

  0x00000008 0x0f040040 0x00000000>;


};   //in the imx6ul-14x14-evk.dts


pinctrl_weim: weimgrp {

  fsl,pins = <

  MX6UL_PAD_CSI_MCLK__EIM_CS0_B   0x10b0



  MX6UL_PAD_LCD_DATA08__EIM_DATA00 0x1b0b0




  };   //in the imx6ul-14x14-evk.dts



but i can't read the register and ioremap the weim memory.


tolt me i can check the CCM register CCM_CCGR6  . imx6ul:help,i can't read or write the weim  register.

when i changed the value ,i can read and write the memory.

thanks again .

but wen i use the  oscilloscope to check the wei.cs0 、wei.oe 、 

No matter how many times to read   ,they only change once ,and can't read or write the real value.



In my mind,if the kernel  afford the driver ,i only change the dts if i want to use the  driver .for example the ecspi ,i2c driver. but in this  mode ,i can't read the memory  if i didn't change the  CCM register CCM_CCGR6  .

i thank it's not the normal way to use this driver.

i can't find any more information form the kernel except the  Example for an imx6q-sabreauto board(kernel-source\Documentation\devicetree\bindings\bus\imx-weim.txt).

Some people tolt me i only to config the dts.and ioremap the 5000_0000 memory  phy_adr to read and write.

but i don't know how to config the dts in right way.

the Example  in the kernel Documentation  is  right?

why i have to config the   CCM register CCM_CCGR6  even i have  configed the dts Modelled on the Example  ,if i want to read or write the memory.

Thank you for attention!!