Skip to contentSkip to conversation

Using lm-sensors with TWL4030

lm-sensors Niclas Knuts 3 participants 10 messages May 3, 2011 – May 4, 2011

lore
Share & tools
lore
#0 lore raw

Hi Guys,

I am trying to setup lm-sensors for use with the Texas Instruments TWL4030 Chip (the main processor is a OMAP3503). But I cannot seem to get it to detect the chip. I have added the hwmon drivers and I am using up to date MADC drivers that I have backported to kernel 2.6.32 (I am running Angstrom).

Cheers,
Niclas

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw
Quoted 5 lines · Niclas Knuts

I am trying to setup lm-sensors for use with the Texas Instruments TWL4030 Chip (the main processor is a OMAP3503). But I cannot seem to get it to detect the chip. I have added the hwmon drivers and I am using up to date MADC drivers that I have backported to kernel 2.6.32 (I am running Angstrom).

Disclaimer: I don't know a thing about this chip nor its drivers.

There is no detection support for this device in sensors-detect, if this was your question. I don't think this device can be detected from user-space.

My understanding is that the drivers for the TWL4030 should all get loaded automatically thanks to module aliases, as long as the TWL4030 itself is properly registered during platform setup. Check in lsmod whether twl4030-madc and twl4030-madc-hwmon are actually loaded. If not, try loading them manually.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Niclas Knuts
Quoted 11 lines · Jean Delvare
Quoted 5 lines · Niclas Knuts

I am trying to setup lm-sensors for use with the Texas Instruments TWL4030 Chip (the main processor is a OMAP3503). But I cannot seem to get it to detect the chip. I have added the hwmon drivers and I am using up to date MADC drivers that I have backported to kernel 2.6.32 (I am running Angstrom).

Disclaimer: I don't know a thing about this chip nor its drivers.

There is no detection support for this device in sensors-detect, if this was your question. I don't think this device can be detected from user-space.

I am aware that the automatic detect doesn't work, I have read through the sensors-detect script.

Quoted 5 lines

My understanding is that the drivers for the TWL4030 should all get loaded automatically thanks to module aliases, as long as the TWL4030 itself is properly registered during platform setup. Check in lsmod whether twl4030-madc and twl4030-madc-hwmon are actually loaded. If not, try loading them manually

lsmod doesn't show the drivers, but they should have been compiled into the kernel, not as modules. Maybe
that is the problem?

Regards,
Niclas

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#3 lore raw
In reply to Niclas Knuts
Quoted 14 lines · Niclas Knuts
Quoted 11 lines · Jean Delvare
Quoted 5 lines · Niclas Knuts

I am trying to setup lm-sensors for use with the Texas Instruments TWL4030 Chip (the main processor is a OMAP3503). But I cannot seem to get it to detect the chip. I have added the hwmon drivers and I am using up to date MADC drivers that I have backported to kernel 2.6.32 (I am running Angstrom).

Disclaimer: I don't know a thing about this chip nor its drivers.

There is no detection support for this device in sensors-detect, if this was your question. I don't think this device can be detected from user-space.

I am aware that the automatic detect doesn't work, I have read through the sensors-detect script.

Quoted 8 lines
Quoted 5 lines

My understanding is that the drivers for the TWL4030 should all get loaded automatically thanks to module aliases, as long as the TWL4030 itself is properly registered during platform setup. Check in lsmod whether twl4030-madc and twl4030-madc-hwmon are actually loaded. If not, try loading them manually

lsmod doesn't show the drivers, but they should have been compiled into the kernel, not as modules. Maybe
that is the problem?

No, this shouldn't make a difference. Check under /sys/devices/platform if the platform devices have been properly created.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#4 lore raw
In reply to Niclas Knuts
Quoted 20 lines · Jean Delvare
Quoted 19 lines · Niclas Knuts
Quoted 11 lines · Jean Delvare
Quoted 5 lines · Niclas Knuts

I am trying to setup lm-sensors for use with the Texas Instruments TWL4030 Chip (the main processor is a OMAP3503). But I cannot seem to get it to detect the chip. I have added the hwmon drivers and I am using up to date MADC drivers that I have backported to kernel 2.6.32 (I am running Angstrom).

Disclaimer: I don't know a thing about this chip nor its drivers.

There is no detection support for this device in sensors-detect, if this was your question. I don't think this device can be detected from user-space.

I am aware that the automatic detect doesn't work, I have read through the sensors-detect script.

Quoted 5 lines

