Skip to content

Commit

Permalink
BCM270X_DT: Add spi-rtc overlay on SPI0.0
Browse files Browse the repository at this point in the history
Initial version only supports PCF2123 RTC.

See: #1510
  • Loading branch information
Kriechi authored and popcornmix committed Jun 17, 2016
1 parent 64843df commit 6140217
Show file tree
Hide file tree
Showing 3 changed files with 40 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 @@ -77,6 +77,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
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,12 @@ 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
dev node. The gpio pin number for the CS line and spidev device node
Expand Down
33 changes: 33 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,33 @@
/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2708";

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

fragment@1 {
target = <&spi0>;
__dormant__ {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

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 6140217

Please sign in to comment.