mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00

Refreshed patches for qualcommb/ipq95xx by running make target/linux/refresh after creating a .config containing: CONFIG_TARGET_qualcommbe=y CONFIG_TARGET_qualcommbe_ipq95xx=y CONFIG_TARGET_qualcommbe_ipq95xx_DEVICE_qcom_rdp433=y Signed-off-by: John Audia <therealgraysky@proton.me> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
245 lines
8.6 KiB
Diff
245 lines
8.6 KiB
Diff
From 9e76817056937645205f23ee91e762d5cff5e848 Mon Sep 17 00:00:00 2001
|
|
From: Luo Jie <quic_luoj@quicinc.com>
|
|
Date: Mon, 29 Jan 2024 17:57:20 +0800
|
|
Subject: [PATCH 01/50] dt-bindings: net: Document Qualcomm QCA8084 PHY package
|
|
|
|
QCA8084 is quad PHY chip, which integrates 4 PHYs, 2 PCS
|
|
interfaces (PCS0 and PCS1) and clock controller, which can
|
|
also be integrated to the switch chip named as QCA8386.
|
|
|
|
1. MDIO address of 4 PHYs, 2 PCS and 1 XPCS (PCS1 includes
|
|
PCS and XPCS, PCS0 includes PCS) can be configured.
|
|
2. The package mode of PHY is optionally configured for the
|
|
interface mode of two PCSes working correctly.
|
|
3. The package level clock and reset need to be initialized.
|
|
4. The clock and reset per PHY device need to be initialized
|
|
so that the PHY register can be accessed.
|
|
|
|
Change-Id: Idb2338d2673152cbd3c57e95968faa59e9d4a80f
|
|
Signed-off-by: Luo Jie <quic_luoj@quicinc.com>
|
|
---
|
|
.../devicetree/bindings/net/qcom,qca8084.yaml | 198 ++++++++++++++++++
|
|
include/dt-bindings/net/qcom,qca808x.h | 14 ++
|
|
2 files changed, 212 insertions(+)
|
|
create mode 100644 Documentation/devicetree/bindings/net/qcom,qca8084.yaml
|
|
create mode 100644 include/dt-bindings/net/qcom,qca808x.h
|
|
|
|
--- /dev/null
|
|
+++ b/Documentation/devicetree/bindings/net/qcom,qca8084.yaml
|
|
@@ -0,0 +1,198 @@
|
|
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
+%YAML 1.2
|
|
+---
|
|
+$id: http://devicetree.org/schemas/net/qcom,qca8084.yaml#
|
|
+$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
+
|
|
+title: Qualcomm QCA8084 Ethernet Quad PHY
|
|
+
|
|
+maintainers:
|
|
+ - Luo Jie <quic_luoj@quicinc.com>
|
|
+
|
|
+description:
|
|
+ Qualcomm QCA8084 is a four-port Ethernet transceiver, the
|
|
+ Ethernet port supports link speed 10/100/1000/2500 Mbps.
|
|
+ There are two PCSes (PCS0 and PCS1) integrated in the PHY
|
|
+ package, PCS1 includes XPCS and PCS to support the interface
|
|
+ mode 10G-QXGMII and SGMII, PCS0 includes a PCS to support the
|
|
+ interface mode SGMII only. There is also a clock controller
|
|
+ integrated in the PHY package. This four-port Ethernet
|
|
+ transceiver can also be integrated to the switch chip named
|
|
+ as QCA8386. The PHY package mode needs to be configured as the
|
|
+ correct value to apply the interface mode of two PCSes as
|
|
+ mentioned below.
|
|
+
|
|
+ QCA8084 expects an input reference clock 50 MHZ as the clock
|
|
+ source of the integrated clock controller, the integrated
|
|
+ clock controller supplies the clocks and resets to the
|
|
+ integrated PHY, PCS and PHY package.
|
|
+
|
|
+ - |
|
|
+ +--| |--+-------------------+--| |--+
|
|
+ | PCS1 |<------------+---->| PCS0 |
|
|
+ +-------+ | +-------+
|
|
+ | | |
|
|
+ Ref 50M clk +--------+ | |
|
|
+ ------------>| | clk & rst | |
|
|
+ GPIO Reset |QCA8K_CC+------------+ |
|
|
+ ------------>| | | |
|
|
+ +--------+ | |
|
|
+ | V |
|
|
+ +--------+--------+--------+--------+
|
|
+ | PHY0 | PHY1 | PHY2 | PHY3 |
|
|
+ +--------+--------+--------+--------+
|
|
+
|
|
+$ref: ethernet-phy-package.yaml#
|
|
+
|
|
+properties:
|
|
+ compatible:
|
|
+ const: qcom,qca8084-package
|
|
+
|
|
+ clocks:
|
|
+ description: PHY package level initial common clocks, which are
|
|
+ needed to be enabled after GPIO reset on the PHY package, these
|
|
+ clocks are supplied from the PHY integrated clock controller
|
|
+ (QCA8K-CC).
|
|
+ items:
|
|
+ - description: APB bridge clock
|
|
+ - description: AHB clock
|
|
+ - description: Security control clock
|
|
+ - description: TLMM clock
|
|
+ - description: TLMM AHB clock
|
|
+ - description: CNOC AHB clock
|
|
+ - description: MDIO AHB clock
|
|
+
|
|
+ clock-names:
|
|
+ items:
|
|
+ - const: apb_bridge
|
|
+ - const: ahb
|
|
+ - const: sec_ctrl_ahb
|
|
+ - const: tlmm
|
|
+ - const: tlmm_ahb
|
|
+ - const: cnoc_ahb
|
|
+ - const: mdio_ahb
|
|
+
|
|
+ resets:
|
|
+ description: PHY package level initial common reset, which are
|
|
+ needed to be deasserted after GPIO reset on the PHY package,
|
|
+ this reset is provided by the PHY integrated clock controller
|
|
+ to do PHY DSP reset.
|
|
+ maxItems: 1
|
|
+
|
|
+ qcom,package-mode:
|
|
+ description: |
|
|
+ The package mode of PHY supports to be configured as 3 modes
|
|
+ to apply the combinations of interface mode of two PCSes
|
|
+ correctly. This value should use one of the values defined in
|
|
+ dt-bindings/net/qcom,qca808x.h. The package mode 10G-QXGMII of
|
|
+ Quad PHY is used by default.
|
|
+
|
|
+ package mode PCS1 PCS0
|
|
+ phy mode (0) 10G-QXGMII for not used
|
|
+ PHY0-PHY3
|
|
+
|
|
+ switch mode (1) SGMII for SGMII for
|
|
+ switch MAC0 switch MAC5 (optional)
|
|
+
|
|
+ switch bypass MAC5 (2) SGMII for SGMII for
|
|
+ switch MAC0 PHY3
|
|
+ $ref: /schemas/types.yaml#/definitions/uint32
|
|
+ enum: [0, 1, 2]
|
|
+ default: 0
|
|
+
|
|
+ qcom,phy-addr-fixup:
|
|
+ description: MDIO address for PHY0-PHY3, PCS0 and PCS1 including
|
|
+ PCS and XPCS, which can be optionally customized by programming
|
|
+ the security control register of PHY package. The hardware default
|
|
+ MDIO address of PHY0-PHY3, PCS0 and PCS1 including PCS and XPCS is
|
|
+ 0-6.
|
|
+ $ref: /schemas/types.yaml#/definitions/uint32-array
|
|
+ minItems: 7
|
|
+ maxItems: 7
|
|
+
|
|
+patternProperties:
|
|
+ ^ethernet-phy(@[a-f0-9]+)?$:
|
|
+ $ref: ethernet-phy.yaml#
|
|
+
|
|
+ properties:
|
|
+ compatible:
|
|
+ const: ethernet-phy-id004d.d180
|
|
+
|
|
+ required:
|
|
+ - compatible
|
|
+ - reg
|
|
+ - clocks
|
|
+ - resets
|
|
+
|
|
+ unevaluatedProperties: false
|
|
+
|
|
+required:
|
|
+ - compatible
|
|
+ - clocks
|
|
+ - clock-names
|
|
+ - resets
|
|
+
|
|
+unevaluatedProperties: false
|
|
+
|
|
+examples:
|
|
+ - |
|
|
+ #include <dt-bindings/clock/qcom,qca8k-nsscc.h>
|
|
+ #include <dt-bindings/net/qcom,qca808x.h>
|
|
+ #include <dt-bindings/reset/qcom,qca8k-nsscc.h>
|
|
+
|
|
+ mdio {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+
|
|
+ ethernet-phy-package@1 {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ compatible = "qcom,qca8084-package";
|
|
+ reg = <1>;
|
|
+ clocks = <&qca8k_nsscc NSS_CC_APB_BRIDGE_CLK>,
|
|
+ <&qca8k_nsscc NSS_CC_AHB_CLK>,
|
|
+ <&qca8k_nsscc NSS_CC_SEC_CTRL_AHB_CLK>,
|
|
+ <&qca8k_nsscc NSS_CC_TLMM_CLK>,
|
|
+ <&qca8k_nsscc NSS_CC_TLMM_AHB_CLK>,
|
|
+ <&qca8k_nsscc NSS_CC_CNOC_AHB_CLK>,
|
|
+ <&qca8k_nsscc NSS_CC_MDIO_AHB_CLK>;
|
|
+ clock-names = "apb_bridge",
|
|
+ "ahb",
|
|
+ "sec_ctrl_ahb",
|
|
+ "tlmm",
|
|
+ "tlmm_ahb",
|
|
+ "cnoc_ahb",
|
|
+ "mdio_ahb";
|
|
+ resets = <&qca8k_nsscc NSS_CC_GEPHY_FULL_ARES>;
|
|
+ qcom,package-mode = <QCA808X_PCS1_SGMII_MAC_PCS0_SGMII_MAC>;
|
|
+ qcom,phy-addr-fixup = <1 2 3 4 5 6 7>;
|
|
+
|
|
+ ethernet-phy@1 {
|
|
+ compatible = "ethernet-phy-id004d.d180";
|
|
+ reg = <1>;
|
|
+ clocks = <&qca8k_nsscc NSS_CC_GEPHY0_SYS_CLK>;
|
|
+ resets = <&qca8k_nsscc NSS_CC_GEPHY0_SYS_ARES>;
|
|
+ };
|
|
+
|
|
+ ethernet-phy@2 {
|
|
+ compatible = "ethernet-phy-id004d.d180";
|
|
+ reg = <2>;
|
|
+ clocks = <&qca8k_nsscc NSS_CC_GEPHY1_SYS_CLK>;
|
|
+ resets = <&qca8k_nsscc NSS_CC_GEPHY1_SYS_ARES>;
|
|
+ };
|
|
+
|
|
+ ethernet-phy@3 {
|
|
+ compatible = "ethernet-phy-id004d.d180";
|
|
+ reg = <3>;
|
|
+ clocks = <&qca8k_nsscc NSS_CC_GEPHY2_SYS_CLK>;
|
|
+ resets = <&qca8k_nsscc NSS_CC_GEPHY2_SYS_ARES>;
|
|
+ };
|
|
+
|
|
+ ethernet-phy@4 {
|
|
+ compatible = "ethernet-phy-id004d.d180";
|
|
+ reg = <4>;
|
|
+ clocks = <&qca8k_nsscc NSS_CC_GEPHY3_SYS_CLK>;
|
|
+ resets = <&qca8k_nsscc NSS_CC_GEPHY3_SYS_ARES>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
--- /dev/null
|
|
+++ b/include/dt-bindings/net/qcom,qca808x.h
|
|
@@ -0,0 +1,14 @@
|
|
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
|
+/*
|
|
+ * Device Tree constants for the Qualcomm QCA808X PHYs
|
|
+ */
|
|
+
|
|
+#ifndef _DT_BINDINGS_QCOM_QCA808X_H
|
|
+#define _DT_BINDINGS_QCOM_QCA808X_H
|
|
+
|
|
+/* PHY package modes of QCA8084 to apply the interface modes of two PCSes. */
|
|
+#define QCA808X_PCS1_10G_QXGMII_PCS0_UNUNSED 0
|
|
+#define QCA808X_PCS1_SGMII_MAC_PCS0_SGMII_MAC 1
|
|
+#define QCA808X_PCS1_SGMII_MAC_PCS0_SGMII_PHY 2
|
|
+
|
|
+#endif
|