ARM: dts: rskrza1: Add I2C support
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 20 Mar 2019 19:44:09 +0000 (20:44 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Wed, 27 Mar 2019 12:07:31 +0000 (13:07 +0100)
Enable the I2C bus, and add the following devices:
  - Two CAT9554 port expanders (8 GPIOs, interrupt not wired by
    default),
  - R1EX24016ASAS0A EEPROM.

The bus also contains a MAX9856 Audio Codec, which is not yet supported.

All devices (incl. the audio codec) are documented to support an I2C bus
running at 400 kHz.

Pinctrl is based on the RZ/A BSP.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/r7s72100-rskrza1.dts

index 8ee44a100e9a44c41737a1697b0950c6e4001030..60e80ecbbf6826bcf9cda889ee569dd441a7260c 100644 (file)
        clock-frequency = <13330000>;
 };
 
+&i2c3 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c3_pins>;
+       status = "okay";
+
+       clock-frequency = <400000>;
+
+       io_expander1: gpio@20 {
+               compatible = "onnn,cat9554";
+               reg = <0x20>;
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       io_expander2: gpio@21 {
+               compatible = "onnn,cat9554";
+               reg = <0x21>;
+               gpio-controller;
+               #gpio-cells = <2>;
+       };
+
+       eeprom@50 {
+               compatible = "renesas,r1ex24016", "atmel,24c16";
+               reg = <0x50>;
+               pagesize = <16>;
+       };
+};
+
 &usb_x1_clk {
        clock-frequency = <48000000>;
 };
 };
 
 &pinctrl {
+       /* RIIC ch3 (Port Expander, EEPROM (MAC Addr), Audio Codec) */
+       i2c3_pins: i2c3 {
+               pinmux = <RZA1_PINMUX(1, 6, 1)>,        /* RIIC3SCL */
+                        <RZA1_PINMUX(1, 7, 1)>;        /* RIIC3SDA */
+       };
 
        /* Serial Console */
        scif2_pins: serial2 {