From be197a35d857807066f096c8d96ac3198356698f Mon Sep 17 00:00:00 2001 From: Phil Elwell Date: Wed, 16 Aug 2017 16:52:50 +0100 Subject: [PATCH] BCM270X_DT: Set spidev spi-max-frequency to 125MHz 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: https://github.com/raspberrypi/linux/issues/2165 Signed-off-by: Phil Elwell --- arch/arm/boot/dts/bcm2708-rpi-0-w.dts | 4 ++-- arch/arm/boot/dts/bcm2708-rpi-b-plus.dts | 4 ++-- arch/arm/boot/dts/bcm2708-rpi-b.dts | 4 ++-- arch/arm/boot/dts/bcm2708-rpi-cm.dts | 4 ++-- arch/arm/boot/dts/bcm2709-rpi-2-b.dts | 4 ++-- arch/arm/boot/dts/bcm2710-rpi-3-b.dts | 4 ++-- arch/arm/boot/dts/bcm2710-rpi-cm3.dts | 4 ++-- arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts | 2 +- arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts | 4 ++-- arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts | 6 +++--- arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts | 2 +- arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts | 4 ++-- arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts | 6 +++--- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/arch/arm/boot/dts/bcm2708-rpi-0-w.dts b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts index a6ef9ee67ef8ca..8299f8a4e2a436 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-0-w.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-0-w.dts @@ -101,7 +101,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; spidev1: spidev@1{ @@ -109,7 +109,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts index 373bfd02786c6d..31db4fd917a40d 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts @@ -53,7 +53,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; spidev1: spidev@1{ @@ -61,7 +61,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts index 7e5151ad52a661..ffe5d14feb9f67 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-b.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts @@ -53,7 +53,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; spidev1: spidev@1{ @@ -61,7 +61,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; }; diff --git a/arch/arm/boot/dts/bcm2708-rpi-cm.dts b/arch/arm/boot/dts/bcm2708-rpi-cm.dts index 935867a7bb46ad..0b0d23256edd74 100644 --- a/arch/arm/boot/dts/bcm2708-rpi-cm.dts +++ b/arch/arm/boot/dts/bcm2708-rpi-cm.dts @@ -52,7 +52,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; spidev1: spidev@1{ @@ -60,7 +60,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; }; diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts index 434c451928b483..b7d48347066597 100644 --- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts +++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts @@ -53,7 +53,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; spidev1: spidev@1{ @@ -61,7 +61,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; }; diff --git a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts index e032516ffd351a..a72c2fed5c5244 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-3-b.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-3-b.dts @@ -125,7 +125,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; spidev1: spidev@1{ @@ -133,7 +133,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; }; diff --git a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts index a84552eca6a54d..2500641c14dc3f 100644 --- a/arch/arm/boot/dts/bcm2710-rpi-cm3.dts +++ b/arch/arm/boot/dts/bcm2710-rpi-cm3.dts @@ -70,7 +70,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; spidev1: spidev@1{ @@ -78,7 +78,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; }; }; diff --git a/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts index 71c243947004fa..c3d4f96b7aa92c 100644 --- a/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts +++ b/arch/arm/boot/dts/overlays/spi1-1cs-overlay.dts @@ -36,7 +36,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; }; diff --git a/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts index 2ae0885cf1e7fb..2ad62497dc895c 100644 --- a/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts +++ b/arch/arm/boot/dts/overlays/spi1-2cs-overlay.dts @@ -36,7 +36,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; @@ -45,7 +45,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; }; diff --git a/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts b/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts index 8f79044cd8f47e..ef82890453bfe3 100644 --- a/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts +++ b/arch/arm/boot/dts/overlays/spi1-3cs-overlay.dts @@ -36,7 +36,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; @@ -45,7 +45,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; @@ -54,7 +54,7 @@ reg = <2>; /* CE2 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; }; diff --git a/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts index 6f57bc710fe123..761b6be4ff9b55 100644 --- a/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts +++ b/arch/arm/boot/dts/overlays/spi2-1cs-overlay.dts @@ -36,7 +36,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; }; diff --git a/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts index d090631d36821b..e533aba113dedd 100644 --- a/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts +++ b/arch/arm/boot/dts/overlays/spi2-2cs-overlay.dts @@ -36,7 +36,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; @@ -45,7 +45,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; }; diff --git a/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts b/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts index e2586728c31182..a62e107dc98fa4 100644 --- a/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts +++ b/arch/arm/boot/dts/overlays/spi2-3cs-overlay.dts @@ -36,7 +36,7 @@ reg = <0>; /* CE0 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; @@ -45,7 +45,7 @@ reg = <1>; /* CE1 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; @@ -54,7 +54,7 @@ reg = <2>; /* CE2 */ #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <500000>; + spi-max-frequency = <125000000>; status = "okay"; }; };