Skip to content

Commit 06ac256

Browse files
Luo Jieandersson
authored andcommitted
dt-bindings: clock: qcom: Add NSS clock controller for IPQ5424 SoC
NSS clock controller provides the clocks and resets to the networking blocks such as PPE (Packet Process Engine) and UNIPHY (PCS) on IPQ5424 devices. Add support for the compatible string "qcom,ipq5424-nsscc" based on the existing IPQ9574 NSS clock controller Device Tree binding. Additionally, update the clock names for PPE and NSS for newer SoC additions like IPQ5424 to use generic and reusable identifiers "nss" and "ppe" without the clock rate suffix. Also add master/slave ids for IPQ5424 networking interfaces, which is used by nss-ipq5424 driver for providing interconnect services using icc-clk framework. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Luo Jie <quic_luoj@quicinc.com> Link: https://lore.kernel.org/r/20251014-qcom_ipq5424_nsscc-v7-7-081f4956be02@quicinc.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 60c8b75 commit 06ac256

4 files changed

Lines changed: 178 additions & 8 deletions

File tree

Documentation/devicetree/bindings/clock/qcom,ipq9574-nsscc.yaml

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,37 @@
44
$id: http://devicetree.org/schemas/clock/qcom,ipq9574-nsscc.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: Qualcomm Networking Sub System Clock & Reset Controller on IPQ9574
7+
title: Qualcomm Networking Sub System Clock & Reset Controller on IPQ9574 and IPQ5424
88

99
maintainers:
1010
- Bjorn Andersson <andersson@kernel.org>
1111
- Anusha Rao <quic_anusha@quicinc.com>
1212

1313
description: |
1414
Qualcomm networking sub system clock control module provides the clocks,
15-
resets on IPQ9574
15+
resets on IPQ9574 and IPQ5424
1616
17-
See also::
17+
See also:
18+
include/dt-bindings/clock/qcom,ipq5424-nsscc.h
1819
include/dt-bindings/clock/qcom,ipq9574-nsscc.h
20+
include/dt-bindings/reset/qcom,ipq5424-nsscc.h
1921
include/dt-bindings/reset/qcom,ipq9574-nsscc.h
2022
2123
properties:
2224
compatible:
23-
const: qcom,ipq9574-nsscc
25+
enum:
26+
- qcom,ipq5424-nsscc
27+
- qcom,ipq9574-nsscc
2428

2529
clocks:
2630
items:
2731
- description: Board XO source
28-
- description: CMN_PLL NSS 1200MHz (Bias PLL cc) clock source
29-
- description: CMN_PLL PPE 353MHz (Bias PLL ubi nc) clock source
32+
- description: CMN_PLL NSS (Bias PLL cc) clock source. This clock rate
33+
can vary for different IPQ SoCs. For example, it is 1200 MHz on the
34+
IPQ9574 and 300 MHz on the IPQ5424.
35+
- description: CMN_PLL PPE (Bias PLL ubi nc) clock source. The clock
36+
rate can vary for different IPQ SoCs. For example, it is 353 MHz
37+
on the IPQ9574 and 375 MHz on the IPQ5424.
3038
- description: GCC GPLL0 OUT AUX clock source
3139
- description: Uniphy0 NSS Rx clock source
3240
- description: Uniphy0 NSS Tx clock source
@@ -42,8 +50,12 @@ properties:
4250
clock-names:
4351
items:
4452
- const: xo
45-
- const: nss_1200
46-
- const: ppe_353
53+
- enum:
54+
- nss_1200
55+
- nss
56+
- enum:
57+
- ppe_353
58+
- ppe
4759
- const: gpll0_out
4860
- const: uniphy0_rx
4961
- const: uniphy0_tx
@@ -60,6 +72,40 @@ required:
6072

6173
allOf:
6274
- $ref: qcom,gcc.yaml#
75+
- if:
76+
properties:
77+
compatible:
78+
const: qcom,ipq9574-nsscc
79+
then:
80+
properties:
81+
clock-names:
82+
items:
83+
- const: xo
84+
- const: nss_1200
85+
- const: ppe_353
86+
- const: gpll0_out
87+
- const: uniphy0_rx
88+
- const: uniphy0_tx
89+
- const: uniphy1_rx
90+
- const: uniphy1_tx
91+
- const: uniphy2_rx
92+
- const: uniphy2_tx
93+
- const: bus
94+
else:
95+
properties:
96+
clock-names:
97+
items:
98+
- const: xo
99+
- const: nss
100+
- const: ppe
101+
- const: gpll0_out
102+
- const: uniphy0_rx
103+
- const: uniphy0_tx
104+
- const: uniphy1_rx
105+
- const: uniphy1_tx
106+
- const: uniphy2_rx
107+
- const: uniphy2_tx
108+
- const: bus
63109

