sun50i-a64-pinebook.dts revision 1.13
1/* $NetBSD: sun50i-a64-pinebook.dts,v 1.13 2018/11/11 11:44:53 mrg Exp $ */ 2 3/*- 4 * Copyright (c) 2017 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/dts-v1/; 30 31#include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi" 32#include "sun50i-a64.dtsi" 33 34#include <dt-bindings/gpio/gpio.h> 35#include <dt-bindings/input/linux-event-codes.h> 36#include <dt-bindings/interrupt-controller/irq.h> 37#include <dt-bindings/pwm/pwm.h> 38 39/ { 40 model = "Pine64 Pinebook"; 41 compatible = "pine64,pinebook", "allwinner,sun50i-a64"; 42 43 aliases { 44 serial0 = &uart0; 45 }; 46 47 chosen { 48 stdout-path = "serial0:115200n8"; 49 50 framebuffer@0 { 51 allwinner,pipeline = "mixer0-lcd0"; 52 }; 53 }; 54 55 gpio_keys { 56 compatible = "gpio-keys"; 57 58 lid_switch { 59 label = "Lid Switch"; 60 gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */ 61 linux,input-type = <EV_SW>; 62 linux,code = <SW_LID>; 63 linux,can-disable; 64 }; 65 }; 66 67 backlight: backlight { 68 compatible = "pwm-backlight"; 69 pwms = <&pwm 0 50000 0>; 70 brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; 71 default-brightness-level = <3>; 72 enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ 73 }; 74 75 reg_vcc3v3: vcc3v3 { 76 regulator-fixed; 77 regulator-name = "vcc3v3"; 78 regulator-min-microvolt = <3300000>; 79 regulator-max-microvolt = <3300000>; 80 }; 81 82 sound_spdif { 83 status = "disabled"; 84 }; 85}; 86 87&cpu0 { 88 cpu-supply = <®_dcdc2>; 89 operating-points = < 90 /* kHz uV */ 91 1152000 1300000 92 1104000 1260000 93 1008000 1200000 94 816000 1080000 95 648000 1040000 96 408000 1000000 97 >; 98}; 99 100&spdif_out { 101 status = "disabled"; 102}; 103 104&ehci0 { 105 status = "okay"; 106}; 107 108&ehci1 { 109 status = "okay"; 110}; 111 112&ohci0 { 113 status = "okay"; 114}; 115 116&ohci1 { 117 status = "okay"; 118}; 119 120&uart1 { 121 pinctrl-names = "default"; 122 pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; 123 status = "okay"; 124 bluetooth { 125 compatible = "realtek,rtl8723cs-bt"; 126 reset-gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */ 127 device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */ 128 host-wake-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */ 129 firmware-postfix = "pinebook"; 130 }; 131}; 132 133&usb_otg { 134 dr_mode = "host"; 135 status = "okay"; 136}; 137 138&usbphy { 139 status = "okay"; 140}; 141 142&mmc0 { 143 pinctrl-names = "default"; 144 pinctrl-0 = <&mmc0_pins>; 145 vmmc-supply = <®_vcc3v3>; 146 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 147 disable-wp; 148 bus-width = <4>; 149 status = "okay"; 150}; 151 152&mmc1 { 153 pinctrl-names = "default"; 154 pinctrl-0 = <&mmc1_pins>; 155 vmmc-supply = <®_dldo4>; 156 vqmmc-supply = <®_eldo1>; 157 bus-width = <4>; 158 non-removable; 159 status = "okay"; 160 161 rtl8723cs: wifi@1 { 162 reg = <1>; 163 }; 164}; 165 166&mmc2 { 167 pinctrl-names = "default"; 168 pinctrl-0 = <&mmc2_pins>; 169 vmmc-supply = <®_dcdc1>; 170 bus-width = <8>; 171 non-removable; 172 cap-mmc-hw-reset; 173 status = "okay"; 174}; 175 176&uart0 { 177 pinctrl-names = "default"; 178 pinctrl-0 = <&uart0_pins_a>; 179 status = "okay"; 180}; 181 182&pwm { 183 pinctrl-names = "default"; 184 pinctrl-0 = <&pwm0_pins>; 185 status = "okay"; 186}; 187 188&r_rsb { 189 status = "okay"; 190 191 axp803: pmic@3a3 { 192 compatible = "x-powers,axp803"; 193 reg = <0x3a3>; 194 interrupt-parent = <&r_intc>; 195 interrupts = <0 IRQ_TYPE_LEVEL_LOW>; 196 }; 197}; 198 199#include "axp803.dtsi" 200 201&codec { 202 allwinner,pa-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ 203 status = "okay"; 204}; 205 206&codec_analog { 207 status = "okay"; 208}; 209 210&dai { 211 status = "okay"; 212}; 213 214&sound { 215 status = "okay"; 216}; 217