arm64: dts: ti: Use local header for SERDES MUX idle-state values
authorJayesh Choudhary <j-choudhary@ti.com>
Fri, 21 Jul 2023 12:57:31 +0000 (18:27 +0530)
committerNishanth Menon <nm@ti.com>
Tue, 25 Jul 2023 11:30:03 +0000 (06:30 -0500)
The DTS uses constants for SERDES MUX idle state values which were earlier
provided as bindings header. But they are unsuitable for bindings.
So move these constants in a header next to DTS.

Also add J784S4 SERDES4 lane definitions which were missed earlier.

Suggested-by: Nishanth Menon <nm@ti.com>
Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Suggested-by: Roger Quadros <rogerq@kernel.org>
Link: https://lore.kernel.org/linux-arm-kernel/b24c2124-fe3b-246c-9af9-3ecee9fb32d4@kernel.org/
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Roger Quadros <rogerq@kernel.org>
Acked-by: Peter Rosin <peda@axentia.se>
Link: https://lore.kernel.org/r/20230721125732.122421-2-j-choudhary@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
arch/arm64/boot/dts/ti/k3-am642-evm.dts
arch/arm64/boot/dts/ti/k3-am642-phyboard-electra-rdk.dts
arch/arm64/boot/dts/ti/k3-am642-sk.dts
arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
arch/arm64/boot/dts/ti/k3-j7200-common-proc-board.dts
arch/arm64/boot/dts/ti/k3-j7200-evm-quad-port-eth-exp.dtso
arch/arm64/boot/dts/ti/k3-j721e-evm-quad-port-eth-exp.dtso
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
arch/arm64/boot/dts/ti/k3-serdes.h [new file with mode: 0644]

index 15c282c..d84e7ee 100644 (file)
@@ -6,12 +6,13 @@
 /dts-v1/;
 
 #include <dt-bindings/phy/phy.h>
-#include <dt-bindings/mux/ti-serdes.h>
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/net/ti-dp83867.h>
 #include "k3-am642.dtsi"
 
