-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shields: rpi_pico_lcd: add Spotpear Pico LCD 1.54
The new part of the Raspberry Pi Pico LCD shield by PiMoroni is: * Raspberry Pi Pico 1.54inch LCD Rev 2.0 (blue), here in Bridle known as SpotpearPico LCD 1.54 (spotpear_pico_lcd_1_54) supported features: * display API (zephyr/samples/drivers/display) * LVGL stack (zephyr/samples/subsys/display/lvgl) * input API (zephyr/samples/subsys/input/input_dump) supported platforms: * Raspberry Pi Pico (rpi_pico) * Raspberry Pi Pico W (rpi_pico_w) * Waveshare RP2040 Plus 4MB (waveshare_rp2040_plus) * Waveshare RP2040 Plus 16MB (waveshare_rp2040_plus@16mb) Signed-off-by: Stephan Linz <[email protected]>
- Loading branch information
Showing
38 changed files
with
1,213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/rpi_pico.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "rpipico_r3.dtsi" |
6 changes: 6 additions & 0 deletions
6
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/rpi_pico_w.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "rpipico_r3.dtsi" |
14 changes: 14 additions & 0 deletions
14
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/rpipico_r3-connect.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <freq.h> | ||
|
||
&pico_spi1 { | ||
pinctrl-0 = <&spi1_lcd>; | ||
pinctrl-names = "default"; | ||
clock-frequency = <DT_FREQ_M(20)>; | ||
}; | ||
|
||
rpipico_spi_lcd: &pico_spi1 {}; |
82 changes: 82 additions & 0 deletions
82
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/rpipico_r3.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "rpipico_r3-connect.dtsi" | ||
|
||
#include "st7789v_240x240ls.dtsi" | ||
#include "st7789v_rgb565.dtsi" | ||
|
||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
|
||
&rpipico_spi_lcd { | ||
status = "okay"; | ||
cs-gpios = <&rpipico_header 9 GPIO_ACTIVE_LOW>; /* GP9 */ | ||
}; | ||
|
||
&mipi_dbi { | ||
status = "okay"; | ||
reset-gpios = <&rpipico_header 12 GPIO_ACTIVE_LOW>; /* GP12 */ | ||
dc-gpios = <&rpipico_header 8 GPIO_ACTIVE_HIGH>; /* GP8 */ | ||
spi-dev = <&rpipico_spi_lcd>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
}; | ||
|
||
&lcd_panel { | ||
status = "okay"; | ||
}; | ||
|
||
&lcd_backlight_en { | ||
status = "okay"; | ||
enable-gpios = <&rpipico_header 7 GPIO_ACTIVE_HIGH>; /* GP7 */ | ||
}; | ||
|
||
&button_0 { /* GP2 */ | ||
gpios = <&rpipico_header 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_1 { /* GP3 */ | ||
gpios = <&rpipico_header 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_2 { /* GP4 */ | ||
gpios = <&rpipico_header 4 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_3 { /* GP6 */ | ||
gpios = <&rpipico_header 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_4 { /* GP13 */ | ||
gpios = <&rpipico_header 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_5 { /* GP14 */ | ||
gpios = <&rpipico_header 14 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_6 { /* GP16 */ | ||
gpios = <&rpipico_header 16 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_7 { /* GP17 */ | ||
gpios = <&rpipico_header 17 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_8 { /* GP26 */ | ||
gpios = <&rpipico_header 23 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_9 { /* GP27 */ | ||
gpios = <&rpipico_header 24 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_10 { /* GP18 */ | ||
gpios = <&rpipico_header 18 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_11 { /* GP1 */ | ||
gpios = <&rpipico_header 1 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; |
40 changes: 40 additions & 0 deletions
40
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_240x240ls.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <freq.h> | ||
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h> | ||
|
||
&mipi_dbi { | ||
st7789v_240x240ls: st7789v@0 { | ||
compatible = "sitronix,st7789v"; | ||
mipi-max-frequency = <DT_FREQ_M(20)>; | ||
mipi-mode = <MIPI_DBI_MODE_SPI_4WIRE>; | ||
reg = <0>; | ||
|
||
status = "disabled"; | ||
|
||
width = <240>; /* landscape */ | ||
height = <240>; /* landscape */ | ||
x-offset = <0>; /* landscape */ | ||
y-offset = <0>; /* landscape */ | ||
|
||
vcom = <0x19>; | ||
gctrl = <0x35>; | ||
vrhs = <0x12>; | ||
vdvs = <0x20>; | ||
mdac = <0x60>; /* landscape */ | ||
gamma = <0x01>; | ||
lcm = <0x2c>; | ||
porch-param = [0C 0C 00 33 33]; | ||
cmd2en-param = [5A 69 02 01]; | ||
pwctrl1-param = [A4 A1]; | ||
pvgam-param = [D0 04 0D 11 13 2B 3F 54 4C 18 0D 0B 1F 23]; | ||
nvgam-param = [D0 04 0C 11 13 2C 3F 44 51 2F 1F 1F 20 23]; | ||
ram-param = [00 F0]; | ||
rgb-param = [CD 08 14]; | ||
}; | ||
}; | ||
|
||
lcd_panel: &st7789v_240x240ls {}; |
9 changes: 9 additions & 0 deletions
9
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_240x240ls_mirrored.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&st7789v_240x240ls { | ||
mdac = <0xE0>; /* landscape, mirrored */ | ||
x-offset = <80>; | ||
}; |
9 changes: 9 additions & 0 deletions
9
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_240x240ls_overhead.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&st7789v_240x240ls { | ||
mdac = <0xA0>; /* landscape, overhead */ | ||
x-offset = <80>; | ||
}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_240x240ls_upsidedown.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&st7789v_240x240ls { | ||
mdac = <0x20>; /* landscape, upsidedown */ | ||
}; |
40 changes: 40 additions & 0 deletions
40
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_240x240pt.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <freq.h> | ||
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h> | ||
|
||
&mipi_dbi { | ||
st7789v_240x240pt: st7789v@0 { | ||
compatible = "sitronix,st7789v"; | ||
mipi-max-frequency = <DT_FREQ_M(20)>; | ||
mipi-mode = <MIPI_DBI_MODE_SPI_4WIRE>; | ||
reg = <0>; | ||
|
||
status = "disabled"; | ||
|
||
width = <240>; /* portrait */ | ||
height = <240>; /* portrait */ | ||
x-offset = <0>; /* portrait */ | ||
y-offset = <0>; /* portrait */ | ||
|
||
vcom = <0x19>; | ||
gctrl = <0x35>; | ||
vrhs = <0x12>; | ||
vdvs = <0x20>; | ||
mdac = <0x00>; /* portrait */ | ||
gamma = <0x01>; | ||
lcm = <0x2c>; | ||
porch-param = [0C 0C 00 33 33]; | ||
cmd2en-param = [5A 69 02 01]; | ||
pwctrl1-param = [A4 A1]; | ||
pvgam-param = [D0 04 0D 11 13 2B 3F 54 4C 18 0D 0B 1F 23]; | ||
nvgam-param = [D0 04 0C 11 13 2C 3F 44 51 2F 1F 1F 20 23]; | ||
ram-param = [00 F0]; | ||
rgb-param = [CD 08 14]; | ||
}; | ||
}; | ||
|
||
lcd_panel: &st7789v_240x240pt {}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_240x240pt_mirrored.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&st7789v_240x240pt { | ||
mdac = <0x40>; /* portrait, mirrored */ | ||
}; |
9 changes: 9 additions & 0 deletions
9
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_240x240pt_overhead.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&st7789v_240x240pt { | ||
mdac = <0xC0>; /* portrait, overhead */ | ||
y-offset = <80>; | ||
}; |
9 changes: 9 additions & 0 deletions
9
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_240x240pt_upsidedown.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&st7789v_240x240pt { | ||
mdac = <0x80>; /* portrait, upsidedown */ | ||
y-offset = <80>; | ||
}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_cmyk.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&lcd_panel { | ||
inversion-off; | ||
}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_rgb565.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&lcd_panel { | ||
colmod = <0x05>; /* 16-bit, RGB565 */ | ||
}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_rgb666.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&lcd_panel { | ||
colmod = <0x06>; /* 18-bit, RGB666 */ | ||
}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/st7789v_rgb888.dtsi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&lcd_panel { | ||
colmod = <0x07>; /* 24-bit, RGB888 */ | ||
}; |
6 changes: 6 additions & 0 deletions
6
boards/shields/rpi_pico_lcd/boards/spotpear_pico_lcd_1_54/waveshare_rp2040_plus.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "rpipico_r3.dtsi" |
Oops, something went wrong.