[HELP] ipmi-kcs didn't work

Jae Hyun Yoo jae.hyun.yoo at linux.intel.com
Fri Nov 16 06:30:47 AEDT 2018


On 11/14/2018 5:49 PM, qianlihu wrote:
> Hi,Jae
> 
>>
>> Hi,
>>
>> On 11/14/2018 2:38 AM, qianlihu wrote:
>>> Hi,
>>>
>>> I add ipmi kcs node,but it didn't work
>>>
>>> here is the patch for dts.
>>>
>>>           lpc_bmc: lpc-bmc at 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>;
>>> +
>>> +               kcs3: kcs3 at 0 {
>>> +                       compatible = "aspeed,ast2500-kcs-bmc";
>>> +                       reg = <0x0 0x80>;
>>> +                       interrupts = <8>;
>>> +                       kcs_chan = <3>;
>>> +                       kcs_addr = <0xca2>;
>>
>> Probably, you should add a clock setting for KCS H/W block into here.
>>
>>          clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
>>
> I tried ,but it didn't work.
> 
>> Cheers,
>>
>> Jae
>>
>>> +                       status = "disabled";
>>> +
>>> +               };
>>>           };
>>>
>>> +&kcs3 {
>>>                            +       status = "okay";
>>>           +};
>>>
>>>
>>> The device node /dev/ipmi-kcs3 is created.
>>>
>>>
>>> root at sanjose:/tmp# ./kcsbridged --vv --d /dev/ipmi-kcs3
>>> Debug logging
>>> Starting
>>> Registering dbus methods/signals
>>> Requesting dbus name: org.openbmc.HostIpmi
>>> Getting dbus file descriptors
>>> Opening /dev/ipmi-kcs3
>>> Creating timer fd
>>> Entering polling loop
>>> Processed 1 dbus events
>>> Processed 1 dbus events
>>> Processed 1 dbus events
>>> Processed 1 dbus events
>>> Processed 1 dbus events
>>> Processed 1 dbus events
>>> Processed 1 dbus events
>>>
>>> but there is nothing output.
>>>
> 
> this is the dmesg info
> 
> root at sanjose:~# dmesg |grep kcs
> [    2.052340] aspeed-kcs-bmc: channel=3 addr=0xca2 idr=0x2c odr=0x38 str=0x44
> 
> I also checked the hardtrap:
> 0x1e6e2070[bit25]  enabled the lpc mode
> 
> I'm sure the IO port is 0xca2.
> 
> 
> should I config the pin for LPC,I checked the ibt node,it didn't.
> 
> 
> thank you
> 
> --qianlihu
> 

Try below fix on clk-aspeed.c

diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c
index 596136793fc4..b55d35e3eb5e 100644
--- a/drivers/clk/clk-aspeed.c
+++ b/drivers/clk/clk-aspeed.c
@@ -95,7 +95,7 @@ static const struct aspeed_gate_data aspeed_gates[] = {
         [ASPEED_CLK_GATE_DCLK] =        {  5, -1, "dclk-gate", 
NULL,   CLK_IS_CRITICAL }, /* DAC */
         [ASPEED_CLK_GATE_REFCLK] =      {  6, -1, "refclk-gate", 
"clkin", CLK_IS_CRITICAL },
         [ASPEED_CLK_GATE_USBPORT2CLK] = {  7,  3, "usb-port2-gate", 
NULL,   0 }, /* USB2.0 Host port 2 */
-       [ASPEED_CLK_GATE_LCLK] =        {  8,  5, "lclk-gate", 
NULL,   0 }, /* LPC */
+       [ASPEED_CLK_GATE_LCLK] =        {  8,  5, "lclk-gate", 
NULL,   CLK_IS_CRITICAL }, /* LPC */
         [ASPEED_CLK_GATE_USBUHCICLK] =  {  9, 15, "usb-uhci-gate", 
NULL,   0 }, /* USB1.1 (requires port 2 enabled) */
         [ASPEED_CLK_GATE_D1CLK] =       { 10, 13, "d1clk-gate", 
NULL,   0 }, /* GFX CRT */
         [ASPEED_CLK_GATE_YCLK] =        { 13,  4, "yclk-gate", 
NULL,   0 }, /* HAC */

In my experiments on my system, LCLK was not enabled due to the null
parent dependency so I added CLK_IS_CRITICAL flag to enable the clk.

LPC interface is default pin pad setting of AST2500 so you might not
need a pinctrl setting on it if you didn't change it's pin pads to GPIO
or eSPI.

Cheers,
Jae


More information about the openbmc mailing list