162306a36Sopenharmony_ci// SPDX-License-Identifier: ISC 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Device Tree file for the Freecom FSG-3 router. 462306a36Sopenharmony_ci * This machine is based on IXP425. 562306a36Sopenharmony_ci * This device tree is inspired by the board file by Rod Whitby. 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci/dts-v1/; 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#include "intel-ixp42x.dtsi" 1162306a36Sopenharmony_ci#include <dt-bindings/input/input.h> 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci/ { 1462306a36Sopenharmony_ci model = "Freecom FSG-3"; 1562306a36Sopenharmony_ci compatible = "freecom,fsg-3", "intel,ixp42x"; 1662306a36Sopenharmony_ci #address-cells = <1>; 1762306a36Sopenharmony_ci #size-cells = <1>; 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci memory@0 { 2062306a36Sopenharmony_ci /* 64 MB memory */ 2162306a36Sopenharmony_ci device_type = "memory"; 2262306a36Sopenharmony_ci reg = <0x00000000 0x4000000>; 2362306a36Sopenharmony_ci }; 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci chosen { 2662306a36Sopenharmony_ci /* Boot from the first partition on the hard drive */ 2762306a36Sopenharmony_ci bootargs = "console=ttyS0,115200n8 root=/dev/sda1 rw rootfstype=ext4 rootwait"; 2862306a36Sopenharmony_ci stdout-path = "uart0:115200n8"; 2962306a36Sopenharmony_ci }; 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci aliases { 3262306a36Sopenharmony_ci serial0 = &uart0; 3362306a36Sopenharmony_ci }; 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci gpio_keys { 3662306a36Sopenharmony_ci compatible = "gpio-keys"; 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci button-sync { 3962306a36Sopenharmony_ci wakeup-source; 4062306a36Sopenharmony_ci /* Closest approximation of what the key should do */ 4162306a36Sopenharmony_ci linux,code = <KEY_CONNECT>; 4262306a36Sopenharmony_ci label = "sync"; 4362306a36Sopenharmony_ci gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; 4462306a36Sopenharmony_ci }; 4562306a36Sopenharmony_ci button-reset { 4662306a36Sopenharmony_ci wakeup-source; 4762306a36Sopenharmony_ci linux,code = <KEY_ESC>; 4862306a36Sopenharmony_ci label = "reset"; 4962306a36Sopenharmony_ci gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; 5062306a36Sopenharmony_ci }; 5162306a36Sopenharmony_ci button-usb { 5262306a36Sopenharmony_ci wakeup-source; 5362306a36Sopenharmony_ci /* Unplug USB, closest approximation of what the key should do */ 5462306a36Sopenharmony_ci linux,code = <KEY_EJECTCD>; 5562306a36Sopenharmony_ci label = "usb"; 5662306a36Sopenharmony_ci gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; 5762306a36Sopenharmony_ci }; 5862306a36Sopenharmony_ci }; 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci i2c { 6162306a36Sopenharmony_ci compatible = "i2c-gpio"; 6262306a36Sopenharmony_ci sda-gpios = <&gpio0 12 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 6362306a36Sopenharmony_ci scl-gpios = <&gpio0 13 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 6462306a36Sopenharmony_ci #address-cells = <1>; 6562306a36Sopenharmony_ci #size-cells = <0>; 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ci hwmon@28 { 6862306a36Sopenharmony_ci /* 6962306a36Sopenharmony_ci * Temperature sensor and fan control chip. 7062306a36Sopenharmony_ci * 7162306a36Sopenharmony_ci * TODO: create a proper device tree binding for 7262306a36Sopenharmony_ci * the sensor and temperature zone and create a 7362306a36Sopenharmony_ci * zone with fan control. 7462306a36Sopenharmony_ci */ 7562306a36Sopenharmony_ci compatible = "winbond,w83781d"; 7662306a36Sopenharmony_ci reg = <0x28>; 7762306a36Sopenharmony_ci }; 7862306a36Sopenharmony_ci rtc@6f { 7962306a36Sopenharmony_ci compatible = "isil,isl1208"; 8062306a36Sopenharmony_ci reg = <0x6f>; 8162306a36Sopenharmony_ci }; 8262306a36Sopenharmony_ci }; 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci soc { 8562306a36Sopenharmony_ci bus@c4000000 { 8662306a36Sopenharmony_ci flash@0,0 { 8762306a36Sopenharmony_ci compatible = "intel,ixp4xx-flash", "cfi-flash"; 8862306a36Sopenharmony_ci bank-width = <2>; 8962306a36Sopenharmony_ci /* Enable writes on the expansion bus */ 9062306a36Sopenharmony_ci intel,ixp4xx-eb-write-enable = <1>; 9162306a36Sopenharmony_ci /* 4 MB of Flash mapped in at CS0 */ 9262306a36Sopenharmony_ci reg = <0 0x00000000 0x400000>; 9362306a36Sopenharmony_ci 9462306a36Sopenharmony_ci partitions { 9562306a36Sopenharmony_ci compatible = "redboot-fis"; 9662306a36Sopenharmony_ci /* Eraseblock at 0x3e0000 */ 9762306a36Sopenharmony_ci fis-index-block = <0x1f>; 9862306a36Sopenharmony_ci }; 9962306a36Sopenharmony_ci }; 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci /* Small syscon with some LEDs at CS2 */ 10262306a36Sopenharmony_ci syscon@2,0 { 10362306a36Sopenharmony_ci compatible = "freecom,fsg-cs2-system-controller", "syscon"; 10462306a36Sopenharmony_ci reg = <2 0x0 0x200>; 10562306a36Sopenharmony_ci reg-io-width = <2>; 10662306a36Sopenharmony_ci #address-cells = <1>; 10762306a36Sopenharmony_ci #size-cells = <1>; 10862306a36Sopenharmony_ci ranges = <2 0x0 0x0 0x200>; 10962306a36Sopenharmony_ci 11062306a36Sopenharmony_ci led@0,0 { 11162306a36Sopenharmony_ci compatible = "register-bit-led"; 11262306a36Sopenharmony_ci reg = <0x00 0x02>; 11362306a36Sopenharmony_ci mask = <0x01>; 11462306a36Sopenharmony_ci label = "fsg:blue:wlan"; 11562306a36Sopenharmony_ci linux,default-trigger = "wlan"; 11662306a36Sopenharmony_ci default-state = "on"; 11762306a36Sopenharmony_ci }; 11862306a36Sopenharmony_ci led@0,1 { 11962306a36Sopenharmony_ci compatible = "register-bit-led"; 12062306a36Sopenharmony_ci reg = <0x00 0x02>; 12162306a36Sopenharmony_ci mask = <0x02>; 12262306a36Sopenharmony_ci label = "fsg:blue:wan"; 12362306a36Sopenharmony_ci linux,default-trigger = ""; 12462306a36Sopenharmony_ci default-state = "on"; 12562306a36Sopenharmony_ci }; 12662306a36Sopenharmony_ci led@0,2 { 12762306a36Sopenharmony_ci compatible = "register-bit-led"; 12862306a36Sopenharmony_ci reg = <0x00 0x02>; 12962306a36Sopenharmony_ci mask = <0x04>; 13062306a36Sopenharmony_ci label = "fsg:blue:sata"; 13162306a36Sopenharmony_ci linux,default-trigger = ""; 13262306a36Sopenharmony_ci default-state = "on"; 13362306a36Sopenharmony_ci }; 13462306a36Sopenharmony_ci led@0,3 { 13562306a36Sopenharmony_ci compatible = "register-bit-led"; 13662306a36Sopenharmony_ci reg = <0x00 0x02>; 13762306a36Sopenharmony_ci mask = <0x04>; 13862306a36Sopenharmony_ci label = "fsg:blue:usb"; 13962306a36Sopenharmony_ci linux,default-trigger = ""; 14062306a36Sopenharmony_ci default-state = "on"; 14162306a36Sopenharmony_ci }; 14262306a36Sopenharmony_ci led@0,4 { 14362306a36Sopenharmony_ci compatible = "register-bit-led"; 14462306a36Sopenharmony_ci reg = <0x00 0x02>; 14562306a36Sopenharmony_ci mask = <0x08>; 14662306a36Sopenharmony_ci label = "fsg:blue:sync"; 14762306a36Sopenharmony_ci linux,default-trigger = ""; 14862306a36Sopenharmony_ci default-state = "on"; 14962306a36Sopenharmony_ci }; 15062306a36Sopenharmony_ci led@0,5 { 15162306a36Sopenharmony_ci compatible = "register-bit-led"; 15262306a36Sopenharmony_ci reg = <0x00 0x02>; 15362306a36Sopenharmony_ci mask = <0x10>; 15462306a36Sopenharmony_ci label = "fsg:blue:ring"; 15562306a36Sopenharmony_ci linux,default-trigger = ""; 15662306a36Sopenharmony_ci default-state = "on"; 15762306a36Sopenharmony_ci }; 15862306a36Sopenharmony_ci }; 15962306a36Sopenharmony_ci }; 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci pci@c0000000 { 16262306a36Sopenharmony_ci status = "okay"; 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ci /* 16562306a36Sopenharmony_ci * Written based on the FSG-3 PCI boardfile. 16662306a36Sopenharmony_ci * We have slots 12, 13 & 14 (IDSEL) with one IRQ each. 16762306a36Sopenharmony_ci */ 16862306a36Sopenharmony_ci #interrupt-cells = <1>; 16962306a36Sopenharmony_ci interrupt-map-mask = <0xf800 0 0 7>; 17062306a36Sopenharmony_ci interrupt-map = 17162306a36Sopenharmony_ci /* IDSEL 12 */ 17262306a36Sopenharmony_ci <0x6000 0 0 1 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 12 is irq 5 */ 17362306a36Sopenharmony_ci <0x6000 0 0 2 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 12 is irq 5 */ 17462306a36Sopenharmony_ci <0x6000 0 0 3 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 12 is irq 5 */ 17562306a36Sopenharmony_ci <0x6000 0 0 4 &gpio0 5 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 12 is irq 5 */ 17662306a36Sopenharmony_ci /* IDSEL 13 */ 17762306a36Sopenharmony_ci <0x6800 0 0 1 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 13 is irq 7 */ 17862306a36Sopenharmony_ci <0x6800 0 0 2 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 13 is irq 7 */ 17962306a36Sopenharmony_ci <0x6800 0 0 3 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 13 is irq 7 */ 18062306a36Sopenharmony_ci <0x6800 0 0 4 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 13 is irq 7 */ 18162306a36Sopenharmony_ci /* IDSEL 14 */ 18262306a36Sopenharmony_ci <0x7000 0 0 1 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 14 is irq 6 */ 18362306a36Sopenharmony_ci <0x7000 0 0 2 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 14 is irq 6 */ 18462306a36Sopenharmony_ci <0x7000 0 0 3 &gpio0 6 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 14 is irq 6 */ 18562306a36Sopenharmony_ci <0x7000 0 0 4 &gpio0 6 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 14 is irq 6 */ 18662306a36Sopenharmony_ci }; 18762306a36Sopenharmony_ci 18862306a36Sopenharmony_ci /* EthB */ 18962306a36Sopenharmony_ci ethernet@c8009000 { 19062306a36Sopenharmony_ci status = "okay"; 19162306a36Sopenharmony_ci queue-rx = <&qmgr 3>; 19262306a36Sopenharmony_ci queue-txready = <&qmgr 20>; 19362306a36Sopenharmony_ci phy-mode = "rgmii"; 19462306a36Sopenharmony_ci phy-handle = <&phy5>; 19562306a36Sopenharmony_ci 19662306a36Sopenharmony_ci mdio { 19762306a36Sopenharmony_ci #address-cells = <1>; 19862306a36Sopenharmony_ci #size-cells = <0>; 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci phy4: ethernet-phy@4 { 20162306a36Sopenharmony_ci reg = <4>; 20262306a36Sopenharmony_ci }; 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_ci phy5: ethernet-phy@5 { 20562306a36Sopenharmony_ci reg = <5>; 20662306a36Sopenharmony_ci }; 20762306a36Sopenharmony_ci }; 20862306a36Sopenharmony_ci }; 20962306a36Sopenharmony_ci 21062306a36Sopenharmony_ci /* EthC */ 21162306a36Sopenharmony_ci ethernet@c800a000 { 21262306a36Sopenharmony_ci status = "okay"; 21362306a36Sopenharmony_ci queue-rx = <&qmgr 4>; 21462306a36Sopenharmony_ci queue-txready = <&qmgr 21>; 21562306a36Sopenharmony_ci phy-mode = "rgmii"; 21662306a36Sopenharmony_ci phy-handle = <&phy4>; 21762306a36Sopenharmony_ci }; 21862306a36Sopenharmony_ci }; 21962306a36Sopenharmony_ci}; 220