From 262b4144c803228baf9587fdb3256d544a8c2036 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 6 Oct 2017 07:35:41 +0100 Subject: [PATCH] Fix regression in i.MX6 and omap4 devices, Improve DT detection support on aarch64, uEFI fixes and improvements, ENable Sinovoip BPI devices --- 10-devicetree.install | 49 + ...ice-tree-sources-to-Linux-4.14-state.patch | 1242 +++++++++++++++++ ...l-allocation-scheme-for-the-SPL-case.patch | 70 + dragonboard-fixes.patch | 45 - ...-calling-setup_display-from-SPL-code.patch | 330 ----- sunxi-A83T-improvements.patch | 541 +++++++ uboot-tools.spec | 156 +-- ...DT-from-any-partition-on-boot-device.patch | 82 ++ usb-kbd-fixes.patch | 184 +++ 9 files changed, 2187 insertions(+), 512 deletions(-) create mode 100755 10-devicetree.install create mode 100644 bcm283x-device-tree-sources-to-Linux-4.14-state.patch create mode 100644 disk-part_dos-Use-the-original-allocation-scheme-for-the-SPL-case.patch delete mode 100644 mx6-Avoid-calling-setup_display-from-SPL-code.patch create mode 100644 sunxi-A83T-improvements.patch create mode 100644 uefi-distro-load-FDT-from-any-partition-on-boot-device.patch create mode 100644 usb-kbd-fixes.patch diff --git a/10-devicetree.install b/10-devicetree.install new file mode 100755 index 0000000..72bcf2a --- /dev/null +++ b/10-devicetree.install @@ -0,0 +1,49 @@ +#!/bin/bash + +COMMAND="$1" +KERNEL_VERSION="$2" +#BOOT_DIR_ABS="$3" +#KERNEL_IMAGE="$4" + +# Setup a /boot/dtb -> /boot/dtb-$newest_kernel_version symlink so that +# u-boot can find the correct dtb to load. +# +# If invoked to 'add' a new kernel, find the newest based on `sort`ing +# the kernel versions dtb. If 'remove', then follow basically the same +# procedure but exclude the version currently being removed. +# +# The theory of operation here is that, while newer kernels may add new +# dtb nodes and fields, as upstreaming hw support for some particular +# device progresses, it should never make backward incompatible changes. +# So it should always be safe to use a newer dtb with an older kernel. + +list_dtb_versions() { + excluded_version="$1" + for dtbdir in /boot/dtb-*; do + dtbver=${dtbdir#*-} + if [ "$dtbver" != "$excluded_version" ]; then + echo $dtbver + fi + done +} + +setup_dtb_link() { + ver=`list_dtb_versions $1 | sort -r --sort=version | head -1` + if [ -h /boot/dtb ]; then + rm -f /boot/dtb + fi + ln -s dtb-$ver /boot/dtb +} + +ret=0 +case "$COMMAND" in + add) + setup_dtb_link + ret=$? + ;; + remove) + setup_dtb_link $KERNEL_VERSION + ret=$? + ;; +esac +exit $ret diff --git a/bcm283x-device-tree-sources-to-Linux-4.14-state.patch b/bcm283x-device-tree-sources-to-Linux-4.14-state.patch new file mode 100644 index 0000000..304b61a --- /dev/null +++ b/bcm283x-device-tree-sources-to-Linux-4.14-state.patch @@ -0,0 +1,1242 @@ +From patchwork Wed Oct 4 12:39:16 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot, + v2] fdt: update bcm283x device tree sources to Linux 4.14 state +X-Patchwork-Submitter: Alexander Graf +X-Patchwork-Id: 821297 +Message-Id: <20171004123916.13789-1-agraf@suse.de> +To: u-boot@lists.denx.de +Cc: Stefan Wahren , Fabian Vogt +Date: Wed, 4 Oct 2017 14:39:16 +0200 +From: Alexander Graf +List-Id: U-Boot discussion + +Upstream Linux has received a few device tree updates to the RPi +which we should propagate into the builtin U-Boot one as well to +gain hardware support. + +This patch bumps the dts files to their 4.14 Linux counterparts +with the exception of sdhost on 32bit RPi versions. There we stay +with iproc as the sdhost driver is missing in U-Boot. + +Signed-off-by: Alexander Graf +--- + +v1 -> v2: + + - use sdhost on 32bit RPis +--- + arch/arm/dts/bcm2835-rpi-a-plus.dts | 74 +++++++- + arch/arm/dts/bcm2835-rpi-a.dts | 76 +++++++- + arch/arm/dts/bcm2835-rpi-b-plus.dts | 75 +++++++- + arch/arm/dts/bcm2835-rpi-b-rev2.dts | 75 +++++++- + arch/arm/dts/bcm2835-rpi-b.dts | 76 +++++++- + arch/arm/dts/bcm2835-rpi.dtsi | 34 +++- + arch/arm/dts/bcm2835.dtsi | 10 + + arch/arm/dts/bcm2836-rpi-2-b.dts | 9 +- + arch/arm/dts/bcm2836.dtsi | 11 ++ + arch/arm/dts/bcm2837-rpi-3-b.dts | 35 +++- + arch/arm/dts/bcm2837.dtsi | 13 +- + arch/arm/dts/bcm283x-rpi-smsc9512.dtsi | 2 +- + arch/arm/dts/bcm283x-rpi-smsc9514.dtsi | 2 +- + arch/arm/dts/bcm283x-rpi-usb-host.dtsi | 3 + + arch/arm/dts/bcm283x.dtsi | 325 ++++++++++++++++++++++++++++++++- + include/dt-bindings/clock/bcm2835.h | 2 + + include/dt-bindings/pinctrl/bcm2835.h | 5 + + 17 files changed, 801 insertions(+), 26 deletions(-) + create mode 100644 arch/arm/dts/bcm283x-rpi-usb-host.dtsi + +diff --git a/arch/arm/dts/bcm2835-rpi-a-plus.dts b/arch/arm/dts/bcm2835-rpi-a-plus.dts +index 35ff4e7a4a..9f866491ef 100644 +--- a/arch/arm/dts/bcm2835-rpi-a-plus.dts ++++ b/arch/arm/dts/bcm2835-rpi-a-plus.dts +@@ -1,6 +1,7 @@ + /dts-v1/; + #include "bcm2835.dtsi" + #include "bcm2835-rpi.dtsi" ++#include "bcm283x-rpi-usb-host.dtsi" + + / { + compatible = "raspberrypi,model-a-plus", "brcm,bcm2835"; +@@ -21,7 +22,72 @@ + }; + + &gpio { +- pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>; ++ /* ++ * This is based on the unreleased schematic for the Model A+. ++ * ++ * Legend: ++ * "NC" = not connected (no rail from the SoC) ++ * "FOO" = GPIO line named "FOO" on the schematic ++ * "FOO_N" = GPIO line named "FOO" on schematic, active low ++ */ ++ gpio-line-names = "SDA0", ++ "SCL0", ++ "SDA1", ++ "SCL1", ++ "GPIO_GCLK", ++ "GPIO5", ++ "GPIO6", ++ "SPI_CE1_N", ++ "SPI_CE0_N", ++ "SPI_MISO", ++ "SPI_MOSI", ++ "SPI_SCLK", ++ "GPIO12", ++ "GPIO13", ++ /* Serial port */ ++ "TXD0", ++ "RXD0", ++ "GPIO16", ++ "GPIO17", ++ "GPIO18", ++ "GPIO19", ++ "GPIO20", ++ "GPIO21", ++ "GPIO22", ++ "GPIO23", ++ "GPIO24", ++ "GPIO25", ++ "GPIO26", ++ "GPIO27", ++ "SDA0", ++ "SCL0", ++ "NC", /* GPIO30 */ ++ "NC", /* GPIO31 */ ++ "CAM_GPIO1", /* GPIO32 */ ++ "NC", /* GPIO33 */ ++ "NC", /* GPIO34 */ ++ "PWR_LOW_N", /* GPIO35 */ ++ "NC", /* GPIO36 */ ++ "NC", /* GPIO37 */ ++ "USB_LIMIT", /* GPIO38 */ ++ "NC", /* GPIO39 */ ++ "PWM0_OUT", /* GPIO40 */ ++ "CAM_GPIO0", /* GPIO41 */ ++ "NC", /* GPIO42 */ ++ "NC", /* GPIO43 */ ++ "NC", /* GPIO44 */ ++ "PWM1_OUT", /* GPIO45 */ ++ "HDMI_HPD_N", ++ "STATUS_LED", ++ /* Used by SD Card */ ++ "SD_CLK_R", ++ "SD_CMD_R", ++ "SD_DATA0_R", ++ "SD_DATA1_R", ++ "SD_DATA2_R", ++ "SD_DATA3_R"; ++ ++ pinctrl-0 = <&gpioout &alt0 &i2s_alt0>; + + /* I2S interface */ + i2s_alt0: i2s_alt0 { +@@ -33,3 +99,9 @@ + &hdmi { + hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; + }; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_gpio14>; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/bcm2835-rpi-a.dts b/arch/arm/dts/bcm2835-rpi-a.dts +index 306a84ee98..4b1af06c8d 100644 +--- a/arch/arm/dts/bcm2835-rpi-a.dts ++++ b/arch/arm/dts/bcm2835-rpi-a.dts +@@ -1,6 +1,7 @@ + /dts-v1/; + #include "bcm2835.dtsi" + #include "bcm2835-rpi.dtsi" ++#include "bcm283x-rpi-usb-host.dtsi" + + / { + compatible = "raspberrypi,model-a", "brcm,bcm2835"; +@@ -14,7 +15,74 @@ + }; + + &gpio { +- pinctrl-0 = <&gpioout &alt0 &i2s_alt2 &alt3>; ++ /* ++ * Taken from Raspberry-Pi-Rev-1.0-Model-AB-Schematics.pdf ++ * RPI00021 sheet 02 ++ * ++ * Legend: ++ * "NC" = not connected (no rail from the SoC) ++ * "FOO" = GPIO line named "FOO" on the schematic ++ * "FOO_N" = GPIO line named "FOO" on schematic, active low ++ */ ++ gpio-line-names = "SDA0", ++ "SCL0", ++ "SDA1", ++ "SCL1", ++ "GPIO_GCLK", ++ "CAM_GPIO1", ++ "LAN_RUN", ++ "SPI_CE1_N", ++ "SPI_CE0_N", ++ "SPI_MISO", ++ "SPI_MOSI", ++ "SPI_SCLK", ++ "NC", /* GPIO12 */ ++ "NC", /* GPIO13 */ ++ /* Serial port */ ++ "TXD0", ++ "RXD0", ++ "STATUS_LED_N", ++ "GPIO17", ++ "GPIO18", ++ "NC", /* GPIO19 */ ++ "NC", /* GPIO20 */ ++ "GPIO21", ++ "GPIO22", ++ "GPIO23", ++ "GPIO24", ++ "GPIO25", ++ "NC", /* GPIO26 */ ++ "CAM_GPIO0", ++ /* Binary number representing build/revision */ ++ "CONFIG0", ++ "CONFIG1", ++ "CONFIG2", ++ "CONFIG3", ++ "NC", /* GPIO32 */ ++ "NC", /* GPIO33 */ ++ "NC", /* GPIO34 */ ++ "NC", /* GPIO35 */ ++ "NC", /* GPIO36 */ ++ "NC", /* GPIO37 */ ++ "NC", /* GPIO38 */ ++ "NC", /* GPIO39 */ ++ "PWM0_OUT", ++ "NC", /* GPIO41 */ ++ "NC", /* GPIO42 */ ++ "NC", /* GPIO43 */ ++ "NC", /* GPIO44 */ ++ "PWM1_OUT", ++ "HDMI_HPD_P", ++ "SD_CARD_DET", ++ /* Used by SD Card */ ++ "SD_CLK_R", ++ "SD_CMD_R", ++ "SD_DATA0_R", ++ "SD_DATA1_R", ++ "SD_DATA2_R", ++ "SD_DATA3_R"; ++ ++ pinctrl-0 = <&gpioout &alt0 &i2s_alt2>; + + /* I2S interface */ + i2s_alt2: i2s_alt2 { +@@ -26,3 +94,9 @@ + &hdmi { + hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; + }; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_gpio14>; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/bcm2835-rpi-b-plus.dts b/arch/arm/dts/bcm2835-rpi-b-plus.dts +index d5fdb8e761..a846f1e781 100644 +--- a/arch/arm/dts/bcm2835-rpi-b-plus.dts ++++ b/arch/arm/dts/bcm2835-rpi-b-plus.dts +@@ -2,6 +2,7 @@ + #include "bcm2835.dtsi" + #include "bcm2835-rpi.dtsi" + #include "bcm283x-rpi-smsc9514.dtsi" ++#include "bcm283x-rpi-usb-host.dtsi" + + / { + compatible = "raspberrypi,model-b-plus", "brcm,bcm2835"; +@@ -22,7 +23,73 @@ + }; + + &gpio { +- pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>; ++ /* ++ * Taken from Raspberry-Pi-B-Plus-V1.2-Schematics.pdf ++ * RPI-BPLUS sheet 1 ++ * ++ * Legend: ++ * "NC" = not connected (no rail from the SoC) ++ * "FOO" = GPIO line named "FOO" on the schematic ++ * "FOO_N" = GPIO line named "FOO" on schematic, active low ++ */ ++ gpio-line-names = "SDA0", ++ "SCL0", ++ "SDA1", ++ "SCL1", ++ "GPIO_GCLK", ++ "GPIO5", ++ "GPIO6", ++ "SPI_CE1_N", ++ "SPI_CE0_N", ++ "SPI_MISO", ++ "SPI_MOSI", ++ "SPI_SCLK", ++ "GPIO12", ++ "GPIO13", ++ /* Serial port */ ++ "TXD0", ++ "RXD0", ++ "GPIO16", ++ "GPIO17", ++ "GPIO18", ++ "GPIO19", ++ "GPIO20", ++ "GPIO21", ++ "GPIO22", ++ "GPIO23", ++ "GPIO24", ++ "GPIO25", ++ "GPIO26", ++ "GPIO27", ++ "SDA0", ++ "SCL0", ++ "NC", /* GPIO30 */ ++ "LAN_RUN", /* GPIO31 */ ++ "CAM_GPIO1", /* GPIO32 */ ++ "NC", /* GPIO33 */ ++ "NC", /* GPIO34 */ ++ "PWR_LOW_N", /* GPIO35 */ ++ "NC", /* GPIO36 */ ++ "NC", /* GPIO37 */ ++ "USB_LIMIT", /* GPIO38 */ ++ "NC", /* GPIO39 */ ++ "PWM0_OUT", /* GPIO40 */ ++ "CAM_GPIO0", /* GPIO41 */ ++ "NC", /* GPIO42 */ ++ "NC", /* GPIO43 */ ++ "ETHCLK", /* GPIO44 */ ++ "PWM1_OUT", /* GPIO45 */ ++ "HDMI_HPD_N", ++ "STATUS_LED", ++ /* Used by SD Card */ ++ "SD_CLK_R", ++ "SD_CMD_R", ++ "SD_DATA0_R", ++ "SD_DATA1_R", ++ "SD_DATA2_R", ++ "SD_DATA3_R"; ++ ++ pinctrl-0 = <&gpioout &alt0 &i2s_alt0>; + + /* I2S interface */ + i2s_alt0: i2s_alt0 { +@@ -34,3 +101,9 @@ + &hdmi { + hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; + }; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_gpio14>; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/dts/bcm2835-rpi-b-rev2.dts +index bfc4bd9b77..e860964e39 100644 +--- a/arch/arm/dts/bcm2835-rpi-b-rev2.dts ++++ b/arch/arm/dts/bcm2835-rpi-b-rev2.dts +@@ -2,6 +2,7 @@ + #include "bcm2835.dtsi" + #include "bcm2835-rpi.dtsi" + #include "bcm283x-rpi-smsc9512.dtsi" ++#include "bcm283x-rpi-usb-host.dtsi" + + / { + compatible = "raspberrypi,model-b-rev2", "brcm,bcm2835"; +@@ -15,7 +16,73 @@ + }; + + &gpio { +- pinctrl-0 = <&gpioout &alt0 &i2s_alt2 &alt3>; ++ /* ++ * Taken from Raspberry-Pi-Rev-2.0-Model-AB-Schematics.pdf ++ * RPI00022 sheet 02 ++ * ++ * Legend: ++ * "NC" = not connected (no rail from the SoC) ++ * "FOO" = GPIO line named "FOO" on the schematic ++ * "FOO_N" = GPIO line named "FOO" on schematic, active low ++ */ ++ gpio-line-names = "SDA0", ++ "SCL0", ++ "SDA1", ++ "SCL1", ++ "GPIO_GCLK", ++ "CAM_CLK", ++ "LAN_RUN", ++ "SPI_CE1_N", ++ "SPI_CE0_N", ++ "SPI_MISO", ++ "SPI_MOSI", ++ "SPI_SCLK", ++ "NC", /* GPIO12 */ ++ "NC", /* GPIO13 */ ++ /* Serial port */ ++ "TXD0", ++ "RXD0", ++ "STATUS_LED_N", ++ "GPIO17", ++ "GPIO18", ++ "NC", /* GPIO19 */ ++ "NC", /* GPIO20 */ ++ "CAM_GPIO", ++ "GPIO22", ++ "GPIO23", ++ "GPIO24", ++ "GPIO25", ++ "NC", /* GPIO26 */ ++ "GPIO27", ++ "GPIO28", ++ "GPIO29", ++ "GPIO30", ++ "GPIO31", ++ "NC", /* GPIO32 */ ++ "NC", /* GPIO33 */ ++ "NC", /* GPIO34 */ ++ "NC", /* GPIO35 */ ++ "NC", /* GPIO36 */ ++ "NC", /* GPIO37 */ ++ "NC", /* GPIO38 */ ++ "NC", /* GPIO39 */ ++ "PWM0_OUT", ++ "NC", /* GPIO41 */ ++ "NC", /* GPIO42 */ ++ "NC", /* GPIO43 */ ++ "NC", /* GPIO44 */ ++ "PWM1_OUT", ++ "HDMI_HPD_P", ++ "SD_CARD_DET", ++ /* Used by SD Card */ ++ "SD_CLK_R", ++ "SD_CMD_R", ++ "SD_DATA0_R", ++ "SD_DATA1_R", ++ "SD_DATA2_R", ++ "SD_DATA3_R"; ++ ++ pinctrl-0 = <&gpioout &alt0 &i2s_alt2>; + + /* I2S interface */ + i2s_alt2: i2s_alt2 { +@@ -27,3 +94,9 @@ + &hdmi { + hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; + }; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_gpio14>; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/bcm2835-rpi-b.dts b/arch/arm/dts/bcm2835-rpi-b.dts +index 0371bb7374..5d77f3f8c4 100644 +--- a/arch/arm/dts/bcm2835-rpi-b.dts ++++ b/arch/arm/dts/bcm2835-rpi-b.dts +@@ -2,6 +2,7 @@ + #include "bcm2835.dtsi" + #include "bcm2835-rpi.dtsi" + #include "bcm283x-rpi-smsc9512.dtsi" ++#include "bcm283x-rpi-usb-host.dtsi" + + / { + compatible = "raspberrypi,model-b", "brcm,bcm2835"; +@@ -15,9 +16,82 @@ + }; + + &gpio { +- pinctrl-0 = <&gpioout &alt0 &alt3>; ++ /* ++ * Taken from Raspberry-Pi-Rev-1.0-Model-AB-Schematics.pdf ++ * RPI00021 sheet 02 ++ * ++ * Legend: ++ * "NC" = not connected (no rail from the SoC) ++ * "FOO" = GPIO line named "FOO" on the schematic ++ * "FOO_N" = GPIO line named "FOO" on schematic, active low ++ */ ++ gpio-line-names = "SDA0", ++ "SCL0", ++ "SDA1", ++ "SCL1", ++ "GPIO_GCLK", ++ "CAM_GPIO1", ++ "LAN_RUN", ++ "SPI_CE1_N", ++ "SPI_CE0_N", ++ "SPI_MISO", ++ "SPI_MOSI", ++ "SPI_SCLK", ++ "NC", /* GPIO12 */ ++ "NC", /* GPIO13 */ ++ /* Serial port */ ++ "TXD0", ++ "RXD0", ++ "STATUS_LED_N", ++ "GPIO17", ++ "GPIO18", ++ "NC", /* GPIO19 */ ++ "NC", /* GPIO20 */ ++ "GPIO21", ++ "GPIO22", ++ "GPIO23", ++ "GPIO24", ++ "GPIO25", ++ "NC", /* GPIO26 */ ++ "CAM_GPIO0", ++ /* Binary number representing build/revision */ ++ "CONFIG0", ++ "CONFIG1", ++ "CONFIG2", ++ "CONFIG3", ++ "NC", /* GPIO32 */ ++ "NC", /* GPIO33 */ ++ "NC", /* GPIO34 */ ++ "NC", /* GPIO35 */ ++ "NC", /* GPIO36 */ ++ "NC", /* GPIO37 */ ++ "NC", /* GPIO38 */ ++ "NC", /* GPIO39 */ ++ "PWM0_OUT", ++ "NC", /* GPIO41 */ ++ "NC", /* GPIO42 */ ++ "NC", /* GPIO43 */ ++ "NC", /* GPIO44 */ ++ "PWM1_OUT", ++ "HDMI_HPD_P", ++ "SD_CARD_DET", ++ /* Used by SD Card */ ++ "SD_CLK_R", ++ "SD_CMD_R", ++ "SD_DATA0_R", ++ "SD_DATA1_R", ++ "SD_DATA2_R", ++ "SD_DATA3_R"; ++ ++ pinctrl-0 = <&gpioout &alt0>; + }; + + &hdmi { + hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>; + }; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_gpio14>; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/bcm2835-rpi.dtsi b/arch/arm/dts/bcm2835-rpi.dtsi +index e9b47b2bbc..8b95832dd0 100644 +--- a/arch/arm/dts/bcm2835-rpi.dtsi ++++ b/arch/arm/dts/bcm2835-rpi.dtsi +@@ -39,22 +39,21 @@ + }; + + alt0: alt0 { +- brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>; ++ brcm,pins = <4 5 7 8 9 10 11>; + brcm,function = ; + }; +- +- alt3: alt3 { +- brcm,pins = <48 49 50 51 52 53>; +- brcm,function = ; +- }; + }; + + &i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0_gpio0>; + status = "okay"; + clock-frequency = <100000>; + }; + + &i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_gpio2>; + status = "okay"; + clock-frequency = <100000>; + }; +@@ -64,11 +63,21 @@ + }; + + &sdhci { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emmc_gpio48>; + status = "okay"; + bus-width = <4>; + }; + ++&sdhost { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdhost_gpio48>; ++ bus-width = <4>; ++}; ++ + &pwm { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm0_gpio40 &pwm1_gpio45>; + status = "okay"; + }; + +@@ -84,3 +93,16 @@ + power-domains = <&power RPI_POWER_DOMAIN_HDMI>; + status = "okay"; + }; ++ ++&vec { ++ power-domains = <&power RPI_POWER_DOMAIN_VEC>; ++ status = "okay"; ++}; ++ ++&dsi0 { ++ power-domains = <&power RPI_POWER_DOMAIN_DSI0>; ++}; ++ ++&dsi1 { ++ power-domains = <&power RPI_POWER_DOMAIN_DSI1>; ++}; +diff --git a/arch/arm/dts/bcm2835.dtsi b/arch/arm/dts/bcm2835.dtsi +index a78759e737..659b6e9513 100644 +--- a/arch/arm/dts/bcm2835.dtsi ++++ b/arch/arm/dts/bcm2835.dtsi +@@ -23,3 +23,13 @@ + }; + }; + }; ++ ++&cpu_thermal { ++ coefficients = <(-538) 407000>; ++}; ++ ++/* enable thermal sensor with the correct compatible property set */ ++&thermal { ++ compatible = "brcm,bcm2835-thermal"; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/bcm2836-rpi-2-b.dts b/arch/arm/dts/bcm2836-rpi-2-b.dts +index 29e1cfe8eb..e8de41444b 100644 +--- a/arch/arm/dts/bcm2836-rpi-2-b.dts ++++ b/arch/arm/dts/bcm2836-rpi-2-b.dts +@@ -2,6 +2,7 @@ + #include "bcm2836.dtsi" + #include "bcm2835-rpi.dtsi" + #include "bcm283x-rpi-smsc9514.dtsi" ++#include "bcm283x-rpi-usb-host.dtsi" + + / { + compatible = "raspberrypi,2-model-b", "brcm,bcm2836"; +@@ -26,7 +27,7 @@ + }; + + &gpio { +- pinctrl-0 = <&gpioout &alt0 &i2s_alt0 &alt3>; ++ pinctrl-0 = <&gpioout &alt0 &i2s_alt0>; + + /* I2S interface */ + i2s_alt0: i2s_alt0 { +@@ -38,3 +39,9 @@ + &hdmi { + hpd-gpios = <&gpio 46 GPIO_ACTIVE_LOW>; + }; ++ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_gpio14>; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/bcm2836.dtsi b/arch/arm/dts/bcm2836.dtsi +index 9d0651d8f3..2c26d0be8b 100644 +--- a/arch/arm/dts/bcm2836.dtsi ++++ b/arch/arm/dts/bcm2836.dtsi +@@ -36,6 +36,7 @@ + cpus: cpus { + #address-cells = <1>; + #size-cells = <0>; ++ enable-method = "brcm,bcm2836-smp"; + + v7_cpu0: cpu@0 { + device_type = "cpu"; +@@ -76,3 +77,13 @@ + interrupt-parent = <&local_intc>; + interrupts = <8>; + }; ++ ++&cpu_thermal { ++ coefficients = <(-538) 407000>; ++}; ++ ++/* enable thermal sensor with the correct compatible property set */ ++&thermal { ++ compatible = "brcm,bcm2836-thermal"; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/bcm2837-rpi-3-b.dts b/arch/arm/dts/bcm2837-rpi-3-b.dts +index 7841b724e3..20725ca487 100644 +--- a/arch/arm/dts/bcm2837-rpi-3-b.dts ++++ b/arch/arm/dts/bcm2837-rpi-3-b.dts +@@ -2,6 +2,7 @@ + #include "bcm2837.dtsi" + #include "bcm2835-rpi.dtsi" + #include "bcm283x-rpi-smsc9514.dtsi" ++#include "bcm283x-rpi-usb-host.dtsi" + + / { + compatible = "raspberrypi,3-model-b", "brcm,bcm2837"; +@@ -15,16 +16,36 @@ + act { + gpios = <&gpio 47 0>; + }; +- +- pwr { +- label = "PWR"; +- gpios = <&gpio 35 0>; +- default-state = "keep"; +- linux,default-trigger = "default-on"; +- }; + }; + }; + ++/* uart0 communicates with the BT module */ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>; ++ status = "okay"; ++}; ++ ++/* uart1 is mapped to the pin header */ + &uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_gpio14>; ++ status = "okay"; ++}; ++ ++/* SDHCI is used to control the SDIO for wireless */ ++&sdhci { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emmc_gpio34>; ++ status = "okay"; ++ bus-width = <4>; ++ non-removable; ++}; ++ ++/* SDHOST is used to drive the SD card */ ++&sdhost { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdhost_gpio48>; + status = "okay"; ++ bus-width = <4>; + }; +diff --git a/arch/arm/dts/bcm2837.dtsi b/arch/arm/dts/bcm2837.dtsi +index 8216bbb29f..bc1cca5cf4 100644 +--- a/arch/arm/dts/bcm2837.dtsi ++++ b/arch/arm/dts/bcm2837.dtsi +@@ -1,7 +1,7 @@ + #include "bcm283x.dtsi" + + / { +- compatible = "brcm,bcm2836"; ++ compatible = "brcm,bcm2837"; + + soc { + ranges = <0x7e000000 0x3f000000 0x1000000>, +@@ -30,6 +30,7 @@ + cpus: cpus { + #address-cells = <1>; + #size-cells = <0>; ++ enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit + + cpu0: cpu@0 { + device_type = "cpu"; +@@ -74,3 +75,13 @@ + interrupt-parent = <&local_intc>; + interrupts = <8>; + }; ++ ++&cpu_thermal { ++ coefficients = <(-538) 412000>; ++}; ++ ++/* enable thermal sensor with the correct compatible property set */ ++&thermal { ++ compatible = "brcm,bcm2837-thermal"; ++ status = "okay"; ++}; +diff --git a/arch/arm/dts/bcm283x-rpi-smsc9512.dtsi b/arch/arm/dts/bcm283x-rpi-smsc9512.dtsi +index 12c981e511..9a0599f711 100644 +--- a/arch/arm/dts/bcm283x-rpi-smsc9512.dtsi ++++ b/arch/arm/dts/bcm283x-rpi-smsc9512.dtsi +@@ -1,6 +1,6 @@ + / { + aliases { +- ethernet = ðernet; ++ ethernet0 = ðernet; + }; + }; + +diff --git a/arch/arm/dts/bcm283x-rpi-smsc9514.dtsi b/arch/arm/dts/bcm283x-rpi-smsc9514.dtsi +index 3f0a56ebcf..dc7ae776db 100644 +--- a/arch/arm/dts/bcm283x-rpi-smsc9514.dtsi ++++ b/arch/arm/dts/bcm283x-rpi-smsc9514.dtsi +@@ -1,6 +1,6 @@ + / { + aliases { +- ethernet = ðernet; ++ ethernet0 = ðernet; + }; + }; + +diff --git a/arch/arm/dts/bcm283x-rpi-usb-host.dtsi b/arch/arm/dts/bcm283x-rpi-usb-host.dtsi +new file mode 100644 +index 0000000000..73f4ece8dc +--- /dev/null ++++ b/arch/arm/dts/bcm283x-rpi-usb-host.dtsi +@@ -0,0 +1,3 @@ ++&usb { ++ dr_mode = "host"; ++}; +diff --git a/arch/arm/dts/bcm283x.dtsi b/arch/arm/dts/bcm283x.dtsi +index e5b4f20c2a..05a6f489af 100644 +--- a/arch/arm/dts/bcm283x.dtsi ++++ b/arch/arm/dts/bcm283x.dtsi +@@ -3,6 +3,11 @@ + #include + #include + ++/* firmware-provided startup stubs live here, where the secondary CPUs are ++ * spinning. ++ */ ++/memreserve/ 0x00000000 0x00001000; ++ + /* This include file covers the common peripherals and configuration between + * bcm2835 and bcm2836 implementations, leaving the CPU configuration to + * bcm2835.dtsi and bcm2836.dtsi. +@@ -19,6 +24,26 @@ + bootargs = "earlyprintk console=ttyAMA0"; + }; + ++ thermal-zones { ++ cpu_thermal: cpu-thermal { ++ polling-delay-passive = <0>; ++ polling-delay = <1000>; ++ ++ thermal-sensors = <&thermal>; ++ ++ trips { ++ cpu-crit { ++ temperature = <80000>; ++ hysteresis = <0>; ++ type = "critical"; ++ }; ++ }; ++ ++ cooling-maps { ++ }; ++ }; ++ }; ++ + soc: soc { + compatible = "simple-bus"; + #address-cells = <1>; +@@ -93,10 +118,13 @@ + #clock-cells = <1>; + reg = <0x7e101000 0x2000>; + +- /* CPRMAN derives everything from the platform's +- * oscillator. ++ /* CPRMAN derives almost everything from the ++ * platform's oscillator. However, the DSI ++ * pixel clocks come from the DSI analog PHY. + */ +- clocks = <&clk_osc>; ++ clocks = <&clk_osc>, ++ <&dsi0 0>, <&dsi0 1>, <&dsi0 2>, ++ <&dsi1 0>, <&dsi1 1>, <&dsi1 2>; + }; + + rng@7e104000 { +@@ -104,7 +132,7 @@ + reg = <0x7e104000 0x10>; + }; + +- mailbox: mailbox@7e00b800 { ++ mailbox: mailbox@7e00b880 { + compatible = "brcm,bcm2835-mbox"; + reg = <0x7e00b880 0x40>; + interrupts = <0 1>; +@@ -132,6 +160,213 @@ + + interrupt-controller; + #interrupt-cells = <2>; ++ ++ /* Defines pin muxing groups according to ++ * BCM2835-ARM-Peripherals.pdf page 102. ++ * ++ * While each pin can have its mux selected ++ * for various functions individually, some ++ * groups only make sense to switch to a ++ * particular function together. ++ */ ++ dpi_gpio0: dpi_gpio0 { ++ brcm,pins = <0 1 2 3 4 5 6 7 8 9 10 11 ++ 12 13 14 15 16 17 18 19 ++ 20 21 22 23 24 25 26 27>; ++ brcm,function = ; ++ }; ++ emmc_gpio22: emmc_gpio22 { ++ brcm,pins = <22 23 24 25 26 27>; ++ brcm,function = ; ++ }; ++ emmc_gpio34: emmc_gpio34 { ++ brcm,pins = <34 35 36 37 38 39>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ emmc_gpio48: emmc_gpio48 { ++ brcm,pins = <48 49 50 51 52 53>; ++ brcm,function = ; ++ }; ++ ++ gpclk0_gpio4: gpclk0_gpio4 { ++ brcm,pins = <4>; ++ brcm,function = ; ++ }; ++ gpclk1_gpio5: gpclk1_gpio5 { ++ brcm,pins = <5>; ++ brcm,function = ; ++ }; ++ gpclk1_gpio42: gpclk1_gpio42 { ++ brcm,pins = <42>; ++ brcm,function = ; ++ }; ++ gpclk1_gpio44: gpclk1_gpio44 { ++ brcm,pins = <44>; ++ brcm,function = ; ++ }; ++ gpclk2_gpio6: gpclk2_gpio6 { ++ brcm,pins = <6>; ++ brcm,function = ; ++ }; ++ gpclk2_gpio43: gpclk2_gpio43 { ++ brcm,pins = <43>; ++ brcm,function = ; ++ }; ++ ++ i2c0_gpio0: i2c0_gpio0 { ++ brcm,pins = <0 1>; ++ brcm,function = ; ++ }; ++ i2c0_gpio28: i2c0_gpio28 { ++ brcm,pins = <28 29>; ++ brcm,function = ; ++ }; ++ i2c0_gpio44: i2c0_gpio44 { ++ brcm,pins = <44 45>; ++ brcm,function = ; ++ }; ++ i2c1_gpio2: i2c1_gpio2 { ++ brcm,pins = <2 3>; ++ brcm,function = ; ++ }; ++ i2c1_gpio44: i2c1_gpio44 { ++ brcm,pins = <44 45>; ++ brcm,function = ; ++ }; ++ i2c_slave_gpio18: i2c_slave_gpio18 { ++ brcm,pins = <18 19 20 21>; ++ brcm,function = ; ++ }; ++ ++ jtag_gpio4: jtag_gpio4 { ++ brcm,pins = <4 5 6 12 13>; ++ brcm,function = ; ++ }; ++ jtag_gpio22: jtag_gpio22 { ++ brcm,pins = <22 23 24 25 26 27>; ++ brcm,function = ; ++ }; ++ ++ pcm_gpio18: pcm_gpio18 { ++ brcm,pins = <18 19 20 21>; ++ brcm,function = ; ++ }; ++ pcm_gpio28: pcm_gpio28 { ++ brcm,pins = <28 29 30 31>; ++ brcm,function = ; ++ }; ++ ++ pwm0_gpio12: pwm0_gpio12 { ++ brcm,pins = <12>; ++ brcm,function = ; ++ }; ++ pwm0_gpio18: pwm0_gpio18 { ++ brcm,pins = <18>; ++ brcm,function = ; ++ }; ++ pwm0_gpio40: pwm0_gpio40 { ++ brcm,pins = <40>; ++ brcm,function = ; ++ }; ++ pwm1_gpio13: pwm1_gpio13 { ++ brcm,pins = <13>; ++ brcm,function = ; ++ }; ++ pwm1_gpio19: pwm1_gpio19 { ++ brcm,pins = <19>; ++ brcm,function = ; ++ }; ++ pwm1_gpio41: pwm1_gpio41 { ++ brcm,pins = <41>; ++ brcm,function = ; ++ }; ++ pwm1_gpio45: pwm1_gpio45 { ++ brcm,pins = <45>; ++ brcm,function = ; ++ }; ++ ++ sdhost_gpio48: sdhost_gpio48 { ++ brcm,pins = <48 49 50 51 52 53>; ++ brcm,function = ; ++ }; ++ ++ spi0_gpio7: spi0_gpio7 { ++ brcm,pins = <7 8 9 10 11>; ++ brcm,function = ; ++ }; ++ spi0_gpio35: spi0_gpio35 { ++ brcm,pins = <35 36 37 38 39>; ++ brcm,function = ; ++ }; ++ spi1_gpio16: spi1_gpio16 { ++ brcm,pins = <16 17 18 19 20 21>; ++ brcm,function = ; ++ }; ++ spi2_gpio40: spi2_gpio40 { ++ brcm,pins = <40 41 42 43 44 45>; ++ brcm,function = ; ++ }; ++ ++ uart0_gpio14: uart0_gpio14 { ++ brcm,pins = <14 15>; ++ brcm,function = ; ++ }; ++ /* Separate from the uart0_gpio14 group ++ * because it conflicts with spi1_gpio16, and ++ * people often run uart0 on the two pins ++ * without flow control. ++ */ ++ uart0_ctsrts_gpio16: uart0_ctsrts_gpio16 { ++ brcm,pins = <16 17>; ++ brcm,function = ; ++ }; ++ uart0_ctsrts_gpio30: uart0_ctsrts_gpio30 { ++ brcm,pins = <30 31>; ++ brcm,function = ; ++ }; ++ uart0_gpio32: uart0_gpio32 { ++ brcm,pins = <32 33>; ++ brcm,function = ; ++ }; ++ uart0_gpio36: uart0_gpio36 { ++ brcm,pins = <36 37>; ++ brcm,function = ; ++ }; ++ uart0_ctsrts_gpio38: uart0_ctsrts_gpio38 { ++ brcm,pins = <38 39>; ++ brcm,function = ; ++ }; ++ ++ uart1_gpio14: uart1_gpio14 { ++ brcm,pins = <14 15>; ++ brcm,function = ; ++ }; ++ uart1_ctsrts_gpio16: uart1_ctsrts_gpio16 { ++ brcm,pins = <16 17>; ++ brcm,function = ; ++ }; ++ uart1_gpio32: uart1_gpio32 { ++ brcm,pins = <32 33>; ++ brcm,function = ; ++ }; ++ uart1_ctsrts_gpio30: uart1_ctsrts_gpio30 { ++ brcm,pins = <30 31>; ++ brcm,function = ; ++ }; ++ uart1_gpio40: uart1_gpio40 { ++ brcm,pins = <40 41>; ++ brcm,function = ; ++ }; ++ uart1_ctsrts_gpio42: uart1_ctsrts_gpio42 { ++ brcm,pins = <42 43>; ++ brcm,function = ; ++ }; + }; + + uart0: serial@7e201000 { +@@ -144,6 +379,16 @@ + arm,primecell-periphid = <0x00241011>; + }; + ++ sdhost: mmc@7e202000 { ++ compatible = "brcm,bcm2835-sdhost"; ++ reg = <0x7e202000 0x100>; ++ interrupts = <2 24>; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ dmas = <&dma 13>; ++ dma-names = "rx-tx"; ++ status = "disabled"; ++ }; ++ + i2s: i2s@7e203000 { + compatible = "brcm,bcm2835-i2s"; + reg = <0x7e203000 0x20>, +@@ -187,6 +432,33 @@ + interrupts = <2 14>; /* pwa1 */ + }; + ++ dsi0: dsi@7e209000 { ++ compatible = "brcm,bcm2835-dsi0"; ++ reg = <0x7e209000 0x78>; ++ interrupts = <2 4>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ #clock-cells = <1>; ++ ++ clocks = <&clocks BCM2835_PLLA_DSI0>, ++ <&clocks BCM2835_CLOCK_DSI0E>, ++ <&clocks BCM2835_CLOCK_DSI0P>; ++ clock-names = "phy", "escape", "pixel"; ++ ++ clock-output-names = "dsi0_byte", ++ "dsi0_ddr2", ++ "dsi0_ddr"; ++ ++ }; ++ ++ thermal: thermal@7e212000 { ++ compatible = "brcm,bcm2835-thermal"; ++ reg = <0x7e212000 0x8>; ++ clocks = <&clocks BCM2835_CLOCK_TSENS>; ++ #thermal-sensor-cells = <0>; ++ status = "disabled"; ++ }; ++ + aux: aux@0x7e215000 { + compatible = "brcm,bcm2835-aux"; + #clock-cells = <1>; +@@ -246,6 +518,26 @@ + interrupts = <2 1>; + }; + ++ dsi1: dsi@7e700000 { ++ compatible = "brcm,bcm2835-dsi1"; ++ reg = <0x7e700000 0x8c>; ++ interrupts = <2 12>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ #clock-cells = <1>; ++ ++ clocks = <&clocks BCM2835_PLLD_DSI1>, ++ <&clocks BCM2835_CLOCK_DSI1E>, ++ <&clocks BCM2835_CLOCK_DSI1P>; ++ clock-names = "phy", "escape", "pixel"; ++ ++ clock-output-names = "dsi1_byte", ++ "dsi1_ddr2", ++ "dsi1_ddr"; ++ ++ status = "disabled"; ++ }; ++ + i2c1: i2c@7e804000 { + compatible = "brcm,bcm2835-i2c"; + reg = <0x7e804000 0x1000>; +@@ -266,6 +558,14 @@ + status = "disabled"; + }; + ++ vec: vec@7e806000 { ++ compatible = "brcm,bcm2835-vec"; ++ reg = <0x7e806000 0x1000>; ++ clocks = <&clocks BCM2835_CLOCK_VEC>; ++ interrupts = <2 27>; ++ status = "disabled"; ++ }; ++ + pixelvalve@7e807000 { + compatible = "brcm,bcm2835-pixelvalve2"; + reg = <0x7e807000 0x100>; +@@ -281,6 +581,8 @@ + clocks = <&clocks BCM2835_PLLH_PIX>, + <&clocks BCM2835_CLOCK_HSM>; + clock-names = "pixel", "hdmi"; ++ dmas = <&dma 17>; ++ dma-names = "audio-rx"; + status = "disabled"; + }; + +@@ -290,6 +592,10 @@ + interrupts = <1 9>; + #address-cells = <1>; + #size-cells = <0>; ++ clocks = <&clk_usb>; ++ clock-names = "otg"; ++ phys = <&usbphy>; ++ phy-names = "usb2-phy"; + }; + + v3d: v3d@7ec00000 { +@@ -317,6 +623,17 @@ + clock-frequency = <19200000>; + }; + ++ clk_usb: clock@4 { ++ compatible = "fixed-clock"; ++ reg = <4>; ++ #clock-cells = <0>; ++ clock-output-names = "otg"; ++ clock-frequency = <480000000>; ++ }; ++ }; ++ ++ usbphy: phy { ++ compatible = "usb-nop-xceiv"; + }; + }; + +diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h +index 360e00cefd..a0c812b0fa 100644 +--- a/include/dt-bindings/clock/bcm2835.h ++++ b/include/dt-bindings/clock/bcm2835.h +@@ -64,3 +64,5 @@ + #define BCM2835_CLOCK_CAM1 46 + #define BCM2835_CLOCK_DSI0E 47 + #define BCM2835_CLOCK_DSI1E 48 ++#define BCM2835_CLOCK_DSI0P 49 ++#define BCM2835_CLOCK_DSI1P 50 +diff --git a/include/dt-bindings/pinctrl/bcm2835.h b/include/dt-bindings/pinctrl/bcm2835.h +index 6f0bc37af3..e4e4fdf5d3 100644 +--- a/include/dt-bindings/pinctrl/bcm2835.h ++++ b/include/dt-bindings/pinctrl/bcm2835.h +@@ -24,4 +24,9 @@ + #define BCM2835_FSEL_ALT2 6 + #define BCM2835_FSEL_ALT3 7 + ++/* brcm,pull property */ ++#define BCM2835_PUD_OFF 0 ++#define BCM2835_PUD_DOWN 1 ++#define BCM2835_PUD_UP 2 ++ + #endif /* __DT_BINDINGS_PINCTRL_BCM2835_H__ */ diff --git a/disk-part_dos-Use-the-original-allocation-scheme-for-the-SPL-case.patch b/disk-part_dos-Use-the-original-allocation-scheme-for-the-SPL-case.patch new file mode 100644 index 0000000..aa9f81e --- /dev/null +++ b/disk-part_dos-Use-the-original-allocation-scheme-for-the-SPL-case.patch @@ -0,0 +1,70 @@ +From patchwork Wed Oct 4 16:29:57 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot] disk: part_dos: Use the original allocation scheme for the + SPL case +X-Patchwork-Submitter: Fabio Estevam +X-Patchwork-Id: 821393 +Message-Id: <1507134597-6831-1-git-send-email-fabio.estevam@nxp.com> +To: +Cc: u-boot@lists.denx.de, pjones@redhat.com, + Fabio Estevam +Date: Wed, 4 Oct 2017 13:29:57 -0300 +From: Fabio Estevam +List-Id: U-Boot discussion + +Since commit ff98cb90514d ("part: extract MBR signature from partitions") +SPL boot on i.MX6 starts to fail: + +U-Boot SPL 2017.09-00221-g0d6ab32 (Oct 02 2017 - 15:13:19) +Trying to boot from MMC1 +(keep in loop) + +Use the original allocation scheme for the SPL case, so that MX6 boards +can boot again. + +This is a temporary solution to avoid the boot regression. + +Signed-off-by: Fabio Estevam +Acked-by: Rob Clark +--- +Hi Tom, + +I do not have time this week to further investigate and narrow down +this problem. + +Using the old allocation scheme fixes the mx6 SPL boot problem. + + + disk/part_dos.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/disk/part_dos.c b/disk/part_dos.c +index 1a36be0..6dd2c2d 100644 +--- a/disk/part_dos.c ++++ b/disk/part_dos.c +@@ -89,6 +89,7 @@ static int test_block_type(unsigned char *buffer) + + static int part_test_dos(struct blk_desc *dev_desc) + { ++#ifndef CONFIG_SPL_BUILD + ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, dev_desc->blksz); + + if (blk_dread(dev_desc, 0, 1, (ulong *)mbr) != 1) +@@ -102,6 +103,15 @@ static int part_test_dos(struct blk_desc *dev_desc) + dev_desc->sig_type = SIG_TYPE_MBR; + dev_desc->mbr_sig = mbr->unique_mbr_signature; + } ++#else ++ ALLOC_CACHE_ALIGN_BUFFER(unsigned char, buffer, dev_desc->blksz); ++ ++ if (blk_dread(dev_desc, 0, 1, (ulong *)buffer) != 1) ++ return -1; ++ ++ if (test_block_type(buffer) != DOS_MBR) ++ return -1; ++#endif + + return 0; + } diff --git a/dragonboard-fixes.patch b/dragonboard-fixes.patch index 4a8ee44..ad11779 100644 --- a/dragonboard-fixes.patch +++ b/dragonboard-fixes.patch @@ -642,51 +642,6 @@ index d9dc639aeb..626dff8dcd 100644 -- 2.13.3 -From 76fba480e6ee494e2e01c19bb8952f42a3b6a710 Mon Sep 17 00:00:00 2001 -From: Rob Clark -Date: Mon, 3 Jul 2017 09:15:44 -0400 -Subject: [PATCH 12/23] usb: kbd: don't fail with iomux - -stdin might not be set, which would cause iomux_doenv() to fail -therefore causing probe_usb_keyboard() to fail. Furthermore if we do -have iomux enabled, the sensible thing (in terms of user experience) -would be to simply add ourselves to the list of stdin devices. - -Signed-off-by: Rob Clark ---- - common/usb_kbd.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/common/usb_kbd.c b/common/usb_kbd.c -index d2d29cc98f..703dd748f5 100644 ---- a/common/usb_kbd.c -+++ b/common/usb_kbd.c -@@ -517,7 +517,22 @@ - - stdinname = env_get("stdin"); - #if CONFIG_IS_ENABLED(CONSOLE_MUX) -+ char *devname = DEVNAME; -+ /* -+ * stdin might not be set yet.. either way, with console-mux the -+ * sensible thing to do is add ourselves to the list of stdio -+ * devices: -+ */ -+ if (stdinname && !strstr(stdinname, DEVNAME)) { -+ char *newstdin = malloc(strlen(stdinname) + strlen(","DEVNAME) + 1); -+ sprintf(newstdin, "%s,"DEVNAME, stdinname); -+ stdinname = newstdin; -+ } else if (!stdinname) { -+ stdinname = devname; -+ } - error = iomux_doenv(stdin, stdinname); -+ if (stdinname != devname) -+ free(stdinname); - if (error) - return error; - #else --- -2.13.3 - From 2bf6ff0703fa92755469d8f218a75b07008e9768 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Sep 2017 09:34:30 +0100 diff --git a/mx6-Avoid-calling-setup_display-from-SPL-code.patch b/mx6-Avoid-calling-setup_display-from-SPL-code.patch deleted file mode 100644 index bc421b3..0000000 --- a/mx6-Avoid-calling-setup_display-from-SPL-code.patch +++ /dev/null @@ -1,330 +0,0 @@ -From patchwork Sat Sep 23 02:45:28 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot,1/6] mx6sabresd: Avoid calling setup_display() from SPL code -X-Patchwork-Submitter: Fabio Estevam -X-Patchwork-Id: 817753 -Message-Id: <1506134733-30962-1-git-send-email-festevam@gmail.com> -To: sbabic@denx.de -Cc: Fabio Estevam , u-boot@lists.denx.de, - max.krummenacher@toradex.com -Date: Fri, 22 Sep 2017 23:45:28 -0300 -From: Fabio Estevam -List-Id: U-Boot discussion - -From: Fabio Estevam - -There is no need call setup_display() from SPL code, so move it to -board_init(), which executes only in U-Boot proper. - -Reported-by: Stefano Babic -Signed-off-by: Fabio Estevam -Reviewed-by: Stefano Babic ---- - board/freescale/mx6sabresd/mx6sabresd.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c -index 5b50bc8..f14b759 100644 ---- a/board/freescale/mx6sabresd/mx6sabresd.c -+++ b/board/freescale/mx6sabresd/mx6sabresd.c -@@ -620,9 +620,6 @@ int board_ehci_power(int port, int on) - int board_early_init_f(void) - { - setup_iomux_uart(); --#if defined(CONFIG_VIDEO_IPUV3) -- setup_display(); --#endif - - return 0; - } -@@ -639,6 +636,9 @@ int board_init(void) - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c_pad_info1); - else - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1); -+#if defined(CONFIG_VIDEO_IPUV3) -+ setup_display(); -+#endif - #ifdef CONFIG_USB_EHCI_MX6 - setup_usb(); - #endif - -From patchwork Sat Sep 23 02:45:29 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot, 2/6] cgtqmx6eval: Avoid calling setup_display() from SPL code -X-Patchwork-Submitter: Fabio Estevam -X-Patchwork-Id: 817755 -Message-Id: <1506134733-30962-2-git-send-email-festevam@gmail.com> -To: sbabic@denx.de -Cc: Fabio Estevam , u-boot@lists.denx.de, - max.krummenacher@toradex.com -Date: Fri, 22 Sep 2017 23:45:29 -0300 -From: Fabio Estevam -List-Id: U-Boot discussion - -From: Fabio Estevam - -There is no need call setup_display() from SPL code, so move it to -board_init(), which executes only in U-Boot proper. - -Reported-by: Stefano Babic -Signed-off-by: Fabio Estevam -Reviewed-by: Stefano Babic ---- - board/congatec/cgtqmx6eval/cgtqmx6eval.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/board/congatec/cgtqmx6eval/cgtqmx6eval.c b/board/congatec/cgtqmx6eval/cgtqmx6eval.c -index 2ed66d3..d42cc94 100644 ---- a/board/congatec/cgtqmx6eval/cgtqmx6eval.c -+++ b/board/congatec/cgtqmx6eval/cgtqmx6eval.c -@@ -683,8 +683,6 @@ int overwrite_console(void) - int board_early_init_f(void) - { - setup_iomux_uart(); -- setup_display(); -- - #ifdef CONFIG_MXC_SPI - setup_spi(); - #endif -@@ -702,6 +700,8 @@ int board_init(void) - else - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c_pad_info1); - -+ setup_display(); -+ - #ifdef CONFIG_SATA - setup_sata(); - #endif - -From patchwork Sat Sep 23 02:45:30 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot,3/6] wandboard: Avoid calling setup_display() from SPL code -X-Patchwork-Submitter: Fabio Estevam -X-Patchwork-Id: 817757 -Message-Id: <1506134733-30962-3-git-send-email-festevam@gmail.com> -To: sbabic@denx.de -Cc: Fabio Estevam , u-boot@lists.denx.de, - max.krummenacher@toradex.com -Date: Fri, 22 Sep 2017 23:45:30 -0300 -From: Fabio Estevam -List-Id: U-Boot discussion - -From: Fabio Estevam - -There is no need call setup_display() from SPL code, so move it to -board_init(), which executes only in U-Boot proper. - -Reported-by: Stefano Babic -Signed-off-by: Fabio Estevam -Reviewed-by: Stefano Babic ---- - board/wandboard/wandboard.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/board/wandboard/wandboard.c b/board/wandboard/wandboard.c -index adfcf48..dde4988 100644 ---- a/board/wandboard/wandboard.c -+++ b/board/wandboard/wandboard.c -@@ -376,9 +376,6 @@ int board_eth_init(bd_t *bis) - int board_early_init_f(void) - { - setup_iomux_uart(); --#if defined(CONFIG_VIDEO_IPUV3) -- setup_display(); --#endif - #ifdef CONFIG_SATA - /* Only mx6q wandboard has SATA */ - if (is_cpu_type(MXC_CPU_MX6Q)) -@@ -448,6 +445,8 @@ int board_init(void) - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6q_i2c2_pad_info); - else - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &mx6dl_i2c2_pad_info); -+ -+ setup_display(); - #endif - - return 0; - -From patchwork Sat Sep 23 02:45:31 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot,4/6] mx6cuboxi: Avoid calling setup_display() from SPL code -X-Patchwork-Submitter: Fabio Estevam -X-Patchwork-Id: 817756 -Message-Id: <1506134733-30962-4-git-send-email-festevam@gmail.com> -To: sbabic@denx.de -Cc: Fabio Estevam , u-boot@lists.denx.de, - max.krummenacher@toradex.com -Date: Fri, 22 Sep 2017 23:45:31 -0300 -From: Fabio Estevam -List-Id: U-Boot discussion - -From: Fabio Estevam - -There is no need call setup_display() from SPL code, so move it to -board_init(), which executes only in U-Boot proper. - -Reported-by: Stefano Babic -Signed-off-by: Fabio Estevam -Reviewed-by: Stefano Babic ---- - board/solidrun/mx6cuboxi/mx6cuboxi.c | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/board/solidrun/mx6cuboxi/mx6cuboxi.c b/board/solidrun/mx6cuboxi/mx6cuboxi.c -index 1e4da4a..ee9e4f7 100644 ---- a/board/solidrun/mx6cuboxi/mx6cuboxi.c -+++ b/board/solidrun/mx6cuboxi/mx6cuboxi.c -@@ -308,13 +308,8 @@ int board_ehci_hcd_init(int port) - - int board_early_init_f(void) - { -- int ret = 0; - setup_iomux_uart(); - --#ifdef CONFIG_VIDEO_IPUV3 -- ret = setup_display(); --#endif -- - #ifdef CONFIG_CMD_SATA - setup_sata(); - #endif -@@ -322,15 +317,21 @@ int board_early_init_f(void) - #ifdef CONFIG_USB_EHCI_MX6 - setup_usb(); - #endif -- return ret; -+ return 0; - } - - int board_init(void) - { -+ int ret = 0; -+ - /* address of boot parameters */ - gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; - -- return 0; -+#ifdef CONFIG_VIDEO_IPUV3 -+ ret = setup_display(); -+#endif -+ -+ return ret; - } - - static bool is_hummingboard(void) - -From patchwork Sat Sep 23 02:45:32 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot, 5/6] apalis_imx6: Avoid calling setup_display() from SPL code -X-Patchwork-Submitter: Fabio Estevam -X-Patchwork-Id: 817754 -Message-Id: <1506134733-30962-5-git-send-email-festevam@gmail.com> -To: sbabic@denx.de -Cc: Fabio Estevam , u-boot@lists.denx.de, - max.krummenacher@toradex.com -Date: Fri, 22 Sep 2017 23:45:32 -0300 -From: Fabio Estevam -List-Id: U-Boot discussion - -From: Fabio Estevam - -There is no need call setup_display() from SPL code, so move it to -board_init(), which executes only in U-Boot proper. - -Reported-by: Stefano Babic -Signed-off-by: Fabio Estevam -Reviewed-by: Max Krummenacher ---- - board/toradex/apalis_imx6/apalis_imx6.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/board/toradex/apalis_imx6/apalis_imx6.c b/board/toradex/apalis_imx6/apalis_imx6.c -index 628a61d..b86dde8 100644 ---- a/board/toradex/apalis_imx6/apalis_imx6.c -+++ b/board/toradex/apalis_imx6/apalis_imx6.c -@@ -756,10 +756,6 @@ int board_early_init_f(void) - #else - setup_iomux_dce_uart(); - #endif -- --#if defined(CONFIG_VIDEO_IPUV3) -- setup_display(); --#endif - return 0; - } - -@@ -781,6 +777,10 @@ int board_init(void) - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc); - setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info3); - -+#if defined(CONFIG_VIDEO_IPUV3) -+ setup_display(); -+#endif -+ - #ifdef CONFIG_TDX_CMD_IMX_MFGR - (void) pmic_init(); - #endif - -From patchwork Sat Sep 23 02:45:33 2017 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [U-Boot, - 6/6] colibri_imx6: Avoid calling setup_display() from SPL code -X-Patchwork-Submitter: Fabio Estevam -X-Patchwork-Id: 817758 -Message-Id: <1506134733-30962-6-git-send-email-festevam@gmail.com> -To: sbabic@denx.de -Cc: Fabio Estevam , u-boot@lists.denx.de, - max.krummenacher@toradex.com -Date: Fri, 22 Sep 2017 23:45:33 -0300 -From: Fabio Estevam -List-Id: U-Boot discussion - -From: Fabio Estevam - -There is no need call setup_display() from SPL code, so move it to -board_init(), which executes only in U-Boot proper. - -Reported-by: Stefano Babic -Signed-off-by: Fabio Estevam -Tested-by: Max Krummenacher ---- - board/toradex/colibri_imx6/colibri_imx6.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c -index 756e3f3..a2a4214 100644 ---- a/board/toradex/colibri_imx6/colibri_imx6.c -+++ b/board/toradex/colibri_imx6/colibri_imx6.c -@@ -630,9 +630,6 @@ int board_early_init_f(void) - ARRAY_SIZE(pwr_intb_pads)); - setup_iomux_uart(); - --#if defined(CONFIG_VIDEO_IPUV3) -- setup_display(); --#endif - return 0; - } - -@@ -653,6 +650,10 @@ int board_init(void) - setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); - setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info_loc); - -+#if defined(CONFIG_VIDEO_IPUV3) -+ setup_display(); -+#endif -+ - #ifdef CONFIG_TDX_CMD_IMX_MFGR - (void) pmic_init(); - #endif diff --git a/sunxi-A83T-improvements.patch b/sunxi-A83T-improvements.patch new file mode 100644 index 0000000..c658a8c --- /dev/null +++ b/sunxi-A83T-improvements.patch @@ -0,0 +1,541 @@ +From patchwork Fri Sep 22 07:26:27 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot,1/9] sunxi: rename Bananapi M3 dts file name +X-Patchwork-Submitter: Chen-Yu Tsai +X-Patchwork-Id: 817346 +X-Patchwork-Delegate: jagannadh.teki@gmail.com +Message-Id: <20170922072635.32105-2-wens@csie.org> +To: u-boot@lists.denx.de +Cc: Joe Hershberger , Jagan Teki , + Maxime Ripard +Date: Fri, 22 Sep 2017 15:26:27 +0800 +From: Chen-Yu Tsai +List-Id: U-Boot discussion + +The upstream (Linux) device tree file for the Bananapi M3 follows the +convention of using the well known brand name, instead of the vendor +name, for naming. The file was recently added to upstream in commit +359b5a1e1c2d ("ARM: sun8i: a83t: Add device tree for Sinovoip Bananapi +BPI-M3") + +Rename the device tree file in U-boot to match. + +Signed-off-by: Chen-Yu Tsai +--- + arch/arm/dts/Makefile | 4 ++-- + .../{sun8i-a83t-sinovoip-bpi-m3.dts => sun8i-a83t-bananapi-m3.dts} | 0 + configs/Sinovoip_BPI_M3_defconfig | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + rename arch/arm/dts/{sun8i-a83t-sinovoip-bpi-m3.dts => sun8i-a83t-bananapi-m3.dts} (100%) + +diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile +index 762429c463d1..b7550104c340 100644 +--- a/arch/arm/dts/Makefile ++++ b/arch/arm/dts/Makefile +@@ -307,8 +307,8 @@ dtb-$(CONFIG_MACH_SUN8I_A33) += \ + sun8i-r16-parrot.dtb + dtb-$(CONFIG_MACH_SUN8I_A83T) += \ + sun8i-a83t-allwinner-h8homlet-v2.dtb \ +- sun8i-a83t-cubietruck-plus.dtb \ +- sun8i-a83t-sinovoip-bpi-m3.dtb ++ sun8i-a83t-bananapi-m3.dtb \ ++ sun8i-a83t-cubietruck-plus.dtb + dtb-$(CONFIG_MACH_SUN8I_H3) += \ + sun8i-h2-plus-orangepi-zero.dtb \ + sun8i-h3-bananapi-m2-plus.dtb \ +diff --git a/arch/arm/dts/sun8i-a83t-sinovoip-bpi-m3.dts b/arch/arm/dts/sun8i-a83t-bananapi-m3.dts +similarity index 100% +rename from arch/arm/dts/sun8i-a83t-sinovoip-bpi-m3.dts +rename to arch/arm/dts/sun8i-a83t-bananapi-m3.dts +diff --git a/configs/Sinovoip_BPI_M3_defconfig b/configs/Sinovoip_BPI_M3_defconfig +index 04d81693ebd8..f321d94e04eb 100644 +--- a/configs/Sinovoip_BPI_M3_defconfig ++++ b/configs/Sinovoip_BPI_M3_defconfig +@@ -13,7 +13,7 @@ CONFIG_USB0_ID_DET="PH11" + CONFIG_USB1_VBUS_PIN="PD24" + CONFIG_AXP_GPIO=y + CONFIG_SATAPWR="PD25" +-CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-sinovoip-bpi-m3" ++CONFIG_DEFAULT_DEVICE_TREE="sun8i-a83t-bananapi-m3" + # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set + CONFIG_CONSOLE_MUX=y + CONFIG_SPL=y + +From patchwork Fri Sep 22 07:26:28 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot,2/9] sunxi: Enable eMMC on Cubietruck Plus +X-Patchwork-Submitter: Chen-Yu Tsai +X-Patchwork-Id: 817342 +X-Patchwork-Delegate: jagannadh.teki@gmail.com +Message-Id: <20170922072635.32105-3-wens@csie.org> +To: u-boot@lists.denx.de +Cc: Joe Hershberger , Jagan Teki , + Maxime Ripard +Date: Fri, 22 Sep 2017 15:26:28 +0800 +From: Chen-Yu Tsai +List-Id: U-Boot discussion + +Set CONFIG_MMC_SUNXI_SLOT_EXTRA=2 to enable the eMMC controller to +access eMMC on the board. + +Signed-off-by: Chen-Yu Tsai +--- + configs/Cubietruck_plus_defconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configs/Cubietruck_plus_defconfig b/configs/Cubietruck_plus_defconfig +index 34444ec0bd09..3d999192cbc1 100644 +--- a/configs/Cubietruck_plus_defconfig ++++ b/configs/Cubietruck_plus_defconfig +@@ -4,6 +4,7 @@ CONFIG_MACH_SUN8I_A83T=y + CONFIG_DRAM_CLK=672 + CONFIG_DRAM_ZQ=15355 + CONFIG_DRAM_ODT_EN=y ++CONFIG_MMC_SUNXI_SLOT_EXTRA=2 + CONFIG_USB0_VBUS_PIN="AXP0-VBUS-ENABLE" + CONFIG_USB0_VBUS_DET="AXP0-VBUS-DETECT" + CONFIG_USB0_ID_DET="PH11" + +From patchwork Fri Sep 22 07:26:29 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot,3/9] sunxi: Fix USB PHY control register offset for A83T +X-Patchwork-Submitter: Chen-Yu Tsai +X-Patchwork-Id: 817341 +X-Patchwork-Delegate: jagannadh.teki@gmail.com +Message-Id: <20170922072635.32105-4-wens@csie.org> +To: u-boot@lists.denx.de +Cc: Joe Hershberger , Jagan Teki , + Maxime Ripard +Date: Fri, 22 Sep 2017 15:26:29 +0800 +From: Chen-Yu Tsai +List-Id: U-Boot discussion + +It was recently discovered that the USB PHY control register offset on +the A83T is 0x410 like on the A33, not 0x404. Fix it. + +Fixes: 0c935acb9e5d ("sunxi: usb_phy: Add support for A83T USB PHYs") +Signed-off-by: Chen-Yu Tsai +--- + arch/arm/mach-sunxi/usb_phy.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/arm/mach-sunxi/usb_phy.c b/arch/arm/mach-sunxi/usb_phy.c +index 9bf0b5633d4a..3fbef0050e3f 100644 +--- a/arch/arm/mach-sunxi/usb_phy.c ++++ b/arch/arm/mach-sunxi/usb_phy.c +@@ -19,7 +19,7 @@ + #include + + #define SUNXI_USB_PMU_IRQ_ENABLE 0x800 +-#ifdef CONFIG_MACH_SUN8I_A33 ++#if defined CONFIG_MACH_SUN8I_A33 || defined CONFIG_MACH_SUN8I_A83T + #define SUNXI_USB_CSR 0x410 + #else + #define SUNXI_USB_CSR 0x404 + +From patchwork Fri Sep 22 07:26:30 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot,4/9] sunxi: Switch MUSB to gadget mode on the Bananapi M3 +X-Patchwork-Submitter: Chen-Yu Tsai +X-Patchwork-Id: 817348 +X-Patchwork-Delegate: jagannadh.teki@gmail.com +Message-Id: <20170922072635.32105-5-wens@csie.org> +To: u-boot@lists.denx.de +Cc: Joe Hershberger , Jagan Teki , + Maxime Ripard +Date: Fri, 22 Sep 2017 15:26:30 +0800 +From: Chen-Yu Tsai +List-Id: U-Boot discussion + +The Bananapi M3 has a micro-USB OTG port. It supports both host and +gadget mode. Having the OTG port operate in gadget mode is more useful, +as we can use it for fastboot or Ethernet over USB. + +The board has 2 other USB host ports that are supported. These can be +used for connecting peripherals. + +Signed-off-by: Chen-Yu Tsai +--- + configs/Sinovoip_BPI_M3_defconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configs/Sinovoip_BPI_M3_defconfig b/configs/Sinovoip_BPI_M3_defconfig +index f321d94e04eb..e48983fc3310 100644 +--- a/configs/Sinovoip_BPI_M3_defconfig ++++ b/configs/Sinovoip_BPI_M3_defconfig +@@ -27,5 +27,5 @@ CONFIG_AXP_DCDC5_VOLT=1200 + CONFIG_AXP_DLDO3_VOLT=2500 + CONFIG_AXP_SW_ON=y + CONFIG_USB_EHCI_HCD=y +-CONFIG_USB_MUSB_HOST=y ++CONFIG_USB_MUSB_GADGET=y + CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y + +From patchwork Fri Sep 22 07:26:31 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot, 5/9] sunxi: Switch MUSB to gadget mode on the Cubietruck Plus +X-Patchwork-Submitter: Chen-Yu Tsai +X-Patchwork-Id: 817344 +X-Patchwork-Delegate: jagannadh.teki@gmail.com +Message-Id: <20170922072635.32105-6-wens@csie.org> +To: u-boot@lists.denx.de +Cc: Joe Hershberger , Jagan Teki , + Maxime Ripard +Date: Fri, 22 Sep 2017 15:26:31 +0800 +From: Chen-Yu Tsai +List-Id: U-Boot discussion + +The Cubietruck Plus has a micro-USB OTG port. It supports both host and +gadget mode. Having the OTG port operate in gadget mode is more useful, +as we can use it for fastboot or Ethernet over USB. + +The board has 2 other USB host ports that are supported. These can be +used for connecting peripherals. + +Signed-off-by: Chen-Yu Tsai +--- + configs/Cubietruck_plus_defconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configs/Cubietruck_plus_defconfig b/configs/Cubietruck_plus_defconfig +index 3d999192cbc1..3aefcc58413c 100644 +--- a/configs/Cubietruck_plus_defconfig ++++ b/configs/Cubietruck_plus_defconfig +@@ -26,5 +26,5 @@ CONFIG_AXP_DLDO3_VOLT=2500 + CONFIG_AXP_DLDO4_VOLT=3300 + CONFIG_AXP_FLDO1_VOLT=1200 + CONFIG_USB_EHCI_HCD=y +-CONFIG_USB_MUSB_HOST=y ++CONFIG_USB_MUSB_GADGET=y + CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y + +From patchwork Fri Sep 22 07:26:32 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot,6/9] net: sun8i_emac: Support RX/TX delay chains +X-Patchwork-Submitter: Chen-Yu Tsai +X-Patchwork-Id: 817350 +X-Patchwork-Delegate: jagannadh.teki@gmail.com +Message-Id: <20170922072635.32105-7-wens@csie.org> +To: u-boot@lists.denx.de +Cc: Joe Hershberger , Jagan Teki , + Maxime Ripard +Date: Fri, 22 Sep 2017 15:26:32 +0800 +From: Chen-Yu Tsai +List-Id: U-Boot discussion + +The EMAC syscon has configurable RX/TX delay chains for use with RGMII +PHYs. + +This adds support for configuring them via device tree properties. The +property names and format were defined in Linux's dwmac-sun8i binding +that was merged at one point. + +Signed-off-by: Chen-Yu Tsai +Acked-by: Maxime Ripard +--- + drivers/net/sun8i_emac.c | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c +index 09bbb2cdb5ca..5fa1b4c170d7 100644 +--- a/drivers/net/sun8i_emac.c ++++ b/drivers/net/sun8i_emac.c +@@ -56,6 +56,10 @@ + #define H3_EPHY_SELECT BIT(15) /* 1: internal PHY, 0: external PHY */ + + #define SC_RMII_EN BIT(13) ++#define SC_TXDC_SHIFT 10 ++#define SC_TXDC_MASK GENMASK(2, 0) ++#define SC_RXDC_SHIFT 5 ++#define SC_RXDC_MASK GENMASK(4, 0) + #define SC_EPIT BIT(2) /* 1: RGMII, 0: MII */ + #define SC_ETCS_MASK GENMASK(1, 0) + #define SC_ETCS_EXT_GMII 0x1 +@@ -125,6 +129,8 @@ struct emac_eth_dev { + u32 addr; + u32 tx_slot; + bool use_internal_phy; ++ u32 tx_delay; ++ u32 rx_delay; + + enum emac_variant variant; + void *mac_reg; +@@ -290,6 +296,12 @@ static int sun8i_emac_set_syscon(struct emac_eth_dev *priv) + if (priv->variant == H3_EMAC || priv->variant == A64_EMAC) + reg &= ~SC_RMII_EN; + ++ /* Configure RX/TX delay chains */ ++ reg &= ~(SC_RXDC_MASK << SC_RXDC_SHIFT); ++ reg &= ~(SC_TXDC_MASK << SC_TXDC_SHIFT); ++ reg |= (priv->rx_delay & SC_RXDC_MASK) << SC_RXDC_SHIFT; ++ reg |= (priv->tx_delay & SC_TXDC_MASK) << SC_TXDC_SHIFT; ++ + switch (priv->interface) { + case PHY_INTERFACE_MODE_MII: + /* default */ +@@ -836,6 +848,19 @@ static int sun8i_emac_eth_ofdata_to_platdata(struct udevice *dev) + } + #endif + ++ /* Get RX/TX delays for RGMII */ ++ priv->rx_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev), ++ "allwinner,rx-delay-ps", 0); ++ if (priv->rx_delay % 100 || priv->rx_delay > 3100) ++ debug("%s: invalid rx delay value\n", __func__); ++ priv->rx_delay /= 100; ++ ++ priv->tx_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev), ++ "allwinner,tx-delay-ps", 0); ++ if (priv->tx_delay % 100 || priv->tx_delay > 800) ++ debug("%s: invalid tx delay value\n", __func__); ++ priv->tx_delay /= 100; ++ + return 0; + } + + +From patchwork Fri Sep 22 07:26:33 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot,7/9] net: sun8i_emac: Fix build for non-H3/H5 SoCs +X-Patchwork-Submitter: Chen-Yu Tsai +X-Patchwork-Id: 817349 +X-Patchwork-Delegate: jagannadh.teki@gmail.com +Message-Id: <20170922072635.32105-8-wens@csie.org> +To: u-boot@lists.denx.de +Cc: Joe Hershberger , Jagan Teki , + Maxime Ripard +Date: Fri, 22 Sep 2017 15:26:33 +0800 +From: Chen-Yu Tsai +List-Id: U-Boot discussion + +Only the H3/H5 SoCs have an internal PHY and its related clock and +reset controls. + +Use an #ifdef to guard the internal PHY control code block so it +can be built for other SoCs, such as the A83T or A64. + +Signed-off-by: Chen-Yu Tsai +Acked-by: Maxime Ripard +Reviewed-by: Joe Hershberger +--- + drivers/net/sun8i_emac.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/net/sun8i_emac.c b/drivers/net/sun8i_emac.c +index 5fa1b4c170d7..0a98a04967da 100644 +--- a/drivers/net/sun8i_emac.c ++++ b/drivers/net/sun8i_emac.c +@@ -616,6 +616,8 @@ static void sun8i_emac_board_setup(struct emac_eth_dev *priv) + { + struct sunxi_ccm_reg *ccm = (struct sunxi_ccm_reg *)SUNXI_CCM_BASE; + ++#ifdef CONFIG_MACH_SUNXI_H3_H5 ++ /* Only H3/H5 have clock controls for internal EPHY */ + if (priv->use_internal_phy) { + /* Set clock gating for ephy */ + setbits_le32(&ccm->bus_gate4, BIT(AHB_GATE_OFFSET_EPHY)); +@@ -623,6 +625,7 @@ static void sun8i_emac_board_setup(struct emac_eth_dev *priv) + /* Deassert EPHY */ + setbits_le32(&ccm->ahb_reset2_cfg, BIT(AHB_RESET_OFFSET_EPHY)); + } ++#endif + + /* Set clock gating for emac */ + setbits_le32(&ccm->ahb_gate0, BIT(AHB_GATE_OFFSET_GMAC)); + +From patchwork Fri Sep 22 07:26:34 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot,8/9] sunxi: Enable EMAC on the Cubietruck Plus +X-Patchwork-Submitter: Chen-Yu Tsai +X-Patchwork-Id: 817345 +X-Patchwork-Delegate: jagannadh.teki@gmail.com +Message-Id: <20170922072635.32105-9-wens@csie.org> +To: u-boot@lists.denx.de +Cc: Joe Hershberger , Jagan Teki , + Maxime Ripard +Date: Fri, 22 Sep 2017 15:26:34 +0800 +From: Chen-Yu Tsai +List-Id: U-Boot discussion + +The Cubietruck Plus has an RTL8211E PHY connected to the EMAC using +RGMII. The PHY is powered by DLDO4 @ 3.3V, while the I/O pins are +powered by DLDO3 @ 2.5V. + +This patch adds a U-boot specific dtsi file for the board adding +an enabled EMAC node, and enables the EMAC driver in the defconfig. +The binding used here is the old revision currently supported in +U-boot. There is no stable binding nor support in upstream Linux +at this time. + +Signed-off-by: Chen-Yu Tsai +--- + .../arm/dts/sun8i-a83t-cubietruck-plus-u-boot.dtsi | 39 ++++++++++++++++++++++ + configs/Cubietruck_plus_defconfig | 1 + + 2 files changed, 40 insertions(+) + create mode 100644 arch/arm/dts/sun8i-a83t-cubietruck-plus-u-boot.dtsi + +diff --git a/arch/arm/dts/sun8i-a83t-cubietruck-plus-u-boot.dtsi b/arch/arm/dts/sun8i-a83t-cubietruck-plus-u-boot.dtsi +new file mode 100644 +index 000000000000..b4e216c14264 +--- /dev/null ++++ b/arch/arm/dts/sun8i-a83t-cubietruck-plus-u-boot.dtsi +@@ -0,0 +1,39 @@ ++#include "sunxi-u-boot.dtsi" ++ ++/ { ++ aliases { ++ ethernet0 = &emac; ++ }; ++ ++ soc { ++ emac: ethernet@01c30000 { ++ compatible = "allwinner,sun8i-a83t-emac"; ++ reg = <0x01c30000 0x2000>, <0x01c00030 0x4>; ++ reg-names = "emac", "syscon"; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmii_pins>; ++ phy-mode = "rgmii"; ++ phy = <&phy1>; ++ status = "okay"; ++ ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++ }; ++ }; ++}; ++ ++&pio { ++ rgmii_pins: rgmii_pins { ++ allwinner,pins = "PD8", "PD9", "PD10", "PD11", ++ "PD12", "PD13", "PD15", ++ "PD16", "PD17", "PD18", "PD19", ++ "PD20", "PD21", "PD22", "PD23"; ++ allwinner,function = "emac"; ++ allwinner,drive = <3>; ++ allwinner,pull = <0>; ++ }; ++}; +diff --git a/configs/Cubietruck_plus_defconfig b/configs/Cubietruck_plus_defconfig +index 3aefcc58413c..ee8b901d0d08 100644 +--- a/configs/Cubietruck_plus_defconfig ++++ b/configs/Cubietruck_plus_defconfig +@@ -22,6 +22,7 @@ CONFIG_SPL=y + # CONFIG_SPL_DOS_PARTITION is not set + # CONFIG_SPL_ISO_PARTITION is not set + # CONFIG_SPL_EFI_PARTITION is not set ++CONFIG_SUN8I_EMAC=y + CONFIG_AXP_DLDO3_VOLT=2500 + CONFIG_AXP_DLDO4_VOLT=3300 + CONFIG_AXP_FLDO1_VOLT=1200 + +From patchwork Fri Sep 22 07:26:35 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot,9/9] sunxi: Enable EMAC on the Bananapi M3 +X-Patchwork-Submitter: Chen-Yu Tsai +X-Patchwork-Id: 817347 +X-Patchwork-Delegate: jagannadh.teki@gmail.com +Message-Id: <20170922072635.32105-10-wens@csie.org> +To: u-boot@lists.denx.de +Cc: Joe Hershberger , Jagan Teki , + Maxime Ripard +Date: Fri, 22 Sep 2017 15:26:35 +0800 +From: Chen-Yu Tsai +List-Id: U-Boot discussion + +The Bananapi M3 has an RTL8211E PHY connected to the EMAC using +RGMII. The PHY is powered by DCDC1 through SW @ 3.3V. + +This patch adds a U-boot specific dtsi file for the board adding +an enabled EMAC node, and enables the EMAC driver in the defconfig. +The binding used here is the old revision currently supported in +U-boot. There is no stable binding nor support in upstream Linux +at this time. + +Signed-off-by: Chen-Yu Tsai +--- + arch/arm/dts/sun8i-a83t-bananapi-m3-u-boot.dtsi | 41 +++++++++++++++++++++++++ + configs/Sinovoip_BPI_M3_defconfig | 1 + + 2 files changed, 42 insertions(+) + create mode 100644 arch/arm/dts/sun8i-a83t-bananapi-m3-u-boot.dtsi + +diff --git a/arch/arm/dts/sun8i-a83t-bananapi-m3-u-boot.dtsi b/arch/arm/dts/sun8i-a83t-bananapi-m3-u-boot.dtsi +new file mode 100644 +index 000000000000..9c7977e67b92 +--- /dev/null ++++ b/arch/arm/dts/sun8i-a83t-bananapi-m3-u-boot.dtsi +@@ -0,0 +1,41 @@ ++#include "sunxi-u-boot.dtsi" ++ ++/ { ++ aliases { ++ ethernet0 = &emac; ++ }; ++ ++ soc { ++ emac: ethernet@01c30000 { ++ compatible = "allwinner,sun8i-a83t-emac"; ++ reg = <0x01c30000 0x2000>, <0x01c00030 0x4>; ++ reg-names = "emac", "syscon"; ++ interrupts = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rgmii_pins>; ++ phy-mode = "rgmii"; ++ phy = <&phy1>; ++ allwinner,rx-delay-ps = <700>; ++ allwinner,tx-delay-ps = <700>; ++ status = "okay"; ++ ++ phy1: ethernet-phy@1 { ++ reg = <1>; ++ }; ++ }; ++ }; ++}; ++ ++&pio { ++ rgmii_pins: rgmii_pins { ++ allwinner,pins = "PD8", "PD9", "PD10", "PD11", ++ "PD12", "PD13", "PD15", ++ "PD16", "PD17", "PD18", "PD19", ++ "PD20", "PD21", "PD22", "PD23"; ++ allwinner,function = "emac"; ++ allwinner,drive = <3>; ++ allwinner,pull = <0>; ++ }; ++}; +diff --git a/configs/Sinovoip_BPI_M3_defconfig b/configs/Sinovoip_BPI_M3_defconfig +index e48983fc3310..efdf3c7396fd 100644 +--- a/configs/Sinovoip_BPI_M3_defconfig ++++ b/configs/Sinovoip_BPI_M3_defconfig +@@ -23,6 +23,7 @@ CONFIG_SPL=y + # CONFIG_SPL_DOS_PARTITION is not set + # CONFIG_SPL_ISO_PARTITION is not set + # CONFIG_SPL_EFI_PARTITION is not set ++CONFIG_SUN8I_EMAC=y + CONFIG_AXP_DCDC5_VOLT=1200 + CONFIG_AXP_DLDO3_VOLT=2500 + CONFIG_AXP_SW_ON=y diff --git a/uboot-tools.spec b/uboot-tools.spec index f7b5422..a6b7d2f 100644 --- a/uboot-tools.spec +++ b/uboot-tools.spec @@ -2,7 +2,7 @@ Name: uboot-tools Version: 2017.09 -Release: 2%{?candidate:.%{candidate}}%{?dist} +Release: 3%{?candidate:.%{candidate}}%{?dist} Summary: U-Boot utilities License: GPLv2+ BSD LGPL-2.1+ LGPL-2.0+ URL: http://www.denx.de/wiki/U-Boot @@ -12,6 +12,7 @@ Source1: arm-boards Source2: arm-chromebooks Source3: aarch64-boards Source4: aarch64-chromebooks +Source5: 10-devicetree.install # Fedoraisms patches, general fixes Patch1: uefi-vsprintf.patch @@ -19,12 +20,16 @@ Patch2: uefi-improve-fat.patch Patch3: uefi-efi_loader-enough-UEFI-for-standard-distro-boot.patch Patch4: uefi-use-Fedora-specific-path-name.patch Patch5: dm-video-enhancements-for-Shell.efi.patch +Patch6: usb-kbd-fixes.patch +Patch7: disk-part_dos-Use-the-original-allocation-scheme-for-the-SPL-case.patch +Patch8: uefi-distro-load-FDT-from-any-partition-on-boot-device.patch # Board fixes and enablement Patch10: dragonboard-fixes.patch Patch11: qemu-machine-virt-ARM.patch Patch12: sti-STiH410-B2260-support.patch -Patch13: mx6-Avoid-calling-setup_display-from-SPL-code.patch +Patch13: bcm283x-device-tree-sources-to-Linux-4.14-state.patch +Patch14: sunxi-A83T-improvements.patch # Patch14: mvebu-enable-generic-distro-boot-config.patch # Patch15: mx6-Initial-Hummingboard-2-support.patch @@ -46,6 +51,7 @@ BuildRequires: arm-trusted-firmware-armv8 %endif Requires: dtc +Requires: systemd %description This package contains a few U-Boot utilities - mkimage for creating boot images @@ -233,6 +239,10 @@ install -p -m 0755 builds/tools/env/fw_printenv $RPM_BUILD_ROOT%{_bindir} install -p -m 0644 tools/env/fw_env.config $RPM_BUILD_ROOT%{_sysconfdir} +# systemd kernel-install script for device tree +mkdir -p $RPM_BUILD_ROOT/lib/kernel/install.d/ +install -p -m 0755 %{SOURCE5} $RPM_BUILD_ROOT/lib/kernel/install.d/ + # Copy sone useful docs over mkdir -p builds/docs cp -p board/amlogic/odroid-c2/README builds/docs/README.odroid-c2 @@ -257,6 +267,7 @@ cp -p board/warp7/README builds/docs/README.warp7 %doc doc/README.chromium builds/docs/* %{_bindir}/* %{_mandir}/man1/mkimage.1* +/lib/kernel/install.d/10-devicetree.install %dir %{_datadir}/uboot/ %config(noreplace) %{_sysconfdir}/fw_env.config @@ -278,6 +289,12 @@ cp -p board/warp7/README builds/docs/README.warp7 %endif %changelog +* Thu Oct 5 2017 Peter Robinson 2017.09-3 +- Fix regression in i.MX6 and omap4 devices +- Improve DT detection support on aarch64 +- uEFI fixes and improvements +- ENable Sinovoip BPI devices + * Wed Sep 27 2017 Peter Robinson 2017.09-2 - Add patch to fix some uEFI console output - Minor other tweaks @@ -393,138 +410,3 @@ cp -p board/warp7/README builds/docs/README.warp7 * Tue Jan 10 2017 Peter Robinson 2017.01-1 - 2017.01 - -* Tue Jan 3 2017 Peter Robinson 2017.01-0.4.rc3 -- Enable new devices - -* Tue Jan 3 2017 Peter Robinson 2017.01-0.3.rc3 -- 2017.01 RC3 - -* Tue Dec 20 2016 Peter Robinson 2017.01-0.2.rc2 -- 2017.01 RC2 - -* Wed Dec 7 2016 Peter Robinson 2017.01-0.1.rc1 -- 2017.01 RC1 - -* Tue Nov 29 2016 Peter Robinson 2016.11-2 -- Add upstream patch to support UDOO Neo - -* Mon Nov 14 2016 Peter Robinson 2016.11-1 -- Update to 2016.11 GA - -* Mon Oct 31 2016 Peter Robinson 2016.11-0.3.rc3 -- 2016.11 RC3 - -* Tue Oct 18 2016 Peter Robinson 2016.11-0.2.rc2 -- 2016.11 RC2 - -* Sat Oct 8 2016 Peter Robinson 2016.11-0.1.rc1 -- 2016.11 RC1 - -* Tue Sep 20 2016 Peter Robinson 2016.09.01-1 -- Update to 2016.09.01 GA - -* Mon Sep 12 2016 Peter Robinson 2016.09-3 -- Update to 2016.09 GA -- Add qemu elf binaries to new subpackage - -* Tue Aug 23 2016 Peter Robinson 2016.09-2rc2 -- 2016.09 RC2 - -* Wed Jul 27 2016 Peter Robinson 2016.09-1rc1 -- 2016.09 RC1 - -* Tue Jul 12 2016 Peter Robinson 2016.07-1 -- Update to 2016.07 GA - -* Thu Jul 7 2016 Peter Robinson 2016.07-0.4rc3 -- Minor updates and cleanups - -* Tue Jul 5 2016 Peter Robinson 2016.07-0.3rc3 -- 2016.07 RC3 - -* Tue Jun 21 2016 Peter Robinson 2016.07-0.2rc2 -- 2016.07 RC2 - -* Tue Jun 7 2016 Peter Robinson 2016.07-0.1rc1 -- 2016.07 RC1 -- Build new aarch64 devices: odroid-c2 -- Build new ARMv7 devices: chromebook-jerry - -* Mon May 23 2016 Peter Robinson 2016.05-3 -- Ship SPL for rockchips devices - -* Thu May 19 2016 Peter Robinson 2016.05-2 -- Fix distro boot on clearfog -- arm64 EFI boot fixes - -* Mon May 16 2016 Peter Robinson 2016.05-1 -- Update to 2016.05 GA - -* Thu May 12 2016 Peter Robinson 2016.05-0.5rc3 -- Add USB storage support to CHIP -- Enhanced PINE64 support - -* Thu Apr 28 2016 Peter Robinson 2016.05-0.4rc3 -- Upstream fix for i.MX6 breakage -- Rebase mvebu distro boot patch - -* Wed Apr 27 2016 Peter Robinson 2016.05-0.3rc3 -- Add work around for imx6 and renable devices - -* Tue Apr 26 2016 Peter Robinson 2016.05-0.2rc3 -- 2016.05 RC3 -- Add some useful device READMEs that contain locations of needed firmware blobs etc -- Enable Jetson TX1 -- i.MX6 still disabled - -* Thu Apr 21 2016 Peter Robinson 2016.05-0.1rc1 -- 2016.05 RC1 -- Build aarch64 u-boot for HiKey, DragonBoard, PINE64 -- Build new ARMv7 devices -- Temp disable some i.MX6 devices as build broken - -* Tue Apr 19 2016 Dennis Gilmore - 2016.03-6 -- drop using the fedora logos for now rhbz#1328505 - -* Sat Apr 9 2016 Peter Robinson 2016.03-5 -- Add upstream fix for ARMv7 cache issues preventing some devices from booting - -* Tue Mar 22 2016 Peter Robinson 2016.03-4 -- Add a better fix for network issue which caused follow on issues - -* Mon Mar 21 2016 Peter Robinson 2016.03-3 -- Add a work around for ggc6 issue on some ARMv7 devices -- Add fixes for AllWinner USB and some fixes for OrangePi devices - -* Fri Mar 18 2016 Peter Robinson 2016.03-2 -- Add upstream patches to fix some issues on some AllWinner devices - -* Mon Mar 14 2016 Peter Robinson 2016.03-1 -- Update to 2016.03 GA - -* Sun Mar 6 2016 Peter Robinson 2016.03-0.4rc3 -- Minor cleanups and new devices - -* Tue Mar 1 2016 Peter Robinson 2016.03-0.3rc3 -- Update to 2016.03 RC3 - -* Tue Feb 16 2016 Peter Robinson 2016.03-0.2rc2 -- Update to 2016.03 RC2 -- Enable SolidRun Clearfog - -* Wed Feb 3 2016 Peter Robinson 2016.03-0.1rc1 -- Update to 2016.03 RC1 - -* Wed Jan 20 2016 Peter Robinson 2016.01-3 -- Fix PXE boot on Wandboard (rhbz #1299957) - -* Tue Jan 19 2016 Peter Robinson 2016.01-2 -- Add patch to fix PCI-e on Jetson TK1 -- Add patch fo serial junk on BeagleBone - -* Tue Jan 12 2016 Peter Robinson 2016.01-1 -- Update to 2016.01 GA - -* Sun Jan 10 2016 Peter Robinson 2016.01-0.4rc4 -- Update to 2016.01 RC4 diff --git a/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch b/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch new file mode 100644 index 0000000..4605719 --- /dev/null +++ b/uefi-distro-load-FDT-from-any-partition-on-boot-device.patch @@ -0,0 +1,82 @@ +From 0e68eb4f6fe96edcde4a39ba6e99ac330529b039 Mon Sep 17 00:00:00 2001 +From: Peter Robinson +Date: Thu, 5 Oct 2017 08:40:22 +0100 +Subject: [PATCH] distro: load FDT from any partition on boot device + +In the EFI_LOADER boot path, we were only checking the FAT partition +containing the EFI payload for dtb files. But this is somewhat of a +fiction. In reality there will be one small (V)FAT partition containing +grub (or whatever the payload may be), and a second boot partition +containing kernel/initrd/fdt (typically ext4). It is this second +partition where we should be looking for a FDT to load. + +So instead scan all the partitions of the disk containing the EFI +payload. This matches where grub looks for kernel/initrd (barring +custom grub.cfg, in which case the user can use grub's 'devicetree' +command to load the correct FDT). + +The other option is somehow passing the ${fdtfile} to grub so that it +can load the FDT based on selected kernel version location (which grub +knows) and SoC/board specific ${fdtfile} (which grub does not know). + +Signed-off-by: Rob Clark +--- + include/config_distro_bootcmd.h | 34 +++++++++++++++++++++++----------- + 1 file changed, 23 insertions(+), 11 deletions(-) + +diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h +index 18da4ff737..63c7bbe29c 100644 +--- a/include/config_distro_bootcmd.h ++++ b/include/config_distro_bootcmd.h +@@ -126,25 +126,37 @@ + "fi\0" \ + \ + "load_efi_dtb=" \ +- "load ${devtype} ${devnum}:${distro_bootpart} " \ +- "${fdt_addr_r} ${prefix}${efi_fdtfile}\0" \ ++ "load ${devtype} ${devnum}:${dtb_devp} " \ ++ "${fdt_addr_r} ${prefix}${efi_fdtfile} && " \ ++ "run boot_efi_binary\0" \ + \ + "efi_dtb_prefixes=/ /dtb/ /dtb/current/\0" \ +- "scan_dev_for_efi=" \ ++ "scan_dev_for_dtb=" \ + "setenv efi_fdtfile ${fdtfile}; " \ + BOOTENV_EFI_SET_FDTFILE_FALLBACK \ +- "for prefix in ${efi_dtb_prefixes}; do " \ +- "if test -e ${devtype} " \ +- "${devnum}:${distro_bootpart} " \ +- "${prefix}${efi_fdtfile}; then " \ +- "run load_efi_dtb; " \ +- "fi;" \ +- "done;" \ ++ "part list ${devtype} ${devnum} dtb_devplist; " \ ++ "env exists dtb_devplist || setenv dtb_devplist " \ ++ "${distro_bootpart}; " \ ++ "for dtb_devp in ${dtb_devplist}; do " \ ++ "for prefix in ${efi_dtb_prefixes}; do " \ ++ "if test -e ${devtype} " \ ++ "${devnum}:${dtb_devp} " \ ++ "${prefix}${efi_fdtfile};"\ ++ " then " \ ++ "echo Found DTB ${devtype} " \ ++ "${devnum}:${dtb_devp} " \ ++ "${prefix}${efi_fdtfile};"\ ++ "run load_efi_dtb; " \ ++ "fi;" \ ++ "done; " \ ++ "done; " \ ++ "run boot_efi_binary\0" \ ++ "scan_dev_for_efi=" \ + "if test -e ${devtype} ${devnum}:${distro_bootpart} " \ + "efi/fedora/"BOOTEFI_NAME"; then " \ + "echo Found EFI removable media binary " \ + "efi/fedora/"BOOTEFI_NAME"; " \ +- "run boot_efi_binary; " \ ++ "run scan_dev_for_dtb; " \ + "echo EFI LOAD FAILED: continuing...; " \ + "fi; " \ + "setenv efi_fdtfile\0" +-- +2.14.2 + diff --git a/usb-kbd-fixes.patch b/usb-kbd-fixes.patch new file mode 100644 index 0000000..3b86b29 --- /dev/null +++ b/usb-kbd-fixes.patch @@ -0,0 +1,184 @@ +From patchwork Wed Sep 27 01:19:37 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot] usb: kbd: Don't fail with iomux +X-Patchwork-Submitter: Rob Clark +X-Patchwork-Id: 818881 +X-Patchwork-Delegate: marek.vasut@gmail.com +Message-Id: <20170927011939.6610-1-robdclark@gmail.com> +To: U-Boot Mailing List +Date: Tue, 26 Sep 2017 21:19:37 -0400 +From: Rob Clark +List-Id: U-Boot discussion + +stdin might not be set, which would cause iomux_doenv() to fail +therefore causing probe_usb_keyboard() to fail. Furthermore if we do +have iomux enabled, the sensible thing (in terms of user experience) +would be to simply add ourselves to the list of stdin devices. + +This fixes an issue with usbkbd on dragonboard410c with distro- +bootcmd, where stdin is not set (so stdinname is null). + +Signed-off-by: Rob Clark +--- +Somehow this patch was dropped on the floor. I don't remember +which version # this is up to, search the list if you care. But +this is the latest. I only noticed it was missing because u-boot +crashes when you boot with usb-keyboard plugged in (at least on +db410c) without it. So someone please apply this patch before it +gets lost again. + + common/usb_kbd.c | 46 +++++++++++++++++++++++++++++++--------------- + include/console.h | 2 -- + 2 files changed, 31 insertions(+), 17 deletions(-) + +diff --git a/common/usb_kbd.c b/common/usb_kbd.c +index a323d72a36..4c3ad95fca 100644 +--- a/common/usb_kbd.c ++++ b/common/usb_kbd.c +@@ -516,23 +516,39 @@ static int probe_usb_keyboard(struct usb_device *dev) + return error; + + stdinname = env_get("stdin"); +-#if CONFIG_IS_ENABLED(CONSOLE_MUX) +- error = iomux_doenv(stdin, stdinname); +- if (error) +- return error; +-#else +- /* Check if this is the standard input device. */ +- if (strcmp(stdinname, DEVNAME)) +- return 1; ++ if (CONFIG_IS_ENABLED(CONSOLE_MUX)) { ++ char *devname = DEVNAME; ++ char *newstdin = NULL; ++ /* ++ * stdin might not be set yet.. either way, with console- ++ * mux the sensible thing to do is add ourselves to the ++ * list of stdio devices: ++ */ ++ if (stdinname && !strstr(stdinname, DEVNAME)) { ++ newstdin = malloc(strlen(stdinname) + ++ strlen(","DEVNAME) + 1); ++ sprintf(newstdin, "%s,"DEVNAME, stdinname); ++ stdinname = newstdin; ++ } else if (!stdinname) { ++ stdinname = devname; ++ } ++ error = iomux_doenv(stdin, stdinname); ++ free(newstdin); ++ if (error) ++ return error; ++ } else { ++ /* Check if this is the standard input device. */ ++ if (strcmp(stdinname, DEVNAME)) ++ return 1; + +- /* Reassign the console */ +- if (overwrite_console()) +- return 1; ++ /* Reassign the console */ ++ if (overwrite_console()) ++ return 1; + +- error = console_assign(stdin, DEVNAME); +- if (error) +- return error; +-#endif ++ error = console_assign(stdin, DEVNAME); ++ if (error) ++ return error; ++ } + + return 0; + } +diff --git a/include/console.h b/include/console.h +index cea29ed6dc..7dfd36d7d1 100644 +--- a/include/console.h ++++ b/include/console.h +@@ -57,8 +57,6 @@ int console_announce_r(void); + /* + * CONSOLE multiplexing. + */ +-#ifdef CONFIG_CONSOLE_MUX + #include +-#endif + + #endif +From patchwork Tue Oct 3 17:31:14 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [U-Boot] usb: kbd: Fix dangling pointers on probe fail +X-Patchwork-Submitter: Rob Clark +X-Patchwork-Id: 820970 +Message-Id: <20171003173118.32645-1-robdclark@gmail.com> +To: U-Boot Mailing List +Date: Tue, 3 Oct 2017 13:31:14 -0400 +From: Rob Clark +List-Id: U-Boot discussion + +If probe fails, we should unregister the stdio device, else we leave +dangling pointers to the parent 'struct usb_device'. + +Signed-off-by: Rob Clark +--- +I finally got around to debugging why things explode so badly without +fixing usb_kbd vs. iomux[1] (which this patch applies on top of). + +[1] https://patchwork.ozlabs.org/patch/818881/ + + common/usb_kbd.c | 30 ++++++++++++++++++++++++------ + 1 file changed, 24 insertions(+), 6 deletions(-) + +diff --git a/common/usb_kbd.c b/common/usb_kbd.c +index 4c3ad95fca..82ad93f6ca 100644 +--- a/common/usb_kbd.c ++++ b/common/usb_kbd.c +@@ -535,22 +535,40 @@ static int probe_usb_keyboard(struct usb_device *dev) + error = iomux_doenv(stdin, stdinname); + free(newstdin); + if (error) +- return error; ++ goto unregister_stdio; + } else { + /* Check if this is the standard input device. */ +- if (strcmp(stdinname, DEVNAME)) +- return 1; ++ if (strcmp(stdinname, DEVNAME)) { ++ error = -1; ++ goto unregister_stdio; ++ } + + /* Reassign the console */ +- if (overwrite_console()) +- return 1; ++ if (overwrite_console()) { ++ error = -1; ++ goto unregister_stdio; ++ } + + error = console_assign(stdin, DEVNAME); + if (error) +- return error; ++ goto unregister_stdio; + } + + return 0; ++ ++unregister_stdio: ++ /* ++ * If probe fails, the device will be removed.. leaving dangling ++ * pointers if the stdio device is not unregistered. If u-boot ++ * is built without stdio_deregister(), just pretend to succeed ++ * in order to avoid dangling pointers. ++ */ ++#if CONFIG_IS_ENABLED(SYS_STDIO_DEREGISTER) ++ stdio_deregister(DEVNAME, 1); ++ return error; ++#else ++ return 0; ++#endif + } + + #ifndef CONFIG_DM_USB