bluez: generalize BT GPIO configuration for bluetooth-init script

This commit generalizes the BT GPIO value used in the bluetooth-init
script for different platforms.

Signed-off-by: Mike Engel <Mike.Engel@digi.com>

https://onedigi.atlassian.net/browse/DEL-9668
This commit is contained in:
Mike Engel 2026-04-29 16:14:49 +02:00
parent 9576c20113
commit a8c6dcb56e
14 changed files with 30 additions and 6 deletions

View File

@ -44,6 +44,9 @@ BT_DEVICE_NAME ?= "cc6qp"
# Bluetooth tty
BT_TTY ?= "ttymxc1"
# Bluetooth GPIO
BT_GPIO ?= "da9063-gpio 4"
# XBee
XBEE_TTY ?= "ttymxc4"

View File

@ -46,6 +46,9 @@ SERIAL_CONSOLES ?= "115200;ttymxc3"
# Bluetooth tty
BT_TTY ?= "ttymxc1"
# Bluetooth GPIO
BT_GPIO ?= "da9063-gpio 4"
# XBee
XBEE_TTY ?= "ttymxc4"

View File

@ -31,6 +31,9 @@ SERIAL_CONSOLES ?= "115200;ttymxc4"
# Bluetooth tty
BT_TTY ?= "ttymxc0"
# Bluetooth GPIO
BT_GPIO ?= "gpio5 9"
# XBee
XBEE_TTY ?= "ttymxc1"

View File

@ -30,6 +30,9 @@ SERIAL_CONSOLES ?= "115200;ttymxc4"
# Bluetooth tty
BT_TTY ?= "ttymxc0"
# Bluetooth GPIO
BT_GPIO ?= "gpio5 9"
# Default image for install scripts
DEFAULT_IMAGE_NAME ?= "core-image-base"

View File

@ -14,6 +14,9 @@ SERIAL_CONSOLES = "115200;ttyLP5"
# Bluetooth tty
BT_TTY ?= "ttyLP0"
# Bluetooth GPIO
BT_GPIO ?= "1 7"
# Firmware
MACHINE_FIRMWARE:append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'firmware-nxp-wifi-nxpiw612-sdio firmware-murata-nxp', '', d)}"

View File

@ -14,6 +14,9 @@ SERIAL_CONSOLES = "115200;ttyLP5"
# Bluetooth tty
BT_TTY ?= "ttyLP0"
# Bluetooth GPIO
BT_GPIO ?= "1 7"
# Firmware
MACHINE_FIRMWARE:append = " ${@oe.utils.conditional('HAVE_WIFI', '1', 'firmware-nxp-wifi-nxpiw612-sdio firmware-murata-nxp', '', d)}"
MACHINE_FIRMWARE:append = " ethos-u-firmware"

View File

@ -177,3 +177,6 @@ OVERLAYFS_ETC_FSTYPE ?= "ext4"
# Bluetooth
BT_TTY ?= "ttySTM1"
# Bluetooth GPIO
BT_GPIO ?= "gpiochip11 5"

View File

@ -26,6 +26,9 @@ inherit update-rc.d systemd
do_install() {
# INITSCRIPT
install -d ${D}${sysconfdir}/init.d/
# Set BT GPIO
sed -i -e "s,##BT_GPIO##,${BT_GPIO},g" \
${WORKDIR}/${BT_INIT_FILE}
install -m 0755 ${WORKDIR}/${BT_INIT_FILE} ${D}${sysconfdir}/bluetooth-init
ln -sf /etc/bluetooth-init ${D}${sysconfdir}/init.d/bluetooth-init
# Set BT UART device

View File

@ -27,7 +27,7 @@ is_not_wifi() {
}
power() {
is_not_wifi && gpioset 1 7="${1}"
is_not_wifi && gpioset ##BT_GPIO##="${1}"
}
set_btaddr() {

View File

@ -14,7 +14,7 @@
#===============================================================================
# Bluetooth power GPIO
BT_EN_QCA_GPIO_NR="da9063-gpio 4"
BT_EN_QCA_GPIO_NR=##BT_GPIO##
# set_gpio_value <gpio_nr> <value>
set_gpio_value() {

View File

@ -14,7 +14,7 @@
#===============================================================================
# Bluetooth power GPIO
BT_PWR_GPIO_NR="da9063-gpio 4"
BT_PWR_GPIO_NR=##BT_GPIO##
# set_gpio_value <gpio_nr> <value>
set_gpio_value() {

View File

@ -14,7 +14,7 @@
#===============================================================================
# Bluetooth power GPIO
BT_EN_QCA_GPIO_NR="gpio5 9"
BT_EN_QCA_GPIO_NR=##BT_GPIO##
# set_gpio_value <gpio_nr> <value>
set_gpio_value() {

View File

@ -26,7 +26,7 @@ log() {
bt_power() {
#CCMP2 BT_REG_EN GPIO PZ5
gpioset gpiochip11 5="${1}"
gpioset ##BT_GPIO##="${1}"
}
set_btaddr() {

View File

@ -14,7 +14,7 @@
#===============================================================================
# Bluetooth power GPIO
BT_EN_QCA_GPIO_NR="gpio5 9"
BT_EN_QCA_GPIO_NR=##BT_GPIO##
# set_gpio_value <gpio_nr> <value>
set_gpio_value() {