-
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 PiMoroni Pico LCD 2
The new part of the Raspberry Pi Pico LCD shield by PiMoroni is: * PIM580 Pico Display Pack 2.0, here in Bridle known as PiMoroni Pico LCD 2 (pimoroni_pico_lcd_2) 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
42 changed files
with
1,281 additions
and
1 deletion.
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/pimoroni_pico_lcd_2/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/pimoroni_pico_lcd_2/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" |
24 changes: 24 additions & 0 deletions
24
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/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,24 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "rpipico_r3-tweaks.dtsi" | ||
#include "rpipico_r3-pinctrl.dtsi" | ||
|
||
#include <freq.h> | ||
|
||
&pico_spi0 { | ||
pinctrl-0 = <&spi0_lcd>; | ||
pinctrl-names = "default"; | ||
clock-frequency = <DT_FREQ_M(20)>; | ||
}; | ||
|
||
rpipico_spi_lcd: &pico_spi0 {}; | ||
|
||
&pico_pwm { | ||
pinctrl-0 = <&pwm_lcd_leds>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
rpipico_pwm: &pico_pwm {}; |
18 changes: 18 additions & 0 deletions
18
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/rpipico_r3-pinctrl.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,18 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/pinctrl/rpi-pico-rp2040-pinctrl.h> | ||
|
||
pwm_lcd_leds: &pwm_pico { | ||
group6_led { | ||
pinmux = <PWM_3A_P6>; /* GP6: PWM3CHA (6) */ | ||
}; | ||
group7_led { | ||
pinmux = <PWM_3B_P7>; /* GP7: PWM3CHB (7) */ | ||
}; | ||
group8_led { | ||
pinmux = <PWM_4A_P8>; /* GP8: PWM4CHA (8) */ | ||
}; | ||
}; |
17 changes: 17 additions & 0 deletions
17
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/rpipico_r3-tweaks.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,17 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
|
||
&gpio0 { | ||
boot-hogs-led-rgb-off { | ||
gpio-hog; | ||
gpios = <6 GPIO_ACTIVE_HIGH>, /* User LED R */ | ||
<7 GPIO_ACTIVE_HIGH>, /* User LED G */ | ||
<8 GPIO_ACTIVE_HIGH>; /* User LED B */ | ||
output-high; | ||
line-name = "TriColor ChipLED switched off"; | ||
}; | ||
}; |
82 changes: 82 additions & 0 deletions
82
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/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_320x240.dtsi" | ||
#include "st7789v_rgb565.dtsi" | ||
|
||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
#include <zephyr/dt-bindings/pwm/pwm.h> | ||
|
||
&rpipico_spi_lcd { | ||
status = "okay"; | ||
cs-gpios = <&rpipico_header 17 GPIO_ACTIVE_LOW>; /* GP17 */ | ||
}; | ||
|
||
&mipi_dbi { | ||
status = "okay"; | ||
dc-gpios = <&rpipico_header 16 GPIO_ACTIVE_HIGH>; /* GP16 */ | ||
spi-dev = <&rpipico_spi_lcd>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
}; | ||
|
||
&lcd_panel { | ||
status = "okay"; | ||
}; | ||
|
||
&lcd_backlight_en { | ||
status = "okay"; | ||
enable-gpios = <&rpipico_header 20 GPIO_ACTIVE_HIGH>; /* GP20 */ | ||
}; | ||
|
||
&rpipico_pwm { | ||
status = "okay"; | ||
divider-frac-3 = <15>; | ||
divider-int-3 = <255>; | ||
divider-frac-4 = <15>; | ||
divider-int-4 = <255>; | ||
}; | ||
|
||
&pwm_led_r { /* GP6:PWM3A */ | ||
pwms = <&rpipico_pwm 6 PWM_MSEC(20) PWM_POLARITY_INVERTED>; | ||
}; | ||
|
||
&pwm_led_g { /* GP7:PWM3B */ | ||
pwms = <&rpipico_pwm 7 PWM_MSEC(20) PWM_POLARITY_INVERTED>; | ||
}; | ||
|
||
&pwm_led_b { /* GP8:PWM4A */ | ||
pwms = <&rpipico_pwm 8 PWM_MSEC(20) PWM_POLARITY_INVERTED>; | ||
}; | ||
|
||
&led_r { /* GP6 */ | ||
gpios = <&rpipico_header 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&led_g { /* GP7 */ | ||
gpios = <&rpipico_header 7 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&led_b { /* GP8 */ | ||
gpios = <&rpipico_header 8 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_0 { /* GP12 */ | ||
gpios = <&rpipico_header 12 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_1 { /* GP13 */ | ||
gpios = <&rpipico_header 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_2 { /* GP14 */ | ||
gpios = <&rpipico_header 14 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_3 { /* GP15 */ | ||
gpios = <&rpipico_header 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; |
40 changes: 40 additions & 0 deletions
40
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/st7789v_240x320.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_240x320: 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 = <320>; /* portrait */ | ||
x-offset = <0>; /* portrait */ | ||
y-offset = <0>; /* portrait */ | ||
|
||
vcom = <0x1f>; | ||
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 08 11 08 0C 15 39 33 50 36 13 14 29 2D]; | ||
nvgam-param = [D0 08 10 08 06 06 39 44 51 0B 16 14 2F 31]; | ||
ram-param = [00 F0]; | ||
rgb-param = [CD 08 14]; | ||
}; | ||
}; | ||
|
||
lcd_panel: &st7789v_240x320 {}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/st7789v_240x320_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_240x320 { | ||
mdac = <0x40>; /* portrait, mirrored */ | ||
}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/st7789v_240x320_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,8 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&st7789v_240x320 { | ||
mdac = <0xC0>; /* portrait, overhead */ | ||
}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/st7789v_240x320_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_240x320 { | ||
mdac = <0x80>; /* portrait, upsidedown */ | ||
}; |
40 changes: 40 additions & 0 deletions
40
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/st7789v_320x240.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_320x240: st7789v@0 { | ||
compatible = "sitronix,st7789v"; | ||
mipi-max-frequency = <DT_FREQ_M(20)>; | ||
mipi-mode = <MIPI_DBI_MODE_SPI_4WIRE>; | ||
reg = <0>; | ||
|
||
status = "disabled"; | ||
|
||
width = <320>; /* landscape */ | ||
height = <240>; /* landscape */ | ||
x-offset = <0>; /* landscape */ | ||
y-offset = <0>; /* landscape */ | ||
|
||
vcom = <0x1f>; | ||
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 08 11 08 0C 15 39 33 50 36 13 14 29 2D]; | ||
nvgam-param = [D0 08 10 08 06 06 39 44 51 0B 16 14 2F 31]; | ||
ram-param = [00 F0]; | ||
rgb-param = [CD 08 14]; | ||
}; | ||
}; | ||
|
||
lcd_panel: &st7789v_320x240 {}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/st7789v_320x240_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_320x240 { | ||
mdac = <0xE0>; /* landscape, mirrored */ | ||
}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/st7789v_320x240_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,8 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&st7789v_320x240 { | ||
mdac = <0xA0>; /* landscape, overhead */ | ||
}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/st7789v_320x240_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_320x240 { | ||
mdac = <0x20>; /* landscape, upsidedown */ | ||
}; |
8 changes: 8 additions & 0 deletions
8
boards/shields/rpi_pico_lcd/boards/pimoroni_pico_lcd_2/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/pimoroni_pico_lcd_2/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/pimoroni_pico_lcd_2/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/pimoroni_pico_lcd_2/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/pimoroni_pico_lcd_2/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.