← Documents Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Marvell MVEBU Device Bus

Marvell Device Bus의 MBUS 주소 창과 피코초 단위 읽기·쓰기 timing 바인딩입니다.

Source pathDocumentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

mvebu-devbus.txt:1-177

keep-config 예외, chip-select 레지스터와 16MiB NOR partition 예제를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 Device tree bindings for MVEBU Device Bus controllers
2
3 The Device Bus controller available in some Marvell's SoC allows to control
4 different types of standard memory and I/O devices such as NOR, NAND, and FPGA.
5 The actual devices are instantiated from the child nodes of a Device Bus node.
6
7 Required properties:
8
9 - compatible: Armada 370/XP SoC are supported using the
10 "marvell,mvebu-devbus" compatible string.
11
12 Orion5x SoC are supported using the
13 "marvell,orion-devbus" compatible string.
14
15 - reg: A resource specifier for the register space.
16 This is the base address of a chip select within
17 the controller's register space.
18 (see the example below)
19
20 - #address-cells: Must be set to 1
21 - #size-cells: Must be set to 1
22 - ranges: Must be set up to reflect the memory layout with four
23 integer values for each chip-select line in use:
24 0 <physical address of mapping> <size>
25
26 Optional properties:
27
28 - devbus,keep-config This property can optionally be used to keep
29 using the timing parameters set by the
30 bootloader. It makes all the timing properties
31 described below unused.
32
33 Timing properties for child nodes:
34
35 Read parameters:
36
37 - devbus,turn-off-ps: Defines the time during which the controller does not
38 drive the AD bus after the completion of a device read.
39 This prevents contentions on the Device Bus after a read
40 cycle from a slow device.
41 Mandatory, except if devbus,keep-config is used.
42
43 - devbus,bus-width: Defines the bus width, in bits (e.g. <16>).
44 Mandatory, except if devbus,keep-config is used.
45
46 - devbus,badr-skew-ps: Defines the time delay from from A[2:0] toggle,
47 to read data sample. This parameter is useful for
48 synchronous pipelined devices, where the address
49 precedes the read data by one or two cycles.
50 Mandatory, except if devbus,keep-config is used.
51
52 - devbus,acc-first-ps: Defines the time delay from the negation of
53 ALE[0] to the cycle that the first read data is sampled
54 by the controller.
55 Mandatory, except if devbus,keep-config is used.
56
57 - devbus,acc-next-ps: Defines the time delay between the cycle that
58 samples data N and the cycle that samples data N+1
59 (in burst accesses).
60 Mandatory, except if devbus,keep-config is used.
61
62 - devbus,rd-setup-ps: Defines the time delay between DEV_CSn assertion to
63 DEV_OEn assertion. If set to 0 (default),
64 DEV_OEn and DEV_CSn are asserted at the same cycle.
65 This parameter has no affect on <acc-first-ps> parameter
66 (no affect on first data sample). Set <rd-setup-ps>
67 to a value smaller than <acc-first-ps>.
68 Mandatory for "marvell,mvebu-devbus" compatible string,
69 except if devbus,keep-config is used.
70
71 - devbus,rd-hold-ps: Defines the time between the last data sample to the
72 de-assertion of DEV_CSn. If set to 0 (default),
73 DEV_OEn and DEV_CSn are de-asserted at the same cycle
74 (the cycle of the last data sample).
75 This parameter has no affect on DEV_OEn de-assertion.
76 DEV_OEn is always de-asserted the next cycle after
77 last data sampled. Also this parameter has no
78 affect on <turn-off-ps> parameter.
79 Set <rd-hold-ps> to a value smaller than <turn-off-ps>.
80 Mandatory for "marvell,mvebu-devbus" compatible string,
81 except if devbus,keep-config is used.
82
83 Write parameters:
84
85 - devbus,ale-wr-ps: Defines the time delay from the ALE[0] negation cycle
86 to the DEV_WEn assertion.
87 Mandatory.
88
89 - devbus,wr-low-ps: Defines the time during which DEV_WEn is active.
90 A[2:0] and Data are kept valid as long as DEV_WEn
91 is active. This parameter defines the setup time of
92 address and data to DEV_WEn rise.
93 Mandatory.
94
95 - devbus,wr-high-ps: Defines the time during which DEV_WEn is kept
96 inactive (high) between data beats of a burst write.
97 DEV_A[2:0] and Data are kept valid (do not toggle) for
98 <wr-high-ps> - <tick> ps.
99 This parameter defines the hold time of address and
100 data after DEV_WEn rise.
101 Mandatory.
102
103 - devbus,sync-enable: Synchronous device enable.
104 1: True
105 0: False
106 Mandatory for "marvell,mvebu-devbus" compatible string,
107 except if devbus,keep-config is used.
108
109 An example for an Armada XP GP board, with a 16 MiB NOR device as child
110 is showed below. Note that the Device Bus driver is in charge of allocating
111 the mbus address decoding window for each of its child devices.
112 The window is created using the chip select specified in the child
113 device node together with the base address and size specified in the ranges
114 property. For instance, in the example below the allocated decoding window
115 will start at base address 0xf0000000, with a size 0x1000000 (16 MiB)
116 for chip select 0 (a.k.a DEV_BOOTCS).
117
118 This address window handling is done in this mvebu-devbus only as a temporary
119 solution. It will be removed when the support for mbus device tree binding is
120 added.
121
122 The reg property implicitly specifies the chip select as this:
123
124 0x10400: DEV_BOOTCS
125 0x10408: DEV_CS0
126 0x10410: DEV_CS1
127 0x10418: DEV_CS2
128 0x10420: DEV_CS3
129
130 Example:
131
132 devbus-bootcs@d0010400 {
133 ranges = <0 0xf0000000 0x1000000>; /* @addr 0xf0000000, size 0x1000000 */
134 #address-cells = <1>;
135 #size-cells = <1>;
136
137 /* Device Bus parameters are required */
138
139 /* Read parameters */
140 devbus,bus-width = <8>;
141 devbus,turn-off-ps = <60000>;
142 devbus,badr-skew-ps = <0>;
143 devbus,acc-first-ps = <124000>;
144 devbus,acc-next-ps = <248000>;
145 devbus,rd-setup-ps = <0>;
146 devbus,rd-hold-ps = <0>;
147
148 /* Write parameters */
149 devbus,sync-enable = <0>;
150 devbus,wr-high-ps = <60000>;
151 devbus,wr-low-ps = <60000>;
152 devbus,ale-wr-ps = <60000>;
153
154 flash@0 {
155 compatible = "cfi-flash";
156
157 /* 16 MiB */
158 reg = <0 0x1000000>;
159 bank-width = <2>;
160 #address-cells = <1>;
161 #size-cells = <1>;
162
163 /*
164 * We split the 16 MiB in two partitions,
165 * just as an example.
166 */
167 partition@0 {
168 label = "First";
169 reg = <0 0x800000>;
170 };
171
172 partition@800000 {
173 label = "Second";
174 reg = <0x800000 0x800000>;
175 };
176 };
177 };
178

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

MVEBU Device Bus 컨트롤러

1-6

일부 Marvell SoC의 Device Bus 컨트롤러는 NOR, NAND, FPGA 같은 표준 메모리와 I/O 장치를 제어합니다. 실제 장치는 Device Bus 노드의 자식 노드로 인스턴스화합니다.

MVEBU Device Bus 주소 창
Child reg chip selectDevice Bus controller
ranges base and sizeMBUS decoding window
Read/write timingNOR / NAND / FPGA child

자식의 chip select와 ranges의 기준 주소·크기로 MBUS decoding window를 구성합니다.

필수 컨트롤러 속성

7-25

Armada 370/XP SoC는 `marvell,mvebu-devbus`, Orion5x SoC는 `marvell,orion-devbus` 호환 문자열을 사용합니다. `reg`는 레지스터 공간 자원 지정자이며 컨트롤러 레지스터 공간 안에서 chip select의 기준 주소를 나타냅니다.

`#address-cells`와 `#size-cells`는 모두 1이어야 합니다. `ranges`에는 사용 중인 chip-select 선마다 `0 <mapping physical address> <size>`를 나타내는 네 정수 값을 두어 메모리 배치를 반영해야 합니다. 원문의 첫 0을 포함한 cell 배열 형식은 아래 예제에서 확인할 수 있습니다.

