Forums › Devices › OSD32MP15x › VREFBUF does not work
Tagged: OSD32MP15 VREFBUF ADC
Hello, we have a custom board which needs to use VREFBUF to make ADC measurements.
I enabled VREFBUF in the device tree as follows:
1 2 3 4 5 6 7 8 9 | &vrefbuf{ status = "okay"; compatible = "st,stm32-vrefbuf"; reg = <0x50025000 0x8>; regulator-min-microvolt = <2500000>; regulator-max-microvolt = <2500000>; clocks = <&rcc VREF>; vdda-supply = <&vdda>; }; |
<p style=”border: 0px solid #d9d9e3; box-sizing: border-box; –tw-border-spacing-x: 0; –tw-border-spacing-y: 0; –tw-translate-x: 0; –tw-translate-y: 0; –tw-rotate: 0; –tw-skew-x: 0; –tw-skew-y: 0; –tw-scale-x: 1; –tw-scale-y: 1; –tw-scroll-snap-strictness: proximity; –tw-ring-offset-width: 0px; –tw-ring-offset-color: #fff; –tw-ring-color: rgba(59,130,246,0.5); –tw-ring-offset-shadow: 0 0 transparent; –tw-ring-shadow: 0 0 transparent; –tw-shadow: 0 0 transparent; –tw-shadow-colored: 0 0 transparent; margin: 0px 0px 1.25em; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, ‘Segoe UI’, Roboto, Ubuntu, Cantarell, ‘Noto Sans’, sans-serif, ‘Helvetica Neue’, Arial, ‘Apple Color Emoji’, ‘Segoe UI Emoji’, ‘Segoe UI Symbol’, ‘Noto Color Emoji’; white-space: pre-wrap; background-color: #f7f7f8;”>That does not seem to work. The VREFBUF is not activated. The ADC measurements we are getting are wrong, and the VREFBUF driver in the kernel is not started (checked with lsmod and dmesg). The kernel module is enabled though.
<p style=”border: 0px solid #d9d9e3; box-sizing: border-box; –tw-border-spacing-x: 0; –tw-border-spacing-y: 0; –tw-translate-x: 0; –tw-translate-y: 0; –tw-rotate: 0; –tw-skew-x: 0; –tw-skew-y: 0; –tw-scale-x: 1; –tw-scale-y: 1; –tw-scroll-snap-strictness: proximity; –tw-ring-offset-width: 0px; –tw-ring-offset-color: #fff; –tw-ring-color: rgba(59,130,246,0.5); –tw-ring-offset-shadow: 0 0 transparent; –tw-ring-shadow: 0 0 transparent; –tw-shadow: 0 0 transparent; –tw-shadow-colored: 0 0 transparent; margin: 0px 0px 1.25em; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, ‘Segoe UI’, Roboto, Ubuntu, Cantarell, ‘Noto Sans’, sans-serif, ‘Helvetica Neue’, Arial, ‘Apple Color Emoji’, ‘Segoe UI Emoji’, ‘Segoe UI Symbol’, ‘Noto Color Emoji’; white-space: pre-wrap; background-color: #f7f7f8;”>What is my mistake?
<p style=”border: 0px solid #d9d9e3; box-sizing: border-box; –tw-border-spacing-x: 0; –tw-border-spacing-y: 0; –tw-translate-x: 0; –tw-translate-y: 0; –tw-rotate: 0; –tw-skew-x: 0; –tw-skew-y: 0; –tw-scale-x: 1; –tw-scale-y: 1; –tw-scroll-snap-strictness: proximity; –tw-ring-offset-width: 0px; –tw-ring-offset-color: #fff; –tw-ring-color: rgba(59,130,246,0.5); –tw-ring-offset-shadow: 0 0 transparent; –tw-ring-shadow: 0 0 transparent; –tw-shadow: 0 0 transparent; –tw-shadow-colored: 0 0 transparent; margin: 1.25em 0px 0px; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, ‘Segoe UI’, Roboto, Ubuntu, Cantarell, ‘Noto Sans’, sans-serif, ‘Helvetica Neue’, Arial, ‘Apple Color Emoji’, ‘Segoe UI Emoji’, ‘Segoe UI Symbol’, ‘Noto Color Emoji’; white-space: pre-wrap; background-color: #f7f7f8;”>Thank you very much for your help.
ok something went really wrong with my text below the code.
The VREFBUF activation does not seem to work. The VREFBUF is not activated. The ADC measurements we are getting are wrong, and the VREFBUF driver in the kernel is not started (checked with lsmod and dmesg). The kernel module is enabled though.
What is my mistake?
Thank you very much for your help
Julius,
The device tree snippet you posted looks okay(- formatting). Here are a few things to check:
1. Check the regulator information with “cat /sys/kernel/debug/regulator/regulator_summary” to see if VREF is present and whether it is used by ADC. The summary should show you the voltage setting as well as where it is being used. See https://wiki.st.com/stm32mpu/wiki/Regulator_overview for additional information
2. Is vdda-supply(vdda) > 2.8V on your board? See https://www.st.com/resource/en/application_note/dm00389996-getting-started-with-stm32mp151-stm32mp153-and-stm32mp157-line-hardware-development-stmicroelectronics.pdf section 4.1.1 for reference. Note that VDDA is internally supplied by LDO5 in OSD32MP1. Please make sure that all voltage and ADC specific settings are good in the adc node. See example here: https://github.com/STMicroelectronics/linux/blob/v5.10-stm32mp/arch/arm/boot/dts/stm32mp15xx-dkx.dtsi#LL119C7-L119C7(Note the difference, on DK2, VDDA is supplied by VDD)
3. Make sure that the clock is OK. vref clock should be listed in /sys/kernel/debug/clk/clk_summary
4. Make sure you are not supplying external reference to VREF+ when you are activating VREFBUF internally. What does this pin voltage measure on your board?
Best,
Neeraj
Octavo Systems LLC all rights reserved
OCTAVO is registered in the U.S. Patent and Trademark Office. OSD, C-SiP, and the Octavo Logo are trademarks of Octavo Systems LLC.
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields
"*" indicates required fields