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