Open vjoco opened 8 months ago
I can compile the kernel if i put:
onewire {
compatible = "w1-gpio";
gpios = <&gpio0_pa4 7 GPIO_ACTIVE_HIGH>;
status = "enabled";
};
and then
&pinctrl {
//Victor
gpio0-pa4 {
gpio0_pa4:gpio0-pa4 {
rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
In kernel i enabled CONFIG_W1_MASTER_GPIO=y CONFIG_W1=y CONFIG_W1_SLAVE_THERM=y
but i see no devices .... .. and no activity on the gpio pin on an osciloscope .. with or without pull up
I just observed problems on kernel messages: [ 0.126144] Driver for 1-wire Dallas network protocol. [ 0.126540] OF: /onewire: could not get #gpio-cells for /pinctrl/gpio0-pa4/gpio0-pa4 [ 0.126569] w1-gpio onewire: gpio_request (pin) failed [ 0.126618] w1-gpio: probe of onewire failed with error -22 ---- let's see
I don’t have DS18B20 on hand, so I can’t test it at the moment. I'm not sure whether it can be achieved, because the real-time performance of regular Linux systems is not very high, and the support for this kind of single bus is not very good.
@vjoco Have you managed it to run?
@kawapiki I gave up. I switch to dht111 , they have a kernel driver example. It's quite a pitty but I dont have more time to dig in.
Thanks, that was my other option too
I got 1-wire devices working by using this module: https://github.com/pstolarz/w1-gpio-cl/ Also enabled mentioned kernel modules and now I can runtime enable/disable w1-masters for gpio ports.
I want to access DS18b20 1-wire temperature sensors. The kernel have support for W1_SLAVE_THERM, that includes DS18b20.
But I have no idea how to map the pin in the device tree.... This dts extra code code gives errors: