Permalink
Browse files

am335x-bone-common: config-pin: carve out P9.19/P9.20

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information...
RobertCNelson committed Oct 27, 2017
1 parent a68cdf8 commit 4d26e0ad5d7c09c052f9518aa1a580046a304c4e
Showing with 105 additions and 7 deletions.
  1. +105 −7 arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -84,12 +84,12 @@
>;
};
i2c2_pins: pinmux_i2c2_pins {
pinctrl-single,pins = <
AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_ctsn.i2c2_sda */
AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_rtsn.i2c2_scl */
>;
};
// i2c2_pins: pinmux_i2c2_pins {
// pinctrl-single,pins = <
// AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_ctsn.i2c2_sda */
// AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3) /* uart1_rtsn.i2c2_scl */
// >;
// };
uart0_pins: pinmux_uart0_pins {
pinctrl-single,pins = <
@@ -176,6 +176,46 @@
AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
>;
};
/* P9_19 (ZCZ ball D17) i2c */
P9_19_default_pin: pinmux_P9_19_default_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x097c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE3) >; }; /* uart1_rtsn.i2c2_scl */
P9_19_gpio_pin: pinmux_P9_19_gpio_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x097c, PIN_OUTPUT | INPUT_EN | MUX_MODE7) >; }; /* uart1_rtsn.gpio0_13 */
P9_19_gpio_pu_pin: pinmux_P9_19_gpio_pu_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x097c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) >; }; /* uart1_rtsn.gpio0_13 */
P9_19_gpio_pd_pin: pinmux_P9_19_gpio_pd_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x097c, PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE7) >; }; /* uart1_rtsn.gpio0_13 */
P9_19_spi_cs_pin: pinmux_P9_19_spi_cs_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x097c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE4) >; }; /* uart1_rtsn.spi1_cs1 */
P9_19_i2c_pin: pinmux_P9_19_i2c_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x097c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE3) >; }; /* uart1_rtsn.i2c2_scl */
P9_19_can_pin: pinmux_P9_19_can_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x097c, PIN_INPUT_PULLUP | MUX_MODE2) >; }; /* uart1_rtsn.dcan0_rx */
P9_19_pru_uart_pin: pinmux_P9_19_pru_uart_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x097c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE5) >; }; /* uart1_rtsn.pr1_uart0_rts_n */
P9_19_timer_pin: pinmux_P9_19_timer_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x097c, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE1) >; }; /* uart1_rtsn.timer5 */
/* P9_20 (ZCZ ball D18) i2c */
P9_20_default_pin: pinmux_P9_20_default_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x0978, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE3) >; }; /* uart1_ctsn.i2c2_sda */
P9_20_gpio_pin: pinmux_P9_20_gpio_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x0978, PIN_OUTPUT | INPUT_EN | MUX_MODE7) >; }; /* uart1_ctsn.gpio0_12 */
P9_20_gpio_pu_pin: pinmux_P9_20_gpio_pu_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x0978, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) >; }; /* uart1_ctsn.gpio0_12 */
P9_20_gpio_pd_pin: pinmux_P9_20_gpio_pd_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x0978, PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE7) >; }; /* uart1_ctsn.gpio0_12 */
P9_20_spi_cs_pin: pinmux_P9_20_spi_cs_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x0978, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE4) >; }; /* uart1_ctsn.spi1_cs0 */
P9_20_i2c_pin: pinmux_P9_20_i2c_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x0978, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE3) >; }; /* uart1_ctsn.i2c2_sda */
P9_20_can_pin: pinmux_P9_20_can_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x0978, PIN_INPUT_PULLUP | MUX_MODE2) >; }; /* uart1_ctsn.dcan0_tx */
P9_20_pru_uart_pin: pinmux_P9_20_pru_uart_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x0978, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE5) >; }; /* uart1_ctsn.pr1_uart0_cts_n */
P9_20_timer_pin: pinmux_P9_20_timer_pin { pinctrl-single,pins = <
AM33XX_IOPAD(0x0978, PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE1) >; }; /* uart1_ctsn.timer6 */
};
&uart0 {
@@ -240,7 +280,8 @@
&i2c2 {
pinctrl-names = "default";
pinctrl-0 = <&i2c2_pins>;
//pinctrl-0 = <&i2c2_pins>;
pinctrl-0 = <>;
status = "okay";
clock-frequency = <100000>;
@@ -456,3 +497,60 @@
};
};
};
&ocp {
/* P9_19 (ZCZ ball D17) i2c */
P9_19_pinmux {
compatible = "bone-pinmux-helper";
status = "okay";
pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "spi_cs", "can", "i2c", "pru_uart", "timer";
pinctrl-0 = <&P9_19_default_pin>;
pinctrl-1 = <&P9_19_gpio_pin>;
pinctrl-2 = <&P9_19_gpio_pu_pin>;
pinctrl-3 = <&P9_19_gpio_pd_pin>;
pinctrl-4 = <&P9_19_spi_cs_pin>;
pinctrl-5 = <&P9_19_can_pin>;
pinctrl-6 = <&P9_19_i2c_pin>;
pinctrl-7 = <&P9_19_pru_uart_pin>;
pinctrl-8 = <&P9_19_timer_pin>;
};
/* P9_20 (ZCZ ball D18) i2c */
P9_20_pinmux {
compatible = "bone-pinmux-helper";
status = "okay";
pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "spi_cs", "can", "i2c", "pru_uart", "timer";
pinctrl-0 = <&P9_20_default_pin>;
pinctrl-1 = <&P9_20_gpio_pin>;
pinctrl-2 = <&P9_20_gpio_pu_pin>;
pinctrl-3 = <&P9_20_gpio_pd_pin>;
pinctrl-4 = <&P9_20_spi_cs_pin>;
pinctrl-5 = <&P9_20_can_pin>;
pinctrl-6 = <&P9_20_i2c_pin>;
pinctrl-7 = <&P9_20_pru_uart_pin>;
pinctrl-8 = <&P9_20_timer_pin>;
};
cape-universal {
compatible = "gpio-of-helper";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <>;
P9_19 {
gpio-name = "P9_19";
gpio = <&gpio0 13 0>;
input;
dir-changeable;
};
P9_20 {
gpio-name = "P9_20";
gpio = <&gpio0 12 0>;
input;
dir-changeable;
};
};
};

0 comments on commit 4d26e0a

Please sign in to comment.