Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: Convert Marvell 8897/8997 bindings to DT schema

Convert the existing text-based DT bindings for Marvell 8897/8997
(sd8897/sd8997) bluetooth devices controller to a DT schema.

While here, bindings for "usb1286,204e" (USB interface) are dropped from
the DT schema definition as these are currently documented in file [0].

[0] Documentation/devicetree/bindings/net/btusb.txt

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Ariel D'Alessandro and committed by
Luiz Augusto von Dentz
73d2d709 0b00bee9

+80 -84
+79
Documentation/devicetree/bindings/net/bluetooth/marvell,sd8897-bt.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/net/bluetooth/marvell,sd8897-bt.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Marvell 8897/8997 (sd8897/sd8997) bluetooth devices (SDIO) 8 + 9 + maintainers: 10 + - Ariel D'Alessandro <ariel.dalessandro@collabora.com> 11 + 12 + allOf: 13 + - $ref: /schemas/net/bluetooth/bluetooth-controller.yaml# 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - marvell,sd8897-bt 19 + - marvell,sd8997-bt 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + marvell,cal-data: 28 + $ref: /schemas/types.yaml#/definitions/uint8-array 29 + description: 30 + Calibration data downloaded to the device during initialization. 31 + maxItems: 28 32 + 33 + marvell,wakeup-pin: 34 + $ref: /schemas/types.yaml#/definitions/uint16 35 + description: 36 + Wakeup pin number of the bluetooth chip. Used by firmware to wakeup host 37 + system. 38 + 39 + marvell,wakeup-gap-ms: 40 + $ref: /schemas/types.yaml#/definitions/uint16 41 + description: 42 + Wakeup latency of the host platform. Required by the chip sleep feature. 43 + 44 + required: 45 + - compatible 46 + - reg 47 + - interrupts 48 + 49 + additionalProperties: false 50 + 51 + examples: 52 + - | 53 + #include <dt-bindings/interrupt-controller/irq.h> 54 + 55 + mmc { 56 + vmmc-supply = <&wlan_en_reg>; 57 + bus-width = <4>; 58 + cap-power-off-card; 59 + keep-power-in-suspend; 60 + 61 + #address-cells = <1>; 62 + #size-cells = <0>; 63 + 64 + bluetooth@2 { 65 + compatible = "marvell,sd8897-bt"; 66 + reg = <2>; 67 + interrupt-parent = <&pio>; 68 + interrupts = <119 IRQ_TYPE_LEVEL_LOW>; 69 + 70 + marvell,cal-data = /bits/ 8 < 71 + 0x37 0x01 0x1c 0x00 0xff 0xff 0xff 0xff 0x01 0x7f 0x04 0x02 72 + 0x00 0x00 0xba 0xce 0xc0 0xc6 0x2d 0x00 0x00 0x00 0x00 0x00 73 + 0x00 0x00 0xf0 0x00>; 74 + marvell,wakeup-pin = /bits/ 16 <0x0d>; 75 + marvell,wakeup-gap-ms = /bits/ 16 <0x64>; 76 + }; 77 + }; 78 + 79 + ...
+1 -1
Documentation/devicetree/bindings/net/btusb.txt
··· 14 14 15 15 16 16 Also, vendors that use btusb may have device additional properties, e.g: 17 - Documentation/devicetree/bindings/net/marvell-bt-8xxx.txt 17 + Documentation/devicetree/bindings/net/bluetooth/marvell,sd8897-bt.yaml 18 18 19 19 Optional properties: 20 20
-83
Documentation/devicetree/bindings/net/marvell-bt-8xxx.txt
··· 1 - Marvell 8897/8997 (sd8897/sd8997) bluetooth devices (SDIO or USB based) 2 - ------ 3 - The 8997 devices supports multiple interfaces. When used on SDIO interfaces, 4 - the btmrvl driver is used and when used on USB interface, the btusb driver is 5 - used. 6 - 7 - Required properties: 8 - 9 - - compatible : should be one of the following: 10 - * "marvell,sd8897-bt" (for SDIO) 11 - * "marvell,sd8997-bt" (for SDIO) 12 - * "usb1286,204e" (for USB) 13 - 14 - Optional properties: 15 - 16 - - marvell,cal-data: Calibration data downloaded to the device during 17 - initialization. This is an array of 28 values(u8). 18 - This is only applicable to SDIO devices. 19 - 20 - - marvell,wakeup-pin: It represents wakeup pin number of the bluetooth chip. 21 - firmware will use the pin to wakeup host system (u16). 22 - - marvell,wakeup-gap-ms: wakeup gap represents wakeup latency of the host 23 - platform. The value will be configured to firmware. This 24 - is needed to work chip's sleep feature as expected (u16). 25 - - interrupt-names: Used only for USB based devices (See below) 26 - - interrupts : specifies the interrupt pin number to the cpu. For SDIO, the 27 - driver will use the first interrupt specified in the interrupt 28 - array. For USB based devices, the driver will use the interrupt 29 - named "wakeup" from the interrupt-names and interrupt arrays. 30 - The driver will request an irq based on this interrupt number. 31 - During system suspend, the irq will be enabled so that the 32 - bluetooth chip can wakeup host platform under certain 33 - conditions. During system resume, the irq will be disabled 34 - to make sure unnecessary interrupt is not received. 35 - 36 - Example: 37 - 38 - IRQ pin 119 is used as system wakeup source interrupt. 39 - wakeup pin 13 and gap 100ms are configured so that firmware can wakeup host 40 - using this device side pin and wakeup latency. 41 - 42 - Example for SDIO device follows (calibration data is also available in 43 - below example). 44 - 45 - &mmc3 { 46 - vmmc-supply = <&wlan_en_reg>; 47 - bus-width = <4>; 48 - cap-power-off-card; 49 - keep-power-in-suspend; 50 - 51 - #address-cells = <1>; 52 - #size-cells = <0>; 53 - btmrvl: bluetooth@2 { 54 - compatible = "marvell,sd8897-bt"; 55 - reg = <2>; 56 - interrupt-parent = <&pio>; 57 - interrupts = <119 IRQ_TYPE_LEVEL_LOW>; 58 - 59 - marvell,cal-data = /bits/ 8 < 60 - 0x37 0x01 0x1c 0x00 0xff 0xff 0xff 0xff 0x01 0x7f 0x04 0x02 61 - 0x00 0x00 0xba 0xce 0xc0 0xc6 0x2d 0x00 0x00 0x00 0x00 0x00 62 - 0x00 0x00 0xf0 0x00>; 63 - marvell,wakeup-pin = /bits/ 16 <0x0d>; 64 - marvell,wakeup-gap-ms = /bits/ 16 <0x64>; 65 - }; 66 - }; 67 - 68 - Example for USB device: 69 - 70 - &usb_host1_ohci { 71 - #address-cells = <1>; 72 - #size-cells = <0>; 73 - 74 - mvl_bt1: bt@1 { 75 - compatible = "usb1286,204e"; 76 - reg = <1>; 77 - interrupt-parent = <&gpio0>; 78 - interrupt-names = "wakeup"; 79 - interrupts = <119 IRQ_TYPE_LEVEL_LOW>; 80 - marvell,wakeup-pin = /bits/ 16 <0x0d>; 81 - marvell,wakeup-gap-ms = /bits/ 16 <0x64>; 82 - }; 83 - };