<commit_before># Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0

description: |

  Espressif's LEDC controller Node

  The LEDC controller is primarily designed to control the intensity of LEDs, although it can be used to generate
  PWM signals for other purposes as well.

  The mapping between the channel and GPIO is done through pinctrl

    &ledc0 {
      pinctrl-0 = <&ledc0_ch0_gpio0>;
      pinctrl-names = "default";
    }

  The 'ledc0_ch0_gpio0' node is defined in <board>-pinctrl.dtsi.

    ledc0_ch0_gpio0: ledc0_ch0_gpio0 {
      pinmux = <LEDC_CH0_GPIO0>;
      output-enable;
    };

  If another mapping is desired, just check if the <board>-pinctrl.dtsi already have it defined, or feel free to include a new node.
  The 'pinmux' property uses a macro defined in https://github.com/zephyrproject-rtos/hal_espressif/tree/zephyr/include/dt-bindings/pinctrl
  Before including a new node, check if the desired mapping is available according to the SoC.

  It is possible to include multiple channel's mapping in the 'pinmux' property:

    &ledc0 {
      pinctrl-0 = <&ledc0_ch0_gpio0 &ledc0_ch9_gpio2 &ledc0_ch10_gpio4>;
      pinctrl-names = "default";
    }

  Use the child bindings to configure the desired channel:

    &ledc0 {
      pinctrl-0 = <&ledc0_ch0_gpio0 &ledc0_ch9_gpio2 &ledc0_ch10_gpio4>;
      pinctrl-names = "default";
      status = "okay";
      #address-cells = <1>;
      #size-cells = <0>;
      channel0@0 {
        reg = <0x0>;
        timer = <0>;
      };<commit_msg>esp32/s2/c3: bindings: pwm_led: doc update<commit_after># Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0

description: |

  Espressif's LEDC controller Node

  The LEDC controller is primarily designed to control the intensity of LEDs, although it can be used to generate
  PWM signals for other purposes as well.

  The mapping between the channel and GPIO is done through pinctrl

    &ledc0 {
      pinctrl-0 = <&ledc0_default>;
      pinctrl-names = "default";
    }

  The 'ledc0_default' node state is defined in <board>-pinctrl.dtsi.

    ledc0_default: ledc0_default {
            group1 {
                    pinmux = <LEDC_CH0_GPIO0>,
                             <LEDC_CH1_GPIO2>,
                             <LEDC_CH2_GPIO4>;
                    output-enable;
            };
    };

  If another GPIO mapping is desired, check if <board>-pinctrl.dtsi already have it defined, otherwise, define the
  required mapping at your own application folder into a custom <board>.overlay file.
  The 'pinmux' property uses a macro defined in https://github.com/zephyrproject-rtos/hal_espressif/tree/zephyr/include/dt-bindings/pinctrl
  Before including a new node, check if the desired mapping is available according to the SoC.

  As an example, the 'ledc0_custom' state below illustrates an alternate mapping using another set of channels and
  pins in a custom overlay file.

    &pinctrl {

            ledc0_custom:  ledc0_custom {
                    group1 {
                            pinmux = <LEDC_CH0_GPIO0>,
                                     <LEDC_CH9_GPIO2>,
                                     <LEDC_CH10_GPIO4>;
                            output-enable;
                    };
             };

    };

  Use the child bindings to configure the desired channel:

    &ledc0 {
      pinctrl-0 = <&ledc0_custom>;
      pinctrl-names = "default";
      status = "okay";
      #address-cells = <1>;
      #size-cells = <0>;
      channel0@0 {
        reg = <0x0>;
        timer = <0>;
      };
{'fraction_non_alphanumeric': 0.08416114790286976, 'fraction_numerical': 0.02676600441501104, 'mean_word_length': 2.3502772643253236, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 28, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5989647', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1130, 'n_words': 351}