From c07cdf075da99e280d9f91b2ba70e30b94cf2061 Mon Sep 17 00:00:00 2001 From: zador-blood-stained Date: Mon, 13 Mar 2017 22:05:48 +0300 Subject: [PATCH] Update mainline u-boot to 2017.03 --- configuration.sh | 2 +- .../u-boot/u-boot-sunxi/add-nanopi-air.patch | 19 -- .../u-boot/u-boot-sunxi/add-nanopi-neo.patch | 16 -- .../u-boot-sunxi/add-orangepi-zero.patch | 54 ------ .../addjust-nanopi-neo-cpufreq.patch | 9 + .../fix-cubieboard1-defconfig.patch | 12 +- .../fix-fdt-setenv-byte-order.patch | 13 -- .../fix-h3-spi-spl-compilation.patch | 10 - .../h3-add-disp2-video-driver-jernej.patch | 4 +- .../h3-adjust-dram-frequency.patch | 13 ++ ...1-led-support-default-state.patch.disabled | 178 ------------------ ...u-boot-02-support-cheap-mmc.patch.disabled | 12 -- 12 files changed, 30 insertions(+), 312 deletions(-) delete mode 100644 patch/u-boot/u-boot-sunxi/add-nanopi-neo.patch delete mode 100644 patch/u-boot/u-boot-sunxi/add-orangepi-zero.patch create mode 100644 patch/u-boot/u-boot-sunxi/addjust-nanopi-neo-cpufreq.patch delete mode 100644 patch/u-boot/u-boot-sunxi/fix-fdt-setenv-byte-order.patch delete mode 100644 patch/u-boot/u-boot-sunxi/fix-h3-spi-spl-compilation.patch delete mode 100644 patch/u-boot/u-boot-sunxi/u-boot-01-led-support-default-state.patch.disabled delete mode 100644 patch/u-boot/u-boot-sunxi/u-boot-02-support-cheap-mmc.patch.disabled diff --git a/configuration.sh b/configuration.sh index 975fea31e..495b1dd11 100644 --- a/configuration.sh +++ b/configuration.sh @@ -48,7 +48,7 @@ if [[ $USE_GITHUB_UBOOT_MIRROR == yes ]]; then else MAINLINE_UBOOT_SOURCE='git://git.denx.de/u-boot.git' fi -MAINLINE_UBOOT_BRANCH='tag:v2017.01' +MAINLINE_UBOOT_BRANCH='tag:v2017.03' MAINLINE_UBOOT_DIR='u-boot' # Let's set default data if not defined in board configuration above diff --git a/patch/u-boot/u-boot-sunxi/add-nanopi-air.patch b/patch/u-boot/u-boot-sunxi/add-nanopi-air.patch index c9f68cce8..a6e48f1f0 100644 --- a/patch/u-boot/u-boot-sunxi/add-nanopi-air.patch +++ b/patch/u-boot/u-boot-sunxi/add-nanopi-air.patch @@ -21,22 +21,3 @@ index 0000000..61fe8c6 +CONFIG_USB_EHCI_HCD=y +CONFIG_SYS_CLK_FREQ=480000000 +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 -diff --git a/arch/arm/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/dts/sun8i-h3-nanopi-neo.dts -index 3d64caf..096ff0b 100644 ---- a/arch/arm/dts/sun8i-h3-nanopi-neo.dts -+++ b/arch/arm/dts/sun8i-h3-nanopi-neo.dts -@@ -123,3 +123,14 @@ - /* USB VBUS is always on */ - status = "okay"; - }; -+ -+&emac { -+ phy = <&phy1>; -+ phy-mode = "mii"; -+ allwinner,use-internal-phy; -+ allwinner,leds-active-low; -+ status = "okay"; -+ phy1: ethernet-phy@1 { -+ reg = <1>; -+ }; -+}; diff --git a/patch/u-boot/u-boot-sunxi/add-nanopi-neo.patch b/patch/u-boot/u-boot-sunxi/add-nanopi-neo.patch deleted file mode 100644 index 1c67fd5f3..000000000 --- a/patch/u-boot/u-boot-sunxi/add-nanopi-neo.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/configs/nanopi_neo_defconfig b/configs/nanopi_neo_defconfig -index 51642457..4c52fa24 100644 ---- a/configs/nanopi_neo_defconfig -+++ b/configs/nanopi_neo_defconfig -@@ -6,10 +6,10 @@ CONFIG_DRAM_ZQ=3881979 - CONFIG_DRAM_ODT_EN=y - CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-neo" - # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set --CONFIG_CONSOLE_MUX=y - CONFIG_SPL=y - # CONFIG_CMD_IMLS is not set - # CONFIG_CMD_FLASH is not set - # CONFIG_CMD_FPGA is not set - CONFIG_SUN8I_EMAC=y - CONFIG_USB_EHCI_HCD=y -+CONFIG_SYS_CLK_FREQ=480000000 diff --git a/patch/u-boot/u-boot-sunxi/add-orangepi-zero.patch b/patch/u-boot/u-boot-sunxi/add-orangepi-zero.patch deleted file mode 100644 index 48ab89abc..000000000 --- a/patch/u-boot/u-boot-sunxi/add-orangepi-zero.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 836a8c4d..9d2da6e0 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -260,6 +260,7 @@ dtb-$(CONFIG_MACH_SUN8I_A83T) += \ - sun8i-a83t-cubietruck-plus.dtb \ - sun8i-a83t-sinovoip-bpi-m3.dtb - dtb-$(CONFIG_MACH_SUN8I_H3) += \ -+ sun8i-h2plus-orangepi-zero.dtb \ - sun8i-h3-bananapi-m2-plus.dtb \ - sun8i-h3-orangepi-2.dtb \ - sun8i-h3-orangepi-lite.dtb \ -diff --git a/arch/arm/dts/sun8i-h2plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2plus-orangepi-zero.dts -new file mode 100644 -index 000000000..64b834438 ---- /dev/null -+++ b/arch/arm/dts/sun8i-h2plus-orangepi-zero.dts -@@ -0,0 +1,8 @@ -+ -+#include "sun8i-h3-orangepi-one.dts" -+ -+/ { -+ model = "Xunlong Orange Pi Zero"; -+ compatible = "xunlong,orangepi-zero", "allwinner,sun8i-h2plus", "allwinner,sun8i-h3"; -+ -+}; -\ No newline at end of file -diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig -new file mode 100644 -index 00000000..bdaffa88 ---- /dev/null -+++ b/configs/orangepi_zero_defconfig -@@ -0,0 +1,21 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_SUNXI=y -+CONFIG_MACH_SUN8I_H3=y -+CONFIG_DRAM_CLK=408 -+CONFIG_DRAM_ZQ=3881979 -+CONFIG_DRAM_ODT_EN=y -+CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2plus-orangepi-zero" -+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set -+CONFIG_SPL=y -+# CONFIG_SPL_SPI_SUPPORT=y -+CONFIG_SPL_SPI_FLASH_SUPPORT=y -+CONFIG_SPL_SPI_SUNXI=y -+# CONFIG_CMD_IMLS is not set -+# CONFIG_CMD_FLASH is not set -+# CONFIG_CMD_FPGA is not set -+CONFIG_SUN8I_EMAC=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_SYS_CLK_FREQ=480000000 -+CONFIG_VIDEO=y -+# CONFIG_VIDEO_HDMI is not set -+CONFIG_VIDEO_COMPOSITE=y diff --git a/patch/u-boot/u-boot-sunxi/addjust-nanopi-neo-cpufreq.patch b/patch/u-boot/u-boot-sunxi/addjust-nanopi-neo-cpufreq.patch new file mode 100644 index 000000000..5af650561 --- /dev/null +++ b/patch/u-boot/u-boot-sunxi/addjust-nanopi-neo-cpufreq.patch @@ -0,0 +1,9 @@ +diff --git a/configs/nanopi_neo_defconfig b/configs/nanopi_neo_defconfig +index 89f5687..25ec9bc 100644 +--- a/configs/nanopi_neo_defconfig ++++ b/configs/nanopi_neo_defconfig +@@ -16,3 +16,4 @@ CONFIG_SPL=y + # CONFIG_SPL_EFI_PARTITION is not set + CONFIG_SUN8I_EMAC=y + CONFIG_USB_EHCI_HCD=y ++CONFIG_SYS_CLK_FREQ=480000000 diff --git a/patch/u-boot/u-boot-sunxi/fix-cubieboard1-defconfig.patch b/patch/u-boot/u-boot-sunxi/fix-cubieboard1-defconfig.patch index b2fb44320..5324e326f 100644 --- a/patch/u-boot/u-boot-sunxi/fix-cubieboard1-defconfig.patch +++ b/patch/u-boot/u-boot-sunxi/fix-cubieboard1-defconfig.patch @@ -1,12 +1,10 @@ diff --git a/configs/Cubieboard_defconfig b/configs/Cubieboard_defconfig -index c884115..a45fbb0 +index e1d1f1f..27c4541 100644 --- a/configs/Cubieboard_defconfig +++ b/configs/Cubieboard_defconfig -@@ -10,4 +10,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SUNXI_EMAC,AHCI,SATAPWR=SUNXI_GPB(8)" - # CONFIG_CMD_IMLS is not set - # CONFIG_CMD_FLASH is not set - # CONFIG_CMD_FPGA is not set -+CONFIG_CMD_GPIO=y +@@ -16,3 +16,5 @@ CONFIG_SPL_I2C_SUPPORT=y + # CONFIG_SPL_ISO_PARTITION is not set + # CONFIG_SPL_EFI_PARTITION is not set + CONFIG_USB_EHCI_HCD=y +CONFIG_AXP_ALDO3_VOLT=2800 +CONFIG_AXP_ALDO4_VOLT=2800 - CONFIG_USB_EHCI_HCD=y diff --git a/patch/u-boot/u-boot-sunxi/fix-fdt-setenv-byte-order.patch b/patch/u-boot/u-boot-sunxi/fix-fdt-setenv-byte-order.patch deleted file mode 100644 index a5a5fe730..000000000 --- a/patch/u-boot/u-boot-sunxi/fix-fdt-setenv-byte-order.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/cmd/fdt.c b/cmd/fdt.c -index 8bd345afa..aa4d8c0f6 100644 ---- a/cmd/fdt.c -+++ b/cmd/fdt.c -@@ -58,7 +58,7 @@ static int fdt_value_setenv(const void *nodep, int len, const char *var) - else if (len == 4) { - char buf[11]; - -- sprintf(buf, "0x%08X", *(uint32_t *)nodep); -+ sprintf(buf, "0x%08X", fdt32_to_cpu(*(uint32_t *)nodep)); - setenv(var, buf); - } else if (len%4 == 0 && len <= 20) { - /* Needed to print things like sha1 hashes. */ diff --git a/patch/u-boot/u-boot-sunxi/fix-h3-spi-spl-compilation.patch b/patch/u-boot/u-boot-sunxi/fix-h3-spi-spl-compilation.patch deleted file mode 100644 index 0a7826de2..000000000 --- a/patch/u-boot/u-boot-sunxi/fix-h3-spi-spl-compilation.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/drivers/mtd/spi/sunxi_spi_spl.c b/drivers/mtd/spi/sunxi_spi_spl.c -index e70064c67..a24c11517 100644 ---- a/drivers/mtd/spi/sunxi_spi_spl.c -+++ b/drivers/mtd/spi/sunxi_spi_spl.c -@@ -284,4 +284,4 @@ static int spl_spi_load_image(struct spl_image_info *spl_image, - return 0; - } - /* Use priorty 0 to override the default if it happens to be linked in */ --SPL_LOAD_IMAGE_METHOD("sunxi SPI" 0, BOOT_DEVICE_SPI, spl_spi_load_image); -+SPL_LOAD_IMAGE_METHOD("sunxi SPI", 0, BOOT_DEVICE_SPI, spl_spi_load_image); diff --git a/patch/u-boot/u-boot-sunxi/h3-add-disp2-video-driver-jernej.patch b/patch/u-boot/u-boot-sunxi/h3-add-disp2-video-driver-jernej.patch index 5c9a66389..480c7d29f 100644 --- a/patch/u-boot/u-boot-sunxi/h3-add-disp2-video-driver-jernej.patch +++ b/patch/u-boot/u-boot-sunxi/h3-add-disp2-video-driver-jernej.patch @@ -738,7 +738,7 @@ index d123b3a..7af7791 100644 void clock_set_pll5(unsigned int clk, bool sigma_delta_enable) { struct sunxi_ccm_reg * const ccm = -@@ -213,6 +224,23 @@ done: +@@ -217,6 +228,23 @@ done: } #endif @@ -759,7 +759,7 @@ index d123b3a..7af7791 100644 + &ccm->pll10_cfg); +} + - #ifdef CONFIG_MACH_SUN8I_A33 + #if defined(CONFIG_MACH_SUN8I_A33) || defined(CONFIG_MACH_SUN50I) void clock_set_pll11(unsigned int clk, bool sigma_delta_enable) { diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig diff --git a/patch/u-boot/u-boot-sunxi/h3-adjust-dram-frequency.patch b/patch/u-boot/u-boot-sunxi/h3-adjust-dram-frequency.patch index 1dacb2c37..d01910167 100644 --- a/patch/u-boot/u-boot-sunxi/h3-adjust-dram-frequency.patch +++ b/patch/u-boot/u-boot-sunxi/h3-adjust-dram-frequency.patch @@ -50,3 +50,16 @@ index f2ed941..e8219bb 100644 CONFIG_DRAM_ZQ=3881979 CONFIG_DRAM_ODT_EN=y CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +diff --git a/configs/orangepi_zero_defconfig b/configs/orangepi_zero_defconfig +index ac44937..0e761b6 100644 +--- a/configs/orangepi_zero_defconfig ++++ b/configs/orangepi_zero_defconfig +@@ -2,7 +2,7 @@ CONFIG_ARM=y + CONFIG_ARCH_SUNXI=y + CONFIG_SPL_SPI_FLASH_SUPPORT=y + CONFIG_MACH_SUN8I_H3=y +-CONFIG_DRAM_CLK=672 ++CONFIG_DRAM_CLK=408 + CONFIG_DRAM_ZQ=3881979 + CONFIG_DRAM_ODT_EN=y + CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-orangepi-zero" diff --git a/patch/u-boot/u-boot-sunxi/u-boot-01-led-support-default-state.patch.disabled b/patch/u-boot/u-boot-sunxi/u-boot-01-led-support-default-state.patch.disabled deleted file mode 100644 index 0251074d8..000000000 --- a/patch/u-boot/u-boot-sunxi/u-boot-01-led-support-default-state.patch.disabled +++ /dev/null @@ -1,178 +0,0 @@ -diff -Nur a/arch/arm/Kconfig leds/arch/arm/Kconfig ---- a/arch/arm/Kconfig 2016-09-12 16:05:51.000000000 +0200 -+++ leds/arch/arm/Kconfig 2016-09-21 19:17:56.246729135 +0200 -@@ -651,6 +651,8 @@ - select DM_KEYBOARD - select DM_SERIAL - select DM_USB -+ select LED -+ select LED_GPIO - select OF_BOARD_SETUP - select OF_CONTROL - select OF_SEPARATE -diff -Nur a/board/sunxi/board.c leds/board/sunxi/board.c ---- a/board/sunxi/board.c 2016-09-12 16:05:51.000000000 +0200 -+++ leds/board/sunxi/board.c 2016-09-21 19:14:16.236727224 +0200 -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -682,6 +683,12 @@ - { - __maybe_unused int ret; - -+#ifdef CONFIG_LED -+ ret = led_set_default_states(); -+ if (ret) -+ return ret; -+#endif -+ - setenv("fel_booted", NULL); - setenv("fel_scriptaddr", NULL); - /* determine if we are running in FEL mode */ -diff -Nur a/drivers/led/led_gpio.c leds/drivers/led/led_gpio.c ---- a/drivers/led/led_gpio.c 2016-09-12 16:05:51.000000000 +0200 -+++ leds/drivers/led/led_gpio.c 2016-09-21 19:14:16.236727224 +0200 -@@ -67,6 +67,7 @@ - node = fdt_next_subnode(blob, node)) { - struct led_uclass_plat *uc_plat; - const char *label; -+ const char *state; - - label = fdt_getprop(blob, node, "label", NULL); - if (!label) { -@@ -74,6 +75,7 @@ - fdt_get_name(blob, node, NULL)); - return -EINVAL; - } -+ state = fdt_getprop(blob, node, "default-state", NULL); - ret = device_bind_driver_to_node(parent, "gpio_led", - fdt_get_name(blob, node, NULL), - node, &dev); -@@ -81,6 +83,15 @@ - return ret; - uc_plat = dev_get_uclass_platdata(dev); - uc_plat->label = label; -+ if (state) { -+ if(!strcmp(state, "on")) -+ uc_plat->default_state = LED_STATE_ON; -+ else if(!strcmp(state, "keep")) -+ uc_plat->default_state = LED_STATE_KEEP; -+ else -+ uc_plat->default_state = LED_STATE_OFF; -+ } else -+ uc_plat->default_state = LED_STATE_OFF; - } - - return 0; -diff -Nur a/drivers/led/led-uclass.c leds/drivers/led/led-uclass.c ---- a/drivers/led/led-uclass.c 2016-09-12 16:05:51.000000000 +0200 -+++ leds/drivers/led/led-uclass.c 2016-09-21 19:14:16.236727224 +0200 -@@ -12,6 +12,21 @@ - #include - #include - -+int led_autoset(struct udevice *dev) -+{ -+ struct led_uclass_plat *uc_pdata; -+ int ret = 0; -+ -+ uc_pdata = dev_get_uclass_platdata(dev); -+ if (!uc_pdata->label) -+ return -EMEDIUMTYPE; -+ -+ if (uc_pdata->default_state != LED_STATE_KEEP) -+ ret = led_set_on(dev, uc_pdata->default_state == LED_STATE_ON); -+ -+ return ret; -+} -+ - int led_get_by_label(const char *label, struct udevice **devp) - { - struct udevice *dev; -@@ -32,6 +47,26 @@ - return -ENODEV; - } - -+int led_set_default_states(void) -+{ -+ struct udevice *dev; -+ struct uclass *uc; -+ int ret; -+ -+ ret = uclass_get(UCLASS_LED, &uc); -+ if (ret) -+ return ret; -+ for (uclass_first_device(UCLASS_LED, &dev); -+ dev; -+ uclass_next_device(&dev)) { -+ ret = led_autoset(dev); -+ if (ret == -EMEDIUMTYPE || ret == -ENOSYS) -+ ret = 0; -+ } -+ -+ return ret; -+} -+ - int led_set_on(struct udevice *dev, int on) - { - struct led_ops *ops = led_get_ops(dev); -diff -Nur a/include/led.h leds/include/led.h ---- a/include/led.h 2016-09-12 16:05:51.000000000 +0200 -+++ leds/include/led.h 2016-09-21 19:14:16.236727224 +0200 -@@ -8,6 +8,14 @@ - #ifndef __LED_H - #define __LED_H - -+/* LED default states -+ */ -+enum led_default_state { -+ LED_STATE_OFF, -+ LED_STATE_ON, -+ LED_STATE_KEEP -+}; -+ - /** - * struct led_uclass_plat - Platform data the uclass stores about each device - * -@@ -15,6 +23,7 @@ - */ - struct led_uclass_plat { - const char *label; -+ enum led_default_state default_state; - }; - - struct led_ops { -@@ -31,6 +40,14 @@ - #define led_get_ops(dev) ((struct led_ops *)(dev)->driver->ops) - - /** -+ * led_autoset() - set the state of an LED according to fdt -+ * -+ * @dev: LED device to set -+ * @return 0 if OK, -ve on error -+ */ -+int led_autoset(struct udevice *dev); -+ -+/** - * led_get_by_label() - Find an LED device by label - * - * @label: LED label to look up -@@ -40,6 +57,13 @@ - int led_get_by_label(const char *label, struct udevice **devp); - - /** -+ * led_set_default_states() - set the state of all LEDs according to fdt -+ * -+ * @return 0 if OK, -ve on error -+ */ -+int led_set_default_states(void); -+ -+/** - * led_set_on() - set the state of an LED - * - * @dev: LED device to change diff --git a/patch/u-boot/u-boot-sunxi/u-boot-02-support-cheap-mmc.patch.disabled b/patch/u-boot/u-boot-sunxi/u-boot-02-support-cheap-mmc.patch.disabled deleted file mode 100644 index 678dff164..000000000 --- a/patch/u-boot/u-boot-sunxi/u-boot-02-support-cheap-mmc.patch.disabled +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c ---- a/drivers/mmc/sunxi_mmc.c 2016-02-25 10:30:30.000000000 +0800 -+++ b//drivers/mmc/sunxi_mmc.c 2016-02-25 10:46:07.723851155 +0800 - -@@ -269,6 +269,6 @@ - unsigned i; - unsigned *buff = (unsigned int *)(reading ? data->dest : data->src); - unsigned byte_cnt = data->blocksize * data->blocks; -- unsigned timeout_msecs = byte_cnt >> 8; -+ unsigned timeout_msecs = byte_cnt >> 6; - if (timeout_msecs < 2000) - timeout_msecs = 2000; \ No newline at end of file