Martin Blumenstingl | e15d277 | 2017-03-18 13:36:57 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2017 Martin Blumenstingl <martin.blumenstingl@googlemail.com>. |
| 3 | * |
| 4 | * SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 5 | */ |
| 6 | |
| 7 | /dts-v1/; |
| 8 | |
| 9 | #include <dt-bindings/input/input.h> |
| 10 | |
| 11 | #include "meson-gxl-s905x-p212.dtsi" |
| 12 | |
| 13 | / { |
| 14 | compatible = "khadas,vim", "amlogic,s905x", "amlogic,meson-gxl"; |
| 15 | model = "Khadas VIM"; |
| 16 | |
| 17 | adc-keys { |
| 18 | compatible = "adc-keys"; |
| 19 | io-channels = <&saradc 0>; |
| 20 | io-channel-names = "buttons"; |
| 21 | keyup-threshold-microvolt = <1710000>; |
| 22 | |
| 23 | button-function { |
| 24 | label = "Function"; |
| 25 | linux,code = <KEY_FN>; |
| 26 | press-threshold-microvolt = <10000>; |
| 27 | }; |
| 28 | }; |
| 29 | |
| 30 | aliases { |
| 31 | serial2 = &uart_AO_B; |
| 32 | }; |
| 33 | |
| 34 | gpio-keys-polled { |
| 35 | compatible = "gpio-keys-polled"; |
| 36 | #address-cells = <1>; |
| 37 | #size-cells = <0>; |
| 38 | poll-interval = <100>; |
| 39 | |
| 40 | button@0 { |
| 41 | label = "power"; |
| 42 | linux,code = <KEY_POWER>; |
| 43 | gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; |
| 44 | }; |
| 45 | }; |
| 46 | |
| 47 | pwmleds { |
| 48 | compatible = "pwm-leds"; |
| 49 | |
| 50 | power { |
| 51 | label = "vim:red:power"; |
| 52 | pwms = <&pwm_AO_ab 1 7812500 0>; |
| 53 | max-brightness = <255>; |
| 54 | linux,default-trigger = "default-on"; |
| 55 | }; |
| 56 | }; |
| 57 | }; |
| 58 | |
| 59 | &i2c_A { |
| 60 | status = "okay"; |
| 61 | pinctrl-0 = <&i2c_a_pins>; |
| 62 | pinctrl-names = "default"; |
| 63 | }; |
| 64 | |
| 65 | &i2c_B { |
| 66 | status = "okay"; |
| 67 | pinctrl-0 = <&i2c_b_pins>; |
| 68 | pinctrl-names = "default"; |
| 69 | |
| 70 | rtc: rtc@51 { |
| 71 | /* has to be enabled manually when a battery is connected: */ |
| 72 | status = "disabled"; |
| 73 | compatible = "haoyu,hym8563"; |
| 74 | reg = <0x51>; |
| 75 | #clock-cells = <0>; |
| 76 | clock-frequency = <32768>; |
| 77 | clock-output-names = "xin32k"; |
| 78 | }; |
| 79 | }; |
| 80 | |
| 81 | &ir { |
| 82 | linux,rc-map-name = "rc-geekbox"; |
| 83 | }; |
| 84 | |
| 85 | &pwm_AO_ab { |
| 86 | status = "okay"; |
| 87 | pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>; |
| 88 | pinctrl-names = "default"; |
| 89 | clocks = <&clkc CLKID_FCLK_DIV4>; |
| 90 | clock-names = "clkin0"; |
| 91 | }; |
| 92 | |
| 93 | &pwm_ef { |
| 94 | pinctrl-0 = <&pwm_e_pins>, <&pwm_f_clk_pins>; |
| 95 | }; |
| 96 | |
| 97 | &sd_emmc_a { |
| 98 | brcmf: bcrmf@1 { |
| 99 | reg = <1>; |
| 100 | compatible = "brcm,bcm4329-fmac"; |
| 101 | }; |
| 102 | }; |
| 103 | |
| 104 | /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */ |
| 105 | &uart_AO { |
| 106 | status = "okay"; |
| 107 | }; |
| 108 | |
| 109 | /* This is brought out on the UART_RX_AO_B (15) and UART_TX_AO_B (16) pins: */ |
| 110 | &uart_AO_B { |
| 111 | status = "okay"; |
| 112 | pinctrl-0 = <&uart_ao_b_pins>; |
| 113 | pinctrl-names = "default"; |
| 114 | }; |