xref: /linux/scripts/dtc/include-prefixes/arm64/mediatek/pumpkin-common.dtsi (revision 509438336ce75c8b4e6ce8e8d507dc77d0783bdd)
19983822cSFabien Parent// SPDX-License-Identifier: GPL-2.0
29983822cSFabien Parent/*
39983822cSFabien Parent * Copyright (c) 2019 BayLibre, SAS.
49983822cSFabien Parent * Author: Fabien Parent <fparent@baylibre.com>
59983822cSFabien Parent */
69983822cSFabien Parent
79983822cSFabien Parent#include <dt-bindings/gpio/gpio.h>
89983822cSFabien Parent
99983822cSFabien Parent/ {
109983822cSFabien Parent	aliases {
119983822cSFabien Parent		serial0 = &uart0;
12b3f5758fSBartosz Golaszewski		ethernet0 = &ethernet;
139983822cSFabien Parent	};
149983822cSFabien Parent
159983822cSFabien Parent	chosen {
169983822cSFabien Parent		stdout-path = "serial0:921600n8";
179983822cSFabien Parent	};
189983822cSFabien Parent
199983822cSFabien Parent	firmware {
20*50943833SAngeloGioacchino Del Regno		optee: optee {
219983822cSFabien Parent			compatible = "linaro,optee-tz";
229983822cSFabien Parent			method = "smc";
239983822cSFabien Parent		};
249983822cSFabien Parent	};
259983822cSFabien Parent
269983822cSFabien Parent	gpio-keys {
279983822cSFabien Parent		compatible = "gpio-keys";
289983822cSFabien Parent		pinctrl-names = "default";
299983822cSFabien Parent		pinctrl-0 = <&gpio_keys_default>;
309983822cSFabien Parent
31335d1603SKrzysztof Kozlowski		key-volume-up {
329983822cSFabien Parent			gpios = <&pio 42 GPIO_ACTIVE_LOW>;
339983822cSFabien Parent			label = "volume_up";
349983822cSFabien Parent			linux,code = <115>;
359983822cSFabien Parent			wakeup-source;
369983822cSFabien Parent			debounce-interval = <15>;
379983822cSFabien Parent		};
389983822cSFabien Parent
39335d1603SKrzysztof Kozlowski		key-volume-down {
409983822cSFabien Parent			gpios = <&pio 43 GPIO_ACTIVE_LOW>;
419983822cSFabien Parent			label = "volume_down";
429983822cSFabien Parent			linux,code = <114>;
439983822cSFabien Parent			wakeup-source;
449983822cSFabien Parent			debounce-interval = <15>;
459983822cSFabien Parent		};
469983822cSFabien Parent	};
479983822cSFabien Parent};
489983822cSFabien Parent
499983822cSFabien Parent&i2c0 {
509983822cSFabien Parent	clock-div = <2>;
519983822cSFabien Parent	pinctrl-names = "default";
529983822cSFabien Parent	pinctrl-0 = <&i2c0_pins_a>;
539983822cSFabien Parent	status = "okay";
549983822cSFabien Parent
559983822cSFabien Parent	tca6416: gpio@20 {
569983822cSFabien Parent		compatible = "ti,tca6416";
579983822cSFabien Parent		reg = <0x20>;
58a7dceafeSFabien Parent		reset-gpios = <&pio 65 GPIO_ACTIVE_LOW>;
599983822cSFabien Parent		pinctrl-names = "default";
609983822cSFabien Parent		pinctrl-0 = <&tca6416_pins>;
619983822cSFabien Parent
629983822cSFabien Parent		gpio-controller;
639983822cSFabien Parent		#gpio-cells = <2>;
649983822cSFabien Parent
6587e218aeSKrzysztof Kozlowski		eint20-mux-sel0-hog {
669983822cSFabien Parent			gpio-hog;
679983822cSFabien Parent			gpios = <0 0>;
689983822cSFabien Parent			input;
699983822cSFabien Parent			line-name = "eint20_mux_sel0";
709983822cSFabien Parent		};
719983822cSFabien Parent
7287e218aeSKrzysztof Kozlowski		expcon-mux-sel1-hog {
739983822cSFabien Parent			gpio-hog;
749983822cSFabien Parent			gpios = <1 0>;
759983822cSFabien Parent			input;
769983822cSFabien Parent			line-name = "expcon_mux_sel1";
779983822cSFabien Parent		};
789983822cSFabien Parent
7987e218aeSKrzysztof Kozlowski		mrg-di-mux-sel2-hog {
809983822cSFabien Parent			gpio-hog;
819983822cSFabien Parent			gpios = <2 0>;
829983822cSFabien Parent			input;
839983822cSFabien Parent			line-name = "mrg_di_mux_sel2";
849983822cSFabien Parent		};
859983822cSFabien Parent
8687e218aeSKrzysztof Kozlowski		sd-sdio-mux-sel3-hog {
879983822cSFabien Parent			gpio-hog;
889983822cSFabien Parent			gpios = <3 0>;
899983822cSFabien Parent			input;
909983822cSFabien Parent			line-name = "sd_sdio_mux_sel3";
919983822cSFabien Parent		};
929983822cSFabien Parent
9387e218aeSKrzysztof Kozlowski		sd-sdio-mux-ctrl7-hog {
949983822cSFabien Parent			gpio-hog;
959983822cSFabien Parent			gpios = <7 0>;
969983822cSFabien Parent			output-low;
979983822cSFabien Parent			line-name = "sd_sdio_mux_ctrl7";
989983822cSFabien Parent		};
999983822cSFabien Parent
10087e218aeSKrzysztof Kozlowski		hw-id0-hog {
1019983822cSFabien Parent			gpio-hog;
1029983822cSFabien Parent			gpios = <8 0>;
1039983822cSFabien Parent			input;
1049983822cSFabien Parent			line-name = "hw_id0";
1059983822cSFabien Parent		};
1069983822cSFabien Parent
10787e218aeSKrzysztof Kozlowski		hw-id1-hog {
1089983822cSFabien Parent			gpio-hog;
1099983822cSFabien Parent			gpios = <9 0>;
1109983822cSFabien Parent			input;
1119983822cSFabien Parent			line-name = "hw_id1";
1129983822cSFabien Parent		};
1139983822cSFabien Parent
11487e218aeSKrzysztof Kozlowski		hw-id2-hog {
1159983822cSFabien Parent			gpio-hog;
1169983822cSFabien Parent			gpios = <10 0>;
1179983822cSFabien Parent			input;
1189983822cSFabien Parent			line-name = "hw_id2";
1199983822cSFabien Parent		};
1209983822cSFabien Parent
12187e218aeSKrzysztof Kozlowski		fg-int-n-hog {
1229983822cSFabien Parent			gpio-hog;
1239983822cSFabien Parent			gpios = <11 0>;
1249983822cSFabien Parent			input;
1259983822cSFabien Parent			line-name = "fg_int_n";
1269983822cSFabien Parent		};
1279983822cSFabien Parent
12887e218aeSKrzysztof Kozlowski		usba-pwr-en-hog {
1299983822cSFabien Parent			gpio-hog;
1309983822cSFabien Parent			gpios = <12 0>;
1319983822cSFabien Parent			output-high;
1329983822cSFabien Parent			line-name = "usba_pwr_en";
1339983822cSFabien Parent		};
1349983822cSFabien Parent
13587e218aeSKrzysztof Kozlowski		wifi-3v3-pg-hog {
1369983822cSFabien Parent			gpio-hog;
1379983822cSFabien Parent			gpios = <13 0>;
1389983822cSFabien Parent			input;
1399983822cSFabien Parent			line-name = "wifi_3v3_pg";
1409983822cSFabien Parent		};
1419983822cSFabien Parent
14287e218aeSKrzysztof Kozlowski		cam-rst-hog {
1439983822cSFabien Parent			gpio-hog;
1449983822cSFabien Parent			gpios = <14 0>;
1459983822cSFabien Parent			output-low;
1469983822cSFabien Parent			line-name = "cam_rst";
1479983822cSFabien Parent		};
1489983822cSFabien Parent
14987e218aeSKrzysztof Kozlowski		cam-pwdn-hog {
1509983822cSFabien Parent			gpio-hog;
1519983822cSFabien Parent			gpios = <15 0>;
1529983822cSFabien Parent			output-low;
1539983822cSFabien Parent			line-name = "cam_pwdn";
1549983822cSFabien Parent		};
1559983822cSFabien Parent	};
1569983822cSFabien Parent};
1579983822cSFabien Parent
1589983822cSFabien Parent&i2c2 {
1599983822cSFabien Parent	clock-div = <2>;
1609983822cSFabien Parent	pinctrl-names = "default";
1619983822cSFabien Parent	pinctrl-0 = <&i2c2_pins_a>;
1629983822cSFabien Parent	status = "okay";
1639983822cSFabien Parent};
1649983822cSFabien Parent
1659983822cSFabien Parent&uart0 {
1669983822cSFabien Parent	status = "okay";
1679983822cSFabien Parent};
1689983822cSFabien Parent
1694e4ad686SBartosz Golaszewski&ethernet {
1704e4ad686SBartosz Golaszewski	pinctrl-names = "default";
1714e4ad686SBartosz Golaszewski	pinctrl-0 = <&ethernet_pins_default>;
1724e4ad686SBartosz Golaszewski	phy-handle = <&eth_phy>;
1734e4ad686SBartosz Golaszewski	phy-mode = "rmii";
1744e4ad686SBartosz Golaszewski	mac-address = [00 00 00 00 00 00];
1754e4ad686SBartosz Golaszewski	status = "okay";
1764e4ad686SBartosz Golaszewski
1774e4ad686SBartosz Golaszewski	mdio {
1784e4ad686SBartosz Golaszewski		#address-cells = <1>;
1794e4ad686SBartosz Golaszewski		#size-cells = <0>;
1804e4ad686SBartosz Golaszewski
1814e4ad686SBartosz Golaszewski		eth_phy: ethernet-phy@0 {
1824e4ad686SBartosz Golaszewski			reg = <0>;
1834e4ad686SBartosz Golaszewski		};
1844e4ad686SBartosz Golaszewski	};
1854e4ad686SBartosz Golaszewski};
1864e4ad686SBartosz Golaszewski
1879983822cSFabien Parent&usb0 {
1889983822cSFabien Parent	status = "okay";
1899983822cSFabien Parent	dr_mode = "peripheral";
19086c5ed12SChunfeng Yun	usb-role-switch;
1919983822cSFabien Parent
1929983822cSFabien Parent	usb_con: connector {
1939983822cSFabien Parent		compatible = "usb-c-connector";
1949983822cSFabien Parent		label = "USB-C";
1959983822cSFabien Parent	};
1969983822cSFabien Parent};
1979983822cSFabien Parent
1985fae2710SFabien Parent&usb_phy {
1999983822cSFabien Parent	status = "okay";
2009983822cSFabien Parent};
2019983822cSFabien Parent
2029983822cSFabien Parent&pio {
2039983822cSFabien Parent	gpio_keys_default: gpiodefault {
2049983822cSFabien Parent		pins_cmd_dat {
2059983822cSFabien Parent			pinmux = <MT8516_PIN_42_KPCOL0__FUNC_GPIO42>,
2069983822cSFabien Parent				 <MT8516_PIN_43_KPCOL1__FUNC_GPIO43>;
2079983822cSFabien Parent			bias-pull-up;
2089983822cSFabien Parent			input-enable;
2099983822cSFabien Parent		};
2109983822cSFabien Parent	};
2119983822cSFabien Parent
212*50943833SAngeloGioacchino Del Regno	i2c0_pins_a: i2c0 {
2139983822cSFabien Parent		pins1 {
2149983822cSFabien Parent			pinmux = <MT8516_PIN_58_SDA0__FUNC_SDA0_0>,
2159983822cSFabien Parent				 <MT8516_PIN_59_SCL0__FUNC_SCL0_0>;
2169983822cSFabien Parent			bias-disable;
2179983822cSFabien Parent		};
2189983822cSFabien Parent	};
2199983822cSFabien Parent
220*50943833SAngeloGioacchino Del Regno	i2c2_pins_a: i2c2 {
2219983822cSFabien Parent		pins1 {
2229983822cSFabien Parent			pinmux = <MT8516_PIN_60_SDA2__FUNC_SDA2_0>,
2239983822cSFabien Parent				 <MT8516_PIN_61_SCL2__FUNC_SCL2_0>;
2249983822cSFabien Parent			bias-disable;
2259983822cSFabien Parent		};
2269983822cSFabien Parent	};
2279983822cSFabien Parent
2289983822cSFabien Parent	tca6416_pins: pinmux_tca6416_pins {
2299983822cSFabien Parent		gpio_mux_rst_n_pin {
2309983822cSFabien Parent			pinmux = <MT8516_PIN_65_UTXD1__FUNC_GPIO65>;
2319983822cSFabien Parent			output-high;
2329983822cSFabien Parent		};
2339983822cSFabien Parent
2349983822cSFabien Parent		gpio_mux_int_n_pin {
2359983822cSFabien Parent			pinmux = <MT8516_PIN_64_URXD1__FUNC_GPIO64>;
2369983822cSFabien Parent			input-enable;
2379983822cSFabien Parent			bias-pull-up;
2389983822cSFabien Parent		};
2399983822cSFabien Parent	};
2407c20f7f3SBartosz Golaszewski
2417c20f7f3SBartosz Golaszewski	ethernet_pins_default: ethernet {
2427c20f7f3SBartosz Golaszewski		pins_ethernet {
2437c20f7f3SBartosz Golaszewski			pinmux = <MT8516_PIN_0_EINT0__FUNC_EXT_TXD0>,
2447c20f7f3SBartosz Golaszewski				 <MT8516_PIN_1_EINT1__FUNC_EXT_TXD1>,
2457c20f7f3SBartosz Golaszewski				 <MT8516_PIN_5_EINT5__FUNC_EXT_RXER>,
2467c20f7f3SBartosz Golaszewski				 <MT8516_PIN_6_EINT6__FUNC_EXT_RXC>,
2477c20f7f3SBartosz Golaszewski				 <MT8516_PIN_7_EINT7__FUNC_EXT_RXDV>,
2487c20f7f3SBartosz Golaszewski				 <MT8516_PIN_8_EINT8__FUNC_EXT_RXD0>,
2497c20f7f3SBartosz Golaszewski				 <MT8516_PIN_9_EINT9__FUNC_EXT_RXD1>,
2507c20f7f3SBartosz Golaszewski				 <MT8516_PIN_12_EINT12__FUNC_EXT_TXEN>,
2517c20f7f3SBartosz Golaszewski				 <MT8516_PIN_38_MRG_DI__FUNC_EXT_MDIO>,
2527c20f7f3SBartosz Golaszewski				 <MT8516_PIN_39_MRG_DO__FUNC_EXT_MDC>;
2537c20f7f3SBartosz Golaszewski		};
2547c20f7f3SBartosz Golaszewski	};
2559983822cSFabien Parent};
256