summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/spi/rockchip-sfc.yaml
blob: ac1503de0478d822dc0ecc2595a5580ba736f613 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/spi/rockchip-sfc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Rockchip Serial Flash Controller (SFC)

maintainers:
  - Heiko Stuebner <heiko@sntech.de>
  - Chris Morgan <macromorgan@hotmail.com>

allOf:
  - $ref: spi-controller.yaml#

properties:
  compatible:
    const: rockchip,sfc
    description:
      The rockchip sfc controller is a standalone IP with version register,
      and the driver can handle all the feature difference inside the IP
      depending on the version register.

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    items:
      - description: Bus Clock
      - description: Module Clock

  clock-names:
    items:
      - const: clk_sfc
      - const: hclk_sfc

  power-domains:
    maxItems: 1

  rockchip,sfc-no-dma:
    description: Disable DMA and utilize FIFO mode only
    type: boolean

patternProperties:
  "^flash@[0-3]$":
    type: object
    additionalProperties: true

    properties:
      reg:
        minimum: 0
        maximum: 3

required:
  - compatible
  - reg
  - interrupts
  - clocks
  - clock-names

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/px30-cru.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/px30-power.h>

    sfc: spi@ff3a0000 {
        compatible = "rockchip,sfc";
        reg = <0xff3a0000 0x4000>;
        interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&cru SCLK_SFC>, <&cru HCLK_SFC>;
        clock-names = "clk_sfc", "hclk_sfc";
        pinctrl-0 = <&sfc_clk &sfc_cs &sfc_bus2>;
        pinctrl-names = "default";
        power-domains = <&power PX30_PD_MMC_NAND>;
        #address-cells = <1>;
        #size-cells = <0>;

        flash@0 {
            compatible = "jedec,spi-nor";
            reg = <0>;
            spi-max-frequency = <108000000>;
            spi-rx-bus-width = <2>;
            spi-tx-bus-width = <2>;
        };
    };

...