1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
From c286380fe677e404af0a1226c6589b3f24fafc6c Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 20 Feb 2018 17:32:02 +0000
Subject: [PATCH 227/454] overlays: Add sc16is752-i2c overlay
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
arch/arm/boot/dts/overlays/Makefile | 1 +
arch/arm/boot/dts/overlays/README | 15 +++++--
.../dts/overlays/sc16is752-i2c-overlay.dts | 40 +++++++++++++++++++
3 files changed, 53 insertions(+), 3 deletions(-)
create mode 100644 arch/arm/boot/dts/overlays/sc16is752-i2c-overlay.dts
--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -100,6 +100,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
rpi-tv.dtbo \
rra-digidac1-wm8741-audio.dtbo \
sc16is750-i2c.dtbo \
+ sc16is752-i2c.dtbo \
sc16is752-spi1.dtbo \
sdhost.dtbo \
sdio.dtbo \
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -1447,14 +1447,23 @@ Params: <None>
Name: sc16is750-i2c
Info: Overlay for the NXP SC16IS750 UART with I2C Interface
- Enables the chip on I2C1 at 0x48. To select another address,
- please refer to table 10 in reference manual.
-
+ Enables the chip on I2C1 at 0x48 (or the "addr" parameter value). To
+ select another address, please refer to table 10 in reference manual.
Load: dtoverlay=sc16is750-i2c,<param>=<val>
Params: int_pin GPIO used for IRQ (default 24)
addr Address (default 0x48)
+Name: sc16is752-i2c
+Info: Overlay for the NXP SC16IS752 dual UART with I2C Interface
+ Enables the chip on I2C1 at 0x48 (or the "addr" parameter value). To
+ select another address, please refer to table 10 in reference manual.
+Load: dtoverlay=sc16is752-i2c,<param>=<val>
+Params: int_pin GPIO used for IRQ (default 24)
+ addr Address (default 0x48)
+ xtal On-board crystal frequency (default 14745600)
+
+
Name: sc16is752-spi1
Info: Overlay for the NXP SC16IS752 Dual UART with SPI Interface
Enables the chip on SPI1.
--- /dev/null
+++ b/arch/arm/boot/dts/overlays/sc16is752-i2c-overlay.dts
@@ -0,0 +1,40 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "brcm,bcm2835";
+
+ fragment@0 {
+ target = <&i2c1>;
+
+ frag1: __overlay__ {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ sc16is752: sc16is752@48 {
+ compatible = "nxp,sc16is752";
+ reg = <0x48>; // i2c address
+ clocks = <&sc16is752_clk>;
+ interrupt-parent = <&gpio>;
+ interrupts = <24 0x2>; /* IRQ_TYPE_EDGE_FALLING */
+ gpio-controller;
+ #gpio-cells = <0>;
+ i2c-max-frequency = <400000>;
+ status = "okay";
+
+ sc16is752_clk: sc16is752_clk {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <14745600>;
+ };
+ };
+ };
+ };
+
+ __overrides__ {
+ int_pin = <&sc16is752>,"interrupts:0";
+ addr = <&sc16is752>,"reg:0";
+ xtal = <&sc16is752>,"clock-frequency:0";
+ };
+};
|