diff --git a/Documentation/boards/asus/README.md b/Documentation/boards/asus/README.md index 5c5053495..9cb5f60be 100644 --- a/Documentation/boards/asus/README.md +++ b/Documentation/boards/asus/README.md @@ -5,16 +5,26 @@ | Device | Release Date | Support | Config | |----------------|---------------|---------|----------| | Tinker RK3288 | April 2017 | yes | [tinker](../../../buildroot-external/configs/tinker_defconfig) | -| Tinker S RK3288| January 2018 | yes? | [tinker](../../../buildroot-external/configs/tinker_defconfig)? | +| Tinker S RK3288| January 2018 | yes | [tinker](../../../buildroot-external/configs/tinker_defconfig) | | Tinker Edge T | November 2019 | no? | | | Tinker Edge R | November 2019 | no? | | -(? is the Tinker S supported?) - +eMMC support is provided with the same image. Just flash the image to the eMMC by connecting your Tinker Board S to your PC via Micro-USB. Refer to the Tinkerboard documentation how-to flash using Micro-USB and UMS. + +The Home Assistant OS provided U-Boot does support UMS as well, +however manual intervention is necessary: + + 1. Set the jumper between Micro-USB and HDMI the maskrom mode + 2. Insert SD card and connect the board via Micro-USB to your PC + 3. Continusly press Ctrl+C to interrupt boot + 4. Set the jumper back to the park position + 5. Start UMS using: +``` +ums 0 mmc 0 +``` + 6. A mass storage device should appear. Flash Home Assistant OS to it. ## Serial console diff --git a/Documentation/kernel.md b/Documentation/kernel.md index ed492ec62..96b6f50a2 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -5,14 +5,14 @@ Default Kernel tree: 5.4 | Board | Version | |-------|---------| -| Open Virtual Appliance | 5.4.56 | +| Open Virtual Appliance | 5.4.63 | | Raspberry Pi | 4.19.127 | | Raspberry Pi 0-W | 4.19.127 | | Raspberry Pi 2 | 4.19.127 | | Raspberry Pi 3 | 4.19.127 | | Raspberry Pi 4 | 4.19.127 | -| Tinker Board | 5.4.56 | -| Odroid-C2 | 5.7.13 | -| Odroid-N2 | 5.7.13 | -| Odroid-XU4 | 5.7.13 | -| Intel NUC | 5.4.56 | +| Tinker Board | 5.4.63 | +| Odroid-C2 | 5.7.19 | +| Odroid-N2 | 5.7.19 | +| Odroid-XU4 | 5.7.19 | +| Intel NUC | 5.4.63 | diff --git a/Documentation/network.md b/Documentation/network.md index 8afe08b3d..7c1f101f4 100644 --- a/Documentation/network.md +++ b/Documentation/network.md @@ -1,6 +1,6 @@ # Network -HassOS uses NetworkManager to control the host network. +Home Assistant Operating System uses NetworkManager to control the host network. ## Configure network diff --git a/Makefile b/Makefile index 32a691a47..4aabfb2d1 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,13 @@ DEFCONFIG_DIR = $(BUILDROOT_EXTERNAL)/configs TARGETS := $(notdir $(patsubst %_defconfig,%,$(wildcard $(DEFCONFIG_DIR)/*_defconfig))) TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFIG_DIR)/*_defconfig))) +# Set O variable if not already done on the command line +ifneq ("$(origin O)", "command line") +O := $(BUILDROOT)/output +else +override O := $(BUILDROOT)/$(O) +endif + .NOTPARALLEL: $(TARGETS) $(TARGETS_CONFIG) all .PHONY: $(TARGETS) $(TARGETS_CONFIG) all clean help @@ -23,7 +30,7 @@ $(TARGETS_CONFIG): %-config: $(TARGETS): %: $(RELEASE_DIR) %-config @echo "build $@" $(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) - cp -f $(BUILDROOT)/output/images/hassos_* $(RELEASE_DIR)/ + cp -f $(O)/images/hassos_* $(RELEASE_DIR)/ # Do not clean when building for one target ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1) diff --git a/buildroot-external/board/asus/hassos-hook.sh b/buildroot-external/board/asus/hassos-hook.sh index 9582e5474..b456d6e74 100755 --- a/buildroot-external/board/asus/hassos-hook.sh +++ b/buildroot-external/board/asus/hassos-hook.sh @@ -7,20 +7,16 @@ function hassos_pre_image() { cp -t "${BOOT_DATA}" \ "${BINARIES_DIR}/boot.scr" \ - "${BINARIES_DIR}/rk3288-tinker.dtb" + "${BINARIES_DIR}/rk3288-tinker.dtb" \ + "${BINARIES_DIR}/rk3288-tinker-s.dtb" echo "console=tty1" > "${BOOT_DATA}/cmdline.txt" - # Create boot binary - rm -f "${BINARIES_DIR}/idbloader.img" - mkimage -n rk3288 -T rksd -d "${BINARIES_DIR}/u-boot-tpl.bin" "${BINARIES_DIR}/idbloader.img" - cat "${BINARIES_DIR}/u-boot-spl.bin" >> "${BINARIES_DIR}/idbloader.img" - # SPL create_spl_image dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64 - dd if="${BINARIES_DIR}/u-boot-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=12288 + dd if="${BINARIES_DIR}/u-boot-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=8192 } diff --git a/buildroot-external/board/asus/tinker/patches/linux/1014-ARM-DTS-rk3288-tinker-Setup-the-Bluetooth-UART-pins.patch b/buildroot-external/board/asus/tinker/patches/linux/0001-ARM-DTS-rk3288-tinker-Setup-the-Bluetooth-UART-pins.patch similarity index 67% rename from buildroot-external/board/asus/tinker/patches/linux/1014-ARM-DTS-rk3288-tinker-Setup-the-Bluetooth-UART-pins.patch rename to buildroot-external/board/asus/tinker/patches/linux/0001-ARM-DTS-rk3288-tinker-Setup-the-Bluetooth-UART-pins.patch index 304936c64..4ae48c98e 100644 --- a/buildroot-external/board/asus/tinker/patches/linux/1014-ARM-DTS-rk3288-tinker-Setup-the-Bluetooth-UART-pins.patch +++ b/buildroot-external/board/asus/tinker/patches/linux/0001-ARM-DTS-rk3288-tinker-Setup-the-Bluetooth-UART-pins.patch @@ -1,7 +1,8 @@ -From 2c2e60256f2cbb2fce50a6317f85b1500efd1a6c Mon Sep 17 00:00:00 2001 +From 2ae3821fd824560ef2db3c87cfbec985177911f6 Mon Sep 17 00:00:00 2001 +Message-Id: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599249626.git.stefan@agner.ch> From: "Miouyouyou (Myy)" Date: Mon, 5 Nov 2018 22:03:26 +0100 -Subject: [PATCH] ARM: DTS: rk3288-tinker: Setup the Bluetooth UART pins +Subject: [PATCH 1/2] ARM: DTS: rk3288-tinker: Setup the Bluetooth UART pins The most essential being the RTS pin, which is clearly needed to upload the initial configuration into the Realtek Bluetooth @@ -39,24 +40,25 @@ echo 1 > value && sleep 1 Signed-off-by: Miouyouyou (Myy) +[move change to rk3288-tinker.dtsi] +Signed-off-by: Stefan Agner --- - arch/arm/boot/dts/rk3288-tinker.dts | 6 ++++++ - 1 file changed, 6 insertions(+) + arch/arm/boot/dts/rk3288-tinker.dtsi | 2 ++ + 1 file changed, 2 insertions(+) -diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts -index d4df13bed..b92e59c1e 100644 ---- a/arch/arm/boot/dts/rk3288-tinker.dts -+++ b/arch/arm/boot/dts/rk3288-tinker.dts -@@ -73,3 +73,9 @@ - status = "okay"; - supports-sdio; +diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi +index acfaa12ec239..284e7982925d 100644 +--- a/arch/arm/boot/dts/rk3288-tinker.dtsi ++++ b/arch/arm/boot/dts/rk3288-tinker.dtsi +@@ -492,6 +492,8 @@ &tsadc { }; -+ -+&uart0 { + + &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; -+}; -+ + status = "okay"; + }; + -- -2.16.4 +2.28.0 diff --git a/buildroot-external/board/asus/tinker/patches/linux/0002-ARM-DTS-rk3288-tinker-Defining-the-SPI-interface.patch b/buildroot-external/board/asus/tinker/patches/linux/0002-ARM-DTS-rk3288-tinker-Defining-the-SPI-interface.patch new file mode 100644 index 000000000..11fe26d07 --- /dev/null +++ b/buildroot-external/board/asus/tinker/patches/linux/0002-ARM-DTS-rk3288-tinker-Defining-the-SPI-interface.patch @@ -0,0 +1,55 @@ +From fc25c993bf2feb6e66d55bf03eb725ec688e47eb Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch> +References: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch> +From: "Miouyouyou (Myy)" +Date: Mon, 5 Nov 2018 22:15:14 +0100 +Subject: [PATCH 2/3] ARM: DTS: rk3288-tinker: Defining the SPI interface + +Taken from, and tested by @TonyMac32 . + +Well, the original one was tested by him but I had to adapt the +registers definitions to the new 64-bits LPAE-compliant syntax. + +Therefore that *might* break, along with a few other patches. + +Signed-off-by: Miouyouyou (Myy) +[move change to rk3288-tinker.dtsi] +Signed-off-by: Stefan Agner +--- + arch/arm/boot/dts/rk3288-tinker.dtsi | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi +index 284e7982925d..d6cc66ab5bb1 100644 +--- a/arch/arm/boot/dts/rk3288-tinker.dtsi ++++ b/arch/arm/boot/dts/rk3288-tinker.dtsi +@@ -485,6 +485,25 @@ &sdio0 { + status = "okay"; + }; + ++&spi2 { ++ max-freq = <50000000>; ++ status = "okay"; ++ ++ spidev@0 { ++ compatible = "rockchip,spi_tinker"; ++ reg = <0x0 0>; ++ spi-max-frequency = <50000000>; ++ spi-cpha = <1>; ++ }; ++ ++ spidev@1 { ++ compatible = "rockchip,spi_tinker"; ++ reg = <0x1>; ++ spi-max-frequency = <50000000>; ++ spi-cpha = <1>; ++ }; ++}; ++ + &tsadc { + rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */ +-- +2.28.0 + diff --git a/buildroot-external/board/asus/tinker/patches/linux/0003-ARM-dts-rockchip-enable-I2C1-4-on-rk3288-tinker.patch b/buildroot-external/board/asus/tinker/patches/linux/0003-ARM-dts-rockchip-enable-I2C1-4-on-rk3288-tinker.patch new file mode 100644 index 000000000..d0e49cecc --- /dev/null +++ b/buildroot-external/board/asus/tinker/patches/linux/0003-ARM-dts-rockchip-enable-I2C1-4-on-rk3288-tinker.patch @@ -0,0 +1,41 @@ +From 3a9d71847ae869ffdb2b0818aa86a36d57d96331 Mon Sep 17 00:00:00 2001 +Message-Id: <3a9d71847ae869ffdb2b0818aa86a36d57d96331.1599250914.git.stefan@agner.ch> +In-Reply-To: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch> +References: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch> +From: Stefan Agner +Date: Fri, 4 Sep 2020 21:57:55 +0200 +Subject: [PATCH 3/3] ARM: dts: rockchip: enable I2C1/4 on rk3288-tinker + +Enable I2C devices which are accessible via 40-pin header. + +Signed-off-by: Stefan Agner +--- + arch/arm/boot/dts/rk3288-tinker.dtsi | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi +index d6cc66ab5bb1..7af5818ac77c 100644 +--- a/arch/arm/boot/dts/rk3288-tinker.dtsi ++++ b/arch/arm/boot/dts/rk3288-tinker.dtsi +@@ -344,10 +344,18 @@ regulator-state-mem { + }; + }; + ++&i2c1 { ++ status = "okay"; ++}; ++ + &i2c2 { + status = "okay"; + }; + ++&i2c4 { ++ status = "okay"; ++}; ++ + &i2c5 { + status = "okay"; + }; +-- +2.28.0 + diff --git a/buildroot-external/board/asus/tinker/patches/linux/1-2-regulator-act8865-add-restart-handler-for-act8846.patch b/buildroot-external/board/asus/tinker/patches/linux/1-2-regulator-act8865-add-restart-handler-for-act8846.patch deleted file mode 100644 index e1ca78624..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/1-2-regulator-act8865-add-restart-handler-for-act8846.patch +++ /dev/null @@ -1,74 +0,0 @@ -Patches act8846 regulator providing the proper reset handle and exploit -the SIPC bit in GLB_POWER_OFF register. Mainly used to reset some rockchip -boards. - -Origin: - -diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c -index 2ff73d7..836d10b 100644 ---- a/drivers/regulator/act8865-regulator.c -+++ b/drivers/regulator/act8865-regulator.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include - - /* - * ACT8600 Global Register Map. -@@ -133,6 +134,8 @@ - #define ACT8865_VOLTAGE_NUM 64 - #define ACT8600_SUDCDC_VOLTAGE_NUM 255 - -+#define ACT8846_SIPC_MASK 0x01 -+ - struct act8865 { - struct regmap *regmap; - int off_reg; -@@ -402,6 +405,22 @@ static void act8865_power_off(void) - while (1); - } - -+static int act8846_power_cycle(struct notifier_block *this, -+ unsigned long code, void *unused) -+{ -+ struct act8865 *act8846; -+ -+ act8846 = i2c_get_clientdata(act8865_i2c_client); -+ regmap_write(act8846->regmap, ACT8846_GLB_OFF_CTRL, ACT8846_SIPC_MASK); -+ -+ return NOTIFY_DONE; -+} -+ -+static struct notifier_block act8846_restart_handler = { -+ .notifier_call = act8846_power_cycle, -+ .priority = 129, -+}; -+ - static int act8865_pmic_probe(struct i2c_client *client, - const struct i2c_device_id *i2c_id) - { -@@ -484,6 +503,8 @@ static int act8865_pmic_probe(struct i2c_client *client, - } - - if (of_device_is_system_power_controller(dev->of_node)) { -+ int ret; -+ - if (!pm_power_off && (off_reg > 0)) { - act8865_i2c_client = client; - act8865->off_reg = off_reg; -@@ -492,6 +513,14 @@ static int act8865_pmic_probe(struct i2c_client *client, - } else { - dev_err(dev, "Failed to set poweroff capability, already defined\n"); - } -+ -+ if (type == ACT8846) { -+ act8865_i2c_client = client; -+ ret = register_restart_handler(&act8846_restart_handler); -+ if (ret) -+ pr_err("%s: cannot register restart handler, %d\n", -+ __func__, ret); -+ } - } - - /* Finally register devices */ diff --git a/buildroot-external/board/asus/tinker/patches/linux/1001-dts-rk3288-miqi-Enabling-the-Mali-GPU-node.patch b/buildroot-external/board/asus/tinker/patches/linux/1001-dts-rk3288-miqi-Enabling-the-Mali-GPU-node.patch deleted file mode 100644 index 937245275..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/1001-dts-rk3288-miqi-Enabling-the-Mali-GPU-node.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 604ea7fc311af2b3a41e7fe3b4fbde0ee03dfb9c Mon Sep 17 00:00:00 2001 -From: Myy Miouyouyou -Date: Thu, 19 Oct 2017 21:09:50 +0200 -Subject: [PATCH 04/28] dts: rk3288: miqi: Enabling the Mali GPU node - -Why is the MiQi the only one left without a working mali GPU node ? - -Seriously, is there a rk3288 chipset WITHOUT a mali GPU ? Couldn't -they enable it once in the DTSI, instead of defining it as "disabled" -and enabling it in every DTS file ? - -Signed-off-by: Myy Miouyouyou ---- - arch/arm/boot/dts/rk3288-miqi.dts | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts -index 4d923aa6..3cd60674 100644 ---- a/arch/arm/boot/dts/rk3288-miqi.dts -+++ b/arch/arm/boot/dts/rk3288-miqi.dts -@@ -149,6 +149,11 @@ - status = "ok"; - }; - -+&gpu { -+ mali-supply = <&vdd_gpu>; -+ status = "okay"; -+}; -+ - &hdmi { - ddc-i2c-bus = <&i2c5>; - status = "okay"; --- -2.11.0 - diff --git a/buildroot-external/board/asus/tinker/patches/linux/1002-ARM-dts-rockchip-fix-the-regulator-s-voltage-range-o.patch b/buildroot-external/board/asus/tinker/patches/linux/1002-ARM-dts-rockchip-fix-the-regulator-s-voltage-range-o.patch deleted file mode 100644 index 1ce526d67..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/1002-ARM-dts-rockchip-fix-the-regulator-s-voltage-range-o.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 89e5763110ca77d68a4be00cd97a638adc2401d5 Mon Sep 17 00:00:00 2001 -From: Willy Tarreau -Date: Tue, 2 Aug 2016 08:31:00 +0200 -Subject: [PATCH 05/28] ARM: dts: rockchip: fix the regulator's voltage range - on MiQi board - -The board declared too narrow a voltage range for the CPU and GPU -regulators, preventing it from using the full CPU frequency range. -The regulators support 712500 to 1500000 microvolts. - -Signed-off-by: Willy Tarreau -(cherry picked from commit 95330e63a9295a2632cee8cce5db80677f01857a) ---- - arch/arm/boot/dts/rk3288-miqi.dts | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts -index 3cd60674..a1c3cdaa 100644 ---- a/arch/arm/boot/dts/rk3288-miqi.dts -+++ b/arch/arm/boot/dts/rk3288-miqi.dts -@@ -168,8 +168,8 @@ - fcs,suspend-voltage-selector = <1>; - reg = <0x40>; - regulator-name = "vdd_cpu"; -- regulator-min-microvolt = <850000>; -- regulator-max-microvolt = <1350000>; -+ regulator-min-microvolt = <712500>; -+ regulator-max-microvolt = <1500000>; - regulator-always-on; - regulator-boot-on; - regulator-enable-ramp-delay = <300>; -@@ -182,8 +182,8 @@ - fcs,suspend-voltage-selector = <1>; - reg = <0x41>; - regulator-name = "vdd_gpu"; -- regulator-min-microvolt = <850000>; -- regulator-max-microvolt = <1350000>; -+ regulator-min-microvolt = <712500>; -+ regulator-max-microvolt = <1500000>; - regulator-always-on; - vin-supply = <&vcc_sys>; - }; --- -2.11.0 - diff --git a/buildroot-external/board/asus/tinker/patches/linux/1003-ARM-dts-rockchip-add-the-MiQi-board-s-fan-definition.patch b/buildroot-external/board/asus/tinker/patches/linux/1003-ARM-dts-rockchip-add-the-MiQi-board-s-fan-definition.patch deleted file mode 100644 index 771a45ef4..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/1003-ARM-dts-rockchip-add-the-MiQi-board-s-fan-definition.patch +++ /dev/null @@ -1,46 +0,0 @@ -From c27e445527e949f3ef46d5326066196969c17d23 Mon Sep 17 00:00:00 2001 -From: Myy -Date: Sun, 12 Mar 2017 19:43:15 +0000 -Subject: [PATCH 06/28] ARM: dts: rockchip: add the MiQi board's fan definition - -The MiQi board is sold with an enclosure in which a fan is connected -to the second LED output, and configured by default in "heartbeat" -mode so that it rotates slowly and increases when the CPU load -increases, ensuring appropriate cooling by default. This LED output -is called "Fan" in the original kernel and connected to GPIO18 -(gpiochip 0, pin 18). Here we called it "miqi:green:fan" to stay -consistent with the kernel's naming conventions. - -It's worth noting that without this patch the fan doesn't work at -all, risking to make the board overheat. - -Fixes: 162718c (v4.7) -Cc: Heiko Stuebner -Signed-off-by: Willy Tarreau - -Signed-off-by: Myy ---- - arch/arm/boot/dts/rk3288-miqi.dts | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/arch/arm/boot/dts/rk3288-miqi.dts b/arch/arm/boot/dts/rk3288-miqi.dts -index a1c3cdaa..0e383595 100644 ---- a/arch/arm/boot/dts/rk3288-miqi.dts -+++ b/arch/arm/boot/dts/rk3288-miqi.dts -@@ -67,6 +67,13 @@ - leds { - compatible = "gpio-leds"; - -+ fan { -+ gpios = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>; -+ label = "miqi:green:fan"; -+ linux,default-trigger = "heartbeat"; -+ }; -+ -+ - work { - gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>; - label = "miqi:green:user"; --- -2.11.0 - diff --git a/buildroot-external/board/asus/tinker/patches/linux/1013-ARM-DTS-rk3288-tinker-Enabling-SDIO-and-Wifi.patch b/buildroot-external/board/asus/tinker/patches/linux/1013-ARM-DTS-rk3288-tinker-Enabling-SDIO-and-Wifi.patch deleted file mode 100644 index 18b6c9c0d..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/1013-ARM-DTS-rk3288-tinker-Enabling-SDIO-and-Wifi.patch +++ /dev/null @@ -1,98 +0,0 @@ -From d5d5c53173c484a13cda62a537cbf75a5df4b0e4 Mon Sep 17 00:00:00 2001 -From: "Miouyouyou (Myy)" -Date: Mon, 5 Nov 2018 21:58:56 +0100 -Subject: [PATCH] ARM: DTS: rk3288-tinker: Enabling SDIO and Wifi - -Adding the appropriate nodes in order to exploit the WiFi capabilities -of the board. -Since these capabilities are provided through SDIO, and the SDIO -nodes were not defined, these were added too. - -These seems to depend on each other so they are added in one big -patch. - -Split if necessary. - -Signed-off-by: Miouyouyou (Myy) ---- - arch/arm/boot/dts/rk3288-tinker.dts | 62 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 62 insertions(+) - -diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts -index 1e43527aa..d4df13bed 100644 ---- a/arch/arm/boot/dts/rk3288-tinker.dts -+++ b/arch/arm/boot/dts/rk3288-tinker.dts -@@ -6,8 +6,70 @@ - /dts-v1/; - - #include "rk3288-tinker.dtsi" -+#include - - / { - model = "Rockchip RK3288 Asus Tinker Board"; - compatible = "asus,rk3288-tinker", "rockchip,rk3288"; -+ -+ /* This is essential to get SDIO devices working. -+ The Wifi depends on SDIO ! */ -+ sdio_pwrseq: sdio-pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ clocks = <&rk808 RK808_CLKOUT1>; -+ clock-names = "ext_clock"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&chip_enable_h>, <&wifi_enable_h>; -+ -+ /* -+ * On the module itself this is one of these (depending -+ * on the actual card populated): -+ * - SDIO_RESET_L_WL_REG_ON -+ * - PDN (power down when low) -+ */ -+ reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>, <&gpio4 27 GPIO_ACTIVE_LOW>; -+ }; -+ -+ wireless-wlan { -+ compatible = "wlan-platdata"; -+ rockchip,grf = <&grf>; -+ sdio_vref = <1800>; -+ status = "okay"; -+ wifi_chip_type = "8723bs"; -+ WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>; -+ }; -+}; -+ -+&io_domains { -+ wifi-supply = <&vcc_18>; -+}; -+ -+&pinctrl { -+ sdio-pwrseq { -+ wifi_enable_h: wifienable-h { -+ rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ chip_enable_h: chip-enable-h { -+ rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+}; -+ -+&sdio0 { -+ bus-width = <4>; -+ cap-sd-highspeed; -+ cap-sdio-irq; -+ clock-frequency = <50000000>; -+ clock-freq-min-max = <200000 50000000>; -+ disable-wp; -+ keep-power-in-suspend; -+ mmc-pwrseq = <&sdio_pwrseq>; -+ non-removable; -+ num-slots = <1>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; -+ sd-uhs-sdr104; -+ status = "okay"; -+ supports-sdio; - }; --- -2.16.4 - diff --git a/buildroot-external/board/asus/tinker/patches/linux/1017-ARM-DTS-rk3288-tinker-Defined-the-I2C-interfaces.patch b/buildroot-external/board/asus/tinker/patches/linux/1017-ARM-DTS-rk3288-tinker-Defined-the-I2C-interfaces.patch deleted file mode 100644 index b6d5ab7f6..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/1017-ARM-DTS-rk3288-tinker-Defined-the-I2C-interfaces.patch +++ /dev/null @@ -1,53 +0,0 @@ -From a72e0749acad92df7b854e38e97e1dc7b4799abe Mon Sep 17 00:00:00 2001 -From: "Miouyouyou (Myy)" -Date: Mon, 5 Nov 2018 22:11:24 +0100 -Subject: [PATCH] ARM: DTS: rk3288-tinker: Defined the I2C interfaces - -And all the hardware behind. - -Taken from @TonyMac32, Butchered by @Miouyouyou . - -Signed-off-by: Miouyouyou (Myy) ---- - arch/arm/boot/dts/rk3288-tinker.dts | 25 +++++++++++++++++++++++++ - 1 file changed, 25 insertions(+) - -diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts -index b92e59c1e..96d05fc6b 100644 ---- a/arch/arm/boot/dts/rk3288-tinker.dts -+++ b/arch/arm/boot/dts/rk3288-tinker.dts -@@ -40,6 +40,31 @@ - }; - }; - -+&i2c1 { -+ status = "okay"; -+}; -+ -+&i2c2 { -+ afc0:af-controller@0 { -+ status = "okay"; -+ compatible = "silicon touch,vm149C-v4l2-i2c-subdev"; -+ reg = <0x0 0x0c>; -+ }; -+ -+ eeprom:m24c08@50 { -+ compatible = "at,24c08"; -+ reg = <0x50>; -+ }; -+}; -+ -+&i2c3 { -+ status = "okay"; -+}; -+ -+&i2c4 { -+ status = "okay"; -+}; -+ - &io_domains { - wifi-supply = <&vcc_18>; - }; --- -2.16.4 - diff --git a/buildroot-external/board/asus/tinker/patches/linux/1018-ARM-DTS-rk3288-tinker-Defining-the-SPI-interface.patch b/buildroot-external/board/asus/tinker/patches/linux/1018-ARM-DTS-rk3288-tinker-Defining-the-SPI-interface.patch deleted file mode 100644 index 980b0a5e9..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/1018-ARM-DTS-rk3288-tinker-Defining-the-SPI-interface.patch +++ /dev/null @@ -1,50 +0,0 @@ -From b24b8f83e150811ad54ee2a4843e44cd1421fafa Mon Sep 17 00:00:00 2001 -From: "Miouyouyou (Myy)" -Date: Mon, 5 Nov 2018 22:15:14 +0100 -Subject: [PATCH] ARM: DTS: rk3288-tinker: Defining the SPI interface - -Taken from, and tested by @TonyMac32 . - -Well, the original one was tested by him but I had to adapt the -registers definitions to the new 64-bits LPAE-compliant syntax. - -Therefore that *might* break, along with a few other patches. - -Signed-off-by: Miouyouyou (Myy) ---- - arch/arm/boot/dts/rk3288-tinker.dts | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts -index 96d05fc6b..17bfea298 100644 ---- a/arch/arm/boot/dts/rk3288-tinker.dts -+++ b/arch/arm/boot/dts/rk3288-tinker.dts -@@ -99,6 +99,25 @@ - supports-sdio; - }; - -+&spi2 { -+ max-freq = <50000000>; -+ status = "okay"; -+ -+ spidev@0 { -+ compatible = "rockchip,spi_tinker"; -+ reg = <0x0 0>; -+ spi-max-frequency = <50000000>; -+ spi-cpha = <1>; -+ }; -+ -+ spidev@1 { -+ compatible = "rockchip,spi_tinker"; -+ reg = <0x1>; -+ spi-max-frequency = <50000000>; -+ spi-cpha = <1>; -+ }; -+}; -+ - &uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; --- -2.16.4 - diff --git a/buildroot-external/board/asus/tinker/patches/linux/1024-arm-dts-veyron-Added-a-flag-to-disable-cache-flush-d.patch b/buildroot-external/board/asus/tinker/patches/linux/1024-arm-dts-veyron-Added-a-flag-to-disable-cache-flush-d.patch deleted file mode 100644 index 31f37e42f..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/1024-arm-dts-veyron-Added-a-flag-to-disable-cache-flush-d.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 9177b30ab083dbda2bede3b3d61ef71ad4b1ffe0 Mon Sep 17 00:00:00 2001 -From: "Miouyouyou (Myy)" -Date: Thu, 1 Nov 2018 21:31:26 +0100 -Subject: [PATCH 2/2] arm: dts: veyron: Added a flag to disable cache flush - during reset - -Flushing the MMC cache of ASUS Chromebooks during initialization or -"recovery" generates 10 minutes hangup, according to @SolidHal. - -This is an adaptation of @SolidHal, in order to pinpoint the fix to -Veyron Chromebooks, and avoiding issues other RK3288 boards. - -Signed-off-by: Miouyouyou (Myy) ---- - arch/arm/boot/dts/rk3288-veyron.dtsi | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/boot/dts/rk3288-veyron.dtsi b/arch/arm/boot/dts/rk3288-veyron.dtsi -index 2075120cf..fa4951fd7 100644 ---- a/arch/arm/boot/dts/rk3288-veyron.dtsi -+++ b/arch/arm/boot/dts/rk3288-veyron.dtsi -@@ -123,6 +123,7 @@ - mmc-hs200-1_8v; - mmc-pwrseq = <&emmc_pwrseq>; - non-removable; -+ no-recovery-cache-flush; - pinctrl-names = "default"; - pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>; - }; --- -2.16.4 - diff --git a/buildroot-external/board/asus/tinker/patches/linux/board-tinkerboard-enable-emmc-support.patch b/buildroot-external/board/asus/tinker/patches/linux/board-tinkerboard-enable-emmc-support.patch deleted file mode 100644 index d9e10ccb9..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/board-tinkerboard-enable-emmc-support.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi -index f88c913ff..7f04ccbdf 100644 ---- a/arch/arm/boot/dts/rk3288-tinker.dtsi -+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi -@@ -547,3 +547,20 @@ - &gpiomem { - status = "okay"; - }; -+ -+&emmc { -+ bus-width = <8>; -+ cap-mmc-highspeed; -+ non-removable; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; -+ max-frequency = <150000000>; -+ mmc-hs200-1_8v; -+ mmc-ddr-1_8v; -+ status = "okay"; -+}; -+ -+&hdmi { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&hdmi_cec_c0>; -+}; diff --git a/buildroot-external/board/asus/tinker/patches/linux/xt-q8l-v10-add-device-tree.patch b/buildroot-external/board/asus/tinker/patches/linux/xt-q8l-v10-add-device-tree.patch deleted file mode 100644 index d60aeb7f0..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/xt-q8l-v10-add-device-tree.patch +++ /dev/null @@ -1,1067 +0,0 @@ -diff --git a/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts b/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts -new file mode 100644 -index 000000000..539e445b4 ---- /dev/null -+++ b/arch/arm/boot/dts/rk3288-xt-q8l-v10.dts -@@ -0,0 +1,1061 @@ -+/* -+ * Copyright (c) 2014, 2015 FUKAUMI Naoki -+ * 2018 Paolo Sabatino -+ * -+ * 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 "rk3288.dtsi" -+#include -+ -+/ { -+ model = "XT-Q8L-V10-RK3288"; -+ compatible = "generic,xt-q8l-v10-rk3288", "rockchip,rk3288"; -+ -+ memory@0 { -+ reg = <0x0 0x0 0x0 0x80000000>; -+ device_type = "memory"; -+ }; -+ -+ /* -+ * Peripheral from original q8 device tree, currently no references -+ * for drivers in linux kernel. -+ rockchip-hsadc@ff080000 { -+ compatible = "rockchip-hsadc"; -+ reg = <0xff080000 0x4000>; -+ interrupts = <0x0 0x1f 0x4>; -+ #address-cells = <0x1>; -+ #size-cells = <0x0>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <0x9a>; -+ clocks = <0x79 0x7 0x8 0x39>; -+ clock-names = "hclk_hsadc", "clk_hsadc_out", "clk_hsadc_ext"; -+ dmas = <0x9b 0x0>; -+ dma-names = "data"; -+ status = "disabled"; -+ }; -+ */ -+ -+ ext_gmac: external-gmac-clock { -+ compatible = "fixed-clock"; -+ #clock-cells = <0>; -+ clock-frequency = <125000000>; -+ clock-output-names = "ext_gmac"; -+ }; -+ -+ /* -+ * Handle the IR receiver using the gpio-ir-receiver kernel module. -+ * This works flawlessy, the original xt-q8l-v10 remote uses a NEC -+ * protocol and the keymap rc-xt-q8l-v10 has to be compiled in the -+ * kernel for the remote to work as an input device -+ */ -+ ir: ir-receiver { -+ compatible = "gpio-ir-receiver"; -+ gpios = <&gpio7 RK_PA0 GPIO_ACTIVE_LOW>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&ir_int>; -+ linux,rc-map-name = "rc-xt-q8l-v10"; -+ wakeup-source; -+ }; -+ -+ keys: gpio-keys { -+ compatible = "gpio-keys"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pwr_key>; -+ -+ button@0 { -+ gpio-key,wakeup = <1>; -+ gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; -+ label = "GPIO Power"; -+ linux,code = ; -+ wakeup-source; -+ debounce-interval = <100>; -+ }; -+ -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ -+ power { -+ /* -+ Power led is active high, but we set it here active low -+ so while there is mass storage access it turns red and -+ when it is idle is blue -+ */ -+ gpios = <&gpio7 2 GPIO_ACTIVE_LOW>; -+ label = "power"; -+ linux,default-trigger = "mmc0"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&power_led>; -+ }; -+ -+ }; -+ -+ vcc_sys: vsys-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc_sys"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-always-on; -+ regulator-boot-on; -+ }; -+ -+ vcc_sd: sdmmc-regulator { -+ compatible = "regulator-fixed"; -+ gpio = <&gpio7 11 GPIO_ACTIVE_LOW>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdmmc_pwr>; -+ regulator-name = "vcc_sd"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ startup-delay-us = <100000>; -+ vin-supply = <&vcc_io>; -+ }; -+ -+ vcc_flash: flash-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc_flash"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ /*gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>; -+ states = <1800000 0>, -+ <3300000 1>; -+ */ -+ vin-supply = <&vcc_io>; -+ startup-delay-us = <100000>; -+ }; -+ -+ vcc_host_5v: usb-host-regulator { -+ compatible = "regulator-fixed"; -+ gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>; -+ regulator-name = "vcc_host_5v"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-boot-on; -+ enable-active-high; -+ vin-supply = <&vcc_sys>; -+ }; -+ -+ -+ vcc_otg_5v: usb-otg-regulator { -+ compatible = "regulator-fixed"; -+ gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>; -+ regulator-name = "vcc_otg_5v"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ regulator-boot-on; -+ enable-active-high; -+ vin-supply = <&vcc_sys>; -+ }; -+ -+ /* -+ * Required power sequence to properly enable the wireless/bluetooth -+ * module connected to sdio0 -+ */ -+ sdio0_pwrseq: sdio0_pwrseq { -+ compatible = "mmc-pwrseq-simple"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&wifi_enable_h>, <&bt_enable_h>; -+ reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>, <&gpio4 29 GPIO_ACTIVE_LOW>; -+ post-power-on-delay-ms = <100>; -+ }; -+ -+ emmc_pwrseq: emmc-pwrseq { -+ compatible = "mmc-pwrseq-emmc"; -+ pinctrl-0 = <&emmc_reset>; -+ pinctrl-names = "default"; -+ reset-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>; -+ }; -+ -+ /* -+ * Sound taken from tinkerboard device tree, adapted to q8. -+ */ -+ soundcard-hdmi { -+ compatible = "simple-audio-card"; -+ simple-audio-card,format = "i2s"; -+ simple-audio-card,name = "DW-I2S-HDMI"; -+ simple-audio-card,mclk-fs = <512>; -+ -+ simple-audio-card,codec { -+ sound-dai = <&hdmi>; -+ }; -+ -+ simple-audio-card,cpu { -+ sound-dai = <&i2s>; -+ }; -+ }; -+ -+ soundcard-spdif { -+ compatible = "simple-audio-card"; -+ simple-audio-card,name = "SPDIF"; -+ simple-audio-card,dai-link@1 { -+ -+ cpu { -+ sound-dai = <&spdif>; -+ }; -+ -+ codec { -+ sound-dai = <&spdif_out>; -+ }; -+ -+ }; -+ }; -+ -+ spdif_out: spdif-out { -+ compatible = "linux,spdif-dit"; -+ #sound-dai-cells = <0>; -+ }; -+ -+}; -+ -+ -+&io_domains { -+ status = "okay"; -+ -+ audio-supply = <&vcca_33>; -+ bb-supply = <&vcc_io>; -+ dvp-supply = <&vcc_18>; -+ flash0-supply = <&vcc_flash>; -+ flash1-supply = <&vcc_lan>; -+ gpio30-supply = <&vcc_io>; -+ gpio1830-supply = <&vcc_io>; -+ lcdc-supply = <&vcc_io>; -+ sdcard-supply = <&vccio_sd>; -+ wifi-supply = <&vcc_18>; -+}; -+ -+&cpu0 { -+ cpu0-supply = <&vdd_cpu>; -+}; -+ -+&gmac { -+ assigned-clocks = <&cru SCLK_MAC>; -+ assigned-clock-parents = <&ext_gmac>; -+ clock_in_out = "input"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>; -+ phy-supply = <&vcc_lan>; -+ phy-mode = "rgmii"; -+ snps,reset-active-low; -+ snps,reset-delays-us = <0 10000 1000000>; -+ snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>; -+ tx_delay = <0x30>; -+ rx_delay = <0x10>; -+ status = "ok"; -+}; -+ -+&hdmi { -+ ddc-i2c-bus = <&i2c5>; -+ status = "okay"; -+}; -+ -+&gpu { -+ mali-supply = <&vdd_gpu>; -+ status = "okay"; -+}; -+ -+&i2c0 { -+ clock-frequency = <400000>; -+ status = "okay"; -+ -+ vdd_cpu: syr827@40 { -+ compatible = "silergy,syr827"; -+ fcs,suspend-voltage-selector = <1>; -+ reg = <0x40>; -+ regulator-name = "vdd_cpu"; -+ regulator-min-microvolt = <850000>; -+ regulator-max-microvolt = <1350000>; -+ regulator-ramp-delay = <8000>; -+ regulator-always-on; -+ regulator-boot-on; -+ vin-supply = <&vcc_sys>; -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vdd_gpu: syr828@41 { -+ compatible = "silergy,syr828"; -+ fcs,suspend-voltage-selector = <1>; -+ reg = <0x41>; -+ regulator-name = "vdd_gpu"; -+ regulator-min-microvolt = <850000>; -+ regulator-max-microvolt = <1350000>; -+ regulator-ramp-delay = <8000>; -+ regulator-always-on; -+ vin-supply = <&vcc_sys>; -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ hym8563: hym8563@51 { -+ compatible = "haoyu,hym8563"; -+ reg = <0x51>; -+ #clock-cells = <0>; -+ clock-frequency = <32768>; -+ clock-output-names = "xin32k"; -+ interrupt-parent = <&gpio0>; -+ interrupts = <4 IRQ_TYPE_EDGE_FALLING>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rtc_int>; -+ }; -+ -+ act8846: act8846@5a { -+ compatible = "active-semi,act8846"; -+ reg = <0x5a>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pmic_vsel>; -+ system-power-controller; -+ -+ vp1-supply = <&vcc_sys>; -+ vp2-supply = <&vcc_sys>; -+ vp3-supply = <&vcc_sys>; -+ vp4-supply = <&vcc_sys>; -+ inl1-supply = <&vcc_sys>; -+ inl2-supply = <&vcc_sys>; -+ inl3-supply = <&vcc_20>; -+ wakeup-source; -+ -+ regulators { -+ -+ /* -+ * Regulator controlling DDR memory - always on -+ */ -+ vcc_ddr: REG1 { -+ regulator-name = "vcc_ddr"; -+ regulator-min-microvolt = <1200000>; -+ regulator-max-microvolt = <1200000>; -+ regulator-always-on; -+ /* -+ * Broken in kernel 5.4 -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ */ -+ }; -+ -+ /* -+ * Regulator controlling various IO functions of the rk3288. -+ * Always on -+ */ -+ vcc_io: REG2 { -+ regulator-name = "vcc_io"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+ /* -+ * Broken in kernel 5.4 -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ */ -+ }; -+ -+ /* -+ * Regulator controlling various board logic. -+ * Always on. -+ * rk3288 electrical datasheet says it should have variable -+ * voltage depending upon dvfs -+ */ -+ vdd_log: REG3 { -+ regulator-name = "vdd_log"; -+ regulator-min-microvolt = <1100000>; -+ regulator-max-microvolt = <1100000>; -+ regulator-always-on; -+ /* -+ * Broken in kernel 5.4 -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ */ -+ }; -+ -+ /* -+ * No reference for this on electrical datasheet. Maybe this -+ * is vcc_18? Maybe this is vcc18_flash on electrical datasheet. -+ * So far we disable it. -+ */ -+ vcc_20: REG4 { -+ regulator-name = "vcc_20"; -+ regulator-min-microvolt = <2000000>; -+ regulator-max-microvolt = <2000000>; -+ regulator-always-on; -+ /* -+ * Broken in kernel 5.4 -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ */ -+ }; -+ -+ /* -+ * This regulator controls SDIO. Electrical datasheet says -+ * this regulator can be operated between 1.8 and 3.3 volts -+ */ -+ vccio_sd: REG5 { -+ regulator-name = "vccio_sd"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; -+ /* -+ * Broken in kernel 5.4 -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <3300000>; -+ }; -+ */ -+ }; -+ -+ /* -+ * Controlling HDMI and LCD controller on rk3288. 1.0 volts -+ * by reference -+ */ -+ vdd10_lcd: REG6 { -+ regulator-name = "vdd10_lcd"; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1000000>; -+ regulator-always-on; -+ /* -+ * Broken in kernel 5.4 -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ */ -+ }; -+ -+ /* -+ * From the rk3288 electrical datasheet, this regulator powers -+ * the rk1000 chip, which is absent in our device, but it -+ * is also supplying bluetooth, so we enable it. -+ */ -+ vcca_18: REG7 { -+ regulator-name = "vcca_18"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-always-on; -+ -+ /* -+ The regulator can be set off in suspend, but kernel 5.4 modifications -+ to enable suspend for ACT8865 device break the ACT8846 -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ */ -+ }; -+ -+ /* -+ * This regulator controls, among other things, the SPDIF -+ * interface, so we enable it -+ */ -+ vcca_33: REG8 { -+ regulator-name = "vcca_33"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ regulator-always-on; // Turn this on to get SPDIF! -+ -+ /* -+ The regulator can be set off in suspend, but kernel 5.4 modifications -+ to enable suspend for ACT8865 device break the ACT8846 -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ */ -+ }; -+ -+ /* -+ * LAN regulator -+ */ -+ vcc_lan: REG9 { -+ regulator-name = "vcc_lan"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ -+ /* -+ * Broken in kernel 5.4 -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ */ -+ }; -+ -+ /* -+ * Regulator controlling PMU, USB PHY and rk3288 PLLs. -+ * 1.0 volts by reference -+ */ -+ vdd_10: REG10 { -+ regulator-name = "vdd_10"; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1000000>; -+ regulator-always-on; -+ -+ /* -+ * Broken in kernel 5.4 -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ */ -+ }; -+ -+ /* -+ * Regulator controlling Wifi over SDIO, SARADC and USB PHY. -+ * Better turn this on -+ */ -+ vccio_wl: vcc_18: REG11 { -+ regulator-name = "vcc_18"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-always-on; -+ -+ /* -+ * Broken in kernel 5.4 -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ */ -+ }; -+ -+ /* -+ * Not clear: apparently this controls HDMI and LCD controller -+ * on rk3368 devices. -+ * 1.8 volts by reference -+ */ -+ vcc18_lcd: REG12 { -+ regulator-name = "vcc18_lcd"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ regulator-always-on; -+ -+ /* -+ The regulator can be set off in suspend, but kernel 5.4 modifications -+ to enable suspend for ACT8865 device break the ACT8846 -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ */ -+ }; -+ }; -+ }; -+}; -+ -+&i2c1 { -+ status = "okay"; -+}; -+ -+&i2c2 { -+ status = "okay"; -+}; -+ -+&i2c4 { -+ -+ /* -+ * Here should go the RK1000 audio codec parts, but seems that -+ * there is no driver in linux kernel at the moment, so we can't -+ * describe it. -+ * Also, most important, there is no RK1000 on our board :) -+ * Datasheet is available here: -+ * http://dl.radxa.com/rock/docs/hw/ds/RK1000-S%20DATASHEET%20V14.pdf -+ */ -+ status = "okay"; -+ -+}; -+ -+&i2c5 { -+ status = "okay"; -+}; -+ -+&pinctrl { -+ -+ /* -+ These two lines here, these must be commented out! Otherwise for some reason the kernel -+ does not see the boot device anymore and will stay stuck in initramfs! -+ On the contrary, these are required by u-boot to keep the power holding so the device does not -+ automatically turns off after a small timeout -+ */ -+ /*pinctrl-names = "default";*/ -+ /*pinctrl-0 = <&pwr_hold>;*/ -+ -+ pcfg_output_high: pcfg-output-high { -+ output-high; -+ }; -+ -+ pcfg_output_low: pcfg-output-low { -+ output-low; -+ }; -+ -+ pcfg_wl: pcfg-wl { -+ bias-pull-up; -+ drive-strength = <8>; -+ }; -+ -+ pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { -+ bias-pull-up; -+ drive-strength = <8>; -+ }; -+ -+ pcfg_pull_none_8ma: pcfg-pull-none-8ma { -+ bias-disable; -+ drive-strength = <8>; -+ }; -+ -+ pcfg_wl_clk: pcfg-wl-clk { -+ bias-disable; -+ drive-strength = <12>; -+ }; -+ -+ pcfg_wl_int: pcfg-wl-int { -+ bias-pull-up; -+ }; -+ -+ act8846 { -+ -+ /* -+ * Original q8 device tree says: -+ * - gpio0 11 HIGH -> power hold -+ * - gpio7 1 LOW -> possibly pmic-vsel, we don't care -+ */ -+ pmic_vsel: pmic-vsel { -+ rockchip,pins = <7 1 RK_FUNC_GPIO &pcfg_output_low>; -+ }; -+ -+ pwr_hold: pwr-hold { -+ rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ gmac { -+ phy_int: phy-int { -+ rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ -+ phy_pmeb: phy-pmeb { -+ rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ -+ phy_rst: phy-rst { -+ rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>; -+ }; -+ }; -+ -+ hym8563 { -+ rtc_int: rtc-int { -+ rockchip,pins = <0 4 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ keys { -+ pwr_key: pwr-key { -+ rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ leds { -+ power_led: power-led { -+ rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ ir { -+ ir_int: ir-int { -+ rockchip,pins = <7 0 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ sdmmc { -+ -+ /* -+ * Copied from firefly board definition to give more drive to -+ * the sdmmc pins. The Q8 seems to be quite able to drive -+ * ultra high speed uSD cards, so we give a bit more energy -+ * to the gpio pins -+ */ -+ sdmmc_bus4: sdmmc-bus4 { -+ rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, -+ <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, -+ <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, -+ <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; -+ }; -+ -+ sdmmc_clk: sdmmc-clk { -+ rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_8ma>; -+ }; -+ -+ sdmmc_cmd: sdmmc-cmd { -+ rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; -+ }; -+ -+ sdmmc_pwr: sdmmc-pwr { -+ rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ }; -+ -+ usb_host1 { -+ host_vbus_drv: host-vbus-drv { -+ rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ }; -+ -+ usb_otg { -+ otg_vbus_drv: otg-vbus-drv { -+ rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ sdio0 { -+ wifi_enable_h: wifienable-h { -+ rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_output_high>; -+ }; -+ -+ bt_enable_h: bt-enable-h { -+ rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_output_high>; -+ }; -+ -+ }; -+ -+ -+ wireless-bluetooth { -+ uart0_gpios: uart0-gpios { -+ rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ emmc { -+ -+ emmc_reset: emmc-reset { -+ rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ }; -+ -+}; -+ -+&saradc { -+ vref-supply = <&vcc_18>; -+ status = "okay"; -+}; -+ -+&emmc { -+ -+ /* -+ * eMMC is a 52Mhz DDR device on q8 devices, so set it here. -+ * Setting default-sample-rate to 180 degrees is very important, -+ * otherwise the eMMC is not stable and may not be able to negotiate -+ * the right clock. -+ * Despite the code already seems to use 180 degree phase when -+ * MMC + 8bit bus is set, we need to set default phase here too. -+ * -+ * Huge hint came from this patch: -+ * https://patchwork.kernel.org/patch/11129183/ -+ * -+ */ -+ broken-cd; -+ bus-width = <8>; -+ cap-mmc-highspeed; -+ -+ disable-wp; -+ non-removable; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>; -+ -+ vmmc-supply = <&vcc_io>; -+ vqmmc-supply = <&vcc_flash>; -+ -+ mmc-pwrseq = <&emmc_pwrseq>; -+ mmc-ddr-1_8v; -+ rockchip,default-sample-phase = <180>; -+ -+ status = "okay"; -+}; -+ -+&sdmmc { -+ supports-sd; -+ -+ bus-width = <4>; -+ cap-mmc-highspeed; -+ cap-sd-highspeed; -+ cd-gpios = <&gpio6 RK_PC6 GPIO_ACTIVE_LOW>; -+ cd-debounce-delay-ms = <500>; -+ disable-wp; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>; -+ vmmc-supply = <&vcc_sd>; -+ vqmmc-supply = <&vccio_sd>; -+ sd-uhs-sdr12; -+ sd-uhs-sdr25; -+ sd-uhs-sdr50; -+ sd-uhs-sdr104; -+ sd-uhs-ddr50; -+ -+ status = "okay"; -+}; -+ -+&sdio0 { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ bus-width = <4>; -+ mmc-pwrseq = <&sdio0_pwrseq>; -+ -+ vmmc-supply = <&vcc_io>; -+ vqmmc-supply = <&vcc_18>; // This must be the same as in io_domains, -+ // otherwise the mmc1 device won't be detected properly -+ -+ // clock-frequency = <50000000>; -+ // max-frequency = <50000000>; -+ -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>, <&sdio0_int>; -+ -+ cap-sdio-irq; -+ no-mmc; -+ no-sd; -+ cap-sd-highspeed; // required, otherwise does not work! -+ supports-sdio; -+ non-removable; -+ -+ keep-power-in-suspend; -+ disable-wp; -+ -+ -+ status = "okay"; -+ -+ brcmf: bcrmf@1 { -+ reg = <1>; -+ compatible = "brcm,bcm4329-fmac"; -+ interrupt-parent = <&gpio4>; -+ interrupts = <30 IRQ_TYPE_LEVEL_LOW>; -+ interrupt-names = "host-wake"; -+ status = "okay"; -+ }; -+ -+ //sd-uhs-sdr104; // required to be disabled, otherwise the device get -+ // detected, but there is no communication -+ -+}; -+ -+&spi0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>; -+ status = "okay"; -+}; -+ -+&tsadc { -+ rockchip,hw-tshut-mode = <0>; -+ rockchip,hw-tshut-polarity = <0>; -+ status = "okay"; -+}; -+ -+/* -+ * These dmas described here for uarts are present in original q8 board -+ * dts, so I replicate them here because documentation says that serial -+ * ports can have dmas. -+ * note: -+ * - uart0 is the serial port connected to the bluetooth module -+ * - uart2 is the onboard serial port -+ * -+ * As ok kernel 4.19 DMA for serial ports is disabled because it makes -+ * the ports unusable -+ * -+ */ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>; -+ //dmas = <&dmac_peri 1 &dmac_peri 2>; -+ //dma-names = "tx", "rx"; -+ status = "okay"; -+}; -+ -+&uart1 { -+ //dmas = <&dmac_peri 3 &dmac_peri 4>; -+ //dma-names = "tx", "rx"; -+ status = "okay"; -+}; -+ -+&uart2 { -+ //dmas = <&dmac_bus_s 4 &dmac_bus_s 5>; -+ //dma-names = "tx", "rx"; -+ status = "okay"; -+}; -+ -+&uart3 { -+ //dmas = <&dmac_peri 7 &dmac_peri 8>; -+ //dma-names = "tx", "rx"; -+ status = "okay"; -+}; -+ -+&uart4 { -+ //dmas = <&dmac_peri 9 &dmac_peri 10>; -+ //dma-names = "tx", "rx"; -+ status = "disabled"; -+}; -+ -+/* -+ * Here usbphy* should have their proper reset lines described in rk3288.dtsi -+ * Describing resets for usb phy is important because otherwise the USB -+ * port gets stuck in case it goes into autosuspend: plugging any device -+ * when the port is autosuspended will actually kill the port itself and -+ * require a power cycle. -+ * This is required for the usbphy1 phy, nonetheless it is a good idea to -+ * specify the proper resources for all the phys though. -+ * The reference patch which works in conjuction with the reset lines: -+ * https://patchwork.kernel.org/patch/9469811/ -+ * -+ */ -+&usbphy { -+ status = "okay"; -+}; -+ -+&usb_host0_ehci { -+ dr_mode = "host"; -+ reg = <0x0 0xff500000 0x0 0x20000>; -+ status = "disable"; -+}; -+ -+&usb_host1 { -+ vbus-supply = <&vcc_host_5v>; -+ status = "okay"; -+}; -+ -+&usb_otg { -+ vbus-supply = <&vcc_otg_5v>; -+ status = "okay"; -+}; -+ -+/* -+ * Enable VPU services and complete the relative IOMMU configurations -+ */ -+&vopb { -+ status = "okay"; -+}; -+ -+&vopb_mmu { -+ status = "okay"; -+}; -+ -+&vopl { -+ status = "okay"; -+}; -+ -+&vopl_mmu { -+ status = "okay"; -+}; -+ -+&vpu_mmu { -+ status = "okay"; -+}; -+ -+&hevc_mmu { -+ status = "okay"; -+}; -+ -+&wdt { -+ status = "okay"; -+}; -+ -+// i2s bus is present on q8 device, enable it -+&i2s { -+ #sound-dai-cells = <0>; -+ status = "okay"; -+}; -+ -+// spdif is present on q8 device, enable it -+&spdif { -+ status = "okay"; -+}; -+ -+/* -+ * Redefine some thermals to give a bit more headroom (+5°C) -+ */ -+&cpu_alert0 { -+ temperature = <75000>; -+}; -+ -+&cpu_alert1 { -+ temperature = <80000>; -+}; -+ -+&gpu_alert0 { -+ temperature = <75000>; -+}; -+ -+/* -+ * Retouch the operating points for higher frequencies to reduce -+ * the voltage required -+ */ -+&cpu_opp_table { -+ opp-1512000000 { -+ opp-microvolt = <1250000>; -+ }; -+ -+ opp-1608000000 { -+ opp-microvolt = <1300000>; -+ }; -+ -+ /* -+ Remove the overclocking/turbo frequencies -+ */ -+ /delete-node/ opp@1704000000; -+ /delete-node/ opp@1800000000; -+ /delete-node/ opp@1896000000; -+ /delete-node/ opp@1920000000; -+ /delete-node/ opp@1992000000; -+ /delete-node/ opp@2016000000; -+ /delete-node/ opp@2040000000; -+ /delete-node/ opp@2064000000; -+ /delete-node/ opp@2088000000; -+ /delete-node/ opp@2112000000; -+ /delete-node/ opp@2136000000; -+ /delete-node/ opp@2160000000; -+ /delete-node/ opp@2184000000; -+ /delete-node/ opp@2208000000; -+ -+ -+}; -+ -+&gpiomem { -+ status = "okay"; -+}; diff --git a/buildroot-external/board/asus/tinker/patches/linux/xt-q8l-v10-add-dts-makefile.patch b/buildroot-external/board/asus/tinker/patches/linux/xt-q8l-v10-add-dts-makefile.patch deleted file mode 100644 index a07639fa9..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/xt-q8l-v10-add-dts-makefile.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 37a3de760..6bcfceede 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -832,6 +832,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ - rk3188-radxarock.dtb \ - rk3228-evb.dtb \ - rk3229-evb.dtb \ -+ rk3288-xt-q8l-v10.dtb \ - rk3229-xms6.dtb \ - rk3288-evb-act8846.dtb \ - rk3288-evb-rk808.dtb \ - diff --git a/buildroot-external/board/asus/tinker/patches/linux/xt-q8l-v10-remote-keymap.patch b/buildroot-external/board/asus/tinker/patches/linux/xt-q8l-v10-remote-keymap.patch deleted file mode 100644 index 5c30edcb9..000000000 --- a/buildroot-external/board/asus/tinker/patches/linux/xt-q8l-v10-remote-keymap.patch +++ /dev/null @@ -1,103 +0,0 @@ -diff --git a/drivers/media/rc/keymaps/rc-xt-q8l-v10.c b/drivers/media/rc/keymaps/rc-xt-q8l-v10.c -index e69de29..19c7d9e 100644 ---- /dev/null -+++ b/drivers/media/rc/keymaps/rc-xt-q8l-v10.c -@@ -0,0 +1,76 @@ -+// SPDX-License-Identifier: GPL-2.0+ -+// rc-xt-q8l-v10.c - Keytable for xt-q8l-v10 tv box remote controller -+// -+// keymap imported from ir-keymaps.c -+// -+// Copyright (c) 2018 Paolo Sabatino -+ -+#include -+#include -+ -+/* -+ -+*/ -+ -+static struct rc_map_table xt_q8l_v10[] = { -+ -+ { 0xcc1d11, KEY_ENTER }, -+ { 0xcc1d00, KEY_POWER }, -+ { 0xcc1d15, KEY_PLAYPAUSE }, -+ { 0xcc1d16, KEY_STOP }, -+ { 0xcc1d06, KEY_PREVIOUSSONG }, -+ { 0xcc1d0a, KEY_NEXTSONG }, -+ { 0xcc1d41, KEY_1 }, -+ { 0xcc1d45, KEY_2 }, -+ { 0xcc1d4d, KEY_3 }, -+ { 0xcc1d42, KEY_4 }, -+ { 0xcc1d46, KEY_5 }, -+ { 0xcc1d4e, KEY_6 }, -+ { 0xcc1d43, KEY_7 }, -+ { 0xcc1d47, KEY_8 }, -+ { 0xcc1d4f, KEY_9 }, -+ { 0xcc1d49, KEY_0 }, -+ { 0xcc1d4a, KEY_BACKSPACE }, -+ { 0xcc1d48, KEY_F6 }, -+ { 0xcc1d03, KEY_HOME }, -+ { 0xcc1d0f, KEY_BACK }, -+ { 0xcc1d40, KEY_MENU }, -+ { 0xcc1d4c, KEY_TEXT }, -+ { 0xcc1d10, KEY_LEFT }, -+ { 0xcc1d12, KEY_RIGHT }, -+ { 0xcc1d44, KEY_DOWN }, -+ { 0xcc1d07, KEY_UP }, -+ { 0xcc1d02, KEY_VOLUMEDOWN }, -+ { 0xcc1d0c, KEY_MUTE }, -+ { 0xcc1d0e, KEY_VOLUMEUP }, -+ { 0xcc1d01, KEY_F1 }, -+ { 0xcc1d05, KEY_F2 }, -+ { 0xcc1d09, KEY_F3 }, -+ { 0xcc1d0d, KEY_F4 }, -+ -+}; -+ -+static struct rc_map_list xt_q8l_v10_map = { -+ .map = { -+ .scan = xt_q8l_v10, -+ .size = ARRAY_SIZE(xt_q8l_v10), -+ .rc_proto = RC_PROTO_NEC, /* Legacy IR type */ -+ .name = RC_MAP_XT_Q8L_V10, -+ } -+}; -+ -+static int __init init_rc_map_xt_q8l_v10(void) -+{ -+ return rc_map_register(&xt_q8l_v10_map); -+} -+ -+static void __exit exit_rc_map_xt_q8l_v10(void) -+{ -+ rc_map_unregister(&xt_q8l_v10_map); -+} -+ -+module_init(init_rc_map_xt_q8l_v10) -+module_exit(exit_rc_map_xt_q8l_v10) -+ -+MODULE_LICENSE("GPL"); -+MODULE_AUTHOR("Paolo Sabatino"); -diff --git a/include/media/rc-map.h b/include/media/rc-map.h -index d621acadf..ad7abdb97 100644 ---- a/include/media/rc-map.h -+++ b/include/media/rc-map.h -@@ -278,6 +278,7 @@ struct rc_map *rc_map_get(const char *name); - #define RC_MAP_WINFAST_USBII_DELUXE "rc-winfast-usbii-deluxe" - #define RC_MAP_SU3000 "rc-su3000" - #define RC_MAP_XBOX_DVD "rc-xbox-dvd" -+#define RC_MAP_XT_Q8L_V10 "rc-xt-q8l-v10" - #define RC_MAP_X96MAX "rc-x96max" - - /* -diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile -index 5b1399af6..ec9ce1206 100644 ---- a/drivers/media/rc/keymaps/Makefile -+++ b/drivers/media/rc/keymaps/Makefile -@@ -117,4 +117,5 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ - rc-winfast-usbii-deluxe.o \ - rc-su3000.o \ - rc-xbox-dvd.o \ -+ rc-xt-q8l-v10.o \ - rc-x96max.o \ diff --git a/buildroot-external/board/asus/tinker/patches/uboot/0001-SPL-modify-load-address-of-U-Boot.patch b/buildroot-external/board/asus/tinker/patches/uboot/0001-SPL-modify-load-address-of-U-Boot.patch new file mode 100644 index 000000000..8a95acb64 --- /dev/null +++ b/buildroot-external/board/asus/tinker/patches/uboot/0001-SPL-modify-load-address-of-U-Boot.patch @@ -0,0 +1,37 @@ +From 74e929bc4713b76f58a8df82019d74078b4b8d0c Mon Sep 17 00:00:00 2001 +Message-Id: <74e929bc4713b76f58a8df82019d74078b4b8d0c.1599227174.git.stefan@agner.ch> +From: Pascal Vizeli +Date: Fri, 24 Apr 2020 12:41:50 +0000 +Subject: [PATCH 1/3] SPL: modify load address of U-Boot + +Default load address of U-Boot is at sector 16384, which is where HAOS +has its first partition. Use 0x2000 (8192) instead. + +Signed-off-by: Pascal Vizeli +Signed-off-by: Stefan Agner +--- + configs/tinker-rk3288_defconfig | 1 + + configs/tinker-s-rk3288_defconfig | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig +index 83c3450839..574a711a32 100644 +--- a/configs/tinker-rk3288_defconfig ++++ b/configs/tinker-rk3288_defconfig +@@ -84,3 +84,4 @@ CONFIG_USB_ETHER_ASIX=y + CONFIG_USB_ETHER_SMSC95XX=y + CONFIG_CMD_DHRYSTONE=y + CONFIG_ERRNO_STR=y ++CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000 +diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig +index 4925b14821..df047785ea 100644 +--- a/configs/tinker-s-rk3288_defconfig ++++ b/configs/tinker-s-rk3288_defconfig +@@ -90,3 +90,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y + CONFIG_CONSOLE_SCROLL_LINES=10 + CONFIG_CMD_DHRYSTONE=y + CONFIG_ERRNO_STR=y ++CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000 +-- +2.28.0 + diff --git a/buildroot-external/board/asus/tinker/patches/uboot/0001-TLP-Modify-entrypoint-for-u-boot.patch b/buildroot-external/board/asus/tinker/patches/uboot/0001-TLP-Modify-entrypoint-for-u-boot.patch deleted file mode 100644 index 71a07cc4c..000000000 --- a/buildroot-external/board/asus/tinker/patches/uboot/0001-TLP-Modify-entrypoint-for-u-boot.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 17735a28503d90db2a7173816861750f475580ea Mon Sep 17 00:00:00 2001 -From: Pascal Vizeli -Date: Fri, 24 Apr 2020 12:41:50 +0000 -Subject: [PATCH 1/1] TLP: Modify entrypoint for u-boot - -Signed-off-by: Pascal Vizeli ---- - configs/tinker-rk3288_defconfig | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig -index 83c3450839..648a7904be 100644 ---- a/configs/tinker-rk3288_defconfig -+++ b/configs/tinker-rk3288_defconfig -@@ -84,3 +84,5 @@ CONFIG_USB_ETHER_ASIX=y - CONFIG_USB_ETHER_SMSC95XX=y - CONFIG_CMD_DHRYSTONE=y - CONFIG_ERRNO_STR=y -+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x3000 -+ --- -2.17.1 - diff --git a/buildroot-external/board/asus/tinker/patches/uboot/0002-rockchip-dts-tinker-move-i2c-node-to-shared-device-t.patch b/buildroot-external/board/asus/tinker/patches/uboot/0002-rockchip-dts-tinker-move-i2c-node-to-shared-device-t.patch new file mode 100644 index 000000000..a195ac493 --- /dev/null +++ b/buildroot-external/board/asus/tinker/patches/uboot/0002-rockchip-dts-tinker-move-i2c-node-to-shared-device-t.patch @@ -0,0 +1,55 @@ +From 683783c7253981c0d4c3b772aeb1f9bda833e2be Mon Sep 17 00:00:00 2001 +Message-Id: <683783c7253981c0d4c3b772aeb1f9bda833e2be.1599227174.git.stefan@agner.ch> +In-Reply-To: <74e929bc4713b76f58a8df82019d74078b4b8d0c.1599227174.git.stefan@agner.ch> +References: <74e929bc4713b76f58a8df82019d74078b4b8d0c.1599227174.git.stefan@agner.ch> +From: Stefan Agner +Date: Fri, 4 Sep 2020 15:40:55 +0200 +Subject: [PATCH 2/3] rockchip: dts: tinker: move i2c node to shared device + tree + +The I2C EEPROM is present on Tinker Board S as well. Move the i2c node +to the shared, U-Boot specific rk3288-tinker-u-boot.dtsi device tree. + +Cc: Jonas Karlman +Signed-off-by: Stefan Agner +--- + arch/arm/dts/rk3288-tinker-u-boot.dtsi | 7 +++++++ + arch/arm/dts/rk3288-tinker.dts | 7 ------- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi +index 732aa4f91f..3d169906fd 100644 +--- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi ++++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi +@@ -17,6 +17,13 @@ + rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 0>; + }; + ++&i2c2 { ++ m24c08@50 { ++ compatible = "at,24c08", "i2c-eeprom"; ++ reg = <0x50>; ++ }; ++}; ++ + &pinctrl { + u-boot,dm-pre-reloc; + }; +diff --git a/arch/arm/dts/rk3288-tinker.dts b/arch/arm/dts/rk3288-tinker.dts +index 4b8405fd82..338670123b 100644 +--- a/arch/arm/dts/rk3288-tinker.dts ++++ b/arch/arm/dts/rk3288-tinker.dts +@@ -35,10 +35,3 @@ + vbus-supply = <&vcc5v0_host>; + status = "okay"; + }; +- +-&i2c2 { +- m24c08@50 { +- compatible = "at,24c08", "i2c-eeprom"; +- reg = <0x50>; +- }; +-}; +-- +2.28.0 + diff --git a/buildroot-external/board/asus/tinker/patches/uboot/0003-rockchip-dts-tinker-remove-unnecessary-node.patch b/buildroot-external/board/asus/tinker/patches/uboot/0003-rockchip-dts-tinker-remove-unnecessary-node.patch new file mode 100644 index 000000000..a31bd22f0 --- /dev/null +++ b/buildroot-external/board/asus/tinker/patches/uboot/0003-rockchip-dts-tinker-remove-unnecessary-node.patch @@ -0,0 +1,34 @@ +From 2af46619bb66af62bbfd2a880fe57d6dd0ec43fe Mon Sep 17 00:00:00 2001 +Message-Id: <2af46619bb66af62bbfd2a880fe57d6dd0ec43fe.1599227174.git.stefan@agner.ch> +In-Reply-To: <74e929bc4713b76f58a8df82019d74078b4b8d0c.1599227174.git.stefan@agner.ch> +References: <74e929bc4713b76f58a8df82019d74078b4b8d0c.1599227174.git.stefan@agner.ch> +From: Stefan Agner +Date: Fri, 4 Sep 2020 15:44:38 +0200 +Subject: [PATCH 3/3] rockchip: dts: tinker: remove unnecessary node + +The property reg-shift with the same value is present in the base +device tree already. Remove unnecessary node from rk3288-tinker.dts. + +Signed-off-by: Stefan Agner +--- + arch/arm/dts/rk3288-tinker.dts | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/arch/arm/dts/rk3288-tinker.dts b/arch/arm/dts/rk3288-tinker.dts +index 338670123b..8b1848c310 100644 +--- a/arch/arm/dts/rk3288-tinker.dts ++++ b/arch/arm/dts/rk3288-tinker.dts +@@ -27,10 +27,6 @@ + status = "okay"; + }; + +-&uart2 { +- reg-shift = <2>; +-}; +- + &usb_host1 { + vbus-supply = <&vcc5v0_host>; + status = "okay"; +-- +2.28.0 + diff --git a/buildroot-external/board/asus/tinker/uboot-boot.ush b/buildroot-external/board/asus/tinker/uboot-boot.ush index c693c0e74..ca7e1c998 100644 --- a/buildroot-external/board/asus/tinker/uboot-boot.ush +++ b/buildroot-external/board/asus/tinker/uboot-boot.ush @@ -27,7 +27,11 @@ setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline # Load device tree -fatload mmc ${devnum}:1 ${fdt_addr_r} rk3288-tinker.dtb +if test "$devnum" = "0"; then + fatload mmc ${devnum}:1 ${fdt_addr_r} rk3288-tinker-s.dtb +else + fatload mmc ${devnum}:1 ${fdt_addr_r} rk3288-tinker.dtb +fi setenv bootargs for BOOT_SLOT in "${BOOT_ORDER}"; do diff --git a/buildroot-external/board/hardkernel/odroid-n2/uboot-boot.ush b/buildroot-external/board/hardkernel/odroid-n2/uboot-boot.ush index e02d94f6c..063fc010b 100644 --- a/buildroot-external/board/hardkernel/odroid-n2/uboot-boot.ush +++ b/buildroot-external/board/hardkernel/odroid-n2/uboot-boot.ush @@ -29,10 +29,10 @@ usb start # Load extraargs fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline -if test "${board_rev}" = "a"; then - fatload mmc ${devnum}:1 ${fdt_addr_r} meson-g12b-odroid-n2.dtb -else +if test "${board_rev}" = "c"; then fatload mmc ${devnum}:1 ${fdt_addr_r} meson-g12b-odroid-n2-plus.dtb +else + fatload mmc ${devnum}:1 ${fdt_addr_r} meson-g12b-odroid-n2.dtb fi # logical volumes get numbered after physical ones. diff --git a/buildroot-external/board/hardkernel/patches/linux/0011-clk-meson-g12a-mark-fclk_div2-as-critical.patch b/buildroot-external/board/hardkernel/patches/linux/0011-clk-meson-g12a-mark-fclk_div2-as-critical.patch new file mode 100644 index 000000000..2095a67ba --- /dev/null +++ b/buildroot-external/board/hardkernel/patches/linux/0011-clk-meson-g12a-mark-fclk_div2-as-critical.patch @@ -0,0 +1,38 @@ +From c33df0ebe8be16b56741ce7f873221ab9087a0a6 Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: +References: +From: Stefan Agner +Date: Thu, 27 Aug 2020 23:29:57 +0200 +Subject: [PATCH 11/11] clk: meson: g12a: mark fclk_div2 as critical + +On Amlogic Meson G12b platform, similar to fclk_div3, the fclk_div2 +seems to be necessary for the system to operate correctly as well. + +Typically, the clock also gets chosen by the eMMC peripheral. This +probably masked the problem so far. However, when booting from a SD +card the clock seems to get disabled which leads to a system freeze. + +Let's mark this clock as critical, fixing boot from SD card on G12b +platforms. + +Signed-off-by: Stefan Agner +--- + drivers/clk/meson/g12a.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c +index fad616cac01e..2214b974f748 100644 +--- a/drivers/clk/meson/g12a.c ++++ b/drivers/clk/meson/g12a.c +@@ -298,6 +298,7 @@ static struct clk_regmap g12a_fclk_div2 = { + &g12a_fclk_div2_div.hw + }, + .num_parents = 1, ++ .flags = CLK_IS_CRITICAL, + }, + }; + +-- +2.28.0 + diff --git a/buildroot-external/board/hardkernel/patches/uboot/0002-ARM-meson-isolate-loading-of-socinfo.patch b/buildroot-external/board/hardkernel/patches/uboot/0002-ARM-meson-isolate-loading-of-socinfo.patch new file mode 100644 index 000000000..ca910197d --- /dev/null +++ b/buildroot-external/board/hardkernel/patches/uboot/0002-ARM-meson-isolate-loading-of-socinfo.patch @@ -0,0 +1,63 @@ +From fb41bcaf0e61e78bc40addb1312040a2bc6a69b7 Mon Sep 17 00:00:00 2001 +Message-Id: +In-Reply-To: +References: +From: Stefan Agner +Date: Mon, 31 Aug 2020 13:40:18 +0200 +Subject: [PATCH 2/4] ARM: meson: isolate loading of socinfo + +Move loading of socinfo into a separate function so the value can be +reused later. + +Signed-off-by: Stefan Agner +--- + arch/arm/mach-meson/board-info.c | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c +index 0d3b40a249..e305d60dca 100644 +--- a/arch/arm/mach-meson/board-info.c ++++ b/arch/arm/mach-meson/board-info.c +@@ -123,12 +123,16 @@ static void print_board_model(void) + printf("Model: %s\n", model ? model : "Unknown"); + } + +-int show_board_info(void) ++static unsigned int get_socinfo(void) + { + struct regmap *regmap; + int nodeoffset, ret; + ofnode node; +- unsigned int socinfo; ++ static unsigned int socinfo = 0; ++ ++ /* Empty socinfo is invalid, so !socinfo is successfully initialized */ ++ if (socinfo) ++ return socinfo; + + /* find the offset of compatible node */ + nodeoffset = fdt_node_offset_by_compatible(gd->fdt_blob, -1, +@@ -155,8 +159,20 @@ int show_board_info(void) + return 0; + } + ++ return socinfo; ++} ++ ++int show_board_info(void) ++{ ++ unsigned int socinfo; ++ + /* print board information */ + print_board_model(); ++ ++ socinfo = get_socinfo(); ++ if (!socinfo) ++ return 0; ++ + printf("SoC: Amlogic Meson %s (%s) Revision %x:%x (%x:%x)\n", + socinfo_to_soc_id(socinfo), + socinfo_to_package_id(socinfo), +-- +2.28.0 + diff --git a/buildroot-external/board/hardkernel/patches/uboot/0002-meson-Add-board_rev-to-env.patch b/buildroot-external/board/hardkernel/patches/uboot/0002-meson-Add-board_rev-to-env.patch deleted file mode 100644 index ec475a6fa..000000000 --- a/buildroot-external/board/hardkernel/patches/uboot/0002-meson-Add-board_rev-to-env.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 2efc005b8eb2738ac66f59d0a3af2b6540cbcc8f Mon Sep 17 00:00:00 2001 -Message-Id: <2efc005b8eb2738ac66f59d0a3af2b6540cbcc8f.1596577295.git.stefan@agner.ch> -In-Reply-To: <34605fd3e035ce85265a8f308b8540b83c2ba67f.1596577295.git.stefan@agner.ch> -References: <34605fd3e035ce85265a8f308b8540b83c2ba67f.1596577295.git.stefan@agner.ch> -From: Pascal Vizeli -Date: Tue, 4 Aug 2020 13:50:57 +0000 -Subject: [PATCH 2/2] meson: Add board_rev to env - -Signed-off-by: Pascal Vizeli ---- - arch/arm/include/asm/arch-meson/boot.h | 2 ++ - arch/arm/mach-meson/board-info.c | 38 ++++++++++++++++++++++++++ - board/amlogic/w400/w400.c | 5 ++++ - 3 files changed, 45 insertions(+) - -diff --git a/arch/arm/include/asm/arch-meson/boot.h b/arch/arm/include/asm/arch-meson/boot.h -index a90fe55081..d344258ea1 100644 ---- a/arch/arm/include/asm/arch-meson/boot.h -+++ b/arch/arm/include/asm/arch-meson/boot.h -@@ -17,4 +17,6 @@ - - int meson_get_boot_device(void); - -+int meson_get_soc_rev(char *buff); -+ - #endif /* __MESON_BOOT_H__ */ -diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c -index 0d3b40a249..dddcb85981 100644 ---- a/arch/arm/mach-meson/board-info.c -+++ b/arch/arm/mach-meson/board-info.c -@@ -167,3 +167,41 @@ int show_board_info(void) - - return 0; - } -+ -+int meson_get_soc_rev(char *buff) -+{ -+ struct regmap *regmap; -+ int nodeoffset, ret; -+ ofnode node; -+ unsigned int socinfo; -+ -+ /* find the offset of compatible node */ -+ nodeoffset = fdt_node_offset_by_compatible(gd->fdt_blob, -1, -+ "amlogic,meson-gx-ao-secure"); -+ if (nodeoffset < 0) -+ return 0; -+ -+ /* check if chip-id is available */ -+ if (!fdt_getprop(gd->fdt_blob, nodeoffset, "amlogic,has-chip-id", NULL)) -+ return 0; -+ -+ /* get regmap from the syscon node */ -+ node = offset_to_ofnode(nodeoffset); -+ regmap = syscon_node_to_regmap(node); -+ if (IS_ERR(regmap)) { -+ printf("%s: failed to get regmap\n", __func__); -+ return 0; -+ } -+ -+ /* read soc info */ -+ ret = regmap_read(regmap, AO_SEC_SOCINFO_OFFSET, &socinfo); -+ if (ret && !socinfo) { -+ printf("%s: invalid chipid value\n", __func__); -+ return 0; -+ } -+ -+ /* Write SoC info */ -+ sprintf(buff, "%x", socinfo_to_minor(socinfo)); -+ -+ return 1; -+} -diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c -index d74aab899a..55fae6b67a 100644 ---- a/board/amlogic/w400/w400.c -+++ b/board/amlogic/w400/w400.c -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - #define EFUSE_MAC_OFFSET 20 - #define EFUSE_MAC_SIZE 12 -@@ -37,5 +38,9 @@ int misc_init_r(void) - eth_env_set_enetaddr("ethaddr", mac_addr); - } - -+ if (meson_get_soc_rev(buff)) { -+ env_set("board_rev", buff); -+ } -+ - return 0; - } --- -2.27.0 - diff --git a/buildroot-external/board/hardkernel/patches/uboot/0003-meson-Add-board_rev-to-env.patch b/buildroot-external/board/hardkernel/patches/uboot/0003-meson-Add-board_rev-to-env.patch new file mode 100644 index 000000000..c993eaa38 --- /dev/null +++ b/buildroot-external/board/hardkernel/patches/uboot/0003-meson-Add-board_rev-to-env.patch @@ -0,0 +1,82 @@ +From 15ce807d420324bc209772b843d4004619e0cdaf Mon Sep 17 00:00:00 2001 +Message-Id: <15ce807d420324bc209772b843d4004619e0cdaf.1598875349.git.stefan@agner.ch> +In-Reply-To: +References: +From: Pascal Vizeli +Date: Tue, 4 Aug 2020 13:50:57 +0000 +Subject: [PATCH 3/4] meson: Add board_rev to env + +Signed-off-by: Pascal Vizeli +Signed-off-by: Stefan Agner +--- + arch/arm/include/asm/arch-meson/boot.h | 4 ++++ + arch/arm/mach-meson/board-info.c | 12 ++++++++++++ + board/amlogic/w400/w400.c | 5 +++++ + 3 files changed, 21 insertions(+) + +diff --git a/arch/arm/include/asm/arch-meson/boot.h b/arch/arm/include/asm/arch-meson/boot.h +index a90fe55081..c67d12d06c 100644 +--- a/arch/arm/include/asm/arch-meson/boot.h ++++ b/arch/arm/include/asm/arch-meson/boot.h +@@ -7,6 +7,8 @@ + #ifndef __MESON_BOOT_H__ + #define __MESON_BOOT_H__ + ++#include ++ + /* Boot device */ + #define BOOT_DEVICE_RESERVED 0 + #define BOOT_DEVICE_EMMC 1 +@@ -17,4 +19,6 @@ + + int meson_get_boot_device(void); + ++int meson_get_soc_rev(char *buff, size_t buff_len); ++ + #endif /* __MESON_BOOT_H__ */ +diff --git a/arch/arm/mach-meson/board-info.c b/arch/arm/mach-meson/board-info.c +index e305d60dca..3c40d6cd27 100644 +--- a/arch/arm/mach-meson/board-info.c ++++ b/arch/arm/mach-meson/board-info.c +@@ -183,3 +183,15 @@ int show_board_info(void) + + return 0; + } ++ ++int meson_get_soc_rev(char *buff, size_t buff_len) ++{ ++ unsigned int socinfo; ++ ++ socinfo = get_socinfo(); ++ if (!socinfo) ++ return -1; ++ ++ /* Write SoC info */ ++ return snprintf(buff, buff_len, "%x", socinfo_to_minor(socinfo)); ++} +diff --git a/board/amlogic/w400/w400.c b/board/amlogic/w400/w400.c +index d74aab899a..cb2e5edf5e 100644 +--- a/board/amlogic/w400/w400.c ++++ b/board/amlogic/w400/w400.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #define EFUSE_MAC_OFFSET 20 + #define EFUSE_MAC_SIZE 12 +@@ -20,6 +21,10 @@ int misc_init_r(void) + char efuse_mac_addr[EFUSE_MAC_SIZE], buff[3]; + ssize_t len; + ++ if (meson_get_soc_rev(buff, sizeof(buff))) { ++ env_set("board_rev", buff); ++ } ++ + meson_eth_init(PHY_INTERFACE_MODE_RGMII, 0); + + if (!eth_env_get_enetaddr("ethaddr", mac_addr)) { +-- +2.28.0 + diff --git a/buildroot-external/board/raspberrypi/patches/linux/0001-brcmfmac-add-FT-based-AKMs-in-brcmf_set_key_mgmt-for.patch b/buildroot-external/board/raspberrypi/patches/linux/0001-brcmfmac-add-FT-based-AKMs-in-brcmf_set_key_mgmt-for.patch new file mode 100644 index 000000000..d3bc877ee --- /dev/null +++ b/buildroot-external/board/raspberrypi/patches/linux/0001-brcmfmac-add-FT-based-AKMs-in-brcmf_set_key_mgmt-for.patch @@ -0,0 +1,50 @@ +From d6fc5f89ac905cb3efc9c61ce79dbfad5d91883b Mon Sep 17 00:00:00 2001 +Message-Id: +From: Chung-Hsien Hsu +Date: Wed, 15 Aug 2018 05:32:39 -0500 +Subject: [PATCH] brcmfmac: add FT-based AKMs in brcmf_set_key_mgmt() for FT + support + +Add WLAN_AKM_SUITE_FT_8021X and WLAN_AKM_SUITE_FT_PSK in +brcmf_set_key_mgmt() for FT support. + +Signed-off-by: Chung-Hsien Hsu +Signed-off-by: Chi-Hsien Lin +Signed-off-by: Kalle Valo +--- + drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 ++++++ + .../net/wireless/broadcom/brcm80211/include/brcmu_wifi.h | 1 + + 2 files changed, 7 insertions(+) + +diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +index 71b7e5c19434..c312626c0a27 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -1649,6 +1649,12 @@ brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme) + case WLAN_AKM_SUITE_PSK: + val = WPA2_AUTH_PSK; + break; ++ case WLAN_AKM_SUITE_FT_8021X: ++ val = WPA2_AUTH_UNSPECIFIED | WPA2_AUTH_FT; ++ break; ++ case WLAN_AKM_SUITE_FT_PSK: ++ val = WPA2_AUTH_PSK | WPA2_AUTH_FT; ++ break; + default: + brcmf_err("invalid cipher group (%d)\n", + sme->crypto.cipher_group); +diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h b/drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h +index 75b2a0438cfa..dddebaa60352 100644 +--- a/drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h ++++ b/drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h +@@ -239,6 +239,7 @@ static inline bool ac_bitmap_tst(u8 bitmap, int prec) + #define WPA2_AUTH_RESERVED4 0x0400 + #define WPA2_AUTH_RESERVED5 0x0800 + #define WPA2_AUTH_1X_SHA256 0x1000 /* 1X with SHA256 key derivation */ ++#define WPA2_AUTH_FT 0x4000 /* Fast BSS Transition */ + #define WPA2_AUTH_PSK_SHA256 0x8000 /* PSK with SHA256 key derivation */ + + #define DOT11_DEFAULT_RTS_LEN 2347 +-- +2.28.0 + diff --git a/buildroot-external/configs/intel_nuc_defconfig b/buildroot-external/configs/intel_nuc_defconfig index a256e041c..9438c9fad 100644 --- a/buildroot-external/configs/intel_nuc_defconfig +++ b/buildroot-external/configs/intel_nuc_defconfig @@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.56" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.63" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/nuc/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/odroid_c2_defconfig b/buildroot-external/configs/odroid_c2_defconfig index 6b2397599..e2c5b7903 100644 --- a/buildroot-external/configs/odroid_c2_defconfig +++ b/buildroot-external/configs/odroid_c2_defconfig @@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.13" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.19" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index d60ca0e58..e74ad3892 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -22,7 +22,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.13" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.19" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" diff --git a/buildroot-external/configs/odroid_xu4_defconfig b/buildroot-external/configs/odroid_xu4_defconfig index 81ce08c4b..9e19c8235 100644 --- a/buildroot-external/configs/odroid_xu4_defconfig +++ b/buildroot-external/configs/odroid_xu4_defconfig @@ -23,7 +23,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.13" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.19" BR2_LINUX_KERNEL_DEFCONFIG="exynos" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/ova_defconfig b/buildroot-external/configs/ova_defconfig index 73e674638..9352d9082 100644 --- a/buildroot-external/configs/ova_defconfig +++ b/buildroot-external/configs/ova_defconfig @@ -23,7 +23,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.56" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.63" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/intel/ova/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/tinker_defconfig b/buildroot-external/configs/tinker_defconfig index ccfc42253..9f4c747d8 100644 --- a/buildroot-external/configs/tinker_defconfig +++ b/buildroot-external/configs/tinker_defconfig @@ -24,13 +24,13 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.56" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.63" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/kernel.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y BR2_LINUX_KERNEL_DTS_SUPPORT=y -BR2_LINUX_KERNEL_INTREE_DTS_NAME="rk3288-tinker" +BR2_LINUX_KERNEL_INTREE_DTS_NAME="rk3288-tinker rk3288-tinker-s" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_HASSOS_PATH)/busybox.config" @@ -89,7 +89,7 @@ BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01" -BR2_TARGET_UBOOT_BOARD_DEFCONFIG="tinker-rk3288" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="tinker-s-rk3288" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/uboot.config" BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y diff --git a/buildroot-external/kernel/docker.config b/buildroot-external/kernel/docker.config index efb5868a9..fc17b7909 100644 --- a/buildroot-external/kernel/docker.config +++ b/buildroot-external/kernel/docker.config @@ -71,6 +71,8 @@ CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y CONFIG_OVERLAY_FS=y +CONFIG_OVERLAY_FS_REDIRECT_DIR=y +CONFIG_OVERLAY_FS_METACOPY=y CONFIG_CRYPTO_CCM=m CONFIG_CRYPTO_GCM=m diff --git a/buildroot-external/meta b/buildroot-external/meta index afc6d27f9..b1b748c4d 100644 --- a/buildroot-external/meta +++ b/buildroot-external/meta @@ -1,5 +1,5 @@ VERSION_MAJOR=5 -VERSION_BUILD=1 +VERSION_BUILD=2 HASSOS_NAME="HassOS" HASSOS_ID="hassos" diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/getty@.service.d/docker.conf b/buildroot-external/rootfs-overlay/etc/systemd/system/getty@.service.d/docker.conf deleted file mode 100644 index 53a8d88b0..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/getty@.service.d/docker.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Unit] -Requires=docker.service -After=docker.service diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/getty@.service.d/noclear.conf b/buildroot-external/rootfs-overlay/etc/systemd/system/getty@.service.d/noclear.conf deleted file mode 100644 index 52671c758..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/getty@.service.d/noclear.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -TTYVTDisallocate=no diff --git a/buildroot-external/rootfs-overlay/etc/systemd/system/serial-getty@.service.d/docker.conf b/buildroot-external/rootfs-overlay/etc/systemd/system/serial-getty@.service.d/docker.conf deleted file mode 100644 index 53a8d88b0..000000000 --- a/buildroot-external/rootfs-overlay/etc/systemd/system/serial-getty@.service.d/docker.conf +++ /dev/null @@ -1,3 +0,0 @@ -[Unit] -Requires=docker.service -After=docker.service diff --git a/buildroot-external/rootfs-overlay/usr/libexec/hassos-expand b/buildroot-external/rootfs-overlay/usr/libexec/hassos-expand index 6cbe7d0c7..833a6299e 100755 --- a/buildroot-external/rootfs-overlay/usr/libexec/hassos-expand +++ b/buildroot-external/rootfs-overlay/usr/libexec/hassos-expand @@ -11,7 +11,7 @@ PART_NUM="${DEVICE_CHILD: -1}" # Need resize UNUSED=$(sfdisk -Fq "${DEVICE_ROOT}" | cut -d " " -f 3 | tail -1) -if [ -z "${UNUSED}" ] || [ "${UNUSED}" -le "2048" ]; then +if [ -z "${UNUSED}" ] || [ "${UNUSED}" -le "16384" ]; then echo "[INFO] No resize of data partition needed" exit 0 fi diff --git a/buildroot-external/rootfs-overlay/usr/sbin/hassos-cli b/buildroot-external/rootfs-overlay/usr/sbin/hassos-cli index 9164eb404..d3b018b5b 100755 --- a/buildroot-external/rootfs-overlay/usr/sbin/hassos-cli +++ b/buildroot-external/rootfs-overlay/usr/sbin/hassos-cli @@ -14,7 +14,7 @@ if [ "$(docker ps -q -f name=hassio_cli)" ]; then /bin/ash -l fi else - echo "[ERROR] Somethings going wrong! Jump into emergency console..." + echo "[WARN] Home Assistant CLI is not running! Jump into emergency console..." /bin/ash -l fi diff --git a/buildroot-external/scripts/hdd-image.sh b/buildroot-external/scripts/hdd-image.sh index 7b3416276..c4b538495 100755 --- a/buildroot-external/scripts/hdd-image.sh +++ b/buildroot-external/scripts/hdd-image.sh @@ -201,27 +201,27 @@ function _create_disk_mbr() { local hdd_img="$(hassos_image_name img)" local hdd_count=${DISK_SIZE:-2} local disk_layout="${BINARIES_DIR}/disk.layout" - local boot_start=16384 + local boot_start=$(size2sectors "8M") - local boot_size=$(($(size2sectors "$(get_boot_size)")+2)) - local kernel0_size=$(($(size2sectors "$KERNEL_SIZE")+2)) - local system0_size=$(($(size2sectors "$SYSTEM_SIZE")+2)) - local kernel1_size=$(($(size2sectors "$KERNEL_SIZE")+2)) - local system1_size=$(($(size2sectors "$SYSTEM_SIZE")+2)) - local bootstate_size=$(($(size2sectors "$BOOTSTATE_SIZE")+2)) - local overlay_size=$(($(size2sectors "$OVERLAY_SIZE")+2)) - local data_size=$(($(size2sectors "$DATA_SIZE")+2)) - local extended_size=$((kernel0_size+system0_size+kernel1_size+system1_size+bootstate_size+2)) + local boot_size=$(size2sectors "$(get_boot_size)") + local kernel0_size=$(size2sectors "$KERNEL_SIZE") + local system0_size=$(size2sectors "$SYSTEM_SIZE") + local kernel1_size=$(size2sectors "$KERNEL_SIZE") + local system1_size=$(size2sectors "$SYSTEM_SIZE") + local bootstate_size=$(size2sectors "$BOOTSTATE_SIZE") + local overlay_size=$(size2sectors "$OVERLAY_SIZE") + local data_size=$(size2sectors "$DATA_SIZE") + local extended_size=$((kernel0_size+system0_size+kernel1_size+system1_size+bootstate_size+5*$(size2sectors "1M"))) # we add one here for the extended header. - local extended_start=$((boot_start+boot_size+1)) - local kernel0_start=$((extended_start+1)) - local system0_start=$((kernel0_start+kernel0_size+1)) - local kernel1_start=$((system0_start+system0_size+1)) - local system1_start=$((kernel1_start+kernel1_size+1)) - local bootstate_start=$((system1_start+system1_size+1)) - local overlay_start=$((extended_start+extended_size+1)) - local data_start=$((overlay_start+overlay_size+1)) + local extended_start=$((boot_start+boot_size)) + local kernel0_start=$((extended_start+$(size2sectors "1M"))) + local system0_start=$((kernel0_start+kernel0_size+$(size2sectors "1M"))) + local kernel1_start=$((system0_start+system0_size+$(size2sectors "1M"))) + local system1_start=$((kernel1_start+kernel1_size+$(size2sectors "1M"))) + local bootstate_start=$((system1_start+system1_size+$(size2sectors "1M"))) + local overlay_start=$((extended_start+extended_size+$(size2sectors "1M"))) + local data_start=$((overlay_start+overlay_size+$(size2sectors "1M"))) local boot_offset=${boot_start} local kernel_offset=${kernel0_start} @@ -268,7 +268,7 @@ function _create_disk_mbr() { function _fix_disk_hyprid() { local hdd_img="$(hassos_image_name img)" - sgdisk -t 1:"E3C9E316-0B5C-4DB8-817D-F92DF00215AE" "${hdd_img}" + sgdisk -t 1:"EBD0A0A2-B9E5-4433-87C0-68B6B72699C7" "${hdd_img}" dd if="${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr.img" of="${hdd_img}" conv=notrunc bs=512 count=1 } @@ -277,7 +277,7 @@ function _fix_disk_spl_gpt() { local hdd_img="$(hassos_image_name img)" local spl_img="$(path_spl_img)" - sgdisk -t 1:"E3C9E316-0B5C-4DB8-817D-F92DF00215AE" "${hdd_img}" + sgdisk -t 1:"EBD0A0A2-B9E5-4433-87C0-68B6B72699C7" "${hdd_img}" dd if="${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr-spl.img" of="${hdd_img}" conv=notrunc bs=512 count=1 dd if="${spl_img}" of="${hdd_img}" conv=notrunc bs=512 seek=2 skip=2 } diff --git a/scripts/enter.sh b/scripts/enter.sh index 9719ae59f..9b35483e1 100755 --- a/scripts/enter.sh +++ b/scripts/enter.sh @@ -9,6 +9,9 @@ sudo mkdir -p "${CACHE_DIR}" sudo chown -R "${BUILDER_UID}:${BUILDER_GID}" "${CACHE_DIR}" sudo docker build -t hassos:local . +# Make sure loop devices are present before starting the container +sudo losetup -f > /dev/null + # shellcheck disable=SC2086 sudo docker run -it --rm --privileged \ -v "$(pwd):/build" -v "${CACHE_DIR}:/cache" \