Commit d82b3562 authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Matthias Brugger

arm64: dts: mediatek: cherry: Enable I2C and SPI controllers

This platform uses eight I2C controllers and one SPI controller:
in preparation for enabling devices attached to these controllers,
add basic configuration to enable the busses.
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: default avatarNícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20220704101321.44835-8-angelogioacchino.delregno@collabora.comSigned-off-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
parent 5bf7dabe
...@@ -9,6 +9,13 @@ ...@@ -9,6 +9,13 @@
/ { / {
aliases { aliases {
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
i2c3 = &i2c3;
i2c4 = &i2c4;
i2c5 = &i2c5;
i2c7 = &i2c7;
mmc0 = &mmc0; mmc0 = &mmc0;
serial0 = &uart0; serial0 = &uart0;
}; };
...@@ -90,6 +97,63 @@ ppvar_sys: regulator-ppvar-sys { ...@@ -90,6 +97,63 @@ ppvar_sys: regulator-ppvar-sys {
}; };
}; };
&i2c0 {
status = "okay";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
};
&i2c1 {
status = "okay";
clock-frequency = <400000>;
i2c-scl-internal-delay-ns = <12500>;
pinctrl-names = "default";
pinctrl-0 = <&i2c1_pins>;
};
&i2c2 {
status = "okay";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins>;
};
&i2c3 {
status = "okay";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c3_pins>;
};
&i2c4 {
status = "okay";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c4_pins>;
};
&i2c5 {
status = "okay";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c5_pins>;
};
&i2c7 {
status = "okay";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c7_pins>;
};
&mmc0 { &mmc0 {
status = "okay"; status = "okay";
...@@ -302,6 +366,68 @@ &pio { ...@@ -302,6 +366,68 @@ &pio {
"AP_SPI_FLASH_MOSI", "AP_SPI_FLASH_MOSI",
"AP_SPI_FLASH_MISO"; "AP_SPI_FLASH_MISO";
i2c0_pins: i2c0-default-pins {
pins-bus {
pinmux = <PINMUX_GPIO8__FUNC_SDA0>,
<PINMUX_GPIO9__FUNC_SCL0>;
bias-disable;
drive-strength-microamp = <1000>;
};
};
i2c1_pins: i2c1-default-pins {
pins-bus {
pinmux = <PINMUX_GPIO10__FUNC_SDA1>,
<PINMUX_GPIO11__FUNC_SCL1>;
bias-pull-up = <1000>;
drive-strength-microamp = <1000>;
};
};
i2c2_pins: i2c2-default-pins {
pins-bus {
pinmux = <PINMUX_GPIO12__FUNC_SDA2>,
<PINMUX_GPIO13__FUNC_SCL2>;
bias-disable;
drive-strength-microamp = <1000>;
};
};
i2c3_pins: i2c3-default-pins {
pins-bus {
pinmux = <PINMUX_GPIO14__FUNC_SDA3>,
<PINMUX_GPIO15__FUNC_SCL3>;
bias-pull-up = <1000>;
drive-strength-microamp = <1000>;
};
};
i2c4_pins: i2c4-default-pins {
pins-bus {
pinmux = <PINMUX_GPIO16__FUNC_SDA4>,
<PINMUX_GPIO17__FUNC_SCL4>;
bias-pull-up = <1000>;
drive-strength = <4>;
};
};
i2c5_pins: i2c5-default-pins {
pins-bus {
pinmux = <PINMUX_GPIO29__FUNC_SCL5>,
<PINMUX_GPIO30__FUNC_SDA5>;
bias-disable;
drive-strength-microamp = <1000>;
};
};
i2c7_pins: i2c7-default-pins {
pins-bus {
pinmux = <PINMUX_GPIO27__FUNC_SCL7>,
<PINMUX_GPIO28__FUNC_SDA7>;
bias-disable;
};
};
mmc0_pins_default: mmc0-default-pins { mmc0_pins_default: mmc0-default-pins {
pins-cmd-dat { pins-cmd-dat {
pinmux = <PINMUX_GPIO126__FUNC_MSDC0_DAT0>, pinmux = <PINMUX_GPIO126__FUNC_MSDC0_DAT0>,
...@@ -409,12 +535,34 @@ pins-low-power-pupd { ...@@ -409,12 +535,34 @@ pins-low-power-pupd {
bias-pull-down = <MTK_PUPD_SET_R1R0_01>; bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
}; };
}; };
spi0_pins: spi0-default-pins {
pins-cs-mosi-clk {
pinmux = <PINMUX_GPIO132__FUNC_SPIM0_CSB>,
<PINMUX_GPIO134__FUNC_SPIM0_MO>,
<PINMUX_GPIO133__FUNC_SPIM0_CLK>;
bias-disable;
};
pins-miso {
pinmux = <PINMUX_GPIO135__FUNC_SPIM0_MI>;
bias-pull-down;
};
};
}; };
&pmic { &pmic {
interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>; interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
}; };
&spi0 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
mediatek,pad-select = <0>;
};
&uart0 { &uart0 {
status = "okay"; status = "okay";
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment