rk3566-anbernic-rg503.dts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /dts-v1/;
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/linux-event-codes.h>
  5. #include <dt-bindings/pinctrl/rockchip.h>
  6. #include "rk3566-anbernic-rgxx3.dtsi"
  7. / {
  8. model = "RG503";
  9. compatible = "anbernic,rg503", "rockchip,rk3566";
  10. aliases {
  11. mmc0 = &sdmmc0;
  12. mmc1 = &sdmmc1;
  13. mmc2 = &sdmmc2;
  14. };
  15. gpio_spi: spi {
  16. compatible = "spi-gpio";
  17. pinctrl-names = "default";
  18. pinctrl-0 = <&spi_pins>;
  19. #address-cells = <1>;
  20. #size-cells = <0>;
  21. sck-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
  22. mosi-gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
  23. cs-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
  24. num-chipselects = <0>;
  25. };
  26. };
  27. &gpio_keys_control {
  28. button-a {
  29. gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
  30. label = "EAST";
  31. linux,code = <BTN_EAST>;
  32. };
  33. button-left {
  34. gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
  35. label = "DPAD-LEFT";
  36. linux,code = <BTN_DPAD_LEFT>;
  37. };
  38. button-right {
  39. gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
  40. label = "DPAD-RIGHT";
  41. linux,code = <BTN_DPAD_RIGHT>;
  42. };
  43. button-r1 {
  44. gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
  45. label = "TR";
  46. linux,code = <BTN_TR>;
  47. };
  48. button-r2 {
  49. gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
  50. label = "TR2";
  51. linux,code = <BTN_TR2>;
  52. };
  53. button-right {
  54. gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
  55. label = "DPAD-RIGHT";
  56. linux,code = <BTN_DPAD_RIGHT>;
  57. };
  58. button-y {
  59. gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
  60. label = "WEST";
  61. linux,code = <BTN_WEST>;
  62. };
  63. };
  64. &pinctrl {
  65. gpio-spi {
  66. spi_pins: spi-pins {
  67. rockchip,pins =
  68. <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>,
  69. <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>,
  70. <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
  71. };
  72. };
  73. };