Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

backlight: rt4831: Adds DT binding document for Richtek RT4831 backlight

Adds DT binding document for Richtek RT4831 backlight.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

ChiYuan Huang and committed by
Lee Jones
4f10f31e a1649a52

+85
+62
Documentation/devicetree/bindings/leds/backlight/richtek,rt4831-backlight.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/leds/backlight/richtek,rt4831-backlight.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Richtek RT4831 Backlight 8 + 9 + maintainers: 10 + - ChiYuan Huang <cy_huang@richtek.com> 11 + 12 + description: | 13 + RT4831 is a mutifunctional device that can provide power to the LCD display 14 + and LCD backlight. 15 + 16 + For the LCD backlight, it can provide four channel WLED driving capability. 17 + Each channel driving current is up to 30mA 18 + 19 + Datasheet is available at 20 + https://www.richtek.com/assets/product_file/RT4831A/DS4831A-05.pdf 21 + 22 + allOf: 23 + - $ref: common.yaml# 24 + 25 + properties: 26 + compatible: 27 + const: richtek,rt4831-backlight 28 + 29 + default-brightness: 30 + minimum: 0 31 + maximum: 2048 32 + 33 + max-brightness: 34 + minimum: 0 35 + maximum: 2048 36 + 37 + richtek,pwm-enable: 38 + description: | 39 + Specify the backlight dimming following by PWM duty or by SW control. 40 + type: boolean 41 + 42 + richtek,bled-ovp-sel: 43 + description: | 44 + Backlight OVP level selection, currently support 17V/21V/25V/29V. 45 + $ref: /schemas/types.yaml#/definitions/uint8 46 + default: 1 47 + minimum: 0 48 + maximum: 3 49 + 50 + richtek,channel-use: 51 + description: | 52 + Backlight LED channel to be used. 53 + BIT 0/1/2/3 is used to indicate led channel 1/2/3/4 enable or disable. 54 + $ref: /schemas/types.yaml#/definitions/uint8 55 + minimum: 1 56 + maximum: 15 57 + 58 + required: 59 + - compatible 60 + - richtek,channel-use 61 + 62 + additionalProperties: false
+23
include/dt-bindings/leds/rt4831-backlight.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ 2 + /* 3 + * This header provides constants for rt4831 backlight bindings. 4 + * 5 + * Copyright (C) 2020, Richtek Technology Corp. 6 + * Author: ChiYuan Huang <cy_huang@richtek.com> 7 + */ 8 + 9 + #ifndef _DT_BINDINGS_RT4831_BACKLIGHT_H 10 + #define _DT_BINDINGS_RT4831_BACKLIGHT_H 11 + 12 + #define RT4831_BLOVPLVL_17V 0 13 + #define RT4831_BLOVPLVL_21V 1 14 + #define RT4831_BLOVPLVL_25V 2 15 + #define RT4831_BLOVPLVL_29V 3 16 + 17 + #define RT4831_BLED_CH1EN (1 << 0) 18 + #define RT4831_BLED_CH2EN (1 << 1) 19 + #define RT4831_BLED_CH3EN (1 << 2) 20 + #define RT4831_BLED_CH4EN (1 << 3) 21 + #define RT4831_BLED_ALLCHEN ((1 << 4) - 1) 22 + 23 + #endif /* _DT_BINDINGS_RT4831_BACKLIGHT_H */