From e4d9217fe5419364d2fe89e69c2e4f9f47fd30b6 Mon Sep 17 00:00:00 2001 From: Mathias Kresin Date: Mon, 26 Nov 2018 13:26:06 +0100 Subject: ramips: improve BDCOM WAP2100-SK support Use the generic board detection instead of the target specific one as all recent additions are doing. Setup the USB led via devicetree (a58535771f11) and include the required driver by default. Merge the led userspace setting with an existing identical case. Use the wps led for boot status indication. Move the partitions into a partition table node (6031ab345df8) and drop needless labels. Drop misplaced cells properties (53624c1702e6). Cleanup the pinmux and only switch pins to gpio functions which a referenced as gpio in the dts. Match the maximum image size with the size of the firmware partition. Signed-off-by: Mathias Kresin --- target/linux/ramips/dts/BDCOM-WAP2100-SK.dts | 66 ++++++++++++++++------------ 1 file changed, 37 insertions(+), 29 deletions(-) (limited to 'target/linux/ramips/dts/BDCOM-WAP2100-SK.dts') diff --git a/target/linux/ramips/dts/BDCOM-WAP2100-SK.dts b/target/linux/ramips/dts/BDCOM-WAP2100-SK.dts index 7f9cbe74bd..62a87c8444 100644 --- a/target/linux/ramips/dts/BDCOM-WAP2100-SK.dts +++ b/target/linux/ramips/dts/BDCOM-WAP2100-SK.dts @@ -6,9 +6,14 @@ #include / { - compatible = "bdcom,bdcom-wap2100-sk", "ralink,mt7620a-soc"; + compatible = "bdcom,wap2100-sk", "ralink,mt7620a-soc"; model = "BDCOM WAP2100-SK"; + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + }; + chosen { bootargs = "console=ttyS0,115200"; }; @@ -19,9 +24,11 @@ usb { label = "wap2100-sk:green:usb"; gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + trigger-sources = <&ohci_port1>, <&ehci_port1>; + linux,default-trigger = "usbport"; }; - wps { + led_power: wps { label = "wap2100-sk:green:wps"; gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; }; @@ -34,8 +41,6 @@ gpio-keys-polled { compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; poll-interval = <20>; wps { @@ -55,34 +60,37 @@ &spi0 { status = "okay"; - en25q128@0 { - #address-cells = <1>; - #size-cells = <1>; + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - firmware: partition@50000 { - label = "firmware"; - reg = <0x50000 0xf70000>; + partitions { + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf70000>; + }; }; }; }; @@ -123,7 +131,7 @@ &pinctrl { state_default: pinctrl0 { default { - ralink,group = "wdt", "mdio", "spi refclk", "uartf", "wled"; + ralink,group = "spi refclk", "uartf", "wled"; ralink,function = "gpio"; }; }; -- cgit v1.2.3