Skip to content

Commit

Permalink
add SPI RTC overlay
Browse files Browse the repository at this point in the history
This currently supports PCF2123 chips on SPI0.0
  • Loading branch information
Kriechi committed Jun 10, 2016
1 parent 627f91a commit 722adcd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ dtbo-$(RPI_DT_OVERLAYS) += smi.dtbo
dtbo-$(RPI_DT_OVERLAYS) += smi-dev.dtbo
dtbo-$(RPI_DT_OVERLAYS) += smi-nand.dtbo
dtbo-$(RPI_DT_OVERLAYS) += spi-gpio35-39.dtbo
dtbo-$(RPI_DT_OVERLAYS) += spi-rtc.dtbo
dtbo-$(RPI_DT_OVERLAYS) += spi1-1cs.dtbo
dtbo-$(RPI_DT_OVERLAYS) += spi1-2cs.dtbo
dtbo-$(RPI_DT_OVERLAYS) += spi1-3cs.dtbo
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,10 @@ Info: move SPI function block to GPIO 35 to 39
Load: dtoverlay=spi-gpio35-39
Params: <None>

Name: spi-rtc
Info: Adds support for a number of SPI Real Time Clock devices
Load: dtoverlay=spi-rtc,<param>=<val>
Params: pcf2123 Select the PCF2123 device

Name: spi1-1cs
Info: Enables spi1 with a single chip select (CS) line and associated spidev
Expand Down
31 changes: 31 additions & 0 deletions arch/arm/boot/dts/overlays/spi-rtc-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2708";

fragment@0 {
target = <&spidev0>;
__dormant__ {
status = "disabled";
};
};

fragment@1 {
target = <&spi0>;
__dormant__ {
#address-cells = <1>;
#size-cells = <0>;
rtc-pcf2123@0 {
compatible = "nxp,rtc-pcf2123";
spi-max-frequency = <5000000>;
spi-cs-high = <1>;
reg = <0>;
};
};
};

__overrides__ {
pcf2123 = <0>, "=0=1";
};
};

0 comments on commit 722adcd

Please sign in to comment.