aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2018-05-31 19:41:28 +0200
committerDaniel Golle <daniel@makrotopia.org>2018-06-01 15:45:06 +0200
commitdcc34574efba524cf75608c3b61bfa579bfb8aa4 (patch)
tree7ed7970952f1e9a705ae8819c3983844efd79d86 /target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts
parentd44b7b7d312b1d4b920042cac35b86e4f089cd04 (diff)
downloadupstream-dcc34574efba524cf75608c3b61bfa579bfb8aa4.tar.gz
upstream-dcc34574efba524cf75608c3b61bfa579bfb8aa4.tar.bz2
upstream-dcc34574efba524cf75608c3b61bfa579bfb8aa4.zip
oxnas: bring in new oxnas target
Reboot the oxnas target based on Linux 4.14 by rebasing our support on top of the now-existing upstream kernel support. This commit brings oxnas support to the level of v4.17 having upstream drivers for Ethernet, Serial and NAND flash. Botch up OpenWrt's local drivers for EHCI, SATA and PCIe based on the new platform code and device-tree. Re-introduce base-files from old oxnas target which works for now but needs further clean-up towards generic board support. Functional issues: * PCIe won't come up (hence no USB3 on Shuttle KD20) * I2C bus of Akitio myCloud device is likely not to work (missing debounce support in new pinctrl driver) Code-style issues: * plla/pllb needs further cleanup -- currently their users or writing into the syscon regmap after acquireling the clk instead of using defined clk_*_*() functions to setup multipliers and dividors. * PCIe phy needs its own little driver. * SATA driver is a monster and should be split into an mfd having a raidctrl regmap, sata controller, sata ports and sata phy. Tested on MitraStar STG-212 aka. Medion Akoya MD86xxx and Shuttle KD20. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts')
-rw-r--r--target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts187
1 files changed, 187 insertions, 0 deletions
diff --git a/target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts
new file mode 100644
index 0000000000..badfa2578e
--- /dev/null
+++ b/target/linux/oxnas/files/arch/arm/boot/dts/ox820-shuttle-kd20.dts
@@ -0,0 +1,187 @@
+/dts-v1/;
+
+#include "ox820.dtsi"
+
+#include <dt-bindings/input/input.h>
+
+/ {
+ model = "Shuttle KD20";
+
+ compatible = "shuttle,kd20", "oxsemi,ox820";
+
+ chosen {
+ bootargs = "earlyprintk";
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory {
+ /* 128Mbytes DDR */
+ reg = <0x60000000 0x8000000>;
+ };
+
+ aliases {
+ serial0 = &uart0;
+ gpio0 = &gpio0;
+ gpio1 = &gpio1;
+ };
+
+ i2c-gpio {
+ compatible = "i2c-gpio";
+ gpios = <&gpio1 9 0 &gpio1 10 0>;
+ i2c-gpio,delay-us = <10>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ rtc0: rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ };
+ };
+
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ poll-interval = <100>;
+
+ power {
+ label = "power";
+ gpios = <&gpio0 10 1>;
+ linux,code = <KEY_POWER>;
+ };
+ reset {
+ label = "reset";
+ gpios = <&gpio0 11 1>;
+ linux,code = <KEY_RESTART>;
+ };
+ eject1 {
+ label = "eject1";
+ gpios = <&gpio0 5 1>;
+ linux,code = <KEY_EJECTCD>;
+ };
+ eject2 {
+ label = "eject2";
+ gpios = <&gpio0 6 1>;
+ linux,code = <162>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+ status {
+ label = "kd20:blue:status";
+ gpios = <&gpio1 16 0>;
+ };
+ status2 {
+ label = "kd20:red:status";
+ gpios = <&gpio1 17 0>;
+ };
+ hdd1blue {
+ label = "kd20:blue:hdd1";
+ gpios = <&gpio0 27 0>;
+ linux,default-trigger = "ata1";
+ };
+ hdd1red {
+ label = "kd20:red:hdd1";
+ gpios = <&gpio1 4 0>;
+ };
+ hdd2blue {
+ label = "kd20:blue:hdd2";
+ gpios = <&gpio1 6 0>;
+ linux,default-trigger = "ata2";
+ };
+ hdd2red {
+ label = "kd20:red:hdd2";
+ gpios = <&gpio1 7 0>;
+ };
+ usb {
+ label = "kd20:blue:usb";
+ gpios = <&gpio1 8 0>;
+ };
+ };
+
+ beeper: beeper {
+ compatible = "gpio-beeper";
+ gpios = <&gpio1 11 0>;
+ };
+
+ gpio-fan {
+ compatible = "gpio-fan";
+ gpios = <&gpio0 2 1>;
+ gpio-fan,speed-map = <0 0
+ 3000 1>;
+ };
+
+ gpio-poweroff {
+ compatible = "gpio-poweroff";
+ gpios = <&gpio0 9 0>;
+ };
+};
+
+&uart0 {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart0>;
+};
+
+&nandc {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_nand>;
+
+ nand@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ nand-ecc-mode = "soft";
+ nand-ecc-algo = "hamming";
+
+ partition@0 {
+ label = "stage1";
+ reg = <0x00000000 0x00040000>;
+ read-only;
+ };
+
+ partition@40000 {
+ label = "u-boot";
+ reg = <0x00040000 0x00200000>;
+ read-only;
+ };
+
+ partition@240000 {
+ label = "initrd";
+ reg = <0x00240000 0x00600000>;
+ };
+
+ partition@840000 {
+ label = "kernel";
+ reg = <0x00840000 0x007C0000>;
+ };
+
+ partition@e00000 {
+ label = "ubi";
+ reg = <0x01000000 0x07000000>;
+ };
+ };
+};
+
+&etha {
+ status = "okay";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_etha_mdio>;
+};
+
+&ehci {
+ status = "okay";
+};
+
+&sata {
+ status = "okay";
+ nr-ports = <2>;
+};
+
+&pcie0 {
+ status = "okay";
+};