diff mbox series

[2/2] ARM: dts: aspeed: Add KCS support for LPC BMC

Message ID 20181210200753.3018124-3-vijaykhemka@fb.com (mailing list archive)
State New, archived
Headers show
Series ARM: dts: aspeed: Add KCS support for LPC BMC | expand

Commit Message

Vijay Khemka Dec. 10, 2018, 8:07 p.m. UTC
Added kcs device support for lpc BMC.

Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
---
 arch/arm/boot/dts/aspeed-g5.dtsi | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

Comments

Jae Hyun Yoo Dec. 11, 2018, 6:39 p.m. UTC | #1
Hi Vijay,

On 12/10/2018 12:07 PM, Vijay Khemka wrote:
> Added kcs device support for lpc BMC.
> 
> Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
> ---
>   arch/arm/boot/dts/aspeed-g5.dtsi | 29 ++++++++++++++++++++++++++++-
>   1 file changed, 28 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> index d107459fc0f8..1bd48655bacb 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -330,8 +330,35 @@
>   				ranges = <0x0 0x1e789000 0x1000>;
>   
>   				lpc_bmc: lpc-bmc@0 {
> -					compatible = "aspeed,ast2500-lpc-bmc";
> +					compatible = "aspeed,ast2500-lpc-bmc, "simple-mfd", "syscon"";
>   					reg = <0x0 0x80>;
> +					reg-io-width = <4>;
> +
> +					#address-cells = <1>;
> +					#size-cells = <1>;
> +					ranges = <0x0 0x0 0x80>;
> +
> +					kcs1: kcs1@0 {
> +						compatible = "aspeed,ast2500-kcs-bmc";
> +						reg = <0x0 0x80>;

This reg property isn't needed at here because kcs_bmc_aspeed module
reads regmap from the parent node. Please check below code in the
driver code.

priv->map = syscon_node_to_regmap(dev->parent->of_node);

> +						interrupts = <8>;
> +						kcs_chan = <1>;
> +						status = "disabled";
> +					};
> +					kcs2: kcs2@0 {
> +						compatible = "aspeed,ast2500-kcs-bmc";
> +						reg = <0x0 0x80>;

ditto.

> +						interrupts = <8>;
> +						kcs_chan = <2>;
> +						status = "disabled";
> +					};
> +					kcs3: kcs3@0 {
> +						compatible = "aspeed,ast2500-kcs-bmc";
> +						reg = <0x0 0x80>;

ditto.

> +						interrupts = <8>;
> +						kcs_chan = <3>;
> +						status = "disabled";
> +					};
>   				};
>   
>   				lpc_host: lpc-host@80 {
> 

You might need to add kcs4 as a sub-node under lpc_host like below:

kcs4: kcs4@0 {
	compatible = "aspeed,ast2500-kcs-bmc";
	interrupts = <8>;
	kcs_chan = <4>;
	status = "disabled";
};

This would be uses as an SMM channel.

-Jae
Vijay Khemka Dec. 11, 2018, 6:55 p.m. UTC | #2
Thanks Jay,
I will take care of your comments and send next version.

Regards
-Vijay

On 12/11/18, 10:40 AM, "Jae Hyun Yoo" <jae.hyun.yoo@linux.intel.com> wrote:

    Hi Vijay,
    
    On 12/10/2018 12:07 PM, Vijay Khemka wrote:
    > Added kcs device support for lpc BMC.
    > 
    > Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
    > ---
    >   arch/arm/boot/dts/aspeed-g5.dtsi | 29 ++++++++++++++++++++++++++++-
    >   1 file changed, 28 insertions(+), 1 deletion(-)
    > 
    > diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
    > index d107459fc0f8..1bd48655bacb 100644
    > --- a/arch/arm/boot/dts/aspeed-g5.dtsi
    > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
    > @@ -330,8 +330,35 @@
    >   				ranges = <0x0 0x1e789000 0x1000>;
    >   
    >   				lpc_bmc: lpc-bmc@0 {
    > -					compatible = "aspeed,ast2500-lpc-bmc";
    > +					compatible = "aspeed,ast2500-lpc-bmc, "simple-mfd", "syscon"";
    >   					reg = <0x0 0x80>;
    > +					reg-io-width = <4>;
    > +
    > +					#address-cells = <1>;
    > +					#size-cells = <1>;
    > +					ranges = <0x0 0x0 0x80>;
    > +
    > +					kcs1: kcs1@0 {
    > +						compatible = "aspeed,ast2500-kcs-bmc";
    > +						reg = <0x0 0x80>;
    
    This reg property isn't needed at here because kcs_bmc_aspeed module
    reads regmap from the parent node. Please check below code in the
    driver code.
    
    priv->map = syscon_node_to_regmap(dev->parent->of_node);
    
    > +						interrupts = <8>;
    > +						kcs_chan = <1>;
    > +						status = "disabled";
    > +					};
    > +					kcs2: kcs2@0 {
    > +						compatible = "aspeed,ast2500-kcs-bmc";
    > +						reg = <0x0 0x80>;
    
    ditto.
    
    > +						interrupts = <8>;
    > +						kcs_chan = <2>;
    > +						status = "disabled";
    > +					};
    > +					kcs3: kcs3@0 {
    > +						compatible = "aspeed,ast2500-kcs-bmc";
    > +						reg = <0x0 0x80>;
    
    ditto.
    
    > +						interrupts = <8>;
    > +						kcs_chan = <3>;
    > +						status = "disabled";
    > +					};
    >   				};
    >   
    >   				lpc_host: lpc-host@80 {
    > 
    
    You might need to add kcs4 as a sub-node under lpc_host like below:
    
    kcs4: kcs4@0 {
    	compatible = "aspeed,ast2500-kcs-bmc";
    	interrupts = <8>;
    	kcs_chan = <4>;
    	status = "disabled";
    };
    
    This would be uses as an SMM channel.
    
    -Jae
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index d107459fc0f8..1bd48655bacb 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -330,8 +330,35 @@ 
 				ranges = <0x0 0x1e789000 0x1000>;
 
 				lpc_bmc: lpc-bmc@0 {
-					compatible = "aspeed,ast2500-lpc-bmc";
+					compatible = "aspeed,ast2500-lpc-bmc, "simple-mfd", "syscon"";
 					reg = <0x0 0x80>;
+					reg-io-width = <4>;
+
+					#address-cells = <1>;
+					#size-cells = <1>;
+					ranges = <0x0 0x0 0x80>;
+
+					kcs1: kcs1@0 {
+						compatible = "aspeed,ast2500-kcs-bmc";
+						reg = <0x0 0x80>;
+						interrupts = <8>;
+						kcs_chan = <1>;
+						status = "disabled";
+					};
+					kcs2: kcs2@0 {
+						compatible = "aspeed,ast2500-kcs-bmc";
+						reg = <0x0 0x80>;
+						interrupts = <8>;
+						kcs_chan = <2>;
+						status = "disabled";
+					};
+					kcs3: kcs3@0 {
+						compatible = "aspeed,ast2500-kcs-bmc";
+						reg = <0x0 0x80>;
+						interrupts = <8>;
+						kcs_chan = <3>;
+						status = "disabled";
+					};
 				};
 
 				lpc_host: lpc-host@80 {