Thread (1 message) 1 message, 1 author, 2022-02-15

Re: [PATCH v2 05/10] arch: arm: dts: bletchley: switch to spi-gpio for spi2

flat view

From: Joel Stanley <joel@jms.id.au>
Date: 2022-02-15 05:48:53
Also in: linux-aspeed, linux-devicetree, lkml

On Mon, 14 Feb 2022 at 04:26, Potin Lai [off-list ref] wrote:
quoted hunk
Switch to spi-gpio driver to avoid unstable signal issue with EVT HW

Signed-off-by: Potin Lai <redacted>
---
 arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
index b01f1e7adb81..3c54e4a892c9 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts
@@ -227,8 +227,16 @@

 &spi2 {
        status = "okay";
-       pinctrl-names = "default";
-       pinctrl-0 = <&pinctrl_spi2_default>;
+
+       compatible = "spi-gpio";
This is a bit strange. You're effectively rewriting the node with a new one.

It would make more sense to leave spi2 disabled (the default), and add
a new node:

 spi {
   compatible = "spi-gpio";
   #address-cells = <1>;
   #size-cells = <0>;
   gpio-sck = <&gpio0 ASPEED_GPIO(X, 3) GPIO_ACTIVE_HIGH>;
   gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;
   gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;
   num-chipselects = <1>;
  cs-gpios = <&gpio0 ASPEED_GPIO(X, 0) GPIO_ACTIVE_LOW>;

   flash@0 {
       status = "okay";

etc.

Your new spi node doesn't need the pinctrl or clock properties.
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       gpio-sck = <&gpio0 ASPEED_GPIO(X, 3) GPIO_ACTIVE_HIGH>;
+       gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;
+       gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;
+       num-chipselects = <1>;
+       cs-gpios = <&gpio0 ASPEED_GPIO(X, 0) GPIO_ACTIVE_LOW>;

        flash@0 {
                status = "okay";
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help