64110
unevaluatedProperties: false
65111

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2+
/*
3+
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
4+
*/
5+
6+
#ifndef _DT_BINDINGS_CLOCK_QCOM_IPQ5424_NSSCC_H
7+
#define _DT_BINDINGS_CLOCK_QCOM_IPQ5424_NSSCC_H
8+
9+
/* NSS_CC clocks */
10+
#define NSS_CC_CE_APB_CLK 0
11+
#define NSS_CC_CE_AXI_CLK 1
12+
#define NSS_CC_CE_CLK_SRC 2
13+
#define NSS_CC_CFG_CLK_SRC 3
14+
#define NSS_CC_DEBUG_CLK 4
15+
#define NSS_CC_EIP_BFDCD_CLK_SRC 5
16+
#define NSS_CC_EIP_CLK 6
17+
#define NSS_CC_NSS_CSR_CLK 7
18+
#define NSS_CC_NSSNOC_CE_APB_CLK 8
19+
#define NSS_CC_NSSNOC_CE_AXI_CLK 9
20+
#define NSS_CC_NSSNOC_EIP_CLK 10
21+
#define NSS_CC_NSSNOC_NSS_CSR_CLK 11
22+
#define NSS_CC_NSSNOC_PPE_CFG_CLK 12
23+
#define NSS_CC_NSSNOC_PPE_CLK 13
24+
#define NSS_CC_PORT1_MAC_CLK 14
25+
#define NSS_CC_PORT1_RX_CLK 15
26+
#define NSS_CC_PORT1_RX_CLK_SRC 16
27+
#define NSS_CC_PORT1_RX_DIV_CLK_SRC 17
28+
#define NSS_CC_PORT1_TX_CLK 18
29+
#define NSS_CC_PORT1_TX_CLK_SRC 19
30+
#define NSS_CC_PORT1_TX_DIV_CLK_SRC 20
31+
#define NSS_CC_PORT2_MAC_CLK 21
32+
#define NSS_CC_PORT2_RX_CLK 22
33+
#define NSS_CC_PORT2_RX_CLK_SRC 23
34+
#define NSS_CC_PORT2_RX_DIV_CLK_SRC 24
35+
#define NSS_CC_PORT2_TX_CLK 25
36+
#define NSS_CC_PORT2_TX_CLK_SRC 26
37+
#define NSS_CC_PORT2_TX_DIV_CLK_SRC 27
38+
#define NSS_CC_PORT3_MAC_CLK 28
39+
#define NSS_CC_PORT3_RX_CLK 29
40+
#define NSS_CC_PORT3_RX_CLK_SRC 30
41+
#define NSS_CC_PORT3_RX_DIV_CLK_SRC 31
42+
#define NSS_CC_PORT3_TX_CLK 32
43+
#define NSS_CC_PORT3_TX_CLK_SRC 33
44+
#define NSS_CC_PORT3_TX_DIV_CLK_SRC 34
45+
#define NSS_CC_PPE_CLK_SRC 35
46+
#define NSS_CC_PPE_EDMA_CFG_CLK 36
47+
#define NSS_CC_PPE_EDMA_CLK 37
48+
#define NSS_CC_PPE_SWITCH_BTQ_CLK 38
49+
#define NSS_CC_PPE_SWITCH_CFG_CLK 39
50+
#define NSS_CC_PPE_SWITCH_CLK 40
51+
#define NSS_CC_PPE_SWITCH_IPE_CLK 41
52+
#define NSS_CC_UNIPHY_PORT1_RX_CLK 42
53+
#define NSS_CC_UNIPHY_PORT1_TX_CLK 43
54+
#define NSS_CC_UNIPHY_PORT2_RX_CLK 44
55+
#define NSS_CC_UNIPHY_PORT2_TX_CLK 45
56+
#define NSS_CC_UNIPHY_PORT3_RX_CLK 46
57+
#define NSS_CC_UNIPHY_PORT3_TX_CLK 47
58+
#define NSS_CC_XGMAC0_PTP_REF_CLK 48
59+
#define NSS_CC_XGMAC0_PTP_REF_DIV_CLK_SRC 49
60+
#define NSS_CC_XGMAC1_PTP_REF_CLK 50
61+
#define NSS_CC_XGMAC1_PTP_REF_DIV_CLK_SRC 51
62+
#define NSS_CC_XGMAC2_PTP_REF_CLK 52
63+
#define NSS_CC_XGMAC2_PTP_REF_DIV_CLK_SRC 53
64+
65+
#endif

