Date: Mon, 17 Mar 2014 10:31:54 -0300 From: Luiz Otavio O Souza <loos.br@gmail.com> To: freebsd-arm@freebsd.org, "freebsd-embedded@freebsd.org" <freebsd-embedded@freebsd.org> Subject: [RFC] AM335x (Beaglebone-black) ADC driver Message-ID: <CAJ8CS7pZ2e%2BAL5tHB9dX==iRLe7Rpm5bQ80VMgxL841UOgqaPw@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
--047d7bb709886b3cc004f4cd7118 Content-Type: text/plain; charset=ISO-8859-1 Hi, I've written a driver for the am335x ADC module (AIN inputs on BBB). It works from the sysctl(8) interface, each input can be individually enabled/disabled. When all the inputs are disabled, the ADC is turned off. The sysctl(8) interface also allows the selection of the number of the samples average for each input (none, 2, 4, 8, 16) and the setting of the ADC prescaler value (low clock speeds gives far stable readings with the cost of loading - sometimes too much - the input circuit as conversions can take a long time). The converted values are exported as raw values (12 bits - 0 ~ 4095). The ADC module can also work as a touchscreen sensor, but i have no idea how to program the module as TSC sensor neither have the hardware to test it, so this driver only works for reading the AIN converted values. Here is the output of the sysctl(8) for this driver: # sysctl dev.am335x_adc.0 dev.am335x_adc.0.%desc: AM335x ADC controller dev.am335x_adc.0.%driver: am335x_adc dev.am335x_adc.0.%pnpinfo: name=adc@44E0D000 compat=ti,am335x-adc dev.am335x_adc.0.%parent: simplebus0 dev.am335x_adc.0.clockdiv: 30000 dev.am335x_adc.0.ain.0.enable: 0 dev.am335x_adc.0.ain.0.samples_avg: 0 dev.am335x_adc.0.ain.0.input: 0 dev.am335x_adc.0.ain.1.enable: 0 dev.am335x_adc.0.ain.1.samples_avg: 0 dev.am335x_adc.0.ain.1.input: 0 dev.am335x_adc.0.ain.2.enable: 0 dev.am335x_adc.0.ain.2.samples_avg: 0 dev.am335x_adc.0.ain.2.input: 0 dev.am335x_adc.0.ain.3.enable: 0 dev.am335x_adc.0.ain.3.samples_avg: 0 dev.am335x_adc.0.ain.3.input: 0 dev.am335x_adc.0.ain.4.enable: 0 dev.am335x_adc.0.ain.4.samples_avg: 0 dev.am335x_adc.0.ain.4.input: 0 dev.am335x_adc.0.ain.5.enable: 0 dev.am335x_adc.0.ain.5.samples_avg: 0 dev.am335x_adc.0.ain.5.input: 0 dev.am335x_adc.0.ain.6.enable: 1 dev.am335x_adc.0.ain.6.samples_avg: 0 dev.am335x_adc.0.ain.6.input: 2176 I've checked the 7 AINs with a potentiometer connected to them (and using VDD_ADC and GNDA_ADC). I am now writing the man page so i can ask for a approval to commit it. Comments ? Regards, Luiz --047d7bb709886b3cc004f4cd7118 Content-Type: text/plain; charset=US-ASCII; name="am335x_adc.diff" Content-Disposition: attachment; filename="am335x_adc.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hsvse87w0 SW5kZXg6IHN5cy9hcm0vdGkvYW0zMzV4L2FtMzM1eF9wcmNtLmMKPT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lz L2FybS90aS9hbTMzNXgvYW0zMzV4X3ByY20uYwkocmV2aXNpb24gMjYyMTMxKQorKysgc3lzL2Fy bS90aS9hbTMzNXgvYW0zMzV4X3ByY20uYwkod29ya2luZyBjb3B5KQpAQCAtMTA3LDYgKzEwNyw3 IEBACiAjZGVmaW5lIENNX1dLVVBfQ01fQ0xLRENPTERPX0RQTExfUEVSCShDTV9XS1VQICsgMHgw N0MpCiAjZGVmaW5lIENNX1dLVVBfQ01fQ0xLTU9ERV9EUExMX0RJU1AJKENNX1dLVVAgKyAweDA5 OCkKICNkZWZpbmUgQ01fV0tVUF9JMkMwX0NMS0NUUkwJCShDTV9XS1VQICsgMHgwQjgpCisjZGVm aW5lIENNX1dLVVBfQURDX1RTQ19DTEtDVFJMCQkoQ01fV0tVUCArIDB4MEJDKQogCiAjZGVmaW5l IENNX0RQTEwJCQkJMHg1MDAKICNkZWZpbmUgQ0xLU0VMX1RJTUVSN19DTEsJCShDTV9EUExMICsg MHgwMDQpCkBAIC0yNjAsNi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so c2MpOworCS8qIERpc2FibGUgdGhlIEFEQy4gKi8KKwlhbTMzNXhfYWRjX2Rpc2FibGUoc2MpOwor CS8qIFVwZGF0ZSB0aGUgQURDIHByZXNjYWxlciBzZXR0aW5nLiAqLworCUFEQ19XUklURTQoc2Ms IEFEQ19DTEtESVYsIHJlZyk7CisJLyogRW5hYmxlIHRoZSBBREMgYWdhaW4uICovCisJYW0zMzV4 X2FkY19zZXR1cChzYyk7CisJQU0zMzVYX0FEQ19VTkxPQ0soc2MpOworCisJcmV0dXJuICgwKTsK K30KKworc3RhdGljIGludAorYW0zMzV4X2FkY19lbmFibGVfcHJvYyhTWVNDVExfSEFORExFUl9B UkdTKQoreworCWludCBlcnJvcjsKKwlpbnQzMl90IGVuYWJsZTsKKwlzdHJ1Y3QgYW0zMzV4X2Fk Y19zb2Z0YyAqc2M7CisJc3RydWN0IGFtMzM1eF9hZGNfaW5wdXQgKmlucHV0OworCisJaW5wdXQg PSAoc3RydWN0IGFtMzM1eF9hZGNfaW5wdXQgKilhcmcxOworCXNjID0gaW5wdXQtPnNjOworCisJ ZW5hYmxlID0gaW5wdXQtPmVuYWJsZTsKKwllcnJvciA9IHN5c2N0bF9oYW5kbGVfaW50KG9pZHAs ICZlbmFibGUsIHNpemVvZihlbmFibGUpLAorCSAgICByZXEpOworCWlmIChlcnJvciAhPSAwIHx8 IHJlcS0+bmV3cHRyID09IE5VTEwpCisJCXJldHVybiAoZXJyb3IpOworCisJaWYgKGVuYWJsZSkK KwkJZW5hYmxlID0gMTsKKworCUFNMzM1WF9BRENfTE9DSyhzYyk7CisJLyogU2V0dXAgdGhlIEFE QyBhcyBuZWVkZWQuICovCisJaWYgKGlucHV0LT5lbmFibGUgIT0gZW5hYmxlKSB7CisJCWlucHV0 LT5lbmFibGUgPSBlbmFibGU7CisJCWFtMzM1eF9hZGNfc2V0dXAoc2MpOworCX0KKwlBTTMzNVhf QURDX1VOTE9DSyhzYyk7CisKKwlyZXR1cm4gKDApOworfQorCitzdG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JbmRleDogc3lzL2FybS9jb25mL0JFQUdMRUJPTkUKPT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2FybS9j b25mL0JFQUdMRUJPTkUJKHJldmlzaW9uIDI2MjEzMSkKKysrIHN5cy9hcm0vY29uZi9CRUFHTEVC T05FCSh3b3JraW5nIGNvcHkpCkBAIC0xMDMsNiArMTAzLDkgQEAKIGRldmljZQkJZ3BpbwogZGV2 aWNlCQlncGlvbGVkCiAKKyMgQURDIHN1cHBvcnQKK2RldmljZQkJYW0zMzV4X2FkYworCiAjIFVT QiBzdXBwb3J0CiBkZXZpY2UJCXVzYgogb3B0aW9ucyAJVVNCX0hPU1RfQUxJR049NjQJIyBDYWNo ZWxpbmUgc2l6ZSBpcyA2NCBvbiBBTTMzNXguCg== --047d7bb709886b3cc004f4cd7118--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ8CS7pZ2e%2BAL5tHB9dX==iRLe7Rpm5bQ80VMgxL841UOgqaPw>