xref: /freebsd/sys/contrib/device-tree/Bindings/spi/amlogic,meson-gx-spicc.yaml (revision cb7aa33ac6cd46a5434798e50363136e64f3ae98)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2c66ec88fSEmmanuel Vadot# Copyright 2019 BayLibre, SAS
3c66ec88fSEmmanuel Vadot%YAML 1.2
4c66ec88fSEmmanuel Vadot---
5*cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/spi/amlogic,meson-gx-spicc.yaml#
6*cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7c66ec88fSEmmanuel Vadot
8c66ec88fSEmmanuel Vadottitle: Amlogic Meson SPI Communication Controller
9c66ec88fSEmmanuel Vadot
10c66ec88fSEmmanuel Vadotmaintainers:
11b97ee269SEmmanuel Vadot  - Neil Armstrong <neil.armstrong@linaro.org>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotdescription: |
14c66ec88fSEmmanuel Vadot  The Meson SPICC is a generic SPI controller for general purpose Full-Duplex
15c66ec88fSEmmanuel Vadot  communications with dedicated 16 words RX/TX PIO FIFOs.
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadotproperties:
18c66ec88fSEmmanuel Vadot  compatible:
19c66ec88fSEmmanuel Vadot    enum:
20c66ec88fSEmmanuel Vadot      - amlogic,meson-gx-spicc # SPICC controller on Amlogic GX and compatible SoCs
21c66ec88fSEmmanuel Vadot      - amlogic,meson-axg-spicc # SPICC controller on Amlogic AXG and compatible SoCs
22c66ec88fSEmmanuel Vadot      - amlogic,meson-g12a-spicc # SPICC controller on Amlogic G12A and compatible SoCs
23c66ec88fSEmmanuel Vadot
24c66ec88fSEmmanuel Vadot  interrupts:
25c66ec88fSEmmanuel Vadot    maxItems: 1
26c66ec88fSEmmanuel Vadot
27c66ec88fSEmmanuel Vadot  reg:
28c66ec88fSEmmanuel Vadot    maxItems: 1
29c66ec88fSEmmanuel Vadot
30c66ec88fSEmmanuel Vadot  resets:
31c66ec88fSEmmanuel Vadot    maxItems: 1
32c66ec88fSEmmanuel Vadot
33c66ec88fSEmmanuel Vadot  clocks:
34c66ec88fSEmmanuel Vadot    minItems: 1
35c66ec88fSEmmanuel Vadot    items:
36c66ec88fSEmmanuel Vadot      - description: controller register bus clock
37c66ec88fSEmmanuel Vadot      - description: baud rate generator and delay control clock
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel Vadot  clock-names:
40c66ec88fSEmmanuel Vadot    minItems: 1
41c66ec88fSEmmanuel Vadot    maxItems: 2
42c66ec88fSEmmanuel Vadot
438bab661aSEmmanuel VadotallOf:
44*cb7aa33aSEmmanuel Vadot  - $ref: spi-controller.yaml#
458bab661aSEmmanuel Vadot  - if:
46c66ec88fSEmmanuel Vadot      properties:
47c66ec88fSEmmanuel Vadot        compatible:
48c66ec88fSEmmanuel Vadot          contains:
49c66ec88fSEmmanuel Vadot            enum:
50c66ec88fSEmmanuel Vadot              - amlogic,meson-g12a-spicc
51c66ec88fSEmmanuel Vadot
52c66ec88fSEmmanuel Vadot    then:
53c66ec88fSEmmanuel Vadot      properties:
54c66ec88fSEmmanuel Vadot        clocks:
55c66ec88fSEmmanuel Vadot          minItems: 2
56c66ec88fSEmmanuel Vadot
57c66ec88fSEmmanuel Vadot        clock-names:
58c66ec88fSEmmanuel Vadot          items:
59c66ec88fSEmmanuel Vadot            - const: core
60c66ec88fSEmmanuel Vadot            - const: pclk
61c66ec88fSEmmanuel Vadot
62c66ec88fSEmmanuel Vadot    else:
63c66ec88fSEmmanuel Vadot      properties:
64c66ec88fSEmmanuel Vadot        clocks:
65c66ec88fSEmmanuel Vadot          maxItems: 1
66c66ec88fSEmmanuel Vadot
67c66ec88fSEmmanuel Vadot        clock-names:
68c66ec88fSEmmanuel Vadot          items:
69c66ec88fSEmmanuel Vadot            - const: core
70c66ec88fSEmmanuel Vadot
718bab661aSEmmanuel Vadot  - if:
728bab661aSEmmanuel Vadot      properties:
738bab661aSEmmanuel Vadot        compatible:
748bab661aSEmmanuel Vadot          contains:
758bab661aSEmmanuel Vadot            enum:
768bab661aSEmmanuel Vadot              - amlogic,meson-gx-spicc
778bab661aSEmmanuel Vadot
788bab661aSEmmanuel Vadot    then:
798bab661aSEmmanuel Vadot      properties:
808bab661aSEmmanuel Vadot        pinctrl-0: true
818bab661aSEmmanuel Vadot        pinctrl-1: true
828bab661aSEmmanuel Vadot        pinctrl-2: true
838bab661aSEmmanuel Vadot
848bab661aSEmmanuel Vadot        pinctrl-names:
858bab661aSEmmanuel Vadot          minItems: 1
868bab661aSEmmanuel Vadot          items:
878bab661aSEmmanuel Vadot            - const: default
888bab661aSEmmanuel Vadot            - const: idle-high
898bab661aSEmmanuel Vadot            - const: idle-low
908bab661aSEmmanuel Vadot
91c66ec88fSEmmanuel Vadotrequired:
92c66ec88fSEmmanuel Vadot  - compatible
93c66ec88fSEmmanuel Vadot  - reg
94c66ec88fSEmmanuel Vadot  - interrupts
95c66ec88fSEmmanuel Vadot  - clocks
96c66ec88fSEmmanuel Vadot  - clock-names
97c66ec88fSEmmanuel Vadot
986be33864SEmmanuel VadotunevaluatedProperties: false
996be33864SEmmanuel Vadot
100c66ec88fSEmmanuel Vadotexamples:
101c66ec88fSEmmanuel Vadot  - |
102c66ec88fSEmmanuel Vadot    spi@c1108d80 {
103c66ec88fSEmmanuel Vadot        compatible = "amlogic,meson-gx-spicc";
104c66ec88fSEmmanuel Vadot        reg = <0xc1108d80 0x80>;
105c66ec88fSEmmanuel Vadot        interrupts = <112>;
106c66ec88fSEmmanuel Vadot        clocks = <&clk81>;
107c66ec88fSEmmanuel Vadot        clock-names = "core";
108c66ec88fSEmmanuel Vadot        #address-cells = <1>;
109c66ec88fSEmmanuel Vadot        #size-cells = <0>;
110c66ec88fSEmmanuel Vadot
1112eb4d8dcSEmmanuel Vadot        display@0 {
1122eb4d8dcSEmmanuel Vadot            compatible = "lg,lg4573";
113c66ec88fSEmmanuel Vadot            spi-max-frequency = <1000000>;
114c66ec88fSEmmanuel Vadot            reg = <0>;
115c66ec88fSEmmanuel Vadot        };
116c66ec88fSEmmanuel Vadot    };
117