include/dt-bindings/interconnect/qcom,ipq5424.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,17 @@
4444
#define MASTER_CPU 0
4545
#define SLAVE_L3 1
4646

47+
#define MASTER_NSSNOC_PPE 0
48+
#define SLAVE_NSSNOC_PPE 1
49+
#define MASTER_NSSNOC_PPE_CFG 2
50+
#define SLAVE_NSSNOC_PPE_CFG 3
51+
#define MASTER_NSSNOC_NSS_CSR 4
52+
#define SLAVE_NSSNOC_NSS_CSR 5
53+
#define MASTER_NSSNOC_CE_AXI 6
54+
#define SLAVE_NSSNOC_CE_AXI 7
55+
#define MASTER_NSSNOC_CE_APB 8
56+
#define SLAVE_NSSNOC_CE_APB 9
57+
#define MASTER_NSSNOC_EIP 10
58+
#define SLAVE_NSSNOC_EIP 11
59+
4760
#endif /* INTERCONNECT_QCOM_IPQ5424_H */
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2+
/*
3+
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
4+
*/
5+
6+
#ifndef _DT_BINDINGS_RESET_QCOM_IPQ5424_NSSCC_H
7+
#define _DT_BINDINGS_RESET_QCOM_IPQ5424_NSSCC_H
8+
9+
#define NSS_CC_CE_APB_CLK_ARES 0
10+
#define NSS_CC_CE_AXI_CLK_ARES 1
11+
#define NSS_CC_DEBUG_CLK_ARES 2
12+
#define NSS_CC_EIP_CLK_ARES 3
13+
#define NSS_CC_NSS_CSR_CLK_ARES 4
14+
#define NSS_CC_NSSNOC_CE_APB_CLK_ARES 5
15+
#define NSS_CC_NSSNOC_CE_AXI_CLK_ARES 6
16+
#define NSS_CC_NSSNOC_EIP_CLK_ARES 7
17+
#define NSS_CC_NSSNOC_NSS_CSR_CLK_ARES 8
18+
#define NSS_CC_NSSNOC_PPE_CLK_ARES 9
19+
#define NSS_CC_NSSNOC_PPE_CFG_CLK_ARES 10
20+
#define NSS_CC_PORT1_MAC_CLK_ARES 11
21+
#define NSS_CC_PORT1_RX_CLK_ARES 12
22+
#define NSS_CC_PORT1_TX_CLK_ARES 13
23+
#define NSS_CC_PORT2_MAC_CLK_ARES 14
24+
#define NSS_CC_PORT2_RX_CLK_ARES 15
25+
#define NSS_CC_PORT2_TX_CLK_ARES 16
26+
#define NSS_CC_PORT3_MAC_CLK_ARES 17
27+
#define NSS_CC_PORT3_RX_CLK_ARES 18
28+
#define NSS_CC_PORT3_TX_CLK_ARES 19
29+
#define NSS_CC_PPE_BCR 20
30+
#define NSS_CC_PPE_EDMA_CLK_ARES 21
31+
#define NSS_CC_PPE_EDMA_CFG_CLK_ARES 22
32+
#define NSS_CC_PPE_SWITCH_BTQ_CLK_ARES 23
33+
#define NSS_CC_PPE_SWITCH_CLK_ARES 24
34+
#define NSS_CC_PPE_SWITCH_CFG_CLK_ARES 25
35+
#define NSS_CC_PPE_SWITCH_IPE_CLK_ARES 26
36+
#define NSS_CC_UNIPHY_PORT1_RX_CLK_ARES 27
37+
#define NSS_CC_UNIPHY_PORT1_TX_CLK_ARES 28
38+
#define NSS_CC_UNIPHY_PORT2_RX_CLK_ARES 29
39+
#define NSS_CC_UNIPHY_PORT2_TX_CLK_ARES 30
40+
#define NSS_CC_UNIPHY_PORT3_RX_CLK_ARES 31
41+
#define NSS_CC_UNIPHY_PORT3_TX_CLK_ARES 32
42+
#define NSS_CC_XGMAC0_PTP_REF_CLK_ARES 33
43+
#define NSS_CC_XGMAC1_PTP_REF_CLK_ARES 34
44+
#define NSS_CC_XGMAC2_PTP_REF_CLK_ARES 35
45+
46+
#endif

0 commit comments

Comments
 (0)