mbox series

[v1,0/7] Patches to update for rockchip pdm

Message ID 1629791446-13528-1-git-send-email-sugar.zhang@rock-chips.com
Headers show
Series Patches to update for rockchip pdm | expand

Message

sugar zhang Aug. 24, 2021, 7:50 a.m. UTC
These patches fixup or update for rockchip pdm.


Sugar Zhang (7):
  ASoC: rockchip: Add support for rv1126 pdm
  ASoC: dt-bindings: rockchip: Add binding for rv1126 pdm
  ASoC: rockchip: pdm: Add support for rk3568 pdm
  ASoC: dt-bindings: rockchip: Add binding for rk3568 pdm
  ASoC: rockchip: pdm: Add support for path map
  ASoC: dt-bindings: rockchip: pdm: Document property
    'rockchip,path-map'
  ASoC: dt-bindings: rockchip: Convert pdm bindings to yaml

 .../devicetree/bindings/sound/rockchip,pdm.txt     |  46 ---------
 .../devicetree/bindings/sound/rockchip,pdm.yaml    | 114 +++++++++++++++++++++
 sound/soc/rockchip/rockchip_pdm.c                  | 112 ++++++++++++++++++--
 sound/soc/rockchip/rockchip_pdm.h                  |   6 ++
 4 files changed, 226 insertions(+), 52 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/rockchip,pdm.txt
 create mode 100644 Documentation/devicetree/bindings/sound/rockchip,pdm.yaml

Comments

Rob Herring (Arm) Aug. 24, 2021, 4:58 p.m. UTC | #1
On Tue, Aug 24, 2021 at 03:54:15PM +0800, Sugar Zhang wrote:
> This is an optional property to describe data path mapping.
> 
> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
> ---
> 
>  Documentation/devicetree/bindings/sound/rockchip,pdm.txt | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/sound/rockchip,pdm.txt b/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
> index 54d94438..b2d7e47 100644
> --- a/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
> +++ b/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
> @@ -24,6 +24,22 @@ Required properties:
>  	     pinctrl-names. See ../pinctrl/pinctrl-bindings.txt
>  	     for details of the property values.
>  
> +Optional properties:
> +- rockchip,path-map: This is a variable length array, that shows the mapping

The schema says this is a fixed length array.

> +  of SDIx to PATHx. By default, they are one-to-one mapping as follows:
> +
> +   path0 <-- sdi0
> +   path1 <-- sdi1
> +   path2 <-- sdi2
> +   path3 <-- sdi3
> +
> +  e.g. "rockchip,path-map = <3 2 1 0>" means the mapping as follows:
> +
> +   path0 <-- sdi3
> +   path1 <-- sdi2
> +   path2 <-- sdi1
> +   path3 <-- sdi0
> +
>  Example for rk3328 PDM controller:
>  
>  pdm: pdm@ff040000 {
> -- 
> 2.7.4
> 
> 
> 
>
sugar zhang Aug. 27, 2021, 1:30 a.m. UTC | #2
Hi Rob,

On 2021/8/25 0:58, Rob Herring wrote:
> On Tue, Aug 24, 2021 at 03:54:15PM +0800, Sugar Zhang wrote:
>> This is an optional property to describe data path mapping.
>>
>> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
>> ---
>>
>>   Documentation/devicetree/bindings/sound/rockchip,pdm.txt | 16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/rockchip,pdm.txt b/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
>> index 54d94438..b2d7e47 100644
>> --- a/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
>> +++ b/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
>> @@ -24,6 +24,22 @@ Required properties:
>>   	     pinctrl-names. See ../pinctrl/pinctrl-bindings.txt
>>   	     for details of the property values.
>>   
>> +Optional properties:
>> +- rockchip,path-map: This is a variable length array, that shows the mapping
> The schema says this is a fixed length array.

Actually, it varies depends on different controller or application. 
considering the situation:

for 4 channel, we use path0/1, and hw wired to sdi1/3. we can map them 
to path0/1 as follows:

rockchip,path-map = <1 3>;

>
>> +  of SDIx to PATHx. By default, they are one-to-one mapping as follows:
>> +
>> +   path0 <-- sdi0
>> +   path1 <-- sdi1
>> +   path2 <-- sdi2
>> +   path3 <-- sdi3
>> +
>> +  e.g. "rockchip,path-map = <3 2 1 0>" means the mapping as follows:
>> +
>> +   path0 <-- sdi3
>> +   path1 <-- sdi2
>> +   path2 <-- sdi1
>> +   path3 <-- sdi0
>> +
>>   Example for rk3328 PDM controller:
>>   
>>   pdm: pdm@ff040000 {
>> -- 
>> 2.7.4
>>
>>
>>
>>
>
>