Skip to content

Commit

Permalink
shields: add GeeekPi Pico Breadboard Kit
Browse files Browse the repository at this point in the history
The new part of the Raspberry Pi Pico Breadboard shield by 52Pi is:

  * EP-0164: "Pico Breadboard Kit" (geeekpi_pico_bb)

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
rexut committed Jul 21, 2024
1 parent fbebc0b commit c85f9f4
Show file tree
Hide file tree
Showing 44 changed files with 1,706 additions and 1 deletion.
5 changes: 5 additions & 0 deletions boards/shields/rpi_pico_bb/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,28 @@

config SHIELD_RPI_PICO_BB
bool
default y if SHIELD_GEEEKPI_PICO_BB
default y if SHIELD_GEEEKPI_PICO_BB_PLUS
default n

config LV_Z_VDB_SIZE
default 64 if SHIELD_GEEEKPI_PICO_BB
default 32 if SHIELD_GEEEKPI_PICO_BB_PLUS
depends on SHIELD_RPI_PICO_BB && DISPLAY && LVGL

config LV_Z_BITS_PER_PIXEL
default 16 if SHIELD_GEEEKPI_PICO_BB
default 16 if SHIELD_GEEEKPI_PICO_BB_PLUS
depends on SHIELD_RPI_PICO_BB && DISPLAY && LVGL

choice LV_COLOR_DEPTH
default LV_COLOR_DEPTH_16 if SHIELD_GEEEKPI_PICO_BB
default LV_COLOR_DEPTH_16 if SHIELD_GEEEKPI_PICO_BB_PLUS
depends on SHIELD_RPI_PICO_BB && DISPLAY && LVGL
endchoice

config LV_COLOR_16_SWAP
default y if SHIELD_GEEEKPI_PICO_BB
default y if SHIELD_GEEEKPI_PICO_BB_PLUS
depends on SHIELD_RPI_PICO_BB && DISPLAY && LVGL

Expand Down
3 changes: 3 additions & 0 deletions boards/shields/rpi_pico_bb/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Copyright (c) 2024 TiaC Systems
# SPDX-License-Identifier: Apache-2.0

config SHIELD_GEEEKPI_PICO_BB
def_bool $(shields_list_contains,geeekpi_pico_bb)

config SHIELD_GEEEKPI_PICO_BB_PLUS
def_bool $(shields_list_contains,geeekpi_pico_bb_plus)
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2024 TiaC Systems
* SPDX-License-Identifier: Apache-2.0
*/

#include <freq.h>
#include <zephyr/dt-bindings/display/ili9xxx.h>

&mipi_dbi {
ili9341_240x320: ili9341@0 {
compatible = "ilitek,ili9341";
mipi-max-frequency = <DT_FREQ_M(25)>;
reg = <0>;

status = "disabled";

width = <240>;
height = <320>;
rotation = <180>; /* portrait */

disctrl = [08 82 27 04]; /* non-mirrored */
ifctl = [01 00 00];
ifmode = [40];

pwctrla = [39 2C 00 34 02];
pwctrlb = [00 C1 30];
timctrla = [85 00 78];
timctrlb = [00 00];
pwseqctrl = [64 03 12 81];
pumpratioctrl = [20];

enable3g = [00];
gamset = [01];

vmctrl1 = [3E 28];
vmctrl2 = [86];
frmctr1 = [00 18];
pwctrl1 = [23];
pwctrl2 = [10];
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];
};
};

lcd_panel: &ili9341_240x320 {};
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
*/

&ili9341_240x320 {
rotation = <180>; /* portrait */
disctrl = [0A A2 27 04]; /* mirrored */
};
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
*/

&ili9341_240x320 {
rotation = <0>; /* portrait */
disctrl = [08 82 27 04]; /* non-mirrored */
};
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
*/

&ili9341_240x320 {
rotation = <0>; /* portrait */
disctrl = [0A A2 27 04]; /* mirrored */
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2024 TiaC Systems
* SPDX-License-Identifier: Apache-2.0
*/

#include <freq.h>
#include <zephyr/dt-bindings/display/ili9xxx.h>

&mipi_dbi {
ili9341_320x240: ili9341@0 {
compatible = "ilitek,ili9341";
mipi-max-frequency = <DT_FREQ_M(25)>;
reg = <0>;

status = "disabled";

width = <320>;
height = <240>;
rotation = <270>; /* landscape */

disctrl = [08 82 27 04]; /* non-mirrored */
ifctl = [01 00 00];
ifmode = [40];

pwctrla = [39 2C 00 34 02];
pwctrlb = [00 C1 30];
timctrla = [85 00 78];
timctrlb = [00 00];
pwseqctrl = [64 03 12 81];
pumpratioctrl = [20];

enable3g = [00];
gamset = [01];

vmctrl1 = [3E 28];
vmctrl2 = [86];
frmctr1 = [00 18];
pwctrl1 = [23];
pwctrl2 = [10];
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];
};
};

lcd_panel: &ili9341_320x240 {};
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
*/

&ili9341_320x240 {
rotation = <90>; /* landscape */
disctrl = [0A A2 27 04]; /* mirrored */
};
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
*/

&ili9341_320x240 {
rotation = <90>; /* landscape */
disctrl = [08 82 27 04]; /* non-mirrored */
};
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
*/

&ili9341_320x240 {
rotation = <270>; /* landscape */
disctrl = [0A A2 27 04]; /* mirrored */
};
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 {
display-inversion; /* CMYK, inverse of RGB */
};
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 {
pixel-format = <ILI9XXX_PIXEL_FORMAT_RGB565>;
};
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 {
pixel-format = <ILI9XXX_PIXEL_FORMAT_RGB888>;
};
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"
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"
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2024 TiaC Systems
* SPDX-License-Identifier: Apache-2.0
*/

#include "rpipico_r3-pinctrl.dtsi"

#include <freq.h>

&pico_spi0 {
pinctrl-0 = <&spi0_lcd>;
pinctrl-names = "default";
clock-frequency = <DT_FREQ_M(25)>;
};

rpipico_spi_lcd: &pico_spi0 {};

&pico_spi1 {
pinctrl-0 = <&spi1_tsc>;
pinctrl-names = "default";
clock-frequency = <DT_FREQ_M(3)>;
};

rpipico_spi_tsc: &pico_spi1 {};

&pico_pwm {
pinctrl-0 = <&pwm_lcd_feedback>;
pinctrl-names = "default";
};

rpipico_pwm: &pico_pwm {};

/* disable default SPI0 bus to avoid conflicts with user buttons (GPIO) */
&pico_spi0 {
status = "disabled";
};

/* disable default I2C0 bus to avoid conflicts with user LEDs (PWM/GPIO) */
&pico_i2c0 {
status = "disabled";
};

/* disable default I2C1 bus to avoid conflicts with LCD (SPI0) */
&pico_i2c1 {
status = "disabled";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright (c) 2024 TiaC Systems
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/pinctrl/rpi-pico-rp2040-pinctrl.h>

pwm_lcd_feedback: &pwm_pico {
group2_led {
pinmux = <PWM_1A_P2>; /* GP2: PWM1CHA (2) */
};
group3_led {
pinmux = <PWM_1B_P3>; /* GP3: PWM1CHB (3) */
};
group4_led {
pinmux = <PWM_2A_P4>; /* GP4: PWM2CHA (4) */
};
group5_led {
pinmux = <PWM_2B_P5>; /* GP5: PWM2CHB (5) */
};
group22_buzzer {
pinmux = <PWM_3A_P22>; /* GP22: PWM3CHA (6) */
};
};

&pinctrl {
spi0_lcd: spi0_lcd {
group67_spi {
pinmux = /* GP5: SPI0_CSn not used, is GP13 as GPIO */
<SPI0_SCK_P6>, /* GP6: SPI0_SCK */
<SPI0_TX_P7>; /* GP7: SPI0_TX */
};
/* GP8: SPI0_RX not used for LCD only access */
};

spi1_tsc: spi1_tsc {
group1011_spi {
pinmux = /* GP9: SPI1_CSn not used, is GP12 as GPIO */
<SPI1_SCK_P10>, /* GP10: SPI1_SCK */
<SPI1_TX_P11>; /* GP11: SPI1_TX */
};
group8_spi {
pinmux = <SPI1_RX_P8>; /* GP8: SPI1_RX */
input-enable;
};
};
};
Loading

0 comments on commit c85f9f4

Please sign in to comment.