I need to set up an ad5541 IC connected to the system SPI bus using the device tree.
According my current linux kernel (4.1.15) the IC is supported by the ad5446.c driver. I already checked the docu from AnalogDevices.
https://wiki.analog.com/resources/tools-software/linux-drivers/iio-dac/ad5446
I already configured my SPI bus including chip select (see [1]) and tested the interface successfully.
How can I insert and configure the device tree example from the manufacture documentation to use the driver?
Thanks!!!
[1]:
#ifdef CONFIG_EFUSA9X_SPI_B /* SPI_B implemented via ECSPI1, 1x or 2x CS, depending on RTS of UART_C */ &ecspi1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi1>; #if defined(CONFIG_EFUSA9X_BLUETOOTH) || defined(CONFIG_EFUSA9X_UART_C_RTSCTS) /* If UART_C uses RTS, we have only one CS for SPI_B */ fsl,spi-num-chipselects = <1>; cs-gpios = <&gpio4 22 0>; #else /* If UART_C does not use RTS, we can have a second CS on SPI_B */ fsl,spi-num-chipselects = <2>; cs-gpios = <&gpio4 22 0>, <&gpio4 19 0>; #endif status = "okay"; // AD7190 Current spidev@0 { #address-cells = <1>; #size-cells = <1>; compatible = "linux,spidev"; spi-max-frequency = <20000000>; reg = <0>; }; // CurrentSink #if !defined(CONFIG_EFUSA9X_BLUETOOTH) && !defined(CONFIG_EFUSA9X_UART_C_RTSCTS) spidev@1 { #address-cells = <1>; #size-cells = <1>; compatible = "linux,spidev"; spi-max-frequency = <20000000>; reg = <1>; }; #endif }; #endif /* CONFIG_EFUSA9X_SPI_B */