PWM using I2C with ADP5585

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PWM using I2C with ADP5585

1,248 Views
Rakesh_Kumar-Thakur
Contributor III

Hi NXP,

Hi, I am working on board imx93evk, I want to control LVDS brightness with I2c, the base board I2C device is ADP5585ACxZ-01-R7 at address 0x34 pin LVDS_BLT_PWM, I have data sheet for ADP5585ACxZ but I don't know much about how to use this i2c device  And how to control LVDS brightness using this device. Please provide example with document if possible.

I want output about pwm on pin R3 LVDS_BLT_PWM

Screenshot from 2024-10-21 18-07-03.png

0 Kudos
Reply
2 Replies

1,221 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @Rakesh_Kumar-Thakur 

I hope you are doing very well.

 

Please take a look to the imx93-11x11-evk-boe-wxga-lvds-panel.dts on the kernel git.

There you can see the node called lvds_backlight: lvds_backlight:

lvds_backlight: lvds_backlight {
		compatible = "pwm-backlight";
		pwms = <&adp5585pwm 0 100000 0>;
		enable-gpios = <&adp5585gpio 8 GPIO_ACTIVE_HIGH>;
		power-supply = <&reg_vdd_12v>;
		status = "okay";

		brightness-levels = < 0  1  2  3  4  5  6  7  8  9
				     10 11 12 13 14 15 16 17 18 19
				     20 21 22 23 24 25 26 27 28 29
				     30 31 32 33 34 35 36 37 38 39
				     40 41 42 43 44 45 46 47 48 49
				     50 51 52 53 54 55 56 57 58 59
				     60 61 62 63 64 65 66 67 68 69
				     70 71 72 73 74 75 76 77 78 79
				     80 81 82 83 84 85 86 87 88 89
				     90 91 92 93 94 95 96 97 98 99
				    100>;
		default-brightness-level = <80>;
	};

 

You can see the pwms property is calling to the node adp5585pwm defined on imx93-11x11-evk.dts. Pin 3 (R3 of the adp5585).

The default brightness level is 80 and you can change it on user space:

 

root@imx93evk:/sys/class/backlight/lvds_backlight# echo 90 > brightness

Alejandro_Salas_0-1731695583736.png

 

root@imx93evk:/sys/class/backlight/lvds_backlight# echo 100 > brightness

Alejandro_Salas_1-1731695629280.png

 

root@imx93evk:/sys/class/backlight/lvds_backlight# echo 50 > brightness

Alejandro_Salas_2-1731695667674.png

 

I hope this information can helps to you!

 

Best regards,

Salas.

 

0 Kudos
Reply

1,123 Views
Rakesh_Kumar-Thakur
Contributor III

Hi @Manuel_Salas 

thank you so much for very use full support