diff --git a/recipes-connectivity/tibluetooth/tibluetooth.bb b/recipes-connectivity/tibluetooth/tibluetooth.bb index 3dcc380..f537043 100644 --- a/recipes-connectivity/tibluetooth/tibluetooth.bb +++ b/recipes-connectivity/tibluetooth/tibluetooth.bb @@ -12,6 +12,7 @@ inherit systemd SRC_URI = " \ file://tibluetooth-nbhw16.service \ file://tibluetooth-nrhw20.service \ + file://tibluetooth-vcu.service \ file://TIInit_11.8.32.bts \ " @@ -50,3 +51,15 @@ do_install_am335x-nrhw20 () { install_nrhw20 } + +install_vcu () { + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 tibluetooth-vcu.service ${D}${systemd_unitdir}/system/tibluetooth.service + + install -d ${D}/lib/firmware/ti-connectivity + install -m 0644 TIInit_11.8.32.bts ${D}/lib/firmware/ti-connectivity/ +} + +do_install_am335x-vcu () { + install_vcu +} diff --git a/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-vcu.service b/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-vcu.service new file mode 100644 index 0000000..4489bc3 --- /dev/null +++ b/recipes-connectivity/tibluetooth/tibluetooth/tibluetooth-vcu.service @@ -0,0 +1,16 @@ +[Unit] +Description=Attach ti bluetooth +Before=bluetooth.target +Requires=bluetooth.target + +[Service] +Type=forking +ExecStartPre=-/bin/sh -c "/bin/echo 52 > /sys/class/gpio/export" +ExecStartPre=-/bin/sh -c "/bin/echo out > /sys/class/gpio/gpio52/direction" +ExecStartPre=/bin/sh -c "/bin/echo 1 > /sys/class/gpio/gpio52/value" +ExecStart=/usr/bin/hciattach /dev/ttyS5 texas 3000000 flow + +ExecStopPost=/bin/sh -c "/bin/echo 0 > /sys/class/gpio/gpio52/value" + +[Install] +WantedBy=multi-user.target