Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/riscv/boot/dts/microchip/mpfs-beaglev-fire.dts
51974 views
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2020-2021 Microchip Technology Inc */

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include "mpfs.dtsi"
#include "mpfs-beaglev-fire-fabric.dtsi"

/* Clock frequency (in Hz) of MTIMER */
#define MTIMER_FREQ		1000000

/ {
	#address-cells = <2>;
	#size-cells = <2>;
	model = "BeagleBoard BeagleV-Fire";
	compatible = "beagle,beaglev-fire", "microchip,mpfs";

	aliases {
		serial0 = &mmuart0;
		serial1 = &mmuart1;
		serial2 = &mmuart2;
		serial3 = &mmuart3;
		serial4 = &mmuart4;
	};

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

	cpus {
		timebase-frequency = <MTIMER_FREQ>;
	};

	ddrc_cache_lo: memory@80000000 {
		device_type = "memory";
		reg = <0x0 0x80000000 0x0 0x40000000>;
		status = "okay";
	};

	reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		hss: hss-buffer@103fc00000 {
			compatible = "shared-dma-pool";
			reg = <0x10 0x3fc00000 0x0 0x400000>;
			no-map;
		};
	};

	imx219_clk: camera-clk {
		compatible = "fixed-clock";
		#clock-cells = <0>;
		clock-frequency = <24000000>;
	};

	imx219_vana: fixedregulator-0 {
		compatible = "regulator-fixed";
		regulator-name = "imx219_vana";
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
	};

	imx219_vdig: fixedregulator-1 {
		compatible = "regulator-fixed";
		regulator-name = "imx219_vdig";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
	};

	imx219_vddl: fixedregulator-2 {
		compatible = "regulator-fixed";
		regulator-name = "imx219_vddl";
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <1200000>;
	};

};

&gpio0 {
	interrupts = <13>, <14>, <15>, <16>,
		     <17>, <18>, <19>, <20>,
		     <21>, <22>, <23>, <24>,
		     <25>, <26>;
	ngpios = <14>;
	status = "okay";
};

&gpio1 {
	interrupts = <27>, <28>, <29>, <30>,
		     <31>, <32>, <33>, <34>,
		     <35>, <36>, <37>, <38>,
		     <39>, <40>, <41>, <42>,
		     <43>, <44>, <45>, <46>,
		     <47>, <48>, <49>, <50>;
	ngpios = <24>;
	status = "okay";
};

&gpio2 {
	interrupts = <53>, <53>, <53>, <53>,
		     <53>, <53>, <53>, <53>,
		     <53>, <53>, <53>, <53>,
		     <53>, <53>, <53>, <53>,
		     <53>, <53>, <53>, <53>,
		     <53>, <53>, <53>, <53>,
		     <53>, <53>, <53>, <53>,
		     <53>, <53>, <53>, <53>;
	ngpios = <32>;
	gpio-line-names = "P8_PIN3_USER_LED_0", "P8_PIN4_USER_LED_1", "P8_PIN5_USER_LED_2",
			  "P8_PIN6_USER_LED_3", "P8_PIN7_USER_LED_4", "P8_PIN8_USER_LED_5",
			  "P8_PIN9_USER_LED_6", "P8_PIN10_USER_LED_7", "P8_PIN11_USER_LED_8",
			  "P8_PIN12_USER_LED_9", "P8_PIN13_USER_LED_10", "P8_PIN14_USER_LED_11",
			  "P8_PIN15", "P8_PIN16", "P8_PIN17", "P8_PIN18", "P8_PIN19", "P8_PIN20",
			  "P8_PIN21", "P8_PIN22", "P8_PIN23", "P8_PIN24", "P8_PIN25", "P8_PIN26",
			  "P8_PIN27", "P8_PIN28", "P8_PIN29", "P8_PIN30", "M2_W_DISABLE1",
			  "M2_W_DISABLE2", "VIO_ENABLE", "SD_DET";
	status = "okay";

	vio-enable-hog {
		gpio-hog;
		gpios = <30 30>;
		output-high;
		line-name = "VIO_ENABLE";
	};

	sd-det-hog {
		gpio-hog;
		gpios = <31 31>;
		input;
		line-name = "SD_DET";
	};
};

