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