// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (C) 2020 Marvell International Ltd.
 */

#include "arm64/marvell/cn9130-crb.dtsi"

/ {
	model = "Marvell Armada CN9130-CRB-A";

	chosen {
		infix {
			/* "admin" */
			factory-password-hash = "$5$mI/zpOAqZYKLC2WU$i7iPzZiIjOjrBF3NyftS9CCq8dfYwHwrmUK097Jca9A";
			usb-ports = <&cp0_usb3_1>;
			usb-port-names = "USB";
		};
	};
};

&cp0_pcie0 {
	status = "okay";
	num-lanes = <4>;
	num-viewport = <8>;
	/* Generic PHY, providing serdes lanes */
	phys = <&cp0_comphy0 0
		&cp0_comphy1 0
		&cp0_comphy2 0
		&cp0_comphy3 0>;
	iommu-map =
		<0x0   &smmu 0x480 0x20>,
		<0x100 &smmu 0x4a0 0x20>,
		<0x200 &smmu 0x4c0 0x20>;
	iommu-map-mask = <0x031f>;
};

&cp0_usb3_0 {
	status = "okay";
	usb-phy = <&cp0_usb3_0_phy0>;
	phy-names = "usb";
};

&cp0_usb3_1 {
	status = "okay";
	usb-phy = <&cp0_usb3_0_phy1>;
	phy-names = "usb";
};

&cp0_eth2 {
	status = "okay";
	phy-mode = "2500base-x";
};

&cp0_pinctrl {
        cp0_expander0_pins: cp0-expander-pins-0 {
                marvell,pins = "mpp39";
                marvell,function = "gpio";
        };
};

&expander0 {
        pinctrl-names = "default";
        pinctrl-0 = <&cp0_expander0_pins>;
        interrupt-parent = <&cp0_gpio2>;
        interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
        interrupt-controller;
        #interrupt-cells=<2>;
        microchip,irq-mirror;
};
