This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

am437x 使用1 wire总线问题



Hi,all,

在使用am437x开发板,sdk版本:ti-processor-sdk-linux-am437x-evm-01.00.00.03

打算使用gpio模拟1 wire的驱动,编译了 w1-gpio.ko这个驱动,但在加载模块时出现错误信息

#insmod w1-gpio.ko
[   57.400063] of_get_named_gpiod_flags exited with status 0
[   57.402945] of_get_named_gpiod_flags: can't parse gpios property of node '/onewire@0[1]'

使用gpio0_19作为模拟io, am437x-gp-evm.dts的修改如下

/ {
        model = "TI AM437x GP EVM";
        compatible = "ti,am437x-gp-evm","ti,am4372","ti,am43";

        ........

                bb_one_wire: onewire@0 {
                compatible      = "w1-gpio";
                #address-cells  = <1>;
                #size-cell      = <0>;
                status          = "okay";

                /* Setup the pins */
                pinctrl-names   = "default";
                pinctrl-0       = <&bb_w1_pins>;

                /* Define the new one-wire master as based on w1-gpio
                * and using GPIO0_19
                */
                gpios           = <&gpio0 19 0>;
                };
   };

   &am43xx_pinmux {
        pinctrl-names = "default", "sleep";
        pinctrl-0 = <&clkout2_pin>;

        ..........

                /*gpio0_19 for onewire use*/
                bb_w1_pins: pinmux_bb_w1_pins {
                pinctrl-single,pins = <0x1a4 0x37>;
        };
  };

估计是这个device tree修改上的问题,请帮忙!

谢谢!

Roy