Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp241012pxy; Tue, 20 Apr 2021 17:55:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxHslVqRcOS8/uGhZy5gWWdo0NSrOtmMiezKnaNbIKlrQcoaFlBkCO8bnIGuzH99RQ+yVm X-Received: by 2002:a05:6402:441:: with SMTP id p1mr35591068edw.298.1618966523470; Tue, 20 Apr 2021 17:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618966523; cv=none; d=google.com; s=arc-20160816; b=vuRc21IBEPKKNQhFuZEvmKsV93CURtWkTNSeomYBaNmNanFpAe8/YMDSPLSV5RKR4q FJMLsZK3OTtlO+itoYHwsmQRdpoJSREDGh5YjWIOHV2wuNjeg5uXfG1ZUF1P49yUPVYS Oj3+xsCCzqHQgVP7BhG3FjE8CfzPWTf2cg3YcTHJVNR7UGys0IxKMU6/LxvPfF987idN n9ssUBLsB2mddFgX5eAC4EicJ06iVJ9dm8EkX19jy8HJX8Wt9wUCTHYQodLKxpF1I3Sm Aohyb2lG+X9pWsl7h0RWu6OakjMHgK1FRfsKJ2eoxVNfDjzsAI1FZCzUviA8zi1gVD27 3GQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8YLOYTL9uFfTlsUBTt4KtFnsgrD3qMKDwpIsIQc1OzQ=; b=fVBMQcwfKsdruG7MPl4eAHWQO2MNpHdFapxTSwZOngcAE2jlqGU9zq3cNhB6zu6FUs OV4tPKer6/2lAxK6pRJO1Pkr8fQiddbkdLcFZ1X+f36qAsGc/PbMIcXHy0e9epx5uJhp zThNcgMT6V9+/6vGQU0KpNkjGdt3WihlJsn3IEqSQXtIp3XdQyJl5pbHe9Fmm4sHvWVl r8h5mWw86/VjRuht/y/cqjmkUbK11BkQc/8poLjbF7o80Zc3i9LI9AqbMDul2GgC325u yjXJrbK8F9oq551x7y4dwZUm9ETB5rbGzptVSkCND/1iuat2WE39tjjguUbj1Q9H/gvX yU+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GTHAWJyY; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id p26si598163edx.181.2021.04.20.17.54.02; Tue, 20 Apr 2021 17:55:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GTHAWJyY; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 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 S234440AbhDUAvP (ORCPT + 99 others); Tue, 20 Apr 2021 20:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234309AbhDUAvP (ORCPT ); Tue, 20 Apr 2021 20:51:15 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3267C06138B for ; Tue, 20 Apr 2021 17:50:42 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id 31so12606920pgn.13 for ; Tue, 20 Apr 2021 17:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=8YLOYTL9uFfTlsUBTt4KtFnsgrD3qMKDwpIsIQc1OzQ=; b=GTHAWJyYH+TVJoASsZJVT+rFImVeTfbBdAU0ib1vxL3BQwDL7OWyZZRY+dVfY+CbpJ teVIlUg3keh/0L70wBaEjFOe9F0jWuGp5A/2LL2L+QU1LNxy3sEJmhmPc3v7dSxnSngQ I87A7TZRRHK9Zj4RcZGYcgJgbC3ctsHHRvmxI= 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; bh=8YLOYTL9uFfTlsUBTt4KtFnsgrD3qMKDwpIsIQc1OzQ=; b=mAzFdi8RdYKk1vVUMzJtoVVJs2IZNtt219bSnEVw4Z3mJsRI0I7sOzcT17RcM+C4dG k9MzMZxTjsjymVXJRmxthsK9mnHK/zbry6UeGvf2P0X9pcwHm3qpBB+XAFICGePX2QL1 K8PlszoB5Q8gek+rWy5kbzsVUvkhBYT30u+sLfbrFVHjKR9KC+Oz6u5/vB6BGRM5IbIR ri+Uc9IfdhyEUTJwyS43C5SEcqiailEocoPeh11P10PBKS4rIpQvoBJLStZ43yh+RiHN f7LdcgVmVYsmw5Sm2tc9l3rQD/JXJadlQWJhnd1hiL4CkWgbKkhsHCvgND+uodJTNFpZ 4q0w== X-Gm-Message-State: AOAM532akvYgMIW1JJbNxGzkdW0M/xRmZD5quj0LZxSiYBtiO1rwmYjn zVDlg24ypjy0LoIXPpnSgIev9g== X-Received: by 2002:a63:1a47:: with SMTP id a7mr19505511pgm.437.1618966242338; Tue, 20 Apr 2021 17:50:42 -0700 (PDT) Received: from localhost ([2620:15c:202:201:b1f0:79e0:c1ca:fd1]) by smtp.gmail.com with UTF8SMTPSA id x38sm183812pfu.22.2021.04.20.17.50.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Apr 2021 17:50:41 -0700 (PDT) Date: Tue, 20 Apr 2021 17:50:40 -0700 From: Matthias Kaehlcke To: Venkata Lakshmi Narayana Gubba Cc: marcel@holtmann.org, johan.hedberg@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, hemantg@codeaurora.org, linux-arm-msm@vger.kernel.org, bgodavar@codeaurora.org, rjliao@codeaurora.org, hbandi@codeaurora.org, abhishekpandit@chromium.org Subject: Re: [PATCH v2 2/3] dt-bindings: net: bluetooth: Convert to DT schema Message-ID: References: <1618936010-16579-1-git-send-email-gubbaven@codeaurora.org> <1618936010-16579-3-git-send-email-gubbaven@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1618936010-16579-3-git-send-email-gubbaven@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Tue, Apr 20, 2021 at 09:56:49PM +0530, Venkata Lakshmi Narayana Gubba wrote: > Subject: dt-bindings: net: bluetooth: Convert to DT schema This doesn't convert the generic binding or all bindings to DT schema as the subject suggests, but the Qualcomm BT binding. > > Converted Qualcomm Bluetooth binidings to DT schema. > > Signed-off-by: Venkata Lakshmi Narayana Gubba > --- > .../devicetree/bindings/net/qualcomm-bluetooth.txt | 69 ----------------- > .../bindings/net/qualcomm-bluetooth.yaml | 87 ++++++++++++++++++++++ > 2 files changed, 87 insertions(+), 69 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt > create mode 100644 Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml > > diff --git a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt > deleted file mode 100644 > index 709ca6d..0000000 > --- a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.txt > +++ /dev/null > @@ -1,69 +0,0 @@ > -Qualcomm Bluetooth Chips > ---------------------- > - > -This documents the binding structure and common properties for serial > -attached Qualcomm devices. > - > -Serial attached Qualcomm devices shall be a child node of the host UART > -device the slave device is attached to. > - > -Required properties: > - - compatible: should contain one of the following: > - * "qcom,qca6174-bt" > - * "qcom,qca9377-bt" > - * "qcom,wcn3990-bt" > - * "qcom,wcn3991-bt" > - * "qcom,wcn3998-bt" > - * "qcom,qca6390-bt" > - > -Optional properties for compatible string qcom,qca6174-bt: > - > - - enable-gpios: gpio specifier used to enable chip > - - clocks: clock provided to the controller (SUSCLK_32KHZ) > - - firmware-name: specify the name of nvm firmware to load > - > -Optional properties for compatible string qcom,qca9377-bt: > - > - - max-speed: see Documentation/devicetree/bindings/serial/serial.yaml > - > -Required properties for compatible string qcom,wcn399x-bt: > - > - - vddio-supply: VDD_IO supply regulator handle. > - - vddxo-supply: VDD_XO supply regulator handle. > - - vddrf-supply: VDD_RF supply regulator handle. > - - vddch0-supply: VDD_CH0 supply regulator handle. > - > -Optional properties for compatible string qcom,wcn399x-bt: > - > - - max-speed: see Documentation/devicetree/bindings/serial/serial.yaml > - - firmware-name: specify the name of nvm firmware to load > - - clocks: clock provided to the controller > - > -Examples: > - > -serial@7570000 { > - label = "BT-UART"; > - status = "okay"; > - > - bluetooth { > - compatible = "qcom,qca6174-bt"; > - > - enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>; > - clocks = <&divclk4>; > - firmware-name = "nvm_00440302.bin"; > - }; > -}; > - > -serial@898000 { > - bluetooth { > - compatible = "qcom,wcn3990-bt"; > - > - vddio-supply = <&vreg_s4a_1p8>; > - vddxo-supply = <&vreg_l7a_1p8>; > - vddrf-supply = <&vreg_l17a_1p3>; > - vddch0-supply = <&vreg_l25a_3p3>; > - max-speed = <3200000>; > - firmware-name = "crnv21.bin"; > - clocks = <&rpmhcc RPMH_RF_CLK2>; > - }; > -}; > diff --git a/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml > new file mode 100644 > index 0000000..55cd995 > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/qualcomm-bluetooth.yaml > @@ -0,0 +1,87 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/qualcomm-bluetooth.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm Bluetooth Chips > + > +maintainers: > + - Rob Herring > + - Marcel Holtmann > + > +description: > + This binding describes Qualcomm UART-attached bluetooth chips. > + > +properties: > + compatible: > + enum: > + - qcom,qca6174-bt > + - qcom,qca9377-bt > + - qcom,wcn3990-bt > + - qcom,wcn3991-bt > + - qcom,wcn3998-bt > + - qcom,qca6390-bt delete trailing blanks > + > + enable-gpios: > + maxItems: 1 > + description: gpio specifier used to enable chip > + delete blanks > + clocks: > + maxItems: 1 > + description: clock provided to the controller (SUSCLK_32KHZ) > + > + vddio-supply: > + description: VDD_IO supply regulator handle > + > + vddxo-supply: > + description: VDD_XO supply regulator handle > + > + vddrf-supply: > + description: VDD_RF supply regulator handle > + > + vddch0-supply: > + description: VDD_CH0 supply regulator handle > + > + max-speed: delete trailing blank > + description: see Documentation/devicetree/bindings/serial/serial.yaml > + > + firmware-name: > + description: specify the name of nvm firmware to load > + > + local-bd-address: > + description: see Documentation/devicetree/bindings/net/bluetooth.txt > + > + > +required: > + - compatible it seems you could make the supplies conditionally required based on the compatible string. See Documentation/devicetree/bindings/connector/usb-connector.yaml for an example > + > +additionalProperties: false > + > +examples: > + - | > + #include > + uart { > + label = "BT-UART"; > + status = "okay"; > + > + bluetooth { > + compatible = "qcom,qca6174-bt"; > + enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>; > + clocks = <&divclk4>; > + firmware-name = "nvm_00440302.bin"; > + }; > + }; > + - | > + uart { > + > + bluetooth { > + compatible = "qcom,wcn3990-bt"; > + vddio-supply = <&vreg_s4a_1p8>; > + vddxo-supply = <&vreg_l7a_1p8>; > + vddrf-supply = <&vreg_l17a_1p3>; > + vddch0-supply = <&vreg_l25a_3p3>; > + max-speed = <3200000>; > + firmware-name = "crnv21.bin"; delete trailing blanks