Received: by 10.213.65.68 with SMTP id h4csp951119imn; Tue, 27 Mar 2018 11:48:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/+HYZwDj2F2qFc+hwMRmsMGqIKKh3ozSZd0JMezMdvMDhSdVTyh0v9t8bGw1ha6R1Di/Br X-Received: by 2002:a17:902:b691:: with SMTP id c17-v6mr474463pls.308.1522176531156; Tue, 27 Mar 2018 11:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522176531; cv=none; d=google.com; s=arc-20160816; b=ByR/4DEXZkPNN1UNFGE+N1ASKH9eNoQqoVH5zK81Sd+/6to5SoNYBdf4h1Es5PKHQf N/oZIz01AK+VIn6ESIHEuAdn4CR/ub4bRfkSAAG3P76SN9jUwUwrqe/03Gnyk+0s91Hq gBvGv8tL4uUVS/jV57LZMzWXRwJN64BfqTDv9A132yUrJhZt/mrhs52Kk0QjfZ9dPYz2 0ORjOFgyPGmoxDjmbaVgEomcbIlZbWCVTWL8WcloMowUeaQjW51HMogIfhvHQBk7+cA7 j28VdePhna32ZoNvQwsGk9H3NFBADogSg7LEqOEmo5xcluJ0I9KXwLsSf8O0+1rdVrnk h1tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=cgSqlSRKmUgIgSdQNarO3/9ttI1stDHjZJoblihKCDE=; b=rS2hHc2S6pP5uVL0VPtCV7ZgmhIMx8W+VSutJCYE24NRAOimCyDqdLv5Bq56BA6bnB YHRir01Vbo/fLbpc3TPPmAsQXF/nsAXg1Hf1JLbXIZMA/SKqjHYb/PxLaRqz5037zH0C GASONIVaUesZNeu4dC6HclCT4cy43nbSvwfGev2u20nURxxdTWmlghmYO8hTe84vKPRt aV9R5s2O2qZFV6CLNlJHfTRZF16zUeI0327Pg3Pq20ADH7+Uc/eltXpY4NmYSJu+F0up v5FFwPz5yXQG77bhvZgFhGaQD1LQ/H8kmf9uksWXS5cn4PuG6FlIlZ5j48jFgihU7jay Q1Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SgYpVZXB; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 204si1228243pgf.771.2018.03.27.11.48.36; Tue, 27 Mar 2018 11:48:51 -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=@linaro.org header.s=google header.b=SgYpVZXB; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751674AbeC0Sr3 (ORCPT + 99 others); Tue, 27 Mar 2018 14:47:29 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:40688 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751196AbeC0Sr0 (ORCPT ); Tue, 27 Mar 2018 14:47:26 -0400 Received: by mail-pg0-f68.google.com with SMTP id g8so8904888pgv.7 for ; Tue, 27 Mar 2018 11:47:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=cgSqlSRKmUgIgSdQNarO3/9ttI1stDHjZJoblihKCDE=; b=SgYpVZXBmLkW6mKAGJ9OGnvdwsI8l5gnZsSrX2SKUlk9ZbrqUiiiNsrs8nxgFwq2Nt S+nb8y0l7rSMrMbdEaSo3o6Gz1mS3bD0aSK57kbVCYO/U9aoq9le4C4p4aGFUcrZ/QnZ 30/gI9pRfpzKtP+tafJsVqkXea08G1zYFBxAw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=cgSqlSRKmUgIgSdQNarO3/9ttI1stDHjZJoblihKCDE=; b=twel9WemGsEQOj3mmRfddI84/61yGEdQlTq6eLqfZnX8w5qwIR739HsfXtg90wa0J1 LJqAVZDhykAcmJMTB1eTvUx3NKcs/5QWAlIe7omTfWrlQjcl6veXcDDuvLKLfVN+tHZi E9rLZInT9oejzg2SMJ1IH8oJzITeCLBPk/S+WItkCM/sLcir92RWtrG0ebrbRJ/R2Z9Z zM9u24PA3LvKpkZLm6Z5b7lQywlp6TEsDnHgHxbvowpoTMl5hHD9JpgwzPxSku9Ujn5O EGM8gDbvTevom1Qn1zJ05pew08VNFQATVV69hMljf3zjmHz+d8atqhMCujd93cuzKZkU mpLw== X-Gm-Message-State: AElRT7G/ZQmcYVZMOiBNxcg0ggSps2VcjjR//oi3ZmUqdx/FTSq4PXxs TvSmofl98vzTIRzsL25bnM7hbA== X-Received: by 10.98.205.69 with SMTP id o66mr397115pfg.34.1522176445357; Tue, 27 Mar 2018 11:47:25 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id k185sm4043129pgk.94.2018.03.27.11.47.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Mar 2018 11:47:24 -0700 (PDT) Date: Tue, 27 Mar 2018 11:47:22 -0700 From: Bjorn Andersson To: Thierry Escande Cc: Marcel Holtmann , Rob Herring , Andy Gross , Johan Hedberg , David Brown , Mark Rutland , Andy Shevchenko , Loic Poulain , Srinivas Kandagatla , linux-bluetooth@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 2/3] dt-bindings: net: bluetooth: Add qualcomm-bluetooth Message-ID: <20180327184722.GB18510@minitux> References: <20180320032331.29865-1-thierry.escande@linaro.org> <20180320032331.29865-3-thierry.escande@linaro.org> <20180326225106.GC1403@tuxbook-pro> <2e0db4b4-80cc-9a5b-9e0a-812f1bc9fbcf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2e0db4b4-80cc-9a5b-9e0a-812f1bc9fbcf@linaro.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 27 Mar 08:56 PDT 2018, Thierry Escande wrote: > Hi Bjorn, > > On 27/03/2018 00:51, Bjorn Andersson wrote: > > On Tue 20 Mar 23:58 HKT 2018, Marcel Holtmann wrote: > > > > Signed-off-by: Thierry Escande > > [..] > > > > + - clocks: clock phandle for SUSCLK_32KHZ > > > > > > if I compare this with broadcom-bluetooth.txt or ti-bluetooth.txt then > > > besides compatible, everything else is optional. The > > > nokia-bluetooth.txt has everything required, but that is also a really > > > specific platform. > > > > > > Can we be less restrictive for a QCA general purpose chip? > > > > > > > The way we deal with this in other bindings is that we tie such > > requirements to the compatible; i.e. we would say that qcom,qca6174-bt > > requires a clock and we would have something like qcom,qca-bt that makes > > it optional. > > > > The beauty of this is that the driver will tell you if you forgot to > > specify the clock when it actually is required, which saves you > > considerable amount of debugging time. > > > > > > NB. The way the bcm driver handles this is insufficient, as it treats > > any error from clk_get as "there's no clock specified". The driver > > should accept a clock not being specified, but should fail properly when > > a clock is specified but can't be acquired (e.g. due to clk_get() > > returning EPROBE_DEFER). > > > > > > + > > > > +Example: > > > > + > > > > +serial@7570000 { > > > > + pinctrl-names = "default", "sleep"; > > > > + pinctrl-0 = <&blsp1_uart1_default>; > > > > + pinctrl-1 = <&blsp1_uart1_sleep>; > > > > + > > > > + bluetooth { > > > > + compatible = "qcom,qca6174-bt"; > > > > + > > > > + enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>; > > > > + > > > > + pinctrl-names = "default"; > > > > + pinctrl-0 = <&bt_en_pin_a>; > > > > > > This one I do not understand and you might want to shed some light > > > into why this is done that way. > > > > > > > This is completely generic and only relates to getting the electrical > > properties of the gpio pin set up correctly. So I would recommend that > > we omit this from the binding and example (including the pinctrl > > properties for the serial above). > > If I remove the pinctrl entry in the bluetooth node, the gpio19 is then > marked as unclaimed. The drive strength also defaults to low but that > doesn't seem to be an issue and the the chip can still be enabled through > gpio19. Is it ok to have it unclaimed? If so I can remove it from the > binding and the doc then. > > Regarding the blsp1_uart1_default of the serial node, I can still enable the > chip if I remove it but the hci commands all end in timeout. It seems that > the function for these pins has to be explicitly set to blsp_uart2. So at > least, the default pinctrl seems mandatory. > Our board needs these properties to get the uart and gpio in the right state, but this is unrelated to BT - that's why I suggested that you omit these properties from the BT binding. Regards, Bjorn