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

dt-bindings: slimbus: convert bus description to DT schema

Convert the SLIMbus bus description bindings to DT Schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221118065246.6835-11-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Krzysztof Kozlowski and committed by
Greg Kroah-Hartman
c53627f8 319a538d

+95 -65
-60
Documentation/devicetree/bindings/slimbus/bus.txt
··· 1 - SLIM(Serial Low Power Interchip Media Bus) bus 2 - 3 - SLIMbus is a 2-wire bus, and is used to communicate with peripheral 4 - components like audio-codec. 5 - 6 - Required property for SLIMbus controller node: 7 - - compatible - name of SLIMbus controller 8 - 9 - Child nodes: 10 - Every SLIMbus controller node can contain zero or more child nodes 11 - representing slave devices on the bus. Every SLIMbus slave device is 12 - uniquely determined by the enumeration address containing 4 fields: 13 - Manufacturer ID, Product code, Device index, and Instance value for 14 - the device. 15 - If child node is not present and it is instantiated after device 16 - discovery (slave device reporting itself present). 17 - 18 - In some cases it may be necessary to describe non-probeable device 19 - details such as non-standard ways of powering up a device. In 20 - such cases, child nodes for those devices will be present as 21 - slaves of the SLIMbus controller, as detailed below. 22 - 23 - Required property for SLIMbus child node if it is present: 24 - - reg - Should be ('Device index', 'Instance ID') from SLIMbus 25 - Enumeration Address. 26 - Device Index Uniquely identifies multiple Devices within 27 - a single Component. 28 - Instance ID Is for the cases where multiple Devices of the 29 - same type or Class are attached to the bus. 30 - 31 - - compatible -"slimMID,PID". The textual representation of Manufacturer ID, 32 - Product Code, shall be in lower case hexadecimal with leading 33 - zeroes suppressed 34 - 35 - Optional property for SLIMbus child node if it is present: 36 - - slim-ifc-dev - Should be phandle to SLIMBus Interface device. 37 - Required for devices which deal with streams. 38 - 39 - SLIMbus example for Qualcomm's slimbus manager component: 40 - 41 - slim@28080000 { 42 - compatible = "qcom,apq8064-slim", "qcom,slim"; 43 - reg = <0x28080000 0x2000>, 44 - interrupts = <0 33 0>; 45 - clocks = <&lcc SLIMBUS_SRC>, <&lcc AUDIO_SLIMBUS_CLK>; 46 - clock-names = "iface", "core"; 47 - #address-cells = <2>; 48 - #size-cell = <0>; 49 - 50 - codec_ifd: ifd@0,0{ 51 - compatible = "slim217,60"; 52 - reg = <0 0>; 53 - }; 54 - 55 - codec: wcd9310@1,0{ 56 - compatible = "slim217,60"; 57 - reg = <1 0>; 58 - slim-ifc-dev = <&codec_ifd>; 59 - }; 60 - };
-2
Documentation/devicetree/bindings/slimbus/slim-ngd-qcom-ctrl.txt
··· 5 5 communicating with master component residing on ADSP for bandwidth and 6 6 data-channel management 7 7 8 - Please refer to slimbus/bus.txt for details of the common SLIMBus bindings. 9 - 10 8 - compatible: 11 9 Usage: required 12 10 Value type: <stringlist>
-3
Documentation/devicetree/bindings/slimbus/slim-qcom-ctrl.txt
··· 4 4 5 5 Required properties: 6 6 7 - - #address-cells - refer to Documentation/devicetree/bindings/slimbus/bus.txt 8 - - #size-cells - refer to Documentation/devicetree/bindings/slimbus/bus.txt 9 - 10 7 - reg : Offset and length of the register region(s) for the device 11 8 - reg-names : Register region name(s) referenced in reg above 12 9 Required register resource entries are:
+95
Documentation/devicetree/bindings/slimbus/slimbus.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/slimbus/slimbus.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: SLIM (Serial Low Power Interchip Media) bus 8 + 9 + maintainers: 10 + - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 11 + 12 + description: 13 + SLIMbus is a 2-wire bus, and is used to communicate with peripheral 14 + components like audio-codec. 15 + 16 + properties: 17 + $nodename: 18 + pattern: "^slim(@.*|-[0-9a-f])*$" 19 + 20 + "#address-cells": 21 + const: 2 22 + 23 + "#size-cells": 24 + const: 0 25 + 26 + patternProperties: 27 + "^.*@[0-9a-f]+,[0-9a-f]+$": 28 + type: object 29 + description: | 30 + Every SLIMbus controller node can contain zero or more child nodes 31 + representing slave devices on the bus. Every SLIMbus slave device is 32 + uniquely determined by the enumeration address containing 4 fields:: 33 + Manufacturer ID, Product code, Device index, and Instance value for the 34 + device. 35 + 36 + If child node is not present and it is instantiated after device 37 + discovery (slave device reporting itself present). 38 + 39 + In some cases it may be necessary to describe non-probeable device 40 + details such as non-standard ways of powering up a device. In such cases, 41 + child nodes for those devices will be present as slaves of the SLIMbus 42 + controller. 43 + 44 + properties: 45 + compatible: 46 + pattern: "^slim[0-9a-f]+,[0-9a-f]+$" 47 + 48 + reg: 49 + maxItems: 1 50 + description: | 51 + Pair of (device index, instande ID), where:: 52 + - Device index, which uniquely identifies multiple devices within a 53 + single component. 54 + - Instance ID, can be used for the cases where multiple devices of 55 + the same type or class are attached to the bus. 56 + 57 + required: 58 + - compatible 59 + - reg 60 + 61 + additionalProperties: true 62 + 63 + required: 64 + - "#address-cells" 65 + - "#size-cells" 66 + 67 + additionalProperties: true 68 + 69 + examples: 70 + - | 71 + #include <dt-bindings/clock/qcom,gcc-msm8960.h> 72 + #include <dt-bindings/clock/qcom,lcc-msm8960.h> 73 + #include <dt-bindings/interrupt-controller/arm-gic.h> 74 + 75 + soc { 76 + #address-cells = <1>; 77 + #size-cells = <1>; 78 + ranges; 79 + 80 + slim@28080000 { 81 + compatible = "qcom,apq8064-slim", "qcom,slim"; 82 + reg = <0x28080000 0x2000>, <0x80207c 4>; 83 + reg-names = "ctrl", "slew"; 84 + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; 85 + clocks = <&lcc SLIMBUS_SRC>, <&lcc AUDIO_SLIMBUS_CLK>; 86 + clock-names = "iface", "core"; 87 + #address-cells = <2>; 88 + #size-cells = <0>; 89 + 90 + audio-codec@1,0 { 91 + compatible = "slim217,60"; 92 + reg = <1 0>; 93 + }; 94 + }; 95 + };