[openwrt/openwrt] pistachio: Add extra devices to dts file
LEDE Commits
lede-commits at lists.infradead.org
Fri Aug 21 08:59:51 EDT 2020
hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0d81afe3dfc4901831765c358151751da9f7178e
commit 0d81afe3dfc4901831765c358151751da9f7178e
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Aug 15 16:42:29 2020 +0200
pistachio: Add extra devices to dts file
This adds some extra devices to the DTS file.
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
...01-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch | 30 ++++++++
...DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch | 43 ++++++++++++
...PS-DTS-img-marduk-add-nand-device-support.patch | 30 --------
...-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch | 81 ++++++++++++++++++++++
...4-MIPS-DTS-img-marduk-Add-partition-name.patch} | 17 +++--
5 files changed, 166 insertions(+), 35 deletions(-)
diff --git a/target/linux/pistachio/patches-5.4/901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch b/target/linux/pistachio/patches-5.4/901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch
new file mode 100644
index 0000000000..cd97e38e00
--- /dev/null
+++ b/target/linux/pistachio/patches-5.4/901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch
@@ -0,0 +1,30 @@
+From 0023c706f7e0f0f02bd48a63a2f3c04c839532ae Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Sat, 15 Aug 2020 16:04:53 +0200
+Subject: [PATCH 901/904] MIPS: DTS: img: marduk: Add SPI NAND flash
+
+Add Gigadevice GD5F4GQ4UCYIGT SPI NAND flash to the device tree.
+
+The NAND flash chip is connected with quad SPI, but reading currently
+fails in quad SPI mode.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ arch/mips/boot/dts/img/pistachio_marduk.dts | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
++++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
+@@ -88,6 +88,12 @@
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+ };
++
++ flash at 1 {
++ compatible = "spi-nand";
++ reg = <1>;
++ spi-max-frequency = <50000000>;
++ };
+ };
+
+ &uart0 {
diff --git a/target/linux/pistachio/patches-5.4/902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch b/target/linux/pistachio/patches-5.4/902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch
new file mode 100644
index 0000000000..af1882e287
--- /dev/null
+++ b/target/linux/pistachio/patches-5.4/902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch
@@ -0,0 +1,43 @@
+From b7700154d75e8d7c9a2022f09c2d5430137606fa Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Sat, 15 Aug 2020 16:05:25 +0200
+Subject: [PATCH 902/904] MIPS: DTS: img: marduk: Add Cascoda CA8210 6LoWPAN
+
+Add Cascoda CA8210 6LoWPAN controller to device tree.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ arch/mips/boot/dts/img/pistachio_marduk.dts | 22 +++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
++++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
+@@ -75,6 +75,28 @@
+ VDD-supply = <&internal_dac_supply>;
+ };
+
++&spfi0 {
++ status = "okay";
++ pinctrl-0 = <&spim0_pins>, <&spim0_cs0_alt_pin>, <&spim0_cs2_alt_pin>, <&spim0_cs3_alt_pin>, <&spim0_cs4_alt_pin>;
++ pinctrl-names = "default";
++
++ cs-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>, <&gpio0 2 GPIO_ACTIVE_HIGH>,
++ <&gpio1 12 GPIO_ACTIVE_HIGH>, <&gpio1 13 GPIO_ACTIVE_HIGH>;
++
++ ca8210: ca8210 at 0 {
++ status = "okay";
++ compatible = "cascoda,ca8210";
++ reg = <0>;
++ spi-max-frequency = <4000000>;
++ spi-cpol;
++ reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
++ irq-gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
++ extclock-enable;
++ extclock-freq = <16000000>;
++ extclock-gpio = <2>;
++ };
++};
++
+ &spfi1 {
+ status = "okay";
+
diff --git a/target/linux/pistachio/patches-5.4/902-MIPS-DTS-img-marduk-add-nand-device-support.patch b/target/linux/pistachio/patches-5.4/902-MIPS-DTS-img-marduk-add-nand-device-support.patch
deleted file mode 100644
index d95f1af94d..0000000000
--- a/target/linux/pistachio/patches-5.4/902-MIPS-DTS-img-marduk-add-nand-device-support.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From c13cfb3a49cf1578bb85f19a7066f262503a39ba Mon Sep 17 00:00:00 2001
-From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
-Date: Thu, 24 Nov 2016 19:26:46 +0530
-Subject: MIPS: DTS: img: marduk: add nand device support
-
-Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
----
- arch/mips/boot/dts/img/pistachio_marduk.dts | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- a/arch/mips/boot/dts/img/pistachio_marduk.dts
-+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
-@@ -89,6 +89,17 @@
- spi-max-frequency = <50000000>;
- linux,mtd-name = "spi-nor";
- };
-+ flash at 1 {
-+ compatible = "spi-nand";
-+ reg = <1>;
-+ spi-max-frequency = <50000000>;
-+ nand-on-flash-bbt;
-+ spi-rx-bus-width = <2>;
-+ spi-tx-bus-width = <4>;
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ linux,mtd-name = "spi-nand";
-+ };
- };
-
- &uart0 {
diff --git a/target/linux/pistachio/patches-5.4/903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch b/target/linux/pistachio/patches-5.4/903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch
new file mode 100644
index 0000000000..0814658998
--- /dev/null
+++ b/target/linux/pistachio/patches-5.4/903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch
@@ -0,0 +1,81 @@
+From ad4eba0c36ce8af6ab9ea1bc163e4c1ac7c271c3 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Sat, 15 Aug 2020 16:09:02 +0200
+Subject: [PATCH 903/904] MIPS: DTS: img: marduk: Add NXP SC16IS752IPW
+
+Add NXP SC16IS752IPW SPI-UART controller to device tree.
+
+This controller drives 2 UARTs and 7 LEDs on the board.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ arch/mips/boot/dts/img/pistachio_marduk.dts | 51 +++++++++++++++++++++
+ 1 file changed, 51 insertions(+)
+
+--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
++++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
+@@ -46,6 +46,46 @@
+ regulator-max-microvolt = <1800000>;
+ };
+
++ /* EXT clock from ca8210 is fed to sc16is752 */
++ ca8210_ext_clk: ca8210-ext-clk {
++ compatible = "fixed-clock";
++ #clock-cells = <0>;
++ clock-frequency = <16000000>;
++ clock-output-names = "ca8210_ext_clock";
++ };
++
++ gpioleds {
++ compatible = "gpio-leds";
++ user1 {
++ label = "marduk:red:user1";
++ gpios = <&sc16is752 0 GPIO_ACTIVE_LOW>;
++ };
++ user2 {
++ label = "marduk:red:user2";
++ gpios = <&sc16is752 1 GPIO_ACTIVE_LOW>;
++ };
++ user3 {
++ label = "marduk:red:user3";
++ gpios = <&sc16is752 2 GPIO_ACTIVE_LOW>;
++ };
++ user4 {
++ label = "marduk:red:user4";
++ gpios = <&sc16is752 3 GPIO_ACTIVE_LOW>;
++ };
++ user5 {
++ label = "marduk:red:user5";
++ gpios = <&sc16is752 4 GPIO_ACTIVE_LOW>;
++ };
++ user6 {
++ label = "marduk:red:user6";
++ gpios = <&sc16is752 5 GPIO_ACTIVE_LOW>;
++ };
++ user7 {
++ label = "marduk:red:user7";
++ gpios = <&sc16is752 6 GPIO_ACTIVE_LOW>;
++ };
++ };
++
+ leds {
+ compatible = "pwm-leds";
+ heartbeat {
+@@ -95,6 +135,17 @@
+ extclock-freq = <16000000>;
+ extclock-gpio = <2>;
+ };
++
++ sc16is752: sc16is752 at 1 {
++ compatible = "nxp,sc16is752";
++ reg = <1>;
++ clocks = <&ca8210_ext_clk>;
++ spi-max-frequency = <4000000>;
++ interrupt-parent = <&gpio0>;
++ interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
++ gpio-controller;
++ #gpio-cells = <2>;
++ };
+ };
+
+ &spfi1 {
diff --git a/target/linux/pistachio/patches-5.4/901-MIPS-DTS-img-marduk-add-nor-partition-name.patch b/target/linux/pistachio/patches-5.4/904-MIPS-DTS-img-marduk-Add-partition-name.patch
similarity index 51%
rename from target/linux/pistachio/patches-5.4/901-MIPS-DTS-img-marduk-add-nor-partition-name.patch
rename to target/linux/pistachio/patches-5.4/904-MIPS-DTS-img-marduk-Add-partition-name.patch
index a8d021373b..ce41c67461 100644
--- a/target/linux/pistachio/patches-5.4/901-MIPS-DTS-img-marduk-add-nor-partition-name.patch
+++ b/target/linux/pistachio/patches-5.4/904-MIPS-DTS-img-marduk-Add-partition-name.patch
@@ -1,20 +1,27 @@
-From b5f49b448cd3c7ab930f1a53c88f739a86071df8 Mon Sep 17 00:00:00 2001
+From ff0e950b605047bf50d470023e0fb2fc2003a0f0 Mon Sep 17 00:00:00 2001
From: Ian Pozella <Ian.Pozella at imgtec.com>
Date: Mon, 20 Feb 2017 10:38:07 +0000
-Subject: MIPS: DTS: img: marduk: add nor partition name
+Subject: [PATCH 904/904] MIPS: DTS: img: marduk: Add partition name
Signed-off-by: Ian Pozella <Ian.Pozella at imgtec.com>
---
- arch/mips/boot/dts/img/pistachio_marduk.dts | 1 +
- 1 file changed, 1 insertion(+)
+ arch/mips/boot/dts/img/pistachio_marduk.dts | 2 ++
+ 1 file changed, 2 insertions(+)
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
-@@ -87,6 +87,7 @@
+@@ -160,12 +160,14 @@
compatible = "spansion,s25fl016k", "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <50000000>;
+ linux,mtd-name = "spi-nor";
};
+
+ flash at 1 {
+ compatible = "spi-nand";
+ reg = <1>;
+ spi-max-frequency = <50000000>;
++ linux,mtd-name = "spi-nand";
+ };
};
More information about the lede-commits
mailing list