My understanding is that the drivers for the TWL4030 should all get loaded automatically thanks to module aliases, as long as the TWL4030 itself is properly registered during platform setup. Check in lsmod whether twl4030-madc and twl4030-madc-hwmon are actually loaded. If not, try loading them manually

Quoted 5 lines
Quoted 3 lines

lsmod doesn't show the drivers, but they should have been compiled into the kernel, not as modules. Maybe
that is the problem?

No, this shouldn't make a difference. Check under /sys/devices/platform if the platform devices have been properly created

Ok, they are missing from there. I guess there is some problem with compiling in the drivers then. Is it enough to compile them in or do I initialize them in the board specific files in any way?

Regards,
Niclas

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#5 lore raw
In reply to Niclas Knuts
Quoted 21 lines · Niclas Knuts
Quoted 20 lines · Jean Delvare
Quoted 19 lines · Niclas Knuts
Quoted 11 lines · Jean Delvare
Quoted 5 lines · Niclas Knuts

I am trying to setup lm-sensors for use with the Texas Instruments TWL4030 Chip (the main processor is a OMAP3503). But I cannot seem to get it to detect the chip. I have added the hwmon drivers and I am using up to date MADC drivers that I have backported to kernel 2.6.32 (I am running Angstrom).

Disclaimer: I don't know a thing about this chip nor its drivers.

There is no detection support for this device in sensors-detect, if this was your question. I don't think this device can be detected from user-space.

I am aware that the automatic detect doesn't work, I have read through the sensors-detect script.

Quoted 5 lines

My understanding is that the drivers for the TWL4030 should all get loaded automatically thanks to module aliases, as long as the TWL4030 itself is properly registered during platform setup. Check in lsmod whether twl4030-madc and twl4030-madc-hwmon are actually loaded. If not, try loading them manually

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

lsmod doesn't show the drivers, but they should have been compiled into the kernel, not as modules. Maybe
that is the problem?

No, this shouldn't make a difference. Check under /sys/devices/platform if the platform devices have been properly created

Ok, they are missing from there. I guess there is some problem with compiling in the drivers then.

Again, no. Modules or built-in should make no difference.

Quoted 2 lines

Is it enough to compile them in or do I initialize them in the board specific files in any way?

Please take a look at:
drivers/mfd/twl-core.c

As I understand it, the board code has to instantiate one of the I2C devices listed in twl_ids. This will call twl_probe() which in turn should instantiate all the relevant platform devices. arch/arm/mach-omap2 contains many examples:

$ grep -rI '"twl4030"' arch/
arch/arm/mach-omap2/board-omap3stalker.c:	 I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0020.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3evm.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-2430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3beagle.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-3430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0030.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-ldp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3touchbook.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3logic.c:		I2C_BOARD_INFO("twl4030", 0x48),

That being said, I can't find any code to instantiate twl4030_madc_hwmon, so it might as well be that this part is missing from the upstream kernel. Cc'ing Keerthy and Axel Lin who probably know what's going on.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#6 lore raw
In reply to Niclas Knuts
Quoted 53 lines · Jean Delvare
Quoted 21 lines · Niclas Knuts
Quoted 20 lines · Jean Delvare
Quoted 19 lines · Niclas Knuts
Quoted 11 lines · Jean Delvare
Quoted 5 lines · Niclas Knuts

I am trying to setup lm-sensors for use with the Texas Instruments TWL4030 Chip (the main processor is a OMAP3503). But I cannot seem to get it to detect the chip. I have added the hwmon drivers and I am using up to date MADC drivers that I have backported to kernel 2.6.32 (I am running Angstrom).

Disclaimer: I don't know a thing about this chip nor its drivers.

There is no detection support for this device in sensors-detect, if this was your question. I don't think this device can be detected from user-space.

I am aware that the automatic detect doesn't work, I have read through the sensors-detect script.

Quoted 5 lines

My understanding is that the drivers for the TWL4030 should all get loaded automatically thanks to module aliases, as long as the TWL4030 itself is properly registered during platform setup. Check in lsmod whether twl4030-madc and twl4030-madc-hwmon are actually loaded. If not, try loading them manually

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

lsmod doesn't show the drivers, but they should have been compiled into the kernel, not as modules. Maybe
that is the problem?

No, this shouldn't make a difference. Check under /sys/devices/platform if the platform devices have been properly created

Ok, they are missing from there. I guess there is some problem with compiling in the drivers then.

Again, no. Modules or built-in should make no difference.

