FT810 Overlay config and API for the nRF9160DK

I'm working on porting some Arduino code for a Crystalfontz 320x240 FT810 display to run on the nRF9160DK. I'm having some success, But it seems Zephyr has an FT8XX driver that includes support for the FT810 specifically. I added the CONFIG_FT800=y to my prj.conf file. But it seems I also need to configure the FT8xx in the overlay or devicetree somehow. Does anyone have any info they can share?

Parents
  • Hi,

    I see that you are familiar with overlays from this case: https://devzone.nordicsemi.com/f/nordic-q-a/83120/spi-sub-node-configuration-using-nrfx-spim

    For the FT800 driver you need to set the compatible field to "ftdi,ft800" and add all the required fields found in the dts binding: https://github.com/nrfconnect/sdk-zephyr/blob/main/dts/bindings/display/ftdi%2Cft800.yaml

    Let me know if anything is confusing or you run into any issues.

  • Thanks for the quick response. I'm still a newbie, but I'm learning how to use overlays. Last night I found some additional info that I wanted to post for your review (and for anyone else that wants to or has used the FT800). What I'm posting below is a different approach from the YAML modification. I will try both approaches. BTW, I found there is also a config called CONFIG_FT800 that needs to be included in prj.conf.

    So while I think this will get me started from a configuration standpoint, do you know of any examples on how to use the FT800 Zephyr driver. That info would also be greatly appreciated. BTW, I'm using an FT810 with a touch-screen. I believe the Zephyr drivers provides support. But let me know if I may find issues. Thanks!

    https://github.com/zephyrproject-rtos/zephyr/commit/cb8a271b831597a11f524e1c784bfa9493959d00

    &arduino_spi {
        status = "okay";

        /* D10 */
        cs-gpios = <&arduino_header 16
                (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;

        ft800@0 {
            compatible = "ftdi,ft800";
            reg = <0x0>;
            label = "FT800_0";
            spi-max-frequency = <8000000>;
            /*  D2 */
            irq-gpios = <&arduino_header 8 GPIO_ACTIVE_LOW>;

            pclk = <5>;
            pclk_pol = <1>;
            cspread = <1>;
            swizzle = <0>;
            vsize = <272>;
            voffset = <12>;
            vcycle = <292>;
            vsync0 = <0>;
            vsync1 = <10>;
            hsize = <480>;
            hoffset = <43>;
            hcycle = <548>;
            hsync0 = <0>;
            hsync1 = <41>;

            status = "okay";
        };
    };

Reply
  • Thanks for the quick response. I'm still a newbie, but I'm learning how to use overlays. Last night I found some additional info that I wanted to post for your review (and for anyone else that wants to or has used the FT800). What I'm posting below is a different approach from the YAML modification. I will try both approaches. BTW, I found there is also a config called CONFIG_FT800 that needs to be included in prj.conf.

    So while I think this will get me started from a configuration standpoint, do you know of any examples on how to use the FT800 Zephyr driver. That info would also be greatly appreciated. BTW, I'm using an FT810 with a touch-screen. I believe the Zephyr drivers provides support. But let me know if I may find issues. Thanks!

    https://github.com/zephyrproject-rtos/zephyr/commit/cb8a271b831597a11f524e1c784bfa9493959d00

    &arduino_spi {
        status = "okay";

        /* D10 */
        cs-gpios = <&arduino_header 16
                (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;

        ft800@0 {
            compatible = "ftdi,ft800";
            reg = <0x0>;
            label = "FT800_0";
            spi-max-frequency = <8000000>;
            /*  D2 */
            irq-gpios = <&arduino_header 8 GPIO_ACTIVE_LOW>;

            pclk = <5>;
            pclk_pol = <1>;
            cspread = <1>;
            swizzle = <0>;
            vsize = <272>;
            voffset = <12>;
            vcycle = <292>;
            vsync0 = <0>;
            vsync1 = <10>;
            hsize = <480>;
            hoffset = <43>;
            hcycle = <548>;
            hsync0 = <0>;
            hsync1 = <41>;

            status = "okay";
        };
    };

Children
  • Nice find! That looks very similar to what I was suggesting.

    Add the contents of the arduino_spi node to the spi node in a nrf9160dk_nrf9160_ns.overlay file, and add CONFIG_FT800=y to your prj.conf.

    There is a FT800 sample in the sdk: zephyr/samples/drivers/misc/ft800

    I do not know how to use the sample, but I should be able to help you any issues you encounter.

  • Thanks Olvind. I found that same sample over the weekend and have my project coded and will be testing today. I will probably need some help with the overlay as I'm already using SPI1 for a sensor interface. I've been struggling with the FT800/EVE SPI interface. It works, but is unreliably. So I'm hoping the FT800 driver will work .... and handle the touch screen too. So I will be returning for more of your great expertise soon. Have a great week. 

Related