Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77ef8a53 authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta
Browse files

bindings: Add snapshot of bindings with GPL-2.0 or BSD-2-Clause license

Add snapshot of the device-tree bindings' YAML files that has
GPL-2.0 or BSD-2-Clause license. The snapshot is taken from
Android Common Kernel's android-mainline branch as of commit-id
<b41e0f12> (ANDROID: update abi_gki_aarch64.xml for 5.2-rc5).

Change-Id: I03c75ed9aeec161dac792e18f5ab991a94de6dce
parent d9dfa145
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/calxeda.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Calxeda Platforms Device Tree Bindings

maintainers:
  - Rob Herring <robh@kernel.org>
description: |+
  Bindings for boards with Calxeda Cortex-A9 based ECX-1000 (Highbank) SOC
  or Cortex-A15 based ECX-2000 SOCs

properties:
  $nodename:
    const: '/'
  compatible:
    items:
      - enum:
          - calxeda,highbank
          - calxeda,ecx-2000
+170 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2018 Linaro Ltd.
%YAML 1.2
---
# All the top-level keys are standard json-schema keywords except for
# 'maintainers' and 'select'

# $id is a unique idenifier based on the filename. There may or may not be a
# file present at the URL.
$id: "http://devicetree.org/schemas/example-schema.yaml#"
# $schema is the meta-schema this schema should be validated with.
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: An example schema annotated with jsonschema details

maintainers:
  - Rob Herring <robh@kernel.org>

description: |
  A more detailed multi-line description of the binding.

  Details about the hardware device and any links to datasheets can go here.

  Literal blocks are marked with the '|' at the beginning. The end is marked by
  indentation less than the first line of the literal block. Lines also cannot
  begin with a tab character.

select: false
  # 'select' is a schema applied to a DT node to determine if this binding
  # schema should be applied to the node. It is optional and by default the
  # possible compatible strings are extracted and used to match.

  # In this case, a 'false' schema will never match.

properties:
  # A dictionary of DT properties for this binding schema
  compatible:
    # More complicated schema can use oneOf (XOR), anyOf (OR), or allOf (AND)
    # to handle different conditions.
    # In this case, it's needed to handle a variable number of values as there
    # isn't another way to express a constraint of the last string value.
    # The boolean schema must be a list of schemas.
    oneOf:
      - items:
          # items is a list of possible values for the property. The number of
          # values is determined by the number of elements in the list.
          # Order in lists is significant, order in dicts is not
          # Must be one of the 1st enums followed by the 2nd enum
          #
          # Each element in items should be 'enum' or 'const'
          - enum:
              - vendor,soc4-ip
              - vendor,soc3-ip
              - vendor,soc2-ip
          - enum:
              - vendor,soc1-ip
        # additionalItems being false is implied
        # minItems/maxItems equal to 2 is implied
      - items:
          # 'const' is just a special case of an enum with a single possible value
          - const: vendor,soc1-ip

  reg:
    # The core schema already checks that reg values are numbers, so device
    # specific schema don't need to do those checks.
    # The description of each element defines the order and implicitly defines
    # the number of reg entries.
    items:
      - description: core registers
      - description: aux registers
    # minItems/maxItems equal to 2 is implied

  reg-names:
    # The core schema enforces this is a string array
    items:
      - const: core
      - const: aux

  clocks:
    # Cases that have only a single entry just need to express that with maxItems
    maxItems: 1
    description: bus clock

  clock-names:
    items:
      - const: bus

  interrupts:
    # Either 1 or 2 interrupts can be present
    minItems: 1
    maxItems: 2
    items:
      - description: tx or combined interrupt
      - description: rx interrupt
    description:
      A variable number of interrupts warrants a description of what conditions
      affect the number of interrupts. Otherwise, descriptions on standard
      properties are not necessary.

  interrupt-names:
    # minItems must be specified here because the default would be 2
    minItems: 1
    maxItems: 2
    items:
      - const: tx irq
      - const: rx irq

  # Property names starting with '#' must be quoted
  '#interrupt-cells':
    # A simple case where the value must always be '2'.
    # The core schema handles that this must be a single integer.
    const: 2

  interrupt-controller: true
    # The core checks this is a boolean, so just have to list it here to be
    # valid for this binding.

  clock-frequency:
    # The type is set in the core schema. Per device schema only need to set
    # constraints on the possible values.
    minimum: 100
    maximum: 400000
    # The value that should be used if the property is not present
    default: 200

  foo-gpios:
    maxItems: 1
    description: A connection of the 'foo' gpio line.

  vendor,int-property:
    description: Vendor specific properties must have a description
    # 'allOf' is the json-schema way of subclassing a schema. Here the base
    # type schema is referenced and then additional constraints on the values
    # are added.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/uint32
      - enum: [2, 4, 6, 8, 10]

  vendor,bool-property:
    description: Vendor specific properties must have a description
    # boolean properties is one case where the json-schema 'type' keyword
    # can be used directly
    type: boolean

  vendor,string-array-property:
    description: Vendor specific properties should reference a type in the
      core schema.
    allOf:
      - $ref: /schemas/types.yaml#/definitions/string-array
      - items:
          - enum: [ foo, bar ]
          - enum: [ baz, boo ]

required:
  - compatible
  - reg
  - interrupts
  - interrupt-controller

