aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/at91/patches
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/at91/patches')
-rw-r--r--target/linux/at91/patches/100-ARM-at91-build-dtb-for-LMU5000.patch10
-rw-r--r--target/linux/at91/patches/101-ARM-at91-build-dtb-for-q5xr5.patch10
-rw-r--r--target/linux/at91/patches/200-ARM-at91-udc-clockfix-backport.patch82
-rw-r--r--target/linux/at91/patches/201-ARM-at91-usb-determine_rate-backport.patch20
-rw-r--r--target/linux/at91/patches/805-free_some_portc_pins.patch11
-rw-r--r--target/linux/at91/patches/901-AT91-flexibity-default-leds-to-heartbeat.patch60
6 files changed, 193 insertions, 0 deletions
diff --git a/target/linux/at91/patches/100-ARM-at91-build-dtb-for-LMU5000.patch b/target/linux/at91/patches/100-ARM-at91-build-dtb-for-LMU5000.patch
new file mode 100644
index 0000000..8852b6a
--- /dev/null
+++ b/target/linux/at91/patches/100-ARM-at91-build-dtb-for-LMU5000.patch
@@ -0,0 +1,10 @@
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -28,6 +28,7 @@ dtb-$(CONFIG_ARCH_AT91) += usb_a9g20.dtb
+ dtb-$(CONFIG_ARCH_AT91) += usb_a9g20_lpw.dtb
+ # sam9g45
+ dtb-$(CONFIG_ARCH_AT91) += at91sam9m10g45ek.dtb
++dtb-$(CONFIG_ARCH_AT91) += lmu5000.dtb
+ dtb-$(CONFIG_ARCH_AT91) += pm9g45.dtb
+ # sam9n12
+ dtb-$(CONFIG_ARCH_AT91) += at91sam9n12ek.dtb
diff --git a/target/linux/at91/patches/101-ARM-at91-build-dtb-for-q5xr5.patch b/target/linux/at91/patches/101-ARM-at91-build-dtb-for-q5xr5.patch
new file mode 100644
index 0000000..b5a9b68
--- /dev/null
+++ b/target/linux/at91/patches/101-ARM-at91-build-dtb-for-q5xr5.patch
@@ -0,0 +1,10 @@
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -20,6 +20,7 @@ dtb-$(CONFIG_ARCH_AT91) += tny_a9263.dtb
+ dtb-$(CONFIG_ARCH_AT91) += usb_a9263.dtb
+ # sam9g20
+ dtb-$(CONFIG_ARCH_AT91) += at91-foxg20.dtb
++dtb-$(CONFIG_ARCH_AT91) += at91-q5xr5.dtb
+ dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek.dtb
+ dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek_2mmc.dtb
+ dtb-$(CONFIG_ARCH_AT91) += kizbox.dtb
diff --git a/target/linux/at91/patches/200-ARM-at91-udc-clockfix-backport.patch b/target/linux/at91/patches/200-ARM-at91-udc-clockfix-backport.patch
new file mode 100644
index 0000000..32e1ac5
--- /dev/null
+++ b/target/linux/at91/patches/200-ARM-at91-udc-clockfix-backport.patch
@@ -0,0 +1,82 @@
+--- a/drivers/usb/gadget/udc/at91_udc.c
++++ b/drivers/usb/gadget/udc/at91_udc.c
+@@ -870,8 +870,6 @@ static void clk_on(struct at91_udc *udc)
+ return;
+ udc->clocked = 1;
+
+- if (IS_ENABLED(CONFIG_COMMON_CLK))
+- clk_enable(udc->uclk);
+ clk_enable(udc->iclk);
+ clk_enable(udc->fclk);
+ }
+@@ -884,8 +882,6 @@ static void clk_off(struct at91_udc *udc
+ udc->gadget.speed = USB_SPEED_UNKNOWN;
+ clk_disable(udc->fclk);
+ clk_disable(udc->iclk);
+- if (IS_ENABLED(CONFIG_COMMON_CLK))
+- clk_disable(udc->uclk);
+ }
+
+ /*
+@@ -1766,27 +1762,18 @@ static int at91udc_probe(struct platform
+ udc_reinit(udc);
+
+ /* get interface and function clocks */
+- udc->iclk = clk_get(dev, "udc_clk");
+- udc->fclk = clk_get(dev, "udpck");
+- if (IS_ENABLED(CONFIG_COMMON_CLK))
+- udc->uclk = clk_get(dev, "usb_clk");
+- if (IS_ERR(udc->iclk) || IS_ERR(udc->fclk) ||
+- (IS_ENABLED(CONFIG_COMMON_CLK) && IS_ERR(udc->uclk))) {
++ udc->iclk = clk_get(dev, "pclk");
++ udc->fclk = clk_get(dev, "hclk");
++ if (IS_ERR(udc->iclk) || IS_ERR(udc->fclk)) {
+ DBG("clocks missing\n");
+ retval = -ENODEV;
+ goto fail1;
+ }
+
+- /* don't do anything until we have both gadget driver and VBUS */
+- if (IS_ENABLED(CONFIG_COMMON_CLK)) {
+- clk_set_rate(udc->uclk, 48000000);
+- retval = clk_prepare(udc->uclk);
+- if (retval)
+- goto fail1;
+- }
++ clk_set_rate(udc->fclk, 48000000);
+ retval = clk_prepare(udc->fclk);
+ if (retval)
+- goto fail1a;
++ goto fail1;
+
+ retval = clk_prepare_enable(udc->iclk);
+ if (retval)
+@@ -1860,12 +1847,7 @@ fail1c:
+ clk_unprepare(udc->iclk);
+ fail1b:
+ clk_unprepare(udc->fclk);
+-fail1a:
+- if (IS_ENABLED(CONFIG_COMMON_CLK))
+- clk_unprepare(udc->uclk);
+ fail1:
+- if (IS_ENABLED(CONFIG_COMMON_CLK) && !IS_ERR(udc->uclk))
+- clk_put(udc->uclk);
+ if (!IS_ERR(udc->fclk))
+ clk_put(udc->fclk);
+ if (!IS_ERR(udc->iclk))
+@@ -1911,15 +1893,11 @@ static int __exit at91udc_remove(struct
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ release_mem_region(res->start, resource_size(res));
+
+- if (IS_ENABLED(CONFIG_COMMON_CLK))
+- clk_unprepare(udc->uclk);
+ clk_unprepare(udc->fclk);
+ clk_unprepare(udc->iclk);
+
+ clk_put(udc->iclk);
+ clk_put(udc->fclk);
+- if (IS_ENABLED(CONFIG_COMMON_CLK))
+- clk_put(udc->uclk);
+
+ return 0;
+ }
diff --git a/target/linux/at91/patches/201-ARM-at91-usb-determine_rate-backport.patch b/target/linux/at91/patches/201-ARM-at91-usb-determine_rate-backport.patch
new file mode 100644
index 0000000..d083628
--- /dev/null
+++ b/target/linux/at91/patches/201-ARM-at91-usb-determine_rate-backport.patch
@@ -0,0 +1,20 @@
+--- a/drivers/clk/at91/clk-usb.c
++++ b/drivers/clk/at91/clk-usb.c
+@@ -59,7 +59,7 @@ static unsigned long at91sam9x5_clk_usb_
+ static long at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
+ unsigned long rate,
+ unsigned long *best_parent_rate,
+- struct clk_hw **best_parent_hw)
++ struct clk **best_parent_clk)
+ {
+ struct clk *parent = NULL;
+ long best_rate = -EINVAL;
+@@ -91,7 +91,7 @@ static long at91sam9x5_clk_usb_determine
+ best_rate = tmp_rate;
+ best_diff = tmp_diff;
+ *best_parent_rate = tmp_parent_rate;
+- *best_parent_hw = __clk_get_hw(parent);
++ *best_parent_clk = parent;
+ }
+
+ if (!best_diff || tmp_rate < rate)
diff --git a/target/linux/at91/patches/805-free_some_portc_pins.patch b/target/linux/at91/patches/805-free_some_portc_pins.patch
new file mode 100644
index 0000000..a9694d1
--- /dev/null
+++ b/target/linux/at91/patches/805-free_some_portc_pins.patch
@@ -0,0 +1,11 @@
+--- a/arch/arm/mach-at91/at91sam9260_devices.c
++++ b/arch/arm/mach-at91/at91sam9260_devices.c
+@@ -507,7 +507,7 @@ static struct platform_device at91sam926
+ .num_resources = ARRAY_SIZE(spi1_resources),
+ };
+
+-static const unsigned spi1_standard_cs[4] = { AT91_PIN_PB3, AT91_PIN_PC5, AT91_PIN_PC4, AT91_PIN_PC3 };
++static const unsigned spi1_standard_cs[2] = { AT91_PIN_PB3, AT91_PIN_PC5 };
+
+ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
+ {
diff --git a/target/linux/at91/patches/901-AT91-flexibity-default-leds-to-heartbeat.patch b/target/linux/at91/patches/901-AT91-flexibity-default-leds-to-heartbeat.patch
new file mode 100644
index 0000000..1da2e4d
--- /dev/null
+++ b/target/linux/at91/patches/901-AT91-flexibity-default-leds-to-heartbeat.patch
@@ -0,0 +1,60 @@
+--- a/arch/arm/mach-at91/board-flexibity.c
++++ b/arch/arm/mach-at91/board-flexibity.c
+@@ -90,49 +90,49 @@ static struct gpio_led flexibity_leds[]
+ .name = "usb1:green",
+ .gpio = AT91_PIN_PA12,
+ .active_low = 1,
+- .default_trigger = "default-on",
++ .default_trigger = "heartbeat",
+ },
+ {
+ .name = "usb1:red",
+ .gpio = AT91_PIN_PA13,
+ .active_low = 1,
+- .default_trigger = "default-on",
++ .default_trigger = "heartbeat",
+ },
+ {
+ .name = "usb2:green",
+ .gpio = AT91_PIN_PB26,
+ .active_low = 1,
+- .default_trigger = "default-on",
++ .default_trigger = "heartbeat",
+ },
+ {
+ .name = "usb2:red",
+ .gpio = AT91_PIN_PB27,
+ .active_low = 1,
+- .default_trigger = "default-on",
++ .default_trigger = "heartbeat",
+ },
+ {
+ .name = "usb3:green",
+ .gpio = AT91_PIN_PC8,
+ .active_low = 1,
+- .default_trigger = "default-on",
++ .default_trigger = "heartbeat",
+ },
+ {
+ .name = "usb3:red",
+ .gpio = AT91_PIN_PC6,
+ .active_low = 1,
+- .default_trigger = "default-on",
++ .default_trigger = "heartbeat",
+ },
+ {
+ .name = "usb4:green",
+ .gpio = AT91_PIN_PB4,
+ .active_low = 1,
+- .default_trigger = "default-on",
++ .default_trigger = "heartbeat",
+ },
+ {
+ .name = "usb4:red",
+ .gpio = AT91_PIN_PB5,
+ .active_low = 1,
+- .default_trigger = "default-on",
++ .default_trigger = "heartbeat",
+ }
+ };
+
n549'>549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759