X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Framips%2Fdts%2Fmt7620a_sanlinking_d240.dts;h=ad0747cb740dec9e755d0883164355c978760b74;hb=19c45b95dbb53a7ba1a26c201277ca86293bf404;hp=c2b94eebb38c7503e182cf6657be40aa3127ce78;hpb=556ff0987539271647535094309605433f2aa96f;p=openwrt%2Fopenwrt.git diff --git a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts index c2b94eebb3..ad0747cb74 100644 --- a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts +++ b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts @@ -1,42 +1,14 @@ +// SPDX-License-Identifier: BSD-3-Clause /* - * BSD LICENSE - * * Copyright(c) 2017 Kristian Evensen . * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Broadcom Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/dts-v1/; - #include "mt7620a.dtsi" #include #include +#include / { compatible = "sanlinking,d240", "ralink,mt7620a-soc"; @@ -74,19 +46,21 @@ compatible = "gpio-leds"; led_power: power { - label = "d240:blue:power"; + function = LED_FUNCTION_POWER; + color = ; gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; }; usb { - label = "d240:blue:usb"; + function = LED_FUNCTION_USB; + color = ; gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>; trigger-sources = <&ohci_port1>, <&ehci_port1>; linux,default-trigger = "usbport"; }; air { - label = "d240:blue:wifi"; + label = "blue:wifi"; gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; @@ -117,7 +91,7 @@ &spi0 { status = "okay"; - en25q128@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; @@ -143,6 +117,20 @@ label = "factory"; reg = <0x40000 0x10000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x200>; + }; + + macaddr_factory_4: macaddr@4 { + reg = <0x4 0x6>; + }; + }; }; partition@50000 { @@ -169,34 +157,35 @@ }; ðernet { - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; + nvmem-cells = <&macaddr_factory_4>; + nvmem-cell-names = "mac-address"; + + mediatek,portmap = "llllw"; }; &wmac { - ralink,mtd-eeprom = <&factory 0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; }; -&pinctrl { - state_default: pinctrl0 { - default { - ralink,group = "i2c", "uartf", "wled", "spi refclk", "pa"; - ralink,function = "gpio"; - }; +&state_default { + default { + groups = "i2c", "uartf", "wled", "spi refclk", "pa"; + function = "gpio"; + }; - /* - * The sd function of the nd_sd group configures two of the - * groups pins as gpios. The pins are used as PCIe reset/power. - * Due to the driver load order, the pins are configured way to - * late if triggered by the sd-card driver. - * To not introduce another kind of driver load order - * dependency and configure the pins as early as possible, - * means during pinmux driver load. - */ - gpio_sd { - ralink,group = "nd_sd"; - ralink,function = "sd"; - }; + /* + * The sd function of the nd_sd group configures two of the + * groups pins as gpios. The pins are used as PCIe reset/power. + * Due to the driver load order, the pins are configured way to + * late if triggered by the sd-card driver. + * To not introduce another kind of driver load order + * dependency and configure the pins as early as possible, + * means during pinmux driver load. + */ + gpio_sd { + groups = "nd_sd"; + function = "sd"; }; };