부트로더 timing 유지

26-32

선택적인 `devbus,keep-config`를 사용하면 부트로더가 설정한 timing 매개변수를 계속 사용합니다. 이때 아래에 설명하는 모든 timing 속성은 사용되지 않습니다.

자식 노드의 읽기 timing

33-82

`devbus,turn-off-ps`는 장치 읽기 완료 후 컨트롤러가 AD 버스를 구동하지 않는 시간입니다. 느린 장치의 읽기 cycle 뒤 Device Bus 경합을 막습니다. `devbus,bus-width`는 비트 단위 버스 폭입니다. 두 속성은 `devbus,keep-config` 사용 시를 제외하고 필수입니다.

`devbus,badr-skew-ps`는 A[2:0] 전환부터 읽기 데이터 sample까지의 지연입니다. 주소가 읽기 데이터보다 한두 cycle 앞서는 동기식 pipeline 장치에 유용합니다. `devbus,acc-first-ps`는 ALE[0] negation부터 컨트롤러가 첫 읽기 데이터를 sample하는 cycle까지의 지연입니다. `devbus,acc-next-ps`는 burst 접근에서 데이터 N과 N+1을 sample하는 cycle 사이 지연입니다. 세 값 모두 `keep-config`가 없으면 필수입니다.

`devbus,rd-setup-ps`는 DEV_CSn assertion부터 DEV_OEn assertion까지의 지연입니다. 0이면 둘을 같은 cycle에 assertion합니다. 이 값은 `acc-first-ps`와 첫 데이터 sample에 영향을 주지 않으며 `acc-first-ps`보다 작아야 합니다. `marvell,mvebu-devbus`에서는 `keep-config`가 없을 때 필수입니다.

`devbus,rd-hold-ps`는 마지막 데이터 sample부터 DEV_CSn de-assertion까지의 시간입니다. 0이면 마지막 sample cycle에 DEV_OEn과 DEV_CSn을 함께 de-assertion합니다. DEV_OEn 자체는 항상 마지막 sample 다음 cycle에 de-assertion되며 이 값은 `turn-off-ps`에 영향을 주지 않습니다. `rd-hold-ps`는 `turn-off-ps`보다 작아야 하고 `marvell,mvebu-devbus`에서 `keep-config`가 없으면 필수입니다.

Device Bus 읽기 timing 제약
속성기준 구간제약
turn-off-psread 완료 뒤 AD 비구동contention 방지
badr-skew-psA[2:0] toggle -> samplepipeline 장치
acc-first-psALE[0] negation -> first sample첫 접근
acc-next-pssample N -> sample N+1burst 접근
rd-setup-psDEV_CSn -> DEV_OEn assertion< acc-first-ps
rd-hold-pslast sample -> DEV_CSn off< turn-off-ps

모든 시간 값은 피코초이며 keep-config를 사용하면 컨트롤러가 부트로더 값을 유지합니다.

쓰기 timing과 동기 모드

83-108

`devbus,ale-wr-ps`는 ALE[0] negation cycle부터 DEV_WEn assertion까지의 지연이며 필수입니다. `devbus,wr-low-ps`는 DEV_WEn이 active인 시간으로, 이 동안 A[2:0]과 Data가 유효하게 유지됩니다. 이 값은 DEV_WEn 상승에 대한 주소와 데이터 setup time을 정의하며 필수입니다.

