xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/memory-controllers/exynos-srom.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/memory-controllers/exynos-srom.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: Samsung Exynos SoC SROM Controller driver
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - Krzysztof Kozlowski <krzk@kernel.org>
11*4882a593Smuzhiyun
12*4882a593Smuzhiyundescription: |+
13*4882a593Smuzhiyun  The SROM controller can be used to attach external peripherals. In this case
14*4882a593Smuzhiyun  extra properties, describing the bus behind it, should be specified.
15*4882a593Smuzhiyun
16*4882a593Smuzhiyunproperties:
17*4882a593Smuzhiyun  compatible:
18*4882a593Smuzhiyun    items:
19*4882a593Smuzhiyun      - const: samsung,exynos4210-srom
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun  reg:
22*4882a593Smuzhiyun    maxItems: 1
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun  "#address-cells":
25*4882a593Smuzhiyun    const: 2
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun  "#size-cells":
28*4882a593Smuzhiyun    const: 1
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun  ranges:
31*4882a593Smuzhiyun    description: |
32*4882a593Smuzhiyun      Reflects the memory layout with four integer values per bank. Format:
33*4882a593Smuzhiyun      <bank-number> 0 <parent address of bank> <size>
34*4882a593Smuzhiyun      Up to four banks are supported.
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunpatternProperties:
37*4882a593Smuzhiyun  "^.*@[0-3],[a-f0-9]+$":
38*4882a593Smuzhiyun    type: object
39*4882a593Smuzhiyun    description:
40*4882a593Smuzhiyun      The actual device nodes should be added as subnodes to the SROMc node.
41*4882a593Smuzhiyun      These subnodes, in addition to regular device specification, should
42*4882a593Smuzhiyun      contain the following properties, describing configuration
43*4882a593Smuzhiyun      of the relevant SROM bank.
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun    properties:
46*4882a593Smuzhiyun      reg:
47*4882a593Smuzhiyun        description:
48*4882a593Smuzhiyun          Bank number, base address (relative to start of the bank) and size
49*4882a593Smuzhiyun          of the memory mapped for the device. Note that base address will be
50*4882a593Smuzhiyun          typically 0 as this is the start of the bank.
51*4882a593Smuzhiyun        maxItems: 1
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun      reg-io-width:
54*4882a593Smuzhiyun        enum: [1, 2]
55*4882a593Smuzhiyun        description:
56*4882a593Smuzhiyun          Data width in bytes (1 or 2). If omitted, default of 1 is used.
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun      samsung,srom-page-mode:
59*4882a593Smuzhiyun        description:
60*4882a593Smuzhiyun          If page mode is set, 4 data page mode will be configured,
61*4882a593Smuzhiyun          else normal (1 data) page mode will be set.
62*4882a593Smuzhiyun        type: boolean
63*4882a593Smuzhiyun
64*4882a593Smuzhiyun      samsung,srom-timing:
65*4882a593Smuzhiyun        $ref: /schemas/types.yaml#/definitions/uint32-array
66*4882a593Smuzhiyun        items:
67*4882a593Smuzhiyun          minItems: 6
68*4882a593Smuzhiyun          maxItems: 6
69*4882a593Smuzhiyun        description: |
70*4882a593Smuzhiyun          Array of 6 integers, specifying bank timings in the following order:
71*4882a593Smuzhiyun          Tacp, Tcah, Tcoh, Tacc, Tcos, Tacs.
72*4882a593Smuzhiyun          Each value is specified in cycles and has the following meaning
73*4882a593Smuzhiyun          and valid range:
74*4882a593Smuzhiyun          Tacp: Page mode access cycle at Page mode (0 - 15)
75*4882a593Smuzhiyun          Tcah: Address holding time after CSn (0 - 15)
76*4882a593Smuzhiyun          Tcoh: Chip selection hold on OEn (0 - 15)
77*4882a593Smuzhiyun          Tacc: Access cycle (0 - 31, the actual time is N + 1)
78*4882a593Smuzhiyun          Tcos: Chip selection set-up before OEn (0 - 15)
79*4882a593Smuzhiyun          Tacs: Address set-up before CSn (0 - 15)
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun    required:
82*4882a593Smuzhiyun      - reg
83*4882a593Smuzhiyun      - samsung,srom-timing
84*4882a593Smuzhiyun
85*4882a593Smuzhiyunrequired:
86*4882a593Smuzhiyun  - compatible
87*4882a593Smuzhiyun  - reg
88*4882a593Smuzhiyun
89*4882a593SmuzhiyunadditionalProperties: false
90*4882a593Smuzhiyun
91*4882a593Smuzhiyunexamples:
92*4882a593Smuzhiyun  - |
93*4882a593Smuzhiyun    // Example: basic definition, no banks are configured
94*4882a593Smuzhiyun    memory-controller@12560000 {
95*4882a593Smuzhiyun        compatible = "samsung,exynos4210-srom";
96*4882a593Smuzhiyun        reg = <0x12560000 0x14>;
97*4882a593Smuzhiyun    };
98*4882a593Smuzhiyun
99*4882a593Smuzhiyun  - |
100*4882a593Smuzhiyun    // Example: SROMc with SMSC911x ethernet chip on bank 3
101*4882a593Smuzhiyun    memory-controller@12570000 {
102*4882a593Smuzhiyun        #address-cells = <2>;
103*4882a593Smuzhiyun        #size-cells = <1>;
104*4882a593Smuzhiyun        ranges = <0 0 0x04000000 0x20000   // Bank0
105*4882a593Smuzhiyun                  1 0 0x05000000 0x20000   // Bank1
106*4882a593Smuzhiyun                  2 0 0x06000000 0x20000   // Bank2
107*4882a593Smuzhiyun                  3 0 0x07000000 0x20000>; // Bank3
108*4882a593Smuzhiyun
109*4882a593Smuzhiyun        compatible = "samsung,exynos4210-srom";
110*4882a593Smuzhiyun        reg = <0x12570000 0x14>;
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun        ethernet@3,0 {
113*4882a593Smuzhiyun            compatible = "smsc,lan9115";
114*4882a593Smuzhiyun            reg = <3 0 0x10000>;     // Bank 3, offset = 0
115*4882a593Smuzhiyun            phy-mode = "mii";
116*4882a593Smuzhiyun            interrupt-parent = <&gpx0>;
117*4882a593Smuzhiyun            interrupts = <5 8>;
118*4882a593Smuzhiyun            reg-io-width = <2>;
119*4882a593Smuzhiyun            smsc,irq-push-pull;
120*4882a593Smuzhiyun            smsc,force-internal-phy;
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun            samsung,srom-page-mode;
123*4882a593Smuzhiyun            samsung,srom-timing = <9 12 1 9 1 1>;
124*4882a593Smuzhiyun        };
125*4882a593Smuzhiyun    };
126