Thank you max, we tryied last night without results because the driver seems to not support the device tree. Waiting for your new kernel release we are testing with mainline kernel 4.6.2. Compiled and running :). The driver has devicetree support but we have no experience with the dts. This are our modifications:
imx6q-apalis-ixora.dts:
/ {
model = "Toradex Apalis iMX6Q/D Module on Ixora Carrier Board";
compatible = "toradex,apalis_imx6q-ixora", "toradex,apalis_imx6q",
"fsl,imx6q";
.......
xtal_max: xtal20@0 {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <3686400>;
};
};
&ecspi1 {
status = "okay";
max148300: max14830@0 {
compatible = "maxim,max14830";
reg = <0>;
clocks = <&xtal_max>;
clock-names = "xtal";
gpio-controller;
#gpio-cells = <2>;
//spi-max-frequency = <16000000>;
spi-max-frequency = <10000000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_apalis_gpio1>;
interrupt-parent = <&gpio2>;
interrupts = <4 IRQ_TYPE_EDGE_FALLING>; // GPIO 1 de X23 [13] -> MXM3 [1] -> NAND_DATA04, GPIO2_IO04, FALLING EDGE
};
};
.....
&iomuxc {
/*
* Mux the Apalis GPIOs
* GPIO5, 6 used by optional fusion_F0710A kernel module
*/
pinctrl-names = "default";
//pinctrl-0 = <&pinctrl_apalis_gpio1 &pinctrl_apalis_gpio2
pinctrl-0 = <&pinctrl_apalis_gpio2
&pinctrl_apalis_gpio3 &pinctrl_apalis_gpio4
&pinctrl_apalis_gpio5 &pinctrl_apalis_gpio6
&pinctrl_apalis_gpio7 &pinctrl_apalis_gpio8
>;
pinctrl_leds_ixora: ledsixoragrp {
fsl,pins = <
MX6QDL_PAD_SD1_DAT1__GPIO1_IO17 0x1b0b0
MX6QDL_PAD_SD1_DAT3__GPIO1_IO21 0x1b0b0
MX6QDL_PAD_NANDF_D1__GPIO2_IO01 0x1b0b0
MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0
>;
};
};
I don’t know if I understood very well the interrupt definition…
Another question about the SPI bus… To test the MAX14830 we purchased the MAX14830 EVALUATION KIT, is configured by default to use the SPI mode of the chip, so connected the MISO, MOSI, CLOCK and CS directly from the board to the ixora… Do we need some pullup resistors on the four lines?
thank you very much for your great support!