Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3958346ybc; Thu, 14 Nov 2019 18:11:38 -0800 (PST) X-Google-Smtp-Source: APXvYqxbxD3XdDjiCnmP8lo456xWK/eRJ0uP7SmH7c2RFRMZzf7SffONQiVWr28pre3QE49b5eMv X-Received: by 2002:a17:906:4096:: with SMTP id u22mr10133236ejj.264.1573783898066; Thu, 14 Nov 2019 18:11:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573783898; cv=none; d=google.com; s=arc-20160816; b=b7zakYT1d2Z20Un9GK4fxfnHGjPMfbJV45r3GJc1DCExYjSjW9VhpBEjyauXciphbm +ZUUEqI7TI0QUvdEdp3ulmzgEECzFQj3UmMXU8TimzKP7jRQwFOBVQP7jSPYgA0ZeXCu 2ggWQQIEVPTksN2NjJCe3WBnnL03u0t5D5DJoB/3ubNMwAZ2wLbFvNz8My5H7Jm1wN8+ diD1odPDUMIqOlgeLaf4mPw0ydxZwlh6Mk+fYHQaWJwFptUt1Y9slBksshDO/jR7c5tv 2fq78MyZZNxlcjuWyKCWwELweYMPevVNZxZDty7w2UF0Int6qCAxYJijFv0Vt0IJ/59C YCQQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gbXUAxZNsHxVmSYyY01pbTkMGbOktpFu/n8zvHDTyVA=; b=hDTmx1wSJVHz3NnJUiGpw9dAYYCUP3VkiNvmOURm8dGnEdBj/+rbpCMgqjEai0t1f1 FaRx+YQHKT+Mtmn5N4sf+xpr1JM1B+bFNTYob4lrMqnkCwzazrL2UHioruIYyz8lW5YW gmAqhsRul4OOzotsWNnhZYL+cu3uYLx8xkxxE3C7LXdI3wQuOUqu/rndPvVQeJ2kjF3Z hDfmDfdc+FTjq5pq+LzrkqbMvunELcnPuuCQlnHXyHVgOFFOLTfbKyorjAxsHS6BxR67 VSIOkz2upk75VnMHCQl3IkwPvTWkMIrIwpxXSJnkQUhaGF7J/ufj50DPi3GoGZVQfHdw wKhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lVcIlp0P; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (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 s40si5715901edd.233.2019.11.14.18.10.54; Thu, 14 Nov 2019 18:11:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-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=@chromium.org header.s=google header.b=lVcIlp0P; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727069AbfKOCK0 (ORCPT + 99 others); Thu, 14 Nov 2019 21:10:26 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36059 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbfKOCKZ (ORCPT ); Thu, 14 Nov 2019 21:10:25 -0500 Received: by mail-pf1-f193.google.com with SMTP id b19so5581752pfd.3 for ; Thu, 14 Nov 2019 18:10:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gbXUAxZNsHxVmSYyY01pbTkMGbOktpFu/n8zvHDTyVA=; b=lVcIlp0POHYabb/W5WB+ryqB8lkVzSTkyHapt2hqxlbn46uP/NpFjKNOSAaRAN2jEt wH1i9GRfQ63kBOvgRYI68VAoZ9/lUc5bG/StOVC1vJy5X0gPMt/H4l+svBEW6fsYTm46 RzXsMn+IwpH97rJawM8Hh6SiC1Q0ZXV8n8XHA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gbXUAxZNsHxVmSYyY01pbTkMGbOktpFu/n8zvHDTyVA=; b=rjDFqttYAn943BsaY/Q0Aj349kFdO2EVoEpHMoJJl0VxdJDTu33dnjOTRrsp88a3nG OSPTt4NF4FiSKb41hiV4OraevCXWzRjJartwbIcr22+aN6O96rMcLocUOD006QijabvM SqPTb+fuFTgz3qEzDt2geJtNUYWaIK8x0XreiCZWOt0cB8O7ZKTa/GcIJMN7z9+73xCZ jxzwHeJ+iC6+cp4fwBloNRS7ok2LFOyVfm4Dll4EKnVf7VTqNrA6e5QftE1utY/WRh5W gT6JJbvq6EPL3iBUPW4/J1+Eg4cDHQwOBFdw9VQ0kymowA2pVMObMSJ13PwXXTxGkSDb HUsw== X-Gm-Message-State: APjAAAWySK9KZKlIFu0qp41lSM0GfQqx0K8zUKJ8UKwBNI97QxaJbCwz atHTGkVDUW6XKtBoAtLfh7Zr3w== X-Received: by 2002:a65:67c7:: with SMTP id b7mr13410291pgs.339.1573783823987; Thu, 14 Nov 2019 18:10:23 -0800 (PST) Received: from apsdesk.mtv.corp.google.com ([2620:15c:202:1:e09a:8d06:a338:aafb]) by smtp.gmail.com with ESMTPSA id f7sm9695820pfa.150.2019.11.14.18.10.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2019 18:10:23 -0800 (PST) From: Abhishek Pandit-Subedi To: Marcel Holtmann , Johan Hedberg , Rob Herring Cc: linux-bluetooth@vger.kernel.org, dianders@chromium.org, Abhishek Pandit-Subedi , devicetree@vger.kernel.org, "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ondrej Jirman , Mark Rutland , Chen-Yu Tsai Subject: [PATCH v5 3/4] dt-bindings: net: broadcom-bluetooth: Add pcm config Date: Thu, 14 Nov 2019 18:10:07 -0800 Message-Id: <20191114180959.v5.3.I18b06235e381accea1c73aa2f9db358645d9f201@changeid> X-Mailer: git-send-email 2.24.0.432.g9d3f5f5b63-goog In-Reply-To: <20191115021008.32926-1-abhishekpandit@chromium.org> References: <20191115021008.32926-1-abhishekpandit@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Add documentation for pcm parameters. Signed-off-by: Abhishek Pandit-Subedi --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None .../bindings/net/broadcom-bluetooth.txt | 20 +++++++++++- include/dt-bindings/bluetooth/brcm.h | 32 +++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/bluetooth/brcm.h diff --git a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt index c749dc297624..a92da31daa79 100644 --- a/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt +++ b/Documentation/devicetree/bindings/net/broadcom-bluetooth.txt @@ -29,10 +29,22 @@ Optional properties: - "lpo": external low power 32.768 kHz clock - vbat-supply: phandle to regulator supply for VBAT - vddio-supply: phandle to regulator supply for VDDIO - + - brcm,bt-sco-routing: PCM, Transport, Codec, I2S + This value must be set in order for the latter + properties to take effect. + - brcm,bt-pcm-interface-rate: 128KBps, 256KBps, 512KBps, 1024KBps, 2048KBps + - brcm,bt-pcm-frame-type: short, long + - brcm,bt-pcm-sync-mode: slave, master + - brcm,bt-pcm-clock-mode: slave, master + +See include/dt-bindings/bluetooth/brcm.h for SCO/PCM parameters. The default +value for all these values are 0 (except for brcm,bt-sco-routing which requires +a value) if you choose to leave it out. Example: +#include + &uart2 { pinctrl-names = "default"; pinctrl-0 = <&uart2_pins>; @@ -40,5 +52,11 @@ Example: bluetooth { compatible = "brcm,bcm43438-bt"; max-speed = <921600>; + + brcm,bt-sco-routing = ; + brcm,bt-pcm-interface-rate = ; + brcm,bt-pcm-frame-type = ; + brcm,bt-pcm-sync-mode = ; + brcm,bt-pcm-clock-mode = ; }; }; diff --git a/include/dt-bindings/bluetooth/brcm.h b/include/dt-bindings/bluetooth/brcm.h new file mode 100644 index 000000000000..8b86f90d7dd2 --- /dev/null +++ b/include/dt-bindings/bluetooth/brcm.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +/* + * This header provides constants for Broadcom bluetooth dt-bindings. + */ +#ifndef _DT_BINDINGS_BLUETOOTH_BRCM_H +#define _DT_BINDINGS_BLUETOOTH_BRCM_H + +#define BRCM_BT_SCO_ROUTING_PCM 0 +#define BRCM_BT_SCO_ROUTING_TRANSPORT 1 +#define BRCM_BT_SCO_ROUTING_CODEC 2 +#define BRCM_BT_SCO_ROUTING_I2S 3 + +/* Default is 128KBPs */ +#define BRCM_BT_PCM_INTERFACE_RATE_128KBPS 0 +#define BRCM_BT_PCM_INTERFACE_RATE_256KBPS 1 +#define BRCM_BT_PCM_INTERFACE_RATE_512KBPS 2 +#define BRCM_BT_PCM_INTERFACE_RATE_1024KBPS 3 +#define BRCM_BT_PCM_INTERFACE_RATE_2048KBPS 4 + +/* Default should be short */ +#define BRCM_BT_PCM_FRAME_TYPE_SHORT 0 +#define BRCM_BT_PCM_FRAME_TYPE_LONG 1 + +/* Default should be master */ +#define BRCM_BT_PCM_SYNC_MODE_SLAVE 0 +#define BRCM_BT_PCM_SYNC_MODE_MASTER 1 + +/* Default should be master */ +#define BRCM_BT_PCM_CLOCK_MODE_SLAVE 0 +#define BRCM_BT_PCM_CLOCK_MODE_MASTER 1 + +#endif /* _DT_BINDINGS_BLUETOOTH_BRCM_H */ -- 2.24.0.432.g9d3f5f5b63-goog