Guest User

OMEGA2.dtsi

a guest
Jul 18th, 2017
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.13 KB | None | 0 0
  1. #include "mt7628an.dtsi"
  2.  
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5.  
  6. / {
  7.     compatible = "onion,omega", "mediatek,mt7628an-soc";
  8.  
  9.     chosen {
  10.         bootargs = "console=ttyS0,115200";
  11.     };
  12.  
  13.     gpio-leds {
  14.         compatible = "gpio-leds";
  15.  
  16.         system_led: system {
  17.             gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
  18.         };
  19.     };
  20.  
  21.     gpio-keys-polled {
  22.         compatible = "gpio-keys-polled";
  23.         #address-cells = <1>;
  24.         #size-cells = <0>;
  25.         poll-interval = <20>;
  26.  
  27.         reset {
  28.             label = "reset";
  29.             gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
  30.             linux,code = <KEY_RESTART>;
  31.         };
  32.     };
  33.     sound {
  34.         compatible = "simple-audio-card";
  35.         simple-audio-card,name = "Audio-I2S";
  36.         simple-audio-card,format = "i2s";
  37.         simple-audio-card,bitclock-master = <&cpu_dai_master>;
  38.         simple-audio-card,frame-master = <&cpu_dai_master>;
  39.         simple-audio-card,widgets =
  40.             "Speaker", "External Speaker";
  41.  
  42.             cpu_dai_master: simple-audio-card,cpu {
  43.             sound-dai = <&i2s>;
  44.         };
  45.  
  46.         dailink0_master: simple-audio-card,codec {
  47.             sound-dai = <&codec>;
  48.         };
  49.     };
  50.  
  51.     codec: max98357a {
  52.         #sound-dai-cells = <0>;
  53.         compatible = "maxim,max98357a";
  54.         sdmode-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
  55.     };
  56.  
  57. };
  58.  
  59. &pinctrl {
  60.     state_default: pinctrl0 {
  61.         gpio {
  62.             ralink,group = "gpio";
  63.             ralink,function = "gpio";
  64.         };
  65.  
  66.         perst {
  67.             ralink,group = "perst";
  68.             ralink,function = "gpio";
  69.         };
  70.  
  71.         refclk {
  72.             ralink,group = "refclk";
  73.             ralink,function = "gpio";
  74.         };
  75.  
  76.         i2s {
  77.             ralink,group = "i2s";
  78.             ralink,function = "i2s";
  79.         };
  80.  
  81.         spis {
  82.             ralink,group = "spis";
  83.             ralink,function = "gpio";
  84.         };
  85.  
  86.         wled_kn {
  87.             ralink,group = "wled_kn";
  88.             ralink,function = "gpio";
  89.         };
  90.  
  91.         wled_an {
  92.             ralink,group = "wled_an";
  93.             ralink,function = "gpio";
  94.         };
  95.  
  96.         wdt {
  97.             ralink,group = "wdt";
  98.             ralink,function = "gpio";
  99.         };
  100.  
  101.         pwm0 {
  102.             ralink,group = "pwm0";
  103.             ralink,function = "gpio";
  104.         };
  105.  
  106.         pwm1 {
  107.             ralink,group = "pwm1";
  108.             ralink,function = "gpio";
  109.         };
  110.     };
  111. };
  112.  
  113. &gpio1 {
  114.     status = "okay";
  115. };
  116.  
  117. &gpio2 {
  118.     status = "okay";
  119. };
  120.  
  121. &spi0 {
  122.     status = "okay";
  123.  
  124.     pinctrl-names = "default";
  125.     pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
  126.  
  127.     m25p80@0 {
  128.         #address-cells = <1>;
  129.         #size-cells = <1>;
  130.         compatible = "jedec,spi-nor";
  131.         reg = <0>;
  132.         spi-max-frequency = <40000000>;
  133.         m25p,chunked-io = <31>;
  134.  
  135.         partition@0 {
  136.             label = "u-boot";
  137.             reg = <0x0 0x30000>;
  138.             read-only;
  139.         };
  140.  
  141.         partition@30000 {
  142.             label = "u-boot-env";
  143.             reg = <0x30000 0x10000>;
  144.             read-only;
  145.         };
  146.  
  147.         factory: partition@40000 {
  148.             label = "factory";
  149.             reg = <0x40000 0x10000>;
  150.             read-only;
  151.         };
  152.  
  153.         firmware: partition@50000 {
  154.             label = "firmware";
  155.         };
  156.     };
  157.  
  158.     spidev@1 {
  159.         #address-cells = <1>;
  160.         #size-cells = <1>;
  161.         compatible = "linux,spidev";
  162.         reg = <1>;
  163.         spi-max-frequency = <40000000>;
  164.     };
  165. };
  166.  
  167. &i2c {
  168.     status = "okay";
  169. };
  170.  
  171. &uart1 {
  172.     status = "okay";
  173. };
  174.  
  175. &uart2 {
  176.     status = "okay";
  177. };
  178.  
  179. &ethernet {
  180.     mtd-mac-address = <&factory 0x28>;
  181. };
  182.  
  183. &sdhci {
  184.     status = "okay";
  185.     mediatek,cd-low;
  186. };
  187.  
  188. &wmac {
  189.     status = "okay";
  190. };
  191.  
  192. &gdma {
  193.     status = "okay";
  194. };
  195.  
  196. &i2s {
  197.     #sound-dai-cells = <0>;
  198.     status = "okay";
  199. };
Add Comment
Please, Sign In to add comment