/* * Copyright (C) 2017 Robert Nelson * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * https://www.mikroe.com/rtc-5-click * https://download.mikroe.com/documents/add-on-boards/click/rtc-5/rtc-5-click-manual-v100.pdf */ /dts-v1/; /plugin/; #include #include #include / { /* * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ */ fragment@0 { target-path="/"; __overlay__ { chosen { overlays { PB-SPI0-RTC-5-CLICK = __TIMESTAMP__; }; }; }; }; /* * Free up the pins used by the cape from the pinmux helpers. */ fragment@1 { target = <&ocp>; __overlay__ { P1_06_pinmux { status = "disabled"; }; P1_08_pinmux { status = "disabled"; }; P1_10_pinmux { status = "disabled"; }; P1_12_pinmux { status = "disabled"; }; P2_03_pinmux { status = "disabled"; }; }; }; fragment@2 { target-path="/"; __overlay__ { aliases { rtc0 = &extrtc; rtc1 = "/ocp/rtc@44e3e000"; }; }; }; fragment@3 { target = <&am33xx_pinmux>; __overlay__ { mcp79510_pins: pinmux_mcp79510_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x0824, PIN_INPUT | MUX_MODE7 ) /* (T10) gpmc_ad9.gpio0[23] MFP */ >; }; pb_spi0_pins: pinmux_pb_spi0_pins { pinctrl-single,pins = < AM33XX_IOPAD(0x0950, PIN_INPUT | MUX_MODE0 ) /* (A17) spi0_sclk.spi0_sclk */ AM33XX_IOPAD(0x0954, PIN_INPUT | MUX_MODE0 ) /* (B17) spi0_d0.spi0_d0 */ AM33XX_IOPAD(0x0958, PIN_INPUT | MUX_MODE0 ) /* (B16) spi0_d1.spi0_d1 */ AM33XX_IOPAD(0x095c, PIN_INPUT | MUX_MODE0 ) /* (A16) spi0_cs0.spi0_cs0 */ >; }; }; }; fragment@4 { target = <&spi0>; __overlay__ { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&pb_spi0_pins>; channel@0{ status = "disabled"; }; channel@1{ status = "disabled"; }; }; }; fragment@5 { target = <&spi0>; __overlay__ { #address-cells = <1>; #size-cells = <0>; extrtc: mcp795@0 { compatible = "maxim,mcp795"; pinctrl-names = "default"; pinctrl-0 = <&mcp79510_pins>; reg = <0x0>; spi-max-frequency = <12000000>; }; }; }; };