All of lore.kernel.org
 help / color / mirror / Atom feed
From: andre.przywara@arm.com (Andre Przywara)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-sunxi] Re: [PATCH v2 06/18] arm64: dts: allwinner: a64: Orange Pi Win: Add UARTs
Date: Thu, 26 Jul 2018 14:04:48 +0100	[thread overview]
Message-ID: <8d309202-05f1-d024-ae98-6a6baf03e888@arm.com> (raw)
In-Reply-To: <20180726093247.3hesukln2n3fhqeg@flea>

Hi,

On 26/07/18 10:32, Maxime Ripard wrote:
> On Thu, Jul 26, 2018 at 09:30:14AM +0100, Andre Przywara wrote:
>> Hi,
>>
>> On 26/07/18 08:42, Icenowy Zheng wrote:
>>>
>>>
>>> ? 2018?7?26? GMT+08:00 ??3:39:11, Maxime Ripard <maxime.ripard@bootlin.com> ??:
>>>> On Thu, Jul 26, 2018 at 01:35:20AM +0100, Andre Przywara wrote:
>>>>> From: Samuel Holland <samuel@sholland.org>
>>>>>
>>>>> The Orange Pi Win exposes several UARTs on header pin, and connects
>>>> one
>>>>> to the on-board WiFi/Bluetooth chip.
>>>>> Add the pinmux definitions to the UART nodes, but keep them disabled.
>>>>>
>>>>> Signed-off-by: Samuel Holland <samuel@sholland.org>
>>>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>>>> ---
>>>>>  .../boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 33
>>>> ++++++++++++++++++++++
>>>>>  1 file changed, 33 insertions(+)
>>>>>
>>>>> diff --git
>>>> a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>> b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>>> index 0cadcd59edd9..10f63d0b99cb 100644
>>>>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts
>>>>> @@ -54,6 +54,10 @@
>>>>>  	aliases {
>>>>>  		ethernet0 = &emac;
>>>>>  		serial0 = &uart0;
>>>>> +		serial1 = &uart1;
>>>>> +		serial2 = &uart2;
>>>>> +		serial3 = &uart3;
>>>>> +		serial4 = &uart4;
>>>>>  	};
>>>>>  
>>>>>  	chosen {
>>>>> @@ -237,12 +241,41 @@
>>>>>  	vcc-hdmi-supply = <&reg_dldo1>;
>>>>>  };
>>>>>  
>>>>> +/* On debug connector */
>>>>>  &uart0 {
>>>>>  	pinctrl-names = "default";
>>>>>  	pinctrl-0 = <&uart0_pins_a>;
>>>>>  	status = "okay";
>>>>>  };
>>>>>  
>>>>> +/* Wi-Fi/BT */
>>>>> +&uart1 {
>>>>> +	pinctrl-names = "default";
>>>>> +	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
>>>>> +	status = "okay";
>>>>> +};
>>>>
>>>> What BT chip is there? Does it have serdev support? If so, that should
>>>> be enabled here.
>>>
>>> RTL8723BS, no serdev.
> 
> https://www.spinics.net/lists/linux-bluetooth/msg76376.html
> 
> Not very far off though.
> 
>> Yes. A while ago I managed to enable Bluetooth (on the Pine64 with the
>> same chip), but that involved a lot of hacking with a special userland
>> tool (not hciattach and no serdev).
>>
>> What this node means to say is: The UART1 is hardwired to some on-board
>> device and those pins are not available for GPIO, for instance.
>>
>> At least that was my understanding when it comes to enabling devices in
>> the DT. Is that correct?
> 
> Well, yes and no. Arguably, any device connected to the other side of
> the serial bus should have been there from the beginning. However,
> there wasn't any way to do that in Linux before serdev was introduced,
> so we weren't doing that. That resulted in hacky userspace tools to
> work around that, and other work arounds in the DT to for example
> tying BT resources (clock, regulators, resets) to the WiFi chip hoping
> that someone would use both all the time.
> 
> Now that it's just around the corner, we don't have any excuse to do
> these kind of hacks anymore.

That's true. Also I see that the serdev binding itself is not serdev
specific, it just puts the Bluetooth node as a child of an UART node.
But we would still need a compatible string for that child, wouldn't we?
I guess we can't autodetect this? From what I can see from Hans' series
there is no DT compatible string defined?

So do we just put a node there, specifying the resources it needs? Like
the wake-up interrupt or regulators, if any? And leave out the
compatible string, at least for now?

