Skip to content

Commit 2fbc456

Browse files
Phi Tranquytranpzz
authored andcommitted
drivers: clock control: Add support clock control for RX261
Add support clock control for RX261 Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
1 parent dc85507 commit 2fbc456

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

dts/bindings/clock/renesas,rx-cgc-root-clock.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ properties:
4343
enum:
4444
- 0
4545
- 1
46+
- 2
47+
- 3
48+
- 4
4649
description: |
4750
Drive Capacity Control (for Sub-Clock Oscillator only)
4851
0: Drive capacity for standard CL.
49-
1: Drive capacity for low CL.
52+
1: Drive capacity for low CL. (in case of rx261, not choose this)
53+
2: High-drive output for the low CL.
54+
3: Middle-drive output for the low CL
55+
4: Low-drive output for the low CL

include/zephyr/drivers/clock_control/renesas_rx_cgc.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@
1717
(UTIL_CAT(RX_CLOCKS_SOURCE_, DT_NODE_FULL_NAME_UPPER_TOKEN(node_id))), \
1818
(RX_CLOCKS_CLOCK_DISABLED))
1919

20+
#define RX_IF_CLK_SRC(node_id)\
21+
COND_CODE_1(DT_NODE_HAS_STATUS(node_id, okay),\
22+
(UTIL_CAT(RX_IF_CLOCKS_SOURCE_, DT_NODE_FULL_NAME_UPPER_TOKEN(node_id))),\
23+
(RX_CLOCKS_CLOCK_DISABLED))
24+
25+
#define RX_LPT_CLK_SRC(node_id)\
26+
COND_CODE_1(DT_NODE_HAS_STATUS(node_id, okay),\
27+
(UTIL_CAT(RX_LPT_CLOCKS_SOURCE_, DT_NODE_FULL_NAME_UPPER_TOKEN(node_id))),\
28+
(RX_LPT_CLOCKS_NON_USE))
29+
2030
struct clock_control_rx_pclk_cfg {
2131
const struct device *clock_src_dev;
2232
uint32_t clk_div;

include/zephyr/dt-bindings/clock/rx_clock.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
#define RX_CLOCKS_SOURCE_PLL 4
1515
#define RX_CLOCKS_SOURCE_CLOCK_DISABLE 0xff
1616

17+
#define RX_IF_CLOCKS_SOURCE_CLOCK_HOCO 0
18+
#define RX_IF_CLOCKS_SOURCE_CLOCK_LOCO 2
19+
#define RX_IF_CLOCKS_SOURCE_PLL 5
20+
#define RX_IF_CLOCKS_SOURCE_PLL2 6
21+
22+
#define RX_LPT_CLOCKS_SOURCE_CLOCK_SUBCLOCK 0
23+
#define RX_LPT_CLOCKS_SOURCE_CLOCK_IWDT_LOW_SPEED 1
24+
#define RX_LPT_CLOCKS_NON_USE 2
25+
#define RX_LPT_CLOCKS_SOURCE_CLOCK_LOCO 3
26+
1727
#define RX_PLL_MUL_4 7
1828
#define RX_PLL_MUL_4_5 8
1929
#define RX_PLL_MUL_5 9

0 commit comments

Comments
 (0)