In the probe function of module_spi_driver, after spi_setup(spi), I called spi_write_then_read function in which spi_sync is called. Then tegra_spi_transfer_one_message function in file spi-tegra114.c is called.
After that log shows two errors:
[ 7.472787] ERROR: could not get clock /spi@c260000:osc(2)
[ 7.473526] ERROR: could not get clock /spi@c260000:osc(2)
The errors come from the following function:
struct clk *clk_get(struct device *dev, const char *con_id)
{
const char *dev_id = dev ? dev_name(dev) : NULL;
struct clk *clk;
if (dev) {
clk = __of_clk_get_by_name(dev->of_node, dev_id, con_id);
if (!IS_ERR(clk) || PTR_ERR(clk) == -EPROBE_DEFER)
return clk;
}
return clk_get_sys(dev_id, con_id);
}
Can anyone help me why these errors occurs? Is this related to pinmux setting?
@ShaneCCC,
In device tree, I found imx204 device is also under spi@c260000. So I think spi2 pinmux is configured already by default. I have not configured pinmux. Am I right?
ShaneCCC
Now spi2 signal can be measured on oscilloscope. In addition, I need to configure gpio, is there any document about hoe to config GPIO?
Thanks
I use Jetson_AGX_Series_DevKit_Pinmux_Configuration_Template.xlsm to generate three dtsi file:
tegra19x-jetson_agx_devkit-gpio-default.dtsi
tegra19x-jetson_agx_devkit-padvoltage-default.dtsi
tegra19x-jetson_agx_devkit-pinmux.dtsi
and then put them under the folder Linux_for_Tegra/kernel/pinmux/t19x.
And run example python command from README file.
Many errors occured. The following picture is the screenshot of errors.
yes, I did not modify the file
Jetson_AGX_Series_DevKit_Pinmux_Configuration_Template.xlsm. Only generate it.
The JetPack version is the latest version 4.4.1 that I installed last night.
Jetson_AGX_Series_DevKit_Pinmux_Configuration_Template.xlsm is downloaded from NVIDIA website yestoday.