summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2022-07-10 18:15:13 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2023-02-26 02:01:46 -0500
commit1639d3e8b50b3345aa62a9d2918e1e07dd86751c (patch)
tree71fb119046b88ec7ed8e432b354149332c9be7ef
parent5b937d570528bfd90847e1e5d83bf60c6f4761dc (diff)
wip - linux-libre-64
-rw-r--r--libre/linux-libre-64/0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch107
-rw-r--r--libre/linux-libre-64/0003-fix-mvsdio-eMMC-timing.patch38
-rw-r--r--libre/linux-libre-64/0004-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch95
-rw-r--r--libre/linux-libre-64/0005-set-default-cubietruck-led-triggers.patch33
-rw-r--r--libre/linux-libre-64/0006-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch30
-rw-r--r--libre/linux-libre-64/0007-USB-Armory-MkII-support.patch561
6 files changed, 864 insertions, 0 deletions
diff --git a/libre/linux-libre-64/0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch b/libre/linux-libre-64/0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch
new file mode 100644
index 000000000..4d36e40fb
--- /dev/null
+++ b/libre/linux-libre-64/0002-HID-apple-Properly-handle-function-keys-on-Keychron-.patch
@@ -0,0 +1,107 @@
+From e410435c977a01e386fda83b5215540365a0086f Mon Sep 17 00:00:00 2001
+From: Bryan Cain <bryancain3@gmail.com>
+Date: Thu, 5 May 2022 13:12:21 -0600
+Subject: [PATCH 2/2] HID: apple: Properly handle function keys on Keychron
+ keyboards
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Keychron's C-series and K-series of keyboards copy the vendor and
+product IDs of an Apple keyboard, but only behave like that device when
+set to "Mac" mode. In "Windows" mode, the Fn key doesn't generate a
+scancode, so it's impossible to use the F1-F12 keys when fnmode is set
+to its default value of 1.
+
+To fix this, make fnmode default to the new value of 3, which behaves
+like fnmode=2 for Keychron keyboards and like fnmode=1 for actual Apple
+keyboards. This way, Keychron devices are fully usable in both "Windows"
+and "Mac" modes, while behavior is unchanged for everything else.
+
+Signed-off-by: Bryan Cain <bryancain3@gmail.com>
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Tested-by: José Expósito <jose.exposito89@gmail.com>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+---
+ drivers/hid/hid-apple.c | 22 ++++++++++++++++++----
+ 1 file changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
+index 0cf35caee9fa..42a568902f49 100644
+--- a/drivers/hid/hid-apple.c
++++ b/drivers/hid/hid-apple.c
+@@ -21,6 +21,7 @@
+ #include <linux/module.h>
+ #include <linux/slab.h>
+ #include <linux/timer.h>
++#include <linux/string.h>
+
+ #include "hid-ids.h"
+
+@@ -35,16 +36,17 @@
+ #define APPLE_NUMLOCK_EMULATION BIT(8)
+ #define APPLE_RDESC_BATTERY BIT(9)
+ #define APPLE_BACKLIGHT_CTL BIT(10)
++#define APPLE_IS_KEYCHRON BIT(11)
+
+ #define APPLE_FLAG_FKEY 0x01
+
+ #define HID_COUNTRY_INTERNATIONAL_ISO 13
+ #define APPLE_BATTERY_TIMEOUT_MS 60000
+
+-static unsigned int fnmode = 1;
++static unsigned int fnmode = 3;
+ module_param(fnmode, uint, 0644);
+ MODULE_PARM_DESC(fnmode, "Mode of fn key on Apple keyboards (0 = disabled, "
+- "[1] = fkeyslast, 2 = fkeysfirst)");
++ "1 = fkeyslast, 2 = fkeysfirst, [3] = auto)");
+
+ static int iso_layout = -1;
+ module_param(iso_layout, int, 0644);
+@@ -349,6 +351,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
+ const struct apple_key_translation *trans, *table;
+ bool do_translate;
+ u16 code = 0;
++ unsigned int real_fnmode;
+
+ u16 fn_keycode = (swap_fn_leftctrl) ? (KEY_LEFTCTRL) : (KEY_FN);
+
+@@ -359,7 +362,13 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
+ return 1;
+ }
+
+- if (fnmode) {
++ if (fnmode == 3) {
++ real_fnmode = (asc->quirks & APPLE_IS_KEYCHRON) ? 2 : 1;
++ } else {
++ real_fnmode = fnmode;
++ }
++
++ if (real_fnmode) {
+ if (hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI ||
+ hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO ||
+ hid->product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS ||
+@@ -406,7 +415,7 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
+
+ if (!code) {
+ if (trans->flags & APPLE_FLAG_FKEY) {
+- switch (fnmode) {
++ switch (real_fnmode) {
+ case 1:
+ do_translate = !asc->fn_on;
+ break;
+@@ -660,6 +669,11 @@ static int apple_input_configured(struct hid_device *hdev,
+ asc->quirks &= ~APPLE_HAS_FN;
+ }
+
++ if (strncmp(hdev->name, "Keychron", 8) == 0) {
++ hid_info(hdev, "Keychron keyboard detected; function keys will default to fnmode=2 behavior\n");
++ asc->quirks |= APPLE_IS_KEYCHRON;
++ }
++
+ return 0;
+ }
+
+--
+2.36.1
+
diff --git a/libre/linux-libre-64/0003-fix-mvsdio-eMMC-timing.patch b/libre/linux-libre-64/0003-fix-mvsdio-eMMC-timing.patch
new file mode 100644
index 000000000..a494c2d5c
--- /dev/null
+++ b/libre/linux-libre-64/0003-fix-mvsdio-eMMC-timing.patch
@@ -0,0 +1,38 @@
+From e8da1680d0273aaca806c23a10b4f3467a6b4f96 Mon Sep 17 00:00:00 2001
+From: Kevin Mihelich <kevin@archlinuxarm.org>
+Date: Fri, 5 Sep 2014 15:43:56 -0600
+Subject: [PATCH 3/7] fix mvsdio eMMC timing
+
+These changes from Globalscale change the MMC timing to allow the eMMC versions
+of the Mirabox and SMILE Plug to work.
+
+Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
+---
+ drivers/mmc/host/mvsdio.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
+index 629efbe639c4..c507c064736c 100644
+--- a/drivers/mmc/host/mvsdio.c
++++ b/drivers/mmc/host/mvsdio.c
+@@ -90,7 +90,7 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data)
+ tmout_index = fls(tmout - 1) - 12;
+ if (tmout_index < 0)
+ tmout_index = 0;
+- if (tmout_index > MVSD_HOST_CTRL_TMOUT_MAX)
++// if (tmout_index > MVSD_HOST_CTRL_TMOUT_MAX) //by steven, try to setup the timeout to maximum value
+ tmout_index = MVSD_HOST_CTRL_TMOUT_MAX;
+
+ dev_dbg(host->dev, "data %s at 0x%08x: blocks=%d blksz=%d tmout=%u (%d)\n",
+@@ -613,6 +613,8 @@ static void mvsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
+ u32 m = DIV_ROUND_UP(host->base_clock, ios->clock) - 1;
+ if (m > MVSD_BASE_DIV_MAX)
+ m = MVSD_BASE_DIV_MAX;
++ if(ios->clock==50000000 ) //by steven
++ m=1;
+ mvsd_write(MVSD_CLK_DIV, m);
+ host->clock = ios->clock;
+ host->ns_per_clk = 1000000000 / (host->base_clock / (m+1));
+--
+2.35.1
+
diff --git a/libre/linux-libre-64/0004-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch b/libre/linux-libre-64/0004-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch
new file mode 100644
index 000000000..fd99811bc
--- /dev/null
+++ b/libre/linux-libre-64/0004-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch
@@ -0,0 +1,95 @@
+From f0eaedee0904275b2ed55b383dba794d53fac17d Mon Sep 17 00:00:00 2001
+From: popcornmix <popcornmix@gmail.com>
+Date: Tue, 18 Feb 2014 01:43:50 -0300
+Subject: [PATCH 4/7] net/smsc95xx: Allow mac address to be set as a parameter
+
+---
+ drivers/net/usb/smsc95xx.c | 56 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 56 insertions(+)
+
+diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
+index bc1e3dd67c04..51ae8e6fec4e 100644
+--- a/drivers/net/usb/smsc95xx.c
++++ b/drivers/net/usb/smsc95xx.c
+@@ -50,6 +50,7 @@
+ #define SUSPEND_SUSPEND3 (0x08)
+ #define SUSPEND_ALLMODES (SUSPEND_SUSPEND0 | SUSPEND_SUSPEND1 | \
+ SUSPEND_SUSPEND2 | SUSPEND_SUSPEND3)
++#define MAC_ADDR_LEN (6)
+
+ struct smsc95xx_priv {
+ u32 mac_cr;
+@@ -67,6 +68,10 @@ static bool turbo_mode = true;
+ module_param(turbo_mode, bool, 0644);
+ MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction");
+
++static char *macaddr = ":";
++module_param(macaddr, charp, 0);
++MODULE_PARM_DESC(macaddr, "MAC address");
++
+ static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index,
+ u32 *data, int in_pm)
+ {
+@@ -753,8 +758,59 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
+ return phy_mii_ioctl(netdev->phydev, rq, cmd);
+ }
+
++/* Check the macaddr module parameter for a MAC address */
++static int smsc95xx_is_macaddr_param(struct usbnet *dev, u8 *dev_mac)
++{
++ int i, j, got_num, num;
++ u8 mtbl[MAC_ADDR_LEN];
++
++ if (macaddr[0] == ':')
++ return 0;
++
++ i = 0;
++ j = 0;
++ num = 0;
++ got_num = 0;
++ while (j < MAC_ADDR_LEN) {
++ if (macaddr[i] && macaddr[i] != ':') {
++ got_num++;
++ if ('0' <= macaddr[i] && macaddr[i] <= '9')
++ num = num * 16 + macaddr[i] - '0';
++ else if ('A' <= macaddr[i] && macaddr[i] <= 'F')
++ num = num * 16 + 10 + macaddr[i] - 'A';
++ else if ('a' <= macaddr[i] && macaddr[i] <= 'f')
++ num = num * 16 + 10 + macaddr[i] - 'a';
++ else
++ break;
++ i++;
++ } else if (got_num == 2) {
++ mtbl[j++] = (u8) num;
++ num = 0;
++ got_num = 0;
++ i++;
++ } else {
++ break;
++ }
++ }
++
++ if (j == MAC_ADDR_LEN) {
++ netif_dbg(dev, ifup, dev->net, "Overriding MAC address with: "
++ "%02x:%02x:%02x:%02x:%02x:%02x\n", mtbl[0], mtbl[1], mtbl[2],
++ mtbl[3], mtbl[4], mtbl[5]);
++ for (i = 0; i < MAC_ADDR_LEN; i++)
++ dev_mac[i] = mtbl[i];
++ return 1;
++ } else {
++ return 0;
++ }
++}
++
+ static void smsc95xx_init_mac_address(struct usbnet *dev)
+ {
++ /* Check module parameters */
++ if (smsc95xx_is_macaddr_param(dev, dev->net->dev_addr))
++ return;
++
+ u8 addr[ETH_ALEN];
+
+ /* maybe the boot loader passed the MAC address in devicetree */
+--
+2.35.1
+
diff --git a/libre/linux-libre-64/0005-set-default-cubietruck-led-triggers.patch b/libre/linux-libre-64/0005-set-default-cubietruck-led-triggers.patch
new file mode 100644
index 000000000..f09051572
--- /dev/null
+++ b/libre/linux-libre-64/0005-set-default-cubietruck-led-triggers.patch
@@ -0,0 +1,33 @@
+From 363e156344b831978306bf95dac7859dafe61d14 Mon Sep 17 00:00:00 2001
+From: Kevin Mihelich <kevin@archlinuxarm.org>
+Date: Sat, 14 Feb 2015 12:32:27 +0100
+Subject: [PATCH 5/7] set default cubietruck led triggers
+
+Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
+---
+ arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+index 52160e368304..21c8ef94c756 100644
+--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
++++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+@@ -78,6 +78,7 @@ leds {
+ led-0 {
+ label = "cubietruck:blue:usr";
+ gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
++ linux,default-trigger = "heartbeat";
+ };
+
+ led-1 {
+@@ -93,6 +94,7 @@ led-2 {
+ led-3 {
+ label = "cubietruck:green:usr";
+ gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;
++ linux,default-trigger = "mmc0";
+ };
+ };
+
+--
+2.35.1
+
diff --git a/libre/linux-libre-64/0006-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch b/libre/linux-libre-64/0006-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch
new file mode 100644
index 000000000..319015242
--- /dev/null
+++ b/libre/linux-libre-64/0006-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch
@@ -0,0 +1,30 @@
+From b4dcf8b9c59c451b667f7cc3f20e7fe837951517 Mon Sep 17 00:00:00 2001
+From: Kevin Mihelich <kevin@archlinuxarm.org>
+Date: Thu, 11 Aug 2016 00:42:37 -0600
+Subject: [PATCH 6/7] exynos4412-odroid: set higher minimum buck2 regulator
+ voltage
+
+Set a higher minimum voltage to help reboot issue.
+http://www.spinics.net/lists/linux-samsung-soc/msg54434.html
+
+Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
+---
+ arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+index 5b1d4591b35c..8a8d2c6add10 100644
+--- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
++++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
+@@ -436,7 +436,7 @@ buck1_reg: BUCK1 {
+
+ buck2_reg: BUCK2 {
+ regulator-name = "VDD_ARM";
+- regulator-min-microvolt = <900000>;
++ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1350000>;
+ regulator-always-on;
+ regulator-boot-on;
+--
+2.35.1
+
diff --git a/libre/linux-libre-64/0007-USB-Armory-MkII-support.patch b/libre/linux-libre-64/0007-USB-Armory-MkII-support.patch
new file mode 100644
index 000000000..711d50d6d
--- /dev/null
+++ b/libre/linux-libre-64/0007-USB-Armory-MkII-support.patch
@@ -0,0 +1,561 @@
+From 915405b2da517ee56a07e57230273ab2ff4e522d Mon Sep 17 00:00:00 2001
+From: Kevin Mihelich <kevin@archlinuxarm.org>
+Date: Sun, 11 Aug 2019 12:34:17 -0600
+Subject: [PATCH 7/7] USB Armory MkII support
+
+---
+ arch/arm/boot/dts/Makefile | 2 +
+ arch/arm/boot/dts/imx6ul-usbarmory.dts | 256 +++++++++++++++++++++++
+ arch/arm/boot/dts/imx6ull-usbarmory.dts | 257 ++++++++++++++++++++++++
+ 3 files changed, 515 insertions(+)
+ create mode 100644 arch/arm/boot/dts/imx6ul-usbarmory.dts
+ create mode 100644 arch/arm/boot/dts/imx6ull-usbarmory.dts
+
+diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
+index 235ad559acb2..ca79830160bd 100644
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -694,6 +694,7 @@ dtb-$(CONFIG_SOC_IMX6UL) += \
+ imx6ul-tx6ul-0010.dtb \
+ imx6ul-tx6ul-0011.dtb \
+ imx6ul-tx6ul-mainboard.dtb \
++ imx6ul-usbarmory.dtb \
+ imx6ull-14x14-evk.dtb \
+ imx6ull-colibri-emmc-eval-v3.dtb \
+ imx6ull-colibri-eval-v3.dtb \
+@@ -704,6 +705,7 @@ dtb-$(CONFIG_SOC_IMX6UL) += \
+ imx6ull-phytec-segin-ff-rdk-nand.dtb \
+ imx6ull-phytec-segin-ff-rdk-emmc.dtb \
+ imx6ull-phytec-segin-lc-rdk-nand.dtb \
++ imx6ull-usbarmory.dtb \
+ imx6ulz-14x14-evk.dtb \
+ imx6ulz-bsh-smm-m2.dtb
+ dtb-$(CONFIG_SOC_IMX7D) += \
+diff --git a/arch/arm/boot/dts/imx6ul-usbarmory.dts b/arch/arm/boot/dts/imx6ul-usbarmory.dts
+new file mode 100644
+index 000000000000..1fdcd6f611d5
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6ul-usbarmory.dts
+@@ -0,0 +1,256 @@
++/*
++ * USB armory Mk II device tree file
++ * https://github.com/inversepath/usbarmory
++ *
++ * Copyright (C) 2019, F-Secure Corporation
++ * Andrej Rosano <andrej.rosano@f-secure.com>
++ *
++ * 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 "imx6ul.dtsi"
++
++/ {
++ model = "F-Secure USB armory Mk II";
++ compatible = "inversepath,imx6ul-usbarmory-mkII", "fsl,imx6ul";
++
++ chosen {
++ stdout-path = &uart2;
++ };
++
++ memory {
++ device_type = "memory";
++ reg = <0x80000000 0x20000000>;
++ };
++
++ leds {
++ compatible = "gpio-leds";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_led>;
++
++ led-white {
++ label = "LED_WHITE";
++ gpios = <&gpio4 21 GPIO_ACTIVE_LOW>;
++ linux,default-trigger = "heartbeat";
++ };
++
++ led-blue {
++ label = "LED_BLUE";
++ gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
++ };
++ };
++
++ regulators {
++ compatible = "simple-bus";
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ reg_sd1_vmmc: sd1_regulator {
++ compatible = "regulator-fixed";
++ regulator-name = "VSD_3V3";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ };
++ };
++};
++
++&uart1 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_bluetooth>;
++ uart-has-rtscts;
++ status = "okay";
++};
++
++&uart2 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_uart2>;
++ status = "okay";
++};
++
++&usdhc1 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usdhc1>;
++ no-1-8-v;
++ keep-power-in-suspend;
++ wakeup-source;
++ status = "okay";
++};
++
++&usdhc2 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usdhc2>;
++ non-removable;
++ status = "okay";
++};
++
++&i2c1 {
++ pinctrl-0 = <&pinctrl_i2c1>;
++ status = "okay";
++};
++
++&iomuxc {
++ pinctrl_uart2: uart2grp {
++ fsl,pins = <
++ MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1
++ MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1
++ >;
++ };
++
++ pinctrl_bluetooth: uart1grp {
++ fsl,pins = <
++ MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b0 /* BT_UART_TX */
++ MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b0 /* BT_UART_RX */
++ MX6UL_PAD_UART1_CTS_B__UART1_DCE_CTS 0x1b0b0 /* BT_UART_CTS */
++ MX6UL_PAD_GPIO1_IO07__UART1_DCE_RTS 0x130b0 /* BT_UART_RTS */
++ MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x1f020 /* BT_UART_DSR */
++ MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25 0x10020 /* BT_UART_DTR */
++ MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x1f020 /* BT_SWDCLK */
++ MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x1f020 /* BT_SWDIO */
++ MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x1f020 /* BT_RESET */
++ MX6UL_PAD_UART3_RTS_B__GPIO1_IO27 0x1f020 /* BT_SWITCH_1 */
++ MX6UL_PAD_UART3_CTS_B__GPIO1_IO26 0x1f020 /* BT_SWITCH_2 */
++ >;
++ };
++
++ pinctrl_i2c1: i2c1grp {
++ fsl,pins = <
++ MX6UL_PAD_GPIO1_IO02__I2C1_SCL 0x4001b8b0
++ MX6UL_PAD_GPIO1_IO03__I2C1_SDA 0x4001b8b0
++ >;
++ };
++
++ pinctrl_led: ledgrp {
++ fsl,pins = <
++ MX6UL_PAD_CSI_DATA06__GPIO4_IO27 0x1f020
++ MX6UL_PAD_CSI_DATA07__GPIO4_IO28 0x1f020
++ >;
++ };
++
++ pinctrl_usdhc1: usdhc1grp {
++ fsl,pins = <
++ MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x1f019
++ MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x1f019
++ MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x1f019
++ MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x1f019
++ MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x1f019
++ MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x1f019
++ >;
++ };
++
++ pinctrl_usdhc2: usdhc2grp {
++ fsl,pins = <
++ MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x10071
++ MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x17059
++ MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059
++ MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059
++ MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059
++ MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059
++ MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059
++ MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059
++ MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059
++ MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059
++ >;
++ };
++};
++
++&aips2 {
++ crypto: crypto@2140000 {
++ compatible = "fsl,imx6ul-caam", "fsl,sec-v4.0";
++ #address-cells = <1>;
++ #size-cells = <1>;
++ reg = <0x2140000 0x3c000>;
++ ranges = <0 0x2140000 0x3c000>;
++ interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&clks IMX6UL_CLK_CAAM_IPG>, <&clks IMX6UL_CLK_CAAM_ACLK>,
++ <&clks IMX6UL_CLK_CAAM_MEM>;
++ clock-names = "ipg", "aclk", "mem";
++
++ sec_jr0: jr@1000 {
++ compatible = "fsl,sec-v4.0-job-ring";
++ reg = <0x1000 0x1000>;
++ interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
++ };
++
++ sec_jr1: jr@2000 {
++ compatible = "fsl,sec-v4.0-job-ring";
++ reg = <0x2000 0x1000>;
++ interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
++ };
++ sec_jr2: jr@3000 {
++ compatible = "fsl,sec-v4.0-job-ring";
++ reg = <0x3000 0x1000>;
++ interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
++ };
++ };
++};
++
++/ {
++ soc {
++ caam_sm: caam-sm@00100000 {
++ compatible = "fsl,imx7d-caam-sm", "fsl,imx6q-caam-sm";
++ reg = <0x00100000 0x3fff>;
++ };
++
++ irq_sec_vio: caam_secvio {
++ compatible = "fsl,imx7d-caam-secvio", "fsl,imx6q-caam-secvio";
++ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
++ };
++ };
++
++ caam_keyblob: caam-keyblob {
++ compatible = "fsl,sec-v4.0-keyblob";
++ status = "okay";
++ };
++};
++
++&usbotg1 {
++ dr_mode = "peripheral";
++ disable-over-current;
++ tpl-support;
++ status = "okay";
++};
++
++&usbotg2 {
++ dr_mode = "host";
++ disable-over-current;
++ tpl-support;
++ status = "okay";
++};
+diff --git a/arch/arm/boot/dts/imx6ull-usbarmory.dts b/arch/arm/boot/dts/imx6ull-usbarmory.dts
+new file mode 100644
+index 000000000000..f74d0296d5f6
+--- /dev/null
++++ b/arch/arm/boot/dts/imx6ull-usbarmory.dts
+@@ -0,0 +1,257 @@
++/*
++ * USB armory Mk II device tree file
++ * https://github.com/inversepath/usbarmory
++ *
++ * Copyright (C) 2019, F-Secure Corporation
++ * Andrej Rosano <andrej.rosano@f-secure.com>
++ *
++ * 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 "imx6ul.dtsi"
++
++/ {
++ model = "F-Secure USB armory Mk II";
++ compatible = "inversepath,imx6ull-usbarmory-mkII", "fsl,imx6ull";
++
++ chosen {
++ stdout-path = &uart2;
++ };
++
++ memory {
++ device_type = "memory";
++ reg = <0x80000000 0x20000000>;
++ };
++
++ leds {
++ compatible = "gpio-leds";
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_led>;
++
++ led-white {
++ label = "LED_WHITE";
++ gpios = <&gpio4 21 GPIO_ACTIVE_LOW>;
++ linux,default-trigger = "heartbeat";
++ };
++
++ led-blue {
++ label = "LED_BLUE";
++ gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
++ };
++ };
++
++ regulators {
++ compatible = "simple-bus";
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ reg_sd1_vmmc: sd1_regulator {
++ compatible = "regulator-fixed";
++ regulator-name = "VSD_3V3";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ };
++ };
++};
++
++/* Delete CAAM node in AIPS-2 (i.MX6UL specific) */
++/delete-node/ &crypto;
++
++&cpu0 {
++ operating-points = <
++ /* kHz uV */
++ 900000 1275000
++ 792000 1225000
++ 528000 1175000
++ 396000 1025000
++ 198000 950000
++ >;
++ fsl,soc-operating-points = <
++ /* KHz uV */
++ 900000 1250000
++ 792000 1175000
++ 528000 1175000
++ 396000 1175000
++ 198000 1175000
++ >;
++};
++
++&uart1 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_bluetooth>;
++ uart-has-rtscts;
++ status = "okay";
++};
++
++&uart2 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_uart2>;
++ status = "okay";
++};
++
++&usdhc1 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usdhc1>;
++ no-1-8-v;
++ keep-power-in-suspend;
++ wakeup-source;
++ status = "okay";
++};
++
++&usdhc2 {
++ pinctrl-names = "default";
++ pinctrl-0 = <&pinctrl_usdhc2>;
++ non-removable;
++ status = "okay";
++};
++
++&i2c1 {
++ pinctrl-0 = <&pinctrl_i2c1>;
++ status = "okay";
++};
++
++&iomuxc {
++ pinctrl_uart2: uart2grp {
++ fsl,pins = <
++ MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1
++ MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1
++ >;
++ };
++
++ pinctrl_bluetooth: uart1grp {
++ fsl,pins = <
++ MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b0 /* BT_UART_TX */
++ MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b0 /* BT_UART_RX */
++ MX6UL_PAD_UART1_CTS_B__UART1_DCE_CTS 0x1b0b0 /* BT_UART_CTS */
++ MX6UL_PAD_GPIO1_IO07__UART1_DCE_RTS 0x130b0 /* BT_UART_RTS */
++ MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x1f020 /* BT_UART_DSR */
++ MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25 0x10020 /* BT_UART_DTR */
++ MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x1f020 /* BT_SWDCLK */
++ MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x1f020 /* BT_SWDIO */
++ MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x1f020 /* BT_RESET */
++ MX6UL_PAD_UART3_RTS_B__GPIO1_IO27 0x1f020 /* BT_SWITCH_1 */
++ MX6UL_PAD_UART3_CTS_B__GPIO1_IO26 0x1f020 /* BT_SWITCH_2 */
++ >;
++ };
++
++ pinctrl_i2c1: i2c1grp {
++ fsl,pins = <
++ MX6UL_PAD_GPIO1_IO02__I2C1_SCL 0x4001b8b0
++ MX6UL_PAD_GPIO1_IO03__I2C1_SDA 0x4001b8b0
++ >;
++ };
++
++ pinctrl_led: ledgrp {
++ fsl,pins = <
++ MX6UL_PAD_CSI_DATA06__GPIO4_IO27 0x1f020
++ MX6UL_PAD_CSI_DATA07__GPIO4_IO28 0x1f020
++ >;
++ };
++
++ pinctrl_usdhc1: usdhc1grp {
++ fsl,pins = <
++ MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x1f019
++ MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x1f019
++ MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x1f019
++ MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x1f019
++ MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x1f019
++ MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x1f019
++ >;
++ };
++
++ pinctrl_usdhc2: usdhc2grp {
++ fsl,pins = <
++ MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x10071
++ MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x17059
++ MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059
++ MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059
++ MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059
++ MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059
++ MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059
++ MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059
++ MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059
++ MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059
++ >;
++ };
++};
++
++/ {
++ soc {
++ aips3: aips-bus@02200000 {
++ compatible = "fsl,aips-bus", "simple-bus";
++ #address-cells = <1>;
++ #size-cells = <1>;
++ reg = <0x02200000 0x100000>;
++ ranges;
++
++ dcp: dcp@02280000 {
++ compatible = "fsl,imx6ull-dcp", "fsl,imx6sl-dcp", "fsl,imx28-dcp";
++ reg = <0x02280000 0x4000>;
++ interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
++ <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
++ <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&clks IMX6ULL_CLK_DCP_CLK>;
++ clock-names = "dcp";
++ };
++
++ rngb: rngb@02284000 {
++ compatible = "fsl,imx6sl-rng", "fsl,imx25-rngb", "fsl,imx-rng", "imx-rng";
++ reg = <0x02284000 0x4000>;
++ interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
++ clocks = <&clks IMX6UL_CLK_DUMMY>;
++ };
++ };
++ };
++};
++
++&usbotg1 {
++ dr_mode = "peripheral";
++ disable-over-current;
++ tpl-support;
++ status = "okay";
++};
++
++&usbotg2 {
++ dr_mode = "host";
++ disable-over-current;
++ tpl-support;
++ status = "okay";
++};
+--
+2.35.1
+