Created attachment 102071 [details] dmesg output after boot Hello, the omap4 thermal/bandgap sensor code doesn't seem to work on my Pandaboard ES (OMAP4460). All necessary stuff in the kernel config should be on, but there is nothing in /sys/class/thermal/ -- also nothing about bandgap or thermal in /sys/devices/platform/ Greets, Tobias
Created attachment 102081 [details] kernel config
Seems to be about thermal, not hwmon, so nothing I can help with. Rui, it would be good to have a bugzilla component created for thermal drivers.
(In reply to comment #2) > Seems to be about thermal, not hwmon, so nothing I can help with. > > Rui, it would be good to have a bugzilla component created for thermal > drivers. yes, we have one. Power Management->Thermal. bug re-assigned.
Thanks for reassigning!
Tobias, Can you please check if you have the bandgap device on your device tree blob? This driver is DT only. Tks,
How would I do that? I understand it has something to do with the bootloader? I use u-boot git from upstream. The kernel image is created via: make LOADADDR=0x80008000 uImage I then just copy the image to /boot The boot script: fatload mmc 0 0x80300000 uImage-3.9.3 setenv bootargs ro rootfstype=ext4 elevator=noop console=ttyO2,115200n8 mem=1G@0x80000000 init=/sbin/init root=/dev/mmcblk0p2 rootwait fixrtc bootm 80300000
Created attachment 102131 [details] serial output (boot log with dtb) OK, so I build the dtb file via: make omap4-panda-es.dtb ...and then also put it into /boot New bootscript looks like this: fatload mmc 0 0x80200000 uImage-3.9.3 fatload mmc 0 0x815f0000 omap4-panda-es-3.9.3.dtb setenv bootargs ro rootfstype=ext4 elevator=noop console=ttyO2,115200n8 mem=1G@0x80000000 init=/sbin/init root=/dev/mmcblk0p2 rootwait fixrtc bootm 0x80200000 - 0x815f0000 The board boots that way, but the process soon hangs. Also e.g. the UARTs are not detected anymore. I attached what I got via serial debug. Really don't know if I'm going the right way.
OK. You have to configure your u-boot to boot via DT. There is a good reading here: http://omappedia.org/wiki/Device_Tree Besides, because we are at 3.9.3, you probably need to patch your DT file. This patch is probably what you want: https://lkml.org/lkml/2013/5/15/317
I'm not sure, but it looks like I'm hitting this bug here (https://patchwork.kernel.org/patch/2444501/). I'm also unsure if I should use the patch proposed there, since Peter Ujfalusi mentions that he submitted one that really fixes the issue. Anyway, should I file a separate report for this?
Tobias, I believe you are mixing two thing. Lets try to clarify. First thing to understand is that the thermal driver is DT only. There is no plan to add non-DT probing for this driver, as platform data probing is deprecated. Then to use this driver you need to boot your device with: 1. DT support 2. Bandgap device entry in your DT blob. Looks like you are facing troubles to pass item (1) above. For that I recommend you to continue your investigation with the patch you found. And yes, if you are facing issue with DT booting, you have to file a separated bug for this. But for item (2), you will need the patch I pointed. The patch I pointed is already submitted and I will make sure it gets merged in upstream. All best,
Thanks for the explanation. Sadly I can't get the board to boot with DT, even with the patch applied. Opening a new bug for that in the next minutes. I'm coming back to this one once DT works.
I'm now on 3.12-rc5 and booting with DT finally works. Looking at the device tree files, the bandgap device is now listed there. However I still don't see anything in /sys/class/{thermal,hwmon}/ Also omapconf show temp gives me nothing. @Eduardo: Any magic kernel options I have to activate?
Hmm, I looked around a bit and noticed that while I had TI_SOC_THERMAL and OMAP4_THERMAL enabled in my config, TI_THERMAL wasn't switched on. However TI_THERMAL depends on CPU_THERMAL, which in turn depends on CPU_FREQ. Which I've currently off, since it currently locks up the boot process (see bug #58541, comment 6). I tried to enable CPU_FREQ, but disabling the omap cpufreq driver. I can enable TI_SOC_THERMAL then, but it doesn't load: "Driver ti-soc-thermal requests probe deferral" It waits for a cpufreq driver to appear. Guess this won't be fixed before 3.13-rc1
Update with 3.13-rc1: cpufreq support can no be enabled in the kernel config, without leading to boot process lock up. Still, cpufreq doesn't get loaded, so the thermal stuff doesn't work as well. *sigh*
Like explained in bug #58541, a thermal_zone device appears when adding the yet-to-be-merged patches there. Going to close this, once they hit mainline.
based on https://bugzilla.kernel.org/show_bug.cgi?id=58541#c13 can we close this?
Let me check again with latest git tip. Going to report back once I've done this.
I checked against vanilla 3.14.0, and while the thermal_zone node is created, this happens: fragile thermal_zone0 # cat temp cat: temp: Invalid argument So this bug remains open for now.
Retested with vanilla-3.15.0-rc3 and still getting the 'Invalid argument' error. I also noticed this message in the kernel log: ti_dt_clocks_register: failed to lookup clock node bandgap_fclk Looks related to me.
I cleaned my kernel config today and noticed that I was missing the TI_THERMAL config. After adding it the thermal node now works and doing a cat on 'temp' yields reasonable results.