Skip to content

Commit c65176f

Browse files
Roger Quadrosnmenon
authored andcommitted
arm64: dts: ti: k3-j721e: Rename mux header and update macro names
We intend to use one header file for SERDES MUX for all TI SoCs so rename the header file. The exsting macros are too generic. Prefix them with SoC name. While at that, add the missing configurations for completeness. Fixes: b766e3b ("arm64: dts: ti: k3-j721e-main: Add system controller node and SERDES lane mux") Reported-by: Peter Rosin <peda@axentia.se> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Peter Rosin <peda@axentia.se> Link: https://lore.kernel.org/r/20200918165930.2031-1-rogerq@ti.com
1 parent f75aef3 commit c65176f

4 files changed

Lines changed: 84 additions & 64 deletions

File tree

arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -404,11 +404,12 @@
404404
};
405405

406406
&serdes_ln_ctrl {
407-
idle-states = <SERDES0_LANE0_PCIE0_LANE0>, <SERDES0_LANE1_PCIE0_LANE1>,
408-
<SERDES1_LANE0_PCIE1_LANE0>, <SERDES1_LANE1_PCIE1_LANE1>,
409-
<SERDES2_LANE0_PCIE2_LANE0>, <SERDES2_LANE1_PCIE2_LANE1>,
410-
<SERDES3_LANE0_USB3_0_SWAP>, <SERDES3_LANE1_USB3_0>,
411-
<SERDES4_LANE0_EDP_LANE0>, <SERDES4_LANE1_EDP_LANE1>, <SERDES4_LANE2_EDP_LANE2>, <SERDES4_LANE3_EDP_LANE3>;
407+
idle-states = <J721E_SERDES0_LANE0_PCIE0_LANE0>, <J721E_SERDES0_LANE1_PCIE0_LANE1>,
408+
<J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
409+
<J721E_SERDES2_LANE0_PCIE2_LANE0>, <J721E_SERDES2_LANE1_PCIE2_LANE1>,
410+
<J721E_SERDES3_LANE0_USB3_0_SWAP>, <J721E_SERDES3_LANE1_USB3_0>,
411+
<J721E_SERDES4_LANE0_EDP_LANE0>, <J721E_SERDES4_LANE1_EDP_LANE1>,
412+
<J721E_SERDES4_LANE2_EDP_LANE2>, <J721E_SERDES4_LANE3_EDP_LANE3>;
412413
};
413414

