Skip to content

Commit

Permalink
BCM270X_DT: Set spidev spi-max-frequency to 125MHz
Browse files Browse the repository at this point in the history
The BCM2835 SPI controllers have a maximum bus clock of half the system
clock speed, so with the 250MHz system clock found on Raspberry Pis
you get a theoretical maximum bus speed of 125MHz. Note that this
speed is unlikely to be reliable, and the maximum usable bus spee will
depend on both the attached device and the wiring.

See: raspberrypi#2165
Signed-off-by: Phil Elwell <[email protected]>
  • Loading branch information
Phil Elwell committed Nov 19, 2017
1 parent 62c9e18 commit be197a3
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/bcm2708-rpi-0-w.dts
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};

spidev1: spidev@1{
compatible = "spidev";
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};

spidev1: spidev@1{
compatible = "spidev";
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/bcm2708-rpi-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};

spidev1: spidev@1{
compatible = "spidev";
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/bcm2708-rpi-cm.dts
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};

spidev1: spidev@1{
compatible = "spidev";
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/bcm2709-rpi-2-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};

spidev1: spidev@1{
compatible = "spidev";
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/bcm2710-rpi-3-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};

spidev1: spidev@1{
compatible = "spidev";
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};
};

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/bcm2710-rpi-cm3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};

spidev1: spidev@1{
compatible = "spidev";
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
};
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};
};
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};

Expand All @@ -45,7 +45,7 @@
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};
};
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};

Expand All @@ -45,7 +45,7 @@
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};

Expand All @@ -54,7 +54,7 @@
reg = <2>; /* CE2 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};
};
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};

Expand All @@ -45,7 +45,7 @@
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};
};
Expand Down
6 changes: 3 additions & 3 deletions arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
reg = <0>; /* CE0 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};

Expand All @@ -45,7 +45,7 @@
reg = <1>; /* CE1 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};

Expand All @@ -54,7 +54,7 @@
reg = <2>; /* CE2 */
#address-cells = <1>;
#size-cells = <0>;
spi-max-frequency = <500000>;
spi-max-frequency = <125000000>;
status = "okay";
};
};
Expand Down

0 comments on commit be197a3

Please sign in to comment.