Quoted 2 lines

Is it enough to compile them in or do I initialize them in the board specific files in any way?

Please take a look at:
drivers/mfd/twl-core.c

As I understand it, the board code has to instantiate one of the I2C devices listed in twl_ids. This will call twl_probe() which in turn should instantiate all the relevant platform devices. arch/arm/mach-omap2 contains many examples:

$ grep -rI '"twl4030"' arch/
arch/arm/mach-omap2/board-omap3stalker.c:	 I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0020.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3evm.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-2430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3beagle.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-3430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0030.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-ldp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3touchbook.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3logic.c:		I2C_BOARD_INFO("twl4030", 0x48),
Quoted 5 lines

That being said, I can't find any code to instantiate twl4030_madc_hwmon, so it might as well be that this part is missing from the upstream kernel. Cc'ing Keerthy and Axel Lin who probably know what's going on.

Ok, thanks for the help. I am using the board-omap3beagle.c as a base for this product, and I checked that the initialization is there. I also checked that Keerthy had submitted a patch to fix some issues with the twl-core.c, I'll try the patch and let you
know if there is any improvement.

Regards,
Niclas

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#7 lore raw
In reply to Niclas Knuts
Quoted 53 lines · Jean Delvare
Quoted 21 lines · Niclas Knuts
Quoted 20 lines · Jean Delvare
Quoted 19 lines · Niclas Knuts
Quoted 11 lines · Jean Delvare
Quoted 5 lines · Niclas Knuts

I am trying to setup lm-sensors for use with the Texas Instruments TWL4030 Chip (the main processor is a OMAP3503). But I cannot seem to get it to detect the chip. I have added the hwmon drivers and I am using up to date MADC drivers that I have backported to kernel 2.6.32 (I am running Angstrom).

Disclaimer: I don't know a thing about this chip nor its drivers.

There is no detection support for this device in sensors-detect, if this was your question. I don't think this device can be detected from user-space.

I am aware that the automatic detect doesn't work, I have read through the sensors-detect script.

Quoted 5 lines

My understanding is that the drivers for the TWL4030 should all get loaded automatically thanks to module aliases, as long as the TWL4030 itself is properly registered during platform setup. Check in lsmod whether twl4030-madc and twl4030-madc-hwmon are actually loaded. If not, try loading them manually

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

lsmod doesn't show the drivers, but they should have been compiled into the kernel, not as modules. Maybe
that is the problem?

No, this shouldn't make a difference. Check under /sys/devices/platform if the platform devices have been properly created

Ok, they are missing from there. I guess there is some problem with compiling in the drivers then.

Again, no. Modules or built-in should make no difference.

Quoted 2 lines

Is it enough to compile them in or do I initialize them in the board specific files in any way?

Please take a look at:
drivers/mfd/twl-core.c

As I understand it, the board code has to instantiate one of the I2C devices listed in twl_ids. This will call twl_probe() which in turn should instantiate all the relevant platform devices. arch/arm/mach-omap2 contains many examples:

$ grep -rI '"twl4030"' arch/
arch/arm/mach-omap2/board-omap3stalker.c:	 I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0020.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3evm.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-2430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3beagle.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-3430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0030.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-ldp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3touchbook.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3logic.c:		I2C_BOARD_INFO("twl4030", 0x48),
Quoted 5 lines

That being said, I can't find any code to instantiate twl4030_madc_hwmon, so it might as well be that this part is missing from the upstream kernel. Cc'ing Keerthy and Axel Lin who probably know what's going on.

Success! With Keerthys twl-core patch I am able to get hw_mon up and running.

Cheers,
Niclas

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#8 lore raw
In reply to Niclas Knuts
Quoted 53 lines · Jean Delvare
Quoted 21 lines · Niclas Knuts
Quoted 20 lines · Jean Delvare
Quoted 19 lines · Niclas Knuts
Quoted 11 lines · Jean Delvare
Quoted 5 lines · Niclas Knuts

I am trying to setup lm-sensors for use with the Texas Instruments TWL4030 Chip (the main processor is a OMAP3503). But I cannot seem to get it to detect the chip. I have added the hwmon drivers and I am using up to date MADC drivers that I have backported to kernel 2.6.32 (I am running Angstrom).

Disclaimer: I don't know a thing about this chip nor its drivers.

There is no detection support for this device in sensors-detect, if this was your question. I don't think this device can be detected from user-space.

I am aware that the automatic detect doesn't work, I have read through the sensors-detect script.