Cheers,
Andre.

  reply	other threads:[~2018-07-26 13:04 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26  0:35 [PATCH v2 00/18] arm64: dts: allwinner: A64 boards DT updates Andre Przywara
2018-07-26  0:35 ` [PATCH v2 01/18] arm64: dts: allwinner: a64: Add L2 cache nodes Andre Przywara
2018-07-26  0:35 ` [PATCH v2 02/18] arm64: dts: allwinner: a64: Add Pine64-LTS device tree file Andre Przywara
2018-07-26  0:35 ` [PATCH v2 03/18] arm64: dts: allwinner: a64: Orange Pi Win: Fix SD card node Andre Przywara
2018-07-26  7:34   ` Maxime Ripard
2018-07-26  0:35 ` [PATCH v2 04/18] arm64: dts: allwinner: a64: Orange Pi Win: Fix USB Andre Przywara
2018-07-26  7:37   ` Maxime Ripard
2018-07-26  0:35 ` [PATCH v2 05/18] arm64: dts: allwinner: a64: Orange Pi Win: Add Ethernet node Andre Przywara
2018-07-26  0:35 ` [PATCH v2 06/18] arm64: dts: allwinner: a64: Orange Pi Win: Add UARTs Andre Przywara
2018-07-26  7:39   ` Maxime Ripard
2018-07-26  7:42     ` [linux-sunxi] " Icenowy Zheng
2018-07-26  8:30       ` Andre Przywara
2018-07-26  9:32         ` Maxime Ripard
2018-07-26 13:04           ` Andre Przywara [this message]
2018-07-27 10:33             ` Andre Przywara
2018-07-27 13:24               ` Maxime Ripard
2018-07-26  0:35 ` [PATCH v2 07/18] arm64: dts: allwinner: a64: Orange Pi Win: Add LED node Andre Przywara
2018-07-26  0:35 ` [PATCH v2 08/18] arm64: dts: allwinner: a64: Orange Pi Win: Add SDIO node Andre Przywara
2018-07-26  0:35 ` [PATCH v2 09/18] arm64: dts: allwinner: a64: Orange Pi Win: Add SPI flash node Andre Przywara
2018-07-26  0:35 ` [PATCH v2 10/18] arm64: dts: allwinner: a64: Orange Pi Win: Mark CPU supply regulator Andre Przywara
2018-07-26  7:41   ` Maxime Ripard
2018-07-26  0:35 ` [PATCH v2 11/18] arm64: dts: allwinner: a64: Orange Pi Win: Add missing power rails Andre Przywara
2018-07-26  7:43   ` Maxime Ripard
2018-07-26  0:35 ` [PATCH v2 12/18] arm64: dts: allwinner: a64: Olinuxino: fix DRAM voltage Andre Przywara
2018-07-26  0:35 ` [PATCH v2 13/18] arm64: dts: allwinner: a64: Olinuxino: add Ethernet nodes Andre Przywara
2018-07-26  0:35 ` [PATCH v2 14/18] arm64: dts: allwinner: a64: Olinuxino: enable USB Andre Przywara
2018-07-26  0:35 ` [PATCH v2 15/18] arm64: dts: allwinner: a64: NanoPi-A64: Fix DCDC1 voltage Andre Przywara
2018-07-26  0:35 ` [PATCH v2 16/18] arm64: dts: allwinner: a64: NanoPi-A64: Add Ethernet Andre Przywara
2018-07-26 13:39   ` Sergey Suloev
2018-07-26 13:41     ` Icenowy Zheng
2018-07-26 14:06       ` Andre Przywara
2018-07-26 14:59         ` Icenowy Zheng
2018-07-26 15:25         ` Sergey Suloev
2018-07-26 15:31           ` Andre Przywara
2018-07-26 17:25             ` Sergey Suloev
2018-07-26 17:48               ` Andre Przywara
2018-07-26 13:45     ` Chen-Yu Tsai
2018-07-26  0:35 ` [PATCH v2 17/18] arm64: dts: allwinner: a64: NanoPi-A64: Add Wifi/Bluetooth chip Andre Przywara
2018-07-26  7:44   ` Maxime Ripard
2018-07-26  7:48   ` Chen-Yu Tsai
2018-07-26  9:05     ` Andre Przywara
2018-07-26  0:35 ` [PATCH v2 18/18] arm64: dts: allwinner: a64: NanoPi-A64: Add blue status LED Andre Przywara

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=8d309202-05f1-d024-ae98-6a6baf03e888@arm.com \
    --to=andre.przywara@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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.