xref: /freebsd-src/sys/contrib/device-tree/Bindings/pwm/pwm-mtk-disp.txt (revision c9ccf3a32da427475985b85d7df023ccfb138c27)
1c66ec88fSEmmanuel VadotMediaTek display PWM controller
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotRequired properties:
4c66ec88fSEmmanuel Vadot - compatible: should be "mediatek,<name>-disp-pwm":
5c66ec88fSEmmanuel Vadot   - "mediatek,mt2701-disp-pwm": found on mt2701 SoC.
6c66ec88fSEmmanuel Vadot   - "mediatek,mt6595-disp-pwm": found on mt6595 SoC.
75def4c47SEmmanuel Vadot   - "mediatek,mt8167-disp-pwm", "mediatek,mt8173-disp-pwm": found on mt8167 SoC.
8c66ec88fSEmmanuel Vadot   - "mediatek,mt8173-disp-pwm": found on mt8173 SoC.
9*c9ccf3a3SEmmanuel Vadot   - "mediatek,mt8183-disp-pwm": found on mt8183 SoC.$
10c66ec88fSEmmanuel Vadot - reg: physical base address and length of the controller's registers.
11c66ec88fSEmmanuel Vadot - #pwm-cells: must be 2. See pwm.yaml in this directory for a description of
12c66ec88fSEmmanuel Vadot   the cell format.
13c66ec88fSEmmanuel Vadot - clocks: phandle and clock specifier of the PWM reference clock.
14c66ec88fSEmmanuel Vadot - clock-names: must contain the following:
15c66ec88fSEmmanuel Vadot   - "main": clock used to generate PWM signals.
16c66ec88fSEmmanuel Vadot   - "mm": sync signals from the modules of mmsys.
17c66ec88fSEmmanuel Vadot - pinctrl-names: Must contain a "default" entry.
18c66ec88fSEmmanuel Vadot - pinctrl-0: One property must exist for each entry in pinctrl-names.
19c66ec88fSEmmanuel Vadot   See pinctrl/pinctrl-bindings.txt for details of the property values.
20c66ec88fSEmmanuel Vadot
21c66ec88fSEmmanuel VadotExample:
22c66ec88fSEmmanuel Vadot	pwm0: pwm@1401e000 {
23c66ec88fSEmmanuel Vadot		compatible = "mediatek,mt8173-disp-pwm",
24c66ec88fSEmmanuel Vadot			     "mediatek,mt6595-disp-pwm";
25c66ec88fSEmmanuel Vadot		reg = <0 0x1401e000 0 0x1000>;
26c66ec88fSEmmanuel Vadot		#pwm-cells = <2>;
27c66ec88fSEmmanuel Vadot		clocks = <&mmsys CLK_MM_DISP_PWM026M>,
28c66ec88fSEmmanuel Vadot			 <&mmsys CLK_MM_DISP_PWM0MM>;
29c66ec88fSEmmanuel Vadot		clock-names = "main", "mm";
30c66ec88fSEmmanuel Vadot		pinctrl-names = "default";
31c66ec88fSEmmanuel Vadot		pinctrl-0 = <&disp_pwm0_pins>;
32c66ec88fSEmmanuel Vadot	};
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel Vadot	backlight_lcd: backlight_lcd {
35c66ec88fSEmmanuel Vadot		compatible = "pwm-backlight";
36c66ec88fSEmmanuel Vadot		pwms = <&pwm0 0 1000000>;
37c66ec88fSEmmanuel Vadot		brightness-levels = <
38c66ec88fSEmmanuel Vadot			  0  16  32  48  64  80  96 112
39c66ec88fSEmmanuel Vadot			128 144 160 176 192 208 224 240
40c66ec88fSEmmanuel Vadot			255
41c66ec88fSEmmanuel Vadot		>;
42c66ec88fSEmmanuel Vadot		default-brightness-level = <9>;
43c66ec88fSEmmanuel Vadot		power-supply = <&mt6397_vio18_reg>;
44c66ec88fSEmmanuel Vadot		enable-gpios = <&pio 95 GPIO_ACTIVE_HIGH>;
45c66ec88fSEmmanuel Vadot	};
46