mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2025-12-13 08:08:51 +01:00
196 lines
4.9 KiB
Diff
196 lines
4.9 KiB
Diff
--- /dev/null 2019-05-04 09:53:55.553276856 +0200
|
|
+++ a/arch/arm/boot/dts/sun8i-v3s-funkey.dts 2019-05-04 20:06:53.118696800 +0200
|
|
@@ -0,0 +1,192 @@
|
|
+/*
|
|
+ * Copyright (C) 2019 Michel Stempin <michel.stempin@wanadoo.fr>
|
|
+ *
|
|
+ * 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"
|
|
+
|
|
+/ {
|
|
+ model = "FunKey";
|
|
+ compatible = "funkey", "allwinner,sun8i-v3s";
|
|
+
|
|
+ aliases {
|
|
+ serial0 = &uart0;
|
|
+ };
|
|
+
|
|
+ chosen {
|
|
+ stdout-path = "serial0:115200n8";
|
|
+ };
|
|
+
|
|
+ backlight: backlight {
|
|
+ compatible = "pwm-backlight";
|
|
+ pwms = <&pwm 0 100000 1>;
|
|
+ brightness-levels = <0 1 2 3 8 14 21 32 46 60 80 100>; //2.2 div factor
|
|
+ default-brightness-level = <11>;
|
|
+ power-supply = <®_vcc5v0>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&codec {
|
|
+ allwinner,audio-routing =
|
|
+ "Headphone", "HP",
|
|
+ "Headphone", "HPCOM",
|
|
+ "MIC1", "Mic",
|
|
+ "Mic", "HBIAS";
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ehci0 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&i2c0 {
|
|
+ status = "okay";
|
|
+
|
|
+ /* axp209: pmic@34 {
|
|
+ compatible = "x-powers,axp209";
|
|
+ reg = <0x34>;
|
|
+ interrupts = <0>;
|
|
+ interrupt-controller;
|
|
+ #interrupt-cells = <1>;
|
|
+ }; */
|
|
+};
|
|
+
|
|
+&mmc0 {
|
|
+ pinctrl-0 = <&mmc0_pins_a>;
|
|
+ pinctrl-names = "default";
|
|
+ broken-cd;
|
|
+ bus-width = <4>;
|
|
+ vmmc-supply = <®_vcc3v3>;
|
|
+ vqmmc-supply = <®_vcc3v3>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&ohci0 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+/*
|
|
+#include "axp209.dtsi"
|
|
+
|
|
+®_dcdc2 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <1000000>;
|
|
+ regulator-max-microvolt = <1400000>;
|
|
+ regulator-name = "vdd-cpu-sys-ephy";
|
|
+};
|
|
+
|
|
+®_dcdc3 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <3000000>;
|
|
+ regulator-max-microvolt = <3450000>;
|
|
+ regulator-name = "vcc-io-ephy-mcsi-usb";
|
|
+};
|
|
+
|
|
+®_ldo1 {
|
|
+ regulator-min-microvolt = <3000000>;
|
|
+ regulator-max-microvolt = <3600000>;
|
|
+ regulator-name = "vcc-rtc";
|
|
+};
|
|
+
|
|
+®_ldo2 {
|
|
+ regulator-always-on;
|
|
+ regulator-min-microvolt = <2800000>;
|
|
+ regulator-max-microvolt = <3300000>;
|
|
+ regulator-name = "avcc-pll";
|
|
+};
|
|
+*/
|
|
+
|
|
+®_vcc3v0 {
|
|
+ regulator-always-on;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+®_vcc3v3 {
|
|
+ regulator-always-on;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+®_vcc5v0 {
|
|
+ regulator-always-on;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&spi0 {
|
|
+ status = "okay";
|
|
+
|
|
+ st7789v@0 {
|
|
+ compatible = "sitronix,st7789v";
|
|
+ reg = <0>;
|
|
+ spi-max-frequency = <50000000>;
|
|
+ txbuflen = <115200>;
|
|
+ rotate = <0>;
|
|
+ fps = <50>;
|
|
+ buswidth = <8>;
|
|
+ reset-gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>; //PB2
|
|
+ dc-gpios = <&pio 2 0 GPIO_ACTIVE_LOW>; //PC0 (MISO)
|
|
+ debug = <0>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&uart0 {
|
|
+ pinctrl-0 = <&uart0_pins_a>;
|
|
+ pinctrl-names = "default";
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&pwm {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&pwm0_pins>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&usb_otg {
|
|
+ dr_mode = "peripheral";
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&usbphy {
|
|
+ usb0_vbus-supply = <®_vcc5v0>;
|
|
+ phy-supply = <®_vcc5v0>;
|
|
+ vcc = <®_vcc5v0>;
|
|
+ status = "okay";
|
|
+};
|