Hello all,
I'm wondering if anyone out there has some insight into my issue. As the title says, I am trying to add support for a touchscreen device to a custom board that is very closely modeled after the beaglebone black. The custom board has the AM3354 and a touch screen controller made by microchip called an AR1021. I have added the drivers for the AR1021 to my kernel, added a pinmux for i2c and a GPIO interrupt pin, and have added device tree nodes for the i2c bus and AR1021 respectively. When I boot the board I can see that the ar1021 driver is loaded using lsmod and dmesg is reporting back this message.
[ 13.082424] input: ar1021 I2C Touchscreen as /devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e0b000.target-module/44e0b000.i2c/i2c-0/0-004d/input/input0
However, I still get no response from the touch screen controller. I am thinking it is maybe because my interrupt pin is not set up correctly or being recognized, according to our schematic the GPIO interrupt pin should be GPIO2_4 and the i2c bus should be i2c0. Below are my pinmux and device tree nodes.
ar1021_pins_default: ar1021_pins_default { pinctrl-single,pins = < AM33XX_IOPAD(0x898, PIN_INPUT_PULLUP | MUX_MODE7) /* (U6) gpmc_wen.gpio2[4] */ >; }; i2c0_pins_default: i2c0_pins_default { pinctrl-single,pins = < AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0) /* (C16) I2C0_SCL.I2C0_SCL */ AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0) /* (C17) I2C0_SDA.I2C0_SDA */ >; };
&i2c0 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_default>; clock-frequency = <100000>; #address-cells = <1>; #size-cells = <0>; ar1021: ar1021@4d { #address-cells = <1>; #size-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&ar1021_pins_default>; compatible = "microchip,ar1021-i2c"; reg = <0x4d>; interrupt-parent = <&gpio2>; interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; }; };