Ok, I got something working, partly by luck, and partly by intuition. I 
still do not know what the hell I'm doing with device tree files . . . but 
everything makes sense.

/dts-v1/;
/plugin/;

/ {
        compatible = "ti,beaglebone", "ti,beaglebone-black";

        /* identification */
        part-number = "WH-ADC";
        version = "00A0";


        fragment@0 {
                target = <&tscadc>;
                __overlay__ {
                        compatible = "uio";
                        uio-alias = "adc";
                        status = "okay";
                };
        };
};


$ dtc -O dtb -o WH-ADC-00A0.dtbo -b 0 -@ WH-ADC-00A0.dts
$ sudo cp WH-ADC-00A0.dtbo /lib/firmware/
$ sudo sh -c "echo 'WH-ADC' > /sys/devices/platform/bone_capemgr/slots"

$ dmesg | grep WH-ADC
[ 1290.096328] bone_capemgr bone_capemgr: part_number 'WH-ADC', version 
'N/A'
[ 1290.116039] bone_capemgr bone_capemgr: slot #5: 'Override Board 
Name,00A0,Override Manuf,WH-ADC'
[ 1290.137733] bone_capemgr bone_capemgr: slot #5: dtbo 'WH-ADC-00A0.dtbo' 
loaded; overlay id #0

$ ls /dev/uio
adc

$ ./lsuio
uio0: name=tscadc, version=devicetree, events=0
        map[0]: addr=0x44E0D000, size=4096




-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to