Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2465385imb; Mon, 4 Mar 2019 06:00:32 -0800 (PST) X-Google-Smtp-Source: APXvYqwgj72y345CIS0yP45KXMhSMlX5IJbahXdf03n2FM+1RD1JCwUn2YmIajGfOp9vOMvnZOYc X-Received: by 2002:a63:1766:: with SMTP id 38mr18745641pgx.204.1551708031984; Mon, 04 Mar 2019 06:00:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551708031; cv=none; d=google.com; s=arc-20160816; b=R8jLc7dQg54pPvPgCeswvJtTurzSvyEbLc/djczEnxxywZo0CP4g9J/ZpuTrLexNAa iTtGd7KtSpcb8q8C+oh0wWusctDniAZA6P7MbL4QecpQ/OPQJOKXARMh3KgmrYD4A2ox 4BY+r3NMX6hETXaILpntxZJfHH1sycG1iZF6NlOxAgCH/NkQ/d9Hr0Jjf0u/dMeuOWBp 01hIEZ3F4eBfYucs0p9duLLe9dSl2OmQtNL7NpExxOsk8D546iUBaAEqAtbkJSxbf8nq 4lfiXvyL3mGhOryTOgtmUYtwBTLK1TUibaw5bwDg1KuF0aqa8Y6GRlcWT78X4evXsEzb 8jbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=VC2glsvRGU0lwQ+jf7YniP2aEFLqE4BHwcn5QhufDdk=; b=JijTMiCSu6gG6ve7KslASNjq2Mlqcwn7oy2m9csVSy6OrtPIXqdypisNCiZhDjMM22 lwJPhFeMzB49dcZQrXx9xC+eIuCBWDlz5uYHDpewJJDRqhMMwultXuvKsbqRvV4OoPKP vn+57JbEzO0NfyoXRAf2n2Fc7++DRLCdhchMEjjmMr1Su+9Q2nPtIyJDNVUa43WUMEqw /9k5VJodt6K8J6F9DF1GiN0220b6fOSdNei83m4bzEoZ2pFp1zDY9hPPG1HuSLhIKu9f ovbF69CCxdn80sNiN6jPYRSUPswnv0CSO3NNNARe0CkldQUfCkllAUi7/F81KFiHi962 7uWQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t24si1536666plr.251.2019.03.04.06.00.16; Mon, 04 Mar 2019 06:00:31 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726361AbfCDN7v (ORCPT + 99 others); Mon, 4 Mar 2019 08:59:51 -0500 Received: from www1102.sakura.ne.jp ([219.94.129.142]:65504 "EHLO www1102.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbfCDN7u (ORCPT ); Mon, 4 Mar 2019 08:59:50 -0500 Received: from fsav401.sakura.ne.jp (fsav401.sakura.ne.jp [133.242.250.100]) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x24DxlfM038686; Mon, 4 Mar 2019 22:59:47 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Received: from www1102.sakura.ne.jp (219.94.129.142) by fsav401.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav401.sakura.ne.jp); Mon, 04 Mar 2019 22:59:47 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav401.sakura.ne.jp) Received: from [192.168.1.2] (119.104.232.153.ap.dti.ne.jp [153.232.104.119]) (authenticated bits=0) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id x24Dxl7l038681 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NO); Mon, 4 Mar 2019 22:59:47 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Subject: Re: [PATCH] arm64: dts: rockchip: decrease rising edge time of UART2 To: Tony McKahan , Robin Murphy Cc: Heiko Stuebner , Viresh Kumar , Linus Walleij , linux-kernel@vger.kernel.org, Klaus Goger , Manivannan Sadhasivam , Brian Norris , linux-rockchip@lists.infradead.org, Shawn Lin , Akash Gajjar , Vicente Bergas , Levin Du , Ezequiel Garcia , linux-arm-kernel@lists.infradead.org, Shohei Maruyama , Matthias Brugger , Tomeu Vizoso , Dmitry Torokhov , Douglas Anderson , Jakob Unterwurzacher , Oskari Lemmela , Enric Balletbo i Serra , Christoph Muellner References: <20190303122705.27094-1-katsuhiro@katsuster.net> <1623469.Hy6pdcMFRX@phil> <26c3aea3-959f-bfb3-177f-3e5314494361@katsuster.net> <7ac5038b-ce5d-89d1-4eee-6864837272c6@arm.com> From: Katsuhiro Suzuki Message-ID: Date: Mon, 4 Mar 2019 22:59:46 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Tony, Robin, On 2019/03/04 5:41, Tony McKahan wrote: > On Sun, Mar 3, 2019 at 2:51 PM Robin Murphy wrote: >> >> On 2019-03-03 6:45 pm, Tony McKahan wrote: >>> Hello Katsushiro, >>> >>> On Sun, Mar 3, 2019 at 12:31 PM Katsuhiro Suzuki >>> wrote: >>>> >>>> Hello Tony, >>>> >>>> On 2019/03/04 0:13, Tony McKahan wrote: >>>>> On Sun, Mar 3, 2019 at 9:04 AM Katsuhiro Suzuki wrote: >>>>>> >>>>>> Hello Heiko, >>>>>> >>>>>> Thank you for comments. >>>>>> >>>>>> On 2019/03/03 22:19, Heiko Stuebner wrote: >>>>>>> Hi, >>>>>>> >>>>>>> Am Sonntag, 3. März 2019, 13:27:05 CET schrieb Katsuhiro Suzuki: >>>>>>>> This patch increases drive strength of UART2 from 3mA to 12mA for >>>>>>>> getting more faster rising edge. >>>>>>>> >>>>>>>> RockPro64 is using a very high speed rate (1.5Mbps) for UART2. In >>>>>>>> this setting, a bit width of UART is about 667ns. >>>>>>>> >>>>>>>> In my environment (RockPro64 UART2 with FTDI FT232RL UART-USB >>>>>>>> converter), falling time of RockPro64 UART2 is 40ns, but riging time >>>>>>>> is over 650ns. So UART receiver will get wrong data, because receiver >>>>>>>> read intermediate data of rising edge. >>>>>>>> >>>>>>>> Rising time becomes 300ns from 650ns if apply this patch. This is not >>>>>>>> perfect solution but better than now. >>>>>>>> >>>>>>>> Signed-off-by: Katsuhiro Suzuki >>>>>>>> --- >>>>>>>> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 9 +++++++-- >>>>>>>> 1 file changed, 7 insertions(+), 2 deletions(-) >>>>>>> >>>>>>> your changing a core rk3399 property here, so I'd really like to get >>>>>>> input from other board stakeholders on this before applying a core >>>>>>> change. >>>>>>> >>>>>>> Could you either include the submitters of other rk3399-boards in the >>>>>>> recipient list so that they're aware or limit the change to rockpro64 for >>>>>>> the time being (aka overriding the property in the board-dts) please? >>>>>>> >>>>>> >>>>>> OK, I'm adding other boards members. >>>>>> by ./scripts/get_maintainer.pl arch/arm64/boot/dts/rockchip/rk3399-*.dts >>>>>> >>>>>> >>>>>> RockPro64 directly connect UART2 pins of RK3399 to external connector. >>>>>> I think maybe other RK3399 boards are facing same problem, but I cannot >>>>>> check it because I have RockPro64 only... >>>>>> >>>>>> I'm happy if someone tell me other boards situation. >>>>> >>>>> I'm pulling out other rockchip boards momentarily to see what kind of >>>>> population we have. >>>>> >>>>> Note these are not all running 5.x kernels, however none of them have >>>>> the UART2 drive levels modified to my knowledge, and regardless, none >>>>> show over 100 ns. >>>>> >>>>> board: rise/fall >>>>> >>>>> rk3399-roc-pc: 90ns/90ns >>>>> rk3399-rockpro64 V2.0: 90ns/45ns >>>>> rk3399-rockpro64 V2.1: 40ns/41ns >> >> I'm having to eyeball off a 20MHz analog scope (thank goodness for "yes" >> being able to generate a nice periodic signal), but for my NanoPC-T4 >> with a cheap eBay FT232R adapter both rise and fall times are certainly >> <100ns. FWIW I've not noticed any issues with letting the Bluetooth >> interface on UART0 run flat-out at 4Mbaud either. >> Robin, Thanks a lot. Your results show that cold solder (or some electric parts on board) of my RockPro64 is broken or something wrong. >>>>> >>>>> Please make sure there's not a large amount of flux or something >>>>> around the terminals on your board, that seems excessively high. >>>>> >>>> >>>> Thank you for valuable information. For more deeply discussion, >>>> I tried other conditions and watch the rise/fall times. >>>> >>>> 1) Not connect >>>> The rise/fall times are 40ns/5ns when nothing connect (impedance is >>>> very high) to external pin of RockPro64. >>>> >>>> What UART device are you using with RockPro64? If you use some device >>>> with RockPro64 and board shows rise/fall times = 90ns/45ns, my device >>>> is not suitable for RockPro64 by some reason. So it's better to drop >>>> my patch. >>> >>> The adapter is an FTDI FT232RL breakout board, attached with some >>> generic Dupont connector jumpers. >>> Interesting your RockPro is showing this symptom, perhaps there is a >>> cold solder joint somewhere introducing resistance? >>> >>>> >>>> 2) Other SoC >>>> I have other SoC board rk3328-rock64, Rock64 shows rise/fall times = >>>> 90ns/80ns when same UART-USB device is connected to UART pin. >>> >>> I measured similar on my Rock64 as well. >>> Tony, thanks for your info about environment. It seems my RockPro64 problem. I don't have enough electronic knowledge, but try to check my RockPro64 as much as I can. >>>> >>>> I think it shows rk3399's (or RockPro64's?) drive strength is a little >>>> weak. So it's better to increase the drive strength of UART of rk3399. >>> >>> I do not think this is a bad idea generally, it simply allows for more >>> available current from the interface. I'll let others be the judge of >>> that, however. >> >> There may be RK3399 users who would care about the possible EMI impact, >> so it's probably still best to limit such a change to boards which >> definitely need it. >> > > Ah, good point. > > As to speeds achievable, I've only run into drive level issues with > SD/SDIO, but that's all the way up at 25-50 MHz. My patch has bad effects for EMI issues of all RK3399 boards. So conclusion is, my patch should be dropped. Sorry for confusing. Best Regards, Katsuhiro Suzuki > > Tony > >> Robin. >> >>> >>>> >>>> Best Regards, >>>> Katsuhiro Suzuki >>>> >>>>>> >>>>>> Best Regards, >>>>>> Katsuhiro Suzuki >>>>>> >>>>>> >>>>>>> Thanks >>>>>>> Heiko >>>>>>> >>>>>>> >>>>>>> >>>>>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi >>>>>>>> index beaa92744a64..e3c8f91ead50 100644 >>>>>>>> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi >>>>>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi >>>>>>>> @@ -2000,6 +2000,11 @@ >>>>>>>> drive-strength = <8>; >>>>>>>> }; >>>>>>>> >>>>>>>> + pcfg_pull_up_12ma: pcfg-pull-up-12ma { >>>>>>>> + bias-pull-up; >>>>>>>> + drive-strength = <12>; >>>>>>>> + }; >>>>>>>> + >>>>>>>> pcfg_pull_up_18ma: pcfg-pull-up-18ma { >>>>>>>> bias-pull-up; >>>>>>>> drive-strength = <18>; >>>>>>>> @@ -2521,8 +2526,8 @@ >>>>>>>> uart2c { >>>>>>>> uart2c_xfer: uart2c-xfer { >>>>>>>> rockchip,pins = >>>>>>>> - <4 RK_PC3 RK_FUNC_1 &pcfg_pull_up>, >>>>>>>> - <4 RK_PC4 RK_FUNC_1 &pcfg_pull_none>; >>>>>>>> + <4 RK_PC3 RK_FUNC_1 &pcfg_pull_up_12ma>, >>>>>>>> + <4 RK_PC4 RK_FUNC_1 &pcfg_pull_none_12ma>; >>>>>>>> }; >>>>>>>> }; >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Linux-rockchip mailing list >>>>>> Linux-rockchip@lists.infradead.org >>>>>> http://lists.infradead.org/mailman/listinfo/linux-rockchip >>>>> >>>>> >>>> > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip > >