[v3,01/10] dt-bindings: mediatek: mmsys: Add support for mfd
diff mbox

Message ID 64ca273429d92f581568a48f3efe6035af65f579.1524820923.git.mbrugger@suse.com
State New
Headers show

Commit Message

Matthias Brugger April 27, 2018, 9:23 a.m. UTC
From: Matthias Brugger <mbrugger@suse.com>

Add binding description for the mmsys mfd for some Mediatek
devices. mmsys has some registers to control clock gates (which is
used in the clk driver) and some registers to set the routing and enable
the differnet blocks of the display subsystem.

Signed-off-by: Matthias Brugger <mbrugger@suse.com>
---
 .../bindings/arm/mediatek/mediatek,mmsys.txt       |  2 --
 .../bindings/display/mediatek/mediatek,disp.txt    |  2 +-
 .../devicetree/bindings/mfd/mediatek,mmsys.txt     | 27 ++++++++++++++++++++++
 3 files changed, 28 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt

Comments

Lee Jones April 30, 2018, 10:30 a.m. UTC | #1
On Fri, 27 Apr 2018, matthias.bgg@kernel.org wrote:

> From: Matthias Brugger <mbrugger@suse.com>
> 
> Add binding description for the mmsys mfd for some Mediatek
> devices. mmsys has some registers to control clock gates (which is
> used in the clk driver) and some registers to set the routing and enable
> the differnet blocks of the display subsystem.
> 
> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
> ---
>  .../bindings/arm/mediatek/mediatek,mmsys.txt       |  2 --
>  .../bindings/display/mediatek/mediatek,disp.txt    |  2 +-
>  .../devicetree/bindings/mfd/mediatek,mmsys.txt     | 27 ++++++++++++++++++++++
>  3 files changed, 28 insertions(+), 3 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
> 
> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
> index 4eb8bbe15c01..4468345f8b1a 100644
> --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
> @@ -6,10 +6,8 @@ The Mediatek mmsys controller provides various clocks to the system.
>  Required Properties:
>  
>  - compatible: Should be one of:
> -	- "mediatek,mt2701-mmsys", "syscon"
>  	- "mediatek,mt2712-mmsys", "syscon"
>  	- "mediatek,mt6797-mmsys", "syscon"
> -	- "mediatek,mt8173-mmsys", "syscon"
>  - #clock-cells: Must be 1
>  
>  The mmsys controller uses the common clk binding from
> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt b/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
> index 383183a89164..85a3b4ec06cd 100644
> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
> @@ -9,7 +9,7 @@ function block.
>  
>  All DISP device tree nodes must be siblings to the central MMSYS_CONFIG node.
>  For a description of the MMSYS_CONFIG binding, see
> -Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt.
> +Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
>  
>  DISP function blocks
>  ====================
> diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt b/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
> new file mode 100644
> index 000000000000..2331ae16917e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
> @@ -0,0 +1,27 @@
> +MediaTek MMSYS Multifunction Device Driver

What is "MMSYS"?

"Multi-Function Driver"s are specific to Linux.

What actually is the device?

> +MMSYS is a multifunction device with the following sub modules:
> +- clocks for the multi-media subsystem
> +- central node for the DRM subsystem.
> +
> +This document describes the binding for MFD device. The MFD takes care to initailize
> +the clock driver and the DRM driver. More info see
> +Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
> +
> +Required properties:
> +- compatible: Should be one of:
> +	- "mediatek,mt2701-mmsys", "syscon"
> +	- "mediatek,mt8173-mmsys", "syscon"
> +- #clock-cells: Must be 1
> +
> +Optional properties:
> +- power-domains: list of powerdomains needed for the subsystem to work
> +
> +Example:
> +
> +mmsys: clock-controller@14000000 {
> +	compatible = "mediatek,mt8173-mmsys", "syscon";
> +	reg = <0 0x14000000 0 0x1000>;
> +	power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
> +	#clock-cells = <1>;
> +};
Matthias Brugger June 25, 2018, 3:39 p.m. UTC | #2
On 30/04/18 12:30, Lee Jones wrote:
> On Fri, 27 Apr 2018, matthias.bgg@kernel.org wrote:
> 
>> From: Matthias Brugger <mbrugger@suse.com>
>>
>> Add binding description for the mmsys mfd for some Mediatek
>> devices. mmsys has some registers to control clock gates (which is
>> used in the clk driver) and some registers to set the routing and enable
>> the differnet blocks of the display subsystem.
>>
>> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
>> ---
>>  .../bindings/arm/mediatek/mediatek,mmsys.txt       |  2 --
>>  .../bindings/display/mediatek/mediatek,disp.txt    |  2 +-
>>  .../devicetree/bindings/mfd/mediatek,mmsys.txt     | 27 ++++++++++++++++++++++
>>  3 files changed, 28 insertions(+), 3 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
>>
>> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
>> index 4eb8bbe15c01..4468345f8b1a 100644
>> --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
>> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
>> @@ -6,10 +6,8 @@ The Mediatek mmsys controller provides various clocks to the system.
>>  Required Properties:
>>  
>>  - compatible: Should be one of:
>> -	- "mediatek,mt2701-mmsys", "syscon"
>>  	- "mediatek,mt2712-mmsys", "syscon"
>>  	- "mediatek,mt6797-mmsys", "syscon"
>> -	- "mediatek,mt8173-mmsys", "syscon"
>>  - #clock-cells: Must be 1
>>  
>>  The mmsys controller uses the common clk binding from
>> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt b/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
>> index 383183a89164..85a3b4ec06cd 100644
>> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
>> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
>> @@ -9,7 +9,7 @@ function block.
>>  
>>  All DISP device tree nodes must be siblings to the central MMSYS_CONFIG node.
>>  For a description of the MMSYS_CONFIG binding, see
>> -Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt.
>> +Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
>>  
>>  DISP function blocks
>>  ====================
>> diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt b/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
>> new file mode 100644
>> index 000000000000..2331ae16917e
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
>> @@ -0,0 +1,27 @@
>> +MediaTek MMSYS Multifunction Device Driver
> 
> What is "MMSYS"?
> 
> "Multi-Function Driver"s are specific to Linux.
> 
> What actually is the device?
> 

It's includes all the DRM parts of the SoC together with the clocks for the
device. MMSYS IMHO stands for Multi-Media-System.

Regards,
Matthias

>> +MMSYS is a multifunction device with the following sub modules:
>> +- clocks for the multi-media subsystem
>> +- central node for the DRM subsystem.
>> +
>> +This document describes the binding for MFD device. The MFD takes care to initailize
>> +the clock driver and the DRM driver. More info see
>> +Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
>> +
>> +Required properties:
>> +- compatible: Should be one of:
>> +	- "mediatek,mt2701-mmsys", "syscon"
>> +	- "mediatek,mt8173-mmsys", "syscon"
>> +- #clock-cells: Must be 1
>> +
>> +Optional properties:
>> +- power-domains: list of powerdomains needed for the subsystem to work
>> +
>> +Example:
>> +
>> +mmsys: clock-controller@14000000 {
>> +	compatible = "mediatek,mt8173-mmsys", "syscon";
>> +	reg = <0 0x14000000 0 0x1000>;
>> +	power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
>> +	#clock-cells = <1>;
>> +};
>
Rob Herring June 26, 2018, 6:32 p.m. UTC | #3
On Mon, Jun 25, 2018 at 9:39 AM Matthias Brugger <matthias.bgg@gmail.com> wrote:
>
>
>
> On 30/04/18 12:30, Lee Jones wrote:
> > On Fri, 27 Apr 2018, matthias.bgg@kernel.org wrote:
> >
> >> From: Matthias Brugger <mbrugger@suse.com>
> >>
> >> Add binding description for the mmsys mfd for some Mediatek
> >> devices. mmsys has some registers to control clock gates (which is
> >> used in the clk driver) and some registers to set the routing and enable
> >> the differnet blocks of the display subsystem.
> >>
> >> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
> >> ---
> >>  .../bindings/arm/mediatek/mediatek,mmsys.txt       |  2 --
> >>  .../bindings/display/mediatek/mediatek,disp.txt    |  2 +-
> >>  .../devicetree/bindings/mfd/mediatek,mmsys.txt     | 27 ++++++++++++++++++++++
> >>  3 files changed, 28 insertions(+), 3 deletions(-)
> >>  create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt

Please CC DT list on bindings.

Rob
Lee Jones July 3, 2018, 7:04 a.m. UTC | #4
On Mon, 25 Jun 2018, Matthias Brugger wrote:

