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

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