Myy Posted April 21, 2020 Posted April 21, 2020 Anything in dmesg related to W1 ? If the modules are loaded, that mean that the detection was done correctly. However, something might have happened during one of these modules initialization.
mtr46 Posted April 21, 2020 Posted April 21, 2020 dmesg says [ 2.453319] Driver for 1-wire Dallas network protocol.
mtr46 Posted April 21, 2020 Posted April 21, 2020 I'm starting to understand. A closer look at dmesg showed the following error. [3.768101] Driver for 1-wire Dallas network protocol. [ 3.768532] rockchip-pinctrl pinctrl: unable to find group for node w1_pins [3.768554] w1-gpio: probe of onewire failed with error -22 I think I'm writing the DTS wrong way, so I'm going to review it.
mtr46 Posted April 22, 2020 Posted April 22, 2020 I'm not sure. It simply describes the DTS as follows: / { model = "Rockchip RK3288 Asus Tinker Board S"; compatible = "asus,rk3288-tinker-s", "rockchip,rk3288"; onewire { compatible = "w1-gpio"; pinctrl-names = "default"; pinctrl-0 = <&w1_pins>; gpios = <&gpio0 17 0>; }; }; &pinctrl { w1_pins: w1-pins { rockchip,pins = <0 17 0 &pcfg_pull_up>; }; }; If this is read at boot time, dmesg will print the following error: [8.225790] Driver for 1-wire Dallas network protocol. [ 8.230301] rockchip-pinctrl pinctrl: unable to find group for node w1-pins [ 8.230333] w1-gpio: probe of onewire failed with error -22 I don't know why it is "unable to find group for node w1-pins" at all. Do you have any good advice? kernel version is: $ uname -a Linux tinkerboard 5.4.34-rockchip #trunk SMP PREEMPT Tue Apr 21 23:15:05 JST 2020 armv7l GNU/Linux
mtr46 Posted April 23, 2020 Posted April 23, 2020 The problem has been solved. I rewrote the DTS as follows: / { w1 { compatible = "w1-gpio"; pinctrl-names = "default"; pinctrl-0 = <&w1_gpio_pins>; gpios = <&gpio0 17 0>; }; }; &pinctrl { onewire { w1_gpio_pins: w1-gpio-pins { rockchip,pins = <0 17 0 &pcfg_pull_up>; }; }; }; I am now able to use 1-wire. results: root@tinkerboard:/sys/bus/w1/devices# ll total 0 drwxr-xr-x 2 root root 0 Apr 23 19:49 . drwxr-xr-x 4 root root 0 Apr 23 19:49 .. lrwxrwxrwx 1 root root 0 Apr 23 19:50 28-031590341bff -> ../../../devices/w1_bus_master1/28-031590341bff lrwxrwxrwx 1 root root 0 Apr 23 19:50 28-0416505667ff -> ../../../devices/w1_bus_master1/28-0416505667ff lrwxrwxrwx 1 root root 0 Apr 23 19:49 w1_bus_master1 -> ../../../devices/w1_bus_master1 root@tinkerboard:/sys/bus/w1/devices# cat 28-031590341bff/w1_slave 61 01 4b 46 7f ff 0c 10 57 : crc=57 YES 61 01 4b 46 7f ff 0c 10 57 t=22062 Regards, 1
Recommended Posts