Skip to contentSkip to conversation

board/fsl/lx2160ardb: enable flexcan

PATCH New Pankaj Bansal 2 participants 2 messages Jul 17, 2019 – Aug 22, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 board/fsl/lx2160ardb: enable flexcan

Flexcan in LX2160ARDB is controlled by FPGA register boardcfg4 bit 5. enable this bit so that flexcan is enabled in LX2160ARDB.

---
 board/freescale/lx2160a/lx2160a.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
board/freescale/lx2160a/lx2160a.c +20 -0
index 3b4cb86692..addc829e5d 100644
@@ -402,6 +402,26 @@ int config_board_mux(void)
 
 	return 0;
 }
+#elif defined(CONFIG_TARGET_LX2160ARDB)
+int config_board_mux(void)
+{
+	u8 brdcfg;
+
+	brdcfg = QIXIS_READ(brdcfg[4]);
+	/* The BRDCFG4 register controls general board configuration.
+	 *|-------------------------------------------|
+	 *|Field  | Function                          |
+	 *|-------------------------------------------|
+	 *|5      | CAN I/O Enable (net CFG_CAN_EN_B):|
+	 *|CAN_EN | 0= CAN transceivers are disabled. |
+	 *|       | 1= CAN transceivers are enabled.  |
+	 *|-------------------------------------------|
+	 */
+	brdcfg |= BIT_MASK(5);
+	QIXIS_WRITE(brdcfg[4], brdcfg);
+
+	return 0;
+}
 #else
 int config_board_mux(void)
 {
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 board/fsl/lx2160ardb: enable flexcan

Quoted 11 lines

-----Original Message-----
From: Pankaj Bansal
Sent: Wednesday, July 17, 2019 3:05 PM
To: Prabhakar Kushwaha <[email protected]>; Meenakshi Aggarwal <[email protected]>; Bin Meng <[email protected]>
Cc: Varun Sethi <[email protected]>; u-boot at lists.denx.de; Pankaj Bansal <[email protected]>
Subject: [PATCH v2] board/fsl/lx2160ardb: enable flexcan

Quoted 5 lines

Flexcan in LX2160ARDB is controlled by FPGA register boardcfg4 bit 5. enable this bit so that flexcan is enabled in LX2160ARDB.

---

This patch has been applied to fsl-qoriq master, awaiting upstream.

--pk