code:
// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright 2019 IBM Corp.

#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/aspeed-scu-ic.h>
#include <dt-bindings/clock/ast2600-clock.h>

/ {
	model = "Aspeed BMC";
	compatible = "aspeed,ast2600";
	#address-cells = <1>;
	#size-cells = <1>;
	interrupt-parent = <&gic>;

	aliases {
		i2c0 = &i2c0;
		i2c1 = &i2c1;
		i2c2 = &i2c2;
		i2c3 = &i2c3;
		i2c4 = &i2c4;
		i2c5 = &i2c5;
		i2c6 = &i2c6;
		i2c7 = &i2c7;
		i2c8 = &i2c8;
		i2c9 = &i2c9;
		i2c10 = &i2c10;
		i2c11 = &i2c11;
		i2c12 = &i2c12;
		i2c13 = &i2c13;
		i2c14 = &i2c14;
		i2c15 = &i2c15;
		serial0 = &uart1;
		serial1 = &uart2;
		serial2 = &uart3;
		serial3 = &uart4;
		serial4 = &uart5;
		serial5 = &vuart1;
		serial6 = &vuart2;
		mdio0 = &mdio0;
		mdio1 = &mdio1;
		mdio2 = &mdio2;
		mdio3 = &mdio3;
	};

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
		enable-method = "aspeed,ast2600-smp";

		cpu@f00 {
			compatible = "arm,cortex-a7";
			device_type = "cpu";
			reg = <0xf00>;
		};

		cpu@f01 {
			compatible = "arm,cortex-a7";
			device_type = "cpu";
			reg = <0xf01>;
		};
	};

	timer {
		compatible = "arm,armv7-timer";
		interrupt-parent = <&gic>;
		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
		clocks = <&syscon ASPEED_CLK_HPLL>;
		arm,cpu-registers-not-fw-configured;
		always-on;
	};

	edac: sdram@1e6e0000 {
		compatible = "aspeed,ast2600-sdram-edac", "syscon";
		reg = <0x1e6e0000 0x174>;
		interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
	};

	ahb {
		compatible = "simple-bus";
		#address-cells = <1>;
		#size-cells = <1>;
		device_type = "soc";
		ranges;

		gic: interrupt-controller@40461000 {
			compatible = "arm,cortex-a7-gic";
			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>;
			#interrupt-cells = <3>;
			interrupt-controller;
			interrupt-parent = <&gic>;
			reg = <0x40461000 0x1000>,
			    <0x40462000 0x1000>,
			    <0x40464000 0x2000>,
			    <0x40466000 0x2000>;
			};

		fmc: spi@1e620000 {
			reg = <0x1e620000 0xc4>, <0x20000000 0x10000000>;
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "aspeed,ast2600-fmc";
			clocks = <&syscon ASPEED_CLK_AHB>;
			status = "disabled";
			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
			flash@0 {
				reg = < 0 >;
				compatible = "jedec,spi-nor";
				spi-max-frequency = <50000000>;
				spi-rx-bus-width = <2>;
				status = "disabled";
			};
			flash@1 {
				reg = < 1 >;
				compatible = "jedec,spi-nor";
				spi-max-frequency = <50000000>;
				spi-rx-bus-width = <2>;
				status = "disabled";
			};
			flash@2 {
				reg = < 2 >;
				compatible = "jedec,spi-nor";
				spi-max-frequency = <50000000>;
				spi-rx-bus-width = <2>;
				status = "disabled";
			};
		};

		spi1: spi@1e630000 {
			reg = <0x1e630000 0xc4>, <0x30000000 0x10000000>;
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "aspeed,ast2600-spi";
			clocks = <&syscon ASPEED_CLK_AHB>;
			status = "disabled";
			flash@0 {
				reg = < 0 >;
				compatible = "jedec,spi-nor";
				spi-max-frequency = <50000000>;
				spi-rx-bus-width = <2>;
				status = "disabled";
			};
			flash@1 {
				reg = < 1 >;
				compatible = "jedec,spi-nor";
				spi-max-frequency = <50000000>;
				spi-rx-bus-width = <2>;
				status = "disabled";
			};
		};

		spi2: spi@1e631000 {
			reg = <0x1e631000 0xc4>, <0x50000000 0x10000000>;
			#address-cells = <1>;
			#size-cells = <0>;
			compatible = "aspeed,ast2600-spi";
			clocks = <&syscon ASPEED_CLK_AHB>;
			status = "disabled";
			flash@0 {
				reg = < 0 >;
				compatible = "jedec,spi-nor";
				spi-max-frequency = <50000000>;
				spi-rx-bus-width = <2>;
				status = "disabled";
			};
			flash@1 {
				reg = < 1 >;
				compatible = "jedec,spi-nor";
				spi-max-frequency = <50000000>;
				spi-rx-bus-width = <2>;
				status = "disabled";
			};
			flash@2 {
				reg = < 2 >;
				compatible = "jedec,spi-nor";
				spi-max-frequency = <50000000>;
				spi-rx-bus-width = <2>;
				status = "disabled";
			};
		};

		mdio0: mdio@1e650000 {
			compatible = "aspeed,ast2600-mdio";
			reg = <0x1e650000 0x8>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "disabled";
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_mdio1_default>;
			resets = <&syscon ASPEED_RESET_MII>;
		};

		mdio1: mdio@1e650008 {
			compatible = "aspeed,ast2600-mdio";
			reg = <0x1e650008 0x8>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "disabled";
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_mdio2_default>;
			resets = <&syscon ASPEED_RESET_MII>;
		};

		mdio2: mdio@1e650010 {
			compatible = "aspeed,ast2600-mdio";
			reg = <0x1e650010 0x8>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "disabled";
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_mdio3_default>;
			resets = <&syscon ASPEED_RESET_MII>;
		};

		mdio3: mdio@1e650018 {
			compatible = "aspeed,ast2600-mdio";
			reg = <0x1e650018 0x8>;
			#address-cells = <1>;
			#size-cells = <0>;
			status = "disabled";
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_mdio4_default>;
			resets = <&syscon ASPEED_RESET_MII>;
		};

		mac0: ftgmac@1e660000 {
			compatible = "aspeed,ast2600-mac", "faraday,ftgmac100";
			reg = <0x1e660000 0x180>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&syscon ASPEED_CLK_GATE_MAC1CLK>;
			status = "disabled";
		};

		mac1: ftgmac@1e680000 {
			compatible = "aspeed,ast2600-mac", "faraday,ftgmac100";
			reg = <0x1e680000 0x180>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&syscon ASPEED_CLK_GATE_MAC2CLK>;
			status = "disabled";
		};

		mac2: ftgmac@1e670000 {
			compatible = "aspeed,ast2600-mac", "faraday,ftgmac100";
			reg = <0x1e670000 0x180>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&syscon ASPEED_CLK_GATE_MAC3CLK>;
			status = "disabled";
		};

		mac3: ftgmac@1e690000 {
			compatible = "aspeed,ast2600-mac", "faraday,ftgmac100";
			reg = <0x1e690000 0x180>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&syscon ASPEED_CLK_GATE_MAC4CLK>;
			status = "disabled";
		};

		ehci0: usb@1e6a1000 {
			compatible = "aspeed,ast2600-ehci", "generic-ehci";
			reg = <0x1e6a1000 0x100>;
			interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&syscon ASPEED_CLK_GATE_USBPORT1CLK>;
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_usb2ah_default>;
			status = "disabled";
		};

		ehci1: usb@1e6a3000 {
			compatible = "aspeed,ast2600-ehci", "generic-ehci";
			reg = <0x1e6a3000 0x100>;
			interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&syscon ASPEED_CLK_GATE_USBPORT2CLK>;
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_usb2bh_default>;
			status = "disabled";
		};

		uhci: usb@1e6b0000 {
			compatible = "aspeed,ast2600-uhci", "generic-uhci";
			reg = <0x1e6b0000 0x100>;
			interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
			#ports = <2>;
			clocks = <&syscon ASPEED_CLK_GATE_USBUHCICLK>;
			status = "disabled";
			/*
			 * No default pinmux, it will follow EHCI, use an
			 * explicit pinmux override if EHCI is not enabled.
			 */
		};

		vhub: usb-vhub@1e6a0000 {
			compatible = "aspeed,ast2600-usb-vhub";
			reg = <0x1e6a0000 0x350>;
			interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&syscon ASPEED_CLK_GATE_USBPORT1CLK>;
			aspeed,vhub-downstream-ports = <7>;
			aspeed,vhub-generic-endpoints = <21>;
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_usb2ad_default>;
			status = "disabled";
		};

		udc: usb@1e6a2000 {
			compatible = "aspeed,ast2600-udc";
			reg = <0x1e6a2000 0x300>;
			interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&syscon ASPEED_CLK_GATE_USBPORT2CLK>;
			pinctrl-names = "default";
			pinctrl-0 = <&pinctrl_usb2bd_default>;
			status = "disabled";
		};

		apb {
			compatible = "simple-bus";
			#address-cells = <1>;
			#size-cells = <1>;
			ranges;

			hace: crypto@1e6d0000 {
				compatible = "aspeed,ast2600-hace";
				reg = <0x1e6d0000 0x200>;
				interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_YCLK>;
				resets = <&syscon ASPEED_RESET_HACE>;
			};

			syscon: syscon@1e6e2000 {
				compatible = "aspeed,ast2600-scu", "syscon", "simple-mfd";
				reg = <0x1e6e2000 0x1000>;
				ranges = <0 0x1e6e2000 0x1000>;
				#address-cells = <1>;
				#size-cells = <1>;
				#clock-cells = <1>;
				#reset-cells = <1>;

				pinctrl: pinctrl {
					compatible = "aspeed,ast2600-pinctrl";
				};

				silicon-id@14 {
					compatible = "aspeed,ast2600-silicon-id", "aspeed,silicon-id";
					reg = <0x14 0x4 0x5b0 0x8>;
				};

				smp-memram@180 {
					compatible = "aspeed,ast2600-smpmem";
					reg = <0x180 0x40>;
				};

				scu_ic0: interrupt-controller@560 {
					#interrupt-cells = <1>;
					compatible = "aspeed,ast2600-scu-ic0";
					reg = <0x560 0x4>;
					interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
					interrupt-controller;
				};

				scu_ic1: interrupt-controller@570 {
					#interrupt-cells = <1>;
					compatible = "aspeed,ast2600-scu-ic1";
					reg = <0x570 0x4>;
					interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
					interrupt-controller;
				};
			};

			rng: hwrng@1e6e2524 {
				compatible = "timeriomem_rng";
				reg = <0x1e6e2524 0x4>;
				period = <1>;
				quality = <100>;
			};

			gfx: display@1e6e6000 {
				compatible = "aspeed,ast2600-gfx", "syscon";
				reg = <0x1e6e6000 0x1000>;
				reg-io-width = <4>;
				clocks = <&syscon ASPEED_CLK_GATE_D1CLK>;
				resets = <&syscon ASPEED_RESET_GRAPHICS>;
				syscon = <&syscon>;
				status = "disabled";
				interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
			};

			xdma: xdma@1e6e7000 {
				compatible = "aspeed,ast2600-xdma";
				reg = <0x1e6e7000 0x100>;
				clocks = <&syscon ASPEED_CLK_GATE_BCLK>;
				resets = <&syscon ASPEED_RESET_DEV_XDMA>, <&syscon ASPEED_RESET_RC_XDMA>;
				reset-names = "device", "root-complex";
				interrupts-extended = <&gic GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
						      <&scu_ic0 ASPEED_AST2600_SCU_IC0_PCIE_PERST_LO_TO_HI>;
				aspeed,pcie-device = "bmc";
				aspeed,scu = <&syscon>;
				status = "disabled";
			};

			adc0: adc@1e6e9000 {
				compatible = "aspeed,ast2600-adc0";
				reg = <0x1e6e9000 0x100>;
				clocks = <&syscon ASPEED_CLK_APB2>;
				resets = <&syscon ASPEED_RESET_ADC>;
				interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
				#io-channel-cells = <1>;
				status = "disabled";
			};

			adc1: adc@1e6e9100 {
				compatible = "aspeed,ast2600-adc1";
				reg = <0x1e6e9100 0x100>;
				clocks = <&syscon ASPEED_CLK_APB2>;
				resets = <&syscon ASPEED_RESET_ADC>;
				interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
				#io-channel-cells = <1>;
				status = "disabled";
			};

			sbc: secure-boot-controller@1e6f2000 {
				compatible = "aspeed,ast2600-sbc";
				reg = <0x1e6f2000 0x1000>;
			};

			video: video@1e700000 {
				compatible = "aspeed,ast2600-video-engine";
				reg = <0x1e700000 0x1000>;
				clocks = <&syscon ASPEED_CLK_GATE_VCLK>,
					 <&syscon ASPEED_CLK_GATE_ECLK>;
				clock-names = "vclk", "eclk";
				interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
				status = "disabled";
			};

			gpio0: gpio@1e780000 {
				#gpio-cells = <2>;
				gpio-controller;
				compatible = "aspeed,ast2600-gpio";
				reg = <0x1e780000 0x400>;
				interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
				gpio-ranges = <&pinctrl 0 0 208>;
				ngpios = <208>;
				clocks = <&syscon ASPEED_CLK_APB2>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			sgpiom0: sgpiom@1e780500 {
				#gpio-cells = <2>;
				gpio-controller;
				compatible = "aspeed,ast2600-sgpiom";
				reg = <0x1e780500 0x100>;
				interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_APB2>;
				interrupt-controller;
				bus-frequency = <12000000>;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_sgpm1_default>;
				status = "disabled";
			};

			sgpiom1: sgpiom@1e780600 {
				#gpio-cells = <2>;
				gpio-controller;
				compatible = "aspeed,ast2600-sgpiom";
				reg = <0x1e780600 0x100>;
				interrupts = <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_APB2>;
				interrupt-controller;
				bus-frequency = <12000000>;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_sgpm2_default>;
				status = "disabled";
			};

			gpio1: gpio@1e780800 {
				#gpio-cells = <2>;
				gpio-controller;
				compatible = "aspeed,ast2600-gpio";
				reg = <0x1e780800 0x800>;
				interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
				gpio-ranges = <&pinctrl 0 208 36>;
				ngpios = <36>;
				clocks = <&syscon ASPEED_CLK_APB1>;
				interrupt-controller;
				#interrupt-cells = <2>;
			};

			rtc: rtc@1e781000 {
				compatible = "aspeed,ast2600-rtc";
				reg = <0x1e781000 0x18>;
				interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>;
				status = "disabled";
			};

			timer: timer@1e782000 {
				compatible = "aspeed,ast2600-timer";
				reg = <0x1e782000 0x90>;
				interrupts-extended = <&gic  GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
						<&gic  GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
						<&gic  GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
						<&gic  GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
						<&gic  GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
						<&gic  GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
						<&gic  GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
						<&gic  GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_APB1>;
				clock-names = "PCLK";
				status = "disabled";
                        };

			uart1: serial@1e783000 {
				compatible = "ns16550a";
				reg = <0x1e783000 0x20>;
				reg-shift = <2>;
				reg-io-width = <4>;
				interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_UART1CLK>;
				resets = <&lpc_reset 4>;
				no-loopback-test;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_txd1_default &pinctrl_rxd1_default>;
				status = "disabled";
			};

			uart5: serial@1e784000 {
				compatible = "ns16550a";
				reg = <0x1e784000 0x1000>;
				reg-shift = <2>;
				interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_UART5CLK>;
				no-loopback-test;
			};

			wdt1: watchdog@1e785000 {
				compatible = "aspeed,ast2600-wdt";
				reg = <0x1e785000 0x40>;
			};

			wdt2: watchdog@1e785040 {
				compatible = "aspeed,ast2600-wdt";
				reg = <0x1e785040 0x40>;
				status = "disabled";
			};

			wdt3: watchdog@1e785080 {
				compatible = "aspeed,ast2600-wdt";
				reg = <0x1e785080 0x40>;
				status = "disabled";
			};

			wdt4: watchdog@1e7850c0 {
				compatible = "aspeed,ast2600-wdt";
				reg = <0x1e7850C0 0x40>;
				status = "disabled";
			};

			peci0: peci-controller@1e78b000 {
				compatible = "aspeed,ast2600-peci";
				reg = <0x1e78b000 0x100>;
				interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_REF0CLK>;
				resets = <&syscon ASPEED_RESET_PECI>;
				cmd-timeout-ms = <1000>;
				clock-frequency = <1000000>;
				status = "disabled";
			};

			lpc: lpc@1e789000 {
				compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon";
				reg = <0x1e789000 0x1000>;
				reg-io-width = <4>;

				#address-cells = <1>;
				#size-cells = <1>;
				ranges = <0x0 0x1e789000 0x1000>;

				kcs1: kcs@24 {
					compatible = "aspeed,ast2500-kcs-bmc-v2";
					reg = <0x24 0x1>, <0x30 0x1>, <0x3c 0x1>;
					interrupts = <GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
					kcs_chan = <1>;
					status = "disabled";
				};

				kcs2: kcs@28 {
					compatible = "aspeed,ast2500-kcs-bmc-v2";
					reg = <0x28 0x1>, <0x34 0x1>, <0x40 0x1>;
					interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
					status = "disabled";
				};

				kcs3: kcs@2c {
					compatible = "aspeed,ast2500-kcs-bmc-v2";
					reg = <0x2c 0x1>, <0x38 0x1>, <0x44 0x1>;
					interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
					status = "disabled";
				};

				kcs4: kcs@114 {
					compatible = "aspeed,ast2500-kcs-bmc-v2";
					reg = <0x114 0x1>, <0x118 0x1>, <0x11c 0x1>;
					interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
					status = "disabled";
				};

				lpc_ctrl: lpc-ctrl@80 {
					compatible = "aspeed,ast2600-lpc-ctrl";
					reg = <0x80 0x80>;
					clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
					status = "disabled";
				};

				lpc_snoop: lpc-snoop@80 {
					compatible = "aspeed,ast2600-lpc-snoop";
					reg = <0x80 0x80>;
					interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
					status = "disabled";
				};

				lhc: lhc@a0 {
					compatible = "aspeed,ast2600-lhc";
					reg = <0xa0 0x24 0xc8 0x8>;
				};

				lpc_reset: reset-controller@98 {
					compatible = "aspeed,ast2600-lpc-reset";
					reg = <0x98 0x4>;
					#reset-cells = <1>;
				};

				uart_routing: uart-routing@98 {
					compatible = "aspeed,ast2600-uart-routing";
					reg = <0x98 0x8>;
					status = "disabled";
				};

				ibt: ibt@140 {
					compatible = "aspeed,ast2600-ibt-bmc";
					reg = <0x140 0x18>;
					interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
					status = "disabled";
				};
			};

			sdc: sdc@1e740000 {
				compatible = "aspeed,ast2600-sd-controller";
				reg = <0x1e740000 0x100>;
				#address-cells = <1>;
				#size-cells = <1>;
				ranges = <0 0x1e740000 0x10000>;
				clocks = <&syscon ASPEED_CLK_GATE_SDCLK>;
				status = "disabled";

				sdhci0: sdhci@1e740100 {
					compatible = "aspeed,ast2600-sdhci", "sdhci";
					reg = <0x100 0x100>;
					interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
					sdhci,auto-cmd12;
					clocks = <&syscon ASPEED_CLK_SDIO>;
					status = "disabled";
				};

				sdhci1: sdhci@1e740200 {
					compatible = "aspeed,ast2600-sdhci", "sdhci";
					reg = <0x200 0x100>;
					interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
					sdhci,auto-cmd12;
					clocks = <&syscon ASPEED_CLK_SDIO>;
					status = "disabled";
				};
			};

			emmc_controller: sdc@1e750000 {
				compatible = "aspeed,ast2600-sd-controller";
				reg = <0x1e750000 0x100>;
				#address-cells = <1>;
				#size-cells = <1>;
				ranges = <0 0x1e750000 0x10000>;
				clocks = <&syscon ASPEED_CLK_GATE_EMMCCLK>;
				status = "disabled";

				emmc: sdhci@1e750100 {
					compatible = "aspeed,ast2600-sdhci";
					reg = <0x100 0x100>;
					sdhci,auto-cmd12;
					interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
					clocks = <&syscon ASPEED_CLK_EMMC>;
					pinctrl-names = "default";
					pinctrl-0 = <&pinctrl_emmc_default>;
				};
			};

			vuart1: serial@1e787000 {
				compatible = "aspeed,ast2500-vuart";
				reg = <0x1e787000 0x40>;
				reg-shift = <2>;
				interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_APB1>;
				no-loopback-test;
				status = "disabled";
			};

			vuart2: serial@1e788000 {
				compatible = "aspeed,ast2500-vuart";
				reg = <0x1e788000 0x40>;
				reg-shift = <2>;
				interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_APB1>;
				no-loopback-test;
				status = "disabled";
			};

			uart2: serial@1e78d000 {
				compatible = "ns16550a";
				reg = <0x1e78d000 0x20>;
				reg-shift = <2>;
				reg-io-width = <4>;
				interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_UART2CLK>;
				resets = <&lpc_reset 5>;
				no-loopback-test;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_txd2_default &pinctrl_rxd2_default>;
				status = "disabled";
			};

			uart3: serial@1e78e000 {
				compatible = "ns16550a";
				reg = <0x1e78e000 0x20>;
				reg-shift = <2>;
				reg-io-width = <4>;
				interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_UART3CLK>;
				resets = <&lpc_reset 6>;
				no-loopback-test;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_txd3_default &pinctrl_rxd3_default>;
				status = "disabled";
			};

			uart4: serial@1e78f000 {
				compatible = "ns16550a";
				reg = <0x1e78f000 0x20>;
				reg-shift = <2>;
				reg-io-width = <4>;
				interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_UART4CLK>;
				resets = <&lpc_reset 7>;
				no-loopback-test;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_txd4_default &pinctrl_rxd4_default>;
				status = "disabled";
			};

			uart6: serial@1e790000 {
				compatible = "ns16550a";
				reg = <0x1e790000 0x20>;
				reg-shift = <2>;
				reg-io-width = <4>;
				interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_UART6CLK>;
				no-loopback-test;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_uart6_default>;

				status = "disabled";
			};

			uart7: serial@1e790100 {
				compatible = "ns16550a";
				reg = <0x1e790100 0x20>;
				reg-shift = <2>;
				reg-io-width = <4>;
				interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_UART7CLK>;
				no-loopback-test;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_uart7_default>;

				status = "disabled";
			};

			uart8: serial@1e790200 {
				compatible = "ns16550a";
				reg = <0x1e790200 0x20>;
				reg-shift = <2>;
				reg-io-width = <4>;
				interrupts = <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_UART8CLK>;
				no-loopback-test;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_uart8_default>;

				status = "disabled";
			};

			uart9: serial@1e790300 {
				compatible = "ns16550a";
				reg = <0x1e790300 0x20>;
				reg-shift = <2>;
				reg-io-width = <4>;
				interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
				clocks = <&syscon ASPEED_CLK_GATE_UART9CLK>;
				no-loopback-test;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_uart9_default>;

				status = "disabled";
			};

			i2c: bus@1e78a000 {
				compatible = "simple-bus";
				#address-cells = <1>;
				#size-cells = <1>;
				ranges = <0 0x1e78a000 0x1000>;
			};

			fsim0: fsi@1e79b000 {
				compatible = "aspeed,ast2600-fsi-master", "fsi-master";
				reg = <0x1e79b000 0x94>;
				interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_fsi1_default>;
				clocks = <&syscon ASPEED_CLK_GATE_FSICLK>;
				status = "disabled";
			};

			fsim1: fsi@1e79b100 {
				compatible = "aspeed,ast2600-fsi-master", "fsi-master";
				reg = <0x1e79b100 0x94>;
				interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
				pinctrl-names = "default";
				pinctrl-0 = <&pinctrl_fsi2_default>;
				clocks = <&syscon ASPEED_CLK_GATE_FSICLK>;
				status = "disabled";
			};
		};
	};
};

