Hello,
I have reviewed the section you mention as well as the Compulab imx93_adc.c driver, as well as I see that the freescale imx93.dtsi is included in the source for the device tree. Within the freescale imx93.dtsi I see code for clocks ( see below ). Could the 24000000 clock be for the adc? When I read the in_voltage_sampling_frequency file it has 24000000 in it. I have tried many values to try to change it but always get invalid argument ( even if I write the same 24000000 value).
osc_32k: clock-osc-32k {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <32768>;
clock-output-names = "osc_32k";
};
osc_24m: clock-osc-24m {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24000000>;
clock-output-names = "osc_24m";
};
clk_ext1: clock-ext1 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <133000000>;
clock-output-names = "clk_ext1";
I know it is easy to say just review the device tree files and drivers; however, I have still yet to find the linkage between the file-sys names and the actual device tree and driver files. Since NXP's imx93.dtsi is included I assume that you can help me determine how to find out what are valid arguments for this in_voltage_sampling_frequency. I see this in the Compulab adc driver ( it seems to be using the MCR register ). Not sure how to link this function to the file-sys names either.
static void imx93_adc_config_ad_clk(struct imx93_adc *adc)
{
u32 mcr;
/* put adc in power down mode */
imx93_adc_power_down(adc);
/* config the AD_CLK equal to bus clock */
mcr = readl(adc->regs + IMX93_ADC_MCR);
mcr |= FIELD_PREP(IMX93_ADC_MCR_ADCLKSE_MASK, 1);
writel(mcr, adc->regs + IMX93_ADC_MCR);
imx93_adc_power_up(adc);
}
Any guidance you can give on this is appreciate. Please remember COmpulab posted this question first and similarly can't figure it out. Seems much too difficult to figure out than it should be.
Thanks you.