shields: adafruit_2_8_tft_touch_v2: add arduino nano connector support
Allow shield to be used with any board that has an arduino nano connector. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@huawei.com>
This commit is contained in:
parent
b57eefe074
commit
ac235d56f0
6 changed files with 77 additions and 56 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (c) 2019 Linaro Limited
|
# Copyright (c) 2019 Linaro Limited
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
if SHIELD_ADAFRUIT_2_8_TFT_TOUCH_V2
|
if SHIELD_ADAFRUIT_2_8_TFT_TOUCH_V2 || SHIELD_ADAFRUIT_2_8_TFT_TOUCH_V2_NANO
|
||||||
|
|
||||||
config GPIO
|
config GPIO
|
||||||
default y
|
default y
|
||||||
|
|
|
@ -3,3 +3,6 @@
|
||||||
|
|
||||||
config SHIELD_ADAFRUIT_2_8_TFT_TOUCH_V2
|
config SHIELD_ADAFRUIT_2_8_TFT_TOUCH_V2
|
||||||
def_bool $(shields_list_contains,adafruit_2_8_tft_touch_v2)
|
def_bool $(shields_list_contains,adafruit_2_8_tft_touch_v2)
|
||||||
|
|
||||||
|
config SHIELD_ADAFRUIT_2_8_TFT_TOUCH_V2_NANO
|
||||||
|
def_bool $(shields_list_contains,adafruit_2_8_tft_touch_v2_nano)
|
||||||
|
|
|
@ -4,53 +4,4 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <dt-bindings/display/ili9xxx.h>
|
#include "adafruit_2_8_tft_touch_v2.dtsi"
|
||||||
|
|
||||||
/ {
|
|
||||||
chosen {
|
|
||||||
zephyr,display = &ili9340;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&arduino_spi {
|
|
||||||
status = "okay";
|
|
||||||
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>, /* D10 */
|
|
||||||
<&arduino_header 10 GPIO_ACTIVE_LOW>; /* D04 */
|
|
||||||
|
|
||||||
|
|
||||||
ili9340: ili9340@0 {
|
|
||||||
compatible = "ilitek,ili9340";
|
|
||||||
label = "ILI9340";
|
|
||||||
spi-max-frequency = <15151515>;
|
|
||||||
reg = <0>;
|
|
||||||
cmd-data-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
|
|
||||||
width = <320>;
|
|
||||||
height = <240>;
|
|
||||||
pixel-format = <ILI9XXX_PIXEL_FORMAT_RGB888>;
|
|
||||||
rotation = <90>;
|
|
||||||
frmctr1 = [00 18];
|
|
||||||
pwctrl1 = [23 00];
|
|
||||||
vmctrl1 = [3e 28];
|
|
||||||
vmctrl2 = [86];
|
|
||||||
pgamctrl = [0f 31 2b 0c 0e 08 4e f1 37 07 10 03 0e 09 00];
|
|
||||||
ngamctrl = [00 0e 14 03 11 07 31 c1 48 08 0f 0c 31 36 0f];
|
|
||||||
};
|
|
||||||
|
|
||||||
sdhc0: sdhc@1 {
|
|
||||||
compatible = "zephyr,mmc-spi-slot";
|
|
||||||
reg = <1>;
|
|
||||||
status = "okay";
|
|
||||||
label = "SDHC0";
|
|
||||||
spi-max-frequency = <24000000>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
&arduino_i2c {
|
|
||||||
touch_controller: ft5336@38 {
|
|
||||||
compatible = "focaltech,ft5336";
|
|
||||||
reg = <0x38>;
|
|
||||||
label = "FT5336";
|
|
||||||
/* Uncomment if IRQ line is available (requires to solder jumper) */
|
|
||||||
/* int-gpios = <&arduino_header 13 GPIO_ACTIVE_LOW>; */ /* D7 */
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "adafruit_2_8_tft_touch_v2.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
/*
|
/*
|
||||||
* Arduino Nano form factor doesn't really have a Rev3 Arduino header
|
* Arduino Nano form factor doesn't really have a Rev3 Arduino header
|
||||||
|
@ -14,9 +16,9 @@
|
||||||
#gpio-cells = <2>;
|
#gpio-cells = <2>;
|
||||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
gpio-map-pass-thru = <0 0x3f>;
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
gpio-map = <10 0 &arduino_nano_header 4 0>, // D4
|
gpio-map = <10 0 &arduino_nano_header 4 0>, /* D4 */
|
||||||
<15 0 &arduino_nano_header 10 0>, // D10
|
<15 0 &arduino_nano_header 10 0>, /* D10 */
|
||||||
<16 0 &arduino_nano_header 9 0>; // D9
|
<16 0 &arduino_nano_header 9 0>; /* D9 */
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -51,8 +51,8 @@ Requirements
|
||||||
************
|
************
|
||||||
|
|
||||||
This shield can only be used with a board which provides a configuration
|
This shield can only be used with a board which provides a configuration
|
||||||
for Arduino connectors and defines node aliases for SPI and GPIO interfaces
|
for Arduino or Arduino Nano connectors and defines node aliases for SPI and
|
||||||
(see :ref:`shields` for more details).
|
GPIO interfaces (see :ref:`shields` for more details).
|
||||||
|
|
||||||
Programming
|
Programming
|
||||||
***********
|
***********
|
||||||
|
@ -65,6 +65,15 @@ Set ``-DSHIELD=adafruit_2_8_tft_touch_v2`` when you invoke ``west build``. For e
|
||||||
:shield: adafruit_2_8_tft_touch_v2
|
:shield: adafruit_2_8_tft_touch_v2
|
||||||
:goals: build
|
:goals: build
|
||||||
|
|
||||||
|
If the shield is connected to a board which has Arduino Nano connector,
|
||||||
|
set ``-DSHIELD=adafruit_2_8_tft_touch_v2_nano`` when you invoke ``west build``.
|
||||||
|
|
||||||
|
.. zephyr-app-commands::
|
||||||
|
:zephyr-app: samples/subsys/display/lvgl
|
||||||
|
:board: arduino_nano_33_ble
|
||||||
|
:shield: adafruit_2_8_tft_touch_v2_nano
|
||||||
|
:goals: build
|
||||||
|
|
||||||
References
|
References
|
||||||
**********
|
**********
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 PHYTEC Messtechnik GmbH
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/display/ili9xxx.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zephyr,display = &ili9340;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&arduino_spi {
|
||||||
|
status = "okay";
|
||||||
|
cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>, /* D10 */
|
||||||
|
<&arduino_header 10 GPIO_ACTIVE_LOW>; /* D04 */
|
||||||
|
|
||||||
|
|
||||||
|
ili9340: ili9340@0 {
|
||||||
|
compatible = "ilitek,ili9340";
|
||||||
|
label = "ILI9340";
|
||||||
|
spi-max-frequency = <15151515>;
|
||||||
|
reg = <0>;
|
||||||
|
cmd-data-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
|
||||||
|
width = <320>;
|
||||||
|
height = <240>;
|
||||||
|
pixel-format = <ILI9XXX_PIXEL_FORMAT_RGB888>;
|
||||||
|
rotation = <90>;
|
||||||
|
frmctr1 = [00 18];
|
||||||
|
pwctrl1 = [23 00];
|
||||||
|
vmctrl1 = [3e 28];
|
||||||
|
vmctrl2 = [86];
|
||||||
|
pgamctrl = [0f 31 2b 0c 0e 08 4e f1 37 07 10 03 0e 09 00];
|
||||||
|
ngamctrl = [00 0e 14 03 11 07 31 c1 48 08 0f 0c 31 36 0f];
|
||||||
|
};
|
||||||
|
|
||||||
|
sdhc0: sdhc@1 {
|
||||||
|
compatible = "zephyr,mmc-spi-slot";
|
||||||
|
reg = <1>;
|
||||||
|
status = "okay";
|
||||||
|
label = "SDHC0";
|
||||||
|
spi-max-frequency = <24000000>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&arduino_i2c {
|
||||||
|
touch_controller: ft5336@38 {
|
||||||
|
compatible = "focaltech,ft5336";
|
||||||
|
reg = <0x38>;
|
||||||
|
label = "FT5336";
|
||||||
|
/* Uncomment if IRQ line is available (requires to solder jumper) */
|
||||||
|
/* int-gpios = <&arduino_header 13 GPIO_ACTIVE_LOW>; */ /* D7 */
|
||||||
|
};
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue