Skip to content

Instantly share code, notes, and snippets.

@RobertCNelson
Last active January 19, 2023 14:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobertCNelson/168abeb4e44a39c11d9df18ecc31e811 to your computer and use it in GitHub Desktop.
Save RobertCNelson/168abeb4e44a39c11d9df18ecc31e811 to your computer and use it in GitHub Desktop.
/*
* Copyright (C) 2020 Robert Nelson <robertcnelson@gmail.com>
*
* 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.
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
/ {
/*
* Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
*/
fragment@0 {
target-path="/";
__overlay__ {
chosen {
overlays {
BB-P9_27-LED-00A0 = __TIMESTAMP__;
};
};
};
};
/*
* Free up the pins used by the cape from the pinmux helpers.
*/
fragment@1 {
target = <&ocp>;
__overlay__ {
P9_27_pinmux { status = "disabled"; }; /* P9_27: mcasp0_fsr.gpio3_19 */
P9_92_pinmux { status = "disabled"; };
};
};
fragment@2 {
target = <&am33xx_pinmux>;
__overlay__ {
bb_gpio_led_pins: pinmux_bb_gpio_led_pins {
pinctrl-single,pins = <
BONE_P9_27 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P9_27: mcasp0_fsr.gpio3_19 */
AM33XX_IOPAD(0x9a0, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (B12) mcasp0_aclkr.gpio3[18] */
>;
};
};
};
fragment@3 {
target-path="/";
__overlay__ {
leds {
pinctrl-names = "default";
pinctrl-0 = <&bb_gpio_led_pins>;
compatible = "gpio-leds";
P9_27 {
label = "P9_27";
gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
P114 {
label = "P114";
gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
};
};
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment