Skip to content

Instantly share code, notes, and snippets.

@RobertCNelson
Last active July 28, 2022 21:38
Show Gist options
  • Select an option

  • Save RobertCNelson/ad1e65286796abd8b4886caf45b4646c to your computer and use it in GitHub Desktop.

Select an option

Save RobertCNelson/ad1e65286796abd8b4886caf45b4646c to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2015 Robert Nelson <[email protected]>
*/
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
/*
* Free up the pins used by the cape from the pinmux helpers.
*/
&ocp {
P9_12_pinmux { status = "disabled"; }; /* P9_12 (U18) gpmc_be1n.gpio1_28 */
};
&am33xx_pinmux {
bb_dht_pins: pinmux_bb_dht_pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_GPMC_BEN1, PIN_INPUT_PULLUP, MUX_MODE7) /* P9_12 (U18) gpmc_be1n.gpio1_28 */
>;
};
};
&{/} {
humidity_sensor {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bb_dht_pins>;
compatible = "dht11";
gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment