linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: dts: aspeed: Add KCS & lpc ctrl for Facebook
@ 2018-12-10 20:07 Vijay Khemka
  2018-12-10 20:07 ` [PATCH] ARM: dts: aspeed: Add KCS support for LPC BMC Vijay Khemka
  2018-12-10 20:07 ` [PATCH 2/2] " Vijay Khemka
  0 siblings, 2 replies; 6+ messages in thread
From: Vijay Khemka @ 2018-12-10 20:07 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Joel Stanley, Andrew Jeffery,
	devicetree, linux-arm-kernel, linux-aspeed, linux-kernel
  Cc: vijaykhemka, openbmc @ lists . ozlabs . org

Added kcs device and lpc ctrl device to enable LPC clock in Facebook
Tiogapass device tree.

Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
---
 .../dts/aspeed-bmc-facebook-tiogapass.dts     | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts
index d9d7f208788a..9544fa2c1822 100644
--- a/arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts
@@ -21,6 +21,18 @@
 	memory@80000000 {
 		reg = <0x80000000 0x20000000>;
 	};
+
+	reserved-memory {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+
+		flash_memory: region@98000000 {
+			no-map;
+			reg = <0x98000000 0x04000000>; /* 64M */
+		};
+	};
+
 	iio-hwmon {
 		compatible = "iio-hwmon";
 		oemname0 = "MB_P3V3";
@@ -62,6 +74,12 @@
 	};
 };
 
+&lpc_ctrl {
+	status = "okay";
+	memory-region = <&flash_memory>;
+	flash = <&spi1>;
+};
+
 &uart1 {
 	// Host Console
 	status = "okay";
@@ -75,6 +93,18 @@
 	status = "okay";
 };
 
+&kcs2 {
+	// BMC KCS channel 2
+	status = "okay";
+	kcs_addr = <0xca8>;
+};
+
+&kcs3 {
+	// BMC KCS channel 3
+	status = "okay";
+	kcs_addr = <0xca2>;
+};
+
 &mac0 {
 	status = "okay";
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] ARM: dts: aspeed: Add KCS support for LPC BMC
  2018-12-10 20:07 [PATCH 1/2] ARM: dts: aspeed: Add KCS & lpc ctrl for Facebook Vijay Khemka
@ 2018-12-10 20:07 ` Vijay Khemka
  2018-12-10 22:39   ` Vijay Khemka
  2018-12-10 20:07 ` [PATCH 2/2] " Vijay Khemka
  1 sibling, 1 reply; 6+ messages in thread
From: Vijay Khemka @ 2018-12-10 20:07 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Joel Stanley, Andrew Jeffery,
	devicetree, linux-arm-kernel, linux-aspeed, linux-kernel
  Cc: vijaykhemka, openbmc @ lists . ozlabs . org

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>;
+						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 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ARM: dts: aspeed: Add KCS support for LPC BMC
  2018-12-10 20:07 [PATCH 1/2] ARM: dts: aspeed: Add KCS & lpc ctrl for Facebook Vijay Khemka
  2018-12-10 20:07 ` [PATCH] ARM: dts: aspeed: Add KCS support for LPC BMC Vijay Khemka
@ 2018-12-10 20:07 ` Vijay Khemka
  2018-12-11 18:39   ` Jae Hyun Yoo
  1 sibling, 1 reply; 6+ messages in thread
From: Vijay Khemka @ 2018-12-10 20:07 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Joel Stanley, Andrew Jeffery,
	devicetree, linux-arm-kernel, linux-aspeed, linux-kernel
  Cc: vijaykhemka, openbmc @ lists . ozlabs . org

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>;
+						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 {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: dts: aspeed: Add KCS support for LPC BMC
  2018-12-10 20:07 ` [PATCH] ARM: dts: aspeed: Add KCS support for LPC BMC Vijay Khemka
@ 2018-12-10 22:39   ` Vijay Khemka
  0 siblings, 0 replies; 6+ messages in thread
From: Vijay Khemka @ 2018-12-10 22:39 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Joel Stanley, Andrew Jeffery,
	devicetree, linux-arm-kernel, linux-aspeed, linux-kernel
  Cc: openbmc @ lists . ozlabs . org

Please ignore this patch as it is duplicate. It is included in list of 2 patches I have sent just before.

On 12/10/18, 12:08 PM, "Vijay Khemka" <vijaykhemka@fb.com> 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>;
    +						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 {
    -- 
    2.17.1
    
    


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] ARM: dts: aspeed: Add KCS support for LPC BMC
  2018-12-10 20:07 ` [PATCH 2/2] " Vijay Khemka
@ 2018-12-11 18:39   ` Jae Hyun Yoo
  2018-12-11 18:55     ` Vijay Khemka
  0 siblings, 1 reply; 6+ messages in thread
From: Jae Hyun Yoo @ 2018-12-11 18:39 UTC (permalink / raw)
  To: Vijay Khemka, Rob Herring, Mark Rutland, Joel Stanley,
	Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel
  Cc: openbmc @ lists . ozlabs . org

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] ARM: dts: aspeed: Add KCS support for LPC BMC
  2018-12-11 18:39   ` Jae Hyun Yoo
@ 2018-12-11 18:55     ` Vijay Khemka
  0 siblings, 0 replies; 6+ messages in thread
From: Vijay Khemka @ 2018-12-11 18:55 UTC (permalink / raw)
  To: Jae Hyun Yoo, Rob Herring, Mark Rutland, Joel Stanley,
	Andrew Jeffery, devicetree, linux-arm-kernel, linux-aspeed,
	linux-kernel
  Cc: openbmc @ lists . ozlabs . org

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
    


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-12-11 18:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-10 20:07 [PATCH 1/2] ARM: dts: aspeed: Add KCS & lpc ctrl for Facebook Vijay Khemka
2018-12-10 20:07 ` [PATCH] ARM: dts: aspeed: Add KCS support for LPC BMC Vijay Khemka
2018-12-10 22:39   ` Vijay Khemka
2018-12-10 20:07 ` [PATCH 2/2] " Vijay Khemka
2018-12-11 18:39   ` Jae Hyun Yoo
2018-12-11 18:55     ` Vijay Khemka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).