I'm trying to get 1-wire implemented on a Udoo Quad (i.mx6qdl), and have been searching through various examples on how to do it (Raspberry Pi/BeagleBone etc). I added in kernel support for w1-gpio and w1-therm, but I'm not sure what syntax needs to be added into the device tree (linux_kernel/imx6qdl-udoo.dtsi at imx_3.14.28_1.0.0_ga_udoo · UDOOboard/linux_kernel · GitHub ).
I looked at the beaglebone implementation (BeagleBone Black 1-Wire Temperature with Debian 8 (Jessie), Kernel 4.1.x and No Capemgr ) and someone pointed me to a SAM9x5 implementation (arch/arm/boot/dts/at91sam9x5cm.dtsi - kernel/common.git - Git at Google ), but I'm still a bit confused (I'm new to kernels).
Any ideas?
Thanks!
Pete
anyone?
Take a look at arch/arm/boot/dts/imx28-tx28.dts for a reference as to how describe the w1-gpio in device tree.
Regards,
Fabio Estevam
So i think in that dts reference 1wire is disabled (I'm not sure)... For the Udoo - I picked GPIO133 (GPIO5_IO05), which from this diagram doesn't look like it would have too many conflicts with other functions.
I think this is correct for the dtsi file (again referencing the sam9x5 dtsi from above), but i'm not sure about the ????????? any ideas?
1wire {
compatible = "w1-gpio";
gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
linux,open-drain;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_1wire>;
status = "okay";
};
1wire {
pinctrl_1wire: 1wire-0 {
fsl,pins = <MX6QDL_PAD_DISP0_DAT11__GPIO5_IO05 ?????????>;
};
You can put 0x1b0b0, which is the default value for the IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA11 register.
So I recompiled the 4.2 kernel with the following : imx6qdl-udoo.dtsi - Pastebin.com , with "Thermal family implementation" as well as "GPIO 1-wire busmaster" and /or "Freescale MXC 1-wire busmaster" (I tried just GPIO, just Freescale and both).
Neither of the combinations above showed the one wire device (I tried multiple devices that work on beaglebone black with a pullup resistor installed).. any tips? doesn't seem like it should be this complicated.
You define GPIO5_IO05 twice, so this is likely causing you issues.
Try removing the following line from the external_hog:
MX6QDL_PAD_DISP0_DAT11__GPIO5_IO05 0x80000000 // pin 27