Quoted 5 lines

My understanding is that the drivers for the TWL4030 should all get loaded automatically thanks to module aliases, as long as the TWL4030 itself is properly registered during platform setup. Check in lsmod whether twl4030-madc and twl4030-madc-hwmon are actually loaded. If not, try loading them manually

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

lsmod doesn't show the drivers, but they should have been compiled into the kernel, not as modules. Maybe
that is the problem?

No, this shouldn't make a difference. Check under /sys/devices/platform if the platform devices have been properly created

Ok, they are missing from there. I guess there is some problem with compiling in the drivers then.

Again, no. Modules or built-in should make no difference.

Quoted 2 lines

Is it enough to compile them in or do I initialize them in the board specific files in any way?

Please take a look at:
drivers/mfd/twl-core.c

As I understand it, the board code has to instantiate one of the I2C devices listed in twl_ids. This will call twl_probe() which in turn should instantiate all the relevant platform devices. arch/arm/mach-omap2 contains many examples:

$ grep -rI '"twl4030"' arch/
arch/arm/mach-omap2/board-omap3stalker.c:	 I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0020.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3evm.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-2430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3beagle.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-3430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0030.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-ldp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3touchbook.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3logic.c:		I2C_BOARD_INFO("twl4030", 0x48),
Quoted 5 lines

That being said, I can't find any code to instantiate twl4030_madc_hwmon, so it might as well be that this part is missing from the upstream kernel. Cc'ing Keerthy and Axel Lin who probably know what's going on.

Keerthy, thanks for the patch that you sent to Steve the other day, I also solved my problems. So now I have the hw_mon
drivers up and running on a 2.6.32 version of the kernel. However it seems that the measurements are a bit odd. In the
patch description it says that it should report the values in mV. But checking for example in12 (which should be batteyr voltage) I get 632 as value, any idea what could cause this? I have updated the MADC drivers.

Regards,
Niclas Knuts

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#9 lore raw
In reply to Niclas Knuts
Quoted 55 lines · Jean Delvare
Quoted 21 lines · Niclas Knuts
Quoted 20 lines · Jean Delvare
Quoted 19 lines · Niclas Knuts
Quoted 11 lines · Jean Delvare
Quoted 5 lines · Niclas Knuts

I am trying to setup lm-sensors for use with the Texas Instruments TWL4030 Chip (the main processor is a OMAP3503). But I cannot seem to get it to detect the chip. I have added the hwmon drivers and I am using up to date MADC drivers that I have backported to kernel 2.6.32 (I am running Angstrom).

Disclaimer: I don't know a thing about this chip nor its drivers.

There is no detection support for this device in sensors-detect, if this was your question. I don't think this device can be detected from user-space.

I am aware that the automatic detect doesn't work, I have read through the sensors-detect script.

Quoted 5 lines

My understanding is that the drivers for the TWL4030 should all get loaded automatically thanks to module aliases, as long as the TWL4030 itself is properly registered during platform setup. Check in lsmod whether twl4030-madc and twl4030-madc-hwmon are actually loaded. If not, try loading them manually

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

lsmod doesn't show the drivers, but they should have been compiled into the kernel, not as modules. Maybe
that is the problem?

No, this shouldn't make a difference. Check under /sys/devices/platform if the platform devices have been properly created

Ok, they are missing from there. I guess there is some problem with compiling in the drivers then.

Again, no. Modules or built-in should make no difference.

Quoted 2 lines

Is it enough to compile them in or do I initialize them in the board specific files in any way?

Please take a look at:
drivers/mfd/twl-core.c

As I understand it, the board code has to instantiate one of the I2C devices listed in twl_ids. This will call twl_probe() which in turn should instantiate all the relevant platform devices. arch/arm/mach-omap2 contains many examples:

$ grep -rI '"twl4030"' arch/
arch/arm/mach-omap2/board-omap3stalker.c:	 I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0020.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3evm.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-2430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3beagle.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-3430sdp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-igep0030.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-ldp.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3touchbook.c:		I2C_BOARD_INFO("twl4030", 0x48),
arch/arm/mach-omap2/board-omap3logic.c:		I2C_BOARD_INFO("twl4030", 0x48),
Quoted 5 lines

That being said, I can't find any code to instantiate twl4030_madc_hwmon, so it might as well be that this part is missing from the upstream kernel. Cc'ing Keerthy and Axel Lin who probably know what's going on.

There was an exchange about that last night. Keerthy mentioned that he would submit a patch.

Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors