← Documents Documentation/devicetree/bindings/spi/icpdas-lp8841-spi-rtc.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / SPI

ICP DAS LP-8841 SPI controller for RTC

LP-8841의 DS-1302 RTC용 MicroWire timing과 slave flag 제약을 설명합니다.

Source pathDocumentation/devicetree/bindings/spi/icpdas-lp8841-spi-rtc.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

icpdas-lp8841-spi-rtc.txt:1-54

LP-8841의 DS-1302 RTC용 MicroWire timing과 slave flag 제약을 설명합니다. 접을 수 있는 영어 원문 전체와 줄 좌표를 보존하고, 한국어 전문 번역에서는 compatible·property·phandle·수치·예제 코드를 원형대로 유지합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * ICP DAS LP-8841 SPI Controller for RTC
2
3 ICP DAS LP-8841 contains a DS-1302 RTC. RTC is connected to an IO
4 memory register, which acts as an SPI master device.
5
6 The device uses the standard MicroWire half-duplex transfer timing.
7 Master output is set on low clock and sensed by the RTC on the rising
8 edge. Master input is set by the RTC on the trailing edge and is sensed
9 by the master on low clock.
10
11 Required properties:
12
13 - #address-cells: should be 1
14
15 - #size-cells: should be 0
16
17 - compatible: should be "icpdas,lp8841-spi-rtc"
18
19 - reg: should provide IO memory address
20
21 Requirements to SPI slave nodes:
22
23 - There can be only one slave device.
24
25 - The spi slave node should claim the following flags which are
26 required by the spi controller.
27
28 - spi-3wire: The master itself has only 3 wire. It cannor work in
29 full duplex mode.
30
31 - spi-cs-high: DS-1302 has active high chip select line. The master
32 doesn't support active low.
33
34 - spi-lsb-first: DS-1302 requires least significant bit first
35 transfers. The master only support this type of bit ordering.
36
37
38 Example:
39
40 spi@901c {
41 #address-cells = <1>;
42 #size-cells = <0>;
43 compatible = "icpdas,lp8841-spi-rtc";
44 reg = <0x901c 0x1>;
45
46 rtc@0 {
47 compatible = "maxim,ds1302";
48 reg = <0>;
49 spi-max-frequency = <500000>;
50 spi-3wire;
51 spi-lsb-first;
52 spi-cs-high;
53 };
54 };
55

3. 한국어 전문 번역

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

LP-8841 RTC SPI 구조와 전송 timing

1-10

ICP DAS LP-8841에는 DS-1302 RTC가 들어 있습니다. 이 RTC는 SPI master device처럼 동작하는 I/O memory register에 연결됩니다.

장치는 표준 MicroWire half-duplex 전송 timing을 사용합니다. Master output은 clock이 low일 때 설정되고 RTC가 rising edge에서 감지합니다. Master input은 RTC가 trailing edge에서 설정하며 master는 clock이 low일 때 이를 감지합니다.

Controller 필수 속성

11-20

`#address-cells`는 1, `#size-cells`는 0이어야 합니다. `compatible`은 `icpdas,lp8841-spi-rtc`이고 `reg`는 I/O memory address를 제공해야 합니다.

SPI slave 제약과 필수 flag

21-37

Slave device는 하나만 둘 수 있습니다. Slave node는 controller의 hardware 제약 때문에 `spi-3wire`, `spi-cs-high`, `spi-lsb-first` flag를 모두 선언해야 합니다.

Master 자체가 3-wire 방식이라 full-duplex mode로 동작할 수 없습니다. DS-1302의 chip-select는 active-high이며 master는 active-low를 지원하지 않습니다. DS-1302와 master 모두 least significant bit를 먼저 전송하는 bit ordering만 지원합니다.

LP-8841와 DS-1302 예제

38-54

예제는 I/O address `0x901c`에 controller를 두고 chip-select 0의 `maxim,ds1302` RTC를 500kHz 이하로 연결합니다. Slave에는 세 필수 flag가 모두 지정됩니다.

spi@901c {
        #address-cells = <1>;
        #size-cells = <0>;
        compatible = "icpdas,lp8841-spi-rtc";
        reg = <0x901c 0x1>;

        rtc@0 {
                compatible = "maxim,ds1302";
                reg = <0>;
                spi-max-frequency = <500000>;
                spi-3wire;
                spi-lsb-first;
                spi-cs-high;
        };
};