microchip,pwm-g1

Description

Microchip PWM g1 driver.

Microchip Pulse Width Modulation Controller (PWM).

Group g1 PWM driver supports following hardware peripherals:
  - module name="PWM" id="6343" version="802"

This driver is responsible for configuring and managing the PWM peripheral in
Microchip microprocessors.

Examples

/* 'pwm_led0' is a node representing a device (e.g., an LED) controlled by PWM. */
pwm_led0: pwm_led_0 {
  status = "okay";
  /*
   * The 'pwms' property uses the phandle to the PWM controller (here, 'pwm0'),
   * specifies channel 1, sets the PWM period to 20 milliseconds, and uses a
   * polarity of normal.
   *
   * The order of the 'pwms' arguments matches the 'pwm-cells' definition:
   * <&controller channel period polarity>
   */
  pwms = <&pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

clka-prescaler

int

CLKA Source Clock Selection.
CLKA is derived by dividing the peripheral clock by this prescaler.

Default value: 1

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

clka-divide-factor

int

CLKA Divide Factor.
  0: CLKA clock is turned off
  1: CLKA clock is clock selected by PREA
  2 - 255: CLKA clock is clock selected by PREA divided by this factor

Default value: 0

Value range: 0 to 255

clkb-prescaler

int

CLKB Source Clock Selection.
CLKB is derived by dividing the peripheral clock by this prescaler.

Default value: 1

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

clkb-divide-factor

int

CLKB Divide Factor.
  0: CLKB clock is turned off
  1: CLKB clock is clock selected by PREB
  2 - 255: CLKB clock is clock selected by PREB divided by this factor

Default value: 0

Value range: 0 to 255

#pwm-cells

int

Number of items to expect in a pwm specifier

This property is required.

Constant value: 3

channels

int

Number of PWM channels supported by the controller.

pinctrl-0

phandles

Pin configuration/s for the first state. Content is specific to the
selected pin controller driver implementation.

pinctrl-1

phandles

Pin configuration/s for the second state. See pinctrl-0.

pinctrl-2

phandles

Pin configuration/s for the third state. See pinctrl-0.

pinctrl-3

phandles

Pin configuration/s for the fourth state. See pinctrl-0.

pinctrl-4

phandles

Pin configuration/s for the fifth state. See pinctrl-0.

pinctrl-names

string-array

Names for the provided states. The number of names needs to match the
number of states.

Specifier cell names

  • pwm cells: channel, period, polarity