-
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: add GeeekPi Pico Breadboard Kit Plus
The new part of the Raspberry Pi Pico Breadboard shield by 52Pi is: * EP-0172: "Pico Breadboard Kit Plus" (geeekpi_pico_bb_plus) 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
47 changed files
with
2,175 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright (c) 2024 TiaC Systems | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config SHIELD_RPI_PICO_BB | ||
bool | ||
default y if SHIELD_GEEEKPI_PICO_BB_PLUS | ||
default n | ||
|
||
config LV_Z_VDB_SIZE | ||
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_PLUS | ||
depends on SHIELD_RPI_PICO_BB && DISPLAY && LVGL | ||
|
||
choice LV_COLOR_DEPTH | ||
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_PLUS | ||
depends on SHIELD_RPI_PICO_BB && DISPLAY && LVGL | ||
|
||
config INPUT | ||
default y if DT_HAS_ZEPHYR_LVGL_BUTTON_INPUT_ENABLED | ||
default y if DT_HAS_ZEPHYR_LVGL_KEYPAD_INPUT_ENABLED | ||
default y if DT_HAS_ZEPHYR_LVGL_POINTER_INPUT_ENABLED | ||
depends on SHIELD_RPI_PICO_BB && DISPLAY && LVGL | ||
|
||
config INPUT_GT911_INTERRUPT | ||
default y if SHIELD_GEEEKPI_PICO_BB_PLUS | ||
depends on SHIELD_RPI_PICO_BB && INPUT && LVGL | ||
|
||
config ADC | ||
default y if DT_HAS_ADC_KEYS_ENABLED | ||
depends on SHIELD_RPI_PICO_BB && INPUT && LVGL | ||
|
||
config REGULATOR | ||
default y | ||
depends on DT_HAS_REGULATOR_FIXED_ENABLED |
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,5 @@ | ||
# Copyright (c) 2024 TiaC Systems | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config SHIELD_GEEEKPI_PICO_BB_PLUS | ||
def_bool $(shields_list_contains,geeekpi_pico_bb_plus) |
17 changes: 17 additions & 0 deletions
17
boards/shields/rpi_pico_bb/boards/geeekpi_pico_bb_plus/gt911_320x480.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 <freq.h> | ||
|
||
&rpipico_i2c_tsc { | ||
gt911_320x480: gt911@5d { | ||
compatible = "goodix,gt911"; | ||
reg = <0x5d>; | ||
|
||
status = "disabled"; | ||
}; | ||
}; | ||
|
||
tsc_panel: >911_320x480 {}; |
6 changes: 6 additions & 0 deletions
6
boards/shields/rpi_pico_bb/boards/geeekpi_pico_bb_plus/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_bb/boards/geeekpi_pico_bb_plus/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" |
52 changes: 52 additions & 0 deletions
52
boards/shields/rpi_pico_bb/boards/geeekpi_pico_bb_plus/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,52 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "rpipico_r3-pinctrl.dtsi" | ||
|
||
#include <freq.h> | ||
#include <zephyr/dt-bindings/i2c/i2c.h> | ||
|
||
&pico_spi0 { | ||
pinctrl-0 = <&spi0_lcd>; | ||
pinctrl-names = "default"; | ||
clock-frequency = <DT_FREQ_M(62)>; | ||
}; | ||
|
||
rpipico_spi_lcd: &pico_spi0 {}; | ||
|
||
&pico_i2c0 { | ||
pinctrl-0 = <&i2c0_tsc>; | ||
pinctrl-names = "default"; | ||
clock-frequency = <I2C_BITRATE_STANDARD>; | ||
}; | ||
|
||
rpipico_i2c_tsc: &pico_i2c0 {}; | ||
|
||
&pico_pwm { | ||
pinctrl-0 = <&pwm_lcd_feedback>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
rpipico_pwm: &pico_pwm {}; | ||
|
||
&pico_adc { | ||
pinctrl-0 = <&adc_joystick>; | ||
pinctrl-names = "default"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
}; | ||
|
||
rpipico_adc: &pico_adc {}; | ||
|
||
&pico_pio0 { | ||
pico_pio0_ws2812: pico-pio0-ws2812 { | ||
compatible = "worldsemi,ws2812-rpi_pico-pio"; | ||
pinctrl-0 = <&pio0_ws2812>; | ||
pinctrl-names = "default"; | ||
}; | ||
}; | ||
|
||
rpipico_pio: &pico_pio0 {}; | ||
pio_led_strip: &pico_pio0_ws2812 {}; |
59 changes: 59 additions & 0 deletions
59
boards/shields/rpi_pico_bb/boards/geeekpi_pico_bb_plus/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,59 @@ | ||
/* | ||
* 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 { | ||
group16_led { | ||
pinmux = <PWM_0A_P16>; /* GP16: PWM0CHA (0) */ | ||
}; | ||
group17_led { | ||
pinmux = <PWM_0B_P17>; /* GP17: PWM0CHB (1) */ | ||
}; | ||
group13_buzzer { | ||
pinmux = <PWM_6B_P13>; /* GP13: PWM6CHB (13) */ | ||
}; | ||
}; | ||
|
||
adc_joystick: &adc_pico { | ||
group0_adc_x { | ||
pinmux = <ADC_CH0_P26>; /* GP26: ADC_CH0 */ | ||
input-enable; | ||
}; | ||
group1_adc_y { | ||
pinmux = <ADC_CH1_P27>; /* GP27: ADC_CH1 */ | ||
input-enable; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
spi0_lcd: spi0_lcd { | ||
group235_spi { | ||
pinmux = <SPI0_CSN_P5>, /* GP5: SPI0_CSn */ | ||
<SPI0_SCK_P2>, /* GP2: SPI0_SCK */ | ||
<SPI0_TX_P3>; /* GP3: SPI0_TX */ | ||
}; | ||
group4_spi { | ||
pinmux = <SPI0_RX_P4>; /* GP4: SPI0_RX */ | ||
input-enable; | ||
}; | ||
}; | ||
|
||
i2c0_tsc: i2c0_tsc { | ||
group89_i2c { | ||
pinmux = <I2C0_SDA_P8>, /* GP8: I2C0_SDA */ | ||
<I2C0_SCL_P9>; /* GP9: I2C0_SCL */ | ||
bias-pull-up; | ||
input-enable; | ||
input-schmitt-enable; | ||
}; | ||
}; | ||
|
||
pio0_ws2812: pio0_ws2812{ | ||
group12_pio { | ||
pinmux = <PIO0_P12>; /* GP12: PIO0 */ | ||
}; | ||
}; | ||
}; |
16 changes: 16 additions & 0 deletions
16
boards/shields/rpi_pico_bb/boards/geeekpi_pico_bb_plus/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,16 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&pico_i2c0 { | ||
compatible = "gpio-i2c"; /* I2C0_SDA_P8 and I2C0_SCL_P9 */ | ||
sda-gpios = <&rpipico_header 8 (GPIO_OPEN_DRAIN | GPIO_PULL_UP)>; | ||
scl-gpios = <&rpipico_header 9 (GPIO_OPEN_DRAIN | GPIO_PULL_UP)>; | ||
/delete-property/ resets; | ||
/delete-property/ clocks; | ||
/delete-property/ interrupts; | ||
/delete-property/ interrupt-names; | ||
/delete-property/ pinctrl-0; | ||
/delete-property/ pinctrl-names; | ||
}; |
157 changes: 157 additions & 0 deletions
157
boards/shields/rpi_pico_bb/boards/geeekpi_pico_bb_plus/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,157 @@ | ||
/* | ||
* Copyright (c) 2024 TiaC Systems | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "rpipico_r3-connect.dtsi" | ||
#include "rpipico_r3-tweaks.dtsi" | ||
|
||
#include "st7796s_480x320.dtsi" | ||
#include "st7796s_rgb565.dtsi" | ||
#include "gt911_320x480.dtsi" | ||
#include "ws2812.dtsi" | ||
|
||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
#include <zephyr/dt-bindings/pwm/pwm.h> | ||
#include <zephyr/dt-bindings/adc/adc.h> | ||
|
||
&rpipico_spi_lcd { | ||
status = "okay"; | ||
cs-gpios = <&rpipico_header 5 GPIO_ACTIVE_LOW>; /* GP5 */ | ||
}; | ||
|
||
&mipi_dbi { | ||
status = "okay"; | ||
reset-gpios = <&rpipico_header 7 GPIO_ACTIVE_LOW>; /* GP7 */ | ||
dc-gpios = <&rpipico_header 6 GPIO_ACTIVE_HIGH>; /* GP6 */ | ||
spi-dev = <&rpipico_spi_lcd>; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
}; | ||
|
||
&lcd_panel { | ||
status = "okay"; | ||
}; | ||
|
||
&lvgl_pointer { | ||
//invert-x; | ||
invert-y; | ||
swap-xy; | ||
}; | ||
|
||
&tsc_panel { | ||
status = "okay"; | ||
irq-gpios = <&rpipico_header 11 GPIO_ACTIVE_HIGH>; /* GP11 */ | ||
reset-gpios = <&rpipico_header 10 GPIO_ACTIVE_LOW>; /* GP10 */ | ||
}; | ||
|
||
&led_strip { | ||
status = "okay"; | ||
gpios = <&rpipico_header 12 GPIO_ACTIVE_HIGH>; /* GP12 */ | ||
}; | ||
|
||
&pio_led_strip { | ||
status = "okay"; | ||
}; | ||
|
||
&rpipico_pio { | ||
status = "okay"; | ||
}; | ||
|
||
&rpipico_pwm { | ||
status = "okay"; | ||
divider-frac-0 = <15>; | ||
divider-int-0 = <255>; | ||
divider-frac-6 = <15>; | ||
divider-int-6 = <255>; | ||
}; | ||
|
||
&pwm_buzzer_0 { /* GP13:PWM6CHB */ | ||
pwms = <&pwm 13 PWM_HZ(880) PWM_POLARITY_NORMAL>; | ||
}; | ||
|
||
&pwm_led_0 { /* GP16:PWM0A */ | ||
pwms = <&rpipico_pwm 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; | ||
}; | ||
|
||
&pwm_led_1 { /* GP17:PWM0B */ | ||
pwms = <&rpipico_pwm 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>; | ||
}; | ||
|
||
&led_0 { /* GP16 */ | ||
gpios = <&rpipico_header 16 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
&led_1 { /* GP17 */ | ||
gpios = <&rpipico_header 17 GPIO_ACTIVE_HIGH>; | ||
}; | ||
|
||
&button_0 { /* GP14 */ | ||
gpios = <&rpipico_header 14 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&button_1 { /* GP15 */ | ||
gpios = <&rpipico_header 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
}; | ||
|
||
&joystick_axis_x_keys { /* X@ADC0 */ | ||
io-channels = <&rpipico_adc 0>; | ||
keyup-threshold-mv = <1850>; | ||
}; | ||
|
||
&joystick_axis_x_key_0 { | ||
press-thresholds-mv = <850>; /* X@LEFT */ | ||
}; | ||
|
||
&joystick_axis_x_key_1 { | ||
press-thresholds-mv = <2180>; /* X@RIGHT */ | ||
}; | ||
|
||
&joystick_axis_y_keys { /* Y@ADC1 */ | ||
io-channels = <&rpipico_adc 1>; | ||
keyup-threshold-mv = <1850>; | ||
}; | ||
|
||
&joystick_axis_y_key_0 { | ||
press-thresholds-mv = <850>; /* Y@DOWN */ | ||
}; | ||
|
||
&joystick_axis_y_key_1 { | ||
press-thresholds-mv = <2180>; /* Y@UP */ | ||
}; | ||
|
||
&joystick_axis_x { /* X@ADC0 */ | ||
io-channels = <&rpipico_adc 0>; | ||
in-deadzone = <500>; | ||
in-min = <500>; | ||
in-max = <4000>; | ||
}; | ||
|
||
&joystick_axis_y { /* Y@ADC1 */ | ||
io-channels = <&rpipico_adc 1>; | ||
in-deadzone = <500>; | ||
in-min = <500>; | ||
in-max = <4000>; | ||
}; | ||
|
||
&rpipico_adc { | ||
status = "okay"; | ||
|
||
/delete-node/ channel@0; | ||
channel@0 { /* ADC0 */ | ||
reg = <0>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
|
||
/delete-node/ channel@1; | ||
channel@1 { /* ADC1 */ | ||
reg = <1>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
}; |
Oops, something went wrong.