Received: by 10.213.65.68 with SMTP id h4csp798325imn; Tue, 27 Mar 2018 08:59:41 -0700 (PDT) X-Google-Smtp-Source: AG47ELuiL6jBRLt7/lbrbs6MCed5qHRgbscW8SgJbktP3zBkjCZZb9TdYHBQw3U1khHStQ4b7rdN X-Received: by 10.101.87.201 with SMTP id q9mr32338584pgr.215.1522166381070; Tue, 27 Mar 2018 08:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522166381; cv=none; d=google.com; s=arc-20160816; b=sAg74XmcYNKtQ4lcncJScud8cvmelRjnUdQ51qVOtSXvPH+tLwpRVNn6P9hYRXAmrs BES9TBCwnk9NnXvkRzo1vNt031vlIpshGHGe0P55oGOguPv+1slV4w+WZD4jPjUQMsS8 KNwHBK2AKxhW7PPA2DZRmuBi97jAse76OkJKKo9Y6QfgJvbsqxRM8PRK7qKMBUDBjkna V7jW2XnGfPCzjOC3UZYuAPddGe6UF7MabEQ1zr1zSrhx7dDq1/FF/Sp8pe7UYpmV+fas TfK7uMMWBvMwSaKyO3Z2k2STr/ST6qjv2toTD/DyOqODSKnz5zMZqMtCTOCgYMf0QE/n uqTA== 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:dkim-signature :arc-authentication-results; bh=4Xo9GY/uSFjbHJ9ilvQFuTqt9D24e1kd4AIaIhjHoxY=; b=ZiqGaBMkRUR2FQDsPWDcHzfmhjvx0FtvrZkNPBoYY6tqj6kPEHKG/fwQBtM8HTQrH3 Cd1n9EuHhQt9J0BV3lfMjYok3COZW5aHGxoQVAnj/gkWLgluv4hd075nhciWYFAlrdh7 I28UYzJkYziosVJN2DRXUlPVycniiB/Oo8KraVkQDyu2R9paEsmzKp/gcLdtumuTWD33 Fxmnzj7sxQqIus4oPVP0Gvhly/j01GUaPqkLMdVEMvzNxkQVb5Io7k0rq9yVNDamRMlz TTMnTdPV7roR4YBrRE3lAbafBk3U5ZI/qcoSUNjpZvkBCP1sKmLRPK6fpOt/I6zTc9Rb MyJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hOxYID7f; 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 u72si1055437pgc.545.2018.03.27.08.59.26; Tue, 27 Mar 2018 08:59:41 -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=hOxYID7f; 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 S1752766AbeC0P4i (ORCPT + 99 others); Tue, 27 Mar 2018 11:56:38 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:40880 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752667AbeC0P4d (ORCPT ); Tue, 27 Mar 2018 11:56:33 -0400 Received: by mail-wm0-f66.google.com with SMTP id x4so10351865wmh.5 for ; Tue, 27 Mar 2018 08:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=4Xo9GY/uSFjbHJ9ilvQFuTqt9D24e1kd4AIaIhjHoxY=; b=hOxYID7fzXFPl7Qsfd1rt7P374zA/WirfYtHgl/qPtS0Ev+UX3CFYvX5SWCFN1cinp X5iq8soksLGdGMHavj8j543j4L5a762gGIz2/R/t9CY7H756kvUO3R+NgOPFVN9j/PnN S3BpkkT1dyEPWxrombeaVuJv0L7M8t8Bo3WOU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4Xo9GY/uSFjbHJ9ilvQFuTqt9D24e1kd4AIaIhjHoxY=; b=O1brSpqbl2t5DJYBaqf7FKvAzOtuovqGL/dQZNbyORTdgep4YO3sdOtUYXMFbokTuR 2yZA9SQsHN5Y7AzCu1y4A9+uqW4xb+5Q+KGLH7xG+oG1JxSYwmOcou7n3FLkIXRTOr81 0mtgLjLeg9+RBvVS2LDreg6Zf2FVn9M1uPTqxAbee7gvkApioh5ZCyLBLbhtA00GmVnC mLbXIVdiXHgBShLLyZtxBJaH0pkB93zqvUSQ2ujXWj9OUGe4CQIi4uAsIuCj9JoNkGRE bWFqgV6VAOQcKq/Ki2/reQr7oYQ0x8cfTgg+ThCut1859IGGfzetzVWJtQS6D52v7D8O WzSg== X-Gm-Message-State: AElRT7HvMkeyocPpmfmS4dWinpPrI4NFwmnyRdXN7OV+sZfxGICeMQ07 ep+ligsIDXw1Oy92Ft0yIsGxe4nkl0g= X-Received: by 10.28.211.3 with SMTP id k3mr7776174wmg.39.1522166191803; Tue, 27 Mar 2018 08:56:31 -0700 (PDT) Received: from [192.168.1.100] (aig34-1-88-167-228-121.fbx.proxad.net. [88.167.228.121]) by smtp.gmail.com with ESMTPSA id d9sm3471490wmh.38.2018.03.27.08.56.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 08:56:30 -0700 (PDT) Subject: Re: [PATCH v5 2/3] dt-bindings: net: bluetooth: Add qualcomm-bluetooth To: Bjorn Andersson , Marcel Holtmann Cc: 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 References: <20180320032331.29865-1-thierry.escande@linaro.org> <20180320032331.29865-3-thierry.escande@linaro.org> <20180326225106.GC1403@tuxbook-pro> From: Thierry Escande Message-ID: <2e0db4b4-80cc-9a5b-9e0a-812f1bc9fbcf@linaro.org> Date: Tue, 27 Mar 2018 17:56:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180326225106.GC1403@tuxbook-pro> Content-Type: text/plain; charset=utf-8; format=flowed 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 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. Regards, Thierry > > Regards, > Bjorn >