Advertisement
Guest User

Untitled

a guest
Dec 9th, 2021
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.02 KB | None | 0 0
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3.  * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
  4.  */
  5. /dts-v1/;
  6.  
  7. #include "am33xx.dtsi"
  8. #include "am335x-bone-common.dtsi"
  9. #include "am335x-boneblack-common.dtsi"
  10. / {
  11.     compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
  12.     backlight: backlight{
  13.         compatible = "pwm-backlight";
  14.         pinctrl-names = "default";
  15.         pinctrl-0 = <&pwm_bl_pins>;
  16.         status = "okay";
  17.         pwms = <&ehrpwm1 0 500000 0>;
  18.         pwm-names = "backlight";
  19.         brightness-levels = <0 4 8 16 32 64 128 255>;
  20.         default-brightness-level = <7>; /* index to the array above */
  21.         power-supply = <&vmmcsd_fixed>;
  22.     };
  23. };
  24.  
  25. &am33xx_pinmux {
  26.     spi1_pins: pinmux_spi1_pins{
  27.         pinctrl-single,pins = <
  28.             AM33XX_PADCONF( AM335X_PIN_MCASP0_ACLKX,  PIN_INPUT_PULLUP, MUX_MODE3 )  // P9_31: spi1 clk out
  29.             AM33XX_PADCONF( AM335X_PIN_MCASP0_FSX,    PIN_INPUT_PULLUP, MUX_MODE3 )  // P9_29: spi1 d0 /data in (miso)
  30.             AM33XX_PADCONF( AM335X_PIN_MCASP0_AXR0,   PIN_INPUT_PULLUP, MUX_MODE3 )  // P9_30: spi1 d1 / data out (mosi)
  31.             AM33XX_PADCONF( AM335X_PIN_MCASP0_AHCLKR, PIN_INPUT_PULLUP, MUX_MODE3 )  // P9_28: spi1 cs 0 out
  32.         >;
  33.     };
  34.     uart1_pins: pinmux_uart1_pins {
  35.         pinctrl-single,pins = <
  36.             AM33XX_PADCONF(AM335X_PIN_UART1_RXD, PIN_INPUT_PULLUP, MUX_MODE0)
  37.             AM33XX_PADCONF(AM335X_PIN_UART1_TXD, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
  38.             AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT, MUX_MODE0)
  39.             AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_OUTPUT_PULLDOWN, MUX_MODE0)
  40.         >;
  41.     };
  42.     i2c1_pins: pinmux_i2c1_pins {
  43.         pinctrl-single,pins = <
  44.             AM33XX_PADCONF(AM335X_PIN_SPI0_D1, PIN_INPUT_PULLUP, MUX_MODE2) /* p9.18.i2c1_sda */
  45.             AM33XX_PADCONF(AM335X_PIN_SPI0_CS0, PIN_INPUT_PULLUP, MUX_MODE2)    /* P9.17.i2c1_scl */
  46.         >;
  47.     };
  48.     lcd_ctrl_pinmux: lcd_ctrl_pins {
  49.         pinmctrl-single,pins = <
  50.             0x040 0x17  /* P9_15: gpio1_16 reset, OUTPUT_PULLUP | MODE7 */
  51.             0x078 0x17  /* P9_12: gpio1_28 DC, OUTPUT_PULLUP | MODE7 */
  52.         >;
  53.     };
  54.  
  55.     pwm_bl_pins: pinmux_pwm_bl_pins {
  56.         pinctrl-single,pins = <
  57.             0x48 0x06   /* P9_14: ehrpwm1a, MODE6 */
  58.         >;
  59.     };
  60. };
  61.  
  62. &mac {
  63.     status = "disabled";
  64. };
  65.  
  66. &spi1 {
  67.     status="okay";
  68.     pinctrl-names = "default";
  69.     pinctrl-0 = <&spi1_pins>;
  70.     };
  71.  
  72. &spi1 {
  73.     lcd@0{
  74.         reg = <0>;
  75.         compatible = "fb_ili9341";
  76.         status="okay";
  77.         pinctrl-names = "default";
  78.         #address-cells = <1>;
  79.         #size-cells = <0>;
  80.         pinctrl-0 = <&lcd_ctrl_pinmux>;
  81.         spi-max-frequency = <25000000>;
  82.         rotate = <270>;
  83.         bgr;
  84.         fps = <50>;
  85.         buswidth = <8>;
  86.         reset-gpios = <&gpio2 16 0>;
  87.         dc-gpios = <&gpio2 28 0>;
  88.         debug = <3>;
  89.         };
  90.     };
  91.  
  92. &epwmss1{
  93.     status = "okay";
  94.     };
  95.  
  96. &ehrpwm1{
  97.     status = "okay";
  98.     };
  99.  
  100.  
  101. &uart1 {
  102.     status="okay";
  103.     pinctrl-names = "default";
  104.     pinctrl-0 = <&uart1_pins>;
  105.         gnss{
  106.             compatible = "u-blox,neo-6m";
  107.             vcc-supply = <&vmmcsd_fixed>;
  108.             current-speed = <9600>;
  109.         };
  110.     };
  111.  
  112. &i2c1 {
  113.     pinctrl-names = "default";
  114.     pinctrl-0 = <&i2c1_pins>;
  115.     status = "okay";
  116.     master@0 {
  117.         compatible = "ti, omap4-i2c";
  118.         reg = <0>;
  119.         clock-frequency = <400000>;
  120.         };
  121.     };
  122.  
  123.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement