/* * Copyright (C) 2016 Icenowy Zheng * * 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 file 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 file 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 "sun8i-v3s.dtsi" #include "sunxi-common-regulators.dtsi" #include / { model = "Lichee Pi Zero"; compatible = "licheepi,licheepi-zero", "allwinner,sun8i-v3s"; aliases { serial0 = &uart0; ethernet0 = &emac; }; chosen { stdout-path = "serial0:115200n8"; fb0: framebuffer@0 { compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; allwinner,pipeline = "de0-lcd0"; clocks = <&ccu CLK_BUS_TCON0>, <&display_clocks 0>, <&display_clocks 6>, <&ccu CLK_TCON0>; status = "disabled"; }; }; leds { status = "disabled"; }; /*backlight: backlight { compatible = "pwm-backlight"; pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; default-brightness-level = <50>; enable-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; //PB4 PWM };*/ panel: panel { compatible = "qiaodian,qd43003c0-40", "simple-panel"; #address-cells = <1>; #size-cells = <0>; enable-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>;//使能引脚 PB4脚为高使能 这里为pwm信号 // power-supply = <®_vcc3v3>; // enable-gpios = <&axp_gpio 0 GPIO_ACTIVE_HIGH>; /* AXP GPIO0 */ //backlight = <&backlight>; port@0 { reg = <0>; #address-cells = <1>; #size-cells = <0>; panel_input: endpoint@0 { reg = <0>; remote-endpoint = <&tcon0_out_lcd>; }; }; }; }; &spi0 { status = "okay"; flash@0 { #address-cells = <1>; #size-cells = <1>; compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <50000000>; partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "u-boot"; reg = <0x000000 0x100000>; read-only; }; partition@100000 { label = "dtb"; reg = <0x100000 0x10000>; read-only; }; partition@110000 { label = "kernel"; reg = <0x110000 0x400000>; read-only; }; partition@510000 { label = "rootfs"; reg = <0x510000 0xAF0000>; }; }; }; }; &emac { status = "okay"; }; &ehci0 { status = "okay"; }; &mmc0 { pinctrl-0 = <&mmc0_pins_a>; pinctrl-names = "default"; broken-cd; bus-width = <4>; vmmc-supply = <®_vcc3v3>; status = "okay"; }; &i2c0 { status = "okay"; ns2009: ns2009@48 { compatible = "nsiway,ns2009"; reg = <0x48>; }; }; &ohci0 { status = "okay"; }; &uart0 { pinctrl-0 = <&uart0_pins_a>; pinctrl-names = "default"; status = "okay"; }; &uart1{ pinctrl-0 = <&uart1_pins_a>; pinctrl-names = "default"; status = "okay"; }; &uart2{ pinctrl-0 = <&uart2_pins_a>; pinctrl-names = "default"; status = "okay"; }; &codec { allwinner,audio-routing = "Headphone", "HP", "Headphone", "HPCOM", "MIC1", "Mic", "Mic", "HBIAS"; status = "okay"; }; &usb_otg { dr_mode = "host"; status = "okay"; }; &usbphy { usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>; status = "okay"; }; /* &pwm { status = "okay"; }; */ &de { status = "okay"; }; &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd_rgb666_pins>; status = "okay"; }; &tcon0_out { tcon0_out_lcd: endpoint@0 { reg = <0>; remote-endpoint = <&panel_input>; }; };