~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/devicetree/bindings/spi/sprd,spi-adi.yaml

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  2 %YAML 1.2
  3 ---
  4 $id: http://devicetree.org/schemas/spi/sprd,spi-adi.yaml#
  5 $schema: http://devicetree.org/meta-schemas/core.yaml#
  6 
  7 title: Spreadtrum ADI controller
  8 
  9 maintainers:
 10   - Orson Zhai <orsonzhai@gmail.com>
 11   - Baolin Wang <baolin.wang7@gmail.com>
 12   - Chunyan Zhang <zhang.lyra@gmail.com>
 13 
 14 description: |
 15   ADI is the abbreviation of Anolog-Digital interface, which is used to access
 16   analog chip (such as PMIC) from digital chip. ADI controller follows the SPI
 17   framework for its hardware implementation is alike to SPI bus and its timing
 18   is compatile to SPI timing.
 19 
 20   ADI controller has 50 channels including 2 software read/write channels and
 21   48 hardware channels to access analog chip. For 2 software read/write channels,
 22   users should set ADI registers to access analog chip. For hardware channels,
 23   we can configure them to allow other hardware components to use it independently,
 24   which means we can just link one analog chip address to one hardware channel,
 25   then users can access the mapped analog chip address by this hardware channel
 26   triggered by hardware components instead of ADI software channels.
 27 
 28   Thus we introduce one property named "sprd,hw-channels" to configure hardware
 29   channels, the first value specifies the hardware channel id which is used to
 30   transfer data triggered by hardware automatically, and the second value specifies
 31   the analog chip address where user want to access by hardware components.
 32 
 33   Since we have multi-subsystems will use unique ADI to access analog chip, when
 34   one system is reading/writing data by ADI software channels, that should be under
 35   one hardware spinlock protection to prevent other systems from reading/writing
 36   data by ADI software channels at the same time, or two parallel routine of setting
 37   ADI registers will make ADI controller registers chaos to lead incorrect results.
 38   Then we need one hardware spinlock to synchronize between the multiple subsystems.
 39 
 40   The new version ADI controller supplies multiple master channels for different
 41   subsystem accessing, that means no need to add hardware spinlock to synchronize,
 42   thus change the hardware spinlock support to be optional to keep backward
 43   compatibility.
 44 
 45 allOf:
 46   - $ref: /schemas/spi/spi-controller.yaml#
 47 
 48 properties:
 49   compatible:
 50     enum:
 51       - sprd,sc9860-adi
 52       - sprd,sc9863-adi
 53       - sprd,ums512-adi
 54 
 55   reg:
 56     maxItems: 1
 57 
 58   hwlocks:
 59     maxItems: 1
 60 
 61   hwlock-names:
 62     const: adi
 63 
 64   sprd,hw-channels:
 65     $ref: /schemas/types.yaml#/definitions/uint32-matrix
 66     description: A list of hardware channels
 67     minItems: 1
 68     maxItems: 48
 69     items:
 70       items:
 71         - description: The hardware channel id which is used to transfer data
 72             triggered by hardware automatically, channel id 0-1 are for software
 73             use, 2-49 are hardware channels.
 74           minimum: 2
 75           maximum: 49
 76         - description: The analog chip address where user want to access by
 77             hardware components.
 78 
 79 required:
 80   - compatible
 81   - reg
 82   - '#address-cells'
 83   - '#size-cells'
 84 
 85 unevaluatedProperties: false
 86 
 87 examples:
 88   - |
 89     aon {
 90         #address-cells = <2>;
 91         #size-cells = <2>;
 92 
 93         adi_bus: spi@40030000 {
 94             compatible = "sprd,sc9860-adi";
 95             reg = <0 0x40030000 0 0x10000>;
 96             hwlocks = <&hwlock1 0>;
 97             hwlock-names = "adi";
 98             #address-cells = <1>;
 99             #size-cells = <0>;
100             sprd,hw-channels = <30 0x8c20>;
101         };
102     };
103 ...

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php