sun50i-a64-pinebook.dts revision 1.12
11.12Sjmcneill/* $NetBSD: sun50i-a64-pinebook.dts,v 1.12 2018/07/09 10:07:42 jmcneill Exp $ */
21.1Sjmcneill
31.1Sjmcneill/*-
41.1Sjmcneill * Copyright (c) 2017 Jared McNeill <jmcneill@invisible.ca>
51.1Sjmcneill * All rights reserved.
61.1Sjmcneill *
71.1Sjmcneill * Redistribution and use in source and binary forms, with or without
81.1Sjmcneill * modification, are permitted provided that the following conditions
91.1Sjmcneill * are met:
101.1Sjmcneill * 1. Redistributions of source code must retain the above copyright
111.1Sjmcneill *    notice, this list of conditions and the following disclaimer.
121.1Sjmcneill * 2. Redistributions in binary form must reproduce the above copyright
131.1Sjmcneill *    notice, this list of conditions and the following disclaimer in the
141.1Sjmcneill *    documentation and/or other materials provided with the distribution.
151.1Sjmcneill *
161.1Sjmcneill * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
171.1Sjmcneill * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
181.1Sjmcneill * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
191.1Sjmcneill * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
201.1Sjmcneill * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
211.1Sjmcneill * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
221.1Sjmcneill * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
231.1Sjmcneill * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
241.1Sjmcneill * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
251.1Sjmcneill * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
261.1Sjmcneill * SUCH DAMAGE.
271.1Sjmcneill */
281.1Sjmcneill
291.5Sjmcneill/dts-v1/;
301.5Sjmcneill
311.5Sjmcneill#include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi"
321.1Sjmcneill#include "sun50i-a64.dtsi"
331.1Sjmcneill
341.5Sjmcneill#include <dt-bindings/gpio/gpio.h>
351.4Sjmcneill#include <dt-bindings/input/linux-event-codes.h>
361.5Sjmcneill#include <dt-bindings/interrupt-controller/irq.h>
371.8Sjmcneill#include <dt-bindings/pwm/pwm.h>
381.4Sjmcneill
391.2Sjmcneill/ {
401.2Sjmcneill	model = "Pine64 Pinebook";
411.2Sjmcneill	compatible = "pine64,pinebook", "allwinner,sun50i-a64";
421.3Sjmcneill
431.5Sjmcneill	aliases {
441.5Sjmcneill		serial0 = &uart0;
451.5Sjmcneill	};
461.5Sjmcneill
471.3Sjmcneill	chosen {
481.5Sjmcneill		stdout-path = "serial0:115200n8";
491.5Sjmcneill
501.3Sjmcneill		framebuffer@0 {
511.3Sjmcneill			allwinner,pipeline = "mixer0-lcd0";
521.3Sjmcneill		};
531.3Sjmcneill	};
541.2Sjmcneill
551.4Sjmcneill	gpio_keys {
561.4Sjmcneill		compatible = "gpio-keys";
571.4Sjmcneill
581.4Sjmcneill		lid_switch {
591.4Sjmcneill			label = "Lid Switch";
601.4Sjmcneill			gpios = <&pio 7 10 GPIO_ACTIVE_LOW>;	/* PH10 */
611.4Sjmcneill			linux,input-type = <EV_SW>;
621.4Sjmcneill			linux,code = <SW_LID>;
631.4Sjmcneill			linux,can-disable;
641.4Sjmcneill		};
651.4Sjmcneill	};
661.5Sjmcneill
671.8Sjmcneill	backlight: backlight {
681.8Sjmcneill		compatible = "pwm-backlight";
691.8Sjmcneill		pwms = <&pwm 0 50000 0>;
701.12Sjmcneill		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
711.12Sjmcneill		default-brightness-level = <3>;
721.8Sjmcneill		enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>;	/* PD23 */
731.8Sjmcneill	};
741.8Sjmcneill
751.5Sjmcneill	reg_vcc3v3: vcc3v3 {
761.5Sjmcneill		regulator-fixed;
771.5Sjmcneill		regulator-name = "vcc3v3";
781.5Sjmcneill		regulator-min-microvolt = <3300000>;
791.5Sjmcneill		regulator-max-microvolt = <3300000>;
801.5Sjmcneill	};
811.10Sjmcneill
821.10Sjmcneill	sound_spdif {
831.10Sjmcneill		status = "disabled";
841.10Sjmcneill	};
851.10Sjmcneill};
861.10Sjmcneill
871.11Sjmcneill&cpu0 {
881.11Sjmcneill	cpu-supply = <&reg_dcdc2>;
891.11Sjmcneill	operating-points = <
901.11Sjmcneill		/* kHz    uV */
911.11Sjmcneill		1152000 1300000
921.11Sjmcneill		1104000 1260000
931.11Sjmcneill		1008000 1200000
941.11Sjmcneill		816000  1080000
951.11Sjmcneill		648000	1040000
961.11Sjmcneill		408000	1000000
971.11Sjmcneill		>;
981.11Sjmcneill};
991.11Sjmcneill
1001.10Sjmcneill&spdif_out {
1011.10Sjmcneill	status = "disabled";
1021.5Sjmcneill};
1031.5Sjmcneill
1041.7Sjmcneill&ehci0 {
1051.7Sjmcneill	status = "okay";
1061.7Sjmcneill};
1071.7Sjmcneill
1081.5Sjmcneill&ehci1 {
1091.5Sjmcneill	status = "okay";
1101.5Sjmcneill};
1111.5Sjmcneill
1121.7Sjmcneill&ohci0 {
1131.7Sjmcneill	status = "okay";
1141.7Sjmcneill};
1151.7Sjmcneill
1161.5Sjmcneill&ohci1 {
1171.5Sjmcneill	status = "okay";
1181.5Sjmcneill};
1191.5Sjmcneill
1201.5Sjmcneill&usb_otg {
1211.5Sjmcneill	dr_mode = "host";
1221.5Sjmcneill	status = "okay";
1231.5Sjmcneill};
1241.5Sjmcneill
1251.5Sjmcneill&usbphy {
1261.5Sjmcneill	status = "okay";
1271.5Sjmcneill};
1281.5Sjmcneill
1291.5Sjmcneill&mmc0 {
1301.5Sjmcneill	pinctrl-names = "default";
1311.5Sjmcneill	pinctrl-0 = <&mmc0_pins>;
1321.5Sjmcneill	vmmc-supply = <&reg_vcc3v3>;
1331.5Sjmcneill	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
1341.5Sjmcneill	disable-wp;
1351.5Sjmcneill	bus-width = <4>;
1361.5Sjmcneill	status = "okay";
1371.1Sjmcneill};
1381.1Sjmcneill
1391.6Sjmcneill&mmc1 {
1401.6Sjmcneill	pinctrl-names = "default";
1411.6Sjmcneill	pinctrl-0 = <&mmc1_pins>;
1421.6Sjmcneill	vmmc-supply = <&reg_dldo4>;
1431.6Sjmcneill	vqmmc-supply = <&reg_eldo1>;
1441.6Sjmcneill	bus-width = <4>;
1451.6Sjmcneill	non-removable;
1461.6Sjmcneill	status = "okay";
1471.6Sjmcneill
1481.6Sjmcneill	rtl8723cs: wifi@1 {
1491.6Sjmcneill		reg = <1>;
1501.6Sjmcneill	};
1511.6Sjmcneill};
1521.6Sjmcneill
1531.4Sjmcneill&mmc2 {
1541.4Sjmcneill	pinctrl-names = "default";
1551.4Sjmcneill	pinctrl-0 = <&mmc2_pins>;
1561.4Sjmcneill	vmmc-supply = <&reg_dcdc1>;
1571.4Sjmcneill	bus-width = <8>;
1581.4Sjmcneill	non-removable;
1591.4Sjmcneill	cap-mmc-hw-reset;
1601.1Sjmcneill	status = "okay";
1611.1Sjmcneill};
1621.5Sjmcneill
1631.5Sjmcneill&uart0 {
1641.5Sjmcneill	pinctrl-names = "default";
1651.5Sjmcneill	pinctrl-0 = <&uart0_pins_a>;
1661.5Sjmcneill	status = "okay";
1671.5Sjmcneill};
1681.5Sjmcneill
1691.8Sjmcneill&pwm {
1701.8Sjmcneill	pinctrl-names = "default";
1711.8Sjmcneill	pinctrl-0 = <&pwm0_pins>;
1721.8Sjmcneill	status = "okay";
1731.8Sjmcneill};
1741.8Sjmcneill
1751.5Sjmcneill&r_rsb {
1761.5Sjmcneill	status = "okay";
1771.5Sjmcneill
1781.5Sjmcneill	axp803: pmic@3a3 {
1791.5Sjmcneill		compatible = "x-powers,axp803";
1801.5Sjmcneill		reg = <0x3a3>;
1811.5Sjmcneill		interrupt-parent = <&r_intc>;
1821.5Sjmcneill		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
1831.5Sjmcneill	};
1841.5Sjmcneill};
1851.5Sjmcneill
1861.5Sjmcneill#include "axp803.dtsi"
1871.9Sjmcneill
1881.9Sjmcneill&codec {
1891.9Sjmcneill	allwinner,pa-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;	/* PH7 */
1901.9Sjmcneill	status = "okay";
1911.9Sjmcneill};
1921.9Sjmcneill
1931.9Sjmcneill&codec_analog {
1941.9Sjmcneill	status = "okay";
1951.9Sjmcneill};
1961.9Sjmcneill
1971.9Sjmcneill&dai {
1981.9Sjmcneill	status = "okay";
1991.9Sjmcneill};
2001.9Sjmcneill
2011.9Sjmcneill&sound {
2021.9Sjmcneill	status = "okay";
2031.9Sjmcneill};
204