#include "aspeed-g6-pinctrl.dtsi"

&i2c {
	i2c0: i2c-bus@80 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x80 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c1_default>;
		status = "disabled";
	};

	i2c1: i2c-bus@100 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x100 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c2_default>;
		status = "disabled";
	};

	i2c2: i2c-bus@180 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x180 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c3_default>;
		status = "disabled";
	};

	i2c3: i2c-bus@200 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x200 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c4_default>;
		status = "disabled";
	};

	i2c4: i2c-bus@280 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x280 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c5_default>;
		status = "disabled";
	};

	i2c5: i2c-bus@300 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x300 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c6_default>;
		status = "disabled";
	};

	i2c6: i2c-bus@380 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x380 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c7_default>;
		status = "disabled";
	};

	i2c7: i2c-bus@400 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x400 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c8_default>;
		status = "disabled";
	};

	i2c8: i2c-bus@480 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x480 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c9_default>;
		status = "disabled";
	};

	i2c9: i2c-bus@500 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x500 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c10_default>;
		status = "disabled";
	};

	i2c10: i2c-bus@580 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x580 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c11_default>;
		status = "disabled";
	};

	i2c11: i2c-bus@600 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x600 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c12_default>;
		status = "disabled";
	};

	i2c12: i2c-bus@680 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x680 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c13_default>;
		status = "disabled";
	};

	i2c13: i2c-bus@700 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x700 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c14_default>;
		status = "disabled";
	};

	i2c14: i2c-bus@780 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x780 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c15_default>;
		status = "disabled";
	};

	i2c15: i2c-bus@800 {
		#address-cells = <1>;
		#size-cells = <0>;
		#interrupt-cells = <1>;
		reg = <0x800 0x80>;
		compatible = "aspeed,ast2600-i2c-bus";
		clocks = <&syscon ASPEED_CLK_APB2>;
		resets = <&syscon ASPEED_RESET_I2C>;
		interrupts = <GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
		bus-frequency = <100000>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c16_default>;
		status = "disabled";
	};
};


code:
// SPDX-License-Identifier: GPL-2.0+
// Copyright (c) 2020 Facebook Inc.
/dts-v1/;

#include "aspeed-g4.dtsi"

/ {
	aliases {
		/*
		 * Override the default uart aliases to avoid breaking
		 * the legacy applications.
		 */
		serial0 = &uart5;
		serial1 = &uart1;
		serial2 = &uart3;
		serial3 = &uart4;
	};

	memory@40000000 {
		reg = <0x40000000 0x20000000>;
	};
};

&wdt1 {
	status = "okay";
	aspeed,reset-type = "system";
};

&fmc {
	status = "okay";
	flash@0 {
		status = "okay";
		m25p,fast-read;
		label = "spi0.0";
#include "facebook-bmc-flash-layout.dtsi"
	};
};

&uart1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd1_default
		     &pinctrl_rxd1_default>;
};

&uart3 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd3_default
		     &pinctrl_rxd3_default>;
};

&uart4 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd4_default
		     &pinctrl_rxd4_default
		     &pinctrl_ndts4_default>;
};

&uart5 {
	status = "okay";
};

&mac1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
};

&i2c0 {
	status = "okay";
};

&i2c1 {
	status = "okay";
};

&i2c2 {
	status = "okay";
};

&i2c3 {
	status = "okay";
};

&i2c4 {
	status = "okay";
};

&i2c5 {
	status = "okay";
};

&i2c6 {
	status = "okay";
};

&i2c7 {
	status = "okay";
};

&i2c8 {
	status = "okay";
};

&i2c11 {
	status = "okay";
};

&i2c12 {
	status = "okay";
};

&vhub {
	status = "okay";
};

&adc {
	status = "okay";
};

repo_name: angery/linux


code:
// SPDX-License-Identifier: GPL-2.0+
// Copyright (c) 2019 Facebook Inc.

#include "aspeed-g5.dtsi"

/ {
	memory@80000000 {
		reg = <0x80000000 0x40000000>;
	};
};

/*
 * Update reset type to "system" (full chip) to fix warm reboot hang issue
 * when reset type is set to default ("soc", gated by reset mask registers).
 */