> 
> 
> On 30/04/18 12:30, Lee Jones wrote:
> > On Fri, 27 Apr 2018, matthias.bgg@kernel.org wrote:
> > 
> >> From: Matthias Brugger <mbrugger@suse.com>
> >>
> >> Add binding description for the mmsys mfd for some Mediatek
> >> devices. mmsys has some registers to control clock gates (which is
> >> used in the clk driver) and some registers to set the routing and enable
> >> the differnet blocks of the display subsystem.
> >>
> >> Signed-off-by: Matthias Brugger <mbrugger@suse.com>
> >> ---
> >>  .../bindings/arm/mediatek/mediatek,mmsys.txt       |  2 --
> >>  .../bindings/display/mediatek/mediatek,disp.txt    |  2 +-
> >>  .../devicetree/bindings/mfd/mediatek,mmsys.txt     | 27 ++++++++++++++++++++++
> >>  3 files changed, 28 insertions(+), 3 deletions(-)
> >>  create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
> >>
> >> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
> >> index 4eb8bbe15c01..4468345f8b1a 100644
> >> --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
> >> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
> >> @@ -6,10 +6,8 @@ The Mediatek mmsys controller provides various clocks to the system.
> >>  Required Properties:
> >>  
> >>  - compatible: Should be one of:
> >> -	- "mediatek,mt2701-mmsys", "syscon"
> >>  	- "mediatek,mt2712-mmsys", "syscon"
> >>  	- "mediatek,mt6797-mmsys", "syscon"
> >> -	- "mediatek,mt8173-mmsys", "syscon"
> >>  - #clock-cells: Must be 1
> >>  
> >>  The mmsys controller uses the common clk binding from
> >> diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt b/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
> >> index 383183a89164..85a3b4ec06cd 100644
> >> --- a/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
> >> +++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
> >> @@ -9,7 +9,7 @@ function block.
> >>  
> >>  All DISP device tree nodes must be siblings to the central MMSYS_CONFIG node.
> >>  For a description of the MMSYS_CONFIG binding, see
> >> -Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt.
> >> +Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
> >>  
> >>  DISP function blocks
> >>  ====================
> >> diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt b/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
> >> new file mode 100644
> >> index 000000000000..2331ae16917e
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
> >> @@ -0,0 +1,27 @@
> >> +MediaTek MMSYS Multifunction Device Driver
> > 
> > What is "MMSYS"?
> > 
> > "Multi-Function Driver"s are specific to Linux.
> > 
> > What actually is the device?
> 
> It's includes all the DRM parts of the SoC together with the clocks for the
> device. MMSYS IMHO stands for Multi-Media-System.

Please update the document with that information.

Is there a datasheet I can view?

> >> +MMSYS is a multifunction device with the following sub modules:
> >> +- clocks for the multi-media subsystem
> >> +- central node for the DRM subsystem.
> >> +
> >> +This document describes the binding for MFD device. The MFD takes care to initailize
> >> +the clock driver and the DRM driver. More info see
> >> +Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
> >> +
> >> +Required properties:
> >> +- compatible: Should be one of:
> >> +	- "mediatek,mt2701-mmsys", "syscon"
> >> +	- "mediatek,mt8173-mmsys", "syscon"
> >> +- #clock-cells: Must be 1
> >> +
> >> +Optional properties:
> >> +- power-domains: list of powerdomains needed for the subsystem to work
> >> +
> >> +Example:
> >> +
> >> +mmsys: clock-controller@14000000 {
> >> +	compatible = "mediatek,mt8173-mmsys", "syscon";
> >> +	reg = <0 0x14000000 0 0x1000>;
> >> +	power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
> >> +	#clock-cells = <1>;
> >> +};
> >

Patch
diff mbox

diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
index 4eb8bbe15c01..4468345f8b1a 100644
--- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
+++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
@@ -6,10 +6,8 @@  The Mediatek mmsys controller provides various clocks to the system.
 Required Properties:
 
 - compatible: Should be one of:
-	- "mediatek,mt2701-mmsys", "syscon"
 	- "mediatek,mt2712-mmsys", "syscon"
 	- "mediatek,mt6797-mmsys", "syscon"
-	- "mediatek,mt8173-mmsys", "syscon"
 - #clock-cells: Must be 1
 
 The mmsys controller uses the common clk binding from
diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt b/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
index 383183a89164..85a3b4ec06cd 100644
--- a/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
+++ b/Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
@@ -9,7 +9,7 @@  function block.
 
 All DISP device tree nodes must be siblings to the central MMSYS_CONFIG node.
 For a description of the MMSYS_CONFIG binding, see
-Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt.
+Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
 
 DISP function blocks
 ====================
diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt b/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
new file mode 100644
index 000000000000..2331ae16917e
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mmsys.txt
@@ -0,0 +1,27 @@ 
+MediaTek MMSYS Multifunction Device Driver
+
+MMSYS is a multifunction device with the following sub modules:
+- clocks for the multi-media subsystem
+- central node for the DRM subsystem.
+
+This document describes the binding for MFD device. The MFD takes care to initailize
+the clock driver and the DRM driver. More info see
+Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
+
+Required properties:
+- compatible: Should be one of:
+	- "mediatek,mt2701-mmsys", "syscon"
+	- "mediatek,mt8173-mmsys", "syscon"
+- #clock-cells: Must be 1
+
+Optional properties:
+- power-domains: list of powerdomains needed for the subsystem to work
+
+Example:
+
+mmsys: clock-controller@14000000 {
+	compatible = "mediatek,mt8173-mmsys", "syscon";
+	reg = <0 0x14000000 0 0x1000>;
+	power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
+	#clock-cells = <1>;
+};