From: Hauke Mehrtens Date: Sun, 2 Oct 2016 16:39:50 +0000 (+0200) Subject: lantiq: add Falcon support X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=93715427835e747f0e0b348c8a3ce91dd68ef4f9;p=openwrt%2Fstaging%2Fmkresin.git lantiq: add Falcon support This adds support for the Intel Falcon SoC for GPON. Support for the Falcon SoC was removed in commit c8218363951 svn rev: 40392 from OpenWrt, this commit adds it again. This patch adds a new subtarget for the Falcon SoC, but it still misses all the drivers needed to control the GPON part. Signed-off-by: Hauke Mehrtens --- diff --git a/target/linux/lantiq/Makefile b/target/linux/lantiq/Makefile index d3721f6c2c..66f3e7645d 100644 --- a/target/linux/lantiq/Makefile +++ b/target/linux/lantiq/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk BOARD:=lantiq BOARDNAME:=Lantiq FEATURES:=squashfs -SUBTARGETS:=xrx200 xway xway_legacy +SUBTARGETS:=xrx200 xway xway_legacy falcon MAINTAINER:=John Crispin KERNEL_PATCHVER:=4.4 diff --git a/target/linux/lantiq/dts/EASY88388.dts b/target/linux/lantiq/dts/EASY88388.dts new file mode 100644 index 0000000000..30264dc051 --- /dev/null +++ b/target/linux/lantiq/dts/EASY88388.dts @@ -0,0 +1,110 @@ +/dts-v1/; + +#include +#include "falcon.dtsi" +#include "falcon-sflash-16M.dtsi" + +/ { + model = "EASY88388 - Lantiq Falcon FTTDP8 Reference Board"; + compatible = "lantiq,falcon-easy88388", "lantiq,falcon"; + + chosen { + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + }; + + aliases { + spi0 = &ebu_cs0; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; // 64M at 0x0 + }; + + gpio-keys { + compatible = "gpio-keys"; + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = <0x198>; + }; + }; + + pinctrl { + led_pins: led-pins { + lantiq,pins = "io34", "io35", "io36", "io37", "io38", + "io39", "io40", "io41"; + lantiq,function = "gpio"; + }; + }; + + easy88388-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins &bootled_pins>; + + GPON { + label = "easy88388:green:gpon"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + TEST { + label = "easy88388:green:test"; + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + STATUS { + label = "easy88388:green:status"; + gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + ERROR { + label = "easy88388:red:error"; + gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + DSL1 { + label = "easy88388:dsl:1"; + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + DSL2 { + label = "easy88388:dsl:2"; + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + DSL3 { + label = "easy88388:dsl:3"; + gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + DSL4 { + label = "easy88388:dsl:4"; + gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + DSL5 { + label = "easy88388:dsl:5"; + gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + DSL6 { + label = "easy88388:dsl:6"; + gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + DSL7 { + label = "easy88388:dsl:7"; + gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + DSL8 { + label = "easy88388:dsl:8"; + gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + }; +}; + diff --git a/target/linux/lantiq/dts/EASY88444.dts b/target/linux/lantiq/dts/EASY88444.dts new file mode 100644 index 0000000000..f157150220 --- /dev/null +++ b/target/linux/lantiq/dts/EASY88444.dts @@ -0,0 +1,84 @@ +/dts-v1/; + +#include +#include "falcon.dtsi" +#include "falcon-sflash-16M.dtsi" + +/ { + model = "EASY88444 - Lantiq Falcon FTTdp G.FAST Reference Board"; + compatible = "lantiq,falcon-easy88444", "lantiq,falcon"; + + chosen { + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + }; + + aliases { + spi0 = &ebu_cs0; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; // 64M at 0x0 + }; + + gpio-keys { + compatible = "gpio-keys"; + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = <0x198>; + }; + }; + + pinctrl { + led_pins: led-pins { + lantiq,pins = "io34", "io35", "io37"; + lantiq,function = "gpio"; + }; + }; + + easy88444-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins &bootled_pins>; + + GPON { + label = "easy88444:green:gpon"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + TEST { + label = "easy88444:green:test"; + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + STATUS { + label = "easy88444:green:status"; + gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + GFAST1 { + label = "easy88444:gfast:1"; + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + GFAST2 { + label = "easy88444:gfast:2"; + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + GFAST3 { + label = "easy88444:gfast:3"; + gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + GFAST4 { + label = "easy88444:gfast:4"; + gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + + }; +}; + diff --git a/target/linux/lantiq/dts/EASY98000-base.dtsi b/target/linux/lantiq/dts/EASY98000-base.dtsi new file mode 100644 index 0000000000..203287092c --- /dev/null +++ b/target/linux/lantiq/dts/EASY98000-base.dtsi @@ -0,0 +1,114 @@ + +#include +#include + +/ { + compatible = "lantiq,falcon-easy98000", "lantiq,falcon"; + + chosen { + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + easy98000-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&bootled_pins>; + + LED_0 { + label = "easy98000:green:gpon"; + gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + LED_1 { + label = "easy98000:red:gpon"; + gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + LED_2 { + label = "easy98000:green:gpon_tx"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + LED_3 { + label = "easy98000:green:gpon_rx"; + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + LED_4 { + label = "easy98000:green:voice"; + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + LED_5 { + label = "easy98000:green:status"; + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + }; +}; + +&ebu_cs1 { + eth0: ethernet@0000000 { + compatible = "davicom,dm9000"; + device_type = "network"; + reg = <0x0000003 0x1>, <0x0000001 0x1>; + reg-names = "addr", "data"; + interrupt-parent = <&gpio1>; + #interrupt-cells = <2>; + interrupts = <10 IRQ_TYPE_LEVEL_LOW>; + local-mac-address = [ 00 00 00 00 00 00 ]; + }; + + cpld@3c00000 { + compatible = "lantiq,easy98000_addon"; + reg = <0x3c00000 0x2>; + }; + + cpld@3c0000c { + compatible = "lantiq,easy98000_cpld_led"; + reg = <0x3c0000c 0x2>, <0x3c00012 0x2>; + }; +}; + +/* // enable this for second uart: +&serial1 { + status = "okay"; +};*/ + +&spi { + status = "okay"; + + eeprom@1 { + compatible = "atmel,at25", "atmel,at25160n"; + reg = <2>; + spi-max-frequency = <1000000>; + spi-cpha; + spi-cpol; + + pagesize = <32>; + size = <2048>; + address-width = <16>; + }; +}; + +&i2c { + status = "okay"; + + clock-frequency = <100000>; + + /* eeprom-emulation by OMU */ + eeprom@50 { + compatible = "at,24c02"; + reg = <0x50>; + }; + eeprom@51 { + compatible = "at,24c02"; + reg = <0x51>; + }; +}; + diff --git a/target/linux/lantiq/dts/EASY98000NAND.dts b/target/linux/lantiq/dts/EASY98000NAND.dts new file mode 100644 index 0000000000..18afb9977f --- /dev/null +++ b/target/linux/lantiq/dts/EASY98000NAND.dts @@ -0,0 +1,40 @@ +/dts-v1/; + +#include "falcon.dtsi" +#include "EASY98000-base.dtsi" + +/ { + model = "EASY98000 - Lantiq Falcon (NAND)"; + compatible = "lantiq,falcon-easy98000-nand", "lantiq,falcon-easy98000", "lantiq,falcon"; + + aliases { + spi0 = &spi; + }; +}; + +&ebu_cs0 { + gen_nand@0 { + compatible = "gen_nand", "lantiq,nand-falcon"; + bank-width = <1>; + reg = <0x0 0x40000>; + #address-cells = <1>; + #size-cells = <1>; + linux,mtd-name = "gen_nand"; + bbt-use-flash; + + partition@0 { + label = "uboot"; + reg = <0x00000 0x40000>; + }; + + partition@10000 { + label = "uboot_env"; + reg = <0x40000 0x40000>; + }; + + partition@20000 { + label = "linux"; + reg = <0x80000 0x3d0000>; + }; + }; +}; diff --git a/target/linux/lantiq/dts/EASY98000NOR.dts b/target/linux/lantiq/dts/EASY98000NOR.dts new file mode 100644 index 0000000000..4dbfe41b63 --- /dev/null +++ b/target/linux/lantiq/dts/EASY98000NOR.dts @@ -0,0 +1,38 @@ +/dts-v1/; + +#include "falcon.dtsi" +#include "EASY98000-base.dtsi" + +/ { + model = "EASY98000 - Lantiq Falcon (NOR)"; + compatible = "lantiq,falcon-easy98000-nor", "lantiq,falcon-easy98000", "lantiq,falcon"; + + aliases { + spi0 = &spi; + }; +}; + +&ebu_cs0 { + cfi@0 { + compatible = "lantiq,nor"; + bank-width = <2>; + reg = <0x0 0x4000000>; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "uboot"; + reg = <0x00000 0x40000>; + }; + + partition@10000 { + label = "uboot_env"; + reg = <0x40000 0x40000>; + }; + + partition@20000 { + label = "linux"; + reg = <0x80000 0x3d0000>; + }; + }; +}; diff --git a/target/linux/lantiq/dts/EASY98000SFLASH.dts b/target/linux/lantiq/dts/EASY98000SFLASH.dts new file mode 100644 index 0000000000..90fc52c47a --- /dev/null +++ b/target/linux/lantiq/dts/EASY98000SFLASH.dts @@ -0,0 +1,16 @@ +/dts-v1/; + +#include "falcon.dtsi" +#include "EASY98000-base.dtsi" +#include "falcon-sflash-16M.dtsi" + +/ { + model = "EASY98000 - Lantiq Falcon (SFLASH)"; + compatible = "lantiq,falcon-easy98000-sflash", "lantiq,falcon-easy98000", "lantiq,falcon"; + + aliases { + spi0 = &ebu_cs0; + spi1 = &spi; + }; +}; + diff --git a/target/linux/lantiq/dts/EASY98020.dts b/target/linux/lantiq/dts/EASY98020.dts new file mode 100644 index 0000000000..7fbe7da472 --- /dev/null +++ b/target/linux/lantiq/dts/EASY98020.dts @@ -0,0 +1,99 @@ +/dts-v1/; + +#include + +#include "falcon.dtsi" +#include "falcon-sflash-16M.dtsi" + +/ { + model = "EASY98020 - Lantiq Falcon Reference Board"; + compatible = "lantiq,falcon-easy98020", "lantiq,falcon"; + + chosen { + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + }; + + aliases { + spi0 = &ebu_cs0; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; // 64M at 0x0 + }; + + gpio-keys { + compatible = "gpio-keys"; + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = <0x198>; + }; + }; + + pinctrl { + led_pins: phy-led-pins { + lantiq,pins = "io42", "io41", "io38", "io37"; + lantiq,function = "gpio"; + }; + }; + + easy98020-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&bootled_pins>; + + GPON { + label = "easy98020:green:gpon"; + gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + TEST { + label = "easy98020:green:test"; + gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + ETH { + label = "easy98020:green:status"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + VOICE { + label = "easy98020:green:voice"; + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + VIDEO { + label = "easy98020:green:video"; + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + }; + + easy98020-phy-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins>; + + GE0_ACT { + label = "easy98020:ge0_act"; + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + GE0_LINK { + label = "easy98020:ge0_link"; + gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + GE1_ACT { + label = "easy98020:ge1_act"; + gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + GE1_LINK { + label = "easy98020:ge1_link"; + gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; + default-state = "off"; + }; + }; +}; diff --git a/target/linux/lantiq/dts/EASY98020V18.dts b/target/linux/lantiq/dts/EASY98020V18.dts new file mode 100644 index 0000000000..1ddb921791 --- /dev/null +++ b/target/linux/lantiq/dts/EASY98020V18.dts @@ -0,0 +1,72 @@ +/dts-v1/; + +#include + +#include "falcon.dtsi" +#include "falcon-sflash-16M.dtsi" + +/ { + model = "EASY98020 - Lantiq Falcon Reference Board V1.8"; + compatible = "lantiq,falcon-easy98020-V18", "lantiq,falcon-easy98020", "lantiq,falcon"; + + chosen { + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + }; + + aliases { + spi0 = &ebu_cs0; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; // 64M at 0x0 + }; + + gpio-keys { + compatible = "gpio-keys"; + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = <0x198>; + }; + }; + + pinctrl { + led_pins: led-pins { + lantiq,pins = "io11", "io14", "io36", "io37", "io38"; + lantiq,function = "gpio"; + }; + }; + + easy98020-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins &bootled_pins>; + + GPON { + label = "easy98020:green:gpon"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + TEST { + label = "easy98020:green:test"; + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + ETH { + label = "easy98020:green:status"; + gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + VOICE { + label = "easy98020:green:voice"; + gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + VIDEO { + label = "easy98020:green:video"; + gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + }; +}; diff --git a/target/linux/lantiq/dts/EASY98021.dts b/target/linux/lantiq/dts/EASY98021.dts new file mode 100644 index 0000000000..b2574ac941 --- /dev/null +++ b/target/linux/lantiq/dts/EASY98021.dts @@ -0,0 +1,85 @@ +/dts-v1/; + +#include + +#include "falcon.dtsi" +#include "falcon-sflash-16M.dtsi" + +/ { + model = "EASY98021 - Lantiq Falcon HGU Reference Board"; + compatible = "lantiq,falcon-easy98021", "lantiq,falcon-easy98020", "lantiq,falcon"; + + chosen { + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + }; + + aliases { + spi0 = &ebu_cs0; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; // 64M at 0x0 + }; + + gpio-keys { + compatible = "gpio-keys"; + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = <0x198>; + }; + }; + + gpio-mmc { + /* Place-holder for SIM-Card connector, + to list the used GPIOs, no official binding */ + compatible = "gpio-mmc"; + gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>, + <&gpio0 3 GPIO_ACTIVE_HIGH>, + <&gpio0 2 GPIO_ACTIVE_HIGH>, + <0>; /* no CS */ + gpio-names = "di", "do", "clk", "cs"; + reset-gpio = <&gpio3 24 GPIO_ACTIVE_HIGH>; + }; + + pinctrl { + led_pins: led-pins { + lantiq,pins = "io11", "io14", "io36", "io37", "io38"; + lantiq,function = "gpio"; + }; + }; + + easy98021-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins &bootled_pins>; + + GPON { + label = "easy98021:green:gpon"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + TEST { + label = "easy98021:red:test"; + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + ETH { + label = "easy98021:green:status"; + gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + VOICE { + label = "easy98021:green:voice"; + gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + SIMCARD { + label = "easy98021:green:simcard"; + gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + }; +}; + diff --git a/target/linux/lantiq/dts/EASY98035SYNCE.dts b/target/linux/lantiq/dts/EASY98035SYNCE.dts new file mode 100644 index 0000000000..fa65a8c26e --- /dev/null +++ b/target/linux/lantiq/dts/EASY98035SYNCE.dts @@ -0,0 +1,80 @@ +/dts-v1/; + +#include "falcon.dtsi" +#include "falcon-sflash-16M.dtsi" + +/ { + model = "EASY98035SYNCE - Lantiq Falcon SFP Stick with SyncE"; + compatible = "lantiq,falcon-easy98035synce", "lantiq,falcon-sfp", "lantiq,falcon"; + + chosen { + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + }; + + aliases { + spi0 = &ebu_cs0; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; // 64M at 0x0 + }; + + pinctrl { + compatible = "lantiq,pinctrl-falcon"; + + asc0_func1: func1 { + func1_tx { + lantiq,pins = "io32"; + lantiq,mux = <1>; + lantiq,input = <0>; + }; + func1_rx { + lantiq,pins = "io33"; + lantiq,mux = <0>; + }; + }; + asc0_func2: func2 { + func2_tx { + lantiq,pins = "io32"; + lantiq,mux = <0>; + }; + func2_rx { + lantiq,pins = "io33"; + lantiq,mux = <1>; + lantiq,input = <0>; + }; + }; + asc0_func3: func3 { + func3_tx { + lantiq,pins = "io32"; + lantiq,mux = <1>; + lantiq,input = <0>; + }; + func3_rx { + lantiq,pins = "io33"; + lantiq,mux = <1>; + lantiq,input = <0>; + }; + }; + }; + + pinselect-asc0 { + compatible = "lantiq,pinselect-asc0"; + pinctrl-names = "asc0", "func1", "func2", "func3"; + pinctrl-0 = <&asc0_pins>; + pinctrl-1 = <&asc0_func1>; + pinctrl-2 = <&asc0_func2>; + pinctrl-3 = <&asc0_func3>; + }; +}; + +&serial0 { + pinctrl-names = "default"; + /* use "empty" pinctrl to leave setting from u-boot enabled */ + pinctrl-0 = < >; +}; + +&i2c { + status = "okay"; +}; diff --git a/target/linux/lantiq/dts/EASY98035SYNCE1588.dts b/target/linux/lantiq/dts/EASY98035SYNCE1588.dts new file mode 100644 index 0000000000..2e14eb3817 --- /dev/null +++ b/target/linux/lantiq/dts/EASY98035SYNCE1588.dts @@ -0,0 +1,80 @@ +/dts-v1/; + +#include "falcon.dtsi" +#include "falcon-sflash-16M.dtsi" + +/ { + model = "EASY98035SYNCE1588 - Lantiq Falcon SFP Stick with SyncE/1588"; + compatible = "lantiq,falcon-easy98035synce1588", "lantiq,falcon-sfp", "lantiq,falcon"; + + chosen { + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + }; + + aliases { + spi0 = &ebu_cs0; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; // 64M at 0x0 + }; + + pinctrl { + compatible = "lantiq,pinctrl-falcon"; + + asc0_func1: func1 { + func1_tx { + lantiq,pins = "io32"; + lantiq,mux = <1>; + lantiq,input = <0>; + }; + func1_rx { + lantiq,pins = "io33"; + lantiq,mux = <0>; + }; + }; + asc0_func2: func2 { + func2_tx { + lantiq,pins = "io32"; + lantiq,mux = <0>; + }; + func2_rx { + lantiq,pins = "io33"; + lantiq,mux = <1>; + lantiq,input = <0>; + }; + }; + asc0_func3: func3 { + func3_tx { + lantiq,pins = "io32"; + lantiq,mux = <1>; + lantiq,input = <0>; + }; + func3_rx { + lantiq,pins = "io33"; + lantiq,mux = <1>; + lantiq,input = <0>; + }; + }; + }; + + pinselect-asc0 { + compatible = "lantiq,pinselect-asc0"; + pinctrl-names = "asc0", "func1", "func2", "func3"; + pinctrl-0 = <&asc0_pins>; + pinctrl-1 = <&asc0_func1>; + pinctrl-2 = <&asc0_func2>; + pinctrl-3 = <&asc0_func3>; + }; +}; + +&serial0 { + pinctrl-names = "default"; + /* use "empty" pinctrl to leave setting from u-boot enabled */ + pinctrl-0 = < >; +}; + +&i2c { + status = "okay"; +}; diff --git a/target/linux/lantiq/dts/FALCON-MDU.dts b/target/linux/lantiq/dts/FALCON-MDU.dts new file mode 100644 index 0000000000..1d459c4453 --- /dev/null +++ b/target/linux/lantiq/dts/FALCON-MDU.dts @@ -0,0 +1,57 @@ +/dts-v1/; + +#include + +#include "falcon.dtsi" +#include "falcon-sflash-16M.dtsi" + +/ { + model = "MDU - Lantiq Falcon / Vinax MDU Board"; + compatible = "lantiq,falcon-mdu", "lantiq,falcon"; + + chosen { + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + }; + + aliases { + spi0 = &ebu_cs0; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; // 64M at 0x0 + }; + + mdu-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&bootled_pins>; + + LED_0 { + label = "mdu:green:gpon"; + gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + LED_1 { + label = "mdu:green:status"; + gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + LED_2 { + label = "mdu:green:2"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + LED_3 { + label = "mdu:green:3"; + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + LED_4 { + label = "mdu:green:4"; + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + default-state = "keep"; + }; + }; +}; + diff --git a/target/linux/lantiq/dts/FALCON-SFP.dts b/target/linux/lantiq/dts/FALCON-SFP.dts new file mode 100644 index 0000000000..df2026c1dc --- /dev/null +++ b/target/linux/lantiq/dts/FALCON-SFP.dts @@ -0,0 +1,80 @@ +/dts-v1/; + +#include "falcon.dtsi" +#include "falcon-sflash-16M.dtsi" + +/ { + model = "SFP - Lantiq Falcon SFP Stick"; + compatible = "lantiq,falcon-sfp", "lantiq,falcon"; + + chosen { + bootargs-append = "console=ttyLTQ0,115200 init=/etc/preinit"; + }; + + aliases { + spi0 = &ebu_cs0; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; // 64M at 0x0 + }; + + pinctrl { + compatible = "lantiq,pinctrl-falcon"; + + asc0_func1: func1 { + func1_tx { + lantiq,pins = "io32"; + lantiq,mux = <1>; + lantiq,output = <0>; + }; + func1_rx { + lantiq,pins = "io33"; + lantiq,mux = <0>; + }; + }; + asc0_func2: func2 { + func2_tx { + lantiq,pins = "io32"; + lantiq,mux = <0>; + }; + func2_rx { + lantiq,pins = "io33"; + lantiq,mux = <1>; + lantiq,input = <0>; + }; + }; + asc0_func3: func3 { + func3_tx { + lantiq,pins = "io32"; + lantiq,mux = <1>; + lantiq,output = <0>; + }; + func3_rx { + lantiq,pins = "io33"; + lantiq,mux = <1>; + lantiq,input = <0>; + }; + }; + }; + + pinselect-asc0 { + compatible = "lantiq,pinselect-asc0"; + pinctrl-names = "asc0", "func1", "func2", "func3"; + pinctrl-0 = <&asc0_pins>; + pinctrl-1 = <&asc0_func1>; + pinctrl-2 = <&asc0_func2>; + pinctrl-3 = <&asc0_func3>; + }; +}; + +&serial0 { + pinctrl-names = "default"; + /* use "empty" pinctrl to leave setting from u-boot enabled */ + pinctrl-0 = < >; +}; + +&i2c { + status = "okay"; +}; diff --git a/target/linux/lantiq/dts/falcon-sflash-16M.dtsi b/target/linux/lantiq/dts/falcon-sflash-16M.dtsi new file mode 100644 index 0000000000..d95acc21ef --- /dev/null +++ b/target/linux/lantiq/dts/falcon-sflash-16M.dtsi @@ -0,0 +1,37 @@ + +&ebu_cs0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "lantiq,sflash-falcon", "simple-bus"; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spansion,s25fl129p0", "spansion,s25fl129p1"; + reg = <0 0>; + linux,mtd-name = "sflash"; + spi-max-frequency = <80000000>; + m25p,fast-read; + + partition@0 { + reg = <0x0 0x40000>; + label = "uboot"; + read-only; + }; + + partition@40000 { + reg = <0x40000 0x80000>; + label = "uboot_env"; + }; + + partition@C0000 { + reg = <0xC0000 0x740000>; + label = "image0"; + }; + + partition@800000 { + reg = <0x800000 0x800000>; + label = "image1"; + }; + }; +}; diff --git a/target/linux/lantiq/dts/falcon.dtsi b/target/linux/lantiq/dts/falcon.dtsi new file mode 100644 index 0000000000..76dde61760 --- /dev/null +++ b/target/linux/lantiq/dts/falcon.dtsi @@ -0,0 +1,388 @@ +/ { + #address-cells = <1>; + #size-cells = <1>; + compatible = "lantiq,falcon"; + + cpus { + cpu@0 { + compatible = "mips,mips34kc"; + }; + }; + + aliases { + serial0 = &serial0; + serial1 = &serial1; + gpio0 = &gpio0; + gpio1 = &gpio1; + gpio2 = &gpio2; + gpio3 = &gpio3; + gpio4 = &gpio4; + }; + + clocks { + compatible = "simple-bus"; + + cpu_clk: cpu { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <400000000>; + clock-output-names = "cpu"; + }; + + io_clk: io { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <200000000>; + clock-output-names = "io"; + }; + + fpi_clk: fpi { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <100000000>; + clock-output-names = "fpi"; + }; + }; + + ebu_cs0: localbus@10000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "lantiq,localbus", "simple-bus"; + reg = <0x10000000 0x4000000>; + ranges = <0x0 0x10000000 0x4000000>; + }; + ebu_cs1: localbus@14000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "lantiq,localbus", "simple-bus"; + reg = <0x14000000 0x4000000>; + ranges = <0x0 0x14000000 0x4000000>; + }; + + ebu@18000000 { + compatible = "lantiq,ebu-falcon"; + reg = <0x18000000 0x100>; + }; + + sbs2@1D000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "lantiq,sysb2", "simple-bus"; + reg = <0x1D000000 0x1000000>; + ranges = <0x0 0x1D000000 0x1000000>; + + clock_sysgpe: clock-controller@700000 { + compatible = "lantiq,sysgpe-falcon"; + reg = <0x700000 0x100>; + #clock-cells = <1>; + }; + + mps@4000 { + compatible = "lantiq,mps-falcon", "lantiq,mps-xrx100"; + reg = <0x4000 0x1000>; + interrupt-parent = <&icu0>; + interrupts = <154 155>; + lantiq,mbx = <&mpsmbx>; + }; + + gpio0: gpio@810000 { + compatible = "lantiq,falcon-gpio"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&icu0>; + interrupts = <44>; + reg = <0x810000 0x80>; + clocks = <&clock_syseth 16>; + }; + + gpio2: gpio@810100 { + compatible = "lantiq,falcon-gpio"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&icu0>; + interrupts = <46>; + reg = <0x810100 0x80>; + clocks = <&clock_syseth 17>; + }; + + clock_syseth: clock-controller@B00000 { + compatible = "lantiq,syseth-falcon"; + reg = <0xB00000 0x100>; + #clock-cells = <1>; + }; + + pad@B01000 { + compatible = "lantiq,pad-falcon"; + reg = <0xB01000 0x100>; + lantiq,bank = <0>; + clocks = <&clock_syseth 20>; + }; + + pad@B02000 { + compatible = "lantiq,pad-falcon"; + reg = <0xB02000 0x100>; + lantiq,bank = <2>; + clocks = <&clock_syseth 21>; + }; + }; + + fpi@1E000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "lantiq,fpi", "simple-bus"; + reg = <0x1E000000 0x1000000>; + ranges = <0x0 0x1E000000 0x1000000>; + + serial1: serial@100B00 { + status = "disabled"; + compatible = "lantiq,asc"; + reg = <0x100B00 0x100>; + interrupt-parent = <&icu0>; + interrupts = <112 113 114>; + line = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&asc1_pins>; + clocks = <&clock_sys1 11>; + }; + + serial0: serial@100C00 { + compatible = "lantiq,asc"; + reg = <0x100C00 0x100>; + interrupt-parent = <&icu0>; + interrupts = <104 105 106>; + line = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&asc0_pins>; + clocks = <&clock_sys1 12>; + }; + + spi: spi@100D00 { + status = "disabled"; + compatible = "intel,falcon-spi", "intel,xrx100-spi", "lantiq,spi-lantiq-ssc"; + interrupts = <22 23 24 25>; + interrupt-names = "spi_tx", "spi_rx", "spi_err", "spi_frm"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x100D00 0x100>; + interrupt-parent = <&icu0>; + clocks = <&clock_sys1 13>; + base_cs = <1>; + num_cs = <2>; + }; + + gptc@100E00 { + compatible = "lantiq,gptc-falcon"; + reg = <0x100E00 0x100>; + }; + + i2c: i2c@200000 { + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + compatible = "lantiq,lantiq-i2c"; + reg = <0x200000 0x10000>; + interrupt-parent = <&icu0>; + interrupts = <18 19 20 21>; + gpios = <&gpio1 7 0 &gpio1 8 0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_pins>; + clocks = <&clock_sys1 14>; + }; + + gpio1: gpio@800100 { + compatible = "lantiq,falcon-gpio"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&icu0>; + interrupts = <45>; + reg = <0x800100 0x100>; + clocks = <&clock_sys1 16>; + }; + + gpio3: gpio@800200 { + compatible = "lantiq,falcon-gpio"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&icu0>; + interrupts = <47>; + reg = <0x800200 0x100>; + clocks = <&clock_sys1 17>; + }; + + gpio4: gpio@800300 { + compatible = "lantiq,falcon-gpio"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&icu0>; + interrupts = <48>; + reg = <0x800300 0x100>; + clocks = <&clock_sys1 18>; + }; + + pad@800400 { + compatible = "lantiq,pad-falcon"; + reg = <0x800400 0x100>; + lantiq,bank = <1>; + clocks = <&clock_sys1 20>; + }; + + pad@800500 { + compatible = "lantiq,pad-falcon"; + reg = <0x800500 0x100>; + lantiq,bank = <3>; + clocks = <&clock_sys1 21>; + }; + + pad@800600 { + compatible = "lantiq,pad-falcon"; + reg = <0x800600 0x100>; + lantiq,bank = <4>; + clocks = <&clock_sys1 22>; + }; + + status@802000 { + compatible = "lantiq,status-falcon"; + reg = <0x802000 0x80>; + }; + + clock_sys1: clock-controller@F00000 { + compatible = "lantiq,sys1-falcon"; + reg = <0xF00000 0x100>; + #clock-cells = <1>; + }; + }; + + sbs0@1F000000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + reg = <0x1F000000 0x400000>; + ranges = <0x0 0x1F000000 0x400000>; + + mpsmbx: mpsmbx@200000 { + reg = <0x200000 0x200>; + }; + }; + + sbs1@1F700000 { + + }; + + biu@1F800000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "lantiq,biu", "simple-bus"; + reg = <0x1F800000 0x800000>; + ranges = <0x0 0x1F800000 0x800000>; + + icu0: icu@80200 { + #interrupt-cells = <1>; + interrupt-controller; + compatible = "lantiq,icu"; + reg = <0x80200 0x28 + 0x80228 0x28 + 0x80250 0x28 + 0x80278 0x28 + 0x802a0 0x28>; + }; + + watchdog@803F0 { + compatible = "lantiq,wdt"; + reg = <0x803F0 0x10>; + clocks = <&io_clk>; /* currently no effect */ + }; + }; + + pinctrl { + compatible = "lantiq,pinctrl-falcon"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinctrl0 { + /*ntr { + lantiq,groups = "ntr8k"; + lantiq,function = "ntr"; + };*/ + hrst { + lantiq,groups = "hrst"; + lantiq,function = "rst"; + }; + }; + + asc0_pins: asc0 { + asc0 { + lantiq,groups = "asc0"; + lantiq,function = "asc"; + }; + }; + asc1_pins: asc1 { + asc1 { + lantiq,groups = "asc1"; + lantiq,function = "asc"; + }; + }; + i2c_pins: i2c { + i2c { + lantiq,groups = "i2c"; + lantiq,function = "i2c"; + }; + }; + bootled_pins: bootled { + bootled { + lantiq,groups = "bootled"; + lantiq,function = "led"; + }; + }; + ntr_ntr8k: ntr8k { + ntr8k { + lantiq,groups = "ntr8k"; + lantiq,function = "ntr"; + }; + }; + ntr_pps: pps { + pps { + lantiq,groups = "pps"; + lantiq,function = "ntr"; + }; + }; + ntr_gpio: gpio { + gpio { + lantiq,pins = "io5"; + lantiq,mux = <1>; + lantiq,output = <0>; + }; + }; + slic_pins: slic { + slic { + lantiq,groups = "slic"; + lantiq,function = "slic"; + }; + }; + }; + + pinselect-ntr { + compatible = "lantiq,onu-ntr","lantiq,pinselect-ntr"; + pinctrl-names = "ntr8k", "pps", "gpio"; + pinctrl-0 = <&ntr_ntr8k>; + pinctrl-1 = <&ntr_pps>; + pinctrl-2 = <&ntr_gpio>; + }; + + pinselect-asc1 { + compatible = "lantiq,onu-asc1","lantiq,pinselect-asc1"; + pinctrl-names = "default", "asc1"; + pinctrl-0 = <&slic_pins>; + pinctrl-1 = <&asc1_pins>; + }; + +}; diff --git a/target/linux/lantiq/falcon/config-default b/target/linux/lantiq/falcon/config-default new file mode 100644 index 0000000000..de4fa3686d --- /dev/null +++ b/target/linux/lantiq/falcon/config-default @@ -0,0 +1,10 @@ +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_ECC=y +CONFIG_MTD_SPLIT_FIRMWARE_NAME="linux" +CONFIG_PINCTRL_FALCON=y +# CONFIG_PSB6970_PHY is not set +# CONFIG_RTL8366_SMI is not set +CONFIG_SOC_FALCON=y +# CONFIG_SOC_TYPE_XWAY is not set +# CONFIG_SOC_XWAY is not set +CONFIG_SPI_FALCON=y diff --git a/target/linux/lantiq/falcon/profiles/00-default.mk b/target/linux/lantiq/falcon/profiles/00-default.mk new file mode 100644 index 0000000000..26bc8b502b --- /dev/null +++ b/target/linux/lantiq/falcon/profiles/00-default.mk @@ -0,0 +1,9 @@ +define Profile/Default + NAME:=Default Profile + PRIORITY:=1 +endef + +define Profile/Default/Description + Default package set compatible with most boards. +endef +$(eval $(call Profile,Default)) diff --git a/target/linux/lantiq/falcon/target.mk b/target/linux/lantiq/falcon/target.mk new file mode 100644 index 0000000000..b87d1dc1b3 --- /dev/null +++ b/target/linux/lantiq/falcon/target.mk @@ -0,0 +1,13 @@ +ARCH:=mips +SUBTARGET:=falcon +BOARDNAME:=Falcon +FEATURES:=squashfs mips16 nand +CPU_TYPE:=24kc + +DEFAULT_PACKAGES+= kmod-leds-gpio \ + kmod-gpio-button-hotplug \ + kmod-ledtrig-heartbeat + +define Target/Description + Lantiq Falcon +endef diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index 2e0fdb3055..490bd543e0 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -565,4 +565,85 @@ TARGET_DEVICES += VGV7519BRN endif + +ifeq ($(SUBTARGET),falcon) + +define Device/EASY98000 + IMAGE_SIZE := 3904k + DEVICE_TITLE := EASY98000 - Lantiq Falcon Eval Board NOR + DEVICE_DTS := EASY98000NOR + DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 +endef +TARGET_DEVICES += EASY98000 + +define Device/EASY98000NAND + IMAGE_SIZE := 3904k + DEVICE_TITLE := EASY98000 - Lantiq Falcon Eval Board NAND + DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 +endef +TARGET_DEVICES += EASY98000NAND + +define Device/EASY98000SFLASH + IMAGE_SIZE := 7424k + DEVICE_TITLE := EASY98000 - Lantiq Falcon Eval Board SFLASH + DEVICE_PACKAGES := kmod-dm9000 kmod-i2c-lantiq kmod-eeprom-at24 +endef +TARGET_DEVICES += EASY98000SFLASH + +define Device/FALCON-MDU + IMAGE_SIZE := 7424k + DEVICE_TITLE := MDU - Lantiq Falcon / VINAXdp MDU Board +endef +TARGET_DEVICES += FALCON-MDU + +define Device/EASY88388 + IMAGE_SIZE := 7424k + DEVICE_TITLE := EASY88388 - Lantiq Falcon FTTDP8 Reference Board +endef +TARGET_DEVICES += EASY88388 + +define Device/EASY88444 + IMAGE_SIZE := 7424k + DEVICE_TITLE := EASY88444 - Lantiq Falcon FTTdp G.FAST Reference Board +endef +TARGET_DEVICES += EASY88444 + +define Device/FALCON-SFP + IMAGE_SIZE := 7424k + DEVICE_TITLE := SFP - Lantiq Falcon SFP Stick +endef +TARGET_DEVICES += FALCON-SFP + +define Device/EASY98035SYNCE + IMAGE_SIZE := 7424k + DEVICE_TITLE := EASY98035SYNCE - Lantiq Falcon SFP Stick with Synchronous Ethernet +endef +TARGET_DEVICES += EASY98035SYNCE + +define Device/EASY98035SYNCE1588 + IMAGE_SIZE := 7424k + DEVICE_TITLE := EASY98035SYNCE1588 - Lantiq Falcon SFP Stick with SyncE and IEEE1588 +endef +TARGET_DEVICES += EASY98035SYNCE1588 + +define Device/EASY98020 + IMAGE_SIZE := 7424k + DEVICE_TITLE := EASY98020 - Lantiq Falcon SFU Reference Board +endef +TARGET_DEVICES += EASY98020 + +define Device/EASY98020V18 + IMAGE_SIZE := 7424k + DEVICE_TITLE := EASY98020V18 - Lantiq Falcon SFU Reference Board V1.8 +endef +TARGET_DEVICES += EASY98020V18 + +define Device/EASY98021 + IMAGE_SIZE := 7424k + DEVICE_TITLE := EASY98021 - Lantiq Falcon HGU Reference Board +endef +TARGET_DEVICES += EASY98021 + +endif + $(eval $(call BuildImage))