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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. };
  49. leds: leds {
  50. compatible = "gpio-leds";
  51. rgb_led_r: rgb-led-r {
  52. gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>;
  53. linux,default-trigger = "timer";
  54. linux,delay-reg = <0>; // 延时注册
  55. linux,blink-delay-on = <500>; // 打开时间
  56. linux,blink-delay-off = <500>; // 关闭时间
  57. };
  58. rgb_led_g: rgb-led-g {
  59. gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_LOW>;
  60. linux,default-trigger = "timer";
  61. linux,delay-reg = <100>; // 延时注册
  62. linux,blink-delay-on = <1000>;
  63. linux,blink-delay-off = <1000>;
  64. };
  65. rgb_led_b: rgb-led-b {
  66. gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_LOW>;
  67. linux,default-trigger = "timer";
  68. linux,delay-reg = <100>; // 延时注册
  69. linux,blink-delay-on = <1500>;
  70. linux,blink-delay-off = <1500>;
  71. };
  72. };
  73. };
  74. &pinctrl {
  75. headphone {
  76. hp_det: hp-det {
  77. rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
  78. };
  79. };
  80. };
  81. //用户三色灯
  82. &leds {
  83. status = "okay";
  84. };
  85. //耳机插入检测,不使用扩展板情况需关闭,否则默认会检测到耳机插入
  86. &rk_headset {
  87. status = "disabled";
  88. };
  89. //用户串口3
  90. &uart3 {
  91. status = "okay";
  92. pinctrl-names = "default";
  93. pinctrl-0 = <&uart3m1_xfer>;
  94. };
  95. //用户I2C2
  96. &i2c2 {
  97. status = "okay";
  98. /*添加你的I2C设备参考
  99. gt1x: gt1x@14 {
  100. compatible = "goodix,gt1x";
  101. reg = <0x14>;
  102. pinctrl-names = "default";
  103. pinctrl-0 = <&touch_gpio>;
  104. goodix,rst-gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
  105. goodix,irq-gpio = <&gpio0 RK_PB5 IRQ_TYPE_LEVEL_LOW>;
  106. };*/
  107. };
  108. &i2c3 {
  109. status = "okay";
  110. pinctrl-names = "default";
  111. pinctrl-0 = <&i2c3m1_xfer>;
  112. /*添加你的I2C设备参考
  113. gt1x: gt1x@14 {
  114. compatible = "goodix,gt1x";
  115. reg = <0x14>;
  116. pinctrl-names = "default";
  117. pinctrl-0 = <&touch_gpio>;
  118. goodix,rst-gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
  119. goodix,irq-gpio = <&gpio0 RK_PB5 IRQ_TYPE_LEVEL_LOW>;
  120. };*/
  121. };
  122. &spi3 {
  123. status = "okay";
  124. max-freq = <48000000>;
  125. dma-names = "tx","rx";
  126. pinctrl-names = "default", "high_speed";
  127. pinctrl-0 = <&spi3m1_cs0 &spi3m1_pins>;
  128. pinctrl-1 = <&spi3m1_cs0 &spi3m1_pins_hs>;
  129. spi_test@10 {
  130. compatible ="rockchip,spi_test_bus1_cs0";
  131. reg = <0>;
  132. spi-max-frequency = <24000000>;
  133. status = "okay";
  134. };
  135. };
  136. &pwm8 {
  137. status = "okay";
  138. };
  139. &pwm9 {
  140. status = "okay";
  141. };
  142. &pwm14 {
  143. status = "okay";
  144. };
  145. //pwd 15遥控器
  146. &pwm15 {
  147. status = "okay";
  148. compatible = "rockchip,remotectl-pwm";
  149. remote_pwm_id = <3>;
  150. handle_cpu_id = <1>;
  151. remote_support_psci = <0>;
  152. pinctrl-names = "default";
  153. pinctrl-0 = <&pwm15m0_pins>;
  154. //用户自定方法:adb设置输出日志并通过dmesg确定usercode=address与key_table=command
  155. //echo 1 > sys/module/rockchip_pwm_remotectl/parameters/code_print
  156. //键值可在 include/dt-bindings/input/linux-event-codes.h 中查找
  157. ir_key1 {
  158. rockchip,usercode = <0xff00>;
  159. rockchip,key_table =
  160. <0xf2 KEY_MENU>,
  161. <0xe9 KEY_BACK>,
  162. <0xe3 KEY_ENTER>,
  163. <0xe7 KEY_UP>,
  164. <0xad KEY_DOWN>,
  165. <0xf7 KEY_LEFT>,
  166. <0xa5 KEY_RIGHT>,
  167. <0xba KEY_1>,
  168. <0xb9 KEY_2>,
  169. <0xb8 KEY_3>,
  170. <0xbb KEY_4>,
  171. <0xbf KEY_5>,
  172. <0xbc KEY_6>,
  173. <0xf8 KEY_7>,
  174. <0xea KEY_8>,
  175. <0xf6 KEY_9>,
  176. <0xe6 KEY_0>;
  177. };
  178. };