Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Device Tree for the ST Microelectronics Nomadik NHK8815 board
0004  */
0005 
0006 /dts-v1/;
0007 #include <dt-bindings/interrupt-controller/irq.h>
0008 #include <dt-bindings/gpio/gpio.h>
0009 #include "ste-nomadik-stn8815.dtsi"
0010 
0011 / {
0012         model = "Nomadik STN8815NHK";
0013         compatible = "st,nomadik-nhk-15";
0014 
0015         chosen {
0016                 bootargs = "root=/dev/ram0 console=ttyAMA1,115200n8 earlyprintk";
0017         };
0018 
0019         aliases {
0020                 serial0 = &uart0;
0021                 serial1 = &uart1;
0022                 stmpe-i2c0 = &stmpe0;
0023                 stmpe-i2c1 = &stmpe1;
0024         };
0025 
0026         pinctrl {
0027                 uart0 {
0028                         uart0_nhk_mode: uart0_mux {
0029                                 u0_default_mux {
0030                                         function = "u0";
0031                                         groups = "u0txrx_a_1", "u0ctsrts_a_1";
0032                                 };
0033                         };
0034                 };
0035 
0036                 stmpe2401_1 {
0037                         stmpe2401_1_nhk_mode: stmpe2401_1_nhk {
0038                                 nhk_cfg1 {
0039                                         pins = "GPIO76_B20"; // IRQ line
0040                                         ste,input = <0>;
0041                                 };
0042                                 nhk_cfg2 {
0043                                         pins = "GPIO77_B8"; // reset line
0044                                         ste,output = <1>;
0045                                 };
0046                         };
0047                 };
0048                 stmpe2401_2 {
0049                         stmpe2401_2_nhk_mode: stmpe2401_2_nhk {
0050                                 nhk_cfg1 {
0051                                         pins = "GPIO78_A8"; // IRQ line
0052                                         ste,input = <0>;
0053                                 };
0054                                 nhk_cfg2 {
0055                                         pins = "GPIO79_C9"; // reset line
0056                                         ste,output = <1>;
0057                                 };
0058                         };
0059                 };
0060                 lis3lv02dl {
0061                         lis3lv02dl_nhk_mode: lis3lv02dl_nhk {
0062                                 nhk_cfg1 {
0063                                         pins = "GPIO82_C10"; // IRQ line
0064                                         ste,input = <0>;
0065                                 };
0066                         };
0067                 };
0068         };
0069         src@101e0000 {
0070                 /* These chrystal outputs are not used on this board */
0071                 disable-sxtalo;
0072                 disable-mxtalo;
0073         };
0074 
0075         /* This is where the interrupt is routed on the NHK-15 debug board */
0076         external-bus@34000000 {
0077                 compatible = "simple-bus";
0078                 reg = <0x34000000 0x1000000>;
0079                 #address-cells = <1>;
0080                 #size-cells = <1>;
0081                 ranges = <0 0x34000000 0x1000000>;
0082                 ethernet@300 {
0083                         compatible = "smsc,lan91c111";
0084                         reg = <0x300 0x0fd00>;
0085                         reg-io-width = <2>;
0086                         reset-gpios = <&stmpe_gpio44 10 GPIO_ACTIVE_HIGH>;
0087                         interrupt-parent = <&stmpe_gpio44>;
0088                         interrupts = <11 IRQ_TYPE_EDGE_RISING>;
0089                 };
0090         };
0091 
0092         i2c0 {
0093                 lis3lv02dl@1d {
0094                         /* Accelerometer */
0095                         compatible = "st,lis3lv02dl-accel";
0096                         interrupt-parent = <&gpio2>;
0097                         interrupts = <18 IRQ_TYPE_EDGE_RISING>; // GPIO 82
0098                         pinctrl-0 = <&lis3lv02dl_nhk_mode>;
0099                         pinctrl-names = "default";
0100                         reg = <0x1d>;
0101                 };
0102                 stmpe0: stmpe2401@43 {
0103                         compatible = "st,stmpe2401";
0104                         reg = <0x43>;
0105                         reset-gpios = <&gpio2 13 GPIO_ACTIVE_LOW>; // GPIO77
0106                         interrupts = <12 IRQ_TYPE_EDGE_FALLING>; // GPIO76
0107                         interrupt-parent = <&gpio2>;
0108                         interrupt-controller;
0109                         wakeup-source;
0110                         pinctrl-names = "default";
0111                         pinctrl-0 = <&stmpe2401_1_nhk_mode>;
0112                         stmpe_gpio43: stmpe_gpio {
0113                                 compatible = "st,stmpe-gpio";
0114                                 gpio-controller;
0115                                 #gpio-cells = <2>;
0116                                 interrupt-controller;
0117                                 #interrupt-cells = <2>;
0118                                 /* Some pins in alternate functions */
0119                                 st,norequest-mask = <0xf0f002>;
0120                         };
0121                         stmpe_keypad {
0122                                 compatible = "st,stmpe-keypad";
0123                                 debounce-interval = <64>;
0124                                 st,scan-count = <8>;
0125                                 st,no-autorepeat;
0126                                 keypad,num-rows = <8>;
0127                                 keypad,num-columns = <8>;
0128                                 linux,keymap = <0x00020072 // Vol down
0129                                                 0x00030073 // Vol up
0130                                                 0x0100009e // Back
0131                                                 0x010100e3 // TV out
0132                                                 0x01020098 // Lock
0133                                                 0x0103013b // Start
0134                                                 0x020000a3 // Next
0135                                                 0x020100a4 // Play
0136                                                 0x020200a5 // Prev
0137                                                 0x02030160 // OK
0138                                                 0x03000069 // Left
0139                                                 0x0301006a // Right
0140                                                 0x03020067 // Up
0141                                                 0x0303006c>; // Down
0142                         };
0143                         stmpe0_pwm: stmpe_pwm {
0144                                 compatible = "st,stmpe-pwm";
0145                                 #pwm-cells = <2>;
0146                         };
0147                 };
0148                 stmpe1: stmpe2401@44 {
0149                         compatible = "st,stmpe2401";
0150                         reg = <0x44>;
0151                         reset-gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; // GPIO79
0152                         interrupts = <14 IRQ_TYPE_EDGE_FALLING>; // GPIO78
0153                         interrupt-parent = <&gpio2>;
0154                         interrupt-controller;
0155                         wakeup-source;
0156                         pinctrl-names = "default";
0157                         pinctrl-0 = <&stmpe2401_2_nhk_mode>;
0158                         stmpe_gpio44: stmpe_gpio {
0159                                 compatible = "st,stmpe-gpio";
0160                                 gpio-controller;
0161                                 #gpio-cells = <2>;
0162                                 interrupt-controller;
0163                                 #interrupt-cells = <2>;
0164                                 /*
0165                                  * This will turn off SATA so that MMC/SD
0166                                  * can thrive
0167                                  */
0168                                 mmcsd-gpio {
0169                                         gpio-hog;
0170                                         gpios = <2 0x0>;
0171                                         output-low;
0172                                         line-name = "SATA EN";
0173                                 };
0174                         };
0175                 };
0176         };
0177 
0178         amba {
0179                 clcd@10120000 {
0180                         status = "okay";
0181                         pinctrl-names = "default";
0182                         pinctrl-0 = <&clcd_24bit_mux>;
0183                         port {
0184                                 nomadik_clcd: endpoint {
0185                                         remote-endpoint = <&nomadik_clcd_panel>;
0186                                         arm,pl11x,tft-r0g0b0-pads = <16 8 0>;
0187                                 };
0188                         };
0189 
0190                 };
0191 
0192                 /* Activate RX/TX and CTS/RTS on UART 0 */
0193                 uart0: uart@101fd000 {
0194                         pinctrl-names = "default";
0195                         pinctrl-0 = <&uart0_nhk_mode>;
0196                         status = "okay";
0197                 };
0198                 mmcsd: mmc@101f6000 {
0199                         cd-gpios = <&stmpe_gpio44 7 GPIO_ACTIVE_LOW>;
0200                         wp-gpios = <&stmpe_gpio44 18 GPIO_ACTIVE_HIGH>;
0201                 };
0202         };
0203 
0204         spi {
0205                 compatible = "spi-gpio";
0206                 #address-cells = <1>;
0207                 #size-cells = <0>;
0208 
0209                 /*
0210                  * As we're dealing with 3wire SPI, we only define SCK
0211                  * and MOSI (in the spec MOSI is called "SDA").
0212                  */
0213                 gpio-sck = <&gpio0 5 GPIO_ACTIVE_HIGH>;
0214                 gpio-mosi = <&gpio0 4 GPIO_ACTIVE_HIGH>;
0215                 cs-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
0216                 num-chipselects = <1>;
0217 
0218                 /*
0219                  * WVGA connector 21
0220                  * WVGA (800x480): 4.3" TPG110 TDO43MTEA2 24-bit RGB
0221                  * with TPO touch screen.
0222                   */
0223                 panel: display@0 {
0224                         /*
0225                          * The TPO display driver is connected to a
0226                          * 5.7" OSD OSD057VA01CT TFT display.
0227                          */
0228                         compatible = "tpo,tpg110";
0229                         reg = <0>;
0230                         spi-3wire;
0231                         /* 320 ns min period ~= 3 MHz */
0232                         spi-max-frequency = <3000000>;
0233                         /* Width and height from the OSD data sheet */
0234                         width-mm = <116>;
0235                         height-mm = <87>;
0236                         grestb-gpios = <&stmpe_gpio44 5 GPIO_ACTIVE_LOW>;
0237                         backlight = <&bl>;
0238 
0239                         port {
0240                                 nomadik_clcd_panel: endpoint {
0241                                         remote-endpoint = <&nomadik_clcd>;
0242                                 };
0243                         };
0244                 };
0245         };
0246 
0247         bl: backlight {
0248                 compatible = "pwm-backlight";
0249                 pwms = <&stmpe0_pwm 0 500000>;
0250                 pwm-names = "backlight";
0251                 brightness-levels = <
0252                         0  1  2  3  4  5  6  7  8  9
0253                         10 11 12 13 14 15 16 17 18 19
0254                         20 21 22 23 24 25 26 27 28 29
0255                         30 31 32 33 34 35 36 37 38 39
0256                         40 41 42 43 44 45 46 47 48 49
0257                         50 51 52 53 54 55 56 57 58 59
0258                         60 61 62 63 64 65 66 67 68 69
0259                         70 71 72 73 74 75 76 77 78 79
0260                         80 81 82 83 84 85 86 87 88 89
0261                         90 91 92 93 94 95 96 97 98 99
0262                         100
0263                 >;
0264                 default-brightness-level = <100>;
0265         };
0266 };