cancel
Showing results for 
Search instead for 
Did you mean: 

VREFBUF is not working. It does not start the kernelmodule and the ADC values are the MAX_Values.

JSala.3
Associate II

Hi I have problems with our custom board bringing up the VREFBUF. I eddited the devicetree as follows (also in U-Boot).

&vrefbuf{
	status = "okay";
	compatible = "st,stm32-vrefbuf";
	reg = <0x50025000 0x8>;
	regulator-min-microvolt = <2500000>;
	regulator-max-microvolt = <2500000>;
	clocks = <&rcc VREF>;
	vdda-supply = <&vdd>;
};

I also tried vdda-supply vdda. Did not change anything.

When i check through the kernel messages there is no sign that the VREFBUF module is started or any error concerning VREFBUF.

Also the VREFBUF is not working what is verified by the ADC Values.

We use the ADC only on the M4 Core.

The VREFBUFF can be activated from the M4 and the ADC is working fine.

What am I doing wrong?

I would be very grateful for some advice!.

4 REPLIES 4
PatrickF
ST Employee

Hi @JSala.3​ ,

is the

vref-supply = <&vrefbuf>;

present in the &m4_adc node ?

See https://github.com/STMicroelectronics/linux/blob/v5.15-stm32mp/arch/arm/boot/dts/stm32mp157c-dk2-m4-examples.dts#L34

Regards,

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
JSala.3
Associate II

Hi :)

yes it is.

The adc node looks like this.

&adc {
	vdd-supply = <&vdd>;
	vdda-supply = <&vdda>;
	vref-supply = <&vrefbuf>;
	status = "okay";
	adc1: adc@0 {
		st,min-sample-time-nsecs = <5000>;
		st,adc-channels = <0 1>;
		status = "okay";
	};
 
	adc2: adc@100 {
		status = "okay";
	};
 
	adc_temp: temp {
		status = "okay";
	};
};

Hi :)

yes it is.

The adc node looks like this.

&adc {
	vdd-supply = <&vdd>;
	vdda-supply = <&vdda>;
	vref-supply = <&vrefbuf>;
	status = "okay";
	adc1: adc@0 {
		st,min-sample-time-nsecs = <5000>;
		st,adc-channels = <0 1>;
		status = "okay";
	};
 
	adc2: adc@100 {
		status = "okay";
	};
 
	adc_temp: temp {
		status = "okay";
	};
};

PatrickF
ST Employee

Hi @JSala.3​ ,

You mention that you use ADC only for M4 core, what look like you &m4_adc node ?

Seems you are trying to enable same ADC on both Linux and M4, which is not allowed.

Please have a look to https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_a_runtime_context

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.