mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
90 lines
2.9 KiB
Diff
90 lines
2.9 KiB
Diff
From 77cc97e38bdad35d2b17f43f62fd3d603aa53cf1 Mon Sep 17 00:00:00 2001
|
|
From: Clarke X <1014930533@qq.com>
|
|
Date: Sat, 8 Apr 2023 11:29:16 +0800
|
|
Subject: [PATCH 721/726] overlays: Add pcf857x support
|
|
|
|
Add pcf857x overlay with related documents.
|
|
|
|
Signed-off-by: Clarke X <1014930533@qq.com>
|
|
---
|
|
arch/arm/boot/dts/overlays/Makefile | 1 +
|
|
arch/arm/boot/dts/overlays/README | 11 +++++++
|
|
.../arm/boot/dts/overlays/pcf857x-overlay.dts | 32 +++++++++++++++++++
|
|
3 files changed, 44 insertions(+)
|
|
create mode 100644 arch/arm/boot/dts/overlays/pcf857x-overlay.dts
|
|
|
|
diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile
|
|
index 0fab3056a939..4fe34bebad37 100644
|
|
--- a/arch/arm/boot/dts/overlays/Makefile
|
|
+++ b/arch/arm/boot/dts/overlays/Makefile
|
|
@@ -167,6 +167,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
|
|
ov9281.dtbo \
|
|
papirus.dtbo \
|
|
pca953x.dtbo \
|
|
+ pcf857x.dtbo \
|
|
pcie-32bit-dma.dtbo \
|
|
pibell.dtbo \
|
|
pifacedigital.dtbo \
|
|
diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README
|
|
index 875b58ab1723..abf022db760d 100644
|
|
--- a/arch/arm/boot/dts/overlays/README
|
|
+++ b/arch/arm/boot/dts/overlays/README
|
|
@@ -3065,6 +3065,17 @@ Params: addr I2C address of expander. Default 0x20.
|
|
xra1202 Select the Exar XRA1202 (8 bit)
|
|
|
|
|
|
+Name: pcf857x
|
|
+Info: NXP PCF857x family of I2C GPIO expanders.
|
|
+Load: dtoverlay=pcf857x,<param>=<val>
|
|
+Params: addr I2C address of expander. Default
|
|
+ depends on model selected.
|
|
+ pcf8574 Select the NXP PCF8574 (8 bit)
|
|
+ pcf8574a Select the NXP PCF8574A (8 bit)
|
|
+ pcf8575 Select the NXP PCF8575 (16 bit)
|
|
+ pca8574 Select the NXP PCA8574 (8 bit)
|
|
+
|
|
+
|
|
Name: pcie-32bit-dma
|
|
Info: Force PCIe config to support 32bit DMA addresses at the expense of
|
|
having to bounce buffers.
|
|
diff --git a/arch/arm/boot/dts/overlays/pcf857x-overlay.dts b/arch/arm/boot/dts/overlays/pcf857x-overlay.dts
|
|
new file mode 100644
|
|
index 000000000000..68943e1c3320
|
|
--- /dev/null
|
|
+++ b/arch/arm/boot/dts/overlays/pcf857x-overlay.dts
|
|
@@ -0,0 +1,32 @@
|
|
+// Definitions for PCF857X GPIO Extender from NXP
|
|
+
|
|
+/dts-v1/;
|
|
+/plugin/;
|
|
+
|
|
+/ {
|
|
+ compatible = "brcm,bcm2835";
|
|
+
|
|
+ fragment@0 {
|
|
+ target = <&i2c_arm>;
|
|
+ __overlay__ {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+
|
|
+ pcf857x: pcf857x@0 {
|
|
+ compatible = "";
|
|
+ reg = <0x00>;
|
|
+ gpio-controller;
|
|
+ #gpio-cells = <2>;
|
|
+ status = "okay";
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+ __overrides__ {
|
|
+ pcf8574 = <&pcf857x>,"compatible=nxp,pcf8574", <&pcf857x>,"reg:0=0x20";
|
|
+ pcf8574a = <&pcf857x>,"compatible=nxp,pcf8574a", <&pcf857x>,"reg:0=0x38";
|
|
+ pcf8575 = <&pcf857x>,"compatible=nxp,pcf8575", <&pcf857x>,"reg:0=0x20";
|
|
+ pca8574 = <&pcf857x>,"compatible=nxp,pca8574", <&pcf857x>,"reg:0=0x20";
|
|
+ addr = <&pcf857x>,"reg:0";
|
|
+ };
|
|
+};
|
|
--
|
|
2.33.1
|
|
|