[PATCH 1/1] arm64: dts: meson: g12b: odroid-n2: Add I2C RTC device node

Neil Armstrong narmstrong at baylibre.com
Tue Feb 2 12:29:48 EST 2021


Hi,

On 02/02/2021 18:08, Alexander Stein wrote:
> This is taken from the downstream kernel and works out of the box.

Please keep authorship of the downstream commit.

> Similar to other boards, this RTC should be the primary one, rather than
> the internal one.
> 
> A wakeup alarm by writing to /sys/class/rtc/rtc0/wakealarm works as well.
> 
> Signed-off-by: Alexander Stein <alexander.stein at mailbox.org>
> ---
>  .../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi     | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
> index 050862cd0996..10edc7ce5e84 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
> @@ -13,6 +13,8 @@ / {
>  	aliases {
>  		serial0 = &uart_AO;
>  		ethernet0 = ðmac;
> +		rtc0 = &rtc;
> +		rtc1 = &vrtc;
>  	};
>  
>  	dioo2133: audio-amplifier-0 {
> @@ -471,6 +473,18 @@ hdmi_tx_tmds_out: endpoint {
>  	};
>  };
>  
> +&i2c3 {
> +	status = "okay";
> +	pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
> +	pinctrl-names = "default";
> +
> +	rtc: rtc at 51 {
> +		compatible = "nxp,pcf8563";
> +		reg = <0x51>;

Interrupt line is missing, Anand added:
+»       »       /*·RTC·INT·*/
+»       »       interrupts·=·<GPIOAO_7·IRQ_TYPE_LEVEL_LOW>;
+»       »       interrupt-parent·=·<&gpio_intc>;

> +		wakeup-source;
> +	};
> +};
> +
>  &ir {
>  	status = "okay";
>  	pinctrl-0 = <&remote_input_ao_pins>;
> 
Neil



More information about the linux-amlogic mailing list