Skip to content

Commit

Permalink
Merge pull request #160 from lyt31/0106
Browse files Browse the repository at this point in the history
lpc: phytium: Add LPC snoop driver
  • Loading branch information
opsiff authored Jun 25, 2024
2 parents 62324ff + 5722917 commit 9b58da7
Show file tree
Hide file tree
Showing 4 changed files with 387 additions and 0 deletions.
53 changes: 53 additions & 0 deletions Documentation/devicetree/bindings/misc/phytium,lpc-snoop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/misc/phytium,lpc-snoop.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Phytium lpc-snoop

maintainers:
- Lan Hengyu <[email protected]>

description:
The LPC snoop interface allows the BMC to listen on and record the data
bytes written by the Host to the targeted LPC I/O pots.

properties:
compatible:
items:
- enum:
- phytium,lpc-snoop
reg:
maxItems: 1

interrupts:
maxItems: 1

snoop-ports:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: The LPC I/O ports to snoop

required:
- compatible
- interrupts
- snoop-ports

examples:
- |
lpc: lpc@28010000 {
compatible = "simple-mfd", "syscon";
reg = <0x0 0x28010000 0x1000>;
reg-io-width = <4>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x0 0x28010000 0x1000>;
lpc_snoop: lpc-snoop@90 {
compatible = "phytium,lpc-snoop";
reg = <0x90 0x8>;
interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
snoop-ports = <0x80>;
};
};
8 changes: 8 additions & 0 deletions drivers/misc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ config PHANTOM
If you choose to build module, its name will be phantom. If unsure,
say N here.

config PHYTIUM_LPC_SNOOP
tristate "Phytium HOST LPC snoop support"
depends on ARCH_PHYTIUM && REGMAP && MFD_SYSCON
help
Provides a driver to control the LPC snoop interface which
allows the BMC to listen on and save the data written by
the host to an arbitrary LPC I/O port.

config TIFM_CORE
tristate "TI Flash Media interface support"
depends on PCI
Expand Down
1 change: 1 addition & 0 deletions drivers/misc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ obj-$(CONFIG_LKDTM) += lkdtm/
obj-$(CONFIG_TIFM_CORE) += tifm_core.o
obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o
obj-$(CONFIG_PHANTOM) += phantom.o
obj-$(CONFIG_PHYTIUM_LPC_SNOOP) += phytium-lpc-snoop.o
obj-$(CONFIG_QCOM_COINCELL) += qcom-coincell.o
obj-$(CONFIG_QCOM_FASTRPC) += fastrpc.o
obj-$(CONFIG_SENSORS_BH1770) += bh1770glc.o
Expand Down
Loading

0 comments on commit 9b58da7

Please sign in to comment.