From 1b57900edffd418cbdc6074ad2ac6a52499b80c6 Mon Sep 17 00:00:00 2001 From: Jun Zhang Date: Wed, 12 Feb 2025 15:30:12 +0800 Subject: [PATCH] bluez: hciattach add aml support Change-Id: I4df1045d8ea6431eaef3c1b0e01df3fdc7689773 --- tools/btattach.c | 1 + tools/hciattach.c | 9 +++++++++ tools/hciattach.h | 1 + 3 files changed, 11 insertions(+) diff --git a/tools/btattach.c b/tools/btattach.c index 4ce1be7..e25918f 100644 --- a/tools/btattach.c +++ b/tools/btattach.c @@ -212,6 +212,7 @@ static const struct { { "ag6xx", HCI_UART_AG6XX }, { "nokia", HCI_UART_NOKIA }, { "mrvl", HCI_UART_MRVL }, + { "aml", HCI_UART_AML }, { } }; diff --git a/tools/hciattach.c b/tools/hciattach.c index 276a4e5..f2c58ec 100644 --- a/tools/hciattach.c +++ b/tools/hciattach.c @@ -978,6 +978,8 @@ static int bcm2035(int fd, struct uart_t *u, struct termios *ti) return 0; } +#include "hciattach_aml.c" + struct uart_t uart[] = { { "any", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, FLOW_CTL, DISABLE_PM, NULL, NULL }, @@ -1097,6 +1099,10 @@ struct uart_t uart[] = { { "amp", 0x0000, 0x0000, HCI_UART_H4, 115200, 115200, AMP_DEV, DISABLE_PM, NULL, NULL, NULL }, + /* AML ROME */ + { "aml", 0x0000, 0x0000, HCI_UART_H4, 115200, 4000000, + FLOW_CTL, DISABLE_PM, NULL, aml, NULL }, + { NULL, 0 } }; @@ -1421,5 +1427,8 @@ int main(int argc, char *argv[]) exit(1); } + if (!strcmp(u->type, "aml")) + aml_woble_configure(n); + return 0; } diff --git a/tools/hciattach.h b/tools/hciattach.h index 26c0d54..34c0bbd 100644 --- a/tools/hciattach.h +++ b/tools/hciattach.h @@ -32,6 +32,7 @@ #define HCI_UART_AG6XX 9 #define HCI_UART_NOKIA 10 #define HCI_UART_MRVL 11 +#define HCI_UART_AML 12 #define HCI_UART_RAW_DEVICE 0 #define HCI_UART_RESET_ON_INIT 1 -- 2.25.1