Skip to content

Commit adf38bb

Browse files
Zhichang YuanBjorn Helgaas
Zhichang Yuan
authored and
Bjorn Helgaas
committed
HISI LPC: Support the LPC host on Hip06/Hip07 with DT bindings
The low-pin-count (LPC) interface of Hip06/Hip07 accesses I/O port space of peripherals. Implement the LPC host controller driver which performs the I/O operations on the underlying hardware. We don't want to touch existing drivers such as ipmi-bt, so this driver applies the indirect-IO introduced in the previous patch after registering an indirect-IO node to the indirect-IO devices list which will be searched by the I/O accessors to retrieve the host-local I/O port. The driver config is set as a bool instead of a tristate. The reason here is that, by the very nature of the driver providing a logical PIO range, it does not make sense to have this driver as a loadable module. Another more specific reason is that the Huawei D03 board which includes Hip06 SoC requires the LPC bus for UART console, so should be built in. Tested-by: dann frazier <[email protected]> Signed-off-by: Zou Rongrong <[email protected]> Signed-off-by: Zhichang Yuan <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Acked-by: Rob Herring <[email protected]> # dts part
1 parent 65af618 commit adf38bb

File tree

4 files changed

+457
-0
lines changed

4 files changed

+457
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Hisilicon Hip06 Low Pin Count device
2+
Hisilicon Hip06 SoCs implement a Low Pin Count (LPC) controller, which
3+
provides I/O access to some legacy ISA devices.
4+
Hip06 is based on arm64 architecture where there is no I/O space. So, the
5+
I/O ports here are not CPU addresses, and there is no 'ranges' property in
6+
LPC device node.
7+
8+
Required properties:
9+
- compatible: value should be as follows:
10+
(a) "hisilicon,hip06-lpc"
11+
(b) "hisilicon,hip07-lpc"
12+
- #address-cells: must be 2 which stick to the ISA/EISA binding doc.
13+
- #size-cells: must be 1 which stick to the ISA/EISA binding doc.
14+
- reg: base memory range where the LPC register set is mapped.
15+
16+
Note:
17+
The node name before '@' must be "isa" to represent the binding stick to the
18+
ISA/EISA binding specification.
19+
20+
Example:
21+
22+
isa@a01b0000 {
23+
compatible = "hisilicon,hip06-lpc";
24+
#address-cells = <2>;
25+
#size-cells = <1>;
26+
reg = <0x0 0xa01b0000 0x0 0x1000>;
27+
28+
ipmi0: bt@e4 {
29+
compatible = "ipmi-bt";
30+
device_type = "ipmi";
31+
reg = <0x01 0xe4 0x04>;
32+
};
33+
};

drivers/bus/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ config BRCMSTB_GISB_ARB
6565
arbiter. This driver provides timeout and target abort error handling
6666
and internal bus master decoding.
6767

68+
config HISILICON_LPC
69+
bool "Support for ISA I/O space on HiSilicon Hip06/7"
70+
depends on ARM64 && (ARCH_HISI || COMPILE_TEST)
71+
select INDIRECT_PIO
72+
help
73+
Driver to enable I/O access to devices attached to the Low Pin
74+
Count bus on the HiSilicon Hip06/7 SoC.
75+
6876
config IMX_WEIM
6977
bool "Freescale EIM DRIVER"
7078
depends on ARCH_MXC

drivers/bus/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
obj-$(CONFIG_ARM_CCI) += arm-cci.o
88
obj-$(CONFIG_ARM_CCN) += arm-ccn.o
99

10+
obj-$(CONFIG_HISILICON_LPC) += hisi_lpc.o
1011
obj-$(CONFIG_BRCMSTB_GISB_ARB) += brcmstb_gisb.o
1112
obj-$(CONFIG_IMX_WEIM) += imx-weim.o
1213
obj-$(CONFIG_MIPS_CDMM) += mips_cdmm.o

0 commit comments

Comments
 (0)