Jump to content

mtr46

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by mtr46

  1. 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,
  2. 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
  3. 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.
  4. dmesg says [ 2.453319] Driver for 1-wire Dallas network protocol.
  5. Yes, lsmod displays wire, w1-gpio and w1-therm.
  6. I tried to apply a new patch like this: --- diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts index c41d012c8..70c0b6365 100644 --- a/arch/arm/boot/dts/rk3288-miqi.dts +++ b/arch/arm/boot/dts/rk3288-miqi.dts @@ -37,6 +44,14 @@ }; }; + onewire { + compatible = "w1-gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&w1_pins>; + gpios = <&gpio0 17 0>; + status = "okay"; + }; + vcc_flash: flash-regulator { compatible = "regulator-fixed"; regulator-name = "vcc_flash"; @@ -294,6 +314,10 @@ drive-strength = <12>; }; + w1_pins: w1_pins@0 { + rockchip,pins = <0 17 0 &pcfg_pull_up>; + }; + act8846 { pmic_int: pmic-int { rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>; --- But, no devices found on /sys/bus/w1/devices. What should I do anything? EDIT: I want to use linux-mainline(5.4.y) kernel.
  7. Yes, I patched like this: --- diff --git a/arch/arm/boot/dts/rk3288-tinker-s.dts b/arch/arm/boot/dts/rk3288-tinker-s.dts index 970e13859..4fff9467d 100644 --- a/arch/arm/boot/dts/rk3288-tinker-s.dts +++ b/arch/arm/boot/dts/rk3288-tinker-s.dts @@ -10,6 +10,32 @@ / { model = "Rockchip RK3288 Asus Tinker Board S"; compatible = "asus,rk3288-tinker-s", "rockchip,rk3288"; + + fragment@0 { + target-path = "/"; + __overlay__ { + w1: onewire@0 { + compatible = "w1-gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&w1_pins>; + gpios = <&gpio0 17 0>; + status = "okay"; + }; + }; + }; + + fragment@1 { + target = <&gpio0>; + __overlay__ { + w1_pins: w1_pins@0 { + rockchip,pins = <0 17 0 &pcfg_pull_up>; + }; + }; + }; +}; + +&i2c1 { + status = "okay"; }; &emmc { @@ -28,3 +54,4 @@ pinctrl-names = "default"; pinctrl-0 = <&hdmi_cec_c0>; }; + --- and also w1-gpio is loaded on '/etc/modules'.
  8. Hi, I want to use 1-wire on TinkerBoard with the latest Linux Kernel. I created dtb with rk3288-tinker-s.dts patched with reference to RaspberryPi w1-gpio.dts, but it didn't work. When I run "cat /sys/kernel/debug/gpio", (w1) is not displayed. Is there any good workaround? Regards, Additional: I wrote a line 'fdtfile=rk3288-tinker-s.dtb' in /boot/armbianEnv.txt
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines