boards: Round Display for Xiao
Added the Round Display for Xiao boards as a shield. Added a xiao_adc node to Xiao board dtsi files. Signed-off-by: Nicolas Goualard <nicolas.goualard@sfr.fr>
This commit is contained in:
parent
882238116e
commit
e7113700b9
10 changed files with 161 additions and 1 deletions
|
@ -30,3 +30,4 @@ xiao_spi: &sercom0 {};
|
||||||
xiao_i2c: &sercom2 {};
|
xiao_i2c: &sercom2 {};
|
||||||
xiao_serial: &sercom4 {};
|
xiao_serial: &sercom4 {};
|
||||||
xiao_dac: &dac0 {};
|
xiao_dac: &dac0 {};
|
||||||
|
xiao_adc: &adc {};
|
||||||
|
|
|
@ -30,3 +30,4 @@
|
||||||
xiao_spi: &spi2 {};
|
xiao_spi: &spi2 {};
|
||||||
xiao_i2c: &i2c1 {};
|
xiao_i2c: &i2c1 {};
|
||||||
xiao_serial: &uart0 {};
|
xiao_serial: &uart0 {};
|
||||||
|
xiao_adc: &adc {};
|
||||||
|
|
|
@ -27,3 +27,4 @@
|
||||||
xiao_spi: &spi2 {};
|
xiao_spi: &spi2 {};
|
||||||
xiao_i2c: &i2c0 {};
|
xiao_i2c: &i2c0 {};
|
||||||
xiao_serial: &uart0 {};
|
xiao_serial: &uart0 {};
|
||||||
|
xiao_adc: &adc0 {};
|
||||||
|
|
|
@ -27,3 +27,4 @@
|
||||||
xiao_spi: &spi2 {};
|
xiao_spi: &spi2 {};
|
||||||
xiao_i2c: &i2c0 {};
|
xiao_i2c: &i2c0 {};
|
||||||
xiao_serial: &uart0 {};
|
xiao_serial: &uart0 {};
|
||||||
|
xiao_adc: &adc0 {};
|
||||||
|
|
23
boards/shields/seeed_xiao_round_display/Kconfig.defconfig
Normal file
23
boards/shields/seeed_xiao_round_display/Kconfig.defconfig
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Copyright (c) 2024 Nicolas Goualard <nicolas.goualard@sfr.fr>
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
if SHIELD_SEEED_XIAO_ROUND_DISPLAY
|
||||||
|
|
||||||
|
if DISPLAY
|
||||||
|
|
||||||
|
if LVGL
|
||||||
|
|
||||||
|
config INPUT
|
||||||
|
default y
|
||||||
|
|
||||||
|
choice LV_COLOR_DEPTH
|
||||||
|
default LV_COLOR_DEPTH_16
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config LV_COLOR_16_SWAP
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # LVGL
|
||||||
|
endif # DISPLAY
|
||||||
|
|
||||||
|
endif # SHIELD_XIAO_ROUND_DISPLAY
|
5
boards/shields/seeed_xiao_round_display/Kconfig.shield
Normal file
5
boards/shields/seeed_xiao_round_display/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (c) 2024 Nicolas Goualard <nicolas.goualard@sfr.fr>
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
config SHIELD_SEEED_XIAO_ROUND_DISPLAY
|
||||||
|
def_bool $(shields_list_contains,seeed_xiao_round_display)
|
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
40
boards/shields/seeed_xiao_round_display/doc/index.rst
Normal file
40
boards/shields/seeed_xiao_round_display/doc/index.rst
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
.. _seeed_xiao_round_display:
|
||||||
|
|
||||||
|
Seeed Studio XIAO Round Display
|
||||||
|
###############################
|
||||||
|
|
||||||
|
Overview
|
||||||
|
********
|
||||||
|
|
||||||
|
Seeed Studio Round Display for XIAO is an expansion board compatible with all
|
||||||
|
XIAO development boards. It features a fully covered touch screen on one side,
|
||||||
|
designed as a 39mm disc. It contains onboard RTC, charge chip, TF card slot
|
||||||
|
within its compact size, perfect for interactive displays in smart home,
|
||||||
|
wearables and more.
|
||||||
|
|
||||||
|
More information can be found on `the Getting Started page`_
|
||||||
|
|
||||||
|
.. figure:: img/seeed_xiao_round_display.webp
|
||||||
|
:align: center
|
||||||
|
:alt: Seeed Studio XIAO Round Display
|
||||||
|
|
||||||
|
Seeed Studio XIAO Round Display (Credit: Seeed Studio)
|
||||||
|
|
||||||
|
Programming
|
||||||
|
***********
|
||||||
|
|
||||||
|
Set ``-DSHIELD=seeed_xiao_round_display`` when you invoke ``west build``.
|
||||||
|
|
||||||
|
LVGL Basic Sample
|
||||||
|
=================
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
.. zephyr-app-commands::
|
||||||
|
:zephyr-app: samples/subsys/display/lvgl
|
||||||
|
:board: xiao_ble/nrf52840
|
||||||
|
:shield: seeed_xiao_round_display
|
||||||
|
:goals: build
|
||||||
|
|
||||||
|
.. _the Getting Started page:
|
||||||
|
https://wiki.seeedstudio.com/get_start_round_display/
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024, Nicolas Goualard <nicolas.goualard@sfr.fr>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <freq.h>
|
||||||
|
#include <zephyr/dt-bindings/display/panel.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
chosen {
|
||||||
|
zephyr,display = &gc9a01_xiao_round_display;
|
||||||
|
};
|
||||||
|
|
||||||
|
vbatt {
|
||||||
|
compatible = "voltage-divider";
|
||||||
|
io-channels = <&xiao_adc 0>;
|
||||||
|
output-ohms = <470000>;
|
||||||
|
full-ohms = <940000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
lvgl_pointer {
|
||||||
|
compatible = "zephyr,lvgl-pointer-input";
|
||||||
|
input = <&chsc6x_xiao_round_display>;
|
||||||
|
};
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
rtc = &pcf8563_xiao_round_display;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&xiao_adc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* xiao_serial uses pins D6 and D7 of the Xiao, which are used respectively to
|
||||||
|
* control the screen backlight and as touch controller interrupt.
|
||||||
|
*/
|
||||||
|
&xiao_serial {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
&xiao_i2c {
|
||||||
|
clock-frequency = < I2C_BITRATE_FAST >;
|
||||||
|
|
||||||
|
pcf8563_xiao_round_display: pcf8563@51 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "nxp,pcf8563";
|
||||||
|
reg = <0x51>;
|
||||||
|
};
|
||||||
|
|
||||||
|
chsc6x_xiao_round_display: chsc6x@2e {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "chipsemi,chsc6x";
|
||||||
|
reg = <0x2e>;
|
||||||
|
irq-gpios = <&xiao_d 7 GPIO_ACTIVE_LOW>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&xiao_spi {
|
||||||
|
status = "okay";
|
||||||
|
cs-gpios = <&xiao_d 1 GPIO_ACTIVE_LOW>, <&xiao_d 2 GPIO_ACTIVE_LOW>;
|
||||||
|
|
||||||
|
gc9a01_xiao_round_display: gc9a01@0 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "galaxycore,gc9x01x";
|
||||||
|
reg = <0>;
|
||||||
|
spi-max-frequency = <DT_FREQ_M(100)>;
|
||||||
|
cmd-data-gpios = <&xiao_d 3 GPIO_ACTIVE_HIGH>;
|
||||||
|
pixel-format = <PANEL_PIXEL_FORMAT_RGB_565>;
|
||||||
|
width = <240>;
|
||||||
|
height = <240>;
|
||||||
|
display-inversion;
|
||||||
|
};
|
||||||
|
|
||||||
|
sdhc_xiao_round_display: sdhc@1 {
|
||||||
|
compatible = "zephyr,sdhc-spi-slot";
|
||||||
|
reg = <1>;
|
||||||
|
status = "okay";
|
||||||
|
mmc {
|
||||||
|
compatible = "zephyr,sdmmc-disk";
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
spi-max-frequency = <DT_FREQ_M(24)>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -36,11 +36,12 @@ Requirements
|
||||||
************
|
************
|
||||||
|
|
||||||
Display shield and a board which provides a configuration
|
Display shield and a board which provides a configuration
|
||||||
for Arduino connectors, for example:
|
for corresponding connectors, for example:
|
||||||
|
|
||||||
- :ref:`adafruit_2_8_tft_touch_v2` and :ref:`nrf52840dk_nrf52840`
|
- :ref:`adafruit_2_8_tft_touch_v2` and :ref:`nrf52840dk_nrf52840`
|
||||||
- :ref:`buydisplay_2_8_tft_touch_arduino` and :ref:`nrf52840dk_nrf52840`
|
- :ref:`buydisplay_2_8_tft_touch_arduino` and :ref:`nrf52840dk_nrf52840`
|
||||||
- :ref:`ssd1306_128_shield` and :ref:`frdm_k64f`
|
- :ref:`ssd1306_128_shield` and :ref:`frdm_k64f`
|
||||||
|
- :ref:`seeed_xiao_round_display` and :ref:`xiao_ble`
|
||||||
|
|
||||||
or a board with an integrated display:
|
or a board with an integrated display:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue