Define J2.73 as PWM for backlight [SOLVED]

Moderators: Oren.R, Eran.M, fradensky

Jascha.K
Posts: 10
Joined: Tue Oct 04, 2016 7:01 am

Define J2.73 as PWM for backlight [SOLVED]

Postby Jascha.K » Mon Jan 30, 2017 12:55 pm

Hello again,
I want to define pin J2.73 SAI2_TX_DATA on our custom carrier board as pwm signal for display backlight. How should I define this in the devie tree? Currently it's used by 'sai2grp' and I don't have a clue how to achive this... Thanks again for your help.
Last edited by Jascha.K on Wed Feb 01, 2017 6:21 am, edited 1 time in total.

Jascha.K
Posts: 10
Joined: Tue Oct 04, 2016 7:01 am

Re: Define J2.73 as PWM for backlight

Postby Jascha.K » Wed Feb 01, 2017 6:21 am

We got it working. ;) My colleague had some good ideas to try. If anyone else is interested in this, we had to change two device tree files. First we had to define the clocks for PWM8 in 'imx6ul.dtsi'

Code: Select all

pwm8: pwm@020fc000 {
            compatible = "fsl,imx6ul-pwm", "fsl,imx27-pwm";
            reg = <0x020fc000 0x4000>;
            interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
            clocks = <&clks IMX6UL_CLK_PWM8>,
                <&clks IMX6UL_CLK_PWM8>;
            clock-names = "ipg", "per";
            #pwm-cells = <2>;
         };


and second we had to change the 'imx6ul-var-dart.dtsi'

Code: Select all

backlight {
      compatible = "pwm-backlight";
      pwms = <&pwm8 0 20000>;
      brightness-levels = <0 4 8 16 32 64 128 255>;
      default-brightness-level = <6>;
      status = "okay";
   };
   
...

&pwm8 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_pwm8>;
   status = "okay";
};

...

pinctrl_pwm8: pwm8grp {
         fsl,pins = <
            MX6UL_PAD_JTAG_TRST_B__PWM8_OUT      0x110b0
         >;
      };


Return to “Yocto”

Who is online

Users browsing this forum: No registered users and 2 guests

cron