diff mbox series

[v4] board/lx2160aqds: Update the DSPI status fixup

Message ID 20200108062954.42470-1-xiaowei.bao@nxp.com
State Accepted
Commit a393629c7c444ee57918d06fce61afb6d8d4eb0c
Headers show
Series [v4] board/lx2160aqds: Update the DSPI status fixup | expand

Commit Message

Xiaowei Bao Jan. 8, 2020, 6:29 a.m. UTC
The dts node of the DSPI controller in kernel is spi instead of dspi,
it is not correct if use "/soc/dspi@" to fix up the status of the dts
in kernel, so, modify it to "/soc/spi@".

The DSPI2 and I2C5 are muxed, and the status of DSPI2 node in kernel dts
default value is okay, So set the status of DSPI2 node in kernel dts to
disabled if it is muxed as I2C5.

Signed-off-by: Xiaowei Bao <xiaowei.bao at nxp.com>
---
v2:
 - Modify the subject and commit message.
v3:
 - Modify the Copyright.
v4:
 - Modify the commit message.

 board/freescale/lx2160a/lx2160a.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

Comments

Priyanka Jain Jan. 27, 2020, 6:03 a.m. UTC | #1
>-----Original Message-----
>From: Xiaowei Bao <xiaowei.bao at nxp.com>
>Sent: Wednesday, January 8, 2020 12:00 PM
>To: Priyanka Jain <priyanka.jain at nxp.com>; u-boot at lists.denx.de
>Cc: Xiaowei Bao <xiaowei.bao at nxp.com>
>Subject: [PATCH v4] board/lx2160aqds: Update the DSPI status fixup
>
>The dts node of the DSPI controller in kernel is spi instead of dspi, it is not
>correct if use "/soc/dspi@" to fix up the status of the dts in kernel, so, modify
>it to "/soc/spi@".
>
>The DSPI2 and I2C5 are muxed, and the status of DSPI2 node in kernel dts
>default value is okay, So set the status of DSPI2 node in kernel dts to disabled
>if it is muxed as I2C5.
>
>Signed-off-by: Xiaowei Bao <xiaowei.bao at nxp.com>
>---
patch applied in u-boot-fsl-qoriq/master
-priyankajain
diff mbox series

Patch

diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c
index eff5d9f..184e111 100644
--- a/board/freescale/lx2160a/lx2160a.c
+++ b/board/freescale/lx2160a/lx2160a.c
@@ -1,6 +1,6 @@ 
 // SPDX-License-Identifier: GPL-2.0+
 /*
- * Copyright 2018-2019 NXP
+ * Copyright 2018-2020 NXP
  */
 
 #include <common.h>
@@ -210,9 +210,9 @@  void esdhc_dspi_status_fixup(void *blob)
 {
 	const char esdhc0_path[] = "/soc/esdhc at 2140000";
 	const char esdhc1_path[] = "/soc/esdhc at 2150000";
-	const char dspi0_path[] = "/soc/dspi at 2100000";
-	const char dspi1_path[] = "/soc/dspi at 2110000";
-	const char dspi2_path[] = "/soc/dspi at 2120000";
+	const char dspi0_path[] = "/soc/spi at 2100000";
+	const char dspi1_path[] = "/soc/spi at 2110000";
+	const char dspi2_path[] = "/soc/spi at 2120000";
 
 	struct ccsr_gur __iomem *gur = (void *)(CONFIG_SYS_FSL_GUTS_ADDR);
 	u32 sdhc1_base_pmux;
@@ -262,10 +262,12 @@  void esdhc_dspi_status_fixup(void *blob)
 		& FSL_CHASSIS3_IIC5_PMUX_MASK;
 	iic5_pmux >>= FSL_CHASSIS3_IIC5_PMUX_SHIFT;
 
-	if (iic5_pmux == IIC5_PMUX_SPI3) {
+	if (iic5_pmux == IIC5_PMUX_SPI3)
 		do_fixup_by_path(blob, dspi2_path, "status", "okay",
 				 sizeof("okay"), 1);
-	}
+	else
+		do_fixup_by_path(blob, dspi2_path, "status", "disabled",
+				 sizeof("disabled"), 1);
 }
 #endif