microchip,tc-g1-pwm

Description

Microchip PWM TC g1 driver.

Microchip PWM TC g1 driver.

This driver is responsible for configuring
and managing the TC peripheral in Microchip microcontrollers for PWM configuration.
The supported devices :
  - tc-u2249 (3.0.0)

Example usage in a Device Tree Source (DTS) file:

   pwm_led0: pwm_led_0 {
       status = "okay";
       pwms = <&tc0 1 PWM_MSEC(20) 0>;
   };

Explanation:
   - 'pwm_led0' is a node representing a device (e.g., an LED) controlled by PWM.
   - The 'pwms' property uses the phandle to the PWM controller (here, 'tc0'),
     specifies channel 2, sets the PWM period to 20 milliseconds,
     and uses a polarity of 0 (normal).
   - The order of the 'pwms' arguments matches the 'pwm-cells' definition:
       <&controller channel period polarity>
   - This allows the device to be driven with a specific PWM configuration using
     the Microchip PWM TC driver.

Properties

Properties not inherited from the base binding file.

Name

Type

Details

#pwm-cells

int

Number of items to expect in a pwm specifier

This property is required.

Constant value: 3

prescaler

int

Timer prescaler values.

The prescaler divides the input clock frequency to
achieve the desired timer frequency.

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

channels

int

This property indicates the maximum available channels in a peripheral instance

This property is required.

max-bit-width

int

Maximum bit width supported by the PWM counter.

This property specifies the resolution of the counter. The value provided
in the device tree should reflect the maximum supported by the hardware
instance. It should only be overridden after consulting the relevant family
datasheet to ensure compatibility.

This property is required.

Legal values: 8, 16, 32

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