* [PATCH] powerpc/dts: Add dts for WatchGuard Firebox T30 @ 2026-10-28 10:21 Lefteris Koutrakis 2026-10-28 10:37 ` sashiko-bot 0 siblings, 1 reply; 2+ messages in thread From: Lefteris Koutrakis @ 2026-10-28 10:21 UTC (permalink / raw) To: linuxppc-dev, devicetree Cc: linux-kernel, maddy, robh, krzk+dt, conor+dt, mpe, npiggin, chleroy, ritesh.list, sshegde, Lefteris Koutrakis Add device tree support for the WatchGuard Firebox T30 and T30-W. These devices are security appliances based on the Freescale P1020 SoC. They feature 5x Gigabit Ethernet ports, USB, and a serial console. Signed-off-by: Lefteris Koutrakis <lefteris.koutrakis@gmail.com> --- arch/powerpc/boot/dts/fsl/Makefile | 1 + arch/powerpc/boot/dts/fsl/firebox-t30.dts | 413 ++++++++++++++++++++++ 2 files changed, 414 insertions(+) create mode 100644 arch/powerpc/boot/dts/fsl/firebox-t30.dts diff --git a/arch/powerpc/boot/dts/fsl/Makefile b/arch/powerpc/boot/dts/fsl/Makefile index d2cc8e1f0..ebbf301e1 100644 --- a/arch/powerpc/boot/dts/fsl/Makefile +++ b/arch/powerpc/boot/dts/fsl/Makefile @@ -3,6 +3,7 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts)) # MPC85xx platforms +dtb-$(CONFIG_MPC85xx_RDB) += firebox-t30.dtb dtb-$(CONFIG_BSC9131_RDB) += bsc9131rdb.dtb dtb-$(CONFIG_BSC9132_QDS) += bsc9132qds.dtb dtb-$(CONFIG_C293_PCIE) += c293pcie.dtb diff --git a/arch/powerpc/boot/dts/fsl/firebox-t30.dts b/arch/powerpc/boot/dts/fsl/firebox-t30.dts new file mode 100644 index 000000000..546e98938 --- /dev/null +++ b/arch/powerpc/boot/dts/fsl/firebox-t30.dts @@ -0,0 +1,413 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/leds/common.h> + +/include/ "fsl/p1020si-pre.dtsi" + +/ { + model = "Watchguard Firebox T30"; + compatible = "watchguard,firebox-t30"; + + chosen { + bootargs-override = "console=ttyS0,115200 rw root=/dev/mmcblk0p2 rootfstype=squashfs rootwait"; + }; + + aliases { + label-mac-device = &enet0; + led-boot = &led0; + led-failsafe = &led1; + led-running = &led0; + led-upgrade = &led1; + }; + + memory { + device_type = "memory"; + }; + + cpus { + /delete-property/ PowerPC,P1020@1; + }; + + lbc: localbus@ffe05000 { + reg = <0 0xffe05000 0 0x1000>; + ranges = <0x0 0x0 0x0 0xefc00000 0x400000>; + + nor@0 { + compatible = "cfi-flash"; + reg = <0x0 0x0 0x400000>; + bank-width = <2>; + device-width = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x20000>; + label = "nor-cfg0"; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_nor_cfg0_1830: mac-address@1830 { + compatible = "mac-base"; + reg = <0x1830 0x11>; + #nvmem-cell-cells = <1>; + }; + + macaddr_nor_cfg0_1844: mac-address@1844 { + compatible = "mac-base"; + reg = <0x1844 0x11>; + #nvmem-cell-cells = <1>; + }; + + macaddr_nor_cfg0_1858: mac-address@1858 { + compatible = "mac-base"; + reg = <0x1858 0x11>; + #nvmem-cell-cells = <1>; + }; + + macaddr_nor_cfg0_186c: mac-address@186c { + compatible = "mac-base"; + reg = <0x186c 0x11>; + #nvmem-cell-cells = <1>; + }; + + macaddr_nor_cfg0_1880: mac-address@1880 { + compatible = "mac-base"; + reg = <0x1880 0x11>; + #nvmem-cell-cells = <1>; + }; + + macaddr_nor_cfg0_1894: mac-address@1894 { + compatible = "mac-base"; + reg = <0x1894 0x11>; + #nvmem-cell-cells = <1>; + }; + }; + }; + + partition@20000 { + reg = <0x20000 0x10000>; + label = "nor-cfg1"; + }; + + partition@30000 { + reg = <0x30000 0x20000>; + label = "nor-mfg"; + }; + + partition@50000 { + reg = <0x50000 0xc0000>; + label = "nor-bootopt"; + }; + + partition@110000 { + reg = <0x110000 0xc0000>; + label = "nor-extra1"; + }; + + partition@1d0000 { + reg = <0x1d0000 0xc0000>; + label = "nor-extra2"; + }; + + partition@290000 { + reg = <0x290000 0xe0000>; + label = "nor-backup"; + }; + + partition@370000 { + reg = <0x370000 0x10000>; + label = "nor-ubootenv"; + }; + + partition@380000 { + reg = <0x380000 0x80000>; + label = "nor-uboot"; + }; + }; + }; + }; + + soc: soc@ffe00000 { + ranges = <0x0 0x0 0xffe00000 0x100000>; + + i2c@3000 { + rtc@30 { + compatible = "sii,s35390a"; + reg = <0x30>; + }; + }; + + i2c@3100 { + tpm@29 { + compatible = "tpm,tpm_i2c_atmel"; + reg = <0x29>; + }; + }; + + sdhc@2e000 { + compatible = "fsl,p1020-esdhc", "fsl,esdhc"; + sdhci,auto-cmd12; + reg = <0x2e000 0x1000>; + interrupts = <0x48 0x2 0x0 0x0>; + interrupt-parent = <&mpic>; + fsl,sdhci-dma-broken; + fsl,sdhci-ahb2mag-irq-bypass; + fsl,sdhci-adjust-timeout; + clock-frequency = <0>; + }; + + spi0: spi@7000 { + compatible = "fsl,mpc8536-espi"; + reg = <0x7000 0x1000>; + interrupts = <0x3b 0x2>; + interrupt-parent = <&mpic>; + fsl,espi-num-chipselects = <4>; + #address-cells = <1>; + #size-cells = <0>; + + flash@0 { + compatible = "everspin,mr25h256", "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x8000>; + label = "spi_mtd_0"; + }; + }; + }; + + slic@1 { + compatible = "zarlink,le88266"; + reg = <1>; + spi-max-frequency = <500000>; + }; + }; + + usb@22000 { + phy_type = "ulpi"; + dr_mode = "host"; + }; + + mdio@24000 { + switch0: switch@10 { + compatible = "marvell,mv88e6085"; + reg = <0x10>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + switch0phy0: ethernet-phy@0 { + reg = <0>; + }; + + switch0phy1: ethernet-phy@1 { + reg = <1>; + }; + + switch0phy2: ethernet-phy@2 { + reg = <2>; + }; + + switch0phy3: ethernet-phy@3 { + reg = <3>; + }; + + switch0phy4: ethernet-phy@4 { + reg = <4>; + }; + }; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "wan"; + phy-handle = <&switch0phy0>; + nvmem-cells = <&macaddr_nor_cfg0_1830 0>; + nvmem-cell-names = "mac-address"; + }; + + port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&switch0phy1>; + nvmem-cells = <&macaddr_nor_cfg0_1844 0>; + nvmem-cell-names = "mac-address"; + }; + + port@2 { + reg = <2>; + label = "lan2"; + phy-handle = <&switch0phy2>; + nvmem-cells = <&macaddr_nor_cfg0_1858 0>; + nvmem-cell-names = "mac-address"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + phy-handle = <&switch0phy3>; + nvmem-cells = <&macaddr_nor_cfg0_186c 0>; + nvmem-cell-names = "mac-address"; + }; + + port@4 { + reg = <4>; + label = "lan4"; + phy-handle = <&switch0phy4>; + nvmem-cells = <&macaddr_nor_cfg0_1880 0>; + nvmem-cell-names = "mac-address"; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&enet0>; + phy-mode = "rgmii-id"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; + }; + + mdio@25000 { + status = "disabled"; + }; + + mdio@26000 { + status = "disabled"; + }; + + enet0: ethernet@b0000 { + phy-connection-type = "rgmii-id"; + rx-internal-delay-ps = <2000>; + tx-internal-delay-ps = <2000>; + nvmem-cells = <&macaddr_nor_cfg0_1830 0>; + nvmem-cell-names = "mac-address"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + + enet1: ethernet@b1000 { + status = "disabled"; + }; + + enet2: ethernet@b2000 { + status = "disabled"; + }; + + gpio0: gpio-controller@fc00 { + }; + }; + + leds { + compatible = "gpio-leds"; + + led0: led-0 { + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + color = <LED_COLOR_ID_ORANGE>; + function = LED_FUNCTION_STATUS; + }; + + led1: led-1 { + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; + }; + + led2: led-2 { + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_USB; + }; + + led3: led-3 { + gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_WLAN_5GHZ; + default-state = "keep"; + }; + + led4: led-4 { + gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; + color = <LED_COLOR_ID_ORANGE>; + function = LED_FUNCTION_WLAN_2GHZ; + default-state = "keep"; + }; + + led5: led-5 { + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_POWER; + default-state = "on"; + }; + }; + + pci0: pcie@ffe09000 { + reg = <0 0xffe09000 0 0x1000>; + ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 + 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; + status = "disabled"; + + pcie@0 { + ranges = <0x2000000 0x0 0xa0000000 + 0x2000000 0x0 0xa0000000 + 0x0 0x20000000 + + 0x1000000 0x0 0x0 + 0x1000000 0x0 0x0 + 0x0 0x100000>; + }; + }; + + pci1: pcie@ffe0a000 { + reg = <0 0xffe0a000 0 0x1000>; + ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 + 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; + + pcie@0 { + ranges = <0x2000000 0x0 0x80000000 + 0x2000000 0x0 0x80000000 + 0x0 0x20000000 + + 0x1000000 0x0 0x0 + 0x1000000 0x0 0x0 + 0x0 0x100000>; + + ath10k: wifi@0,0 { + reg = <0x0000 0 0 0 0>; + #gpio-cells = <2>; + gpio-controller; + nvmem-cells = <&macaddr_nor_cfg0_1894 0>; + nvmem-cell-names = "mac-address"; + }; + }; + }; +}; + +/include/ "fsl/p1020si-post.dtsi" -- 2.51.0 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/dts: Add dts for WatchGuard Firebox T30 2026-10-28 10:21 [PATCH] powerpc/dts: Add dts for WatchGuard Firebox T30 Lefteris Koutrakis @ 2026-10-28 10:37 ` sashiko-bot 0 siblings, 0 replies; 2+ messages in thread From: sashiko-bot @ 2026-10-28 10:37 UTC (permalink / raw) To: Lefteris Koutrakis, devicetree; +Cc: robh, conor+dt Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider: - [High] powerpc/dts: missing machine descriptor for watchguard,firebox-t30 hangs boot - [Medium] powerpc/dts: /delete-property/ used on CPU child node in firebox-t30.dts - [Medium] powerpc/dts: out-of-tree DT properties and undocumented binding in firebox-t30 - [Low] powerpc/dts: invalid /include/ paths in firebox-t30.dts break dtc build -- commit 14186547f28b2b27ac2d22fcbaad845f34789ba3 Author: Lefteris Koutrakis <lefteris.koutrakis@gmail.com> powerpc/dts: Add dts for WatchGuard Firebox T30 This commit adds a device tree source file and Makefile entry for the WatchGuard Firebox T30 and T30-W security appliances based on the Freescale P1020 SoC. > diff --git a/arch/powerpc/boot/dts/fsl/Makefile b/arch/powerpc/boot/dts/fsl/Makefile > index d2cc8e1f007ea..ebbf301e1a8fc 100644 > --- a/arch/powerpc/boot/dts/fsl/Makefile > +++ b/arch/powerpc/boot/dts/fsl/Makefile > @@ -3,6 +3,7 @@ > dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(src)/%.dts,%.dtb, $(wildcard $(src)/*.dts)) > > # MPC85xx platforms > +dtb-$(CONFIG_MPC85xx_RDB) += firebox-t30.dtb > dtb-$(CONFIG_BSC9131_RDB) += bsc9131rdb.dtb > dtb-$(CONFIG_BSC9132_QDS) += bsc9132qds.dtb > dtb-$(CONFIG_C293_PCIE) += c293pcie.dtb > diff --git a/arch/powerpc/boot/dts/fsl/firebox-t30.dts b/arch/powerpc/boot/dts/fsl/firebox-t30.dts > new file mode 100644 > index 0000000000000..546e989384b76 > --- /dev/null > +++ b/arch/powerpc/boot/dts/fsl/firebox-t30.dts > @@ -0,0 +1,413 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT > + > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/leds/common.h> > + > +/include/ "fsl/p1020si-pre.dtsi" [Severity: Low] Will dtc be able to resolve "fsl/p1020si-pre.dtsi" (and "fsl/p1020si-post.dtsi" at the bottom of the file) when building from arch/powerpc/boot/dts/fsl/? In scripts/Makefile.dtbs, cmd_dtc invokes dtc with -i $(dir $<) (which is arch/powerpc/boot/dts/fsl/) and -i scripts/dtc/include-prefixes: $(DTC) -o $@ -b 0 $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) \ $(DTC_FLAGS) -d $(depfile).dtc.tmp $(dtc-tmp) ; \ When srcfile_relative_open() -> fopen_any_on_path() in scripts/dtc/srcpos.c resolves /include/ "fsl/p1020si-pre.dtsi" relative to arch/powerpc/boot/dts/fsl/, it looks for arch/powerpc/boot/dts/fsl/fsl/p1020si-pre.dtsi and fails the build when CONFIG_MPC85xx_RDB or CONFIG_OF_ALL_DTBS is enabled. Should both /include/ directives drop the "fsl/" prefix to match the other device trees in arch/powerpc/boot/dts/fsl/? > + > +/ { > + model = "Watchguard Firebox T30"; > + compatible = "watchguard,firebox-t30"; [Severity: High] How does the kernel match a PowerPC machine descriptor when booting with this device tree? The root node sets compatible = "watchguard,firebox-t30", and arch/powerpc/boot/dts/fsl/Makefile builds firebox-t30.dtb under CONFIG_MPC85xx_RDB. However, arch/powerpc/platforms/85xx/mpc85xx_rdb.c only defines machine descriptors for specific Freescale RDB compatible strings such as "fsl,P1020RDB": arch/powerpc/platforms/85xx/mpc85xx_rdb.c: define_machine(p1020_rdb) { .name = "P1020 RDB", .compatible = "fsl,P1020RDB", ... }; Without a matching define_machine() entry for "watchguard,firebox-t30" in arch/powerpc/platforms/85xx/, setup_arch() -> probe_machine() in arch/powerpc/kernel/setup-common.c reaches &__machine_desc_end and halts boot in an infinite loop: if (machine_id >= &__machine_desc_end) { pr_err("No suitable machine description found !\n"); for (;;); } > + > + chosen { > + bootargs-override = "console=ttyS0,115200 rw root=/dev/mmcblk0p2 rootfstype=squashfs rootwait"; > + }; > + > + aliases { > + label-mac-device = &enet0; > + led-boot = &led0; > + led-failsafe = &led1; > + led-running = &led0; > + led-upgrade = &led1; > + }; > + > + memory { > + device_type = "memory"; > + }; > + > + cpus { > + /delete-property/ PowerPC,P1020@1; > + }; [Severity: Medium] Should this use /delete-node/ instead of /delete-property/ to remove PowerPC,P1020@1? In arch/powerpc/boot/dts/fsl/p1020si-pre.dtsi, PowerPC,P1020@1 is defined as a child node under /cpus rather than a property: cpus { ... PowerPC,P1020@1 { device_type = "cpu"; reg = <0x1>; next-level-cache = <&L2>; }; }; In scripts/dtc/livetree.c, merge_nodes() handles /delete-property/ by calling delete_property_by_name(), which only walks node->proplist and leaves child nodes in node->children untouched. As a result, the second CPU node remains present in the compiled DTB. [ ... ] > + sdhc@2e000 { > + compatible = "fsl,p1020-esdhc", "fsl,esdhc"; > + sdhci,auto-cmd12; > + reg = <0x2e000 0x1000>; > + interrupts = <0x48 0x2 0x0 0x0>; > + interrupt-parent = <&mpic>; > + fsl,sdhci-dma-broken; > + fsl,sdhci-ahb2mag-irq-bypass; > + fsl,sdhci-adjust-timeout; > + clock-frequency = <0>; > + }; [Severity: Medium] Are these downstream OpenWrt properties in /chosen, /aliases, and sdhc@2e000 intended for mainline? In /chosen, early_init_dt_scan_chosen() in drivers/of/fdt.c only reads "bootargs" and ignores "bootargs-override": p = of_get_flat_dt_prop(node, "bootargs", &l); if (p != NULL && l > 0) strscpy(cmdline, p, min(l, COMMAND_LINE_SIZE)); In sdhc@2e000, the properties fsl,sdhci-dma-broken, fsl,sdhci-ahb2mag-irq-bypass, and fsl,sdhci-adjust-timeout are not parsed by drivers/mmc/host/sdhci-of-esdhc.c and are not permitted by Documentation/devicetree/bindings/mmc/fsl,esdhc.yaml (which sets unevaluatedProperties: false), while the standard properties in this node duplicate what p1020si-post.dtsi already includes via pq3-esdhc-0.dtsi. Similarly, the /aliases entries (label-mac-device, led-boot, led-failsafe, led-running, led-upgrade) and the root compatible string "watchguard,firebox-t30" are not documented under Documentation/devicetree/bindings/. -- Sashiko AI review · https://sashiko.dev/#/patchset/20261028102158.71032-1-lefteris.koutrakis@gmail.com?part=1 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-28 10:37 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-10-28 10:21 [PATCH] powerpc/dts: Add dts for WatchGuard Firebox T30 Lefteris Koutrakis 2026-10-28 10:37 ` sashiko-bot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox