/* * Copyright (c) 2017 Icenowy Zheng * * Based on sun50i-a64-pine64.dts, which is: * Copyright (c) 2016 ARM Ltd. * * This file is dual-licensed: you can use it either under the terms * of the GPL or the X11 license, at your option. Note that this dual * licensing only applies to this file, and not this project as a * whole. * * a) This library is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Or, alternatively, * * b) Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ /dts-v1/; #include "sun50i-a64-sopine.dtsi" #include / { model = "PinePhone Don't be evil development kit"; compatible = "pine64,sopine-baseboard", "pine64,sopine", "allwinner,sun50i-a64"; aliases { ethernet0 = &emac; serial0 = &uart0; }; chosen { stdout-path = "serial0:115200n8"; }; i2c-csi { compatible = "i2c-gpio"; sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>; /* CSI0-SDA: PE13 */ scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>; /* CSI0-SCK: PE12 */ i2c-gpio,delay-us = <5>; #address-cells = <1>; #size-cells = <0>; ov5640: camera@3c { compatible = "ovti,ov5640"; reg = <0x3c>; pinctrl-names = "default"; pinctrl-0 = <&csi_mclk_pin>; clocks = <&ccu CLK_CSI_MCLK>; clock-names = "xclk"; AVDD-supply = <®_dldo3>; DOVDD-supply = <®_aldo1>; DVDD-supply = <®_eldo3>; reset-gpios = <&pio 3 3 GPIO_ACTIVE_LOW>; /* PD3 */ powerdown-gpios = <&pio 2 0 GPIO_ACTIVE_HIGH>; /* PC0 */ port { ov5640_ep: endpoint { remote-endpoint = <&csi_ep>; bus-width = <8>; hsync-active = <1>; /* Active high */ vsync-active = <0>; /* Active low */ data-active = <1>; /* Active high */ pclk-sample = <1>; /* Rising */ }; }; }; }; hdmi-connector { compatible = "hdmi-connector"; type = "a"; port { hdmi_con_in: endpoint { remote-endpoint = <&hdmi_out_con>; }; }; }; reg_vcc1v8: vcc1v8 { compatible = "regulator-fixed"; regulator-name = "vcc1v8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; }; backlight: backlight { compatible = "pwm-backlight"; pwms = <&r_pwm 0 50000 PWM_POLARITY_INVERTED>; brightness-levels = <0 1 2 4 8 16 32 64 128 512>; default-brightness-level = <2>; enable-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* LCD-BL-EN: PH10 */ }; }; &ac_power_supply { status = "okay"; }; &battery_power_supply { status = "okay"; }; &codec { status = "okay"; }; &codec_analog { status = "okay"; }; &csi { status = "okay"; port { #address-cells = <1>; #size-cells = <0>; csi_ep: endpoint { remote-endpoint = <&ov5640_ep>; bus-width = <8>; hsync-active = <1>; /* Active high */ vsync-active = <0>; /* Active low */ data-active = <1>; /* Active high */ pclk-sample = <1>; /* Rising */ }; }; }; &dai { status = "okay"; }; &de { status = "okay"; }; &dphy { status = "okay"; }; ®_ldo_io0 { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc-ctp"; status = "okay"; }; &dsi { vcc-dsi-supply = <®_dldo1>; /* VCC3V3-DSI */ #address-cells = <1>; #size-cells = <0>; status = "okay"; panel@0 { compatible = "pinephone,jd9365da"; reg = <0>; avdd-supply = <®_dc1sw>; /* VCC-LCD */ dvdd-supply = <®_dldo2>; /* VCC-MIPI */ cvdd-supply = <®_ldo_io0>; /* VCC-CTP: GPIO0-LDO */ reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* LCD-RST: PD24 */ backlight = <&backlight>; }; }; &r_pwm { pinctrl-names = "default"; pinctrl-0 = <&r_pwm_pin>; status = "okay"; }; &ehci0 { status = "okay"; }; &ehci1 { status = "okay"; }; &emac { pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins>; phy-mode = "rgmii"; phy-handle = <&ext_rgmii_phy>; phy-supply = <®_dc1sw>; status = "okay"; }; &hdmi { hvcc-supply = <®_dldo1>; status = "disabled"; }; &hdmi_out { hdmi_out_con: endpoint { remote-endpoint = <&hdmi_con_in>; }; }; &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; status = "okay"; ft6236@38 { compatible = "focaltech,ft6236", "edt,edt-6236"; reg = <0x38>; // pinctrl-names = "default"; // pinctrl-0 = <&pinctrl_lcd_ctp_int>; interrupt-parent = <&pio>; interrupts = <7 4 IRQ_TYPE_EDGE_FALLING>; touchscreen-size-x = <720>; touchscreen-size-y = <1440>; touchscreen-inverted-x; }; }; &i2c1 { pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; status = "okay"; mpu6050@68 { compatible = "invensense,mpu6050"; reg = <0x68>; interrupt-parent = <&pio>; interrupts = <7 5 IRQ_TYPE_EDGE_FALLING>; /* PH5 */ orientation = <0xff 0 0 0 1 0 0 0 0xff>; }; lis3mdl@1e { compatible = "st,lis3mdl-magn"; reg = <0x1e>; interrupt-parent = <&pio>; interrupts = <1 1 IRQ_TYPE_EDGE_FALLING>; /* PB1 */ }; stk3335@47 { compatible = "sensortek,STK3335"; reg = <0x47>; interrupt-parent = <&pio>; interrupts = <1 0 IRQ_TYPE_EDGE_FALLING>; /* PB0 */ }; }; &mdio { ext_rgmii_phy: ethernet-phy@1 { compatible = "ethernet-phy-ieee802.3-c22"; reg = <1>; }; }; &mmc1 { pinctrl-names = "default"; pinctrl-0 = <&mmc1_pins>; vmmc-supply = <®_dcdc1>; vqmmc-supply = <®_dldo4>; bus-width = <4>; non-removable; status = "okay"; rtl8723bs: wifi@1 { reg = <1>; }; }; &mmc2 { pinctrl-names = "default"; pinctrl-0 = <&mmc2_pins>; vmmc-supply = <®_dcdc1>; vqmmc-supply = <®_vcc1v8>; bus-width = <8>; non-removable; cap-mmc-hw-reset; status = "okay"; }; &ohci0 { status = "okay"; }; &ohci1 { status = "okay"; }; ®_dc1sw { regulator-name = "vcc-lcd"; }; ®_dldo1 { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc-hdmi"; }; ®_dldo2 { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc-mipi"; }; ®_dldo4 { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-name = "vcc-wifi"; }; &simplefb_hdmi { vcc-hdmi-supply = <®_dldo1>; }; &sound { simple-audio-card,aux-devs = <&codec_analog>; simple-audio-card,widgets = "Microphone", "Microphone Jack", "Headphone", "Headphone Jack"; simple-audio-card,routing = "Left DAC", "AIF1 Slot 0 Left", "Right DAC", "AIF1 Slot 0 Right", "Headphone Jack", "HP", "AIF1 Slot 0 Left ADC", "Left ADC", "AIF1 Slot 0 Right ADC", "Right ADC", "MIC2", "Microphone Jack"; status = "okay"; }; &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pb_pins>; status = "okay"; }; &usb_otg { dr_mode = "host"; status = "okay"; }; &usbphy { status = "okay"; }; &tcon1 { status = "disabled"; }; &hdmi_phy { status = "disabled"; };