Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • RZ/G2H, G2M, G2N, G2E:
    • drivers/pinctrl/renesas/core.c, pinctrl.c, pfc-xxxx.c, etc... (refer to the Makefile)
    • CONFIG_PINCTRL_RENESAS=y
    • Documentation/devicetree/bindings/pinctrl/renesas,pcf.yaml
  • RZ/G2L, G2LC, G2UL:
  • RZ/V2L:
  • RZ/G3S: , V2L:
    • drivers/pinctrl/renesas/pinctrl-rzg2l.c
    • CONFIG_PINCTRL_RZG2L=y
    • Documentation/devicetree/bindings/pinctrl/renesas,rzg2l-pinctrl.yaml

...

  • (see device tree for evaluation board)
  • Use any GPIO as wake-up source, e.g. P37.2:


Expand
titleUse any GPIO as wake-up source, e.g. P37.2:

...

   gpio_keys {
        compatible = "gpio-keys";
        #address-cells = <1>;
        #size-cells = <0>;
        autorepeat;

        P37_2 {
            label = "GPIO Key WAKEUP";
            linux,code = <143>;
            wakeup-source;
            interrupt-parent = <&pinctrl>;
            interrupts = <RZG2L_GPIO(37, 2) IRQ_TYPE_EDGE_FALLING>;
            debounce-interval = <50>;
        };
    };


Expand
titleExample of defining a GPIO with pull-down
        test-gpio {
                gpio-hog;
                gpios = <RZG2L_GPIO(6, 0) (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>;
                input;
                line-name = "test_gpio";
        };


IRQ0-7

Linux Drivers

  • RZ/G2H, G2M, G2N, G2E:
    • CONFIG_xxx=y

...

Expand
titleExample of Parallel(RGB) Panel on RZ/G2L (5.10)
  • Please use kernel version 5.10.201-cip41+
  • Configure pins
&pinctrl {
	du_pins: du {
		data {
			pinmux = <RZG2L_PORT_PINMUX(7, 2, 1)>,
				 <RZG2L_PORT_PINMUX(8, 0, 1)>,
				 <RZG2L_PORT_PINMUX(8, 1, 1)>,
				 <RZG2L_PORT_PINMUX(8, 2, 1)>,
				 <RZG2L_PORT_PINMUX(9, 0, 1)>,
				 <RZG2L_PORT_PINMUX(9, 1, 1)>,
				 <RZG2L_PORT_PINMUX(10, 0, 1)>,
				 <RZG2L_PORT_PINMUX(10, 1, 1)>,
				 <RZG2L_PORT_PINMUX(11, 0, 1)>,
				 <RZG2L_PORT_PINMUX(11, 1, 1)>,
				 <RZG2L_PORT_PINMUX(12, 0, 1)>,
				 <RZG2L_PORT_PINMUX(12, 1, 1)>,
				 <RZG2L_PORT_PINMUX(13, 0, 1)>,
				 <RZG2L_PORT_PINMUX(13, 1, 1)>,
				 <RZG2L_PORT_PINMUX(13, 2, 1)>,
				 <RZG2L_PORT_PINMUX(14, 0, 1)>,
				 <RZG2L_PORT_PINMUX(14, 1, 1)>,
				 <RZG2L_PORT_PINMUX(15, 0, 1)>,
				 <RZG2L_PORT_PINMUX(15, 1, 1)>,
				 <RZG2L_PORT_PINMUX(16, 0, 1)>,
				 <RZG2L_PORT_PINMUX(16, 1, 1)>,
				 <RZG2L_PORT_PINMUX(17, 0, 1)>,
				 <RZG2L_PORT_PINMUX(17, 1, 1)>,
				 <RZG2L_PORT_PINMUX(17, 2, 1)>;
		};

		sync {
			pinmux = <RZG2L_PORT_PINMUX(6, 1, 1)>, /* HSYNC */
				 <RZG2L_PORT_PINMUX(7, 0, 1)>; /* VSYNC */
		};

		de {
			pinmux = <RZG2L_PORT_PINMUX(7, 1, 1)>; /* DE */
		};

		clk {
			pinmux = <RZG2L_PORT_PINMUX(6, 0, 1)>; /* CLK */
		};
	};
};
  • We want to use simple panel driver and add the device node
panel_rgb: panel-rgb {
      		compatible = "arm,rtsm-display"; //<-- this property "arm,rtsm-display" is an example.
                                             // please fill in the correct information based on your panel spec.
      		port {
        		panel_in_rgb: endpoint {
          					remote-endpoint = <&du_out_rgb>;
       			};
     		};
};
  • Add endpoint for DU RGB out:
&du {
	pinctrl-0 = <&du_pins>;
	pinctrl-names = "default";
	status = "okay";

	ports {
		port@0 {
			du_out_rgb: endpoint {
						remote-endpoint = <&panel_in_rgb>;
			};
		};
	};
};
  • We want the MIPI DSI driver disabled
&dsi0 {
	status = "disabled";
};

...

  • (see device tree for evaluation board)


I2C

Linux Drivers

  • RZ/G2H, G2M, G2N, G2E:
    • compatible = "renesas,rcar-gen3-i2c"
      • drivers/i2c/busses/i2c-rcar.c
      • CONFIG_I2C_RCAR=y
    • compatible = "renesas,rcar-gen3-iic" (I2C for PMIC)
      • drivers/i2c/busses/i2c-sh_mobile.c
      • CONFIG_I2C_SH_MOBILE=y
  • RZ/G2L, G2LC, G2UL, V2L:
    • drivers/i2c/busses/i2c-riic.c
    • CONFIG_I2C_RIIC=y

Notes

  • The frequency for the driver i2c-rcar.c is hard coded to 100kHz. If you want to change it, you have to modify function rcar_i2c_clock_calculate( )

Device Tree Examples

  • (see device tree for evaluation board)

SPI

Linux Drivers

  • MSIOF: RZ/G2H, G2M, G2N, G2E:
    • CONFIG_xxx=y
  • RSPI: RZ/G2L, G2LC, G2UL, V2L:
    • drivers/spi/spi-rspi.c
    • CONFIG_SPI_RSPI=y

...