All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: christianshewitt@gmail.com
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	Neil Armstrong <narmstrong@baylibre.com>,
	khilman@baylibre.com, linux-kernel@vger.kernel.org,
	robh+dt@kernel.org, carlo@caione.org,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] ARM64: dts: meson-gxbb-wetek: add ttyAML1 uart for Bluetooth
Date: Tue, 4 Sep 2018 21:05:42 +0200	[thread overview]
Message-ID: <CAFBinCAQFcYKRCr72vOtuB9x=Zdt4Ox=pY0E9oxZFCO2XKF7oQ@mail.gmail.com> (raw)
In-Reply-To: <1536072290-28015-1-git-send-email-christianshewitt@gmail.com>

Hi Christian,

On Tue, Sep 4, 2018 at 4:47 PM chewitt <christianshewitt@gmail.com> wrote:
>
> This change adds the ttyAML1 uart used by the brmcfmac sdio module in
> the WeTek Hub and WeTek Play 2 devices.
do you know which Broadcom chip this is exactly?

I assume you want to use the "patchram" userspace program (or
something similar) to initialize the HCI controller?
it's been a while since a similar patch was rejected, but things have
gotten better since then. more details below

> Signed-off-by: chewitt <christianshewitt@gmail.com>
> ---
>  arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
> index 70325b2..9476868 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
> @@ -10,6 +10,7 @@
>  / {
>         aliases {
>                 serial0 = &uart_AO;
> +               serial1 = &uart_A;
this can be dropped if you read on

>                 ethernet0 = &ethmac;
>         };
>
> @@ -239,6 +240,13 @@
>         vqmmc-supply = <&vddio_boot>;
>  };
>
> +/* This is connected to the Bluetooth module: */
> +&uart_A {
> +       status = "okay";
> +       pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
> +       pinctrl-names = "default";
insert bluetooth child-node from [0] here (with the correct max-speed,
*-gpios and clock* properties for this board)

some background: with Rob's serdev framework some Bluetooth controller
drivers recently gained the ability to get the controller into a
working state without any userspace utility. if you add the bluetooth
child-node here the kernel will:
- not create a /dev/ttyAMLn
- load the matching Bluetooth controller driver (the Broadcom one in your case)
- do the "initialize this Bluetooth controller with all the vendor
specific magic" dance (toggling GPIOs, loading firmware from userspace
via standard request_firmware, etc.)
- provide you with a ready-to-use hci0 interface


Regards
Martin


[0] https://elixir.bootlin.com/linux/v4.18/source/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt

WARNING: multiple messages have this Message-ID (diff)
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM64: dts: meson-gxbb-wetek: add ttyAML1 uart for Bluetooth
Date: Tue, 4 Sep 2018 21:05:42 +0200	[thread overview]
Message-ID: <CAFBinCAQFcYKRCr72vOtuB9x=Zdt4Ox=pY0E9oxZFCO2XKF7oQ@mail.gmail.com> (raw)
In-Reply-To: <1536072290-28015-1-git-send-email-christianshewitt@gmail.com>

Hi Christian,

On Tue, Sep 4, 2018 at 4:47 PM chewitt <christianshewitt@gmail.com> wrote:
>
> This change adds the ttyAML1 uart used by the brmcfmac sdio module in
> the WeTek Hub and WeTek Play 2 devices.
do you know which Broadcom chip this is exactly?

I assume you want to use the "patchram" userspace program (or
something similar) to initialize the HCI controller?
it's been a while since a similar patch was rejected, but things have
gotten better since then. more details below

> Signed-off-by: chewitt <christianshewitt@gmail.com>
> ---
>  arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
> index 70325b2..9476868 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
> @@ -10,6 +10,7 @@
>  / {
>         aliases {
>                 serial0 = &uart_AO;
> +               serial1 = &uart_A;
this can be dropped if you read on

>                 ethernet0 = &ethmac;
>         };
>
> @@ -239,6 +240,13 @@
>         vqmmc-supply = <&vddio_boot>;
>  };
>
> +/* This is connected to the Bluetooth module: */
> +&uart_A {
> +       status = "okay";
> +       pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
> +       pinctrl-names = "default";
insert bluetooth child-node from [0] here (with the correct max-speed,
*-gpios and clock* properties for this board)

some background: with Rob's serdev framework some Bluetooth controller
drivers recently gained the ability to get the controller into a
working state without any userspace utility. if you add the bluetooth
child-node here the kernel will:
- not create a /dev/ttyAMLn
- load the matching Bluetooth controller driver (the Broadcom one in your case)
- do the "initialize this Bluetooth controller with all the vendor
specific magic" dance (toggling GPIOs, loading firmware from userspace
via standard request_firmware, etc.)
- provide you with a ready-to-use hci0 interface


