Joachim Eastwood | 56bd377 | 2015-05-12 00:00:51 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Embedded Artist LPC4357 Developer's Kit |
| 3 | * |
| 4 | * Copyright 2015 Joachim Eastwood <manabian@gmail.com> |
| 5 | * |
| 6 | * This code is released using a dual license strategy: BSD/GPL |
| 7 | * You can choose the licence that better fits your requirements. |
| 8 | * |
| 9 | * Released under the terms of 3-clause BSD License |
| 10 | * Released under the terms of GNU General Public License Version 2.0 |
| 11 | * |
| 12 | */ |
| 13 | /dts-v1/; |
| 14 | |
| 15 | #include "lpc18xx.dtsi" |
| 16 | #include "lpc4357.dtsi" |
| 17 | |
Joachim Eastwood | 95dafb2 | 2015-04-02 05:55:32 +0200 | [diff] [blame^] | 18 | #include "dt-bindings/input/input.h" |
| 19 | #include "dt-bindings/gpio/gpio.h" |
| 20 | |
Joachim Eastwood | 56bd377 | 2015-05-12 00:00:51 +0200 | [diff] [blame] | 21 | / { |
| 22 | model = "Embedded Artists' LPC4357 Developer's Kit"; |
| 23 | compatible = "ea,lpc4357-developers-kit", "nxp,lpc4357", "nxp,lpc4350"; |
| 24 | |
| 25 | aliases { |
| 26 | serial0 = &uart0; |
| 27 | serial1 = &uart1; |
| 28 | serial2 = &uart2; |
| 29 | serial3 = &uart3; |
| 30 | }; |
| 31 | |
| 32 | chosen { |
| 33 | stdout-path = &uart0; |
| 34 | }; |
| 35 | |
| 36 | memory { |
| 37 | device_type = "memory"; |
| 38 | reg = <0x28000000 0x2000000>; /* 32 MB */ |
| 39 | }; |
Joachim Eastwood | bfd0b49 | 2015-04-02 05:54:29 +0200 | [diff] [blame] | 40 | |
| 41 | /* vmmc is controlled by sdmmc host internally */ |
| 42 | vmmc: vmmc_fixed { |
| 43 | compatible = "regulator-fixed"; |
| 44 | regulator-name = "vmmc-supply"; |
| 45 | regulator-min-microvolt = <3300000>; |
| 46 | regulator-max-microvolt = <3300000>; |
| 47 | }; |
Joachim Eastwood | 95dafb2 | 2015-04-02 05:55:32 +0200 | [diff] [blame^] | 48 | |
| 49 | gpio_joystick { |
| 50 | compatible = "gpio-keys-polled"; |
| 51 | pinctrl-names = "default"; |
| 52 | pinctrl-0 = <&gpio_joystick_pins>; |
| 53 | #address-cells = <1>; |
| 54 | #size-cells = <0>; |
| 55 | poll-interval = <100>; |
| 56 | autorepeat; |
| 57 | |
| 58 | button@0 { |
| 59 | label = "joy_enter"; |
| 60 | linux,code = <KEY_ENTER>; |
| 61 | gpios = <&gpio LPC_GPIO(4,8) GPIO_ACTIVE_LOW>; |
| 62 | }; |
| 63 | |
| 64 | button@1 { |
| 65 | label = "joy_left"; |
| 66 | linux,code = <KEY_LEFT>; |
| 67 | gpios = <&gpio LPC_GPIO(4,9) GPIO_ACTIVE_LOW>; |
| 68 | }; |
| 69 | |
| 70 | button@2 { |
| 71 | label = "joy_up"; |
| 72 | linux,code = <KEY_UP>; |
| 73 | gpios = <&gpio LPC_GPIO(4,10) GPIO_ACTIVE_LOW>; |
| 74 | }; |
| 75 | |
| 76 | button@3 { |
| 77 | label = "joy_right"; |
| 78 | linux,code = <KEY_RIGHT>; |
| 79 | gpios = <&gpio LPC_GPIO(4,12) GPIO_ACTIVE_LOW>; |
| 80 | }; |
| 81 | |
| 82 | button@4 { |
| 83 | label = "joy_down"; |
| 84 | linux,code = <KEY_DOWN>; |
| 85 | gpios = <&gpio LPC_GPIO(4,13) GPIO_ACTIVE_LOW>; |
| 86 | }; |
| 87 | }; |
Joachim Eastwood | 56bd377 | 2015-05-12 00:00:51 +0200 | [diff] [blame] | 88 | }; |
| 89 | |
Joachim Eastwood | c97a63c | 2015-04-02 05:51:20 +0200 | [diff] [blame] | 90 | &pinctrl { |
Joachim Eastwood | 95dafb2 | 2015-04-02 05:55:32 +0200 | [diff] [blame^] | 91 | gpio_joystick_pins: gpio-joystick-pins { |
| 92 | gpio_joystick_cfg { |
| 93 | pins = "p9_0", "p9_1", "pa_1", "pa_2", "pa_3"; |
| 94 | function = "gpio"; |
| 95 | input-enable; |
| 96 | bias-disable; |
| 97 | }; |
| 98 | }; |
| 99 | |
Joachim Eastwood | bfd0b49 | 2015-04-02 05:54:29 +0200 | [diff] [blame] | 100 | sdmmc_pins: sdmmc-pins { |
| 101 | sdmmc_clk_cfg { |
| 102 | pins = "pc_0"; |
| 103 | function = "sdmmc"; |
| 104 | slew-rate = <1>; |
| 105 | bias-pull-down; |
| 106 | }; |
| 107 | |
| 108 | sdmmc_cmd_dat0_3_cfg { |
| 109 | pins = "pc_4", "pc_5", "pc_6", "pc_7", "pc_10"; |
| 110 | function = "sdmmc"; |
| 111 | slew-rate = <1>; |
| 112 | bias-disable; |
| 113 | input-enable; |
| 114 | input-schmitt-disable; |
| 115 | }; |
| 116 | |
| 117 | sdmmc_cd_cfg { |
| 118 | pins = "pc_8"; |
| 119 | function = "sdmmc"; |
| 120 | bias-pull-down; |
| 121 | input-enable; |
| 122 | }; |
| 123 | |
| 124 | sdmmc_pow_cfg { |
| 125 | pins = "pc_9"; |
| 126 | function = "sdmmc"; |
| 127 | bias-pull-down; |
| 128 | }; |
| 129 | }; |
| 130 | |
Joachim Eastwood | c97a63c | 2015-04-02 05:51:20 +0200 | [diff] [blame] | 131 | uart0_pins: uart0-pins { |
| 132 | uart0_rx_cfg { |
| 133 | pins = "pf_11"; |
| 134 | function = "uart0"; |
| 135 | input-schmitt-disable; |
| 136 | bias-disable; |
| 137 | input-enable; |
| 138 | }; |
| 139 | |
| 140 | uart0_tx_cfg { |
| 141 | pins = "pf_10"; |
| 142 | function = "uart0"; |
| 143 | bias-pull-down; |
| 144 | }; |
| 145 | }; |
| 146 | }; |
| 147 | |
Joachim Eastwood | bfd0b49 | 2015-04-02 05:54:29 +0200 | [diff] [blame] | 148 | &mmcsd { |
| 149 | status = "okay"; |
| 150 | bus-width = <4>; |
| 151 | vmmc-supply = <&vmmc>; |
| 152 | pinctrl-names = "default"; |
| 153 | pinctrl-0 = <&sdmmc_pins>; |
| 154 | }; |
| 155 | |
Joachim Eastwood | 56bd377 | 2015-05-12 00:00:51 +0200 | [diff] [blame] | 156 | &uart0 { |
| 157 | status = "okay"; |
Joachim Eastwood | c97a63c | 2015-04-02 05:51:20 +0200 | [diff] [blame] | 158 | pinctrl-names = "default"; |
| 159 | pinctrl-0 = <&uart0_pins>; |
Joachim Eastwood | 56bd377 | 2015-05-12 00:00:51 +0200 | [diff] [blame] | 160 | }; |