/* * Copyright (C) 2020 My-Custom-Overlay * Claude Sammut * */ /dts-v1/; /plugin/; #include #include / { compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green"; // identification part-number = "My-Custom-Overlay"; version = "00A0"; // resources this cape uses exclusive-use = "P9.18", // i2c1_sda "P9.17", // i2c1_scl "P8.19", // CAN0 Enable "P8.09", // CAN1 Enable // hardware ips used "i2c1", "gpio0_22", "gpio2_5"; /* * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ */ fragment@0 { target-path="/"; __overlay__ { chosen { overlays { My-Custom-Overlay-00A0 = __TIMESTAMP__; }; }; aliases { rtc0 = &extrtc; rtc1 = "/ocp/rtc@44e3e000"; }; }; }; /* * Free up the pins used by the cape from the pinmux helpers. */ fragment@1 { target = <&ocp>; __overlay__ { P9_17_pinmux { status = "disabled"; }; /* i2c1_scl */ P9_18_pinmux { status = "disabled"; }; /* i2c1_sda */ P8_19_pinmux { status = "disabled"; }; P8_9_pinmux { status = "disabled"; }; }; }; fragment@2 { target = <&am33xx_pinmux>; __overlay__ { bb_i2c1_pins: pinmux_bb_i2c1_pins { pinctrl-single,pins = < BONE_P9_18 0x72 /* spi0_d1.i2c1_sda, SLEWCTRL_SLOW | INPUT_PULLUP | MODE2 */ BONE_P9_17 0x72 /* spi0_cs0.i2c1_scl, SLEWCTRL_SLOW | INPUT_PULLUP | MODE2 */ >; }; bb_gpio0_22_pins: pinmux_bb_gpio0_22_pins { pinctrl-single,pins = < /*0x020 0x07 BONE_P8_19 (PIN_OUTPUT_PULLUP | MUX_MODE7) /* P8_19: gpmc_ad8.gpio0_22 */ BONE_P8_19 0x07 >; }; bb_gpio2_5_pins: pinmux_bb_gpio2_5_pins { pinctrl-single,pins = < /*0x09c 0x07 BONE_P8_09 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P8_19: gpmc_ad8.gpio0_22 */ BONE_P8_09 0x07 >; }; }; }; fragment@3 { target = <&i2c1>; __overlay__ { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&bb_i2c1_pins>; /* this is the configuration part */ clock-frequency = <100000>; #address-cells = <1>; #size-cells = <0>; extrtc: ds1672@68 { compatible = "dallas,ds1672"; reg = <0x68>; /* ds1672 has a fixed I2C addr */ }; eeprom: eeprom@50 { compatible = "atmel,24c256","microchip,24lc256"; reg = <0x50>; pagesize = <64>; #address-cells = <1>; #size-cells = <1>; }; }; }; fragment@4 { target = <&ocp>; __overlay__ { P8_19_pinmux { compatible = "bone-pinmux-helper"; pinctrl-names = "default"; pinctrl-0 = <&bb_gpio0_22_pins>; status = "okay"; }; }; }; fragment@5 { target = <&ocp>; __overlay__ { P8_09_pinmux { compatible = "bone-pinmux-helper"; pinctrl-names = "default"; pinctrl-0 = <&bb_gpio2_5_pins>; status = "okay"; }; }; }; };