tspi-rk3566-user-v10-linux.dts 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
  4. *
  5. */
  6. /*********************************************************************
  7. * 立创开发板不靠卖板赚钱,以培养中国工程师为己任
  8. * 泰山派软硬件资料与相关扩展板软硬件资料官网全部开源
  9. * 开发板官网:www.lckfb.com
  10. * 立创论坛:oshwhub.com/forum
  11. * 关注B站:【立创开发板】,掌握我们的最新动态!
  12. *********************************************************************
  13. * 文件名:tspi-rk3566-user-v10.dtsi
  14. * 描述:用户自定义层
  15. * 更新:
  16. * 时间 作者 联系 说明
  17. * 2023-09-13 吴才成 1378913492@qq.com v1.0.0
  18. *********************************************************************/
  19. /dts-v1/;
  20. #include <dt-bindings/gpio/gpio.h>
  21. #include <dt-bindings/display/media-bus-format.h>
  22. #include <dt-bindings/pinctrl/rockchip.h>
  23. #include "rk3566.dtsi"
  24. #include <dt-bindings/display/rockchip_vop.h>
  25. //tspi核心配置层,这里是几乎后期不需要怎么改动
  26. #include "tspi-rk3566-core-v10.dtsi"
  27. //【开/关】EDP 显示屏幕配置,用户可以基于此复制自己的屏幕,注意EDP与MIPI屏幕互斥,因为共用了VOP如果需要同显自行修改
  28. // #include "tspi-rk3566-edp-v10.dtsi"
  29. //【开/关】mipi 显示屏幕配置,用户可以基于此复制自己的屏幕,注意EDP与MIPI屏幕互斥,因为共用了VOP如果需要同显自行修改
  30. // #include "tspi-rk3566-dsi-v10.dtsi"
  31. //【开/关】HDMI 显示屏幕配置,里面内容几乎可以不用动,如果不需要hdmi显示直接注释掉即可
  32. #include "tspi-rk3566-hdmi-v10.dtsi"
  33. //【开/关】摄像头 目前视频的是ov5659
  34. #include "tspi-rk3566-csi-v10.dtsi"
  35. //【开/关】网口 扩展板上使用的是千兆网,不接扩展板情况下可以关闭
  36. // #include "tspi-rk3566-gmac1-v10.dtsi"
  37. //【开/关】下方是用户定义层,所有用户修改理论上在此下方修改就好了
  38. / {
  39. model = "lckfb tspi V10 Board";
  40. compatible = "lckfb,tspi-v10", "rockchip,rk3566";
  41. rk_headset: rk-headset {
  42. compatible = "rockchip_headset";
  43. headset_gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
  44. pinctrl-names = "default";
  45. pinctrl-0 = <&hp_det>;
  46. };
  47. mynode{
  48. model="fsl,mpc8572ds"
  49. compatible="fsl,mpc8572ds"
  50. };
  51. leds: leds {
  52. compatible = "gpio-leds";
  53. rgb_led_r: rgb-led-r {
  54. gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>;
  55. linux,default-trigger = "timer";
  56. linux,delay-reg = <0>; // 延时注册
  57. linux,blink-delay-on = <500>; // 打开时间
  58. linux,blink-delay-off = <500>; // 关闭时间
  59. };
  60. rgb_led_g: rgb-led-g {
  61. gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>;
  62. linux,default-trigger = "timer";
  63. linux,delay-reg = <100>; // 延时注册
  64. linux,blink-delay-on = <1000>;
  65. linux,blink-delay-off = <1000>;
  66. };
  67. rgb_led_b: rgb-led-b {
  68. gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>;
  69. linux,default-trigger = "timer";
  70. linux,delay-reg = <100>; // 延时注册
  71. linux,blink-delay-on = <1500>;
  72. linux,blink-delay-off = <1500>;
  73. };
  74. };
  75. };
  76. &pinctrl {
  77. headphone {
  78. hp_det: hp-det {
  79. rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
  80. };
  81. };
  82. };
  83. //用户三色灯
  84. &leds {
  85. status = "okay";
  86. };
  87. //耳机插入检测,不使用扩展板情况需关闭,否则默认会检测到耳机插入
  88. &rk_headset {
  89. status = "disabled";
  90. };
  91. //用户串口3
  92. &uart3 {
  93. status = "okay";
  94. pinctrl-names = "default";
  95. pinctrl-0 = <&uart3m1_xfer>;
  96. };
  97. //用户I2C2
  98. &i2c2 {
  99. status = "okay";
  100. /*添加你的I2C设备参考
  101. gt1x: gt1x@14 {
  102. compatible = "goodix,gt1x";
  103. reg = <0x14>;
  104. pinctrl-names = "default";
  105. pinctrl-0 = <&touch_gpio>;
  106. goodix,rst-gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
  107. goodix,irq-gpio = <&gpio0 RK_PB5 IRQ_TYPE_LEVEL_LOW>;
  108. };*/
  109. };
  110. &i2c3 {
  111. status = "okay";
  112. pinctrl-names = "default";
  113. pinctrl-0 = <&i2c3m1_xfer>;
  114. /*添加你的I2C设备参考
  115. gt1x: gt1x@14 {
  116. compatible = "goodix,gt1x";
  117. reg = <0x14>;
  118. pinctrl-names = "default";
  119. pinctrl-0 = <&touch_gpio>;
  120. goodix,rst-gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
  121. goodix,irq-gpio = <&gpio0 RK_PB5 IRQ_TYPE_LEVEL_LOW>;
  122. };*/
  123. };
  124. &spi3 {
  125. status = "okay";
  126. max-freq = <48000000>;
  127. dma-names = "tx","rx";
  128. pinctrl-names = "default", "high_speed";
  129. pinctrl-0 = <&spi3m1_cs0 &spi3m1_pins>;
  130. pinctrl-1 = <&spi3m1_cs0 &spi3m1_pins_hs>;
  131. spi_test@10 {
  132. compatible ="rockchip,spi_test_bus1_cs0";
  133. reg = <0>;
  134. spi-max-frequency = <24000000>;
  135. status = "okay";
  136. };
  137. };
  138. &pwm8 {
  139. status = "okay";
  140. };
  141. &pwm9 {
  142. status = "okay";
  143. };
  144. &pwm14 {
  145. status = "okay";
  146. };
  147. //pwd 15遥控器
  148. &pwm15 {
  149. status = "okay";
  150. compatible = "rockchip,remotectl-pwm";
  151. remote_pwm_id = <3>;
  152. handle_cpu_id = <1>;
  153. remote_support_psci = <0>;
  154. pinctrl-names = "default";
  155. pinctrl-0 = <&pwm15m0_pins>;
  156. //用户自定方法:adb设置输出日志并通过dmesg确定usercode=address与key_table=command
  157. //echo 1 > sys/module/rockchip_pwm_remotectl/parameters/code_print
  158. //键值可在 include/dt-bindings/input/linux-event-codes.h 中查找
  159. ir_key1 {
  160. rockchip,usercode = <0xff00>;
  161. rockchip,key_table =
  162. <0xf2 KEY_MENU>,
  163. <0xe9 KEY_BACK>,
  164. <0xe3 KEY_ENTER>,
  165. <0xe7 KEY_UP>,
  166. <0xad KEY_DOWN>,
  167. <0xf7 KEY_LEFT>,
  168. <0xa5 KEY_RIGHT>,
  169. <0xba KEY_1>,
  170. <0xb9 KEY_2>,
  171. <0xb8 KEY_3>,
  172. <0xbb KEY_4>,
  173. <0xbf KEY_5>,
  174. <0xbc KEY_6>,
  175. <0xf8 KEY_7>,
  176. <0xea KEY_8>,
  177. <0xf6 KEY_9>,
  178. <0xe6 KEY_0>;
  179. };
  180. };