3535
3636 P9_19_pinmux { status = "disabled"; }; /* i2c2.scl */
3737 P9_20_pinmux { status = "disabled"; }; /* i2c2.sda */
38- P8_10_pinmux { status = "disabled"; }; /* servo .enable */
38+ P8_10_pinmux { status = "disabled"; }; /* pca9685 .enable */
3939};
4040
4141&am33xx_pinmux {
4242
4343 bborg_servo_input_pins: pinmux_bborg_servo_input_pins {
4444 pinctrl-single,pins = <
45- BONE_P8_12 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P8_12: gpio1_12 */
46- BONE_P8_11 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P8_11: gpio1_13 */
47- BONE_P9_30 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P9_30: gpio3_16 */
48- BONE_P9_27 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P9_27: gpio3_19 */
49- BONE_P9_41 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P9_41: gpio3_20 */
50- BONE_P9_42 (PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* P9_42: gpio0_7 */
45+ BONE_P8_12 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* P8_12: gpio1_12 */
46+ BONE_P8_11 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* P8_11: gpio1_13 */
47+ BONE_P9_30 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* P9_30: gpio3_16 */
48+ BONE_P9_27 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* P9_27: gpio3_19 */
49+ BONE_P9_41 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* P9_41: gpio3_20 */
50+ BONE_P9_42 (PIN_INPUT_PULLDOWN | MUX_MODE7) /* P9_42: gpio0_7 */
5151 >;
5252 };
5353
5454
55- bborg_servo_pca9685_i2c_pins: bborg_servo_pca9685_i2c_pins {
55+ bborg_servo_pca9685_i2c_pins: pinmux_bborg_servo_pca9685_i2c_pins {
5656 pinctrl-single,pins = <
57- BONE_P9_19 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* P9_19: i2c2.scl */
58- BONE_P9_20 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* P9_20: i2c2.sda */
57+ BONE_P9_20 (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE3) /* P9_19: i2c2.sda */
58+ BONE_P9_19 (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE3) /* P9_20: i2c2.scl */
5959 >;
6060 };
6161
7575 #address-cells = <1>;
7676 #size-cells = <0>;
7777
78- pca9685_servo: pca9685_serve@7f {
79- compatible = "nxp, pca9685";
78+ pca: pca@70 {
79+ compatible = "nxp,pca9685-pwm";
80+ #pwm-cells = <16>;
81+ reg = <0x70>;
8082 lable = "pca9685_servo";
81- pinctrl-names = "default";
82- pinctrl-0 = <&bborg_servo_pca9685_en_pins>;
83- enable-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
84- reg = <0x7f>;
83+ /* invert; */
84+ /* open-drain; */
8585 };
8686};
8787
8888&{/} {
89- gpio_inputs {
90- compatible = "gpio-keys";
89+ leds {
9190 pinctrl-names = "default";
92- pinctrl-0 = <&bborg_servo_input_pins >;
91+ pinctrl-0 = <&bborg_servo_pca9685_en_pins >;
9392
94- input@1 {
95- lable = "in1";
96- gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
97- };
98- input@2 {
99- lable = "in2";
100- gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
101- };
102- input@3 {
103- lable = "in3";
104- gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
105- };
106- input@4 {
107- lable = "in4";
108- gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
109- };
110- input@5 {
111- lable = "in5";
112- gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
113- };
114- input@6 {
115- lable = "in6";
116- gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
93+ compatible = "gpio-leds";
94+
95+ pca9685-enable {
96+ label = "pca9685-enable";
97+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
98+ default-state = "on";
11799 };
118100 };
119101};
0 commit comments