0001 /*
0002 * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
0003 *
0004 * This file is dual-licensed: you can use it either under the terms
0005 * of the GPL or the X11 license, at your option. Note that this dual
0006 * licensing only applies to this file, and not this project as a
0007 * whole.
0008 *
0009 * a) This file is free software; you can redistribute it and/or
0010 * modify it under the terms of the GNU General Public License as
0011 * published by the Free Software Foundation; either version 2 of the
0012 * License, or (at your option) any later version.
0013 *
0014 * This file is distributed in the hope that it will be useful,
0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0017 * GNU General Public License for more details.
0018 *
0019 * Or, alternatively,
0020 *
0021 * b) Permission is hereby granted, free of charge, to any person
0022 * obtaining a copy of this software and associated documentation
0023 * files (the "Software"), to deal in the Software without
0024 * restriction, including without limitation the rights to use,
0025 * copy, modify, merge, publish, distribute, sublicense, and/or
0026 * sell copies of the Software, and to permit persons to whom the
0027 * Software is furnished to do so, subject to the following
0028 * conditions:
0029 *
0030 * The above copyright notice and this permission notice shall be
0031 * included in all copies or substantial portions of the Software.
0032 *
0033 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0034 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0035 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0036 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0037 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0038 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0039 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0040 * OTHER DEALINGS IN THE SOFTWARE.
0041 */
0042
0043 /dts-v1/;
0044 #include "sun4i-a10.dtsi"
0045 #include "sunxi-common-regulators.dtsi"
0046 #include <dt-bindings/gpio/gpio.h>
0047 #include <dt-bindings/input/input.h>
0048 #include <dt-bindings/interrupt-controller/irq.h>
0049
0050 / {
0051 model = "Chuwi V7 CW0825";
0052 compatible = "chuwi,v7-cw0825", "allwinner,sun4i-a10";
0053
0054 aliases {
0055 serial0 = &uart0;
0056 };
0057
0058 chosen {
0059 stdout-path = "serial0:115200n8";
0060 };
0061 };
0062
0063 &ehci1 {
0064 status = "okay";
0065 };
0066
0067 &i2c0 {
0068 status = "okay";
0069
0070 axp209: pmic@34 {
0071 compatible = "x-powers,axp209";
0072 reg = <0x34>;
0073 interrupts = <0>;
0074
0075 interrupt-controller;
0076 #interrupt-cells = <1>;
0077 };
0078 };
0079
0080 &i2c1 {
0081 status = "okay";
0082 };
0083
0084 &i2c2 {
0085 status = "okay";
0086
0087 ft5306de4: touchscreen@38 {
0088 compatible = "edt,edt-ft5406";
0089 reg = <0x38>;
0090 interrupt-parent = <&pio>;
0091 interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
0092 touchscreen-size-x = <1024>;
0093 touchscreen-size-y = <768>;
0094 };
0095 };
0096
0097 &lradc {
0098 vref-supply = <®_vcc3v0>;
0099 status = "okay";
0100
0101 button-800 {
0102 label = "Volume Up";
0103 linux,code = <KEY_VOLUMEUP>;
0104 channel = <0>;
0105 voltage = <800000>;
0106 };
0107
0108 button-1000 {
0109 label = "Volume Down";
0110 linux,code = <KEY_VOLUMEDOWN>;
0111 channel = <0>;
0112 voltage = <1000000>;
0113 };
0114
0115 button-1200 {
0116 label = "Back";
0117 linux,code = <KEY_BACK>;
0118 channel = <0>;
0119 voltage = <1200000>;
0120 };
0121 };
0122
0123 &mmc0 {
0124 vmmc-supply = <®_vcc3v3>;
0125 bus-width = <4>;
0126 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0127 status = "okay";
0128 };
0129
0130 &otg_sram {
0131 status = "okay";
0132 };
0133
0134 ®_usb0_vbus {
0135 status = "okay";
0136 };
0137
0138 ®_usb2_vbus {
0139 status = "okay";
0140 };
0141
0142 &uart0 {
0143 pinctrl-names = "default";
0144 pinctrl-0 = <&uart0_pb_pins>;
0145 status = "okay";
0146 };
0147
0148 &usb_otg {
0149 dr_mode = "otg";
0150 status = "okay";
0151 };
0152
0153 &usbphy {
0154 usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0155 usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
0156 usb0_vbus-supply = <®_usb0_vbus>;
0157 usb2_vbus-supply = <®_usb2_vbus>;
0158 status = "okay";
0159 };