i.mx 8ULP PWM on M33 core via SRTM/RPMSG from Linux

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.mx 8ULP PWM on M33 core via SRTM/RPMSG from Linux

407件の閲覧回数
niclas_karlsson
Contributor I

I have backlight connected to the PWM on the M33, PTC1 (TMP2_CH0). My understanding is that I can modify the device tree for Linux, running on the A35, to use rpmsg to control the PWM. That would allow me to control the backlight with the sysfs as normally.

How do I choose which TMP that shall be used? I couldn't find that information in the documentation.
My device tree has these entries for the backlight and PWM:

pwm_backlight: backlight {
    compatible = "pwm-backlight";
    pwms = <&tpm_rpchip_0 0 1000000 0>;
    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 = <100>;
    default-enable = <0>;
    status = "okay";
  };
};

&tpm_rpchip_0 {
  status = "okay";
};

And int the file imx8ulp-rpmsg.dtsi:

  tpm_rpchip_0: pwm {
    compatible = "fsl,pwm-rpchip";
    #pwm-cells = <3>;
    fsl,pwm-channel-number = <6>;
    status = "disabled";
  };

Thanks for the help!

0 件の賞賛
返信
2 返答(返信)

323件の閲覧回数
jimmychan
NXP TechSupport
NXP TechSupport

The alias in imx8ulp-rpmsg.dtsi decide which instance is used.

pwm0 = &tpm_rpchip_0;

The chip ID in driver is the instance number.

rdata->chip_id = of_alias_get_id(np, "pwm");
0 件の賞賛
返信

356件の閲覧回数
santhosh-madlapura
Contributor I

In Addition to @niclas_karlsson  mentioned
Previously the Backlight was configured for PTA3_TPM0_CH2 (A35) which is now moved to PTC1_TPM2_CH0(M33) in our case. Does the tpm_rpchip_0 (in files "imx8ulp-rpmsg.dtsi" and "imx8ulp-rom2620-a1.dts") has to be modified?.

Kindly let us know what are the modifications in device-tree files in that case.

0 件の賞賛
返信