Received: by 10.223.176.5 with SMTP id f5csp190967wra; Tue, 6 Feb 2018 20:15:18 -0800 (PST) X-Google-Smtp-Source: AH8x225J4en7ga1uPyjE5w/UgFYVTZyDZBJiFR3MDMUw3vyLeLYJvlAYARoZg/kLcB/q0C10Ak1Q X-Received: by 2002:a17:902:9893:: with SMTP id s19-v6mr4573962plp.101.1517976917970; Tue, 06 Feb 2018 20:15:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517976917; cv=none; d=google.com; s=arc-20160816; b=F/Q67RY8HXDG2EKEQY2yVA41NjMLry8LmzazmCHrD0WV2SIaIDNzFRHKBWUfTlxOYJ qvjhMOBHyO9Cd4oRBIs6ouv/qSuOn0/LRoW8XeJd7ac2qOfti1OO9Po9mDGhVGmrvyNF UVQ2crnZAGOJ9xYzo/HYOok9ytGQgHr+mggDkTfKmwzqEifHJFQaUZ4K+S0pSAtr+Ylq 9HCOIQxIJpzaJ8S5vrNIr97kAPbTAHEJJ/UnCoabOIF+Cye7OWulizfzZVfZBbCkVIVX 7vYCg0KX4H6g0Nev2G9gyBhftHgY3uLdlAVS57nCMaHHZIc/uKT3mbOhCRYLk6/mlj0A mDkw== 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:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=n0r9Nf79DbqtNIIyQ1cWV0bR3vxmcaTjQo7ojOtjaIg=; b=MaFK+GV5jjY69s/hJ9Suj3XpTjrKIfz1Cm851ajwEL0PTycxvh60k6HiCcl80oE6yF R+tXOIu2r7Bl9pbqPuPGTMSdDC0hKVQ4FzGzZ15lfLA2seyApoLW7t4AQYbgR9tNvcyI TozUoJVBgeauDm9CCzjbed/Zd+iJF86gR8mRbu+jpj7MMBnNNcVh6vk1I/RI28VajCed dIWCwo6e0cx4cAXxRXw78tI+FKOyECzdYSBmUGuQGbnRi8A5pLVVcWK8KbuBWBQl9s1r umtBPPdhWcWqTKIJVSCTrCXRJHI1WPVU/Nvduvs+JYEFkldD1nbDypO2Ke/x7B/DrOKE 3ZGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=QxniGPUc; dkim=pass header.i=@codeaurora.org header.s=default header.b=WGl3WFSh; 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 w11si392892pgt.635.2018.02.06.20.15.04; Tue, 06 Feb 2018 20:15:17 -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=pass header.i=@codeaurora.org header.s=default header.b=QxniGPUc; dkim=pass header.i=@codeaurora.org header.s=default header.b=WGl3WFSh; 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 S1753302AbeBGENH (ORCPT + 99 others); Tue, 6 Feb 2018 23:13:07 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:44272 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752465AbeBGENF (ORCPT ); Tue, 6 Feb 2018 23:13:05 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 82EFE606DD; Wed, 7 Feb 2018 04:13:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1517976784; bh=W8dHdeHfERezmpasHK+5XKpkWyXEIpAZ+ha2d2HtuLA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=QxniGPUcgJql2HWzTTuPYatB2vJ8qmh1xz1sFy/tmqaCxtORShjkPoO+CrH54jgET JlKMh4a8wJm1P6Or4kGQCBLclP9Gq1lDGIC1aQ4IheaEFvKOUa7H45Iqp9si5WhB5X q9N/Ty0yV6FUgeNy36q/NcBTvHWPfddo3LSaapMw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [10.79.40.88] (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rnayak@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7FD26601C4; Wed, 7 Feb 2018 04:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1517976783; bh=W8dHdeHfERezmpasHK+5XKpkWyXEIpAZ+ha2d2HtuLA=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=WGl3WFSh9z9WI9OvLIoieNIX7+LmjH4F1Mr8W3YCFbTSBQzH5wVWs9L7+JJvG00U4 VheY+qKNWlTZdwQBMJu5H7vkZTQ9yr/ss7aZJpd65M4zZz3ipNsF2Hwg7Zc7q83TyI JzZrv6mqepSUw6a3QLvgIXqNsv0EXJei2J60RCk8= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7FD26601C4 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=rnayak@codeaurora.org Subject: Re: [PATCH 2/2] arm64: dts: sdm845: Add serial console support To: Doug Anderson , Bjorn Andersson Cc: Stephen Boyd , Andy Gross , LKML , linux-arm-msm@vger.kernel.org, Linux ARM , devicetree@vger.kernel.org References: <20180125163216.29018-1-rnayak@codeaurora.org> <20180125163216.29018-3-rnayak@codeaurora.org> <20180126221808.GE28313@codeaurora.org> <20180206190614.GL9465@builder> From: Rajendra Nayak Message-ID: Date: Wed, 7 Feb 2018 09:42:59 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/07/2018 01:19 AM, Doug Anderson wrote: > Hi, > > On Tue, Feb 6, 2018 at 11:06 AM, Bjorn Andersson > wrote: >> On Tue 06 Feb 10:37 PST 2018, Doug Anderson wrote: >> >>> Hi, >>> >>> On Fri, Jan 26, 2018 at 2:18 PM, Stephen Boyd wrote: >>>> On 01/25, Rajendra Nayak wrote: >>>>> diff --git a/arch/arm64/boot/dts/qcom/sdm845-pins.dtsi b/arch/arm64/boot/dts/qcom/sdm845-pins.dtsi >>>>> new file mode 100644 >>>>> index 000000000000..b97f99e6f4b4 >>>>> --- /dev/null >>>>> +++ b/arch/arm64/boot/dts/qcom/sdm845-pins.dtsi >>>>> @@ -0,0 +1,32 @@ >>>>> +// SPDX-License-Identifier: GPL-2.0 >>>>> +/* >>>>> + * Copyright (c) 2018, The Linux Foundation. All rights reserved. >>>>> + */ >>>>> + >>>>> +&tlmm { >>>> >>>> I'm not the maintainer, but I find this approach to the pins >>>> really annoying. I have to flip to another file to figure out how >>>> a board has configured the pins. And we may bring in a bunch of >>>> settings that we don't ever use on some board too. Why can't we >>>> put the settings in the board file directly? >>> >>> I'm not so familiar with how things work with Qualcomm, but in general >>> I think putting this in the "board" file is a bad idea. I'd be OK >>> with putting this directly in the SoC file (though it might get >>> unwieldy?), but not moving things to the board file as was done with >>> v2 of this patch. >>> >>> Said another way: nearly board that uses SDM845 that uses UART2 will >>> have the same definitions for these pins so we shouldn't be >>> duplicating it across every board, right? >>> >> >> We've run into several cases where different boards uses the same >> function but requires board specific electrical configuration. >> >> So what we decided was to keep the pinmux in the soc-file (where e.g. >> the uart definition is) and then extend it with the board specific >> electrical properties (the pinconf), in the board files. >> >> This does come with the complexity of having the pinctrl nodes split in >> two places, but the responsibilities of the two parts is clear and we >> remove the need for all board files to ensure the appropriate pinmux is >> in place. >> >> >> NB. We did discuss adding "sane defaults" for the pinconf in the soc >> dtsi, but we end up spending considerable time debugging issues stemming >> from not having the right pinconf; so better make this explicit and say >> that the board has to specify it's config. > > Whoops, saw your responses _after_ I sent my response to v2. In any > case this makes sense to me then! On Rockchip boards I've been > involved in we often added "sane defaults", but I can see how that > could be confusing in different ways. I'm happy with your choice and > it seems like a happy medium. The sdm845.dtsi file can have the main > definition of the nodes and can thus refer to the nodes. Then you > just add the extra bit in the board file. > > What you propose is not what happened in v2 of the series > though. In v2 _both_ > the pinconf and the pinmux moved to the board file. That's wrong. got it. I'll fix this up in my v3. Thanks for the review. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation