Advertisement
Guest User

dts

a guest
Mar 22nd, 2021
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 4.28 KB | None | 0 0
  1. /*
  2.  * Copyright 2021 Jacek Pruciak <[email protected]>
  3.  *
  4.  * This file is dual-licensed: you can use it either under the terms
  5.  * of the GPL or the X11 license, at your option. Note that this dual
  6.  * licensing only applies to this file, and not this project as a
  7.  * whole.
  8.  *
  9.  *  a) This file is free software; you can redistribute it and/or
  10.  *     modify it under the terms of the GNU General Public License as
  11.  *     published by the Free Software Foundation; either version 2 of the
  12.  *     License, or (at your option) any later version.
  13.  *
  14.  *     This file is distributed in the hope that it will be useful,
  15.  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  *     GNU General Public License for more details.
  18.  *
  19.  * Or, alternatively,
  20.  *
  21.  *  b) Permission is hereby granted, free of charge, to any person
  22.  *     obtaining a copy of this software and associated documentation
  23.  *     files (the "Software"), to deal in the Software without
  24.  *     restriction, including without limitation the rights to use,
  25.  *     copy, modify, merge, publish, distribute, sublicense, and/or
  26.  *     sell copies of the Software, and to permit persons to whom the
  27.  *     Software is furnished to do so, subject to the following
  28.  *     conditions:
  29.  *
  30.  *     The above copyright notice and this permission notice shall be
  31.  *     included in all copies or substantial portions of the Software.
  32.  *
  33.  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  34.  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  35.  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  36.  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  37.  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  38.  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  39.  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  40.  *     OTHER DEALINGS IN THE SOFTWARE.
  41.  */
  42.  
  43. /dts-v1/;
  44. #include "sun6i-a31s.dtsi"
  45. #include "sun6i-reference-design-tablet.dtsi"
  46. //#include <dt-bindings/pwm/pwm.h>
  47.  
  48. / {
  49.     model = "GoClever Orion 70L";
  50.     compatible = "goclever,gcta741l", "allwinner,sun6i-a31s";
  51.    
  52.     panel {
  53.         compatible = "hannstar,tqtm070cb501";
  54.         power-supply = <&reg_dc1sw>;
  55. //      backlight = <&backlight>;
  56.  
  57.         port {
  58.             panel_input: endpoint {
  59.                 remote-endpoint = <&tcon0_out_lcd>;
  60.             };
  61.         };
  62.     };
  63.    
  64.     // PWM not supported by sun6i at the moment
  65.     //backlight {
  66.     //  compatible = "pwm-backlight";
  67.     //  pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
  68.     //  brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
  69.     //  default-brightness-level = <8>;
  70.     //  enable-gpios = <&pio 0 25 GPIO_ACTIVE_HIGH>; /* PA25 */
  71.     //};
  72. };
  73.  
  74. &usb_otg {
  75.     dr_mode = "otg";
  76. };
  77.  
  78. &battery_power_supply {
  79.     status = "okay";
  80. };
  81.  
  82. &lradc {
  83.     vref-supply = <&reg_aldo3>;
  84.     status = "okay";
  85.  
  86.     button-1000 {
  87.         label = "Home";
  88.         linux,code = <KEY_HOMEPAGE>;
  89.         channel = <0>;
  90.         voltage = <1000000>;
  91.     };
  92. };
  93.  
  94. &i2c2 {
  95.     status = "okay";
  96.  
  97.     accelerometer@4c {
  98.         compatible = "fsl,mma7660";
  99.         reg = <0x4c>;
  100.         interrupt-parent = <&pio>;
  101.         interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>; /* PA9 */
  102.  
  103.         mount-matrix =  "0", "1", "0",
  104.                         "1", "0", "0",
  105.                         "0", "0", "1";
  106.     };
  107. };
  108.  
  109. &tcon0 {
  110.     pinctrl-names = "default";
  111.     pinctrl-0 = <&lcd0_rgb888_pins>;
  112.     status = "okay";
  113. };
  114.  
  115. &tcon0_out {
  116.     tcon0_out_lcd: endpoint@0 {
  117.         reg = <0>;
  118.         remote-endpoint = <&panel_input>;
  119.     };
  120. };
  121.  
  122. &de {
  123.     status = "okay";
  124. };
  125.  
  126. &simplefb_lcd {
  127.     status = "okay";
  128. };
  129.  
  130. /*
  131. Audio pins on the SoC:
  132.     "HP"
  133.     "HPCOM" hp amplifier
  134.     "LINEIN"    (not on sun8i-v3s)
  135.     "LINEOUT"   (not on sun8i-a23 or sun8i-v3s)
  136.     "MIC1"
  137.     "MIC2"  (not on sun8i-v3s)
  138.     "MIC3"  (sun6i-a31 only)
  139.  
  140. Microphone biases from the SoC:
  141.     "HBIAS"
  142.     "MBIAS" (not on sun8i-v3s)
  143.  
  144. Board connectors:
  145.     "Headphone"
  146.     "Headset Mic"
  147.     "Line In"
  148.     "Line Out"
  149.     "Mic"
  150.     "Speaker"
  151. */
  152.  
  153. &codec {
  154.     allwinner,audio-routing =
  155.         /* sink, source */
  156.         "Headphone", "HPCOM",
  157.         "Speaker", "LINEOUT",
  158.         "MIC1", "Mic",
  159.         "MIC2", "Headset Mic",
  160.         "Mic",  "MBIAS",
  161.         "Headset Mic", "HBIAS";
  162.     allwinner,pa-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
  163.     //allwinner,pa-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
  164.     status = "okay";
  165. };
  166.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement