mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2026-03-20 10:52:44 +01:00
added the FunKey DTS files to Makefiles
This commit is contained in:
166
board/funkey/patches/linux/0015-add-funkey-dts.patch
Normal file
166
board/funkey/patches/linux/0015-add-funkey-dts.patch
Normal file
@@ -0,0 +1,166 @@
|
||||
--- /dev/null 2019-03-22 21:33:35.539154398 +0100
|
||||
+++ a/arch/arm/boot/dts/sun8i-v3s-funkey.dts 2019-03-22 22:37:31.157868364 +0100
|
||||
@@ -0,0 +1,163 @@
|
||||
+/*
|
||||
+ * 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 1000000 0>;
|
||||
+ brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
|
||||
+ default-brightness-level = <100>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&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>;
|
||||
+ 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";
|
||||
+};
|
||||
+
|
||||
+&spi0 {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ st7789v@0 {
|
||||
+ compatible = "sitronix,st7789v";
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ spi-max-frequency = <40000000>;
|
||||
+ txbuflen = <115200>;
|
||||
+ rotate = <90>;
|
||||
+ fps = <42>;
|
||||
+ buswidth = <8>;
|
||||
+ reset-gpios = <&pio 4 1 GPIO_ACTIVE_LOW>; //PE1
|
||||
+ 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";
|
||||
+};
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index 1f97ae8..e798bf1 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -932,6 +932,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
|
||||
sun8i-h3-orangepi-plus2e.dtb \
|
||||
sun8i-r16-bananapi-m2m.dtb \
|
||||
sun8i-r16-parrot.dtb \
|
||||
+ sun8i-v3s-funkey.dtb \
|
||||
sun8i-v3s-licheepi-zero.dtb \
|
||||
sun8i-v3s-licheepi-zero-dock.dtb \
|
||||
sun8i-v3s-licheepi-zero-with-480x272-lcd.dtb \
|
||||
@@ -43,7 +43,6 @@
|
||||
/dts-v1/;
|
||||
#include "sun8i-v3s.dtsi"
|
||||
#include "sunxi-common-regulators.dtsi"
|
||||
#include "axp209.dtsi"
|
||||
|
||||
/ {
|
||||
model = "FunKey";
|
||||
@@ -61,7 +60,7 @@
|
||||
compatible = "pwm-backlight";
|
||||
pwms = <&pwm 0 1000000 0>;
|
||||
brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
|
||||
default-brightness-level = <10>;
|
||||
default-brightness-level = <100>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -104,6 +103,8 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
#include "axp209.dtsi"
|
||||
|
||||
®_dcdc2 {
|
||||
regulator-always-on;
|
||||
regulator-min-microvolt = <1000000>;
|
||||
86
board/funkey/patches/uboot/0001-add-funkey-dts.patch
Normal file
86
board/funkey/patches/uboot/0001-add-funkey-dts.patch
Normal file
@@ -0,0 +1,86 @@
|
||||
--- /dev/null 2019-03-22 21:33:35.539154398 +0100
|
||||
+++ a/arch/arm/dts/sun8i-v3s-funkey.dts 2019-03-22 22:22:37.417295027 +0100
|
||||
@@ -0,0 +1,83 @@
|
||||
+/*
|
||||
+ * 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";
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mmc0 {
|
||||
+ pinctrl-0 = <&mmc0_pins_a>;
|
||||
+ pinctrl-names = "default";
|
||||
+ broken-cd;
|
||||
+ bus-width = <4>;
|
||||
+ vmmc-supply = <®_vcc3v3>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ pinctrl-0 = <&uart0_pins_a>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_otg {
|
||||
+ dr_mode = "otg";
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbphy {
|
||||
+ usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
|
||||
index 469dd71..e91a8d3 100644
|
||||
--- a/arch/arm/dts/Makefile
|
||||
+++ b/arch/arm/dts/Makefile
|
||||
@@ -281,6 +281,7 @@ dtb-$(CONFIG_MACH_SUN8I_H3) += \
|
||||
sun8i-h3-orangepi-plus2e.dtb \
|
||||
sun8i-h3-nanopi-neo.dtb
|
||||
dtb-$(CONFIG_MACH_SUN8I_V3S) += \
|
||||
+ sun8i-v3s-funkey.dtb \
|
||||
sun8i-v3s-licheepi-zero.dtb
|
||||
dtb-$(CONFIG_MACH_SUN50I) += \
|
||||
sun50i-a64-pine64-plus.dtb \
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* 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";
|
||||
};
|
||||
};
|
||||
|
||||
&mmc0 {
|
||||
pinctrl-0 = <&mmc0_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
broken-cd;
|
||||
bus-width = <4>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-0 = <&uart0_pins_a>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "otg";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
65
board/funkey/readme.txt
Normal file
65
board/funkey/readme.txt
Normal file
@@ -0,0 +1,65 @@
|
||||
# FunKey
|
||||
|
||||
Intro
|
||||
=====
|
||||
|
||||
This directory contains a buildroot configuration for building a
|
||||
FunKey OS.
|
||||
|
||||
How to build it
|
||||
===============
|
||||
|
||||
Configure Buildroot
|
||||
-------------------
|
||||
|
||||
There is only one FunKey defconfig files in Buildroot:
|
||||
|
||||
$ make funkey_defconfig
|
||||
|
||||
Build the rootfs
|
||||
----------------
|
||||
|
||||
Note: you will need to have access to the network, since Buildroot
|
||||
will download the packages' sources.
|
||||
|
||||
You may now build your rootfs with:
|
||||
|
||||
$ make
|
||||
|
||||
(This may take a while, consider getting yourself a coffee ;-) )
|
||||
|
||||
Result of the build
|
||||
-------------------
|
||||
|
||||
After building, you should obtain this tree:
|
||||
|
||||
output/images/
|
||||
+-- boot.scr
|
||||
+-- boot.vfat
|
||||
+-- rootfs.ext2
|
||||
+-- rootfs.ext4 -> rootfs.ext2
|
||||
+-- rootfs.tar
|
||||
+-- sdcard.img
|
||||
+-- sun8i-v3s-funkey.dtb
|
||||
+-- u-boot.bin
|
||||
+-- u-boot-sunxi-with-spl.bin
|
||||
`-- zImage
|
||||
|
||||
How to write the SD card
|
||||
========================
|
||||
|
||||
Once the build process is finished you will have an image called
|
||||
"sdcard.img" in the output/images/ directory.
|
||||
|
||||
Copy the bootable "sdcard.img" onto an SD card with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
|
||||
Alternatively, you can use the Etcher graphical tool to burn the image
|
||||
to the SD card safely and on any platform:
|
||||
|
||||
https://etcher.io/
|
||||
|
||||
Once the SD card is burned, insert it into your FunKey board, and
|
||||
power it up. Your new system should come up now and start a console on
|
||||
the UART0 serial port.
|
||||
Reference in New Issue
Block a user