Tool/software:
Dear TI
My custom board is simiilar to E3 and I am using SDK 9.0.
We face difficulty to light up our LCD backlight and control PWM (brightness).
According to our custom board schematic, and I referred to this thread, e2e.ti.com/.../am625-use-gpio0_33-as-pwm-for-display-backlight-on-custom-am625-som
I define the DTS, but it does not work. Please help to provide us the dts. Thanks.
diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index 74e34b84419a..048d96cfd1a2 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -581,7 +581,7 @@ ti,itap-del-sel-sdr12 = <0xa>; ti,itap-del-sel-sdr25 = <0x1>; ti,clkbuf-sel = <0x7>; - bus-width = <4>; + bus-width = <1>; status = "disabled"; }; diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index b1737978103b..486ba5b16145 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -28,7 +28,19 @@ reg = <0x00000000 0x80000000 0x00000000 0x80000000>; }; - + + backlight_lvds: backlight-lvds { + compatible = "pwm-backlight"; + + led0 { + pwms = <&epwm0 0 50000 1>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <32>; + linux,default-trigger = "default-on"; + status = "okay"; + }; + }; + vmain_pd: regulator-0 { /* TPS65988 PD CONTROLLER OUTPUT */ compatible = "regulator-fixed"; @@ -68,9 +80,10 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-boot-on; - enable-active-high; + /* enable-active-high; */ vin-supply = <&vcc_3v3_sys>; - gpio = <&exp1 3 GPIO_ACTIVE_HIGH>; + regulator-always-on; + /* gpio = <&exp1 3 GPIO_ACTIVE_HIGH>; */ }; vdd_sd_dv: regulator-4 { @@ -82,7 +95,8 @@ regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-boot-on; - vin-supply = <&vcc_5v0>; + regulator-always-on; + vin-supply = <&vcc_3v3_sys>; gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>; states = <1800000 0x0>, <3300000 0x1>; @@ -191,6 +205,18 @@ AM62X_IOPAD(0x128, PIN_INPUT, 7) /* (B23) MMC2_SDWP.GPIO0_72 */ >; }; + + epwm0bl_pins_default: epwm0bl-default-pins { + pinctrl-single,pins = < + AM62X_IOPAD(0x01b4, PIN_OUTPUT_PULLUP, 2) /* (A13) SPI0_CS0.EHRPWM0_A */ + >; + }; +}; + +&epwm0 { + pinctrl-names = "default"; + pinctrl-0 = <&epwm0bl_pins_default>; + status = "okay"; }; &main_i2c1 { @@ -223,6 +249,7 @@ }; &sdhci1 { + status = "okay"; vmmc-supply = <&vdd_mmc1>; vqmmc-supply = <&vdd_sd_dv>; };