Page 1 of 1

ADC on sama5d27-som-ek1

Posted: Thu Mar 01, 2018 12:08 pm
by punchingkan
I am using SAMA5D27-som-ek1 booted with poky based linux4sam demo. ADC does not show up in dmesg. What do i do?


Thank You
punchingkan

Re: ADC on sama5d27-som-ek1

Posted: Thu Mar 01, 2018 9:38 pm
by blue_z
punchingkan wrote:I am using SAMA5D27-som-ek1 booted with poky based linux4sam demo. ADC does not show up in dmesg. What do i do?
A quick review of the Device Tree files for that board indicates that the ADC is not enabled.
You would have to update your copy of at91-sama5d27_som1_ek.dts, and compile a new dtb.
You could use the nodes in at91-sama5d2_xplained_common.dtsi as an example.

Regards

Re: ADC on sama5d27-som-ek1

Posted: Tue Oct 16, 2018 10:23 am
by Evolynx
We can find this node in at91-sama5d2_xplained_common.dtsi :

Code: Select all

adc: adc@fc030000 {
	vddana-supply = <&vdd_3v3_lp_reg>;
	vref-supply = <&vdd_3v3_lp_reg>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_adc_default &pinctrl_adtrg_default>;
	status = "okay";
};
But in sama5d27-som1-ek there is no regulators, so what should we use in place of "vdd_3v3_lp_reg" ?

Thank you

Re: ADC on sama5d27-som-ek1

Posted: Fri Oct 19, 2018 1:22 am
by blue_z
Evolynx wrote: But in sama5d27-som1-ek there is no regulators, so what should we use in place of "vdd_3v3_lp_reg" ?
Try creating a name using a fixed regulator node.

Code: Select all

/ {
	...
	ahb {
		apb {
			adc: adc@fc030000 {
			        vddana-supply = <&vddin_3v3>;
			        vref-supply = <&vddin_3v3>;
			        ...
			};
                };
        };
        
	vddin_3v3: fakeregulator@0 {
	        compatible = "regulator-fixed";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
	};
};

Re: ADC on sama5d27-som-ek1

Posted: Mon Oct 22, 2018 3:47 pm
by Evolynx
Thank you for your response and it is working with a little change :

Code: Select all

	vddin_3v3: fakeregulator@0 {
	        compatible = "regulator-fixed";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                status = "okay";
	};
moreover the example is now available into linux4sam 6.0 :D

Re: ADC on sama5d27-som-ek1

Posted: Mon Nov 05, 2018 3:26 pm
by dzakas
Hello,

I'm a newbie here and trying to enable ADC on the same board.
So I edited .dts file:
buildroot-at91/output/build/linux-linux4sam_6.0/arch/arm/boot/dts/at91-sama5d27_som1_ek.dts
and tried:
make linux-rebuild
make

So now I have updated at91-sama5d27_som1_ek.dtb file, but sama5d27_som1_ek.itb file is unchanged (old modified date) in here:
buildroot-at91/output/images
And all the changes aren't moved to sd card image.. :/

Sorry, I understand that this is the wrong topic, but what I'm missing and doing wrong?