Received: by 10.223.185.116 with SMTP id b49csp59461wrg; Tue, 13 Feb 2018 16:33:48 -0800 (PST) X-Google-Smtp-Source: AH8x2269NXHqS83FRDJ6lBHShbfRRjIHDg2SCLOIVsgtBDFkWRy0sZ4D9Bt9lYUEzxkdBPLikL66 X-Received: by 10.98.192.11 with SMTP id x11mr2970252pff.27.1518568428626; Tue, 13 Feb 2018 16:33:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518568428; cv=none; d=google.com; s=arc-20160816; b=VLPEYebw+xEsH/HF7p6jPYbnDQ+vxfgGWXzqYkB359IOPOsOyqCtVOwOihehUCH1eb NP5iRRZWpP7+gC4D+mjW//rCJILpnDCvx6pK1vtOsLfETgO/8AtrA6qLI9k8bmgbQZeg UQZu85ptxfJQs2jWa0QewTSKbEeAYcFVsPUHt5FtL9IwfNpQii7pbWRqA/6YJQxBuL9d HoWhbZ5GdvxOnZkIjAaE+4SXBn/f1jZzHzErJlsxtdKCtwezDWoKgQDQ4xHO0CxwLe3k xb1CG0qQCjdaiEgX+crxqjFf6HgZLw5y6cZlDWohcwx0OItPUCk3unvyG+HhRHH8Da59 vHfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=91J50Cg1MaJOAoIb6uXbUBIsNX5uyGrrudNrNly/KtA=; b=tjSIij46mEYjr0q7zZdoHfnW1YUFMF0xIyluAHp6KhrcxJzP8Cpfs0kWW8Bevl9p48 el7Q5qNMKFMQwpU5byE9b0V2VptL/guKugneXw/kPaVuMtOU2Y6HYyKdsIzzBGUnzbmb x0gFoJUO+vgV2zv18NVijLuxOuDufI/EJAFztDq6adp8tvrgJfPbD88xCU7LqxG6xDRm cFlbfZxPiq0ohw9xHtLmwbtT1W53LG5XEZYBD5ILq2mJ9GFG/GWzSjbquZ8RLta0Q1i9 EXYimSLb6eLj6Q3BiLW7BujHme5SQmTDL5a/y0dqBIBHTJkU57LyvMuFvQTGdeCGpw11 tFxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=Es76Ex+v; dkim=fail header.i=@chromium.org header.s=google header.b=U0Luz4zW; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si16505pfi.156.2018.02.13.16.33.33; Tue, 13 Feb 2018 16:33:48 -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; dkim=fail header.i=@google.com header.s=20161025 header.b=Es76Ex+v; dkim=fail header.i=@chromium.org header.s=google header.b=U0Luz4zW; 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=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966271AbeBNAcP (ORCPT + 99 others); Tue, 13 Feb 2018 19:32:15 -0500 Received: from mail-vk0-f68.google.com ([209.85.213.68]:46461 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966208AbeBNAcM (ORCPT ); Tue, 13 Feb 2018 19:32:12 -0500 Received: by mail-vk0-f68.google.com with SMTP id o204so26329vkd.13 for ; Tue, 13 Feb 2018 16:32:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=91J50Cg1MaJOAoIb6uXbUBIsNX5uyGrrudNrNly/KtA=; b=Es76Ex+vxkTXENqtUKHLGpalAj41mQ5ysZg+U36d/MUtykNZ2uOq/5lk4p7yOUCGsQ 7D6jdjD07J3qPg45DyDcUWnQy6QGu9A2CGYHfIoV04Q5t5LRJVTlljRJNILVjs65XBd0 bP0lHmszDVZz3lD4/B693P7buT44/7gkR2vxDWjSTyJTfLP+0wStlyG6/EybJlKPhYJy Uuwh1L6oiHVE2V+U8tNgOdxXDg261BGibM4nz4vHkd7+D2Qk+xxRzQ3UX3B7QHkn9aKX ntqvaEpREUVo4VXyowH7MjuQ46d/0SdfYNaszFE2dTk5JBa0ITIhiS/mGJuLH25wXnV6 Y8KQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=91J50Cg1MaJOAoIb6uXbUBIsNX5uyGrrudNrNly/KtA=; b=U0Luz4zWCvAsQKAjtkHyRh+2V2ncy1O3oTwwzMebZm4yMUzKGjNYvXKRBILlIpi3lb JzP5KStXNAgepQDvHMfcuH21ccJuQ3rf2ATTob0HiuiOhij7PBKupdf7k5y3Ck10Bjnn g6aoGrz1XcyMMmWO7OoDpTcD3Zo4Eb2L9PvaY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=91J50Cg1MaJOAoIb6uXbUBIsNX5uyGrrudNrNly/KtA=; b=LpV+tPSyUP5WKTpf2IF9sfHqeKqDgTFuQcMntlNYGJaa+sz81GxBsdcaBYKlWyt/9z +XthQ2tD0I2H+0x/kYEkM9zVH0eqhVa4+lUqXL25HTxyapHv333WLPAsyDNibWKPjGfn 8JLt877CAgzKmTUndGkSKS4g49igxqVx1tAyKXPgpCswhk9i4vbdngtCRoGjjc+oWHSG +rZuwyYJ4IdYS1TuLvYqCQkT8cCuOcPCEfk9zvqxLzlqjnkOlOaiNUvN7qIt+nkSOMRE uCLgnb83hwX2slg67uIumeXjzozv99RDj6bfqVH28O2fQ63lIMjDcxCvfnXw3kxLXhBT tUOQ== X-Gm-Message-State: APf1xPAtXK1VeDjqrRqzoXvTDlLHa1T8XzJjI03s/sZPpvU80kbhFn2f 4otwC1pCQBK5DvllyskUnkX48sLBsUrlT8+dnp9rR/k6 X-Received: by 10.31.70.196 with SMTP id t187mr3086691vka.102.1518568330563; Tue, 13 Feb 2018 16:32:10 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.141.147 with HTTP; Tue, 13 Feb 2018 16:32:09 -0800 (PST) In-Reply-To: <20180212062832.2791-4-rnayak@codeaurora.org> References: <20180212062832.2791-1-rnayak@codeaurora.org> <20180212062832.2791-4-rnayak@codeaurora.org> From: Doug Anderson Date: Tue, 13 Feb 2018 16:32:09 -0800 X-Google-Sender-Auth: Jba0kRhbNKl7lskTMhdOuHrVWwY Message-ID: Subject: Re: [PATCH v3 3/3] arm64: dts: sdm845: Add serial console support To: Rajendra Nayak Cc: Andy Gross , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, LKML , Linux ARM , Stephen Boyd , evgreen@chromium.org, Bjorn Andersson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sun, Feb 11, 2018 at 10:28 PM, Rajendra Nayak wrote: > Add the qup uart node and geni se instance needed to > support the serial console on the MTP. > > Signed-off-by: Rajendra Nayak > --- > arch/arm64/boot/dts/qcom/sdm845-mtp.dts | 34 ++++++++++++++++++++++++++++ > arch/arm64/boot/dts/qcom/sdm845.dtsi | 39 +++++++++++++++++++++++++++++++++ > 2 files changed, 73 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts > index 617c7bb25fb1..9eab2b815e0d 100644 > --- a/arch/arm64/boot/dts/qcom/sdm845-mtp.dts > +++ b/arch/arm64/boot/dts/qcom/sdm845-mtp.dts > @@ -10,4 +10,38 @@ > / { > model = "Qualcomm Technologies, Inc. SDM845 MTP"; > compatible = "qcom,sdm845-mtp"; > + > + aliases { > + serial0 = &qup_uart2; > + }; > + > + chosen { > + stdout-path = "serial0"; > + }; > +}; > + > +&soc { > + geni-se@ac0000 { > + serial@a84000 { > + status = "okay"; > + }; > + }; If others at QC have already decided that they like the style above then it's OK with me, but I'd prefer instead (at the top level): &qup_uart2 { status = "okay"; }; ...then you don't need to replicate all the hierarchy. > + pinctrl@3400000 { Similar here. This could be: &qup_uart2_default { pinconf { ... } }; If you're upset about things being in a "random" order at the top level, you can still create commented sections in the "dts" file to organize things, but the above means that you don't end up tabbed in several levels of indentation for no reason. > + qup-uart2-default { > + pinconf { > + pins = "gpio4", "gpio5"; > + drive-strength = <2>; > + bias-disable; Possibly you'd want some sort of pull on the "receive" pin unless you're guaranteed that on this board that the other side will always be driving the pin. As far as I can tell this UART goes to a debug connector. If that debug connector is not populated this pin will be floating, no? > + }; > + }; > + > + qup-uart2-sleep { > + pinconf { > + pins = "gpio4", "gpio5"; > + drive-strength = <2>; Does specifying the "drive-strength" in this case actually do anything useful? If not can we leave it out? > + bias-disable; Feel free to ignore if I'm being ignorant, but I would have expected a "pull" of some sort to be turned on for the "transmit" pin when you're in sleep mode. Otherwise the line will be left floating which could generate noise to the other side, no? ...or is there some sort of external pull present on this board? Depending on the board you might also want a pull on the "receive" pin (assuming we wanted one in the "default" state--see above). With my extremely limited EE understanding I have the impression that transitions on a line can still cause power draw even if software isn't paying attention to them, so it's best to prevent them by adding a pull. > + }; > + }; > + }; > }; > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi > index 55a7e0b454e1..8cf8df25b06d 100644 > --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi > +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi > @@ -4,6 +4,7 @@ > */ > > #include > +#include > > / { > interrupt-parent = <&intc>; > @@ -193,6 +194,20 @@ > #gpio-cells = <2>; > interrupt-controller; > #interrupt-cells = <2>; > + > + qup_uart2_default: qup-uart2-default { > + pinmux { > + function = "qup9"; > + pins = "gpio4", "gpio5"; > + }; > + }; > + > + qup_uart2_sleep: qup-uart2-sleep { > + pinmux { > + function = "gpio"; > + pins = "gpio4", "gpio5"; > + }; > + }; > }; > > timer@17c90000 { > @@ -271,5 +286,29 @@ > #interrupt-cells = <4>; > cell-index = <0>; > }; > + > + qup_1: geni-se@ac0000 { Color me confused. So you're saying here that this is "qup_1". ...but above you turn the pinmux for pins "GPIO4" and "GPIO5" to "qup9", right? So UART2 is on "qup 1" and "qup 9"? ...OK, so I stared at manuals a bunch more, and _maybe_ I get it. Maybe there are 3 "QUP v3 modules" each of which handles up to 8 "QUP"s. So QUP 9 is on "QUP module 1", is that right? If everyone understands this already and it's just me that's confused then I guess you can just ignore this comment. However, if you can think of any better alias than "qup_1" that makes this less confusing then that would make me extra happy. Like maybe "qupv3_id_1" to match the manual?