alexreinert / piVCCU

piVCCU is a project to install the original Homematic CCU3 firmware inside a virtualized container (lxc) on ARM based single board computers.
Apache License 2.0
302 stars 64 forks source link

Missing /sys/class/raw-uart/raw-uart/reset_radio_module #107

Closed angelnu closed 5 years ago

angelnu commented 5 years ago

On an Orange PI+ with Armbian Ubuntu 18.04.1 4.14.84-sunxi I installed both pivccu-devicetree-armbian and pivccu-modules-dkms. The corresponding modules are loaded successfully:

root@pi2:~# lsmod |grep uart
dw_apb_raw_uart        16384  0
generic_raw_uart       20480  3 dw_apb_raw_uart

and the /dev/raw-uart works fine for both Homematic and Homematic IP with the latest angelnu/ccu:3 docker.

I am trying to use your led and reset alias for my docker image so I do not have to detect the HW type but use generic links such as /sys/class/leds/rpi_rf_mod\:blue/and /dev/raw-uart but I am missing the link for the reset pin. From your detect script I would expect it to be /sys/class/raw-uart/raw-uart/reset_radio_module but it is not there:

# ls -l /sys/class/raw-uart/raw-uart/
total 0
-r--r--r-- 1 root root 4096 Dec 26 03:16 dev
drwxr-xr-x 2 root root    0 Dec 26 03:16 power
lrwxrwxrwx 1 root root    0 Dec 26 03:16 subsystem -> ../../../../class/raw-uart
-rw-r--r-- 1 root root 4096 Dec 26 03:16 uevent

I see it under the devicetree but this has a HW-dependent path so not the generic method I am looking for.

# ls /sys/firmware/devicetree/base/soc/serial@01c28c00/
clocks      dma-names  interrupts     name     pinctrl-0      pivccu,blue_pin   pivccu,red_pin    reg           reg-shift  status
compatible  dmas       linux,phandle  phandle  pinctrl-names  pivccu,green_pin  pivccu,reset_pin  reg-io-width  resets
alexreinert commented 5 years ago

The new kernel modules using the /sys/class/raw-uart/*/reset_radio_module are only included in the testing apt repo at the moment.