+#include "k3-serdes.h"
+
 / {
        compatible = "ti,am642-evm", "ti,am642";
        model = "Texas Instruments AM642 EVM";
index 9c418ab..9175e96 100644 (file)
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/leds/leds-pca9532.h>
-#include <dt-bindings/mux/ti-serdes.h>
 #include <dt-bindings/phy/phy.h>
 #include "k3-am642.dtsi"
 #include "k3-am64-phycore-som.dtsi"
 
+#include "k3-serdes.h"
+
 / {
        compatible = "phytec,am642-phyboard-electra-rdk",
                     "phytec,am64-phycore-som", "ti,am642";
index cbce43d..963d796 100644 (file)
@@ -5,13 +5,14 @@
 
 /dts-v1/;
 
-#include <dt-bindings/mux/ti-serdes.h>
 #include <dt-bindings/phy/phy.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/net/ti-dp83867.h>
 #include <dt-bindings/leds/common.h>
 #include "k3-am642.dtsi"
 
+#include "k3-serdes.h"
+
 / {
        compatible = "ti,am642-sk", "ti,am642";
        model = "Texas Instruments AM642 SK";
index d5889ba..21ad49c 100644 (file)
@@ -11,7 +11,8 @@
 #include <dt-bindings/net/ti-dp83867.h>
 #include <dt-bindings/phy/phy-cadence.h>
 #include <dt-bindings/phy/phy.h>
-#include <dt-bindings/mux/ti-serdes.h>
+
+#include "k3-serdes.h"
 
 / {
        compatible = "ti,am68-sk", "ti,j721s2";
index 3cf2881..92a5414 100644 (file)
@@ -8,9 +8,10 @@
 #include "k3-j7200-som-p0.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/net/ti-dp83867.h>
-#include <dt-bindings/mux/ti-serdes.h>
 #include <dt-bindings/phy/phy.h>
 
+#include "k3-serdes.h"
+
 / {
        compatible = "ti,j7200-evm", "ti,j7200";
        model = "Texas Instruments J7200 EVM";
index 34a0747..32d9052 100644 (file)
@@ -10,9 +10,9 @@
 /plugin/;
 
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/mux/ti-serdes.h>
 
 #include "k3-pinctrl.h"
+#include "k3-serdes.h"
 
 &{/} {
        aliases {
index 6f0adf5..d4c51ff 100644 (file)
 /plugin/;
 
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/mux/ti-serdes.h>
 #include <dt-bindings/phy/phy.h>
 #include <dt-bindings/phy/phy-cadence.h>
 
 #include "k3-pinctrl.h"
+#include "k3-serdes.h"
 
 &{/} {
        aliases {
index 6c9fe28..3acd55f 100644 (file)
@@ -7,7 +7,8 @@
 #include <dt-bindings/phy/phy.h>
 #include <dt-bindings/phy/phy-ti.h>
 #include <dt-bindings/mux/mux.h>
-#include <dt-bindings/mux/ti-serdes.h>
+
+#include "k3-serdes.h"
 
 / {
        cmn_refclk: clock-cmnrefclk {
index 092ab1e..02b7a55 100644 (file)
@@ -11,7 +11,8 @@
 #include <dt-bindings/net/ti-dp83867.h>
 #include <dt-bindings/phy/phy-cadence.h>
 #include <dt-bindings/phy/phy.h>
-#include <dt-bindings/mux/ti-serdes.h>
+
+#include "k3-serdes.h"
 
 / {
        compatible = "ti,j721s2-evm", "ti,j721s2";
diff --git a/arch/arm64/boot/dts/ti/k3-serdes.h b/arch/arm64/boot/dts/ti/k3-serdes.h
new file mode 100644 (file)
index 0000000..29167f8
--- /dev/null
@@ -0,0 +1,204 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * This header provides constants for SERDES MUX for TI SoCs
+ *
+ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#ifndef DTS_ARM64_TI_K3_SERDES_H
+#define DTS_ARM64_TI_K3_SERDES_H
+
+/* J721E */
+
+#define J721E_SERDES0_LANE0_QSGMII_LANE1       0x0
+#define J721E_SERDES0_LANE0_PCIE0_LANE0                0x1
+#define J721E_SERDES0_LANE0_USB3_0_SWAP                0x2
+#define J721E_SERDES0_LANE0_IP4_UNUSED         0x3
+
+#define J721E_SERDES0_LANE1_QSGMII_LANE2       0x0
+#define J721E_SERDES0_LANE1_PCIE0_LANE1                0x1
+#define J721E_SERDES0_LANE1_USB3_0             0x2
+#define J721E_SERDES0_LANE1_IP4_UNUSED         0x3
+
+#define J721E_SERDES1_LANE0_QSGMII_LANE3       0x0
+#define J721E_SERDES1_LANE0_PCIE1_LANE0                0x1
+#define J721E_SERDES1_LANE0_USB3_1_SWAP                0x2
+#define J721E_SERDES1_LANE0_SGMII_LANE0                0x3
+
+#define J721E_SERDES1_LANE1_QSGMII_LANE4       0x0
+#define J721E_SERDES1_LANE1_PCIE1_LANE1                0x1
+#define J721E_SERDES1_LANE1_USB3_1             0x2
+#define J721E_SERDES1_LANE1_SGMII_LANE1                0x3
+
+#define J721E_SERDES2_LANE0_IP1_UNUSED         0x0
+#define J721E_SERDES2_LANE0_PCIE2_LANE0                0x1
+#define J721E_SERDES2_LANE0_USB3_1_SWAP                0x2
+#define J721E_SERDES2_LANE0_SGMII_LANE0                0x3
+
+#define J721E_SERDES2_LANE1_IP1_UNUSED         0x0
+#define J721E_SERDES2_LANE1_PCIE2_LANE1                0x1
+#define J721E_SERDES2_LANE1_USB3_1             0x2
+#define J721E_SERDES2_LANE1_SGMII_LANE1                0x3
+
+#define J721E_SERDES3_LANE0_IP1_UNUSED         0x0
+#define J721E_SERDES3_LANE0_PCIE3_LANE0                0x1
+#define J721E_SERDES3_LANE0_USB3_0_SWAP                0x2
+#define J721E_SERDES3_LANE0_IP4_UNUSED         0x3
+
+#define J721E_SERDES3_LANE1_IP1_UNUSED         0x0
+#define J721E_SERDES3_LANE1_PCIE3_LANE1                0x1
+#define J721E_SERDES3_LANE1_USB3_0             0x2
+#define J721E_SERDES3_LANE1_IP4_UNUSED         0x3
+
+#define J721E_SERDES4_LANE0_EDP_LANE0          0x0
+#define J721E_SERDES4_LANE0_IP2_UNUSED         0x1
+#define J721E_SERDES4_LANE0_QSGMII_LANE5       0x2
+#define J721E_SERDES4_LANE0_IP4_UNUSED         0x3
+
+#define J721E_SERDES4_LANE1_EDP_LANE1          0x0
+#define J721E_SERDES4_LANE1_IP2_UNUSED         0x1
+#define J721E_SERDES4_LANE1_QSGMII_LANE6       0x2
+#define J721E_SERDES4_LANE1_IP4_UNUSED         0x3
+
+#define J721E_SERDES4_LANE2_EDP_LANE2          0x0
+#define J721E_SERDES4_LANE2_IP2_UNUSED         0x1
+#define J721E_SERDES4_LANE2_QSGMII_LANE7       0x2
+#define J721E_SERDES4_LANE2_IP4_UNUSED         0x3
+
+#define J721E_SERDES4_LANE3_EDP_LANE3          0x0
+#define J721E_SERDES4_LANE3_IP2_UNUSED         0x1
+#define J721E_SERDES4_LANE3_QSGMII_LANE8       0x2
+#define J721E_SERDES4_LANE3_IP4_UNUSED         0x3
+
+/* J7200 */
+
+#define J7200_SERDES0_LANE0_QSGMII_LANE3       0x0
+#define J7200_SERDES0_LANE0_PCIE1_LANE0                0x1
+#define J7200_SERDES0_LANE0_IP3_UNUSED         0x2
+#define J7200_SERDES0_LANE0_IP4_UNUSED         0x3
+
+#define J7200_SERDES0_LANE1_QSGMII_LANE4       0x0
+#define J7200_SERDES0_LANE1_PCIE1_LANE1                0x1
+#define J7200_SERDES0_LANE1_IP3_UNUSED         0x2
+#define J7200_SERDES0_LANE1_IP4_UNUSED         0x3
+
+#define J7200_SERDES0_LANE2_QSGMII_LANE1       0x0
+#define J7200_SERDES0_LANE2_PCIE1_LANE2                0x1
+#define J7200_SERDES0_LANE2_IP3_UNUSED         0x2
+#define J7200_SERDES0_LANE2_IP4_UNUSED         0x3
+
+#define J7200_SERDES0_LANE3_QSGMII_LANE2       0x0
+#define J7200_SERDES0_LANE3_PCIE1_LANE3                0x1
+#define J7200_SERDES0_LANE3_USB                        0x2
+#define J7200_SERDES0_LANE3_IP4_UNUSED         0x3
+
+/* AM64 */
+
+#define AM64_SERDES0_LANE0_PCIE0               0x0
+#define AM64_SERDES0_LANE0_USB                 0x1
+
+/* J721S2 */
+
+#define J721S2_SERDES0_LANE0_EDP_LANE0         0x0
+#define J721S2_SERDES0_LANE0_PCIE1_LANE0       0x1
+#define J721S2_SERDES0_LANE0_IP3_UNUSED                0x2
+#define J721S2_SERDES0_LANE0_IP4_UNUSED                0x3
+
+#define J721S2_SERDES0_LANE1_EDP_LANE1         0x0
+#define J721S2_SERDES0_LANE1_PCIE1_LANE1       0x1
+#define J721S2_SERDES0_LANE1_USB               0x2
+#define J721S2_SERDES0_LANE1_IP4_UNUSED                0x3
+
+#define J721S2_SERDES0_LANE2_EDP_LANE2         0x0
+#define J721S2_SERDES0_LANE2_PCIE1_LANE2       0x1
+#define J721S2_SERDES0_LANE2_IP3_UNUSED                0x2
+#define J721S2_SERDES0_LANE2_IP4_UNUSED                0x3
+
+#define J721S2_SERDES0_LANE3_EDP_LANE3         0x0
+#define J721S2_SERDES0_LANE3_PCIE1_LANE3       0x1
+#define J721S2_SERDES0_LANE3_USB               0x2
+#define J721S2_SERDES0_LANE3_IP4_UNUSED                0x3
+
+/* J784S4 */
+
+#define J784S4_SERDES0_LANE0_IP1_UNUSED                0x0
+#define J784S4_SERDES0_LANE0_PCIE1_LANE0       0x1
+#define J784S4_SERDES0_LANE0_IP3_UNUSED                0x2
+#define J784S4_SERDES0_LANE0_IP4_UNUSED                0x3
+
+#define J784S4_SERDES0_LANE1_IP1_UNUSED                0x0
+#define J784S4_SERDES0_LANE1_PCIE1_LANE1       0x1
+#define J784S4_SERDES0_LANE1_IP3_UNUSED                0x2
+#define J784S4_SERDES0_LANE1_IP4_UNUSED                0x3
+
+#define J784S4_SERDES0_LANE2_PCIE3_LANE0       0x0
+#define J784S4_SERDES0_LANE2_PCIE1_LANE2       0x1
+#define J784S4_SERDES0_LANE2_IP3_UNUSED                0x2
+#define J784S4_SERDES0_LANE2_IP4_UNUSED                0x3
+
+#define J784S4_SERDES0_LANE3_PCIE3_LANE1       0x0
+#define J784S4_SERDES0_LANE3_PCIE1_LANE3       0x1
+#define J784S4_SERDES0_LANE3_USB               0x2
+#define J784S4_SERDES0_LANE3_IP4_UNUSED                0x3
+
+#define J784S4_SERDES1_LANE0_QSGMII_LANE3      0x0
+#define J784S4_SERDES1_LANE0_PCIE0_LANE0       0x1
+#define J784S4_SERDES1_LANE0_IP3_UNUSED                0x2
+#define J784S4_SERDES1_LANE0_IP4_UNUSED                0x3
+
+#define J784S4_SERDES1_LANE1_QSGMII_LANE4      0x0
+#define J784S4_SERDES1_LANE1_PCIE0_LANE1       0x1
+#define J784S4_SERDES1_LANE1_IP3_UNUSED                0x2
+#define J784S4_SERDES1_LANE1_IP4_UNUSED                0x3
+
+#define J784S4_SERDES1_LANE2_QSGMII_LANE1      0x0
+#define J784S4_SERDES1_LANE2_PCIE0_LANE2       0x1
+#define J784S4_SERDES1_LANE2_PCIE2_LANE0       0x2
+#define J784S4_SERDES1_LANE2_IP4_UNUSED                0x3
+
+#define J784S4_SERDES1_LANE3_QSGMII_LANE2      0x0
+#define J784S4_SERDES1_LANE3_PCIE0_LANE3       0x1
+#define J784S4_SERDES1_LANE3_PCIE2_LANE1       0x2
+#define J784S4_SERDES1_LANE3_IP4_UNUSED                0x3
+
+#define J784S4_SERDES2_LANE0_QSGMII_LANE5      0x0
+#define J784S4_SERDES2_LANE0_IP2_UNUSED                0x1
+#define J784S4_SERDES2_LANE0_IP3_UNUSED                0x2
+#define J784S4_SERDES2_LANE0_IP4_UNUSED                0x3
+
+#define J784S4_SERDES2_LANE1_QSGMII_LANE6      0x0
+#define J784S4_SERDES2_LANE1_IP2_UNUSED                0x1
+#define J784S4_SERDES2_LANE1_IP3_UNUSED                0x2
+#define J784S4_SERDES2_LANE1_IP4_UNUSED                0x3
+
+#define J784S4_SERDES2_LANE2_QSGMII_LANE7      0x0
+#define J784S4_SERDES2_LANE2_QSGMII_LANE1      0x1
+#define J784S4_SERDES2_LANE2_IP3_UNUSED                0x2
+#define J784S4_SERDES2_LANE2_IP4_UNUSED                0x3
+
+#define J784S4_SERDES2_LANE3_QSGMII_LANE8      0x0
+#define J784S4_SERDES2_LANE3_QSGMII_LANE2      0x1
+#define J784S4_SERDES2_LANE3_IP3_UNUSED                0x2
+#define J784S4_SERDES2_LANE3_IP4_UNUSED                0x3
+
+#define J784S4_SERDES4_LANE0_EDP_LANE0         0x0
+#define J784S4_SERDES4_LANE0_QSGMII_LANE5      0x1
+#define J784S4_SERDES4_LANE0_IP3_UNUSED                0x2
+#define J784S4_SERDES4_LANE0_IP4_UNUSED                0x3
+
+#define J784S4_SERDES4_LANE1_EDP_LANE1         0x0
+#define J784S4_SERDES4_LANE1_QSGMII_LANE6      0x1
+#define J784S4_SERDES4_LANE1_IP3_UNUSED                0x2
+#define J784S4_SERDES4_LANE1_IP4_UNUSED                0x3
+
+#define J784S4_SERDES4_LANE2_EDP_LANE2         0x0
+#define J784S4_SERDES4_LANE2_QSGMII_LANE7      0x1
+#define J784S4_SERDES4_LANE2_IP3_UNUSED                0x2
+#define J784S4_SERDES4_LANE2_IP4_UNUSED                0x3
+
+#define J784S4_SERDES4_LANE3_EDP_LANE3         0x0
+#define J784S4_SERDES4_LANE3_QSGMII_LANE8      0x1
+#define J784S4_SERDES4_LANE3_USB               0x2
+#define J784S4_SERDES4_LANE3_IP4_UNUSED                0x3
+
+#endif /* DTS_ARM64_TI_K3_SERDES_H */