Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lpc: phytium: Add LPC snoop driver #160

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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