414415
&serdes_wiz3 {

arch/arm64/boot/dts/ti/k3-j721e-main.dtsi

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
#include <dt-bindings/phy/phy.h>
88
#include <dt-bindings/mux/mux.h>
9-
#include <dt-bindings/mux/mux-j721e-wiz.h>
9+
#include <dt-bindings/mux/ti-serdes.h>
1010

1111
&cbass_main {
1212
msmc_ram: sram@70000000 {
@@ -38,11 +38,12 @@
3838
<0x40b0 0x3>, <0x40b4 0x3>, /* SERDES3 lane0/1 select */
3939
<0x40c0 0x3>, <0x40c4 0x3>, <0x40c8 0x3>, <0x40cc 0x3>;
4040
/* SERDES4 lane0/1/2/3 select */
41-
idle-states = <SERDES0_LANE0_PCIE0_LANE0>, <SERDES0_LANE1_PCIE0_LANE1>,
42-
<SERDES1_LANE0_PCIE1_LANE0>, <SERDES1_LANE1_PCIE1_LANE1>,
43-
<SERDES2_LANE0_PCIE2_LANE0>, <SERDES2_LANE1_PCIE2_LANE1>,
44-
<MUX_IDLE_AS_IS>, <SERDES3_LANE1_USB3_0>,
45-
<SERDES4_LANE0_EDP_LANE0>, <SERDES4_LANE1_EDP_LANE1>, <SERDES4_LANE2_EDP_LANE2>, <SERDES4_LANE3_EDP_LANE3>;
41+
idle-states = <J721E_SERDES0_LANE0_PCIE0_LANE0>, <J721E_SERDES0_LANE1_PCIE0_LANE1>,
42+
<J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
43+
<J721E_SERDES2_LANE0_PCIE2_LANE0>, <J721E_SERDES2_LANE1_PCIE2_LANE1>,
44+
<MUX_IDLE_AS_IS>, <J721E_SERDES3_LANE1_USB3_0>,
45+
<J721E_SERDES4_LANE0_EDP_LANE0>, <J721E_SERDES4_LANE1_EDP_LANE1>,
46+
<J721E_SERDES4_LANE2_EDP_LANE2>, <J721E_SERDES4_LANE3_EDP_LANE3>;
4647
};
4748

4849
usb_serdes_mux: mux-controller@4000 {

include/dt-bindings/mux/mux-j721e-wiz.h

Lines changed: 0 additions & 53 deletions
This file was deleted.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
/*
3+
* This header provides constants for SERDES MUX for TI SoCs
4+
*/
5+
6+
#ifndef _DT_BINDINGS_MUX_TI_SERDES
7+
#define _DT_BINDINGS_MUX_TI_SERDES
8+
9+
/* J721E */
10+
11+
#define J721E_SERDES0_LANE0_QSGMII_LANE1 0x0
12+
#define J721E_SERDES0_LANE0_PCIE0_LANE0 0x1
13+
#define J721E_SERDES0_LANE0_USB3_0_SWAP 0x2
14+
#define J721E_SERDES0_LANE0_IP4_UNUSED 0x3
15+
16+
#define J721E_SERDES0_LANE1_QSGMII_LANE2 0x0
17+
#define J721E_SERDES0_LANE1_PCIE0_LANE1 0x1
18+
#define J721E_SERDES0_LANE1_USB3_0 0x2
19+
#define J721E_SERDES0_LANE1_IP4_UNUSED 0x3
20+
21+
#define J721E_SERDES1_LANE0_QSGMII_LANE3 0x0
22+
#define J721E_SERDES1_LANE0_PCIE1_LANE0 0x1
23+
#define J721E_SERDES1_LANE0_USB3_1_SWAP 0x2
24+
#define J721E_SERDES1_LANE0_SGMII_LANE0 0x3
25+
26+
#define J721E_SERDES1_LANE1_QSGMII_LANE4 0x0
27+
#define J721E_SERDES1_LANE1_PCIE1_LANE1 0x1
28+
#define J721E_SERDES1_LANE1_USB3_1 0x2
29+
#define J721E_SERDES1_LANE1_SGMII_LANE1 0x3
30+
31+
#define J721E_SERDES2_LANE0_IP1_UNUSED 0x0
32+
#define J721E_SERDES2_LANE0_PCIE2_LANE0 0x1
33+
#define J721E_SERDES2_LANE0_USB3_1_SWAP 0x2
34+
#define J721E_SERDES2_LANE0_SGMII_LANE0 0x3
35+
36+
#define J721E_SERDES2_LANE1_IP1_UNUSED 0x0
37+
#define J721E_SERDES2_LANE1_PCIE2_LANE1 0x1
38+
#define J721E_SERDES2_LANE1_USB3_1 0x2
39+
#define J721E_SERDES2_LANE1_SGMII_LANE1 0x3
40+
41+
#define J721E_SERDES3_LANE0_IP1_UNUSED 0x0
42+
#define J721E_SERDES3_LANE0_PCIE3_LANE0 0x1
43+
#define J721E_SERDES3_LANE0_USB3_0_SWAP 0x2
44+
#define J721E_SERDES3_LANE0_IP4_UNUSED 0x3
45+
46+
#define J721E_SERDES3_LANE1_IP1_UNUSED 0x0
47+
#define J721E_SERDES3_LANE1_PCIE3_LANE1 0x1
48+
#define J721E_SERDES3_LANE1_USB3_0 0x2
49+
#define J721E_SERDES3_LANE1_IP4_UNUSED 0x3
50+
51+
#define J721E_SERDES4_LANE0_EDP_LANE0 0x0
52+
#define J721E_SERDES4_LANE0_IP2_UNUSED 0x1
53+
#define J721E_SERDES4_LANE0_QSGMII_LANE5 0x2
54+
#define J721E_SERDES4_LANE0_IP4_UNUSED 0x3
55+
56+
#define J721E_SERDES4_LANE1_EDP_LANE1 0x0
57+
#define J721E_SERDES4_LANE1_IP2_UNUSED 0x1
58+
#define J721E_SERDES4_LANE1_QSGMII_LANE6 0x2
59+
#define J721E_SERDES4_LANE1_IP4_UNUSED 0x3
60+
61+
#define J721E_SERDES4_LANE2_EDP_LANE2 0x0
62+
#define J721E_SERDES4_LANE2_IP2_UNUSED 0x1
63+
#define J721E_SERDES4_LANE2_QSGMII_LANE7 0x2
64+
#define J721E_SERDES4_LANE2_IP4_UNUSED 0x3
65+
66+
#define J721E_SERDES4_LANE3_EDP_LANE3 0x0
67+
#define J721E_SERDES4_LANE3_IP2_UNUSED 0x1
68+
#define J721E_SERDES4_LANE3_QSGMII_LANE8 0x2
69+
#define J721E_SERDES4_LANE3_IP4_UNUSED 0x3
70+
71+
#endif /* _DT_BINDINGS_MUX_TI_SERDES */

0 commit comments

Comments
 (0)