Openwrt/target/linux/kirkwood/patches-4.9/107-03-nsa310s.patch
Paul Wassi 9808b9ae02 kirkwood: switch to kernel 4.9
Add patches-4.9, some of them (heavily) rewritten:
  - ea4500 is upstream available, keep only LEDE changes in dts
  - ea3500 is changed to match the structure of the upstream ea4500 dts
  - nsa310s rewritten to include the common dtsi
  - nsa325 is dropped, since already upstream

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
[refresh kernel config, add on100, use the switchdev based mv88e6171
driver for the linksys boards, keep lede specific rootfs/kernel
partition names for linksys boards, reorder patches]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-04 16:29:07 +02:00

268 lines
5.3 KiB
Diff

--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -239,6 +239,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
kirkwood-nsa310.dtb \
kirkwood-nsa310a.dtb \
kirkwood-nsa310b.dtb \
+ kirkwood-nsa310s.dtb \
kirkwood-nsa320.dtb \
kirkwood-nsa325.dtb \
kirkwood-openblocks_a6.dtb \
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-nsa310s.dts
@@ -0,0 +1,254 @@
+/dts-v1/;
+
+#include "kirkwood-nsa3x0-common.dtsi"
+
+/ {
+ model = "ZyXEL NSA310S";
+ compatible = "zyxel,nsa320s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
+
+ memory {
+ device_type = "memory";
+ reg = <0x00000000 0x10000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttyS0,115200n8 earlyprintk";
+ stdout-path = &uart0;
+ };
+
+ ocp@f1000000 {
+ pinctrl: pin-controller@10000 {
+ pinctrl-names = "default";
+
+ pmx_sata0: pmx-sata0 {
+ marvell,pins;
+ marvell,function = "sata0";
+ };
+
+ pmx_sata1: pmx-sata1 {
+ marvell,pins;
+ marvell,function = "sata1";
+ };
+
+ pmx_usb_power: pmx-usb-power {
+ marvell,pins = "mpp21";
+ marvell,function = "gpio";
+ };
+
+ pmx_pwr_off: pmx-pwr-off {
+ marvell,pins = "mpp27";
+ marvell,function = "gpio";
+ };
+
+ pmx_btn_reset: pmx-btn-reset {
+ marvell,pins = "mpp24";
+ marvell,function = "gpio";
+ };
+
+ pmx_btn_copy: pmx-btn-copy {
+ marvell,pins = "mpp25";
+ marvell,function = "gpio";
+ };
+
+ pmx_btn_power: pmx-btn-power {
+ marvell,pins = "mpp26";
+ marvell,function = "gpio";
+ };
+
+ pmx_led_hdd2_green: pmx-led-hdd2-green {
+ marvell,pins = "mpp34";
+ marvell,function = "gpio";
+ };
+
+ pmx_led_hdd2_red: pmx-led-hdd2-red {
+ marvell,pins = "mpp12";
+ marvell,function = "gpio";
+ };
+
+ pmx_led_usb_green: pmx-led-usb-green {
+ marvell,pins = "mpp15";
+ marvell,function = "gpio";
+ };
+
+ pmx_led_copy_green: pmx-led-copy-green {
+ marvell,pins = "mpp22";
+ marvell,function = "gpio";
+ };
+
+ pmx_led_copy_red: pmx-led-copy-red {
+ marvell,pins = "mpp23";
+ marvell,function = "gpio";
+ };
+
+ pmx_led_sys_green: pmx-led-sys-green {
+ marvell,pins = "mpp28";
+ marvell,function = "gpio";
+ };
+
+ pmx_led_sys_orange: pmx-led-sys-orange {
+ marvell,pins = "mpp29";
+ marvell,function = "gpio";
+ };
+
+ pmx_led_hdd1_green: pmx-led-hdd1-green {
+ marvell,pins = "mpp16";
+ marvell,function = "gpio";
+ };
+
+ pmx_led_hdd1_red: pmx-led-hdd1-red {
+ marvell,pins = "mpp13";
+ marvell,function = "gpio";
+ };
+
+ pmx_pwr_sata1: pmx-pwr-sata1 {
+ marvell,pins = "mpp33";
+ marvell,function = "gpio";
+ };
+
+ };
+
+ i2c@11000 {
+ status = "okay";
+
+ ht1382: rtc@68 {
+ compatible = "htk,ht1382";
+ reg = <0x68>;
+ };
+ };
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-0 = <&pmx_pwr_sata1>;
+ pinctrl-names = "default";
+
+ usb0_power: regulator@1 {
+ enable-active-high;
+ };
+
+ sata1_power: regulator@2 {
+ compatible = "regulator-fixed";
+ reg = <2>;
+ regulator-name = "SATA1 Power";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ regulator-boot-on;
+ enable-active-high;
+ gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ gpio_keys {
+ power {
+ gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+ };
+ copy {
+ gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
+ };
+ reset {
+ gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ green-sys {
+ label = "nsa310s:green:sys";
+ gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
+ };
+ orange-sys {
+ label = "nsa310s:orange:sys";
+ gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
+ };
+ green-hdd1 {
+ label = "nsa310s:green:hdd1";
+ gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+ };
+ red-hdd1 {
+ label = "nsa310s:red:hdd1";
+ gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+ };
+ green-hdd2 {
+ label = "nsa310s:green:hdd2";
+ gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+ };
+ red-hdd2 {
+ label = "nsa310s:red:hdd2";
+ gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ };
+ green-usb {
+ label = "nsa310s:green:usb";
+ gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
+ };
+ green-copy {
+ label = "nsa310s:green:copy";
+ gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+ };
+ red-copy {
+ label = "nsa310s:red:copy";
+ gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ gpio_poweroff {
+ gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&nand {
+ status = "okay";
+ chip-delay = <35>;
+
+ partition@0 {
+ label = "uboot";
+ reg = <0x0000000 0xe0000>;
+ read-only;
+ };
+
+ partition@e0000 {
+ label = "uboot_env";
+ reg = <0xe0000 0x100000>;
+ };
+
+ partition@100000 {
+ label = "second stage u-boot";
+ reg = <0x100000 0x200000>;
+ };
+
+ partition@200000 {
+ label = "ubi";
+ reg = <0x200000 0x7e00000>;
+ };
+};
+
+&sata {
+ status = "okay";
+ nr-ports = <2>;
+};
+
+&mdio {
+ status = "okay";
+ ethphy0: ethernet-phy@1 {
+ compatible = "marvell,88e1318s";
+ reg = <1>;
+ marvell,reg-init = <0x1 0x16 0x0 0x3>,
+ <0x1 0x10 0x0 0x1017>,
+ <0x1 0x11 0x0 0x4408>,
+ <0x1 0x16 0x0 0x0>,
+ <0x1 0x4 0x0 0x1e1>,
+ <0x1 0x9 0x0 0x300>,
+ <0x1 0x10 0x0 0x3860>,
+ <0x1 0x0 0x0 0x9140>;
+ };
+};
+
+&eth0 {
+ status = "okay";
+ ethernet0-port@0 {
+ phy-handle = <&ethphy0>;
+ };
+};