&wdt1 {
	status = "okay";
	aspeed,reset-type = "system";
};

&wdt2 {
	status = "disabled";
};

&uart1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd1_default
		     &pinctrl_rxd1_default>;
};

&uart3 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_txd3_default
		     &pinctrl_rxd3_default>;
};

&uart5 {
	status = "okay";
};

&fmc {
	status = "okay";

	fmc_flash0: flash@0 {
		status = "okay";
		m25p,fast-read;
		label = "spi0.0";
	};

	fmc_flash1: flash@1 {
		status = "okay";
		m25p,fast-read;
		label = "spi0.1";
	};
};

&mac1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_rgmii2_default &pinctrl_mdio2_default>;
};

&rtc {
	status = "okay";
};

&vhub {
	status = "okay";
};

&sdmmc {
	status = "okay";
};

&sdhci1 {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_sd2_default>;
};


code:
// SPDX-License-Identifier: GPL-2.0+
// Copyright (c) 2020 Facebook Inc.

#include "aspeed-g6.dtsi"
#include <dt-bindings/gpio/aspeed-gpio.h>

/ {
	aliases {
		mmc0 = &emmc;
		spi1 = &spi1;
		spi2 = &spi_gpio;
	};

	chosen {
		bootargs = "console=ttyS0,9600n8 root=/dev/ram rw vmalloc=640M";
	};

	memory@80000000 {
		device_type = "memory";
		reg = <0x80000000 0x80000000>;
	};

	/*
	 * GPIO-based SPI Master is required to access SPI TPM, because
	 * full-duplex SPI transactions are not supported by ASPEED SPI
	 * Controllers.
	 */
	spi_gpio: spi {
		status = "okay";
		compatible = "spi-gpio";
		#address-cells = <1>;
		#size-cells = <0>;

		gpio-sck = <&gpio0 ASPEED_GPIO(X, 3) GPIO_ACTIVE_HIGH>;
		gpio-mosi = <&gpio0 ASPEED_GPIO(X, 4) GPIO_ACTIVE_HIGH>;
		gpio-miso = <&gpio0 ASPEED_GPIO(X, 5) GPIO_ACTIVE_HIGH>;

		tpmdev@0 {
			compatible = "tcg,tpm_tis-spi";
			spi-max-frequency = <33000000>;
			reg = <0>;
		};
	};
};

&fmc {
	status = "okay";

	flash@0 {
		status = "okay";
		m25p,fast-read;
		label = "spi0.0";

#include "facebook-bmc-flash-layout-128.dtsi"
	};

	flash@1 {
		status = "okay";
		m25p,fast-read;
		label = "spi0.1";

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			flash1@0 {
				reg = <0x0 0x8000000>;
				label = "flash1";
			};
		};
	};
};

&spi1 {
	status = "okay";
};

&uart1 {
	status = "okay";
};

&uart2 {
	status = "okay";
};

&uart5 {
	status = "okay";
};

&wdt1 {
	status = "okay";
};

&i2c0 {
	status = "okay";
};

&i2c1 {
	status = "okay";
};

&i2c2 {
	status = "okay";
};

&i2c3 {
	status = "okay";
};

&i2c4 {
	status = "okay";
};

&i2c5 {
	status = "okay";
};

&i2c6 {
	status = "okay";
};

&i2c7 {
	status = "okay";
};

&i2c8 {
	status = "okay";
};

&i2c9 {
	status = "okay";
};

&i2c10 {
	status = "okay";
};

&i2c12 {
	status = "okay";
};

&i2c13 {
	status = "okay";
};

&i2c15 {
	status = "okay";
};

&vhub {
	status = "okay";
};

&emmc_controller {
	status = "okay";
};

&emmc {
	status = "okay";

	non-removable;
	max-frequency = <25000000>;
	bus-width = <4>;
};

&rtc {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * at91-ariag25.dts - Device Tree file for Acme Systems Aria G25 (AT91SAM9G25 based)
 *
 * Copyright (C) 2013 Douglas Gilbert <dgilbert@interlog.com>,
 *                    Robert Nelson <robertcnelson@gmail.com>
 */
/dts-v1/;
#include "at91sam9g25.dtsi"

/ {
	model = "Acme Systems Aria G25";
	compatible = "acme,ariag25", "atmel,at91sam9x5ek",
		     "atmel,at91sam9x5", "atmel,at91sam9";

	aliases {
		serial5 = &uart0;
		serial6 = &uart1;
	};

	chosen {
		bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait";
	};

	memory@20000000 {
		/* 128 MB, change this for 256 MB revision */
		reg = <0x20000000 0x8000000>;
	};

	clocks {
		slow_xtal {
			clock-frequency = <32768>;
		};

		main_xtal {
			clock-frequency = <12000000>;
		};
	};

	leds {
		compatible = "gpio-leds";

		/* little green LED in middle of Aria G25 module */
		aria_led {
			label = "aria_led";
			gpios = <&pioB 8 GPIO_ACTIVE_HIGH>; /* PB8 */
			linux,default-trigger = "heartbeat";
		};

	};

	onewire {
		compatible = "w1-gpio";
		gpios = <&pioA 21 GPIO_ACTIVE_LOW>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_w1_0>;
	};
};

&adc0 {
	status = "okay";
	atmel,adc-channels-used = <0xf>;
};

&dbgu {
	status = "okay";
};

&i2c0 {
	status = "okay";
};

&i2c1 {
	status = "okay";
};

/* TWD2+TCLK2 hidden behind ethernet, so no i2c2 */

&macb0 {
	phy-mode = "rmii";
	/*
	 * following can be overwritten by bootloader:
	 * for example u-boot 'ftd set' command
	 */
	local-mac-address = [00 00 00 00 00 00];
	status = "okay";
};

&mmc0 {
	/* N.B. Aria has no SD card detect (CD), assumed present */

	pinctrl-0 = <
		&pinctrl_mmc0_slot0_clk_cmd_dat0
		&pinctrl_mmc0_slot0_dat1_3>;
	pinctrl-names = "default";
	status = "okay";

	slot@0 {
		reg = <0>;
		bus-width = <4>;
	};
};

&pinctrl {
	w1_0 {
		pinctrl_w1_0: w1_0-0 {
			atmel,pins = <0 21 0x0 0x1>; /* PA21 PIO, pull-up */
		};
	};
};

&rtc {
	status = "okay";
};

&tcb0 {
	timer@0 {
		compatible = "atmel,tcb-timer";
		reg = <0>;
	};

	timer@1 {
		compatible = "atmel,tcb-timer";
		reg = <1>;
	};
};

/*
 * UART0/1 pins are marked as GPIO on
 * Aria documentation.
 * Change to "okay" if you need additional serial ports
 */
&uart0 {
	status = "disabled";
};

&uart1 {
	status = "disabled";
};

&usart0 {
	pinctrl-0 = <&pinctrl_usart0
		     &pinctrl_usart0_rts
		     &pinctrl_usart0_cts>;
	status = "okay";
};

&usart1 {
	pinctrl-0 = <&pinctrl_usart1
		     /* &pinctrl_usart1_rts */
		     /* &pinctrl_usart1_cts */
		    >;
	status = "okay";
};

&usart2 {
	/* cannot activate RTS2+CTS2, clash with
	 * ethernet on PB0 and PB1 */
	pinctrl-0 = <&pinctrl_usart2>;
	status = "okay";
};

&usart3 {
	compatible = "atmel,at91sam9260-usart";
	reg = <0xf8028000 0x200>;
	interrupts = <8 4 5>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usart3
		     /* &pinctrl_usart3_rts */
		     /* &pinctrl_usart3_cts */
		    >;
	status = "okay";
};

&usb0 {
	status = "okay";
	num-ports = <3>;
};

&usb1 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Device Tree file for Arietta G25
 * This device tree is minimal, to activate more peripherals, see:
 * http://dts.acmesystems.it/arietta/
 */
/dts-v1/;
#include "at91sam9g25.dtsi"

/ {
	model = "Acme Systems Arietta G25";
	compatible = "acme,ariettag25", "atmel,at91sam9x5", "atmel,at91sam9";

	chosen {
		stdout-path = "serial0:115200n8";
	};

	memory@20000000 {
		reg = <0x20000000 0x8000000>;
	};

	clocks {
		slow_xtal {
			clock-frequency = <32768>;
		};

		main_xtal {
			clock-frequency = <12000000>;
		};
	};

	leds {
		compatible = "gpio-leds";

		arietta_led {
			label = "arietta_led";
			gpios = <&pioB 8 GPIO_ACTIVE_HIGH>; /* PB8 */
			linux,default-trigger = "heartbeat";
		};
	};
};

&dbgu {
	status = "okay";
};

&mmc0 {
	pinctrl-0 = <
		&pinctrl_mmc0_slot0_clk_cmd_dat0
		&pinctrl_mmc0_slot0_dat1_3>;
	pinctrl-names = "default";
	status = "okay";

	slot@0 {
		reg = <0>;
		bus-width = <4>;
	};
};

&rtc {
	status = "okay";
};

&tcb0 {
	timer@0 {
		compatible = "atmel,tcb-timer";
		reg = <0>;
	};

	timer@1 {
		compatible = "atmel,tcb-timer";
		reg = <1>;
	};
};

&usb0 {
	num-ports = <3>;
	status = "okay";
};

&usb1 {
	status = "okay";
};

&usb2 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * at91-cosino.dtsi - Device Tree file for Cosino core module
 *
 * Copyright (C) 2013 - Rodolfo Giometti <giometti@linux.it>
 *			HCE Engineering
 *
 * Derived from at91sam9x5ek.dtsi by:
 *	Copyright (C) 2012 Atmel,
 *	2012 Nicolas Ferre <nicolas.ferre@atmel.com>
 */

#include "at91sam9g35.dtsi"

/ {
	model = "HCE Cosino core module";
	compatible = "hce,cosino", "atmel,at91sam9x5", "atmel,at91sam9";

	chosen {
		bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait";
	};

	memory@20000000 {
		reg = <0x20000000 0x8000000>;
	};

	clocks {
		slow_xtal {
			clock-frequency = <32768>;
		};

		main_xtal {
			clock-frequency = <12000000>;
		};
	};
};

&adc0 {
	atmel,adc-ts-wires = <4>;
	atmel,adc-ts-pressure-threshold = <10000>;
	status = "okay";
};

&dbgu {
	status = "okay";
};

&ebi {
	pinctrl-0 = <&pinctrl_ebi_addr_nand
		     &pinctrl_ebi_data_0_7>;
	pinctrl-names = "default";
	status = "okay";

	nand-controller {
		pinctrl-0 = <&pinctrl_nand_oe_we
			     &pinctrl_nand_cs
			     &pinctrl_nand_rb>;
		pinctrl-names = "default";
		status = "okay";

		nand@3 {
			reg = <0x3 0x0 0x800000>;
			rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
			cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
			nand-bus-width = <8>;
			nand-ecc-mode = "hw";
			nand-ecc-strength = <4>;
			nand-ecc-step-size = <512>;
			nand-on-flash-bbt;
			label = "atmel_nand";

			partitions {
				compatible = "fixed-partitions";
				#address-cells = <1>;
				#size-cells = <1>;

				at91bootstrap@0 {
					label = "at91bootstrap";
					reg = <0x0 0x40000>;
				};

				uboot@40000 {
					label = "u-boot";
					reg = <0x40000 0x80000>;
				};

				ubootenv@c0000 {
					label = "U-Boot Env";
					reg = <0xc0000 0x140000>;
				};

				kernel@200000 {
					label = "kernel";
					reg = <0x200000 0x600000>;
				};

				rootfs@800000 {
					label = "rootfs";
					reg = <0x800000 0x0f800000>;
				};
			};
		};
	};
};

&i2c0 {
	status = "okay";
};

&mmc0 {
	pinctrl-0 = <
		&pinctrl_board_mmc0
		&pinctrl_mmc0_slot0_clk_cmd_dat0
		&pinctrl_mmc0_slot0_dat1_3>;
	pinctrl-names = "default";
	status = "okay";

	slot@0 {
		reg = <0>;
		bus-width = <4>;
		cd-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>;
	};
};

&pinctrl {
	mmc0 {
		pinctrl_board_mmc0: mmc0-board {
			atmel,pins =
				<AT91_PIOD 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;	/* PD15 gpio CD pin pull up and deglitch */
		};
	};
};

&tcb0 {
	timer@0 {
		compatible = "atmel,tcb-timer";
		reg = <0>;
	};

	timer@1 {
		compatible = "atmel,tcb-timer";
		reg = <1>;
	};
};

&usart0 {
	status = "okay";
};

&watchdog {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * at91-cosino_mega2560.dts - Device Tree file for Cosino board with
 *			      Mega 2560 extension
 *
 * Copyright (C) 2013 - Rodolfo Giometti <giometti@linux.it>
 *			HCE Engineering
 *
 * Derived from at91sam9g35ek.dts by:
 * 	Copyright (C) 2012 Atmel,
 *      2012 Nicolas Ferre <nicolas.ferre@atmel.com>
 */

/dts-v1/;
#include "at91-cosino.dtsi"

/ {
	model = "HCE Cosino Mega 2560";
	compatible = "hce,cosino_mega2560", "atmel,at91sam9x5", "atmel,at91sam9";
};

&adc0 {
	atmel,adc-ts-wires = <4>;
	atmel,adc-ts-pressure-threshold = <10000>;
	status = "okay";
};

&macb0 {
	phy-mode = "rmii";
	status = "okay";
};

&mmc1 {
	pinctrl-0 = <
		&pinctrl_mmc1_slot0_clk_cmd_dat0
		&pinctrl_mmc1_slot0_dat1_3>;
	pinctrl-names = "default";
	status = "okay";

	slot@0 {
		reg = <0>;
		bus-width = <4>;
		non-removable;
	};
};

&rtc {
	status = "okay";
};

&usart1 {
	status = "okay";
};

&usart2 {
	status = "okay";
};

&usb0 {
	num-ports = <3>;
	atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW */
			   &pioD 19 GPIO_ACTIVE_LOW
			   &pioD 20 GPIO_ACTIVE_LOW
			  >;
	status = "okay";
};

&usb1 {
	status = "okay";
};

&usb2 {
	atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * at91-dvk_som60.dts - Device Tree file for the DVK SOM60 board
 *
 *  Copyright (C) 2018 Laird,
 *		  2018 Ben Whitten <ben.whitten@lairdtech.com>
 *
 */
/dts-v1/;
#include "at91-som60.dtsi"
#include "at91-dvk_su60_somc.dtsi"
#include "at91-dvk_su60_somc_lcm.dtsi"

/ {
	model = "Laird DVK SOM60";
	compatible = "laird,dvk-som60", "laird,som60", "atmel,sama5d36", "atmel,sama5d3", "atmel,sama5";

	chosen {
		stdout-path = &dbgu;
		tick-timer = &pit;
	};
};

&mmc0 {
	status = "okay";
};

&spi0 {
	status = "okay";
};

&ssc0 {
	status = "okay";
};

&i2c0 {
	status = "okay";
};

&i2c1 {
	status = "okay";
};

&usart1 {
	status = "okay";
};

&usart2 {
	status = "okay";
};

&usart3 {
	status = "okay";
};

&uart0 {
	status = "okay";
};

&dbgu {
	status = "okay";
};

&pit {
	status = "okay";
};

&adc0 {
	status = "okay";
};

&can1 {
	status = "okay";
};

&macb0 {
	status = "okay";
};

&macb1 {
	status = "okay";
};

&usb0 {
	status = "okay";
};

&usb1 {
	status = "okay";
};

&usb2 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * at91-dvk_su60_somc.dtsi - Device Tree file for the DVK SOM60 base board
 *
 *  Copyright (C) 2018 Laird,
 *		  2018 Ben Whitten <ben.whitten@lairdtech.com>
 *
 */

/ {
	sound {
		compatible = "atmel,asoc-wm8904";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_pck2_as_audio_mck>;

		atmel,model = "wm8904 @ DVK-SOM60";
		atmel,audio-routing =
			"Headphone Jack", "HPOUTL",
			"Headphone Jack", "HPOUTR",
			"IN2L", "Line In Jack",
			"IN2R", "Line In Jack",
			"Mic", "MICBIAS",
			"IN1L", "Mic";

		atmel,ssc-controller = <&ssc0>;
		atmel,audio-codec = <&wm8904>;

		status = "okay";
	};
};

&mmc0 {
	status = "okay";

	pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>;
	slot@0 {
		bus-width = <4>;
		cd-gpios = <&pioE 31 GPIO_ACTIVE_HIGH>;
		cd-inverted;
	};
};

&spi0 {
	status = "okay";

	/* spi0.0: 4M Flash Macronix MX25R4035FM1IL0 */
	flash@0 {
		compatible = "mxicy,mx25u4035", "jedec,spi-nor";
		spi-max-frequency = <33000000>;
		reg = <0>;
	};
};

&ssc0 {
	atmel,clk-from-rk-pin;
	status = "okay";
};

&i2c0 {
	status = "okay";

	wm8904: wm8904@1a {
		compatible = "wlf,wm8904";
		reg = <0x1a>;
		clocks = <&pmc PMC_TYPE_SYSTEM 10>;
		clock-names = "mclk";
	};
};

&i2c1 {
	status = "okay";

	eeprom@57 {
		compatible = "giantec,gt24c32a", "atmel,24c32";
		reg = <0x57>;
		pagesize = <32>;
	};
};

&usart1 {
	status = "okay";
};

&usart2 {
	status = "okay";
};

&usart3 {
	status = "okay";
};

&uart0 {
	status = "okay";
};

&dbgu {
	status = "okay";
};

&pit {
	status = "okay";
};

&adc0 {
	status = "okay";
};

&can1 {
	status = "okay";
};

&macb0 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	ethernet-phy@7 {
		reg = <7>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_geth_int>;
		interrupt-parent = <&pioB>;
		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
		txen-skew-ps = <800>;
		txc-skew-ps = <3000>;
		rxdv-skew-ps = <400>;
		rxc-skew-ps = <3000>;
		rxd0-skew-ps = <400>;
		rxd1-skew-ps = <400>;
		rxd2-skew-ps = <400>;
		rxd3-skew-ps = <400>;
	};
};

&macb1 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	ethernet-phy@1 {
		reg = <1>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_eth_int>;
		interrupt-parent = <&pioC>;
		interrupts = <10 IRQ_TYPE_EDGE_FALLING>;
	};
};

&usb0 {
	status = "okay";
};

&usb1 {
	status = "okay";
};

&usb2 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * at91-dvk_su60_somc_lcm.dtsi - Device Tree file for the DVK SOM60 LCD board
 *
 *  Copyright (C) 2018 Laird,
 *		  2018 Ben Whitten <ben.whitten@lairdtech.com>
 *
 */

/ {
	backlight: backlight {
		compatible = "pwm-backlight";
		pwms = <&hlcdc_pwm 0 50000 0>;
		brightness-levels = <0 4 8 16 32 64 128 255>;
		default-brightness-level = <6>;
		status = "okay";
	};

	panel: panel {
		compatible = "winstar,wf70gtiagdng0", "innolux,at070tn92";
		backlight = <&backlight>;
		power-supply = <&vcc_lcd_reg>;
		#address-cells = <1>;
		#size-cells = <0>;
		status = "okay";

		port@0 {
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0>;

			panel_input: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&hlcdc_panel_output>;
			};
		};
	};

	vcc_lcd_reg: fixedregulator_lcd {
		compatible = "regulator-fixed";
		regulator-name = "VCC LCM";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-boot-on;
		regulator-always-on;
		status = "okay";
	};
};

