CD1030 : Linux kernel driver

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CD1030 : Linux kernel driver

609 Views
DhavalS
Contributor II

We are using the i.mx8qm processor.

 

CD1030 is interfaced with i.mx8qm over lpspi1 interface.

 

I cann't see any linux kernel driver of the cd1030 nxp chipset in latest linux kernel.

I get one referance of RTOS based code but no linux kernel driver for this chipset.

 

Can you please provide the linux kernel driver for this NXP CD1030 driver?

 

I have used the generic spidev driver to check but that is not working

dts file changes

&lpspi1 {

compatible = "fsl,imx8qm-lpspi", "fsl,imx7ulp-spi";
#address-cells = <1>;
#size-cells = <0>;
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi1 &pinctrl_lpspi1_cs>;
cs-gpios = <&lsio_gpio3 24 GPIO_ACTIVE_LOW>;
status = "okay";

spidev0: spi@0 { //Digital Input
reg = <0>;
compatible = "rohm,dh2228fv";
spi-max-frequency = <30000000>;
};
};

pinctrl_lpspi1: lpspi1grp {
fsl,pins = <
IMX8QM_ADC_IN3_DMA_SPI1_SCK 0x0E000040
IMX8QM_ADC_IN4_DMA_SPI1_SDO 0x0E000040
IMX8QM_ADC_IN5_DMA_SPI1_SDI 0x0E000040
IMX8QM_LVDS1_I2C0_SDA_LSIO_GPIO1_IO13 0x06000020
>;
};

pinctrl_lpspi1_cs: lpspi1cs {
fsl,pins = <
IMX8QM_ADC_IN6_LSIO_GPIO3_IO24 0x21
>;
};

 I can see that /dev/spidev0.0 node is created and when try to test using the loopback test don't see the response back (MOSI and MISO  are Shorted)

root@dictgu:~# spidev_test -v -D /dev/spidev0.0
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 kHz)
TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.........................|
RX | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................................|

 

Is this driver should work?

 

If no then please provide the linux kernel driver for CD1030

Tags (2)
0 Kudos
Reply
1 Reply

601 Views
igorpadykov
NXP Employee
NXP Employee

Hi Dhaval

 

unfortunately I am not aware of CD1030 driver, but may be useful to look at drivers for similar parts:

https://fcastagnotto.wordpress.com/2020/05/25/gpio-expander-mcp23s17-on-linux-embedded/

https://github.com/spotify/linux/blob/master/drivers/gpio/max7301.c

 

Best regards
igor

0 Kudos
Reply