&i2c0 {
	status = "okay";
};

&i2c1 {
	status = "okay";

	eeprom: eeprom@50 {
		compatible = "atmel,24c32";
		reg = <0x50>;
	};

	imx219: sensor@10 {
		compatible = "sony,imx219";
		reg = <0x10>;
		clocks = <&imx219_clk>;
		VANA-supply = <&imx219_vana>;   /* 2.8v */
		VDIG-supply = <&imx219_vdig>;   /* 1.8v */
		VDDL-supply = <&imx219_vddl>;   /* 1.2v */

		port {
			imx219_0: endpoint {
				data-lanes = <1 2>;
				clock-noncontinuous;
				link-frequencies = /bits/ 64 <456000000>;
			};
		};
	};
};

&mac0 {
	status = "okay";
	phy-mode = "sgmii";
	phy-handle = <&phy0>;
	phy0: ethernet-phy@0 {
		reg = <0>;
	};
};

&mbox {
	status = "okay";
};

&mmc {
	bus-width = <4>;
	disable-wp;
	cap-sd-highspeed;
	cap-mmc-highspeed;
	mmc-ddr-1_8v;
	mmc-hs200-1_8v;
	sd-uhs-sdr12;
	sd-uhs-sdr25;
	sd-uhs-sdr50;
	sd-uhs-sdr104;
	status = "okay";
};

&mmuart0 {
	status = "okay";
};

&mmuart1 {
	status = "okay";
};

&refclk {
	clock-frequency = <125000000>;
};

&refclk_ccc {
	clock-frequency = <50000000>;
};

&rtc {
	status = "okay";
};

&spi0 {
	status = "okay";
};

&spi1 {
	status = "okay";
};

&qspi {
	status = "okay";
	cs-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>, <&gpio0 12 GPIO_ACTIVE_LOW>;
	num-cs = <2>;

	adc@0 {
		compatible = "microchip,mcp3464r";
		reg = <0>; /* CE0 */
		spi-cpol;
		spi-cpha;
		spi-max-frequency = <5000000>;
		microchip,hw-device-address = <1>;
		#address-cells = <1>;
		#size-cells = <0>;
		status = "okay";

		channel@0 {
			/* CH0 to AGND */
			reg = <0>;
			label = "CH0";
		};

		channel@1 {
			/* CH1 to AGND */
			reg = <1>;
			label = "CH1";
		};

		channel@2 {
			/* CH2 to AGND */
			reg = <2>;
			label = "CH2";
		};

		channel@3 {
			/* CH3 to AGND */
			reg = <3>;
			label = "CH3";
		};

		channel@4 {
			/* CH4 to AGND */
			reg = <4>;
			label = "CH4";
		};

		channel@5 {
			/* CH5 to AGND */
			reg = <5>;
			label = "CH5";
		};

		channel@6 {
			/* CH6 to AGND */
			reg = <6>;
			label = "CH6";
		};

		channel@7 {
			/* CH7 is connected to AGND */
			reg = <7>;
			label = "CH7";
		};
	};

	mmc@1 {
		compatible = "mmc-spi-slot";
		reg = <1>;
		gpios = <&gpio2 31 1>;
		voltage-ranges = <3300 3300>;
		spi-max-frequency = <5000000>;
		disable-wp;
	};
};


&syscontroller {
	microchip,bitstream-flash = <&sys_ctrl_flash>;
	status = "okay";
};

&syscontroller_qspi {
	status = "okay";

	sys_ctrl_flash: flash@0 { // MT25QL01GBBB8ESF-0SIT
		compatible = "jedec,spi-nor";
		#address-cells = <1>;
		#size-cells = <1>;
		spi-max-frequency = <20000000>;
		spi-rx-bus-width = <1>;
		reg = <0>;
	};
};

&usb {
	status = "okay";
	dr_mode = "otg";
};