arm64: dts: mediatek: enable i2c0 for mt8365-evk board
authorAlexandre Mergnat <amergnat@baylibre.com>
Tue, 28 Mar 2023 09:04:48 +0000 (11:04 +0200)
committerMatthias Brugger <matthias.bgg@gmail.com>
Thu, 30 Mar 2023 17:13:22 +0000 (19:13 +0200)
Enable the I2C0 bus provides communication with:
- The integrated RT9466 Switching Battery Charger.
- The integrated MT6691 LP4X buck for VDDQ.
- The integrated MT6691 LP4X buck for VDD2.
- The pin header, to plug external I2C devices.

Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20221122-mt8365-i2c-support-v6-2-e1009c8afd53@baylibre.com
[mb: move bias-pull-up below pinmux]
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
arch/arm64/boot/dts/mediatek/mt8365-evk.dts

index 4683704..efbbdd0 100644 (file)
        };
 };
 
+&i2c0 {
+       clock-frequency = <100000>;
+       pinctrl-0 = <&i2c0_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
 &pio {
        gpio_keys: gpio-keys-pins {
                pins {
                };
        };
 
+       i2c0_pins: i2c0-pins {
+               pins {
+                       pinmux = <MT8365_PIN_57_SDA0__FUNC_SDA0_0>,
+                                <MT8365_PIN_58_SCL0__FUNC_SCL0_0>;
+                       bias-pull-up;
+               };
+       };
+
        uart0_pins: uart0-pins {
                pins {
                        pinmux = <MT8365_PIN_35_URXD0__FUNC_URXD0>,