aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/socfpga/patches-4.4
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/socfpga/patches-4.4')
-rw-r--r--target/linux/socfpga/patches-4.4/0001-dt-bindings-gpio-altera-Fix-altr-interrupt-type-prop.patch45
-rw-r--r--target/linux/socfpga/patches-4.4/0002-usb-dwc2-gadget-Repair-DSTS-register-decoding.patch36
-rw-r--r--target/linux/socfpga/patches-4.4/0003-ARM-socfpga-dts-Enable-MMC-support-at-correct-place-.patch90
-rw-r--r--target/linux/socfpga/patches-4.4/0004-ARM-socfpga-Add-support-for-HPS-LEDs-on-SoCKit.patch66
-rw-r--r--target/linux/socfpga/patches-4.4/0005-ARM-socfpga-Add-support-for-HPS-KEYs-SWs-on-SoCKit.patch100
5 files changed, 337 insertions, 0 deletions
diff --git a/target/linux/socfpga/patches-4.4/0001-dt-bindings-gpio-altera-Fix-altr-interrupt-type-prop.patch b/target/linux/socfpga/patches-4.4/0001-dt-bindings-gpio-altera-Fix-altr-interrupt-type-prop.patch
new file mode 100644
index 0000000000..b89793a162
--- /dev/null
+++ b/target/linux/socfpga/patches-4.4/0001-dt-bindings-gpio-altera-Fix-altr-interrupt-type-prop.patch
@@ -0,0 +1,45 @@
+From b32732e51a774e8514f40975f2600f02ef9db0b4 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Mon, 29 Feb 2016 17:19:59 +0100
+Subject: [PATCH 1/5] dt-bindings: gpio: altera: Fix altr,interrupt-type
+ property
+
+The altr,interrupt-trigger property is not used by the driver.
+Instead, altr,interrupt-type is used by the driver and the driver
+does not probe if this property is not specified. Therefore, it
+is expected that there are no users of the -trigger property in
+the wild and that this is a typo in the documentation for the
+altera-pio controller. This patch fixes the typo.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Cc: Tien Hock Loh <thloh@altera.com>
+Cc: Linus Walleij <linus.walleij@linaro.org>
+---
+ Documentation/devicetree/bindings/gpio/gpio-altera.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Documentation/devicetree/bindings/gpio/gpio-altera.txt b/Documentation/devicetree/bindings/gpio/gpio-altera.txt
+index 12f5014..826a720 100644
+--- a/Documentation/devicetree/bindings/gpio/gpio-altera.txt
++++ b/Documentation/devicetree/bindings/gpio/gpio-altera.txt
+@@ -12,7 +12,7 @@ Required properties:
+ - #interrupt-cells : Should be 1. The interrupt type is fixed in the hardware.
+ - The first cell is the GPIO offset number within the GPIO controller.
+ - interrupts: Specify the interrupt.
+-- altr,interrupt-trigger: Specifies the interrupt trigger type the GPIO
++- altr,interrupt-type: Specifies the interrupt trigger type the GPIO
+ hardware is synthesized. This field is required if the Altera GPIO controller
+ used has IRQ enabled as the interrupt type is not software controlled,
+ but hardware synthesized. Required if GPIO is used as an interrupt
+@@ -35,7 +35,7 @@ gpio_altr: gpio@0xff200000 {
+ reg = <0xff200000 0x10>;
+ interrupts = <0 45 4>;
+ altr,ngpio = <32>;
+- altr,interrupt-trigger = <IRQ_TYPE_EDGE_RISING>;
++ altr,interrupt-type = <IRQ_TYPE_EDGE_RISING>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ #interrupt-cells = <1>;
+--
+2.7.0
+
diff --git a/target/linux/socfpga/patches-4.4/0002-usb-dwc2-gadget-Repair-DSTS-register-decoding.patch b/target/linux/socfpga/patches-4.4/0002-usb-dwc2-gadget-Repair-DSTS-register-decoding.patch
new file mode 100644
index 0000000000..9be3834055
--- /dev/null
+++ b/target/linux/socfpga/patches-4.4/0002-usb-dwc2-gadget-Repair-DSTS-register-decoding.patch
@@ -0,0 +1,36 @@
+From e5cbd23e4f40181c907a1abc136b17de8cb86809 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Thu, 17 Dec 2015 23:42:35 +0100
+Subject: [PATCH 2/5] usb: dwc2: gadget: Repair DSTS register decoding
+
+The "enumspd" field is located in register DSTS[2:1], but the code
+which checks the bitfield does not shift the value accordingly. This
+in turn causes incorrect detection of gadget link partner speed in
+dwc2_hsotg_irq_enumdone() .
+
+Shift the value accordingly to fix the problem with speed detection.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Cc: Felipe Balbi <balbi@ti.com>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: John Youn <johnyoun@synopsys.com>
+---
+ drivers/usb/dwc2/gadget.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
+index 0abf73c..48e47c1 100644
+--- a/drivers/usb/dwc2/gadget.c
++++ b/drivers/usb/dwc2/gadget.c
+@@ -2095,7 +2095,7 @@ static void dwc2_hsotg_irq_enumdone(struct dwc2_hsotg *hsotg)
+ */
+
+ /* catch both EnumSpd_FS and EnumSpd_FS48 */
+- switch (dsts & DSTS_ENUMSPD_MASK) {
++ switch ((dsts & DSTS_ENUMSPD_MASK) >> DSTS_ENUMSPD_SHIFT) {
+ case DSTS_ENUMSPD_FS:
+ case DSTS_ENUMSPD_FS48:
+ hsotg->gadget.speed = USB_SPEED_FULL;
+--
+2.7.0
+
diff --git a/target/linux/socfpga/patches-4.4/0003-ARM-socfpga-dts-Enable-MMC-support-at-correct-place-.patch b/target/linux/socfpga/patches-4.4/0003-ARM-socfpga-dts-Enable-MMC-support-at-correct-place-.patch
new file mode 100644
index 0000000000..b12de6dcf9
--- /dev/null
+++ b/target/linux/socfpga/patches-4.4/0003-ARM-socfpga-dts-Enable-MMC-support-at-correct-place-.patch
@@ -0,0 +1,90 @@
+From 6b8c64eb90e5d958f32524ff2d0571b3b6ac92df Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Mon, 21 Dec 2015 00:42:01 -0600
+Subject: [PATCH 3/5] ARM: socfpga: dts: Enable MMC support at correct place in
+ the DT
+
+The socfpga.dtsi explicitly enabled MMC support, but not all boards are
+equiped with an MMC card. There are setups which only have QSPI NOR.
+Therefore, disable the MMC support on socfpga.dtsi level and enable it
+on per-board basis.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Cc: Alan Tull <atull@altera.com>
+Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
+Cc: Marek Vasut <marex@denx.de>
+Cc: Olof Johansson <olof@lixom.net>
+Cc: Thor Thayer <tthayer@altera.com>
+Cc: Vince Bridgers <vbridgers2013@gmail.com>
+Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
+---
+ arch/arm/boot/dts/socfpga.dtsi | 1 +
+ arch/arm/boot/dts/socfpga_arria5_socdk.dts | 1 +
+ arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts | 1 +
+ arch/arm/boot/dts/socfpga_cyclone5_socdk.dts | 1 +
+ arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 1 +
+ 5 files changed, 5 insertions(+)
+
+diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
+index 39c470e..3ed4abd 100644
+--- a/arch/arm/boot/dts/socfpga.dtsi
++++ b/arch/arm/boot/dts/socfpga.dtsi
+@@ -677,6 +677,7 @@
+ #size-cells = <0>;
+ clocks = <&l4_mp_clk>, <&sdmmc_clk_divided>;
+ clock-names = "biu", "ciu";
++ status = "disabled";
+ };
+
+ ocram: sram@ffff0000 {
+diff --git a/arch/arm/boot/dts/socfpga_arria5_socdk.dts b/arch/arm/boot/dts/socfpga_arria5_socdk.dts
+index a75a666..3c88678 100644
+--- a/arch/arm/boot/dts/socfpga_arria5_socdk.dts
++++ b/arch/arm/boot/dts/socfpga_arria5_socdk.dts
+@@ -79,6 +79,7 @@
+ &mmc0 {
+ vmmc-supply = <&regulator_3_3v>;
+ vqmmc-supply = <&regulator_3_3v>;
++ status = "okay";
+ };
+
+ &usb1 {
+diff --git a/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts
+index 555e9ca..afea364 100644
+--- a/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts
++++ b/arch/arm/boot/dts/socfpga_cyclone5_de0_sockit.dts
+@@ -100,6 +100,7 @@
+ &mmc0 {
+ vmmc-supply = <&regulator_3_3v>;
+ vqmmc-supply = <&regulator_3_3v>;
++ status = "okay";
+ };
+
+ &uart0 {
+diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
+index d4d0a28..15e43f4 100644
+--- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
++++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts
+@@ -84,6 +84,7 @@
+ cd-gpios = <&portb 18 0>;
+ vmmc-supply = <&regulator_3_3v>;
+ vqmmc-supply = <&regulator_3_3v>;
++ status = "okay";
+ };
+
+ &usb1 {
+diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
+index 48bf651..b61f22f 100644
+--- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
++++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
+@@ -80,6 +80,7 @@
+ &mmc0 {
+ vmmc-supply = <&regulator_3_3v>;
+ vqmmc-supply = <&regulator_3_3v>;
++ status = "okay";
+ };
+
+ &usb1 {
+--
+2.7.0
+
diff --git a/target/linux/socfpga/patches-4.4/0004-ARM-socfpga-Add-support-for-HPS-LEDs-on-SoCKit.patch b/target/linux/socfpga/patches-4.4/0004-ARM-socfpga-Add-support-for-HPS-LEDs-on-SoCKit.patch
new file mode 100644
index 0000000000..954f03e990
--- /dev/null
+++ b/target/linux/socfpga/patches-4.4/0004-ARM-socfpga-Add-support-for-HPS-LEDs-on-SoCKit.patch
@@ -0,0 +1,66 @@
+From e56e545745dc42cba743dab549d0afb1a39d14b4 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Mon, 22 Jun 2015 23:37:47 +0200
+Subject: [PATCH 4/5] ARM: socfpga: Add support for HPS LEDs on SoCKit
+
+Add support for the blue LEDs on the SoCFPGA SoCkit board.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
+---
+ arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 32 +++++++++++++++++++++++++++
+ 1 file changed, 32 insertions(+)
+
+diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
+index b61f22f..1461690 100644
+--- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
++++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
+@@ -39,6 +39,34 @@
+ ethernet0 = &gmac1;
+ };
+
++ leds {
++ compatible = "gpio-leds";
++
++ hps_led0 {
++ label = "hps:blue:led0";
++ gpios = <&portb 24 0>; /* HPS_GPIO53 */
++ linux,default-trigger = "heartbeat";
++ };
++
++ hps_led1 {
++ label = "hps:blue:led1";
++ gpios = <&portb 25 0>; /* HPS_GPIO54 */
++ linux,default-trigger = "heartbeat";
++ };
++
++ hps_led2 {
++ label = "hps:blue:led2";
++ gpios = <&portb 26 0>; /* HPS_GPIO55 */
++ linux,default-trigger = "heartbeat";
++ };
++
++ hps_led3 {
++ label = "hps:blue:led3";
++ gpios = <&portb 27 0>; /* HPS_GPIO56 */
++ linux,default-trigger = "heartbeat";
++ };
++ };
++
+ regulator_3_3v: vcc3p3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC3P3";
+@@ -61,6 +89,10 @@
+ rxc-skew-ps = <2000>;
+ };
+
++&gpio1 { /* GPIO 30..57 */
++ status = "okay";
++};
++
+ &gpio2 {
+ status = "okay";
+ };
+--
+2.7.0
+
diff --git a/target/linux/socfpga/patches-4.4/0005-ARM-socfpga-Add-support-for-HPS-KEYs-SWs-on-SoCKit.patch b/target/linux/socfpga/patches-4.4/0005-ARM-socfpga-Add-support-for-HPS-KEYs-SWs-on-SoCKit.patch
new file mode 100644
index 0000000000..a5e53f5d6c
--- /dev/null
+++ b/target/linux/socfpga/patches-4.4/0005-ARM-socfpga-Add-support-for-HPS-KEYs-SWs-on-SoCKit.patch
@@ -0,0 +1,100 @@
+From a953c0800246e99c9b449bd9ec0b26682a82700c Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Tue, 23 Jun 2015 00:41:08 +0200
+Subject: [PATCH 5/5] ARM: socfpga: Add support for HPS KEYs/SWs on SoCKit
+
+Add support for the keys and flip-switches on the SoCFPGA SoCkit board.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Cc: Dinh Nguyen <dinguyen@opensource.altera.com>
+---
+ arch/arm/boot/dts/socfpga_cyclone5_sockit.dts | 62 ++++++++++++++++++++++++++-
+ 1 file changed, 61 insertions(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
+index 1461690..02e22f5 100644
+--- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
++++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts
+@@ -67,6 +67,62 @@
+ };
+ };
+
++ gpio-keys {
++ compatible = "gpio-keys";
++
++ hps_sw0 {
++ label = "hps_sw0";
++ gpios = <&portc 20 0>; /* HPS_GPI7 */
++ linux,input-type = <5>; /* EV_SW */
++ linux,code = <0x0>; /* SW_LID */
++ };
++
++ hps_sw1 {
++ label = "hps_sw1";
++ gpios = <&portc 19 0>; /* HPS_GPI6 */
++ linux,input-type = <5>; /* EV_SW */
++ linux,code = <0x5>; /* SW_DOCK */
++ };
++
++ hps_sw2 {
++ label = "hps_sw2";
++ gpios = <&portc 18 0>; /* HPS_GPI5 */
++ linux,input-type = <5>; /* EV_SW */
++ linux,code = <0xa>; /* SW_KEYPAD_SLIDE */
++ };
++
++ hps_sw3 {
++ label = "hps_sw3";
++ gpios = <&portc 17 0>; /* HPS_GPI4 */
++ linux,input-type = <5>; /* EV_SW */
++ linux,code = <0xc>; /* SW_ROTATE_LOCK */
++ };
++
++ hps_hkey0 {
++ label = "hps_hkey0";
++ gpios = <&portc 21 1>; /* HPS_GPI8 */
++ linux,code = <187>; /* KEY_F17 */
++ };
++
++ hps_hkey1 {
++ label = "hps_hkey1";
++ gpios = <&portc 22 1>; /* HPS_GPI9 */
++ linux,code = <188>; /* KEY_F18 */
++ };
++
++ hps_hkey2 {
++ label = "hps_hkey2";
++ gpios = <&portc 23 1>; /* HPS_GPI10 */
++ linux,code = <189>; /* KEY_F19 */
++ };
++
++ hps_hkey3 {
++ label = "hps_hkey3";
++ gpios = <&portc 24 1>; /* HPS_GPI11 */
++ linux,code = <190>; /* KEY_F20 */
++ };
++ };
++
+ regulator_3_3v: vcc3p3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VCC3P3";
+@@ -89,11 +145,15 @@
+ rxc-skew-ps = <2000>;
+ };
+
++&gpio0 { /* GPIO 0..29 */
++ status = "okay";
++};
++
+ &gpio1 { /* GPIO 30..57 */
+ status = "okay";
+ };
+
+-&gpio2 {
++&gpio2 { /* GPIO 58..66 (HLGPI 0..13 at offset 13) */
+ status = "okay";
+ };
+
+--
+2.7.0
+