gd,gd32f527-rcu

Description

GigaDevice GD32F527 RCU Clock Tree Configuration

GigaDevice GD32F527 Reset and Clock Unit (RCU) system clock tree
configuration.

This binding complements the MFD "gd,gd32-rcu" binding
(mfd/gd,gd32-rcu.yaml) and models the GD32F527 system clock source
selection and the AHB/APB bus prescalers. The RCU node keeps its MFD
role (parent of the CCTL and RCTL child nodes) and additionally carries
the clock tree configuration.

GD32F527 exposes a dedicated RCU_PLL register with PSC/N/P/Q fields.
The main PLL configuration is described by the gd,gd32-pll-clock node
referenced from "clocks".

Example:

  rcu: reset-clock-controller@40023800 {
      compatible = "gd,gd32f527-rcu", "gd,gd32-rcu";
      clocks = <&pll>;               /* Select PLL as SYSCLK source */
      clock-frequency = <DT_FREQ_M(200)>; /* = SYSCLK / AHB prescaler */
      ahb-prescaler = <1>;
      apb1-prescaler = <4>;
      apb2-prescaler = <2>;
  };

Properties

Properties not inherited from the base binding file.

Name

Type

Details

clock-frequency

int

HCLK frequency (Hz) = SYSCLK / AHB prescaler. It is the single
source for SYS_CLOCK_HW_CYCLES_PER_SEC and bus clock rates, and is
checked at build time against the configured clock tree.

This property is required.

ahb-prescaler

int

AHB prescaler. Defines actual core clock frequency (HCLK).
SYSCLK must not exceed 200 MHz.

Default value: 1

Legal values: 1, 2, 4, 8, 16, 64, 128, 256, 512

apb1-prescaler

int

APB1 prescaler. APB1 clock (HCLK / prescaler) must not exceed 50 MHz.

Default value: 4

Legal values: 1, 2, 4, 8, 16

apb2-prescaler

int

APB2 prescaler. APB2 clock (HCLK / prescaler) must not exceed 100 MHz.

Default value: 2

Legal values: 1, 2, 4, 8, 16

gd,ck48m-source

string

Select the CK48M clock source. CK48M is used by TRNG/SDIO/USBFS/USBHS.
When set to "irc48m", the SoC initialization code enables the IRC48M
oscillator and selects it as CK48M source.
When set to "pll48m", the SoC initialization code selects PLL48M as CK48M
source (see gd,pll48m-source).

Legal values: irc48m, pll48m

gd,pll48m-source

string

Select the PLL48M source (CK_PLLQ or CK_PLLSAIP) when gd,ck48m-source is
set to "pll48m". This does not configure PLL/PLLSAI parameters; board
clock configuration must ensure the selected source provides a valid
48MHz clock domain.

Default value: pllq

Legal values: pllq, pllsaip