`devbus,wr-high-ps`는 burst write의 data beat 사이에서 DEV_WEn을 inactive(high)로 유지하는 시간입니다. DEV_A[2:0]과 Data는 `<wr-high-ps> - <tick>` 피코초 동안 전환 없이 유효하며, 이 값은 DEV_WEn 상승 뒤 주소와 데이터 hold time을 정의합니다. 이 속성도 필수입니다.

`devbus,sync-enable`은 동기 장치 활성화 값으로 1은 참, 0은 거짓입니다. `marvell,mvebu-devbus`에서는 `devbus,keep-config`를 사용하지 않을 때 필수입니다.

MBUS decoding window

109-120

Armada XP GP 보드 예제는 16MiB NOR 자식 장치를 사용합니다. Device Bus 드라이버는 각 자식 장치의 MBUS address decoding window를 할당합니다. 자식 노드의 chip select와 `ranges`의 기준 주소 및 크기를 결합해 창을 만듭니다.

예제에서는 chip select 0, 즉 `DEV_BOOTCS`에 대해 기준 주소 `0xf0000000`, 크기 `0x1000000`(16MiB)의 창을 할당합니다. 이 주소 창 처리는 MBUS 장치 트리 바인딩 지원이 추가될 때까지 `mvebu-devbus`에만 존재하는 임시 해결책이며 이후 제거될 예정입니다.

reg 주소와 chip select

121-129

`reg` 속성은 chip select를 암묵적으로 지정합니다.

MVEBU Device Bus chip-select 레지스터
reg offsetChip select
0x10400DEV_BOOTCS
0x10408DEV_CS0
0x10410DEV_CS1
0x10418DEV_CS2
0x10420DEV_CS3

레지스터 offset이 선택하는 boot 및 일반 chip-select 선입니다.

16MiB NOR와 두 partition 예제

130-177

boot chip-select 노드는 `0xf0000000`에 16MiB 창을 만들고 8비트 Device Bus를 구성합니다. 읽기 timing은 turn-off 60000ps, address skew 0, first access 124000ps, next access 248000ps이며 read setup과 hold는 0입니다. 쓰기 timing 세 값은 모두 60000ps이고 동기 모드는 끕니다.

CFI flash 자식은 16MiB 영역과 bank 폭 2를 사용합니다. 예시로 전체 공간을 각각 8MiB인 `First`, `Second` 두 partition으로 나눕니다.

devbus-bootcs@d0010400 {
        ranges = <0 0xf0000000 0x1000000>; /* @addr 0xf0000000, size 0x1000000 */
        #address-cells = <1>;
        #size-cells = <1>;

        /* Device Bus parameters are required */

        /* Read parameters */
        devbus,bus-width    = <8>;
        devbus,turn-off-ps  = <60000>;
        devbus,badr-skew-ps = <0>;
        devbus,acc-first-ps = <124000>;
        devbus,acc-next-ps  = <248000>;
        devbus,rd-setup-ps  = <0>;
        devbus,rd-hold-ps   = <0>;

        /* Write parameters */
        devbus,sync-enable = <0>;
        devbus,wr-high-ps  = <60000>;
        devbus,wr-low-ps   = <60000>;
        devbus,ale-wr-ps   = <60000>;

        flash@0 {
                compatible = "cfi-flash";

                /* 16 MiB */
                reg = <0 0x1000000>;
                bank-width = <2>;
                #address-cells = <1>;
                #size-cells = <1>;

                /*
                 * We split the 16 MiB in two partitions,
                 * just as an example.
                 */
                partition@0 {
                        label = "First";
                        reg = <0 0x800000>;
                };

                partition@800000 {
                        label = "Second";
                        reg = <0x800000 0x800000>;
                };
        };
};