Regards
Martin


[0] https://elixir.bootlin.com/linux/v4.18/source/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt

WARNING: multiple messages have this Message-ID (diff)
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH] ARM64: dts: meson-gxbb-wetek: add ttyAML1 uart for Bluetooth
Date: Tue, 4 Sep 2018 21:05:42 +0200	[thread overview]
Message-ID: <CAFBinCAQFcYKRCr72vOtuB9x=Zdt4Ox=pY0E9oxZFCO2XKF7oQ@mail.gmail.com> (raw)
In-Reply-To: <1536072290-28015-1-git-send-email-christianshewitt@gmail.com>

Hi Christian,

On Tue, Sep 4, 2018 at 4:47 PM chewitt <christianshewitt@gmail.com> wrote:
>
> This change adds the ttyAML1 uart used by the brmcfmac sdio module in
> the WeTek Hub and WeTek Play 2 devices.
do you know which Broadcom chip this is exactly?

I assume you want to use the "patchram" userspace program (or
something similar) to initialize the HCI controller?
it's been a while since a similar patch was rejected, but things have
gotten better since then. more details below

> Signed-off-by: chewitt <christianshewitt@gmail.com>
> ---
>  arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
> index 70325b2..9476868 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
> @@ -10,6 +10,7 @@
>  / {
>         aliases {
>                 serial0 = &uart_AO;
> +               serial1 = &uart_A;
this can be dropped if you read on

>                 ethernet0 = &ethmac;
>         };
>
> @@ -239,6 +240,13 @@
>         vqmmc-supply = <&vddio_boot>;
>  };
>
> +/* This is connected to the Bluetooth module: */
> +&uart_A {
> +       status = "okay";
> +       pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
> +       pinctrl-names = "default";
insert bluetooth child-node from [0] here (with the correct max-speed,
*-gpios and clock* properties for this board)

some background: with Rob's serdev framework some Bluetooth controller
drivers recently gained the ability to get the controller into a
working state without any userspace utility. if you add the bluetooth
child-node here the kernel will:
- not create a /dev/ttyAMLn
- load the matching Bluetooth controller driver (the Broadcom one in your case)
- do the "initialize this Bluetooth controller with all the vendor
specific magic" dance (toggling GPIOs, loading firmware from userspace
via standard request_firmware, etc.)
- provide you with a ready-to-use hci0 interface


Regards
Martin


[0] https://elixir.bootlin.com/linux/v4.18/source/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt

  reply	other threads:[~2018-09-04 19:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-04 14:44 [PATCH] ARM64: dts: meson-gxbb-wetek: add ttyAML1 uart for Bluetooth chewitt
2018-09-04 14:44 ` chewitt
2018-09-04 14:44 ` chewitt
2018-09-04 14:44 ` chewitt
2018-09-04 19:05 ` Martin Blumenstingl [this message]
2018-09-04 19:05   ` Martin Blumenstingl
2018-09-04 19:05   ` Martin Blumenstingl
2018-09-04 19:42   ` Christian Hewitt
2018-09-04 19:42     ` Christian Hewitt
2018-09-04 19:42     ` Christian Hewitt
2018-09-07 12:15 ` [PATCH v2] " Christian Hewitt
2018-09-07 12:15   ` Christian Hewitt
2018-09-07 12:15   ` Christian Hewitt
2018-09-07 12:15   ` Christian Hewitt
2018-09-10 16:17   ` Rob Herring
2018-09-10 16:17     ` Rob Herring
2018-09-10 16:17     ` Rob Herring
2018-09-10 16:17     ` Rob Herring
2018-09-10 18:30   ` Martin Blumenstingl
2018-09-10 18:30     ` Martin Blumenstingl
2018-09-10 18:30     ` Martin Blumenstingl
2018-09-11 13:27     ` Rob Herring
2018-09-11 13:27       ` Rob Herring
2018-09-11 13:27       ` Rob Herring
2018-09-11 13:27       ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFBinCAQFcYKRCr72vOtuB9x=Zdt4Ox=pY0E9oxZFCO2XKF7oQ@mail.gmail.com' \
    --to=martin.blumenstingl@googlemail.com \
    --cc=carlo@caione.org \
    --cc=christianshewitt@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=narmstrong@baylibre.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.