Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2953368imm; Tue, 4 Sep 2018 12:44:02 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda5fp1+yO7Z8z31INlw/Ovr9OMxCqzIXoWI84rVvUWlZgflv2I9ElVeEz2CNYVrplBap+zz X-Received: by 2002:a62:47d1:: with SMTP id p78-v6mr36646211pfi.197.1536090242428; Tue, 04 Sep 2018 12:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536090242; cv=none; d=google.com; s=arc-20160816; b=VmrMKHxV+6KMXeZvngGN8lHjBolEO7Xd6oXjOV5h+fbow17qiqUK7CbgZ1LFkSW37L fhhpYsZaFvVYtCigCe8S3hOn1bd7KuLy4pjgY83v9u2JOOLvqOOARi2gf1lDFehPIR1N rQP2RiwCc39BLluqiePlqAfR6RIekh6Es/Oxaq5Nhl5ASiJho8KOpLAIe1wjpwRi1n7r jG5Fc4x7HvQLo/pdvSTBS2z9sadjQyV56uW6tzHsXgTbkgNrTjnOvELx4QX+2XHydV0M +RCeeAF8qxpAefljywbQPK4APxHplGjAyAErLg0oxRs9ctwPr4AKsMSJranySRMMHO0I kctg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=hfMxKwrRx8ggzaGxY9FLLkVh7vSxglqVuDZMjcZ7zRk=; b=WvkS3msvZbpwisjdG+9WIziNVJtf6c2ID0DJLoZeElSyH6s+2pbpb5fxN+9e3K1fow KAnPQSPJZIww6MHMF52oo77+CuKRgSEfxu4yd/z6ZKVnRXbjxxRdT9hoMaY4HQJG7srA dzUq44L2I4snOyYhk5mRHHc/uSz0xqBXnZXpWio+xlyXLL9RWfogVJixRYcO+kUW02aN riPoW13lSOox+YSS9HiA0dVtqZk71Ktk6+TnfW3Nppu3XJYg0cfRFEQiMJo02QOhv4Ji HjLRficY+2Quy9sEmFtlW1YdVrPKt0uNST036fAiyVhM2mSn/jON9XchZxFMLZ1ezqAG ZCHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pk4fSNac; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12-v6si22766019pla.70.2018.09.04.12.43.46; Tue, 04 Sep 2018 12:44:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pk4fSNac; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727830AbeIEAJP (ORCPT + 99 others); Tue, 4 Sep 2018 20:09:15 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:40668 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726528AbeIEAJO (ORCPT ); Tue, 4 Sep 2018 20:09:14 -0400 Received: by mail-ed1-f66.google.com with SMTP id j62-v6so4208795edd.7; Tue, 04 Sep 2018 12:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hfMxKwrRx8ggzaGxY9FLLkVh7vSxglqVuDZMjcZ7zRk=; b=pk4fSNackiCEeZitC8iHqgNCytMm5HdyJk+E49oXr+cEWH6PlWo0z0WqDAH6NUOIu0 vMleilBma1AxweqoqdfcGW8z8qvyTBrcCMM7d5BpjHQkmOdFFQ+mNm2LSnzkLgxN8oa6 Ws1yxF07hhrVjKIOflSlMkfUFOlEaoFhtsUK8eEYvV7qGhcasknoZkRNaUffAHy51LQC OjBJwgSjOVe7h2cCP8EZF6giWS7Hb7lpov8XEP7sulXSBOsh4BD8y+6LfKb0fD7mehcm nHtcZhQ0vni+VNFVjTzZ4ojFp/02sqMmentjxGxRn1RUrlXxnukWPapZN6IkxNO7paml IgPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hfMxKwrRx8ggzaGxY9FLLkVh7vSxglqVuDZMjcZ7zRk=; b=MNtvesIFAyNnm8FQxM9aUOiGQVdpUsboUA+6m2T+2y15lwhH3wRvYklSA74vhEScFB yxzuUswvxQaRMl/2Rsep6+rgjcmbE3PiF8nghKeGgK4JYIGpMy8cLz4OKBEbrWPYqhd1 Msp+vzsDt5eH43BWk9iSz5tjO+Kat5JLAXs6YKY71WYOg7YWSMCT6xxsddH/paez6Ink DAOG8JRlCKK9u9MbC3MjUGaDdfhy/oSRFgGey/KWmCKNEI/1Xse/dTTfPCRqSXQ7WPvH T6b5UKmYBy2KoM61sQx1C99Jy1wzLiD5hrTYW7d3zK2LCEJiMCJP7at+qeLtuzfZDJrV CYgw== X-Gm-Message-State: APzg51BhlDAA45TpYGAotrlzpCIk/ReBK6sIejNmEjtgsf2osgKEIlvc WKDucd8XAy5Bxrtj5Ys0jdg= X-Received: by 2002:a50:9935:: with SMTP id k50-v6mr37420886edb.175.1536090157726; Tue, 04 Sep 2018 12:42:37 -0700 (PDT) Received: from [127.0.0.1] ([138.68.75.163]) by smtp.gmail.com with ESMTPSA id s41-v6sm21818edd.61.2018.09.04.12.42.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Sep 2018 12:42:37 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: [PATCH] ARM64: dts: meson-gxbb-wetek: add ttyAML1 uart for Bluetooth From: Christian Hewitt In-Reply-To: Date: Tue, 4 Sep 2018 23:42:32 +0400 Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, Neil Armstrong , 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 Content-Transfer-Encoding: quoted-printable Message-Id: <84ED3B83-82E2-4ABE-AA03-9F4950EAF4A4@gmail.com> References: <1536072290-28015-1-git-send-email-christianshewitt@gmail.com> To: Martin Blumenstingl X-Mailer: Apple Mail (2.3445.9.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On 4 Sep 2018, at 11:05 pm, Martin Blumenstingl = wrote: >=20 > Hi Christian, >=20 > On Tue, Sep 4, 2018 at 4:47 PM chewitt = wrote: >>=20 >> 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? It=E2=80=99s an AMPAK 6335 module. WiFi shows as BCM4339, BT shows as = BCM4335(rev C0). I=E2=80=99ve submitted a patch to add the BT id = earlier, see: (https://marc.info/?l=3Dlinux-bluetooth&m=3D153608351032693&w=3D2) > 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 >=20 >> Signed-off-by: chewitt >> --- >> arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 8 ++++++++ >> 1 file changed, 8 insertions(+) >>=20 >> 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 =3D &uart_AO; >> + serial1 =3D &uart_A; > this can be dropped if you read on >=20 >> ethernet0 =3D ðmac; >> }; >>=20 >> @@ -239,6 +240,13 @@ >> vqmmc-supply =3D <&vddio_boot>; >> }; >>=20 >> +/* This is connected to the Bluetooth module: */ >> +&uart_A { >> + status =3D "okay"; >> + pinctrl-0 =3D <&uart_a_pins>, <&uart_a_cts_rts_pins>; >> + pinctrl-names =3D "default"; > insert bluetooth child-node from [0] here (with the correct max-speed, > *-gpios and clock* properties for this board) >=20 > 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 No problem, i=E2=80=99ve done that for another device. I=E2=80=99ll = investigate. >=20 > Regards > Martin >=20 >=20 > [0] = https://elixir.bootlin.com/linux/v4.18/source/Documentation/devicetree/bin= dings/net/broadcom-bluetooth.txt