Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2012
415
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None
  1. From 5fc63e337fdade6d8b3eeb987a5da9f7b57f54cb Mon Sep 17 00:00:00 2001
  2. From: Fadil Berisha <f.koliqi@gmail.com>
  3. Date: Wed, 19 Sep 2012 17:57:35 -0400
  4. Subject: [PATCH 4/4] Add i2c initial support
  5.  
  6. ---
  7. arch/arm/boot/dts/imx23-olinuxino.dts | 20 +++++++++++++++
  8. arch/arm/boot/dts/imx23.dtsi | 44 ++++++++++++++++++++++++++++++---
  9. 2 files changed, 61 insertions(+), 3 deletions(-)
  10.  
  11. diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts
  12. index 4a9d84d..7143633 100644
  13. --- a/arch/arm/boot/dts/imx23-olinuxino.dts
  14. +++ b/arch/arm/boot/dts/imx23-olinuxino.dts
  15. @@ -67,6 +67,26 @@
  16. };
  17.  
  18. apbx@80040000 {
  19. + i2c0: i2c@80058000 {
  20. + pinctrl-names = "default";
  21. + pinctrl-0 = <&i2c0_pins_a>;
  22. + status = "okay";
  23. +
  24. + sgtl5000: codec@0a {
  25. + compatible = "fsl,sgtl5000";
  26. + reg = <0x0a>;
  27. + VDDA-supply = <&reg_3p3v>;
  28. + VDDIO-supply = <&reg_3p3v>;
  29. +
  30. + };
  31. +
  32. + at24@51 {
  33. + compatible = "at24,24c32";
  34. + pagesize = <32>;
  35. + reg = <0x51>;
  36. + };
  37. + };
  38. +
  39. duart: serial@80070000 {
  40. pinctrl-names = "default";
  41. pinctrl-0 = <&duart_pins_a>;
  42. diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi
  43. index 1cb6a69..ae7e1fa 100644
  44. --- a/arch/arm/boot/dts/imx23.dtsi
  45. +++ b/arch/arm/boot/dts/imx23.dtsi
  46. @@ -279,11 +279,44 @@
  47. fsl,pull-up = <0>;
  48. };
  49.  
  50. + i2c0_pins_a: i2c0@0 {
  51. + reg = <0>;
  52. + fsl,pinmux-ids = <
  53. + 0x01e0 /* MX23_PAD_I2C_SCL__I2C_SCL */
  54. + 0x01f0 /* MX23_PAD_I2C_SDA__I2C_SDA */
  55. + >;
  56. + fsl,drive-strength = <1>;
  57. + fsl,voltage = <1>;
  58. + fsl,pull-up = <1>;
  59. + };
  60. +
  61. + i2c1_pins_a: i2c1@0 {
  62. + reg = <0>;
  63. + fsl,pinmux-ids = <
  64. + 0x1171 /* MX23_PAD_LCD_ENABLE__I2C_SCL */
  65. + 0x1181 /* MX23_PAD_LCD_HSYNC__I2C_SDA */
  66. + >;
  67. + fsl,drive-strength = <1>;
  68. + fsl,voltage = <1>;
  69. + fsl,pull-up = <1>;
  70. + };
  71. +
  72. + i2c2_pins_a: i2c@0 {
  73. + reg = <0>;
  74. + fsl,pinmux-ids = <
  75. + 0x2031 /* MX23_PAD_SSP1_DATA1__I2C_SCL */
  76. + 0x2041 /* MX23_PAD_SSP1_DATA2__I2C_SDA */
  77. + >;
  78. + fsl,drive-strength = <1>;
  79. + fsl,voltage = <1>;
  80. + fsl,pull-up = <1>;
  81. + };
  82. +
  83. spi1_pins_a: spi1@0 {
  84. reg = <0>;
  85. fsl,pinmux-ids = <
  86. - 0x0182 /* MX23_PAD_GPMI_WRN__SSP2_SCK */
  87. - 0x0142 /* MX23_PAD_GPMI_RDY1__SSP2_CMD */
  88. + 0x0182 /* MX23_PAD_GPMI_WRN__SSP2_SCK */
  89. + 0x0142 /* MX23_PAD_GPMI_RDY1__SSP2_CMD */
  90. 0x0002 /* MX23_PAD_GPMI_D00__SSP2_DATA0 */
  91. 0x0032 /* MX23_PAD_GPMI_D03__SSP2_DATA3 */
  92. >;
  93. @@ -399,8 +432,13 @@
  94. status = "disabled";
  95. };
  96.  
  97. - i2c@80058000 {
  98. + i2c0: i2c@80058000 {
  99. + #address-cells = <1>;
  100. + #size-cells = <0>;
  101. + compatible = "fsl,imx23-i2c";
  102. reg = <0x80058000 0x2000>;
  103. + interrupts = <26 27>;
  104. + clock-frequency = <100000>;
  105. status = "disabled";
  106. };
  107.  
  108. --
  109. 1.7.10
Advertisement
RAW Paste Data Copied
Advertisement