Device Tree Issue - DS1390 RTC

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Device Tree Issue - DS1390 RTC

1,407件の閲覧回数
PaulDeMetrotion
Senior Contributor I

I have added a Maxim DS1390 Real-Time Clock to an SPI bus on a custom board with a i.MX6DL processor. I have added the RTC to my device tree as shown here:

&ecspi1 {

    fsl,spi-num-chipselects = <4>;

    cs-gpios = GP_SPI1_SS0, /* GPIO2_30 */

               GP_SPI1_SS1, /* GPIO5_9 - unused */

               GP_SPI1_SS2, /* GPIO3_24 - unused */

               GP_SPI1_SS3; /* GPIO3_25 */

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_ecspi1>;

    status = "okay";

    m25p80@0 {

        #address-cells = <1>;

        #size-cells = <1>;

        compatible = "st,m25p32";

        reg = <0>;

        spi-max-frequency = <20000000>;

        partition@0 {

            label = "bootloader";

            reg = <0x0 0x80000>;

            read-only;

        };

        partition@1 {

            label = "bootenv";

            reg = <0x80000 0x2000>;

        };

        partition@2 {

            label = "kernel";

            reg = <0x90000 0x370000>;

            read-only;

        };

    };

    rtc@3 {

        #address-cells = <1>;

        #size-cells = <1>;

        compatible = "dallas,ds1390";

        reg = <3>;

        spi-max-frequency = <4000000>;

        spi-cpol;

       spi-cpha;

    };

};

The device appears to be initialized by reading the boot messages (shown below) but the driver probe function for the DS1390 driver is never called. Any idea why the probe function is never called?

root@imx6dlc420:~# dmesg | grep spi

[    1.081027] of_dma_request_slave_channel: dma-names property of node '/soc/aips-bus@02000000/spba-bus@02000000/ecspi@02008000' missing or empty

[    1.092637] spi_imx 2008000.ecspi: cannot get the TX DMA channel!

[    1.097453] spi_imx 2008000.ecspi: dma setup error,use pio instead

[    1.102472] spi_imx 2008000.ecspi: registered master spi0

[    1.102832] spi spi0.0: spi_imx_setup: mode 0, 8 bpw, 20000000 hz

[    1.102850] spi spi0.0: setup mode 0, 8 bits/w, 20000000 Hz max --> 0

[    1.103029] mx51_ecspi_clkdiv: fin: 60000000, fspi: 20000000, post: 0, pre: 2

[    1.103071] mx51_ecspi_clkdiv: fin: 60000000, fspi: 20000000, post: 0, pre: 2

[    1.103148] m25p80 spi0.0: m25p32 (4096 Kbytes)

[    1.106428] 3 ofpart partitions found on MTD device spi0.0

[    1.110620] Creating 3 MTD partitions on "spi0.0":

[    1.128429] spi_imx 2008000.ecspi: registered child spi0.0

[    1.128673] spi spi0.3: spi_imx_setup: mode 3, 8 bpw, 4000000 hz

[    1.128690] spi spi0.3: setup mode 3, 8 bits/w, 4000000 Hz max --> 0

[    1.128822] spi_imx 2008000.ecspi: registered child spi0.3

[    1.128833] spi_imx 2008000.ecspi: probed

0 件の賞賛
1 返信

727件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Paul

one can check presence string .compatible = "dallas,ds1390"

in driver code, as for example in

linux-2.6-imx.git - Freescale i.MX Linux Tree

More details about driver binding and probe sequence can

be found in device tree documents or descriptions, for example on

http://events.linuxfoundation.org/sites/events/files/slides/dt_debugging.pdf

http://xillybus.com/tutorials/device-tree-zynq-3

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