0491-overlays-added-sc16is750-UART-over-I2C-1617.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. From 0f34b495557223c0d129bf97a1fb89990cfd83ed Mon Sep 17 00:00:00 2001
  2. From: Georgii Staroselskii <gosha371@gmail.com>
  3. Date: Tue, 23 Aug 2016 17:40:05 +0400
  4. Subject: [PATCH] overlays: added sc16is750 UART over I2C (#1617)
  5. ---
  6. arch/arm/boot/dts/overlays/Makefile | 1 +
  7. arch/arm/boot/dts/overlays/README | 10 ++++++
  8. .../boot/dts/overlays/sc16is750-i2c-overlay.dts | 37 ++++++++++++++++++++++
  9. 3 files changed, 48 insertions(+)
  10. create mode 100644 arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts
  11. --- a/arch/arm/boot/dts/overlays/Makefile
  12. +++ b/arch/arm/boot/dts/overlays/Makefile
  13. @@ -75,6 +75,7 @@ dtbo-$(RPI_DT_OVERLAYS) += rpi-ft5406.dt
  14. dtbo-$(RPI_DT_OVERLAYS) += rpi-proto.dtbo
  15. dtbo-$(RPI_DT_OVERLAYS) += rpi-sense.dtbo
  16. dtbo-$(RPI_DT_OVERLAYS) += rra-digidac1-wm8741-audio.dtbo
  17. +dtbo-$(RPI_DT_OVERLAYS) += sc16is750-i2c.dtbo
  18. dtbo-$(RPI_DT_OVERLAYS) += sc16is752-spi1.dtbo
  19. dtbo-$(RPI_DT_OVERLAYS) += sdhost.dtbo
  20. dtbo-$(RPI_DT_OVERLAYS) += sdio.dtbo
  21. --- a/arch/arm/boot/dts/overlays/README
  22. +++ b/arch/arm/boot/dts/overlays/README
  23. @@ -935,6 +935,16 @@ Load: dtoverlay=rra-digidac1-wm8741-au
  24. Params: <None>
  25. +Name: sc16is750-i2c
  26. +Info: Overlay for the NXP SC16IS750 UART with I2C Interface
  27. + Enables the chip on I2C1 at 0x48. To select another address,
  28. + please refer to table 10 in reference manual.
  29. +
  30. +Load: dtoverlay=sc16is750-i2c,<param>=<val>
  31. +Params: int_pin GPIO used for IRQ (default 24)
  32. + addr Address (default 0x48)
  33. +
  34. +
  35. Name: sc16is752-spi1
  36. Info: Overlay for the NXP SC16IS752 Dual UART with SPI Interface
  37. Enables the chip on SPI1.
  38. --- /dev/null
  39. +++ b/arch/arm/boot/dts/overlays/sc16is750-i2c-overlay.dts
  40. @@ -0,0 +1,37 @@
  41. +/dts-v1/;
  42. +/plugin/;
  43. +
  44. +/ {
  45. + compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
  46. +
  47. + fragment@0 {
  48. + target = <&i2c_arm>;
  49. + __overlay__ {
  50. + #address-cells = <1>;
  51. + #size-cells = <0>;
  52. + status = "okay";
  53. +
  54. + sc16is750: sc16is750@48 {
  55. + compatible = "nxp,sc16is750";
  56. + reg = <0x48>; /* address */
  57. + clocks = <&sc16is750_clk>;
  58. + interrupt-parent = <&gpio>;
  59. + interrupts = <24 2>; /* IRQ_TYPE_EDGE_FALLING */
  60. + #gpio-cells = <2>;
  61. +
  62. + sc16is750_clk: sc16is750_clk {
  63. + compatible = "fixed-clock";
  64. + #clock-cells = <0>;
  65. + clock-frequency = <14745600>;
  66. + };
  67. + };
  68. + };
  69. + };
  70. +
  71. +
  72. + __overrides__ {
  73. + int_pin = <&sc16is750>,"interrupts:0";
  74. + addr = <&sc16is750>,"reg:0";
  75. + };
  76. +
  77. +};