From: INAGAKI Hiroshi Date: Tue, 5 Dec 2023 13:15:38 +0000 (+0900) Subject: mvebu: rename common dtsi of FortiGate 30E/50E X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=73be4b9e488235dc9d86054ffd35cb8e14088191;p=openwrt%2Fstaging%2Fblogic.git mvebu: rename common dtsi of FortiGate 30E/50E Rename the common dtsi of Fortinet FortiGate 30E/50E for the preparation of adding support for the other FortiGate/FortiWiFi 3xE/5xE devices. Signed-off-by: INAGAKI Hiroshi --- diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts index dca6fbacf013..b73f0f1fd2cf 100644 --- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts +++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "armada-385-fortinet-fg-x0e.dtsi" +#include "armada-385-fortinet-fg-xxe.dtsi" / { model = "Fortinet FortiGate 30E"; diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts index cf13bb5fdad7..c56a06fda0fd 100644 --- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts +++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "armada-385-fortinet-fg-x0e.dtsi" +#include "armada-385-fortinet-fg-xxe.dtsi" / { model = "Fortinet FortiGate 50E"; diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi deleted file mode 100644 index 6a5e016d307c..000000000000 --- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi +++ /dev/null @@ -1,346 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -/dts-v1/; - -#include -#include -#include -#include "armada-385.dtsi" - -/ { - aliases { - led-boot = &led_status_green; - led-failsafe = &led_status_red; - led-running = &led_status_green; - led-upgrade = &led_status_green; - label-mac-device = ð0; - }; - - chosen { - stdout-path = "serial0:9600n8"; - }; - - soc { - ranges = ; - }; - - gpio-keys { - compatible = "gpio-keys"; - pinctrl-names = "default"; - pinctrl-0 = <&pmx_gpio_keys_pins>; - - reset { - label = "reset"; - linux,code = ; - gpios = <&gpio1 22 GPIO_ACTIVE_LOW>; - }; - }; - - gpio_leds: gpio-leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&pmx_gpio_leds_pins>; - - led-0 { - gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_ALARM; - }; - - led-1 { - gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; - color = ; - function = "ha"; - }; - - led_status_green: led-2 { - gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_STATUS; - }; - - led-3 { - gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; - color = ; - function = "ha"; - }; - - led-4 { - gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_ALARM; - }; - - led_status_red: led-5 { - gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_STATUS; - }; - - led-6 { - gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_SPEED_LAN; - function-enumerator = <4>; - linux,default-trigger = "mv88e6xxx-1:01:1Gbps"; - }; - - led-7 { - gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_SPEED_LAN; - function-enumerator = <4>; - linux,default-trigger = "mv88e6xxx-1:01:100Mbps"; - }; - - led-8 { - gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_SPEED_LAN; - function-enumerator = <3>; - linux,default-trigger = "mv88e6xxx-1:02:100Mbps"; - }; - - led-9 { - gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_SPEED_LAN; - function-enumerator = <3>; - linux,default-trigger = "mv88e6xxx-1:02:1Gbps"; - }; - - led-10 { - gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_SPEED_LAN; - function-enumerator = <1>; - linux,default-trigger = "mv88e6xxx-1:04:1Gbps"; - }; - - led-11 { - gpios = <&gpio2 13 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_SPEED_LAN; - function-enumerator = <1>; - linux,default-trigger = "mv88e6xxx-1:04:100Mbps"; - }; - - led-12 { - gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_SPEED_LAN; - function-enumerator = <2>; - linux,default-trigger = "mv88e6xxx-1:03:1Gbps"; - }; - - led-13 { - gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; - color = ; - function = LED_FUNCTION_SPEED_LAN; - function-enumerator = <2>; - linux,default-trigger = "mv88e6xxx-1:03:100Mbps"; - }; - }; - - reg_usb_vbus: regulator-usb-vbus { - compatible = "fixed-regulator"; - regulator-name = "usb-vbus"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - gpio = <&gpio1 21 GPIO_ACTIVE_LOW>; - regulator-always-on; - }; -}; - -&i2c0 { - pinctrl-names = "default"; - pinctrl-0 = <&i2c0_pins>; - status = "okay"; - - gpio2: gpio@24 { - compatible = "nxp,pca9555"; - reg = <0x24>; - gpio-controller; - #gpio-cells = <0x2>; - }; - - hwmon@28 { - compatible = "nuvoton,nct7802"; - reg = <0x28>; - }; -}; - -&uart0 { - pinctrl-names = "default"; - pinctrl-0 = <&uart0_pins>; - status = "okay"; -}; - -&pinctrl { - pmx_gpio_leds_pins: gpio-leds-pins { - marvell,pins = "mpp30", "mpp32", "mpp33", "mpp35", - "mpp45", "mpp47"; - marvell,function = "gpio"; - }; - - pmx_usb_pins: usb-pins { - marvell,pins = "mpp53"; - marvell,function = "gpio"; - }; - - pmx_gpio_keys_pins: gpio-keys-pins { - marvell,pins = "mpp54"; - marvell,function = "gpio"; - }; -}; - -&bm { - status = "okay"; -}; - -&bm_bppi { - status = "okay"; -}; - -ð0 { - pinctrl-names = "default"; - pinctrl-0 = <&ge0_rgmii_pins>; - status = "okay"; - - phy-connection-type = "rgmii-id"; - buffer-manager = <&bm>; - bm,pool-long = <0>; - bm,pool-short = <1>; - nvmem-cells = <&macaddr_bdinfo_d880 0>; - nvmem-cell-names = "mac-address"; - - fixed-link { - speed = <1000>; - full-duplex; - }; -}; - -&usb3_0 { - pinctrl-names = "default"; - pinctrl-0 = <&pmx_usb_pins>; - status = "okay"; - - vbus-supply = <®_usb_vbus>; -}; - -&spi1 { - pinctrl-names = "default"; - pinctrl-0 = <&spi1_pins>; - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <50000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - reg = <0x0 0x1c0000>; - label = "u-boot"; - read-only; - }; - - partition@1c0000 { - reg = <0x1c0000 0x10000>; - label = "firmware-info"; - - /* - * 0x10 - 0x2f : image name (image1) - * 0x30 - 0x4f : image name (image2) - * 0x170 (1byte): active image (0x0/0x1) - * 0x184 - 0x185: kernel block count (image1) - * 0x18c - 0x18d: rootfs block count (image1) - * 0x194 - 0x195: kernel block count (image2) - * 0x19c - 0x19d: rootfs block count (image2) - * 0x1be (1byte): bit7 -> active flag (image1)? - * 0x1ce (1byte): bit7 -> active flag (image2)? - * - * Note: block size --> 0x200 (512 bytes) - */ - }; - - partition@1d0000 { - reg = <0x1d0000 0x10000>; - label = "dtb"; - read-only; - }; - - partition@1e0000 { - reg = <0x1e0000 0x10000>; - label = "u-boot-env"; - read-only; - }; - - partition@1f0000 { - reg = <0x1f0000 0x10000>; - label = "board-info"; - read-only; - - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_bdinfo_d880: macaddr@d880 { - compatible = "mac-base"; - reg = <0xd880 0x6>; - #nvmem-cell-cells = <1>; - }; - }; - }; - - partition@200000 { - reg = <0x200000 0x600000>; - label = "kernel"; - }; - - partition@800000 { - reg = <0x800000 0x1800000>; - label = "rootfs"; - }; - - partition@2000000 { - reg = <0x2000000 0x600000>; - label = "kn2"; - read-only; - }; - - partition@2600000 { - reg = <0x2600000 0x1800000>; - label = "rfs2"; - read-only; - }; - - partition@3e00000 { - reg = <0x3e00000 0x1200000>; - label = "part1"; - read-only; - }; - - partition@5000000 { - reg = <0x5000000 0x1200000>; - label = "part2"; - read-only; - }; - - partition@6200000 { - reg = <0x6200000 0x1e00000>; - label = "config"; - read-only; - }; - }; - }; -}; diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-xxe.dtsi b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-xxe.dtsi new file mode 100644 index 000000000000..6a5e016d307c --- /dev/null +++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-xxe.dtsi @@ -0,0 +1,346 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include +#include +#include +#include "armada-385.dtsi" + +/ { + aliases { + led-boot = &led_status_green; + led-failsafe = &led_status_red; + led-running = &led_status_green; + led-upgrade = &led_status_green; + label-mac-device = ð0; + }; + + chosen { + stdout-path = "serial0:9600n8"; + }; + + soc { + ranges = ; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pmx_gpio_keys_pins>; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio1 22 GPIO_ACTIVE_LOW>; + }; + }; + + gpio_leds: gpio-leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pmx_gpio_leds_pins>; + + led-0 { + gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_ALARM; + }; + + led-1 { + gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; + color = ; + function = "ha"; + }; + + led_status_green: led-2 { + gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_STATUS; + }; + + led-3 { + gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; + color = ; + function = "ha"; + }; + + led-4 { + gpios = <&gpio1 13 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_ALARM; + }; + + led_status_red: led-5 { + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_STATUS; + }; + + led-6 { + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <4>; + linux,default-trigger = "mv88e6xxx-1:01:1Gbps"; + }; + + led-7 { + gpios = <&gpio2 5 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <4>; + linux,default-trigger = "mv88e6xxx-1:01:100Mbps"; + }; + + led-8 { + gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <3>; + linux,default-trigger = "mv88e6xxx-1:02:100Mbps"; + }; + + led-9 { + gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <3>; + linux,default-trigger = "mv88e6xxx-1:02:1Gbps"; + }; + + led-10 { + gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <1>; + linux,default-trigger = "mv88e6xxx-1:04:1Gbps"; + }; + + led-11 { + gpios = <&gpio2 13 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <1>; + linux,default-trigger = "mv88e6xxx-1:04:100Mbps"; + }; + + led-12 { + gpios = <&gpio2 14 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <2>; + linux,default-trigger = "mv88e6xxx-1:03:1Gbps"; + }; + + led-13 { + gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_SPEED_LAN; + function-enumerator = <2>; + linux,default-trigger = "mv88e6xxx-1:03:100Mbps"; + }; + }; + + reg_usb_vbus: regulator-usb-vbus { + compatible = "fixed-regulator"; + regulator-name = "usb-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio1 21 GPIO_ACTIVE_LOW>; + regulator-always-on; + }; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "okay"; + + gpio2: gpio@24 { + compatible = "nxp,pca9555"; + reg = <0x24>; + gpio-controller; + #gpio-cells = <0x2>; + }; + + hwmon@28 { + compatible = "nuvoton,nct7802"; + reg = <0x28>; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins>; + status = "okay"; +}; + +&pinctrl { + pmx_gpio_leds_pins: gpio-leds-pins { + marvell,pins = "mpp30", "mpp32", "mpp33", "mpp35", + "mpp45", "mpp47"; + marvell,function = "gpio"; + }; + + pmx_usb_pins: usb-pins { + marvell,pins = "mpp53"; + marvell,function = "gpio"; + }; + + pmx_gpio_keys_pins: gpio-keys-pins { + marvell,pins = "mpp54"; + marvell,function = "gpio"; + }; +}; + +&bm { + status = "okay"; +}; + +&bm_bppi { + status = "okay"; +}; + +ð0 { + pinctrl-names = "default"; + pinctrl-0 = <&ge0_rgmii_pins>; + status = "okay"; + + phy-connection-type = "rgmii-id"; + buffer-manager = <&bm>; + bm,pool-long = <0>; + bm,pool-short = <1>; + nvmem-cells = <&macaddr_bdinfo_d880 0>; + nvmem-cell-names = "mac-address"; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +&usb3_0 { + pinctrl-names = "default"; + pinctrl-0 = <&pmx_usb_pins>; + status = "okay"; + + vbus-supply = <®_usb_vbus>; +}; + +&spi1 { + pinctrl-names = "default"; + pinctrl-0 = <&spi1_pins>; + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x1c0000>; + label = "u-boot"; + read-only; + }; + + partition@1c0000 { + reg = <0x1c0000 0x10000>; + label = "firmware-info"; + + /* + * 0x10 - 0x2f : image name (image1) + * 0x30 - 0x4f : image name (image2) + * 0x170 (1byte): active image (0x0/0x1) + * 0x184 - 0x185: kernel block count (image1) + * 0x18c - 0x18d: rootfs block count (image1) + * 0x194 - 0x195: kernel block count (image2) + * 0x19c - 0x19d: rootfs block count (image2) + * 0x1be (1byte): bit7 -> active flag (image1)? + * 0x1ce (1byte): bit7 -> active flag (image2)? + * + * Note: block size --> 0x200 (512 bytes) + */ + }; + + partition@1d0000 { + reg = <0x1d0000 0x10000>; + label = "dtb"; + read-only; + }; + + partition@1e0000 { + reg = <0x1e0000 0x10000>; + label = "u-boot-env"; + read-only; + }; + + partition@1f0000 { + reg = <0x1f0000 0x10000>; + label = "board-info"; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_bdinfo_d880: macaddr@d880 { + compatible = "mac-base"; + reg = <0xd880 0x6>; + #nvmem-cell-cells = <1>; + }; + }; + }; + + partition@200000 { + reg = <0x200000 0x600000>; + label = "kernel"; + }; + + partition@800000 { + reg = <0x800000 0x1800000>; + label = "rootfs"; + }; + + partition@2000000 { + reg = <0x2000000 0x600000>; + label = "kn2"; + read-only; + }; + + partition@2600000 { + reg = <0x2600000 0x1800000>; + label = "rfs2"; + read-only; + }; + + partition@3e00000 { + reg = <0x3e00000 0x1200000>; + label = "part1"; + read-only; + }; + + partition@5000000 { + reg = <0x5000000 0x1200000>; + label = "part2"; + read-only; + }; + + partition@6200000 { + reg = <0x6200000 0x1e00000>; + label = "config"; + read-only; + }; + }; + }; +};