driver: clock: Add clock controller support in NPCX series.
Add clock controller support for Nuvoton NPCX series. This CL includes: 1. Add clock controller device tree declarations. 2. Introduce clock-cells in yaml file clock tree to get module's source clock and turn off/on the its clock 3. Clock controller driver implementation. Signed-off-by: Mulin Chao <MLChao@nuvoton.com>
This commit is contained in:
parent
ec50b1846f
commit
0245a27bc5
14 changed files with 555 additions and 0 deletions
32
include/dt-bindings/clock/npcx_clock.h
Normal file
32
include/dt-bindings/clock/npcx_clock.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2020 Nuvoton Technology Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_NPCX_CLOCK_H_
|
||||
#define ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_NPCX_CLOCK_H_
|
||||
|
||||
/* clock bus references */
|
||||
#define NPCX_CLOCK_BUS_FREERUN 0
|
||||
#define NPCX_CLOCK_BUS_LFCLK 1
|
||||
#define NPCX_CLOCK_BUS_OSC 2
|
||||
#define NPCX_CLOCK_BUS_FIU 3
|
||||
#define NPCX_CLOCK_BUS_CORE 4
|
||||
#define NPCX_CLOCK_BUS_APB1 5
|
||||
#define NPCX_CLOCK_BUS_APB2 6
|
||||
#define NPCX_CLOCK_BUS_APB3 7
|
||||
#define NPCX_CLOCK_BUS_APB4 8
|
||||
#define NPCX_CLOCK_BUS_AHB6 9
|
||||
|
||||
/* clock enable/disable references */
|
||||
#define NPCX_PWDWN_CTL1 0
|
||||
#define NPCX_PWDWN_CTL2 1
|
||||
#define NPCX_PWDWN_CTL3 2
|
||||
#define NPCX_PWDWN_CTL4 3
|
||||
#define NPCX_PWDWN_CTL5 4
|
||||
#define NPCX_PWDWN_CTL6 5
|
||||
#define NPCX_PWDWN_CTL7 6
|
||||
#define NPCX_PWDWN_CTL8 7
|
||||
#define NPCX_PWDWN_CTL_NONE 8
|
||||
|
||||
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_NPCX_CLOCK_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue