Skip to content

LilyGO T-Deck Max: wire up the EPD frontlight #629

Description

@Crazypedia

Depends on #625 (optional frontlight support in the GDEQ031T10 driver), and is devicetree only.

The T-Deck Max has a frontlight on GPIO41 (BL_PWM) driven by LEDC. It has to be LEDC timer/channel 1, because channel 0 is already the keyboard backlight on this board.

display_backlight_pwm {
    compatible = "espressif,esp32-pwm-ledc";
    pin = <&gpio0 41 GPIO_FLAG_NONE>;
    period-ns = <33333>;
    ledc-timer = <1>;
    ledc-channel = <1>;
};

Verified on hardware: the brightness slider appears in Display settings and lights the panel.

One cosmetic thing worth mentioning. Boot logs W ledc: GPIO 41 is not usable, maybe conflict with others. It is benign: pwm_backlight's start() reserves the pin once, and the boot brightness apply reserves it again, and the second esp_gpio_reserve() warns. The panel lights correctly. Happy to look at silencing it if you would rather not ship a warning.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions