How to assign sdma channel to pwm in device-tree

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

How to assign sdma channel to pwm in device-tree

607件の閲覧回数
ganesh_k
Contributor III

Hello everyone,

               Have to assign one sdma channel to pwm for data transfer, can you please tell me how to pass the parameters through device-tree.

Here i m using the pwm to generate the audio.

below the params(sdma-params) need to pass from the device-tree

 /* Read SDMA channel number and load address */
     if (of_property_read_u32_array(pdev->dev.of_node, "sdma-params",
     sdma_params, ARRAY_SIZE(sdma_params)) == 0) {
     self->sdma_ch_num = sdma_params[0];
     self->sdma_script_origin = sdma_params[1];
   } else {    
         dev_err(&pdev->dev, "sdma-params property not specified");
         goto failed_sdma_init;  
          }  

and below is my device-tree:
**************************** 

&pwm3 {
          comaptible = "glowforge,imx-pwm-audio";
         pinctrl-names = "default";
         pinctrl-0 = <&pinctrl_pwm3>;
         enable-gpio = <&gpio1 4 0>;
         timer = <0x10>;
         sdma-params = <0x19 0xdc0>;
         status = "okay";`       }

can anyone please help me out from this issue.

Thank you all....

ラベル(3)
0 件の賞賛
返信
1 返信

521件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Ganesh

nxp bsps do not support pwm sdma, one can look at third party efforts with custom sdma script

GitHub - Glowforge/kernel-module-imx-pwm-audio: i.MX6 PWM audio driver 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信