← Documents Documentation/devicetree/bindings/rtc/maxim-ds1302.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / RTC

Maxim DS-1302 RTC

DS-1302의 MicroWire timing과 필수 SPI mode를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

maxim-ds1302.txt:1-46

장치의 연결 방식과 필수·선택 속성을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * Maxim/Dallas Semiconductor DS-1302 RTC
2
3 Simple device which could be used to store date/time between reboots.
4
5 The device uses the standard MicroWire half-duplex transfer timing.
6 Master output is set on low clock and sensed by the RTC on the rising
7 edge. Master input is set by the RTC on the trailing edge and is sensed
8 by the master on low clock.
9
10 Required properties:
11
12 - compatible : Should be "maxim,ds1302"
13
14 Required SPI properties:
15
16 - reg : Should be address of the device chip select within
17 the controller.
18
19 - spi-max-frequency : DS-1302 has 500 kHz if powered at 2.2V,
20 and 2MHz if powered at 5V.
21
22 - spi-3wire : The device has a shared signal IN/OUT line.
23
24 - spi-lsb-first : DS-1302 requires least significant bit first
25 transfers.
26
27 - spi-cs-high: DS-1302 has active high chip select line. This is
28 required unless inverted in hardware.
29
30 Example:
31
32 spi@901c {
33 #address-cells = <1>;
34 #size-cells = <0>;
35 compatible = "icpdas,lp8841-spi-rtc";
36 reg = <0x901c 0x1>;
37
38 rtc@0 {
39 compatible = "maxim,ds1302";
40 reg = <0>;
41 spi-max-frequency = <500000>;
42 spi-3wire;
43 spi-lsb-first;
44 spi-cs-high;
45 };
46 };
47

3. 한국어 전문 번역

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

Maxim DS-1302와 MicroWire

1-8

Maxim/Dallas DS-1302는 재부팅 사이에 날짜와 시간을 보관하는 간단한 RTC입니다.

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

필수 SPI 속성

9-28

`compatible`은 `maxim,ds1302`이고 `reg`는 controller 안의 device chip select 주소입니다.

`spi-max-frequency`는 2.2V 전원에서 500kHz, 5V 전원에서 2MHz입니다. IN/OUT 신호선을 공유하므로 `spi-3wire`를 지정하고 least significant bit를 먼저 전송하도록 `spi-lsb-first`를 지정합니다.

DS-1302의 chip select는 active high이므로 하드웨어에서 반전하지 않았다면 `spi-cs-high`가 필요합니다.

DS-1302 예제

29-46

예제는 `icpdas,lp8841-spi-rtc` controller의 chip select 0에 DS-1302를 연결하고 최대 주파수를 500000Hz로 설정합니다.

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;
        };
};