Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // SPDX-License-Identifier: GPL-2.0-only
- /*
- * Copyright (C) 2015 Robert Nelson
- * Copyright (C) 2019 Amilcar Lucas
- */
- /dts-v1/;
- /plugin/;
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/pinctrl/am33xx.h>
- /*
- * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/
- */
- &{/chosen} {
- overlays {
- BBORG_RELAY-00A2.kernel = __TIMESTAMP__;
- };
- };
- /*
- * Free up the pins used by the cape from the pinmux helpers.
- */
- &ocp {
- P9_41_pinmux { status = "disabled"; }; /* P9_41: gpmc_a0.gpio0_20 */
- P9_42_pinmux { status = "disabled"; }; /* P9_42: gpmc_a1.gpio0_07 */
- P9_30_pinmux { status = "disabled"; }; /* P9_30: gpmc_be1n.gpio3_16 */
- P9_27_pinmux { status = "disabled"; }; /* P9_27: mcasp0_fsr.gpio3_19 */
- };
- &am33xx_pinmux {
- bb_gpio_relay_pins: pinmux_bb_gpio_relay_pins {
- pinctrl-single,pins = <
- 0x1B4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P9_41: gpmc_a0.gpio0_20 */
- 0x164 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P9_42: gpmc_a1.gpio0_07 */
- 0x198 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P9_30: gpmc_be1n.gpio3_16 */
- 0x1A4 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P9_27: mcasp0_fsr.gpio3_19 */
- >;
- };
- };
- &{/} {
- leds {
- pinctrl-names = "default";
- pinctrl-0 = <&bb_gpio_relay_pins>;
- compatible = "gpio-leds";
- jp@1 {
- label = "relay-jp1";
- gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
- default-state = "keep";
- };
- jp@2 {
- label = "relay-jp2";
- gpios = <&gpio0 07 GPIO_ACTIVE_HIGH>;
- default-state = "keep";
- };
- jp@3 {
- label = "relay-jp3";
- gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
- default-state = "keep";
- };
- jp@4 {
- label = "relay-jp4";
- gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
- default-state = "keep";
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement