Advertisement
Guest User

Untitled

a guest
Aug 12th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 25.50 KB | None | 0 0
  1. /*
  2.  * Copyright (C) 2014 Variscite LTD - http://www.variscite.com/
  3.  *
  4.  * This program is free software; you can redistribute it and/or modify
  5.  * it under the terms of the GNU General Public License version 2 as
  6.  * published by the Free Software Foundation.
  7.  */
  8. /dts-v1/;
  9.  
  10. #include "am33xx.dtsi"
  11. #include <dt-bindings/interrupt-controller/irq.h>
  12.  
  13. / {
  14.     model = "Variscite AM335x SOM";
  15.     compatible = "ti,var-som-am33", "ti,am33xx";
  16.  
  17.     cpus {
  18.         cpu@0 {
  19.             cpu0-supply = <&vdd1_reg>;
  20.         };
  21.     };
  22.  
  23.     memory {
  24.         device_type = "memory";
  25.         reg = <0x80000000 0x10000000>; /* 256 MB */
  26.     };
  27.    
  28.     vbat: fixedregulator@0 {
  29.         compatible = "regulator-fixed";
  30.         regulator-name = "vbat";
  31.         regulator-min-microvolt = <5000000>;
  32.         regulator-max-microvolt = <5000000>;
  33.         regulator-boot-on;
  34.     };
  35.  
  36.     wlan_en_reg: fixedregulator@1 {
  37.         compatible = "regulator-fixed";
  38.         regulator-name = "wlan-en-regulator";
  39.         regulator-min-microvolt = <1800000>;
  40.         regulator-max-microvolt = <1800000>;
  41.         gpio = <&gpio3 21 GPIO_ACTIVE_HIGH>;
  42.         enable-active-high;
  43.     };
  44.  
  45.     vmmc_fixed: fixedregulator@2 {
  46.         compatible = "regulator-fixed";
  47.         regulator-name = "vmmc_fixed";
  48.         regulator-min-microvolt = <3300000>;
  49.         regulator-max-microvolt = <3300000>;
  50.         regulator-always-on;
  51.         regulator-boot-on;
  52.     };
  53.  
  54.     gpio_buttons: gpio_buttons@0 {
  55.         compatible = "gpio-keys";
  56.         #address-cells = <1>;
  57.         #size-cells = <0>;
  58.  
  59.         switch@1 {
  60.             label = "button0";
  61.             linux,code = <0x100>;
  62.             gpios = <&gpio3 4 GPIO_ACTIVE_LOW>;
  63.             gpio-key,wakeup;
  64.         };
  65.     };
  66.  
  67.     backlight {
  68.         compatible = "pwm-backlight";
  69.         pwms = <&ehrpwm0 0 50000 0>;
  70.         brightness-levels = <0 58 61 66 75 90 125 170 255>;
  71.         default-brightness-level = <8>;
  72.     };
  73.    
  74.     sound {
  75.         compatible = "simple-audio-card";
  76.         simple-audio-card,name = "VAR-SOM-AM33";
  77.         simple-audio-card,widgets =
  78.             "Headphone", "Headphone Jack",
  79.             "Line", "Line In";
  80.         simple-audio-card,routing =
  81.             "Headphone Jack",   "HPLOUT",
  82.             "Headphone Jack",   "HPROUT",
  83.             "LINE1L",       "Line In",
  84.             "LINE1R",       "Line In";
  85.         simple-audio-card,format = "dsp_b";
  86.         simple-audio-card,bitclock-master = <&sound_master>;
  87.         simple-audio-card,frame-master = <&sound_master>;
  88.         simple-audio-card,bitclock-inversion;
  89.  
  90.         simple-audio-card,cpu {
  91.             sound-dai = <&mcasp0>;
  92.         };
  93.  
  94.         sound_master: simple-audio-card,codec {
  95.             sound-dai = <&tlv320aic3106>;
  96.             system-clock-frequency = <24000000>;
  97.         };
  98.     };
  99.  
  100.     panel {
  101.         compatible = "ti,tilcdc,panel";
  102.         status = "okay";
  103.         pinctrl-names = "default";
  104.         pinctrl-0 = <&lcd_pins>;
  105.         panel-info {
  106.             ac-bias           = <255>;
  107.             ac-bias-intrpt    = <0>;
  108.             dma-burst-sz      = <16>;
  109.             bpp               = <32>;
  110.             fdd               = <0x80>;
  111.             sync-edge         = <0>;
  112.             sync-ctrl         = <1>;
  113.             raster-order      = <0>;
  114.             fifo-th           = <0>;
  115.         };
  116.  
  117.         display-timings {
  118.             800x480p62 {
  119.                 clock-frequency = <30000000>;
  120.                 hactive = <800>;
  121.                 vactive = <480>;
  122.                 hfront-porch = <39>;
  123.                 hback-porch = <39>;
  124.                 hsync-len = <47>;
  125.                 vback-porch = <29>;
  126.                 vfront-porch = <13>;
  127.                 vsync-len = <2>;
  128.                 hsync-active = <1>;
  129.                 vsync-active = <1>;
  130.             };
  131.         };
  132.     };
  133. #if 0
  134.     kim {
  135.         compatible = "kim";
  136.         nshutdown_gpio = <105>; /* Bank3, pin9 */
  137.         dev_name = "/dev/ttyS1";
  138.         flow_cntrl = <1>;
  139.         baud_rate = <3000000>;
  140.     };
  141.    
  142.     btwilink {
  143.         compatible = "btwilink";
  144.     };
  145. #endif
  146. };
  147.    
  148. &am33xx_pinmux {
  149.         pinctrl-names = "default";
  150.         pinctrl-0 = <&gpio_keys_s0 &clkout1_pin>;
  151.  
  152.         i2c0_pins: pinmux_i2c0_pins {
  153.             pinctrl-single,pins = <
  154.                 0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
  155.                 0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
  156.             >;
  157.         };
  158.  
  159.         i2c1_pins: pinmux_i2c1_pins {
  160.             pinctrl-single,pins = <
  161.                 0x158 (PIN_INPUT_PULLUP | MUX_MODE2)    /* spi0_d1.i2c1_sda */
  162.                 0x15c (PIN_INPUT_PULLUP | MUX_MODE2)    /* spi0_cs0.i2c1_scl */
  163.             >;
  164.         };
  165.  
  166.         uart0_pins: pinmux_uart0_pins {
  167.             pinctrl-single,pins = <
  168.                 0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
  169.                 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
  170.             >;
  171.         };
  172.  
  173.         uart1_pins_default: pinmux_uart1_pins_default {
  174.             pinctrl-single,pins = <
  175.                 0x178 (PIN_INPUT | MUX_MODE0)           /* uart1_ctsn.uart1_ctsn */
  176.                 0x17C (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn.uart1_rtsn */
  177.                 0x180 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart1_rxd.uart1_rxd */
  178.                 0x184 (PIN_OUTPUT | MUX_MODE0)          /* uart1_txd.uart1_txd */
  179.             >;
  180.         };
  181.  
  182.         uart1_pins_sleep: pinmux_uart1_pins_sleep {
  183.             pinctrl-single,pins = <
  184.                 0x178 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  185.                 0x17C (PIN_INPUT_PULLDOWN | MUX_MODE7)
  186.                 0x180 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  187.                 0x184 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  188.             >;
  189.         };
  190.  
  191.         clkout1_pin: pinmux_clkout1_pin {
  192.             pinctrl-single,pins = <
  193.                 0x1b0 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr0.clkout1 */
  194.             >;
  195.         };
  196.  
  197.         nandflash_pins_default: nandflash_pins_default {
  198.             pinctrl-single,pins = <
  199.                 0x0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* gpmc_ad0.gpmc_ad0 */
  200.                 0x4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* gpmc_ad1.gpmc_ad1 */
  201.                 0x8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* gpmc_ad2.gpmc_ad2 */
  202.                 0xc (PIN_INPUT_PULLUP | MUX_MODE0)  /* gpmc_ad3.gpmc_ad3 */
  203.                 0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad4.gpmc_ad4 */
  204.                 0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad5.gpmc_ad5 */
  205.                 0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad6.gpmc_ad6 */
  206.                 0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_ad7.gpmc_ad7 */
  207.                 0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.gpmc_wait0 */
  208.                 0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_wpn.gpio0_30 */
  209.                 0x7c (PIN_OUTPUT | MUX_MODE0)       /* gpmc_csn0.gpmc_csn0  */
  210.                 0x90 (PIN_OUTPUT | MUX_MODE0)       /* gpmc_advn_ale.gpmc_advn_ale */
  211.                 0x94 (PIN_OUTPUT | MUX_MODE0)       /* gpmc_oen_ren.gpmc_oen_ren */
  212.                 0x98 (PIN_OUTPUT | MUX_MODE0)       /* gpmc_wen.gpmc_wen */
  213.                 0x9c (PIN_OUTPUT | MUX_MODE0)       /* gpmc_ben0_cle.gpmc_ben0_cle */
  214.             >;
  215.         };
  216.  
  217.         nandflash_pins_sleep: nandflash_pins_sleep {
  218.             pinctrl-single,pins = <
  219.                 0x0 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  220.                 0x4 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  221.                 0x8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  222.                 0xc (PIN_INPUT_PULLDOWN | MUX_MODE7)
  223.                 0x10 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  224.                 0x14 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  225.                 0x18 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  226.                 0x1c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  227.                 0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  228.                 0x74 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  229.                 0x7c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  230.                 0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  231.                 0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  232.                 0x98 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  233.                 0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  234.             >;
  235.         };
  236.  
  237.         ehrpwm_pins: backlight_pins {
  238.             pinctrl-single,pins = <
  239.                 0x150 0x3   /* spi0_sclk.ehrpwm0A | MODE 3 */
  240.             >;
  241.         };
  242.  
  243.         cpsw_default: cpsw_default {
  244.             pinctrl-single,pins = <
  245.                 /* Slave 1 */
  246.                 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_crs.rmii1_crs_dv */
  247.                 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_rxerr.rmii1_rxerr */
  248.                 0x114 (PIN_OUTPUT | MUX_MODE1)             /* mii1_txen.rmii1_txen */
  249.                 0x124 (PIN_OUTPUT | MUX_MODE1)             /* mii1_txd1.rmii1_txd1 */
  250.                 0x128 (PIN_OUTPUT | MUX_MODE1)             /* mii1_txd0.rmii1_txd0 */
  251.                 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_rxd1.rmii1_rxd1 */
  252.                 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_rxd0.rmii1_rxd0 */
  253.                 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE0)     /* rmii1_refclk.rmii1_refclk */
  254.                 0x138 (PIN_INPUT_PULLUP | MUX_MODE7)       /* mii1_rxd2.gpio2_19 */
  255.  
  256.                 /* Slave 2 */
  257.                 0x40 (PIN_OUTPUT | MUX_MODE2)              /* gpmc_a0.rgmii2_tctl */
  258.                 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2)      /* gpmc_a1.rgmii2_rctl */
  259.                 0x48 (PIN_OUTPUT | MUX_MODE2)              /* gpmc_a2.rgmii2_td3 */
  260.                 0x4c (PIN_OUTPUT | MUX_MODE2)              /* gpmc_a3.rgmii2_td2 */
  261.                 0x50 (PIN_OUTPUT | MUX_MODE2)              /* gpmc_a4.rgmii2_td1 */
  262.                 0x54 (PIN_OUTPUT | MUX_MODE2)              /* gpmc_a5.rgmii2_td0 */
  263.                 0x58 (PIN_OUTPUT | MUX_MODE2)              /* gpmc_a6.rgmii2_tclk */
  264.                 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2)      /* gpmc_a7.rgmii2_rclk */
  265.                 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2)      /* gpmc_a8.rgmii2_rd3 */
  266.                 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2)      /* gpmc_a9.rgmii2_rd2 */
  267.                 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2)      /* gpmc_a10.rgmii2_rd1 */
  268.                 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2)      /* gpmc_a11.rgmii2_rd0 */
  269.                 0x108 (PIN_INPUT_PULLDOWN | MUX_MODE1)     /* mii1_col.rmii2_refclk */
  270.                 0x130 (PIN_INPUT_PULLUP | MUX_MODE7)       /* mii1_rxclk.gpio3_10 */
  271.             >;
  272.         };
  273.  
  274.         cpsw_sleep: cpsw_sleep {
  275.             pinctrl-single,pins = <
  276.                 /* Slave 1 reset value */
  277.                 0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  278.                 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  279.                 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  280.                 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  281.                 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  282.                 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  283.                 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  284.                 0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  285.                 0x138 (PIN_INPUT_PULLUP   | MUX_MODE7)       /* mii1_rxd2.gpio2_19 */
  286.  
  287.                 /* Slave 2 reset value */
  288.                 0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  289.                 0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  290.                 0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  291.                 0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  292.                 0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  293.                 0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  294.                 0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  295.                 0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  296.                 0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  297.                 0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  298.                 0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  299.                 0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  300.             >;
  301.         };
  302.  
  303.         davinci_mdio_default: davinci_mdio_default {
  304.             pinctrl-single,pins = <
  305.                 /* MDIO */
  306.                 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
  307.                 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)           /* mdio_clk.mdio_clk */
  308.             >;
  309.         };
  310.  
  311.         davinci_mdio_sleep: davinci_mdio_sleep {
  312.             pinctrl-single,pins = <
  313.                 /* MDIO reset value */
  314.                 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  315.                 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
  316.             >;
  317.         };
  318.  
  319.         mmc1_pins_default: pinmux_mmc1_pins {
  320.             pinctrl-single,pins = <
  321.                 0x0F0 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_dat3.mmc0_dat3 */
  322.                 0x0F4 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_dat2.mmc0_dat2 */
  323.                 0x0F8 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_dat1.mmc0_dat1 */
  324.                 0x0FC (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_dat0.mmc0_dat0 */
  325.                 0x100 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_clk.mmc0_clk */
  326.                 0x104 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mmc0_cmd.mmc0_cmd */
  327.                 0x78  (PIN_INPUT_PULLUP | MUX_MODE7)    /* gpmc_ben1.gpio1_28 */
  328.                 0x134 (PIN_INPUT_PULLUP | MUX_MODE7)    /* mii1_rxd3.gpio2_18 */
  329.             >;
  330.         };
  331.  
  332.         mmc1_pins_sleep: pinmux_mmc1_pins_sleep {
  333.             pinctrl-single,pins = <
  334.                 0x0F0 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  335.                 0x0F4 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  336.                 0x0F8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  337.                 0x0FC (PIN_INPUT_PULLDOWN | MUX_MODE7)
  338.                 0x100 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  339.                 0x104 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  340.                 0x78  (PIN_INPUT_PULLDOWN | MUX_MODE7)
  341.                 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  342.             >;
  343.         };
  344.  
  345.         lcd_pins: lcd_pins {
  346.             pinctrl-single,pins = <
  347.                 0xa0 0x00   /* lcd_data0.lcd_data0, OUTPUT | MODE0 */
  348.                 0xa4 0x00   /* lcd_data1.lcd_data1, OUTPUT | MODE0 */
  349.                 0xa8 0x00   /* lcd_data2.lcd_data2, OUTPUT | MODE0 */
  350.                 0xac 0x00   /* lcd_data3.lcd_data3, OUTPUT | MODE0 */
  351.                 0xb0 0x00   /* lcd_data4.lcd_data4, OUTPUT | MODE0 */
  352.                 0xb4 0x00   /* lcd_data5.lcd_data5, OUTPUT | MODE0 */
  353.                 0xb8 0x00   /* lcd_data6.lcd_data6, OUTPUT | MODE0 */
  354.                 0xbc 0x00   /* lcd_data7.lcd_data7, OUTPUT | MODE0 */
  355.                 0xc0 0x00   /* lcd_data8.lcd_data8, OUTPUT | MODE0 */
  356.                 0xc4 0x00   /* lcd_data9.lcd_data9, OUTPUT | MODE0 */
  357.                 0xc8 0x00   /* lcd_data10.lcd_data10, OUTPUT | MODE0 */
  358.                 0xcc 0x00   /* lcd_data11.lcd_data11, OUTPUT | MODE0 */
  359.                 0xd0 0x00   /* lcd_data12.lcd_data12, OUTPUT | MODE0 */
  360.                 0xd4 0x00   /* lcd_data13.lcd_data13, OUTPUT | MODE0 */
  361.                 0xd8 0x00   /* lcd_data14.lcd_data14, OUTPUT | MODE0 */
  362.                 0xdc 0x00   /* lcd_data15.lcd_data15, OUTPUT | MODE0 */
  363.                 0xe0 0x00   /* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */
  364.                 0xe4 0x00   /* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */
  365.                 0xe8 0x00   /* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */
  366.                 0xec 0x00   /* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
  367.             >;
  368.         };
  369.  
  370.         gpio_keys_s0: gpio_keys_s0 {
  371.             pinctrl-single,pins = <
  372.                 0x118 (PIN_INPUT_PULLUP | MUX_MODE7)    /* GPIO3_4 */
  373.             >;
  374.         };
  375.  
  376.         mcasp0_pins: mcasp0_pins {
  377.             pinctrl-single,pins = <
  378.                 0x190 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_aclkx.mcasp0_aclkx */
  379.                 0x194 (PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_fsx.mcasp0_fsx */
  380.                 0x1A0 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mcasp0_aclkr.mcasp0_axr2 */
  381.                 0x1A4 (PIN_INPUT_PULLDOWN | MUX_MODE2)  /* mcasp0_fsr.mcasp0_axr3 */
  382.             >;
  383.         };
  384.  
  385.         mcasp0_sleep_pins: mcasp0_sleep_pins {
  386.             pinctrl-single,pins = <
  387.                 0x190 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  388.                 0x194 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  389.                 0x1A0 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  390.                 0x1A4 (PIN_INPUT_PULLDOWN | MUX_MODE7)
  391.             >;
  392.         };
  393.  
  394.         /* wl18xx card on mmc2 */
  395.         mmc2_pins_default: pinmux_mmc2_pins {
  396.             pinctrl-single,pins = <
  397.                 0x20 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0 */
  398.                 0x24 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1 */
  399.                 0x28 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2 */
  400.                 0x2c (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3 */
  401.                 0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
  402.                 0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
  403.             >;
  404.         };
  405.  
  406.         mmc2_pins_sleep: pinmux_mmc2_pins_sleep {
  407.             pinctrl-single,pins = <
  408.                 0x20 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_ad8.mmc1_dat0 */
  409.                 0x24 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_ad9.mmc1_dat1 */
  410.                 0x28 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_ad10.mmc1_dat2 */
  411.                 0x2c (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_ad11.mmc1_dat3 */
  412.                 0x84 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_csn2.mmc1_cmd */
  413.                 0x80 (PIN_INPUT_PULLUP | MUX_MODE7) /* gpmc_csn1.mmc1_clk */
  414.             >;
  415.         }; 
  416.  
  417.         /* wl18xx card enable/irq GPIOs. */
  418.         wlan_pins_default: pinmux_wlan_pins_default {
  419.             pinctrl-single,pins = <
  420.                 0x1AC (PIN_OUTPUT_PULLUP | MUX_MODE7)   /* mcasp0_ahclkx.gpio3_21, WL_EN */
  421.                 0x1A8 (PIN_INPUT_PULLUP  | MUX_MODE7)   /* mcasp0_axr1.gpio3_20, WL_IRQ */
  422.                 0x12C (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* mii1_txclk.gpio3_9, BT_EN */
  423.             >;
  424.         };
  425.  
  426.         wlan_pins_sleep: pinmux_wlan_pins_sleep {
  427.             pinctrl-single,pins = <
  428.                 0x1AC (PIN_OUTPUT_PULLUP | MUX_MODE7)   /* mcasp0_ahclkx.gpio3_21, WL_EN */
  429.                 0x1A8 (PIN_INPUT_PULLUP  | MUX_MODE7)   /* mcasp0_axr1.gpio3_20, WL_IRQ */
  430.                 0x12C (PIN_OUTPUT_PULLUP | MUX_MODE7)   /* mii1_txclk.gpio3_9, BT_EN */
  431.             >;
  432.         };
  433.  
  434.         /* Touchscreen irq GPIO. */
  435.         edt_ft5x06_pins: pinmux_edt_pins {
  436.             pinctrl-single,pins = <
  437.                 0x154 (PIN_INPUT | MUX_MODE7)   /* spi0_d0.gpio0_3, INPUT | MODE7 */
  438.             >;
  439.         };
  440.  
  441.         dcan0_default: dcan0_default_pins {
  442.             pinctrl-single,pins = <
  443.                 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE1)  /* AM33XX_CONTROL_PADCONF_MII1_TXD3_OFFSET         0x091C */
  444.                 0x120 (PIN_INPUT_PULLUP | MUX_MODE1)      /* AM33XX_CONTROL_PADCONF_MII1_TXD2_OFFSET            0x0920 */
  445.             >;
  446.         };
  447.        
  448.         spi1_pins_default: pinmux_spi1_pins_default {
  449.             pinctrl-single,pins = <
  450.                 0x164 (PIN_INPUT | MUX_MODE4)   /* ECAP0_IN_PWM0_OUT: SPI CLK */
  451.                 0x168 (PIN_INPUT | MUX_MODE4)   /* UART0_CTSN: SPI1_D0 - We set to SPI1_RX*/
  452.                 0x16C (PIN_OUTPUT | MUX_MODE4)  /* UART0_RTSN: SPI1_D1 - We set to SPI1_TX*/
  453.                 0x19C (PIN_OUTPUT | MUX_MODE3)  /* MCASP0_AHCLKR: SPI1_CS */
  454.             >;
  455.         };
  456.  
  457.         spi1_pins_sleep: pinmux_spi1_pins_sleep {
  458.             pinctrl-single,pins = <
  459.                 0x164 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* ECAP0_IN_PWM0_OUT: SPI CLK */
  460.                 0x168 (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* UART0_CTSN: SPI1_D0 - We set to SPI1_TX*/
  461.                 0x16C (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* UART0_RTSN: SPI1_D1 - We set to SPI1_RX*/
  462.                 0x19C (PIN_INPUT_PULLDOWN | MUX_MODE7)  /* MCASP0_AHCLKR: SPI1_CS */
  463.             >;
  464.         };
  465.            
  466.     };
  467.  
  468.  
  469. &uart0 {
  470.     pinctrl-names = "default";
  471.     pinctrl-0 = <&uart0_pins>;
  472.  
  473.     status = "okay";
  474. };
  475.  
  476. &uart1 {
  477.     pinctrl-names = "default", "sleep";
  478.     pinctrl-0 = <&uart1_pins_default>;
  479.     pinctrl-1 = <&uart1_pins_sleep>;
  480.  
  481.     status = "okay";
  482. };
  483.  
  484. &uart2 {
  485.     /*
  486.     pinctrl-names = "default", "sleep";
  487.     pinctrl-0 = <&uart2_pins_default>;
  488.     pinctrl-1 = <&uart2_pins_sleep>;
  489.     */
  490.    
  491.     status = "okay";
  492. };
  493.  
  494. &uart3 {
  495.     /*
  496.     pinctrl-names = "default", "sleep";
  497.     pinctrl-0 = <&uart3_pins_default>;
  498.     pinctrl-1 = <&uart3_pins_sleep>;
  499.     */
  500.    
  501.     status = "okay";
  502. };
  503.  
  504. &uart4 {
  505.     /*
  506.     pinctrl-names = "default", "sleep";
  507.     pinctrl-0 = <&uart4_pins_default>;
  508.     pinctrl-1 = <&uart4_pins_sleep>;
  509.     */
  510.    
  511.     status = "okay";
  512. };
  513.  
  514. &uart5 {
  515.     /*
  516.     pinctrl-names = "default", "sleep";
  517.     pinctrl-0 = <&uart5_pins_default>;
  518.     pinctrl-1 = <&uart5_pins_sleep>;
  519.     */
  520.    
  521.     status = "okay";
  522. };
  523.  
  524. &i2c0 {
  525.     pinctrl-names = "default";
  526.     pinctrl-0 = <&i2c0_pins>;
  527.  
  528.     status = "okay";
  529.     clock-frequency = <400000>;
  530.     /* Set OPP50 (0.95V) for VDD core */
  531.     sleep-sequence = /bits/ 8 <
  532.         0x02 0x2d 0x25 0x1f /* Set VDD2 to 0.95V */
  533.     >;
  534.  
  535.     /* Set OPP100 (1.10V) for VDD core */
  536.     wake-sequence = /bits/ 8 <
  537.         0x02 0x2d 0x25 0x2b /* Set VDD2 to 1.1V */
  538.     >;
  539. };
  540.  
  541. &usb {
  542.     status = "okay";
  543. };
  544.  
  545. &usb_ctrl_mod {
  546.     status = "okay";
  547. };
  548.  
  549. &usb0_phy {
  550.     status = "okay";
  551. };
  552.  
  553. &usb1_phy {
  554.     status = "okay";
  555. };
  556.  
  557. &usb0 {
  558.     status = "okay";
  559.     dr_mode = "host";
  560. };
  561.  
  562. &usb1 {
  563.     status = "okay";
  564. };
  565.  
  566. &cppi41dma  {
  567.     status = "okay";
  568. };
  569.  
  570. &i2c1 {
  571.     pinctrl-names = "default";
  572.     pinctrl-0 = <&i2c1_pins>;
  573.  
  574.     status = "okay";
  575.     clock-frequency = <100000>;
  576.  
  577.     tps: tps@2d {
  578.         reg = <0x2d>;
  579.     };
  580.  
  581.     tlv320aic3106: tlv320aic3106@1b {
  582.         #sound-dai-cells = <0>;
  583.         compatible = "ti,tlv320aic3106";
  584.         reg = <0x1b>;
  585.         status = "okay";
  586.  
  587.         /* Regulators */
  588.         AVDD-supply = <&vaux2_reg>;
  589.         IOVDD-supply = <&vaux2_reg>;
  590.         DRVDD-supply = <&vaux2_reg>;
  591.         DVDD-supply = <&vbat>;
  592.     };
  593.    
  594.     edt_ft5x06_ts@38 {
  595.         status = "okay";
  596.         compatible = "edt,edt-ft5206";
  597.         pinctrl-names = "default";
  598.         pinctrl-0 = <&edt_ft5x06_pins>;
  599.         reg = <0x38>;
  600.         interrupt-parent = <&gpio0>;
  601.         interrupts = <3 IRQ_TYPE_NONE>;
  602.     };
  603.    
  604. };
  605.  
  606. &elm {
  607.     status = "okay";
  608. };
  609.  
  610. &epwmss0 {
  611.     status = "okay";
  612.  
  613.     ehrpwm0: pwm@48300200 {
  614.         status = "okay";
  615.         pinctrl-names = "default";
  616.         pinctrl-0 = <&ehrpwm_pins>;
  617.     };
  618. };
  619.  
  620. &gpmc {
  621.     status = "okay";
  622.     pinctrl-names = "default", "sleep";
  623.     pinctrl-0 = <&nandflash_pins_default>;
  624.     pinctrl-1 = <&nandflash_pins_sleep>;
  625.     ranges = <0 0 0x08000000 0x10000000>;   /* CS0: NAND */
  626.     nand@0,0 {
  627.         compatible = "ti,omap2-nand";
  628.         reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
  629.         interrupt-parent = <&gpmc>;
  630.         interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
  631.                  <1 IRQ_TYPE_NONE>; /* termcount */
  632.         rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
  633.         ti,nand-ecc-opt= "bch8";
  634.         ti,elm-id = <&elm>;
  635.         nand-bus-width = <8>;
  636.         gpmc,device-width = <1>;
  637.         gpmc,sync-clk-ps = <0>;
  638.         gpmc,cs-on-ns = <0>;
  639.         gpmc,cs-rd-off-ns = <44>;
  640.         gpmc,cs-wr-off-ns = <44>;
  641.         gpmc,adv-on-ns = <6>;
  642.         gpmc,adv-rd-off-ns = <34>;
  643.         gpmc,adv-wr-off-ns = <44>;
  644.         gpmc,we-on-ns = <0>;
  645.         gpmc,we-off-ns = <40>;
  646.         gpmc,oe-on-ns = <0>;
  647.         gpmc,oe-off-ns = <54>;
  648.         gpmc,access-ns = <64>;
  649.         gpmc,rd-cycle-ns = <82>;
  650.         gpmc,wr-cycle-ns = <82>;
  651.         gpmc,wait-on-read = "true";
  652.         gpmc,wait-on-write = "true";
  653.         gpmc,bus-turnaround-ns = <0>;
  654.         gpmc,cycle2cycle-delay-ns = <0>;
  655.         gpmc,clk-activation-ns = <0>;
  656.         gpmc,wait-monitoring-ns = <0>;
  657.         gpmc,wr-access-ns = <40>;
  658.         gpmc,wr-data-mux-bus-ns = <0>;
  659.         /* MTD partition table */
  660.         /* All SPL-* partitions are sized to minimal length
  661.          * which can be independently programmable. For
  662.          * NAND flash this is equal to size of erase-block */
  663.         #address-cells = <1>;
  664.         #size-cells = <1>;
  665.         partition@0 {
  666.             label = "NAND.SPL";
  667.             reg = <0x00000000 0x000020000>;
  668.         };
  669.         partition@1 {
  670.             label = "NAND.SPL.backup1";
  671.             reg = <0x00020000 0x00020000>;
  672.         };
  673.         partition@2 {
  674.             label = "NAND.SPL.backup2";
  675.             reg = <0x00040000 0x00020000>;
  676.         };
  677.         partition@3 {
  678.             label = "NAND.SPL.backup3";
  679.             reg = <0x00060000 0x00020000>;
  680.         };
  681.         partition@4 {
  682.             label = "NAND.u-boot-spl-os";
  683.             reg = <0x00080000 0x00040000>;
  684.         };
  685.         partition@5 {
  686.             label = "NAND.u-boot";
  687.             reg = <0x000C0000 0x00100000>;
  688.         };
  689.         partition@6 {
  690.             label = "NAND.u-boot-env";
  691.             reg = <0x001C0000 0x00020000>;
  692.         };
  693.         partition@7 {
  694.             label = "NAND.u-boot-env.backup1";
  695.             reg = <0x001E0000 0x00020000>;
  696.         };
  697.         partition@8 {
  698.             label = "NAND.kernel";
  699.             reg = <0x00200000 0x00800000>;
  700.         };
  701.         partition@9 {
  702.             label = "NAND.file-system";
  703.             reg = <0x00A00000 0x1f600000>;
  704.         };
  705.     };
  706. };
  707.  
  708. &lcdc {
  709.     status = "okay";
  710. };
  711.  
  712. #include "tps65910.dtsi"
  713.  
  714. &dcan0 {
  715.     pinctrl-names = "default";
  716.     pinctrl-0 = <&dcan0_default>;
  717.     status = "okay";
  718. };
  719.  
  720. &mcasp0 {
  721.         #sound-dai-cells = <0>;
  722.         pinctrl-names = "default", "sleep";
  723.         pinctrl-0 = <&mcasp0_pins>;
  724.         pinctrl-1 = <&mcasp0_sleep_pins>;
  725.  
  726.         status = "okay";
  727.  
  728.         op-mode = <0>;          /* MCASP_IIS_MODE */
  729.         tdm-slots = <2>;
  730.         /* 16 serializer */
  731.         serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
  732.             0 0 2 1
  733.         >;
  734.         tx-num-evt = <32>;
  735.         rx-num-evt = <32>;
  736. };
  737.  
  738. &tps {
  739.  
  740.     ti,en-ck32k-xtal;
  741.  
  742.     vcc1-supply = <&vbat>;
  743.     vcc2-supply = <&vbat>;
  744.     vcc3-supply = <&vbat>;
  745.     vcc4-supply = <&vbat>;
  746.     vcc5-supply = <&vbat>;
  747.     vcc6-supply = <&vbat>;
  748.     vcc7-supply = <&vbat>;
  749.     vccio-supply = <&vbat>;
  750.  
  751.     rtc0 {
  752.         compatible = "ti,tps65910-rtc";
  753.         interrupts = <0>;
  754.     };
  755.  
  756.     regulators {
  757.         vrtc_reg: regulator@0 {
  758.             regulator-always-on;
  759.         };
  760.  
  761.         vio_reg: regulator@1 {
  762.             regulator-always-on;
  763.         };
  764.  
  765.         vdd1_reg: regulator@2 {
  766.             /* VDD_MPU voltage limits 0.95V - 1.325V with +/-4% tolerance */
  767.             regulator-name = "vdd_mpu";
  768.             regulator-min-microvolt = <912500>;
  769.             regulator-max-microvolt = <1378000>;
  770.             regulator-boot-on;
  771.             regulator-always-on;
  772.         };
  773.  
  774.         vdd2_reg: regulator@3 {
  775.             /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
  776.             regulator-name = "vdd_core";
  777.             regulator-min-microvolt = <912500>;
  778.             regulator-max-microvolt = <1150000>;
  779.             regulator-boot-on;
  780.             regulator-always-on;
  781.         };
  782.  
  783.         vdd3_reg: regulator@4 {
  784.             regulator-always-on;
  785.         };
  786.  
  787.         vdig1_reg: regulator@5 {
  788.             regulator-always-on;
  789.         };
  790.  
  791.         vdig2_reg: regulator@6 {
  792.             regulator-always-on;
  793.         };
  794.  
  795.         vpll_reg: regulator@7 {
  796.             regulator-always-on;
  797.         };
  798.  
  799.         vdac_reg: regulator@8 {
  800.             regulator-always-on;
  801.         };
  802.  
  803.         vaux1_reg: regulator@9 {
  804.             regulator-always-on;
  805.         };
  806.  
  807.         vaux2_reg: regulator@10 {
  808.             regulator-always-on;
  809.         };
  810.  
  811.         vaux33_reg: regulator@11 {
  812.             regulator-always-on;
  813.         };
  814.  
  815.         vmmc_reg: regulator@12 {
  816.             regulator-min-microvolt = <1800000>;
  817.             regulator-max-microvolt = <3300000>;
  818.             regulator-always-on;
  819.         };
  820.     };
  821. };
  822.  
  823. &mac {
  824.     pinctrl-names = "default", "sleep";
  825.     pinctrl-0 = <&cpsw_default>;
  826.     pinctrl-1 = <&cpsw_sleep>;
  827.     dual_emac = <1>;
  828.     status = "okay";
  829. };
  830.  
  831. &davinci_mdio {
  832.     pinctrl-names = "default", "sleep";
  833.     pinctrl-0 = <&davinci_mdio_default>;
  834.     pinctrl-1 = <&davinci_mdio_sleep>;
  835.     status = "okay";
  836.    
  837.     phy1: phy@1 {
  838.         reg = <1>;
  839.         /*micrel,reset-regs;*/
  840.     };
  841.  
  842.     phy7: phy@7 {
  843.         reg = <7>;
  844.         rxc-skew-ps = <3000>;
  845.         rxdv-skew-ps = <0>;
  846.         txc-skew-ps = <3000>;
  847.         txen-skew-ps = <0>;
  848.         rxd0-skew-ps = <0>;
  849.         rxd1-skew-ps = <0>;
  850.         rxd2-skew-ps = <0>;
  851.         rxd3-skew-ps = <0>;
  852.         txd0-skew-ps = <0>;
  853.         txd1-skew-ps = <0>;
  854.         txd2-skew-ps = <0>;
  855.         txd3-skew-ps = <0>;
  856.     }; 
  857. };
  858.  
  859. &cpsw_emac0 {
  860.     phy_id = <&davinci_mdio>, <1>;
  861.     phy-mode = "rmii";
  862.     dual_emac_res_vlan = <1>;
  863. };
  864.  
  865. &cpsw_emac1 {
  866.     phy_id = <&davinci_mdio>, <7>;
  867.     phy-mode = "rgmii-txid";
  868.     dual_emac_res_vlan = <2>;
  869. };
  870.  
  871. &phy_sel {
  872.     rmii-clock-ext;
  873. };
  874.  
  875. &tscadc {
  876.     status = "okay";
  877.     tsc {
  878.         ti,wires = <4>;
  879.         ti,x-plate-resistance = <180>;
  880.         ti,coordinate-readouts = <5>;
  881.         ti,wire-config = <0x00 0x21 0x12 0x33>;
  882.         ti,charge-delay = <0x700>;
  883.         ti,alt_pins_conf;
  884.     };
  885.  
  886.     adc {
  887.         ti,adc-channels = <4 5 6 7>;
  888.     };
  889. };
  890.  
  891. &mmc1 {
  892.     status = "okay";
  893.     vmmc-supply = <&vmmc_fixed>;
  894.     bus-width = <4>;
  895.     pinctrl-names = "default", "sleep";
  896.     pinctrl-0 = <&mmc1_pins_default>;
  897.     pinctrl-1 = <&mmc1_pins_sleep>;
  898.     cd-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
  899.     wp-gpios = <&gpio2 18 GPIO_ACTIVE_HIGH>;
  900. };
  901.  
  902. &mmc2 {
  903.     status = "okay";
  904.     vmmc-supply = <&wlan_en_reg>;
  905.     bus-width = <4>;
  906.     pinctrl-names = "default", "sleep";
  907.     pinctrl-0 = <&mmc2_pins_default &wlan_pins_default>;
  908.     pinctrl-1 = <&mmc2_pins_sleep &wlan_pins_sleep>;
  909.     ti,non-removable;
  910.     ti,needs-special-hs-handling;
  911.     cap-power-off-card;
  912.     keep-power-in-suspend;
  913.    
  914.     #address-cells = <1>;
  915.     #size-cells = <0>;
  916.    
  917.     wlcore: wlcore@2 {
  918.         compatible = "ti,wl1835";
  919.         reg = <2>;
  920.         interrupt-parent = <&gpio3>;
  921.         interrupts = <20 IRQ_TYPE_LEVEL_HIGH>;
  922.  
  923.                 /* For WL12xx card set the clock to WL12XX_REFCLOCK_38_XTAL */
  924.                 ref-clock-frequency = <38400000>;
  925.     }; 
  926. };
  927.  
  928. &wkup_m3_ipc {
  929.     ti,scale-data-fw = "am335x-evm-scale-data.bin";
  930. };
  931.  
  932. &sgx {
  933.     status = "okay";
  934. };
  935.  
  936. &sham {
  937.     status = "okay";
  938. };
  939.  
  940. &aes {
  941.     status = "okay";
  942. };
  943.  
  944. &gpio0 {
  945.     ti,no-reset-on-init;
  946. };
  947.  
  948. &spi1 {
  949.     status = "okay";
  950.  
  951. #if 0  
  952.  /* NOTE: In order to use SPI on VAR-SOM-AM33 CustomBoard -
  953.   * 1) Need to remove R9 and R10 resistors from the CustomBoard.
  954.   * 2) Need to also remove U21 from the CustomBoard.
  955.   */
  956.  
  957.     pinctrl-names = "default", "sleep";
  958.     pinctrl-0 = <&spi1_pins_default>;
  959.     pinctrl-1 = <&spi1_pins_sleep>;
  960. #endif
  961.     spidev0: spi@0 {
  962.         compatible = "spidev";
  963.         reg = <0>;
  964.         spi-max-frequency = <16000000>;
  965.         spi-cpha;
  966.     };
  967.  
  968.     spidev1: spi@1 {
  969.         compatible = "spidev";
  970.         reg = <1>;
  971.         spi-max-frequency = <16000000>;
  972.     };
  973. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement