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 #include <dt-bindings/pwm/pwm.h>
0050
0051 / {
0052 model = "iNet-1";
0053 compatible = "inet-tek,inet1", "allwinner,sun4i-a10";
0054
0055 aliases {
0056 serial0 = &uart0;
0057 };
0058
0059 backlight: backlight {
0060 compatible = "pwm-backlight";
0061 pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
0062 brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
0063 default-brightness-level = <8>;
0064 enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
0065 power-supply = <®_vcc3v3>;
0066 };
0067
0068 chosen {
0069 stdout-path = "serial0:115200n8";
0070 };
0071 };
0072
0073 &codec {
0074 status = "okay";
0075 };
0076
0077 &cpu0 {
0078 cpu-supply = <®_dcdc2>;
0079 };
0080
0081 &ehci0 {
0082 status = "okay";
0083 };
0084
0085 &ehci1 {
0086 status = "okay";
0087 };
0088
0089 &i2c0 {
0090 status = "okay";
0091
0092 axp209: pmic@34 {
0093 reg = <0x34>;
0094 interrupts = <0>;
0095 };
0096 };
0097
0098 #include "axp209.dtsi"
0099
0100 &i2c1 {
0101 status = "okay";
0102
0103 /* Accelerometer */
0104 bma250@18 {
0105 compatible = "bosch,bma250";
0106 reg = <0x18>;
0107 interrupt-parent = <&pio>;
0108 interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 / EINT0 */
0109 };
0110 };
0111
0112 &i2c2 {
0113 status = "okay";
0114
0115 ft5x: touchscreen@38 {
0116 compatible = "edt,edt-ft5406";
0117 reg = <0x38>;
0118 interrupt-parent = <&pio>;
0119 interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
0120 wake-gpios = <&pio 1 13 GPIO_ACTIVE_HIGH>; /* PB13 */
0121 touchscreen-size-x = <600>;
0122 touchscreen-size-y = <1024>;
0123 touchscreen-swapped-x-y;
0124 };
0125 };
0126
0127 &lradc {
0128 vref-supply = <®_ldo2>;
0129 status = "okay";
0130
0131 button-200 {
0132 label = "Volume Up";
0133 linux,code = <KEY_VOLUMEUP>;
0134 channel = <0>;
0135 voltage = <200000>;
0136 };
0137
0138 button-1000 {
0139 label = "Volume Down";
0140 linux,code = <KEY_VOLUMEDOWN>;
0141 channel = <0>;
0142 voltage = <1000000>;
0143 };
0144
0145 button-1200 {
0146 label = "Home";
0147 linux,code = <KEY_HOMEPAGE>;
0148 channel = <0>;
0149 voltage = <1200000>;
0150 };
0151 };
0152
0153 &mmc0 {
0154 vmmc-supply = <®_vcc3v3>;
0155 bus-width = <4>;
0156 cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
0157 status = "okay";
0158 };
0159
0160 &ohci0 {
0161 status = "okay";
0162 };
0163
0164 &otg_sram {
0165 status = "okay";
0166 };
0167
0168 &pwm {
0169 pinctrl-names = "default";
0170 pinctrl-0 = <&pwm0_pin>;
0171 status = "okay";
0172 };
0173
0174 ®_dcdc2 {
0175 regulator-always-on;
0176 regulator-min-microvolt = <1000000>;
0177 regulator-max-microvolt = <1400000>;
0178 regulator-name = "vdd-cpu";
0179 };
0180
0181 ®_dcdc3 {
0182 regulator-always-on;
0183 regulator-min-microvolt = <1250000>;
0184 regulator-max-microvolt = <1250000>;
0185 regulator-name = "vdd-int-dll";
0186 };
0187
0188 ®_ldo1 {
0189 regulator-name = "vdd-rtc";
0190 };
0191
0192 ®_ldo2 {
0193 regulator-always-on;
0194 regulator-min-microvolt = <3000000>;
0195 regulator-max-microvolt = <3000000>;
0196 regulator-name = "avcc";
0197 };
0198
0199 ®_usb0_vbus {
0200 status = "okay";
0201 };
0202
0203 ®_usb1_vbus {
0204 status = "okay";
0205 };
0206
0207 ®_usb2_vbus {
0208 status = "okay";
0209 };
0210
0211 &uart0 {
0212 pinctrl-names = "default";
0213 pinctrl-0 = <&uart0_pb_pins>;
0214 status = "okay";
0215 };
0216
0217 &usb_otg {
0218 dr_mode = "otg";
0219 status = "okay";
0220 };
0221
0222 &usbphy {
0223 usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0224 usb0_vbus_det-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; /* PH5 */
0225 usb0_vbus-supply = <®_usb0_vbus>;
0226 usb1_vbus-supply = <®_usb1_vbus>;
0227 usb2_vbus-supply = <®_usb2_vbus>;
0228 status = "okay";
0229 };