sun50i-a64-pinebook.dts revision 1.16
1/* $NetBSD: sun50i-a64-pinebook.dts,v 1.16 2019/06/06 23:19:45 jmcneill Exp $ */ 2 3/*- 4 * Copyright (c) 2017-2019 Jared McNeill <jmcneill@invisible.ca> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29#include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts" 30#include "sun50i-a64.dtsi" 31 32#include <dt-bindings/gpio/gpio.h> 33#include <dt-bindings/input/linux-event-codes.h> 34#include <dt-bindings/interrupt-controller/irq.h> 35#include <dt-bindings/pwm/pwm.h> 36 37/ { 38 chosen { 39 framebuffer@0 { 40 allwinner,pipeline = "mixer0-lcd0"; 41 }; 42 }; 43 44 gpio_keys { 45 lid_switch { 46 /* 47 * This is listed as PL12 in 4.20.3 sources, but 48 * we have used PH10 all along. 49 */ 50 gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */ 51 }; 52 }; 53 54 sound_spdif { 55 status = "disabled"; 56 }; 57}; 58 59&cpu0 { 60 cpu-supply = <®_dcdc2>; 61 operating-points = < 62 /* kHz uV */ 63 1152000 1300000 64 1104000 1260000 65 1008000 1200000 66 816000 1080000 67 648000 1040000 68 408000 1000000 69 >; 70}; 71 72&spdif_out { 73 status = "disabled"; 74}; 75 76&uart1 { 77 pinctrl-names = "default"; 78 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; 79 status = "okay"; 80 bluetooth { 81 compatible = "realtek,rtl8723cs-bt"; 82 reset-gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */ 83 device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */ 84 host-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ 85 firmware-postfix = "pinebook"; 86 }; 87}; 88 89&codec { 90 allwinner,pa-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ 91 status = "okay"; 92}; 93 94&de { 95 status = "okay"; 96}; 97 98&mixer0 { 99 status = "okay"; 100}; 101 102&pio { 103 lcd_rgb666_pins: lcd-rgb666 { 104 pins = "PD0", "PD1", "PD2", "PD3", "PD4", 105 "PD5", "PD6", "PD7", "PD8", "PD9", 106 "PD10", "PD11", "PD12", "PD13", 107 "PD14", "PD15", "PD16", "PD17", 108 "PD18", "PD19", "PD20", "PD21"; 109 function = "lcd0"; 110 }; 111}; 112 113&tcon0 { 114 pinctrl-names = "default"; 115 pinctrl-0 = <&lcd_rgb666_pins>; 116 117 status = "okay"; 118}; 119 120&tcon0_out { 121 tcon0_out_anx6345: endpoint@0 { 122 reg = <0>; 123 remote-endpoint = <&anx6345_in>; 124 }; 125}; 126 127&r_pio { 128 r_i2c_pins_a: i2c-a { 129 pins = "PL8", "PL9"; 130 function = "s_i2c"; 131 }; 132}; 133 134&r_i2c { 135 pinctrl-names = "default"; 136 pinctrl-0 = <&r_i2c_pins_a>; 137 status = "okay"; 138 139 anx6345: anx6345@38 { 140 compatible = "analogix,anx6345"; 141 reg = <0x38>; 142 reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; /* PD24 */ 143 panel-supply = <®_dc1sw>; 144 dvdd25-supply = <®_dldo2>; 145 dvdd12-supply = <®_fldo1>; 146 147 port { 148 anx6345_in: endpoint { 149 remote-endpoint = <&tcon0_out_anx6345>; 150 }; 151 }; 152 }; 153}; 154