examples:
  # Examples are now compiled with dtc
  - |
    node@1000 {
          compatible = "vendor,soc4-ip", "vendor,soc1-ip";
          reg = <0x1000 0x80>,
                <0x3000 0x80>;
          reg-names = "core", "aux";
          interrupts = <10>;
          interrupt-controller;
    };
+44 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 Linaro Ltd.
%YAML 1.2
---
$id: "http://devicetree.org/schemas/firmware/intel-ixp4xx-network-processing-engine.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Intel IXP4xx Network Processing Engine

maintainers:
  - Linus Walleij <linus.walleij@linaro.org>

description: |
  On the IXP4xx SoCs, the Network Processing Engine (NPE) is a small
  processor that can load a firmware to perform offloading of networking
  and crypto tasks. It also manages the MDIO bus to the ethernet PHYs
  on the IXP4xx platform. All IXP4xx platforms have three NPEs at
  consecutive memory locations. They are all included in the same
  device node since they are not independent of each other.

properties:
  compatible:
    oneOf:
      - items:
          - const: intel,ixp4xx-network-processing-engine

  reg:
    minItems: 3
    maxItems: 3
    items:
      - description: NPE0 register range
      - description: NPE1 register range
      - description: NPE2 register range

required:
  - compatible
  - reg

examples:
  - |
    npe@c8006000 {
         compatible = "intel,ixp4xx-network-processing-engine";
         reg = <0xc8006000 0x1000>, <0xc8007000 0x1000>, <0xc8008000 0x1000>;
    };
+54 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2018 Linaro Ltd.
%YAML 1.2
---
$id: "http://devicetree.org/schemas/interrupt/intel-ixp4xx-interrupt.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: Intel IXP4xx XScale Networking Processors Interrupt Controller

maintainers:
  - Linus Walleij <linus.walleij@linaro.org>

description: |
  This interrupt controller is found in the Intel IXP4xx processors.
  Some processors have 32 interrupts, some have up to 64 interrupts.
  The exact number of interrupts is determined from the compatible
  string.

  The distinct IXP4xx families with different interrupt controller
  variations are IXP42x, IXP43x, IXP45x and IXP46x. Those four
  families were the only ones to reach the developer and consumer
  market.

properties:
  compatible:
    items:
      - enum:
        - intel,ixp42x-interrupt
        - intel,ixp43x-interrupt
        - intel,ixp45x-interrupt
        - intel,ixp46x-interrupt

  reg:
    maxItems: 1

  interrupt-controller: true

  '#interrupt-cells':
    const: 2

required:
  - compatible
  - reg
  - interrupt-controller
  - '#interrupt-cells'

examples:
  - |
    intcon: interrupt-controller@c8003000 {
        compatible = "intel,ixp43x-interrupt";
        reg = <0xc8003000 0x100>;
        interrupt-controller;
        #interrupt-cells = <2>;
    };
+129 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/leds/backlight/lm3630a-backlight.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: TI LM3630A High-Efficiency Dual-String White LED

maintainers:
  - Lee Jones <lee.jones@linaro.org>
  - Daniel Thompson <daniel.thompson@linaro.org>
  - Jingoo Han <jingoohan1@gmail.com>

description: |
  The LM3630A is a current-mode boost converter which supplies the power and
  controls the current in up to two strings of 10 LEDs per string.
  https://www.ti.com/product/LM3630A

properties:
  compatible:
    const: ti,lm3630a

  reg:
    maxItems: 1

  ti,linear-mapping-mode:
    description: |
      Enable linear mapping mode. If disabled, then it will use exponential
      mapping mode in which the ramp up/down appears to have a more uniform
      transition to the human eye.
    type: boolean

required:
  - compatible
  - reg

patternProperties:
  "^led@[01]$":
    type: object
    description: |
      Properties for a string of connected LEDs.

    properties:
      reg:
        description: |
          The control bank that is used to program the two current sinks. The
          LM3630A has two control banks (A and B) and are represented as 0 or 1
          in this property. The two current sinks can be controlled
          independently with both banks, or bank A can be configured to control
          both sinks with the led-sources property.
        maxItems: 1
        minimum: 0
        maximum: 1

      label:
        maxItems: 1

      led-sources:
        allOf:
          - minItems: 1
            maxItems: 2
            items:
              minimum: 0
              maximum: 1

      default-brightness:
        description: Default brightness level on boot.
        minimum: 0
        maximum: 255

      max-brightness:
        description: Maximum brightness that is allowed during runtime.
        minimum: 0
        maximum: 255

    required:
      - reg

    additionalProperties: false

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        led-controller@38 {
                compatible = "ti,lm3630a";
                reg = <0x38>;

                #address-cells = <1>;
                #size-cells = <0>;

                led@0 {
                        reg = <0>;
                        led-sources = <0 1>;
                        label = "lcd-backlight";
                        default-brightness = <200>;
                        max-brightness = <255>;
                };
        };
    };
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;

        led-controller@38 {
                compatible = "ti,lm3630a";
                reg = <0x38>;

                #address-cells = <1>;
                #size-cells = <0>;

                led@0 {
                        reg = <0>;
                        default-brightness = <150>;
                        ti,linear-mapping-mode;
                };

                led@1 {
                        reg = <1>;
                        default-brightness = <225>;
                        ti,linear-mapping-mode;
                };
        };
    };
Loading