diff mbox

[V2,09/12] dtb: amd: Add KCS device tree node

Message ID 1454954357-8395-10-git-send-email-Suravee.Suthikulpanit@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Suravee Suthikulpanit Feb. 8, 2016, 5:59 p.m. UTC
From: Brijesh Singh <brijeshkumar.singh@amd.com>

Add KCS device node to support IPMI solution on Overdrive
system.

Signed-off-by: Brijesh Singh <brijeshkumar.singh@amd.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
---
 arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Arnd Bergmann Feb. 9, 2016, 2:59 p.m. UTC | #1
On Monday 08 February 2016 11:59:14 Suravee Suthikulpanit wrote:
> +
> +               ipmi_kcs: kcs@e0010000 {
> +                       status = "disabled";
> +                       compatible = "ipmi-kcs";
> +                       device_type = "ipmi";
> +                       reg = <0x0 0xe0010000 0 0x8>;
> +                       interrupts = <0 389 4>;
> +                       interrupt-names = "ipmi_kcs";
> +                       reg-size = <1>;
> +                       reg-spacing = <4>;
> +               };
>         };
> 

I see we don't have a binding file for this, can you add one please?


Why the strange name for the interrupt?

	Arnd
Brijesh Singh Feb. 9, 2016, 3:47 p.m. UTC | #2
Hi,

On 02/09/2016 08:59 AM, Arnd Bergmann wrote:
> On Monday 08 February 2016 11:59:14 Suravee Suthikulpanit wrote:
>> +
>> +               ipmi_kcs: kcs@e0010000 {
>> +                       status = "disabled";
>> +                       compatible = "ipmi-kcs";
>> +                       device_type = "ipmi";
>> +                       reg = <0x0 0xe0010000 0 0x8>;
>> +                       interrupts = <0 389 4>;
>> +                       interrupt-names = "ipmi_kcs";
>> +                       reg-size = <1>;
>> +                       reg-spacing = <4>;
>> +               };
>>         };
>>
> 
> I see we don't have a binding file for this, can you add one please?
>
There is binding file ipmi.txt [1]. Am I missing something ?
 
[1] http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/ipmi.txt

> 
> Why the strange name for the interrupt?
> 

Now I don't remember the doc but sometime back while implementing BMC on Seattle I saw that interrupt was labeled as "ipmi_kcs"
hence used the same name in DT. But if you want to use different name then let me know the string and will update it.

Theoretically IPMI system interface supports the following interface and any of these interfaces can be used by
A57 to communicate with BMC:

* Keyboard controller style (KCS)
* System Management Interface (SMIC)
* Block transfer (BT)
* SMBus system interface (SSIF)

AMD Seattle platform supports "KCS".



> 	Arnd
>
Arnd Bergmann Feb. 9, 2016, 4 p.m. UTC | #3
On Tuesday 09 February 2016 09:47:55 Brijesh Singh wrote:
> > 
> > I see we don't have a binding file for this, can you add one please?
> >
> There is binding file ipmi.txt [1]. Am I missing something ?
>  
> [1] http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/ipmi.txt

Sorry, my mistake: I was looking for "ipmi_kcs", which is not in there.

> > 
> > Why the strange name for the interrupt?
> > 
> 
> Now I don't remember the doc but sometime back while implementing BMC on Seattle I saw that interrupt was labeled as "ipmi_kcs"
> hence used the same name in DT. But if you want to use different name then let me know the string and will update it.
> 
> Theoretically IPMI system interface supports the following interface and any of these interfaces can be used by
> A57 to communicate with BMC:
> 
> * Keyboard controller style (KCS)
> * System Management Interface (SMIC)
> * Block transfer (BT)
> * SMBus system interface (SSIF)
> 
> AMD Seattle platform supports "KCS".
> 

The important part for interrupt/reg/... names is that you must use exactly the
names that are listed in the binding. If there is no name in there, it's better
not to add the name property.

The other point is that "ipmi_kcs" is a name that is picked really badly, as it
uses a '_' character while DT properties by convention use '-' between names,
and the name of the IRQ is the same as the device itself, which is really
not a useful way to disambiguate multiple interrupts in the same device, if
someone ever adds another irq line.

	Arnd
Brijesh Singh Feb. 9, 2016, 4:11 p.m. UTC | #4
Hi,

On 02/09/2016 10:00 AM, Arnd Bergmann wrote:
> 
> The important part for interrupt/reg/... names is that you must use exactly the
> names that are listed in the binding. If there is no name in there, it's better
> not to add the name property.
> 
> The other point is that "ipmi_kcs" is a name that is picked really badly, as it
> uses a '_' character while DT properties by convention use '-' between names,
> and the name of the IRQ is the same as the device itself, which is really
> not a useful way to disambiguate multiple interrupts in the same device, if
> someone ever adds another irq line.
> 

Sure we will drop the name field. Thanks.

> 	Arnd
>
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
index c5461b2..a7fc059 100644
--- a/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
+++ b/arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi
@@ -236,5 +236,16 @@ 
 			reg = <0x0 0xe8000000 0 0x1000000>;
 			interrupts = <0 380 4>;
 		};
+
+		ipmi_kcs: kcs@e0010000 {
+			status = "disabled";
+			compatible = "ipmi-kcs";
+			device_type = "ipmi";
+			reg = <0x0 0xe0010000 0 0x8>;
+			interrupts = <0 389 4>;
+			interrupt-names = "ipmi_kcs";
+			reg-size = <1>;
+			reg-spacing = <4>;
+		};
 	};
 };