I'm trying to connect an hx711 to GPIO23 and GPIO24 pins on an RPI3 A+, and I need to specify this in the device tree to have the hx711.ko driver be probed. I've been stuck on this problem for some time now, here is what I have done so far:
-Enabled the hx711 driver using menuconfig
and rebuilt the kernel
-Wrote the following device tree overlay based on the suggestion in the hx711 device tree documentation:
/dts-v1/;
/plugin/;
/{
compatible = "brcm,bcm2708";
fragment@0 {
__overlay__ {
target = <&gpio>;
weight_gpio: weight_gpio {
brcm,pins = <0x17 0x18>;
brcm,function = < 0x00 >;
#gpio-cells = < 0x02 >;
};
};
};
fragment@1 {
__overlay__ {
target = <&soc>;
weight: weight {
compatible = "avia,hx711";
sck-gpios = <&weight_gpio 0x17 0>;
dout-gpios = <&weight_gpio 0x18 0>;
avdd-supply = <&vdd_3v3_reg>;
status = "okay";
};
};
};
};
-Built using dtc giving the following output:
dtc -@ -I dts -O dtb -o hx711.dtbo hx711.dts
hx711.dtbo: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
hx711.dtbo: Warning (unit_address_vs_reg): Node /fragment@1 has a unit name, but no reg property
-added dtoverlay=hx711
line in config.txt
-Examined the currently loaded device tree using dmesg and the dtc command. Here is the output..
I get no information about my overlay. Not even and error saying it wasn't loaded.
I can see that the overlay I wrote for the mpu6050 (i2c device) works fine.
Any suggestions are appreciated.