Skip to content

Commit 7aa2919

Browse files
LorenzoBianconibebarino
authored andcommitted
dt-bindings: clock: airoha: Add reset support to EN7581 clock binding
Introduce reset capability to EN7581 device-tree clock binding documentation. Add reset register mapping between misc scu and pb scu ones in order to follow the memory order. This change is not introducing any backward compatibility issue since the EN7581 dts is not upstream yet. Fixes: 0a382be ("dt-bindings: clock: airoha: add EN7581 binding") Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Link: https://lore.kernel.org/r/28fef3e83062d5d71e7b4be4b47583f851a15bf8.1719485847.git.lorenzo@kernel.org Signed-off-by: Stephen Boyd <[email protected]>
1 parent 6681afb commit 7aa2919

File tree

2 files changed

+90
-1
lines changed

2 files changed

+90
-1
lines changed

Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,18 @@ properties:
3535

3636
reg:
3737
minItems: 2
38-
maxItems: 3
38+
maxItems: 4
3939

4040
"#clock-cells":
4141
description:
4242
The first cell indicates the clock number, see [1] for available
4343
clocks.
4444
const: 1
4545

46+
'#reset-cells':
47+
description: ID of the controller reset line
48+
const: 1
49+
4650
required:
4751
- compatible
4852
- reg
@@ -60,6 +64,8 @@ allOf:
6064
- description: scu base address
6165
- description: misc scu base address
6266

67+
'#reset-cells': false
68+
6369
- if:
6470
properties:
6571
compatible:
@@ -70,6 +76,7 @@ allOf:
7076
items:
7177
- description: scu base address
7278
- description: misc scu base address
79+
- description: reset base address
7380
- description: pb scu base address
7481

7582
additionalProperties: false
@@ -83,3 +90,19 @@ examples:
8390
<0x1fb00000 0x1000>;
8491
#clock-cells = <1>;
8592
};
93+
94+
- |
95+
soc {
96+
#address-cells = <2>;
97+
#size-cells = <2>;
98+
99+
scuclk: clock-controller@1fa20000 {
100+
compatible = "airoha,en7581-scu";
101+
reg = <0x0 0x1fa20000 0x0 0x400>,
102+
<0x0 0x1fb00000 0x0 0x90>,
103+
<0x0 0x1fb00830 0x0 0x8>,
104+
<0x0 0x1fbe3400 0x0 0xfc>;
105+
#clock-cells = <1>;
106+
#reset-cells = <1>;
107+
};
108+
};
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
/*
3+
* Copyright (c) 2024 AIROHA Inc
4+
* Author: Lorenzo Bianconi <[email protected]>
5+
*/
6+
7+
#ifndef __DT_BINDINGS_RESET_CONTROLLER_AIROHA_EN7581_H_
8+
#define __DT_BINDINGS_RESET_CONTROLLER_AIROHA_EN7581_H_
9+
10+
/* RST_CTRL2 */
11+
#define EN7581_XPON_PHY_RST 0
12+
#define EN7581_CPU_TIMER2_RST 1
13+
#define EN7581_HSUART_RST 2
14+
#define EN7581_UART4_RST 3
15+
#define EN7581_UART5_RST 4
16+
#define EN7581_I2C2_RST 5
17+
#define EN7581_XSI_MAC_RST 6
18+
#define EN7581_XSI_PHY_RST 7
19+
#define EN7581_NPU_RST 8
20+
#define EN7581_I2S_RST 9
21+
#define EN7581_TRNG_RST 10
22+
#define EN7581_TRNG_MSTART_RST 11
23+
#define EN7581_DUAL_HSI0_RST 12
24+
#define EN7581_DUAL_HSI1_RST 13
25+
#define EN7581_HSI_RST 14
26+
#define EN7581_DUAL_HSI0_MAC_RST 15
27+
#define EN7581_DUAL_HSI1_MAC_RST 16
28+
#define EN7581_HSI_MAC_RST 17
29+
#define EN7581_WDMA_RST 18
30+
#define EN7581_WOE0_RST 19
31+
#define EN7581_WOE1_RST 20
32+
#define EN7581_HSDMA_RST 21
33+
#define EN7581_TDMA_RST 22
34+
#define EN7581_EMMC_RST 23
35+
#define EN7581_SOE_RST 24
36+
#define EN7581_PCIE2_RST 25
37+
#define EN7581_XFP_MAC_RST 26
38+
#define EN7581_USB_HOST_P1_RST 27
39+
#define EN7581_USB_HOST_P1_U3_PHY_RST 28
40+
/* RST_CTRL1 */
41+
#define EN7581_PCM1_ZSI_ISI_RST 29
42+
#define EN7581_FE_PDMA_RST 30
43+
#define EN7581_FE_QDMA_RST 31
44+
#define EN7581_PCM_SPIWP_RST 32
45+
#define EN7581_CRYPTO_RST 33
46+
#define EN7581_TIMER_RST 34
47+
#define EN7581_PCM1_RST 35
48+
#define EN7581_UART_RST 36
49+
#define EN7581_GPIO_RST 37
50+
#define EN7581_GDMA_RST 38
51+
#define EN7581_I2C_MASTER_RST 39
52+
#define EN7581_PCM2_ZSI_ISI_RST 40
53+
#define EN7581_SFC_RST 41
54+
#define EN7581_UART2_RST 42
55+
#define EN7581_GDMP_RST 43
56+
#define EN7581_FE_RST 44
57+
#define EN7581_USB_HOST_P0_RST 45
58+
#define EN7581_GSW_RST 46
59+
#define EN7581_SFC2_PCM_RST 47
60+
#define EN7581_PCIE0_RST 48
61+
#define EN7581_PCIE1_RST 49
62+
#define EN7581_CPU_TIMER_RST 50
63+
#define EN7581_PCIE_HB_RST 51
64+
#define EN7581_XPON_MAC_RST 52
65+
66+
#endif /* __DT_BINDINGS_RESET_CONTROLLER_AIROHA_EN7581_H_ */

0 commit comments

Comments
 (0)