&pinctrl {
	board {
		pinctrl_lcd_ctp_int: lcd_ctp_int {
			 atmel,pins =
				 <AT91_PIOC 28 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
		};
	};
};

&i2c1 {
	status = "okay";

	ft5426@38 {
		compatible = "focaltech,ft5426", "edt,edt-ft5406";
		reg = <0x38>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lcd_ctp_int>;

		interrupt-parent = <&pioC>;
		interrupts = <28 IRQ_TYPE_EDGE_FALLING>;

		touchscreen-size-x = <800>;
		touchscreen-size-y = <480>;
	};
};

&hlcdc {
	status = "okay";

	hlcdc-display-controller {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;

		port@0 {
			hlcdc_panel_output: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&panel_input>;
			};
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * at91-foxg20.dts - Device Tree file for Acme Systems FoxG20 board
 *
 * Based on DT files for at91sam9g20ek evaluation board (AT91SAM9G20 SoC)
 *
 * Copyright (C) 2013 Douglas Gilbert <dgilbert@interlog.com>
 */
/dts-v1/;
#include "at91sam9g20.dtsi"

/ {
	model = "Acme Systems FoxG20";
	compatible = "acme,foxg20", "atmel,at91sam9g20", "atmel,at91sam9";

	chosen {
		bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait";
	};

	memory@20000000 {
		reg = <0x20000000 0x4000000>;
	};

	clocks {
		slow_xtal {
			clock-frequency = <32768>;
		};

		main_xtal {
			clock-frequency = <18432000>;
		};
	};

	ahb {
		apb {
			tcb0: timer@fffa0000 {
				timer@0 {
					compatible = "atmel,tcb-timer";
					reg = <0>, <1>;
				};

				timer@2 {
					compatible = "atmel,tcb-timer";
					reg = <2>;
				};
			};

			usb1: gadget@fffa4000 {
				atmel,vbus-gpio = <&pioC 6 GPIO_ACTIVE_HIGH>;
				status = "okay";
			};

			mmc0: mmc@fffa8000 {
				pinctrl-0 = <
					&pinctrl_mmc0_clk
					&pinctrl_mmc0_slot1_cmd_dat0
					&pinctrl_mmc0_slot1_dat1_3>;
				pinctrl-names = "default";
				status = "okay";

				slot@1 {
					reg = <1>;
					bus-width = <4>;
				};
			};

			usart0: serial@fffb0000 {
				pinctrl-0 =
					<&pinctrl_usart0
					 &pinctrl_usart0_rts
					 &pinctrl_usart0_cts
					>;
				status = "okay";
			};

			usart1: serial@fffb4000 {
				status = "okay";
			};

			usart2: serial@fffb8000 {
				status = "okay";
			};

			macb0: ethernet@fffc4000 {
				phy-mode = "rmii";
				status = "okay";
			};

			usart3: serial@fffd0000 {
				status = "okay";
			};

			uart0: serial@fffd4000 {
				status = "okay";
			};

			uart1: serial@fffd8000 {
				status = "okay";
			};

			dbgu: serial@fffff200 {
				status = "okay";
			};

			pinctrl@fffff400 {
				board {
					pinctrl_pck0_as_mck: pck0_as_mck {
						atmel,pins =
							<AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;
					};
				};

				mmc0_slot1 {
					pinctrl_board_mmc0_slot1: mmc0_slot1-board {
						atmel,pins =
							<AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;	/* CD pin */
					};
				};

				i2c0 {
					pinctrl_i2c0: i2c0-0 {
						atmel,pins =
							<AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_MULTI_DRIVE	/* TWD (SDA), open drain */
							 AT91_PIOA 24 AT91_PERIPH_A AT91_PINCTRL_MULTI_DRIVE>;	/* TWCK (SCL), open drain */
					};
				};
			};

			watchdog@fffffd40 {
				status = "okay";
			};
		};

		usb0: ohci@500000 {
			num-ports = <2>;
			status = "okay";
		};
	};

	i2c-gpio-0 {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_i2c0>;
		i2c-gpio,delay-us = <5>;	/* ~85 kHz */
		status = "okay";
	};

	leds {
		compatible = "gpio-leds";

		/* red LED marked "PC7" near mini USB (device) receptacle */
		user_led {
			label = "user_led";
			gpios = <&pioC 7 GPIO_ACTIVE_HIGH>;	/* PC7 */
			linux,default-trigger = "heartbeat";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button {
			label = "Button";
			gpios = <&pioC 4 GPIO_ACTIVE_LOW>;
			linux,code = <0x103>;
			wakeup-source;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * at91-gatwick.dts - Device Tree file for the Gatwick board
 *
 *  Copyright (C) 2018 Laird
 *
 */
/dts-v1/;
#include "at91-wb50n.dtsi"
#include <dt-bindings/input/input.h>

/ {
	model = "Laird Workgroup Bridge 50N - Project Gatwick";
	compatible = "laird,gatwick", "laird,wb50n", "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";

	gpio-keys {
		compatible = "gpio-keys";
		autorepeat;

		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_key_gpio>;

		reset-button {
			label = "Reset Button";
			linux,code = <KEY_SETUP>;
			gpios = <&pioE 31 GPIO_ACTIVE_LOW>;
			wakeup-source;
		};
	};

	leds {
		compatible = "gpio-leds";

		ethernet {
			label = "gatwick:yellow:ethernet";
			gpios = <&pioA 10 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};

		wifi {
			label = "gatwick:green:wifi";
			gpios = <&pioA 28 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};

		ble {
			label = "gatwick:blue:ble";
			gpios = <&pioA 22 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};

		lora {
			label = "gatwick:orange:lora";
			gpios = <&pioA 26 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};

		blank {
			label = "gatwick:green:blank";
			gpios = <&pioA 24 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};

		user {
			label = "gatwick:yellow:user";
			gpios = <&pioA 12 GPIO_ACTIVE_LOW>;
			default-state = "off";
		};
	};
};

&pinctrl {
	board {
		pinctrl_key_gpio: key_gpio_0 {
		  atmel,pins =
			  <AT91_PIOE 31 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PE31 GPIO with pullup deglitch */
	  };
	};
};

&mmc0 {
	status = "okay";
};

&macb1 {
	status = "okay";
};

&dbgu {
	status = "okay";
};

/* FTDI USART */
&usart0 {
	status = "okay";
};

/* GPS USART */
&usart1 {
	pinctrl-0 = <&pinctrl_usart1>;
	status = "okay";
};

&spi1 {
	status = "okay";

	spidev@0 {
		compatible = "semtech,sx1301";
		reg = <0>;
		spi-max-frequency = <8000000>;
	};
};

&usb1 {
	status = "okay";
	/delete-property/atmel,oc-gpio;
};

&usb2 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * at91-kizbox.dts - Device Tree file for Overkiz Kizbox board
 *
 * Copyright (C) 2012-2014 Boris BREZILLON <b.brezillon@overkiz.com>
 *               2014-2015 Gaël PORTAY <g.portay@overkiz.com>
 */
/dts-v1/;
#include "at91sam9g20.dtsi"
#include <dt-bindings/pwm/pwm.h>

/ {
	model = "Overkiz Kizbox";
	compatible = "overkiz,kizbox", "atmel,at91sam9g20", "atmel,at91sam9";

	chosen {
		bootargs = "ubi.mtd=ubi";
		stdout-path = &dbgu;
	};

	memory@20000000 {
		reg = <0x20000000 0x2000000>;
	};

	clocks {
		main_xtal {
			clock-frequency = <18432000>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-reset {
			label = "PB_RST";
			gpios = <&pioB 30 GPIO_ACTIVE_HIGH>;
			linux,code = <0x100>;
			wakeup-source;
		};

		button-user {
			label = "PB_USER";
			gpios = <&pioB 31 GPIO_ACTIVE_HIGH>;
			linux,code = <0x101>;
			wakeup-source;
		};
	};

	led-controller {
		compatible = "pwm-leds";

		led-1 {
			label = "pwm:green:network";
			pwms = <&tcb1_pwm1 0 10000000 PWM_POLARITY_INVERTED>;
			max-brightness = <255>;
			linux,default-trigger = "default-on";
		};

		led-2 {
			label = "pwm:red:network";
			pwms = <&tcb1_pwm2 0 10000000 PWM_POLARITY_INVERTED>;
			max-brightness = <255>;
			linux,default-trigger = "default-on";
		};

		led-3 {
			label = "pwm:green:user";
			pwms = <&tcb1_pwm0 0 10000000 PWM_POLARITY_INVERTED>;
			max-brightness = <255>;
			linux,default-trigger = "default-on";
		};

		led-4 {
			label = "pwm:red:user";
			pwms = <&tcb1_pwm0 1 10000000 PWM_POLARITY_INVERTED>;
			max-brightness = <255>;
			linux,default-trigger = "default-on";
		};
	};
};

&tcb0 {
	timer@0 {
		compatible = "atmel,tcb-timer";
		reg = <0>, <1>;
	};

	timer@2 {
		compatible = "atmel,tcb-timer";
		reg = <2>;
	};
};

&tcb1 {
	tcb1_pwm0: pwm@0 {
		compatible = "atmel,tcb-pwm";
		reg = <0>;
		#pwm-cells = <3>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_tcb1_tioa0 &pinctrl_tcb1_tiob0>;
	};

	tcb1_pwm1: pwm@1 {
		compatible = "atmel,tcb-pwm";
		reg = <1>;
		#pwm-cells = <3>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_tcb1_tioa1>;
	};

	tcb1_pwm2: pwm@2 {
		compatible = "atmel,tcb-pwm";
		reg = <2>;
		#pwm-cells = <3>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_tcb1_tioa2>;
	};
};

&ebi {
	status = "okay";
};

&nand_controller {
	status = "okay";
	pinctrl-0 = <&pinctrl_nand_cs &pinctrl_nand_rb>;
	pinctrl-names = "default";

	nand@3 {
		reg = <0x3 0x0 0x800000>;
		rb-gpios = <&pioC 13 GPIO_ACTIVE_HIGH>;
		cs-gpios = <&pioC 14 GPIO_ACTIVE_HIGH>;
		nand-bus-width = <8>;
		nand-ecc-mode = "soft";
		nand-on-flash-bbt;
		label = "atmel_nand";

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			bootstrap@0 {
				label = "bootstrap";
				reg = <0x0 0x20000>;
			};

			ubi@20000 {
				label = "ubi";
				reg = <0x20000 0x7fe0000>;
			};
		};
	};
};

&macb0 {
	phy-mode = "mii";
	pinctrl-0 = <&pinctrl_macb_rmii
		     &pinctrl_macb_rmii_mii_alt>;
	status = "okay";
};

&usart3 {
	status = "okay";
};

&dbgu {
	status = "okay";
};

&watchdog {
	timeout-sec = <15>;
	atmel,max-heartbeat-sec = <16>;
	atmel,min-heartbeat-sec = <0>;
	status = "okay";
};

&usb0 {
	num-ports = <1>;
	status = "okay";
};

&i2c_gpio0 {
	status = "okay";

	rtc: pcf8563@51 {
		compatible = "nxp,pcf8563";
		reg = <0x51>;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * at91-kizbox2-2.dts - Device Tree file for the Kizbox2 with
 * two head board
 *
 * Copyright (C) 2015 Overkiz SAS
 *
 * Authors: Antoine Aubert <a.aubert@overkiz.com>
 *	    Kévin Raymond <k.raymond@overkiz.com>
 */
/dts-v1/;
#include "at91-kizbox2-common.dtsi"

/ {
	model = "Overkiz Kizbox 2 with two heads";
	compatible = "overkiz,kizbox2-2", "atmel,sama5d31",
		     "atmel,sama5d3", "atmel,sama5";
};

&usart1 {
	status = "okay";
};

&usart2 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * at91-kizbox2_common.dtsi - Device Tree Include file for
 * Overkiz Kizbox 2 family SoC
 *
 * Copyright (C) 2014-2018 Overkiz SAS
 *
 * Authors: Antoine Aubert <a.aubert@overkiz.com>
 *          Gaël Portay <g.portay@overkiz.com>
 *          Kévin Raymond <k.raymond@overkiz.com>
 */
#include "sama5d31.dtsi"

/ {
	chosen {
		bootargs = "ubi.mtd=ubi";
		stdout-path = &dbgu;
	};

	memory@20000000 {
		reg = <0x20000000 0x10000000>;
	};

	clocks {
		slow_xtal {
			clock-frequency = <32768>;
		};

		main_xtal {
			clock-frequency = <12000000>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		button-prog {
			label = "PB_PROG";
			gpios = <&pioE 27 GPIO_ACTIVE_LOW>;
			linux,code = <0x102>;
			wakeup-source;
		};

		button-reset {
			label = "PB_RST";
			gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
			linux,code = <0x100>;
			wakeup-source;
		};

		button-user {
			label = "PB_USER";
			gpios = <&pioE 31 GPIO_ACTIVE_HIGH>;
			linux,code = <0x101>;
			wakeup-source;
		};
	};

	led-controller {
		compatible = "pwm-leds";

		led-1 {
			label = "pwm:blue:user";
			pwms = <&pwm0 2 10000000 0>;
			max-brightness = <255>;
			linux,default-trigger = "none";
		};

		led-2 {
			label = "pwm:green:user";
			pwms = <&pwm0 1 10000000 0>;
			max-brightness = <255>;
			linux,default-trigger = "default-on";
		};

		led-3 {
			label = "pwm:red:user";
			pwms = <&pwm0 0 10000000 0>;
			max-brightness = <255>;
			linux,default-trigger = "default-on";
		};
	};
};

&i2c1 {
	status = "okay";

	pmic: act8865@5b {
		compatible = "active-semi,act8865";
		reg = <0x5b>;
		status = "okay";

		regulators {
			vcc_1v8_reg: DCDC_REG1 {
				regulator-name = "VCC_1V8";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				regulator-always-on;
			};

			vcc_1v2_reg: DCDC_REG2 {
				regulator-name = "VCC_1V2";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <1200000>;
				regulator-always-on;
			};

			vcc_3v3_reg: DCDC_REG3 {
				regulator-name = "VCC_3V3";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vddfuse_reg: LDO_REG1 {
				regulator-name = "FUSE_2V5";
				regulator-min-microvolt = <2500000>;
				regulator-max-microvolt = <2500000>;
			};

			vddana_reg: LDO_REG2 {
				regulator-name = "VDDANA";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vled_reg: LDO_REG3 {
				regulator-name = "VLED";
				regulator-min-microvolt = <3300000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			v3v8_rf_reg: LDO_REG4 {
				regulator-name = "V3V8_RF";
				regulator-min-microvolt = <3800000>;
				regulator-max-microvolt = <3800000>;
				regulator-always-on;
			};
		};
	};
};

&usart0 {
	atmel,use-dma-rx;
	atmel,use-dma-tx;
	status = "disabled";
};

&usart1 {
	atmel,use-dma-rx;
	atmel,use-dma-tx;
	status = "disabled";
};

&usart2 {
	atmel,use-dma-rx;
	atmel,use-dma-tx;
	status = "disabled";
};

&pwm0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm0_pwmh0_1
		     &pinctrl_pwm0_pwmh1_1
		     &pinctrl_pwm0_pwmh2_0>;
	status = "okay";
};

&adc0 {
	atmel,adc-vref = <3333>;
	status = "okay";
};

&macb1 {
	phy-mode = "rmii";
	status = "okay";
};

&dbgu {
	status = "okay";
};

&watchdog {
	status = "okay";
};

&ebi {
	pinctrl-0 = <&pinctrl_ebi_nand_addr>;
	pinctrl-names = "default";
	status = "okay";
};

&nand_controller {
	status = "okay";

	nand@3 {
		reg = <0x3 0x0 0x2>;
		atmel,rb = <0>;
		nand-bus-width = <8>;
		nand-ecc-mode = "hw";
		nand-ecc-strength = <4>;
		nand-ecc-step-size = <512>;
		nand-on-flash-bbt;
		label = "atmel_nand";

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			bootstrap@0 {
				label = "bootstrap";
				reg = <0x0 0x20000>;
			};

			ubi@20000 {
				label = "ubi";
				reg = <0x20000 0x7fe0000>;
			};
		};
	};
};

&usb1 {
	status = "okay";
};

&usb2 {
	status = "okay";
};

/* WMBUS (inverted with IO in the latest schematic) */
&pinctrl_usart0 {
	atmel,pins =
		<AT91_PIOD 17 AT91_PERIPH_A AT91_PINCTRL_NONE
		 AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
		 AT91_PIOE 2 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
};

/* RTS */
&pinctrl_usart1 {
	atmel,pins =
		<AT91_PIOB 28 AT91_PERIPH_A AT91_PINCTRL_NONE
		 AT91_PIOB 29 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
		 AT91_PIOE 7 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
};

/* IO (inverted with WMBUS in the latest schematic) */
&pinctrl_usart2 {
	atmel,pins =
		<AT91_PIOE 25 AT91_PERIPH_B AT91_PINCTRL_NONE
		 AT91_PIOE 26 AT91_PERIPH_B AT91_PINCTRL_PULL_UP
		 AT91_PIOE 8 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * at91-kizbox3-hs.dts - Device Tree file for Overkiz KIZBOX3-HS board
 *
 * Copyright (C) 2018 Overkiz SAS
 *
 * Authors: Dorian Rocipon <d.rocipon@overkiz.com>
 *          Kevin Carli <k.carli@overkiz.com>
 *          Mickael Gardet <m.gardet@overkiz.com>
 */
/dts-v1/;
#include "at91-kizbox3_common.dtsi"

/ {
	model = "Overkiz KIZBOX3-HS";
	compatible = "overkiz,kizbox3-hs", "atmel,sama5d2", "atmel,sama5";

	led-controller-1 {
		status = "okay";

		led-1 {
			status = "okay";
		};

		led-2 {
			status = "okay";
		};

		led-3 {
			status = "okay";
		};

		led-4 {
			status = "okay";
		};
	};

	led-controller-2  {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_led_red
			     &pinctrl_led_white>;
		status = "okay";

		led-5 {
			label = "pio:red:user";
			gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>;
			default-state = "off";
		};

		led-6 {
			label = "pio:white:user";
			gpios = <&pioA PIN_PB8 GPIO_ACTIVE_HIGH>;
			default-state = "off";
		};
	};

	gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default" , "default", "default",
				"default", "default" ;
		pinctrl-0 = <&pinctrl_key_gpio_default>;
		pinctrl-1 = <&pinctrl_pio_rf &pinctrl_pio_wifi>;
		pinctrl-2 = <&pinctrl_pio_io_boot
			     &pinctrl_pio_io_reset
			     &pinctrl_pio_io_test_radio>;
		pinctrl-3 = <&pinctrl_pio_zbe_test_radio
			     &pinctrl_pio_zbe_rst>;
		pinctrl-4 = <&pinctrl_pio_input>;

		switch-1 {
			label = "SW1";
			gpios = <&pioA PIN_PA29 GPIO_ACTIVE_LOW>;
			linux,code = <0x101>;
			wakeup-source;
		};

		switch-2 {
			label = "SW2";
			gpios = <&pioA PIN_PA18 GPIO_ACTIVE_LOW>;
			linux,code = <0x102>;
			wakeup-source;
		};

		switch-3 {
			label = "SW3";
			gpios = <&pioA PIN_PA22 GPIO_ACTIVE_LOW>;
			linux,code = <0x103>;
			wakeup-source;
		};

		switch-7 {
			label = "SW7";
			gpios = <&pioA PIN_PA26 GPIO_ACTIVE_LOW>;
			linux,code = <0x107>;
			wakeup-source;
		};

		switch-8 {
			label = "SW8";
			gpios = <&pioA PIN_PA24 GPIO_ACTIVE_LOW>;
			linux,code = <0x108>;
			wakeup-source;
		};
	};

	gpios {
		compatible = "gpio";
		status = "okay";

		rf_on {
			label = "rf on";
			gpio = <&pioA PIN_PC19 GPIO_ACTIVE_HIGH>;
			output;
			init-low;
		};

		wifi_on {
			label = "wifi on";
			gpio = <&pioA PIN_PC20 GPIO_ACTIVE_HIGH>;
			output;
			init-low;
		};

		zbe_test_radio {
			label = "zbe test radio";
			gpio = <&pioA PIN_PB21 GPIO_ACTIVE_HIGH>;
			output;
			init-low;
		};

		zbe_rst {
			label = "zbe rst";
			gpio = <&pioA PIN_PB25 GPIO_ACTIVE_HIGH>;
			output;
			init-low;
		};

		io_reset {
			label = "io reset";
			gpio = <&pioA PIN_PB30 GPIO_ACTIVE_HIGH>;
			output;
			init-low;
		};

		io_test_radio {
			label = "io test radio";
			gpio = <&pioA PIN_PC9 GPIO_ACTIVE_HIGH>;
			output;
			init-low;
		};

		io_boot_0 {
			label = "io boot 0";
			gpio = <&pioA PIN_PC11 GPIO_ACTIVE_HIGH>;
			output;
			init-low;
		};

		io_boot_1 {
			label = "io boot 1";
			gpio = <&pioA PIN_PC17 GPIO_ACTIVE_HIGH>;
			output;
			init-low;
		};

		verbose_bootloader {
			label = "verbose bootloader";
			gpio = <&pioA PIN_PB11 GPIO_ACTIVE_HIGH>;
			input;
		};

		 nail_bed_detection  {
			label = "nail bed detection";
			gpio = <&pioA PIN_PB12 GPIO_ACTIVE_HIGH>;
			input;
		};

		 id_usba {
			label = "id usba";
			gpio = <&pioA PIN_PC0 GPIO_ACTIVE_LOW>;
			input;
		};
	};
};

&pioA {
	pinctrl_key_gpio_default: key_gpio_default {
		pinmux = <PIN_PA22__GPIO>,
		<PIN_PA24__GPIO>,
		<PIN_PA26__GPIO>,
		<PIN_PA29__GPIO>,
		<PIN_PA18__GPIO>;
		bias-disable;
		};

	pinctrl_gpio {
		pinctrl_pio_rf: gpio_rf {
			pinmux = <PIN_PC19__GPIO>;
			bias-disable;
		};
		pinctrl_pio_wifi: gpio_wifi {
			pinmux = <PIN_PC20__GPIO>;
			bias-disable;
		};
		pinctrl_pio_io_boot: gpio_io_boot {
			pinmux =
			<PIN_PC11__GPIO>,
			<PIN_PC17__GPIO>;
			bias-disable;
		};
		pinctrl_pio_io_test_radio: gpio_io_test_radio {
			pinmux = <PIN_PC9__GPIO>;
			bias-disable;
		};
		pinctrl_pio_zbe_test_radio: gpio_zbe_test_radio {
			pinmux = <PIN_PB21__GPIO>;
			bias-disable;
		};
		pinctrl_pio_zbe_rst: gpio_zbe_rst {
			pinmux = <PIN_PB25__GPIO>;
			bias-disable;
		};
		/* stm32 reset must be open drain (internal pull up) */
		pinctrl_pio_io_reset: gpio_io_reset {
			pinmux = <PIN_PB30__GPIO>;
			bias-disable;
			drive-open-drain = <1>;
			output-low;
		};
		pinctrl_pio_input: gpio_input {
			pinmux =
			<PIN_PB11__GPIO>,
			<PIN_PB12__GPIO>,
			<PIN_PC0__GPIO>;
			bias-disable;
		};
	};

	pinctrl_leds {
		pinctrl_led_red: led_red {
			pinmux = <PIN_PB1__GPIO>;
			bias-disable;
		};
		pinctrl_led_white: led_white {
			pinmux = <PIN_PB8__GPIO>;
			bias-disable;
		};
	};
};

&adc {
	status = "okay";
};

&uart0 {
	status = "okay";
};

&uart1 {
	status = "okay";
};

&uart2 {
	status = "okay";
};

&uart3 {
	status = "okay";
};

&uart4 {
	status = "okay";
};

&flx0 {
	status = "okay";

	uart5: serial@200  {
			status = "okay";
	};
};

&flx3 {
	status = "okay";
	uart8: serial@200 {
		status = "okay";
	};
};

&flx4 {
	status = "okay";

	i2c6: i2c@600 {
		status = "okay";
	};
};

&usb0 {
	status = "okay";
};

&usb1 {
	status = "okay";
};

&usb2 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * at91-kizbox3.dts - Device Tree Include file for Overkiz Kizbox 3
 * family SoC boards
 *
 * Copyright (C) 2018 Overkiz SAS
 *
 * Authors: Dorian Rocipon <d.rocipon@overkiz.com>
 *          Kevin Carli <k.carli@overkiz.com>
 *          Mickael Gardet <m.gardet@overkiz.com>
 */
/dts-v1/;
#include "sama5d2.dtsi"
#include "sama5d2-pinfunc.h"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/mfd/atmel-flexcom.h>
#include <dt-bindings/pinctrl/at91.h>
#include <dt-bindings/pwm/pwm.h>

/ {
	model = "Overkiz Kizbox3";
	compatible = "overkiz,kizbox3", "atmel,sama5d2", "atmel,sama5";

	aliases {
		serial0 = &uart0;
		serial1 = &uart1;
		serial2 = &uart2;
		serial3 = &uart3;
		serial4 = &uart4;
		serial5 = &uart5;
		serial6 = &uart8;
	};

	chosen {
		bootargs = "ubi.mtd=ubi";
		stdout-path = "serial1:115200n8";
	};

	clocks {
		slow_xtal {
			clock-frequency = <32768>;
		};

		main_xtal {
			clock-frequency = <12000000>;
		};
	};

	vdd_adc_vddana: supply_3v3_ana {
		compatible = "regulator-fixed";
		regulator-name = "adc-vddana";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};

	vdd_adc_vref: supply_3v3_ref {
		compatible = "regulator-fixed";
		regulator-name = "adc-vref";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};

	led-controller-1 {
		compatible = "pwm-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_pwm0_pwm_h0
			     &pinctrl_pwm0_pwm_h1
			     &pinctrl_pwm0_pwm_h2
			     &pinctrl_pwm0_pwm_h3>;
		status = "disabled";

		led-1 {
			label = "pwm:red:user";
			pwms = <&pwm0 0 10000000 0>;
			max-brightness = <255>;
			linux,default-trigger = "default-on";
			status = "disabled";
		};

		led-2 {
			label = "pwm:green:user";
			pwms = <&pwm0 1 10000000 0>;
			max-brightness = <255>;
			linux,default-trigger = "default-on";
			status = "disabled";
		};

		led-3 {
			label = "pwm:blue:user";
			pwms = <&pwm0 2 10000000 0>;
			max-brightness = <255>;
			status = "disabled";
		};

		led-4 {
			label = "pwm:white:user";
			pwms = <&pwm0 3 10000000 0>;
			max-brightness = <255>;
			status = "disabled";
		};
	};
};

&ebi {
	status = "okay";
};

&nand_controller {
	status = "okay";

	nand@3 {
		pinctrl-0 = <&pinctrl_ebi_nand_addr>;
		pinctrl-names = "default";
		reg = <0x3 0x0 0x800000>;

		atmel,rb = <0>;
		nand-bus-width = <8>;
		nand-ecc-mode = "hw";
		nand-ecc-strength = <4>;
		nand-ecc-step-size = <512>;
		nand-on-flash-bbt;
		label = "atmel_nand";

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			bootstrap@0 {
				label = "bootstrap";
				reg = <0x0 0x20000>;
			};

			u-boot@20000 {
				label = "u-boot";
				reg = <0x20000 0x140000>;
			};

			u-boot-factory@160000 {
				label = "u-boot-factory";
				reg = <0x160000 0x140000>;
			};

			ubi@2A0000 {
				label = "ubi";
				reg = <0x2A0000 0x7D60000>;
			};
		};

	};
};

&rtc {
	status = "okay";
};

&pioA {
	pinctrl_ebi_nand_addr: ebi-addr-1 {
		pinmux = <PIN_PA0__D0>,
			<PIN_PA1__D1>,
			<PIN_PA2__D2>,
			<PIN_PA3__D3>,
			<PIN_PA4__D4>,
			<PIN_PA5__D5>,
			<PIN_PA6__D6>,
			<PIN_PA7__D7>,
			<PIN_PA8__NWE_NANDWE>,
			<PIN_PA9__NCS3>,
			<PIN_PA10__A21_NANDALE>,
			<PIN_PA11__A22_NANDCLE>,
			<PIN_PA21__NANDRDY>;
		bias-disable;
	};

	pinctrl_usart {
		pinctrl_usart_0: usart0-0 {
			pinmux = < PIN_PB26__URXD0>, <PIN_PB27__UTXD0>;
			bias-disable;
		};
		pinctrl_usart_1: usart1-0 {
			pinmux = < PIN_PD2__URXD1>, <PIN_PD3__UTXD1>;
			bias-disable;
		};
		pinctrl_usart_2: usart2-0 {
			pinmux = < PIN_PD4__URXD2>, <PIN_PD5__UTXD2>;
			bias-disable;
		};
		pinctrl_usart_3: usart3-0 {
			pinmux = < PIN_PC12__URXD3>, <PIN_PC13__UTXD3>;
			bias-disable;
		};
		pinctrl_usart_4: usart4-0 {
			pinmux = < PIN_PB3__URXD4>, <PIN_PB4__UTXD4>;
			bias-disable;
		};
		pinctrl_flx0_default: flx0_usart_default {
			pinmux = <PIN_PB28__FLEXCOM0_IO0>, //TX
			<PIN_PB29__FLEXCOM0_IO1>; //RX
			bias-disable;
		};
		pinctrl_flx3_default: flx3_usart_default {
			pinmux = <PIN_PB22__FLEXCOM3_IO1>, //RX
			<PIN_PB23__FLEXCOM3_IO0>; //TX
			bias-disable;
		};
	};

	pinctrl_flx4_default: flx4_i2c6_default {
		pinmux = <PIN_PD12__FLEXCOM4_IO0>, //DATA
		<PIN_PD13__FLEXCOM4_IO1>; //CLK
		bias-disable;
		drive-open-drain = <1>;
	};

	pinctrl_pwm0 {
		pinctrl_pwm0_pwm_h0: pwm0_pwm_h0 {
			pinmux = <PIN_PA30__PWMH0>;
			bias-disable;
		};
		pinctrl_pwm0_pwm_h1: pwm0_pwmh1 {
			pinmux = <PIN_PB0__PWMH1>;
			bias-disable;
		};
		pinctrl_pwm0_pwm_h2: pwm0_pwm_h2 {
			pinmux = <PIN_PB5__PWMH2>;
			bias-disable;
		};
		pinctrl_pwm0_pwm_h3: pwm0_pwm_h3 {
			pinmux = <PIN_PB7__PWMH3>;
			bias-disable;
		};
	};

	pinctrl_adc {
		pinctrl_adc2: adc2 {
			pinmux = <PIN_PD21__GPIO>;
			bias-disable;
		};
		pinctrl_adc3: adc3 {
			pinmux = <PIN_PD22__GPIO>;
			bias-disable;
		};
		pinctrl_adc4: adc4 {
			pinmux = <PIN_PD23__GPIO>;
			bias-disable;
		};
		pinctrl_adc5: adc5 {
			pinmux = <PIN_PD24__GPIO>;
			bias-disable;
		};
	};
};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usart_0>;
	atmel,use-dma-rx;
	atmel,use-dma-tx;
	status = "disabled";
};

/* debug uart */
&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usart_1>;
	atmel,use-dma-rx;
	atmel,use-dma-tx;
	status = "disabled";
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usart_2>;
	atmel,use-dma-rx;
	atmel,use-dma-tx;
	status = "disabled";
};

&uart3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usart_3>;
	atmel,use-dma-rx;
	atmel,use-dma-tx;
	status = "disabled";
};

&uart4 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usart_4>;
	atmel,use-dma-rx;
	atmel,use-dma-tx;
	status = "disabled";
};

&flx0 {
	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
	status = "disabled";

	uart5: serial@200  {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_flx0_default>;
		atmel,use-dma-rx;
		atmel,use-dma-tx;
		status = "disabled";
	};
};

&flx3 {
	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
	status = "disabled";

	uart8: serial@200 {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_flx3_default>;
		atmel,use-dma-rx;
		atmel,use-dma-tx;
		status = "disabled";
	};
};

&flx4 {
	atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
	status = "disabled";

	i2c6: i2c@600 {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_flx4_default>;
		status = "disabled";
	};
};

&pwm0 {
	status = "okay";
};

&shutdown_controller {
	debounce-delay-us = <976>;
	atmel,wakeup-rtc-timer;

	input@0 {
		reg = <0>;
	};
};

&watchdog {
	status = "okay";
};

&adc {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_adc2
		     &pinctrl_adc3
		     &pinctrl_adc4
		     &pinctrl_adc5>;

	vddana-supply = <&vdd_adc_vddana>;
	vref-supply = <&vdd_adc_vref>;
	status = "disabled";
};

&securam {
	export;

	/* export overkiz u-boot mode/version and factory */
	uboot@1400 {
		reg = <0x1400 0x20>;
		export;
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * at91-kizboxmini-base.dts - Device Tree file for Overkiz Kizbox mini
 * base board
 *
 * Copyright (C) 2015 Overkiz SAS
 *   Author: Antoine Aubert <a.aubert@overkiz.com>
 *           Kévin Raymond <k.raymond@overkiz.com>
 */
/dts-v1/;
#include "at91-kizboxmini-common.dtsi"

/ {
	model = "Overkiz Kizbox Mini";
	compatible = "overkiz,kizboxmini-base", "atmel,at91sam9g25",
		     "atmel,at91sam9x5", "atmel,at91sam9";
};

&pinctrl_usart0 {
	atmel,pins =
		<AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
		 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE
		 AT91_PIOA 2 AT91_PERIPH_GPIO AT91_PINCTRL_MULTI_DRIVE>;
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * at91-kizboxmini.dts - Device Tree file for Overkiz Kizbox mini board
 *
 * Copyright (C) 2014-2018 Overkiz SAS
 *   Author: Antoine Aubert <a.aubert@overkiz.com>
 *           Gaël Portay <g.portay@overkiz.com>
 *           Kévin Raymond <k.raymond@overkiz.com>
 *           Dorian Rocipon <d.rocipon@overkiz.com>
 */
#include "at91sam9g25.dtsi"

/ {
	chosen {
		bootargs = "ubi.mtd=ubi";
		stdout-path = &dbgu;
	};

	memory@20000000 {
		reg = <0x20000000 0x8000000>;
	};

	clocks {
		main_xtal {
			clock-frequency = <12000000>;
		};

		slow_xtal {
			clock-frequency = <32768>;
		};

		adc_op_clk {
			status = "disabled";
		};
	};

	gpio_keys {
		compatible = "gpio-keys";

		key-prog {
			label = "PB_PROG";
			gpios = <&pioC 17 GPIO_ACTIVE_LOW>;
			linux,code = <0x102>;
			wakeup-source;
		};

		key-reset {
			label = "PB_RST";
			gpios = <&pioC 16 GPIO_ACTIVE_LOW>;
			linux,code = <0x100>;
			wakeup-source;
		};
	};

	leds: led-controller-1 {
		compatible = "pwm-leds";

		led_blue: led-1 {
			label = "pwm:blue:user";
			pwms = <&pwm0 2 10000000 0>;
			max-brightness = <255>;
			linux,default-trigger = "none";
			status = "disabled";
		};

		led_green: led-2 {
			label = "pwm:green:user";
			pwms = <&pwm0 0 10000000 0>;
			max-brightness = <255>;
			linux,default-trigger = "default-on";
		};

		led_red: led-3 {
			label = "pwm:red:user";
			pwms = <&pwm0 1 10000000 0>;
			max-brightness = <255>;
			linux,default-trigger = "default-on";
		};
	};
};

&usart0 {
	atmel,use-dma-rx;
	atmel,use-dma-tx;
	status = "okay";
};

&macb0 {
	phy-mode = "rmii";
	status = "okay";
};

&pwm0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_pwm0_pwm0_1
		     &pinctrl_pwm0_pwm1_1
		     &pinctrl_pwm0_pwm2_1>;
	status = "okay";
};

&dbgu {
	status = "okay";
};

&watchdog {
	status = "okay";
};

&adc0 {
	status = "disabled";
};

&rtc {
	status = "disabled";
};

&ebi {
	pinctrl-0 = <&pinctrl_ebi_addr_nand
			&pinctrl_ebi_data_0_7>;
	pinctrl-names = "default";
	status = "okay";
};

&nand_controller {
	status = "okay";
	pinctrl-0 = <&pinctrl_nand_oe_we
		     &pinctrl_nand_cs
		     &pinctrl_nand_rb>;
	pinctrl-names = "default";

	nand@3 {
		reg = <0x3 0x0 0x800000>;
		rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
		cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
		nand-bus-width = <8>;
		nand-ecc-mode = "hw";
		nand-ecc-strength = <4>;
		nand-ecc-step-size = <512>;
		nand-on-flash-bbt;
		label = "atmel_nand";

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			bootstrap@0 {
				label = "bootstrap";
				reg = <0x0 0x20000>;
			};

			ubi@20000 {
				label = "ubi";
				reg = <0x20000 0x7fe0000>;
			};
		};
	};
};

&usb0 {
	num-ports = <1>;
	status = "okay";
};

&usb1 {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2015-2018 Overkiz SAS
 *   Author: Mickael Gardet <m.gardet@overkiz.com>
 *           Kévin Raymond <k.raymond@overkiz.com>
 */
/dts-v1/;
#include "at91-kizboxmini-common.dtsi"

/ {
	model = "Overkiz Kizbox Mini Mother Board";
	compatible = "overkiz,kizboxmini-mb", "atmel,at91sam9g25",
		     "atmel,at91sam9x5", "atmel,at91sam9";
};

&usb0 {
	num-ports = <2>;
};

&rtc {
	status = "okay";
};

&led_blue {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2015-2018 Overkiz SAS
 *   Author: Mickael Gardet <m.gardet@overkiz.com>
 *           Kévin Raymond <k.raymond@overkiz.com>
 */
/dts-v1/;
#include "at91-kizboxmini-common.dtsi"

/ {
	model = "Overkiz Kizbox Mini RailDIN";
	compatible = "overkiz,kizboxmini-rd", "atmel,at91sam9g25",
		     "atmel,at91sam9x5", "atmel,at91sam9";

	clocks {
		adc_op_clk {
			status = "okay";
		};
	};
};

&pinctrl {
	adc0 {
		pinctrl_adc0_ad5: adc0_ad5-0 {
			/* pull-up disable */
			atmel,pins = <AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
		};
	};
};

&usart0 {
	status = "disabled";
};

&rtc {
	status = "okay";
};

&led_blue {
	status = "okay";
};

&adc0 {
	atmel,adc-vref = <2500>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_adc0_ad5>;
	atmel,adc-channels-used = <0x0020>;
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * at91-linea.dtsi - Device Tree Include file for the Axentia Linea Module.
 *
 * Copyright (C) 2017 Axentia Technologies AB
 *
 * Author: Peter Rosin <peda@axentia.se>
 */

#include "sama5d31.dtsi"

/ {
	compatible = "axentia,linea",
		     "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";

	memory@20000000 {
		reg = <0x20000000 0x4000000>;
	};
};

&slow_xtal {
	clock-frequency = <32768>;
};

&main_xtal {
	clock-frequency = <12000000>;
};

&tcb0 {
	timer@0 {
		compatible = "atmel,tcb-timer";
		reg = <0>;
	};

	timer@1 {
		compatible = "atmel,tcb-timer";
		reg = <1>;
	};
};

&i2c0 {
	status = "okay";

	eeprom@51 {
		compatible = "st,24c64", "atmel,24c64";
		reg = <0x51>;
		pagesize = <32>;
	};
};

&ebi {
	pinctrl-0 = <&pinctrl_ebi_nand_addr>;
	pinctrl-names = "default";
	status = "okay";
};

&nand_controller {
	status = "okay";

	nand: nand@3 {
		reg = <0x3 0x0 0x2>;
		atmel,rb = <0>;
		nand-bus-width = <8>;
		nand-ecc-mode = "hw";
		nand-ecc-strength = <4>;
		nand-ecc-step-size = <512>;
		nand-on-flash-bbt;
		label = "atmel_nand";
	};
};


code:
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Device Tree file for CalAmp LMU5000 board
 *
 * Copyright (C) 2013 Adam Porter <porter.adam@gmail.com>
 */

/dts-v1/;
#include "at91sam9g20.dtsi"

/ {
	model = "CalAmp LMU5000";
	compatible = "calamp,lmu5000", "atmel,at91sam9g20", "atmel,at91sam9";

	chosen {
		bootargs = "mem=64M console=ttyS0,115200 rootfstype=jffs2";
	};

	memory {
		reg = <0x20000000 0x4000000>;
	};

	clocks {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		main_clock: clock@0 {
			compatible = "atmel,osc", "fixed-clock";
			clock-frequency = <18432000>;
		};
	};
};

&dbgu {
	status = "okay";
};

&ebi {
	status = "okay";

	nand_controller: nand-controller {
		pinctrl-0 = <&pinctrl_nand_cs &pinctrl_nand_rb>;
		pinctrl-names = "default";
		status = "okay";

		nand@3 {
			reg = <0x3 0x0 0x800000>;
			rb-gpios = <&pioC 13 GPIO_ACTIVE_HIGH>;
			cs-gpios = <&pioC 14 GPIO_ACTIVE_HIGH>;
			nand-bus-width = <8>;
			nand-ecc-mode = "soft";
			nand-on-flash-bbt;
			label = "atmel_nand";
			status = "okay";

			partitions {
				compatible = "fixed-partitions";
				#address-cells = <1>;
				#size-cells = <1>;

				kernel@0 {
					label = "kernel";
					reg = <0x0 0x400000>;
				};

				rootfs@400000 {
					label = "rootfs";
					reg = <0x400000 0x3C00000>;
				};

				user1@4000000 {
					label = "user1";
					reg = <0x4000000 0x2000000>;
				};

				user2@6000000 {
					label = "user2";
					reg = <0x6000000 0x2000000>;
				};
			};
		};
	};
};

&macb0 {
	phy-mode = "mii";
	status = "okay";
};

&pinctrl {
	board {
		pinctrl_pck0_as_mck: pck0_as_mck {
			atmel,pins = <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;
		};
	};

	usb0 {
		pinctrl_usb1_vbus_gpio: usb0_vbus_gpio {
			atmel,pins = <AT91_PIOC 5 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
		};
	};
};

&ssc0 {
	status = "okay";
	pinctrl-0 = <&pinctrl_ssc0_tx>;
};

&uart0 {
	status = "okay";
};

&uart1 {
	status = "okay";
};

&usart0 {
	pinctrl-0 =
		<&pinctrl_usart0
		 &pinctrl_usart0_rts
		 &pinctrl_usart0_cts
		 &pinctrl_usart0_dtr_dsr
		 &pinctrl_usart0_dcd
		 &pinctrl_usart0_ri>;
	status = "okay";
};

&usart2 {
	status = "okay";
};

&usb0 {
	num-ports = <2>;
	status = "okay";
};

&usb1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usb1_vbus_gpio>;
	atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
	status = "okay";
};

&watchdog {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0+
/*
 * at91-natte.dts - Device Tree include file for the Natte board
 *
 * Copyright (C) 2017 Axentia Technologies AB
 *
 * Author: Peter Rosin <peda@axentia.se>
 */

/ {
	mux: mux-controller {
		compatible = "gpio-mux";
		#mux-control-cells = <0>;

		mux-gpios = <&ioexp 0 GPIO_ACTIVE_HIGH>,
			    <&ioexp 1 GPIO_ACTIVE_HIGH>,
			    <&ioexp 2 GPIO_ACTIVE_HIGH>;
	};

	batntc-mux {
		compatible = "io-channel-mux";
		io-channels = <&adc 5>;
		io-channel-names = "parent";
		mux-controls = <&mux>;

		channels =
			"batntc0", "batntc1", "batntc2", "batntc3",
			"batntc4", "batntc5", "batntc6", "batntc7";
	};

	batv-mux {
		compatible = "io-channel-mux";
		io-channels = <&adc 6>;
		io-channel-names = "parent";
		mux-controls = <&mux>;

		channels =
			"batv0", "batv1", "batv2", "batv3",
			"batv4", "batv5", "batv6", "batv7";
	};

	iout-mux {
		compatible = "io-channel-mux";
		io-channels = <&adc 7>;
		io-channel-names = "parent";
		mux-controls = <&mux>;

		channels =
			"iout0", "iout1", "iout2", "iout3",
			"iout4", "iout5", "iout6", "iout7";
	};

	i2c-mux {
		compatible = "i2c-mux";
		mux-locked;
		i2c-parent = <&i2c0>;
		mux-controls = <&mux>;

		#address-cells = <1>;
		#size-cells = <0>;

		i2c@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;

			charger@9 {
				compatible = "ti,bq24735";
				reg = <0x9>;

				ti,charge-current = <2000>;
				ti,charge-voltage = <16800>;

				poll-interval = <20000>;
			};
		};

		i2c@1 {
			reg = <1>;
			#address-cells = <1>;
			#size-cells = <0>;

			charger@9 {
				compatible = "ti,bq24735";
				reg = <0x9>;

				ti,charge-current = <2000>;
				ti,charge-voltage = <16800>;

				poll-interval = <20000>;
			};
		};

		i2c@2 {
			reg = <2>;
			#address-cells = <1>;
			#size-cells = <0>;

			charger@9 {
				compatible = "ti,bq24735";
				reg = <0x9>;

				ti,charge-current = <2000>;
				ti,charge-voltage = <16800>;

				poll-interval = <20000>;
			};
		};

		i2c@3 {
			reg = <3>;
			#address-cells = <1>;
			#size-cells = <0>;

			charger@9 {
				compatible = "ti,bq24735";
				reg = <0x9>;

				ti,charge-current = <2000>;
				ti,charge-voltage = <16800>;

				poll-interval = <20000>;
			};
		};

		i2c@4 {
			reg = <4>;
			#address-cells = <1>;
			#size-cells = <0>;

			charger@9 {
				compatible = "ti,bq24735";
				reg = <0x9>;

				ti,charge-current = <2000>;
				ti,charge-voltage = <16800>;

				poll-interval = <20000>;
			};
		};

		i2c@5 {
			reg = <5>;
			#address-cells = <1>;
			#size-cells = <0>;

			charger@9 {
				compatible = "ti,bq24735";
				reg = <0x9>;

				ti,charge-current = <2000>;
				ti,charge-voltage = <16800>;

				poll-interval = <20000>;
			};
		};

		i2c@6 {
			reg = <6>;
			#address-cells = <1>;
			#size-cells = <0>;

			charger@9 {
				compatible = "ti,bq24735";
				reg = <0x9>;

				ti,charge-current = <2000>;
				ti,charge-voltage = <16800>;

				poll-interval = <20000>;
			};
		};

		i2c@7 {
			reg = <7>;
			#address-cells = <1>;
			#size-cells = <0>;

			charger@9 {
				compatible = "ti,bq24735";
				reg = <0x9>;

				ti,charge-current = <2000>;
				ti,charge-voltage = <16800>;

				poll-interval = <20000>;
			};
		};
	};
};

&i2c0 {
	status = "okay";

	ioexp: ioexp@20 {
		#gpio-cells = <2>;
		compatible = "semtech,sx1502q";
		reg = <0x20>;

		gpio-controller;
		ngpios = <8>;

		pinctrl-names = "default";
		pinctrl-0 = <&gpio3_cfg_pins>;

		gpio3_cfg_pins: gpio3_cfg {
			pins = "gpio3";
			bias-pull-up;
		};
	};

	adc: adc@48 {
		compatible = "ti,ads1015";
		reg = <0x48>;
		#io-channel-cells = <1>;

		#address-cells = <1>;
		#size-cells = <0>;

		channel@4 {
			reg = <4>;
			ti,gain = <2>;
			ti,datarate = <4>;
		};

		channel@5 {
			reg = <5>;
			ti,gain = <2>;
			ti,datarate = <4>;
		};

		channel@6 {
			reg = <6>;
			ti,gain = <1>;
			ti,datarate = <4>;
		};

		channel@7 {
			reg = <7>;
			ti,gain = <3>;
			ti,datarate = <4>;
		};
	};
};


code:
// SPDX-License-Identifier: GPL-2.0+
/*
 * at91-nattis-2-natte-2.dts - Device Tree file for the Linea/Nattis board
 *
 * Copyright (C) 2017 Axentia Technologies AB
 *
 * Author: Peter Rosin <peda@axentia.se>
 */
/dts-v1/;
#include "at91-linea.dtsi"
#include "at91-natte.dtsi"

/ {
	model = "Axentia Linea-Nattis v2 Natte v2";
	compatible = "axentia,nattis-2", "axentia,natte-2", "axentia,linea",
		     "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";

	gpio-keys {
		compatible = "gpio-keys";

		key-wakeup {
			label = "Wakeup";
			linux,code = <10>;
			wakeup-source;
			gpios = <&pioB 27 GPIO_ACTIVE_LOW>;
		};
	};

	panel_reg: panel-regulator {
		compatible = "regulator-fixed";
		regulator-name = "panel-VCC";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};

	bl_reg: backlight-regulator {
		compatible = "regulator-fixed";
		regulator-name = "panel-VDD";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
	};

	panel_bl: backlight {
		compatible = "pwm-backlight";
		pwms = <&hlcdc_pwm 0 100000 0>;

		brightness-levels = < 0  1  2  3  4  5  6  7  8  9
				     10 11 12 13 14 15 16 17 18 19
				     20 21 22 23 24 25 26 27 28 29
				     30 31 32 33 34 35 36 37 38 39
				     40 41 42 43 44 45 46 47 48 49
				     50 51 52 53 54 55 56 57 58 59
				     60 61 62 63 64 65 66 67 68 69
				     70 71 72 73 74 75 76 77 78 79
				     80 81 82 83 84 85 86 87 88 89
				     90 91 92 93 94 95 96 97 98 99
				    100>;
		default-brightness-level = <40>;

		power-supply = <&bl_reg>;
		enable-gpios = <&pioA 20 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_blon>;
	};

	panel: panel {
		compatible = "sharp,lq150x1lg11", "panel-lvds";

		backlight = <&panel_bl>;
		power-supply = <&panel_reg>;

		width-mm = <304>;
		height-mm = <228>;

		data-mapping = "jeida-18";

		panel-timing {
			// 1024x768 @ 60Hz (typical)
			clock-frequency = <50000000 65000000 80000000>;
			hactive = <1024>;
			vactive = <768>;
			hfront-porch = <48 88 88>;
			hback-porch = <96 168 168>;
			hsync-len = <32 64 64>;
			vsync-len = <3 13 74>;
			vfront-porch = <3 13 74>;
			vback-porch = <3 12 74>;
		};

		port {
			panel_input: endpoint {
				remote-endpoint = <&lvds_encoder_output>;
			};
		};
	};

	lvds-encoder {
		compatible = "ti,ds90c185", "lvds-encoder";

		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lvds_prlud0 &pinctrl_lvds_hipow0>;

		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;

				lvds_encoder_input: endpoint {
					remote-endpoint = <&hlcdc_output>;
				};
			};

			port@1 {
				reg = <1>;

				lvds_encoder_output: endpoint {
					remote-endpoint = <&panel_input>;
				};
			};
		};
	};

	sound {
		compatible = "simple-audio-card";

		simple-audio-card,name = "nattis-tfa9879";
		simple-audio-card,format = "i2s";
		simple-audio-card,bitclock-master = <&cpu_dai>;
		simple-audio-card,frame-master = <&cpu_dai>;
		simple-audio-card,widgets = "Line", "Line Out Jack";
		simple-audio-card,routing = "Line Out Jack", "LINEOUT";

		cpu_dai: simple-audio-card,cpu {
			sound-dai = <&ssc0>;
		};

		simple-audio-card,codec {
			sound-dai = <&amp>;
		};
	};
};

&pinctrl {
	nattis {
		pinctrl_usba_vbus: usba_vbus {
			atmel,pins = <AT91_PIOD 28 AT91_PERIPH_GPIO
				      AT91_PINCTRL_DEGLITCH>;
		};

		pinctrl_mmc0_cd: mmc0_cd {
			atmel,pins = <AT91_PIOD  5 AT91_PERIPH_GPIO
				      AT91_PINCTRL_PULL_UP_DEGLITCH>;
		};

		pinctrl_lvds_prlud0: lvds_prlud0 {
			atmel,pins = <AT91_PIOA 21 AT91_PERIPH_GPIO
				      (AT91_PINCTRL_OUTPUT |
				       AT91_PINCTRL_OUTPUT_VAL(0))>;
		};

		pinctrl_lvds_hipow0: lvds_hipow0 {
			atmel,pins = <AT91_PIOA 23 AT91_PERIPH_GPIO
				      (AT91_PINCTRL_OUTPUT |
				       AT91_PINCTRL_OUTPUT_VAL(0))>;
		};

		pinctrl_blon: blon {
			atmel,pins = <AT91_PIOA 20 AT91_PERIPH_GPIO
				      (AT91_PINCTRL_OUTPUT |
				       AT91_PINCTRL_OUTPUT_VAL(0))>;
		};
	};
};

&watchdog {
	status = "okay";
};

&i2c0 {
	status = "okay";

	clock-frequency = <100000>;

	temp@18 {
		compatible = "nxp,se97b", "jedec,jc-42.4-temp";
		reg = <0x18>;
		smbus-timeout-disable;
	};

	eeprom@50 {
		compatible = "nxp,se97b", "atmel,24c02";
		reg = <0x50>;
		pagesize = <16>;
	};

	amp: amplifier@6c {
		 compatible = "nxp,tfa9879";
		 reg = <0x6c>;
		 #sound-dai-cells = <0>;
	};
};

&ssc0 {
	status = "okay";

	atmel,clk-from-rk-pin;
	#sound-dai-cells = <0>;
};

&hlcdc {
	status = "okay";

	hlcdc-display-controller {
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb565>;

		port@0 {
			hlcdc_output: endpoint {
				remote-endpoint = <&lvds_encoder_input>;
				bus-width = <16>;
			};
		};
	};
};

&mmc0 {
	status = "okay";

	pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0
		     &pinctrl_mmc0_dat1_3
		     &pinctrl_mmc0_cd>;

	slot@0 {
		reg = <0>;
		bus-width = <4>;
		cd-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
		cd-inverted;
	};
};

&usart0 {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usart0>;
	atmel,use-dma-rx;
};

&nand {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		at91bootstrap@0 {
			label = "at91bootstrap";
			reg = <0x0 0x40000>;
		};

		barebox@40000 {
			label = "barebox";
			reg = <0x40000 0x60000>;
		};

		bareboxenv@c0000 {
			label = "bareboxenv";
			reg = <0xc0000 0x40000>;
		};

		bareboxenv2@100000 {
			label = "bareboxenv2";
			reg = <0x100000 0x40000>;
		};

		oftree@180000 {
			label = "oftree";
			reg = <0x180000 0x20000>;
		};

		kernel@200000 {
			label = "kernel";
			reg = <0x200000 0x500000>;
		};

		rootfs@800000 {
			label = "rootfs";
			reg = <0x800000 0x1f800000>;
		};
	};
};

&dbgu {
	status = "okay";

	atmel,use-dma-rx;
};

&usb0 {
	status = "okay";

	atmel,vbus-gpio = <&pioD 28 GPIO_ACTIVE_HIGH>;
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usba_vbus>;
};


code:
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Device Tree file for Exegin Q5xR5 board
 *
 * Copyright (C) 2014 Owen Kirby <osk@exegin.com>
 */

/dts-v1/;
#include "at91sam9g20.dtsi"

/ {
	model = "Exegin Q5x (rev5)";
	compatible = "exegin,q5xr5", "atmel,at91sam9g20", "atmel,at91sam9";

	chosen {
		bootargs = "console=ttyS0,115200 rootfstype=squashfs,jffs2";
	};

	memory {
		reg = <0x20000000 0x0>;
	};

	clocks {
		#address-cells = <1>;
		#size-cells = <1>;
		ranges;

		main_clock: clock@0 {
			compatible = "atmel,osc", "fixed-clock";
			clock-frequency = <18432000>;
		};

		slow_xtal {
			clock-frequency = <32768>;
		};

		main_xtal {
			clock-frequency = <18432000>;
		};
	};
};

&dbgu {
	status = "okay";
};

&ebi {
	status = "okay";

	flash: flash@0 {
		compatible = "cfi-flash";
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0x0 0x1000000 0x800000>;
		bank-width = <2>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			kernel@0 {
				label = "kernel";
				reg = <0x0 0x200000>;
			};

			rootfs@200000 {
				label = "rootfs";
				reg = <0x200000 0x600000>;
			};
		};
	};
};

&macb0 {
	phy-mode = "mii";
	status = "okay";
};

&pinctrl {
	board {
		pinctrl_pck0_as_mck: pck0_as_mck {
			atmel,pins = <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>;
		};
	};

	spi0 {
		pinctrl_spi0: spi0-0 {
			atmel,pins =
				<AT91_PIOA 0 AT91_PERIPH_A AT91_PINCTRL_NONE
				 AT91_PIOA 1 AT91_PERIPH_A AT91_PINCTRL_NONE
				 AT91_PIOA 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;
		};

		pinctrl_spi0_npcs0: spi0_npcs0 {
			atmel,pins = <AT91_PIOA 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;
		};

		pinctrl_spi0_npcs1: spi0_npcs1 {
			atmel,pins = <AT91_PIOC 11 AT91_PERIPH_B AT91_PINCTRL_NONE>;
		};
	};

	spi1 {
		pinctrl_spi1: spi1-0 {
			atmel,pins =
				<AT91_PIOB 0 AT91_PERIPH_A AT91_PINCTRL_NONE
				 AT91_PIOB 1 AT91_PERIPH_A AT91_PINCTRL_NONE
				 AT91_PIOB 2 AT91_PERIPH_A AT91_PINCTRL_NONE>;
		};

		pinctrl_spi1_npcs0: spi1_npcs0 {
			atmel,pins = <AT91_PIOB 3 AT91_PERIPH_A AT91_PINCTRL_NONE>;
		};

		pinctrl_spi1_npcs1: spi1_npcs1 {
			atmel,pins = <AT91_PIOC 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;
		};
	};
};

&spi0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_spi0 &pinctrl_spi0_npcs0 &pinctrl_spi0_npcs1>;
	cs-gpios = <&pioA 3 GPIO_ACTIVE_HIGH>, <&pioC 11 GPIO_ACTIVE_LOW>, <0>, <0>;
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		spi-max-frequency = <20000000>;
		reg = <0>;
		#address-cells = <1>;
		#size-cells = <1>;

		at91boot@0 {
			label = "at91boot";
			reg = <0x0 0x4000>;
		};

		uenv@4000 {
			label = "uboot-env";
			reg = <0x4000 0x4000>;
		};

		uboot@8000 {
			label = "uboot";
			reg = <0x8000 0x3E000>;
		};
	};
};

&spi1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_spi1 &pinctrl_spi1_npcs0 &pinctrl_spi1_npcs1>;
	cs-gpios = <&pioB 3 GPIO_ACTIVE_HIGH>, <&pioC 5 GPIO_ACTIVE_LOW>, <0>, <0>;
	status = "okay";
};

&usart0 {
	pinctrl-0 =
		<&pinctrl_usart0
		 &pinctrl_usart0_rts
		 &pinctrl_usart0_cts
		 &pinctrl_usart0_dtr_dsr
		 &pinctrl_usart0_dcd
		 &pinctrl_usart0_ri>;
	status = "okay";
};

&usb0 {
	num-ports = <2>;
	status = "okay";
};

&usb1 {
	status = "okay";
};

&watchdog {
	status = "okay";
};


code:
// SPDX-License-Identifier: GPL-2.0-only
/*
 * at91-qil_a9260.dts - Device Tree file for Calao QIL A9260 board
 *
 * Copyright (C) 2011-2013 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
 */
/dts-v1/;
#include "at91sam9260.dtsi"
/ {
	model = "Calao QIL A9260";
	compatible = "calao,qil-a9260", "atmel,at91sam9260", "atmel,at91sam9";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	memory@20000000 {
		reg = <0x20000000 0x4000000>;
	};

	clocks {
		slow_xtal {
			clock-frequency = <32768>;
		};

		main_xtal {
			clock-frequency = <12000000>;
		};
	};

	ahb {
		apb {
			tcb0: timer@fffa0000 {
				timer@0 {
					compatible = "atmel,tcb-timer";
					reg = <0>, <1>;
				};

				timer@2 {
					compatible = "atmel,tcb-timer";
					reg = <2>;
				};
			};

			usb1: gadget@fffa4000 {
				atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
				status = "okay";
			};

			mmc0: mmc@fffa8000 {
				pinctrl-0 = <
					&pinctrl_mmc0_clk
					&pinctrl_mmc0_slot0_cmd_dat0
					&pinctrl_mmc0_slot0_dat1_3>;
				pinctrl-names = "default";
				status = "okay";
				slot@0 {
					reg = <0>;
					bus-width = <4>;
				};
			};

			usart0: serial@fffb0000 {
				pinctrl-0 =
					<&pinctrl_usart0
					 &pinctrl_usart0_rts
					 &pinctrl_usart0_cts
					 &pinctrl_usart0_dtr_dsr
					 &pinctrl_usart0_dcd
					 &pinctrl_usart0_ri>;
				status = "okay";
			};

			usart1: serial@fffb4000 {
				pinctrl-0 =
					<&pinctrl_usart1
					 &pinctrl_usart1_rts
					 &pinctrl_usart1_cts>;
				status = "okay";
			};

			usart2: serial@fffb8000 {
				pinctrl-0 =
					<&pinctrl_usart2
					 &pinctrl_usart2_rts
					 &pinctrl_usart2_cts>;
				status = "okay";
			};

			macb0: ethernet@fffc4000 {
				phy-mode = "rmii";
				status = "okay";
			};

			spi0: spi@fffc8000 {
				status = "okay";
				cs-gpios = <&pioA 3 GPIO_ACTIVE_HIGH>;

				m41t94@0 {
					compatible = "st,m41t94";
					reg = <0>;
					spi-max-frequency = <1000000>;
				};

			};

			dbgu: serial@fffff200 {
				status = "okay";
			};

			shdwc@fffffd10 {
				atmel,wakeup-counter = <10>;
				atmel,wakeup-rtt-timer;
			};
		};

		usb0: ohci@500000 {
			num-ports = <2>;
			status = "okay";
		};

		ebi: ebi@10000000 {
			status = "okay";

			nand_controller: nand-controller {
				status = "okay";
				pinctrl-0 = <&pinctrl_nand_cs &pinctrl_nand_rb>;
				pinctrl-names = "default";

				nand@3 {
					reg = <0x3 0x0 0x800000>;
					rb-gpios = <&pioC 13 GPIO_ACTIVE_HIGH>;
					cs-gpios = <&pioC 14 GPIO_ACTIVE_HIGH>;
					nand-bus-width = <8>;
					nand-ecc-mode = "soft";
					nand-on-flash-bbt;
					label = "atmel_nand";

					partitions {
						compatible = "fixed-partitions";
						#address-cells = <1>;
						#size-cells = <1>;

						at91bootstrap@0 {
							label = "at91bootstrap";
							reg = <0x0 0x20000>;
						};

						barebox@20000 {
							label = "barebox";
							reg = <0x20000 0x40000>;
						};

						bareboxenv@60000 {
							label = "bareboxenv";
							reg = <0x60000 0x20000>;
						};

						bareboxenv2@80000 {
							label = "bareboxenv2";
							reg = <0x80000 0x20000>;
						};

						oftree@a0000 {
							label = "oftree";
							reg = <0xa0000 0x20000>;
						};

						kernel@c0000 {
							label = "kernel";
							reg = <0xc0000 0x400000>;
						};

						rootfs@4c0000 {
							label = "rootfs";
							reg = <0x4c0000 0x7800000>;
						};

						data@7cc0000 {
							label = "data";
							reg = <0x7cc0000 0x8340000>;
						};
					};
				};
			};
		};
	};

	leds {
		compatible = "gpio-leds";

		user_led {
			label = "user_led";
			gpios = <&pioB 21 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
		};
	};

	gpio_keys {
		compatible = "gpio-keys";

		button-user {
			label = "user_pb";
			gpios = <&pioB 10 GPIO_ACTIVE_LOW>;
			linux,code = <28>;
			wakeup-source;
		};
	};

	i2c-gpio-0 {
		status = "okay";
	};
};