Hi Grégoire,

Thanks for the patch.
The PCIe-to-LPC bridge on the AST2600 exposes 4 channels, matching the LPC 
controller's own KCS1-4, not just channel 4.
It would be better If you can provide a way to handle multiple LPC controller 
for
kcs channels.

> 
> The ASPEED AST2600 has a PCIe to LPC controller. It includes a KCS interface
> on channel 4. This is a fully KCS-compatible interface that is exposed over
> PCIe.
> 
> Add pcie_kcs4 to existing LPC bus in aspeed-g6.dtsi.
> Modify kcs_bmc_aspeed driver to detect the PCIe over LPC channel.
> 
> In the driver, this PCIe over LPC channel will be detected as Channel 5.
> In the datasheet this is defined as Channel 4 over PCIe.
> 
> The Channel 4 name is still referenced in the offsets macros.
> 
> The host need a driver to activate the MSI interrupts with the PCIe BMC
> Device.
> 
> Tests:
> With the patch [2] adding PCIe BMC device for Virtual UART, the MSI
> interrupts are correctly setups. The Host driver is build and side loaded on 
> the
> host. The ipmi_si driver on the host is loaded manually with the KCS address
> given by hand. 'ipmitool mc info' is run to confirm it's working.
> 
> Tested on : Asus IPMI Expansion Card, AST2600.
> ```
> # insmod aspeed-host-bmc-dev.ko
> # lspci -vvv -d 1a03:2402
> 02:01.0 Unassigned class [ff00]: ASPEED Technology, Inc. Device 2402
>       Subsystem: ASPEED Technology, Inc. Device 2402
>       Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
> ParErr- Stepping- SERR- FastB2B- DisINTx+
>       Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
>       Latency: 0
>       Interrupt: pin A routed to IRQ 154
>       IOMMU group: 12
>       Region 0: Memory at 82080000 (32-bit, non-prefetchable) [size=4K]
>       Region 1: Memory at 82040000 (32-bit, non-prefetchable) [size=256K]
>       Capabilities: [40] Power Management version 3
>               Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA
> PME(D0+,D1+,D2+,D3hot+,D3cold+)
>               Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
>       Capabilities: [50] MSI: Enable+ Count=32/32 Maskable- 64bit+
>               Address: 00000000fee00818  Data: 0000
>       Kernel driver in use: aspeed-host-bmc-dev
> 
> # modprobe ipmi_si type=kcs addrs=0x82040E88 regspacings=4 regsizes=1
> regshifts=0
> 
> # ipmitool mc info
> Device ID                 : 32
> Device Revision           : 1
> Firmware Revision         : 26.04
> IPMI Version              : 2.0
> Manufacturer ID           : 2623
> Manufacturer Name         : ASUSTek Computer Inc.
> ...
> ```
> 
> The original patch [1] review set to use the existing LPC bus and modify the
> kcs_bmc_aspeed driver.
> 
> [1]
> https://lore.kernel.org/linux-aspeed/de49f2032f5b1f170161dcd6191c0daa48f0
> [email protected]/
> [2]
> https://lore.kernel.org/linux-aspeed/51e455417bdcfe608270c6cb2806b1fd971f
> [email protected]/
> 
> Grégoire Layet (2):
>   ipmi: kcs_bmc_aspeed: g6: Add KCS Channel 4 over PCIe
>   ARM: dts: aspeed-g6: add pcie-kcs4
> 
>  arch/arm/boot/dts/aspeed/aspeed-g6.dtsi |  7 +++++
>  drivers/char/ipmi/kcs_bmc_aspeed.c      | 39
> +++++++++++++++++++++++--
>  2 files changed, 44 insertions(+), 2 deletions(-)
> 
> 
> base-commit: 03f906d8f5541e8bb741035981304feceed5993d
> --
> 2.54.0


_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to