Loading Documentation/devicetree/bindings/gpio/gpio_atmel.txt +5 −0 Original line number Original line Diff line number Diff line Loading @@ -9,6 +9,10 @@ Required properties: unused). unused). - gpio-controller: Marks the device node as a GPIO controller. - gpio-controller: Marks the device node as a GPIO controller. optional properties: - #gpio-lines: Number of gpio if absent 32. Example: Example: pioA: gpio@fffff200 { pioA: gpio@fffff200 { compatible = "atmel,at91rm9200-gpio"; compatible = "atmel,at91rm9200-gpio"; Loading @@ -16,5 +20,6 @@ Example: interrupts = <2 4>; interrupts = <2 4>; #gpio-cells = <2>; #gpio-cells = <2>; gpio-controller; gpio-controller; #gpio-lines = <19>; }; }; Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt 0 → 100644 +136 −0 Original line number Original line Diff line number Diff line * Atmel AT91 Pinmux Controller The AT91 Pinmux Controler, enables the IC to share one PAD to several functional blocks. The sharing is done by multiplexing the PAD input/output signals. For each PAD there are up to 8 muxing options (called periph modes). Since different modules require different PAD settings (like pull up, keeper, etc) the contoller controls also the PAD settings parameters. Please refer to pinctrl-bindings.txt in this directory for details of the common pinctrl bindings used by client devices, including the meaning of the phrase "pin configuration node". Atmel AT91 pin configuration node is a node of a group of pins which can be used for a specific device or function. This node represents both mux and config of the pins in that group. The 'pins' selects the function mode(also named pin mode) this pin can work on and the 'config' configures various pad settings such as pull-up, multi drive, etc. Required properties for iomux controller: - compatible: "atmel,at91rm9200-pinctrl" - atmel,mux-mask: array of mask (periph per bank) to describe if a pin can be configured in this periph mode. All the periph and bank need to be describe. How to create such array: Each column will represent the possible peripheral of the pinctrl Each line will represent a pio bank Take an example on the 9260 Peripheral: 2 ( A and B) Bank: 3 (A, B and C) => /* A B */ 0xffffffff 0xffc00c3b /* pioA */ 0xffffffff 0x7fff3ccf /* pioB */ 0xffffffff 0x007fffff /* pioC */ For each peripheral/bank we will descibe in a u32 if a pin can can be configured in it by putting 1 to the pin bit (1 << pin) Let's take the pioA on peripheral B From the datasheet Table 10-2. Peripheral B PA0 MCDB0 PA1 MCCDB PA2 PA3 MCDB3 PA4 MCDB2 PA5 MCDB1 PA6 PA7 PA8 PA9 PA10 ETX2 PA11 ETX3 PA12 PA13 PA14 PA15 PA16 PA17 PA18 PA19 PA20 PA21 PA22 ETXER PA23 ETX2 PA24 ETX3 PA25 ERX2 PA26 ERX3 PA27 ERXCK PA28 ECRS PA29 ECOL PA30 RXD4 PA31 TXD4 => 0xffc00c3b Required properties for pin configuration node: - atmel,pins: 4 integers array, represents a group of pins mux and config setting. The format is atmel,pins = <PIN_BANK PIN_BANK_NUM PERIPH CONFIG>. The PERIPH 0 means gpio. Bits used for CONFIG: PULL_UP(1 << 0): indicate this pin need a pull up. MULTIDRIVE(1 << 1): indicate this pin need to be configured as multidrive. NOTE: Some requirements for using atmel,at91rm9200-pinctrl binding: 1. We have pin function node defined under at91 controller node to represent what pinmux functions this SoC supports. 2. The driver can use the function node's name and pin configuration node's name describe the pin function and group hierarchy. For example, Linux at91 pinctrl driver takes the function node's name as the function name and pin configuration node's name as group name to create the map table. 3. Each pin configuration node should have a phandle, devices can set pins configurations by referring to the phandle of that pin configuration node. 4. The gpio controller must be describe in the pinctrl simple-bus. Examples: pinctrl@fffff400 { #address-cells = <1>; #size-cells = <1>; ranges; compatible = "atmel,at91rm9200-pinctrl", "simple-bus"; reg = <0xfffff400 0x600>; atmel,mux-mask = < /* A B */ 0xffffffff 0xffc00c3b /* pioA */ 0xffffffff 0x7fff3ccf /* pioB */ 0xffffffff 0x007fffff /* pioC */ >; /* shared pinctrl settings */ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = <1 14 0x1 0x0 /* PB14 periph A */ 1 15 0x1 0x1>; /* PB15 periph with pullup */ }; }; }; dbgu: serial@fffff200 { compatible = "atmel,at91sam9260-usart"; reg = <0xfffff200 0x200>; interrupts = <1 4 7>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_dbgu>; status = "disabled"; }; MAINTAINERS +6 −0 Original line number Original line Diff line number Diff line Loading @@ -5639,6 +5639,12 @@ S: Maintained F: drivers/pinctrl/ F: drivers/pinctrl/ F: include/linux/pinctrl/ F: include/linux/pinctrl/ PIN CONTROLLER - ATMEL AT91 M: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained F: drivers/pinctrl/pinctrl-at91.c PIN CONTROLLER - ST SPEAR PIN CONTROLLER - ST SPEAR M: Viresh Kumar <viresh.linux@gmail.com> M: Viresh Kumar <viresh.linux@gmail.com> L: spear-devel@list.st.com L: spear-devel@list.st.com Loading arch/arm/Kconfig +2 −0 Original line number Original line Diff line number Diff line Loading @@ -330,6 +330,8 @@ config ARCH_AT91 select IRQ_DOMAIN select IRQ_DOMAIN select NEED_MACH_GPIO_H select NEED_MACH_GPIO_H select NEED_MACH_IO_H if PCCARD select NEED_MACH_IO_H if PCCARD select PINCTRL select PINCTRL_AT91 if USE_OF help help This enables support for systems based on Atmel This enables support for systems based on Atmel AT91RM9200 and AT91SAM9* processors. AT91RM9200 and AT91SAM9* processors. Loading arch/arm/boot/dts/Makefile +28 −16 Original line number Original line Diff line number Diff line ifeq ($(CONFIG_OF),y) ifeq ($(CONFIG_OF),y) dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb \ # Keep at91 dtb files sorted alphabetically for each SoC at91sam9263ek.dtb \ # sam9260 at91sam9g20ek_2mmc.dtb \ dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb at91sam9g20ek.dtb \ dtb-$(CONFIG_ARCH_AT91) += ethernut5.dtb at91sam9g25ek.dtb \ dtb-$(CONFIG_ARCH_AT91) += evk-pro3.dtb at91sam9m10g45ek.dtb \ dtb-$(CONFIG_ARCH_AT91) += tny_a9260.dtb at91sam9n12ek.dtb \ dtb-$(CONFIG_ARCH_AT91) += usb_a9260.dtb ethernut5.dtb \ # sam9263 evk-pro3.dtb \ dtb-$(CONFIG_ARCH_AT91) += at91sam9263ek.dtb kizbox.dtb \ dtb-$(CONFIG_ARCH_AT91) += tny_a9263.dtb tny_a9260.dtb \ dtb-$(CONFIG_ARCH_AT91) += usb_a9263.dtb tny_a9263.dtb \ # sam9g20 tny_a9g20.dtb \ dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek.dtb usb_a9260.dtb \ dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek_2mmc.dtb usb_a9263.dtb \ dtb-$(CONFIG_ARCH_AT91) += kizbox.dtb usb_a9g20.dtb dtb-$(CONFIG_ARCH_AT91) += tny_a9g20.dtb dtb-$(CONFIG_ARCH_AT91) += usb_a9g20.dtb # sam9g45 dtb-$(CONFIG_ARCH_AT91) += at91sam9m10g45ek.dtb # sam9n12 dtb-$(CONFIG_ARCH_AT91) += at91sam9n12ek.dtb # sam9x5 dtb-$(CONFIG_ARCH_AT91) += at91sam9g15ek.dtb dtb-$(CONFIG_ARCH_AT91) += at91sam9g25ek.dtb dtb-$(CONFIG_ARCH_AT91) += at91sam9g35ek.dtb dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ dove-cubox.dtb \ dove-cubox.dtb \ Loading Loading
Documentation/devicetree/bindings/gpio/gpio_atmel.txt +5 −0 Original line number Original line Diff line number Diff line Loading @@ -9,6 +9,10 @@ Required properties: unused). unused). - gpio-controller: Marks the device node as a GPIO controller. - gpio-controller: Marks the device node as a GPIO controller. optional properties: - #gpio-lines: Number of gpio if absent 32. Example: Example: pioA: gpio@fffff200 { pioA: gpio@fffff200 { compatible = "atmel,at91rm9200-gpio"; compatible = "atmel,at91rm9200-gpio"; Loading @@ -16,5 +20,6 @@ Example: interrupts = <2 4>; interrupts = <2 4>; #gpio-cells = <2>; #gpio-cells = <2>; gpio-controller; gpio-controller; #gpio-lines = <19>; }; };
Documentation/devicetree/bindings/pinctrl/atmel,at91-pinctrl.txt 0 → 100644 +136 −0 Original line number Original line Diff line number Diff line * Atmel AT91 Pinmux Controller The AT91 Pinmux Controler, enables the IC to share one PAD to several functional blocks. The sharing is done by multiplexing the PAD input/output signals. For each PAD there are up to 8 muxing options (called periph modes). Since different modules require different PAD settings (like pull up, keeper, etc) the contoller controls also the PAD settings parameters. Please refer to pinctrl-bindings.txt in this directory for details of the common pinctrl bindings used by client devices, including the meaning of the phrase "pin configuration node". Atmel AT91 pin configuration node is a node of a group of pins which can be used for a specific device or function. This node represents both mux and config of the pins in that group. The 'pins' selects the function mode(also named pin mode) this pin can work on and the 'config' configures various pad settings such as pull-up, multi drive, etc. Required properties for iomux controller: - compatible: "atmel,at91rm9200-pinctrl" - atmel,mux-mask: array of mask (periph per bank) to describe if a pin can be configured in this periph mode. All the periph and bank need to be describe. How to create such array: Each column will represent the possible peripheral of the pinctrl Each line will represent a pio bank Take an example on the 9260 Peripheral: 2 ( A and B) Bank: 3 (A, B and C) => /* A B */ 0xffffffff 0xffc00c3b /* pioA */ 0xffffffff 0x7fff3ccf /* pioB */ 0xffffffff 0x007fffff /* pioC */ For each peripheral/bank we will descibe in a u32 if a pin can can be configured in it by putting 1 to the pin bit (1 << pin) Let's take the pioA on peripheral B From the datasheet Table 10-2. Peripheral B PA0 MCDB0 PA1 MCCDB PA2 PA3 MCDB3 PA4 MCDB2 PA5 MCDB1 PA6 PA7 PA8 PA9 PA10 ETX2 PA11 ETX3 PA12 PA13 PA14 PA15 PA16 PA17 PA18 PA19 PA20 PA21 PA22 ETXER PA23 ETX2 PA24 ETX3 PA25 ERX2 PA26 ERX3 PA27 ERXCK PA28 ECRS PA29 ECOL PA30 RXD4 PA31 TXD4 => 0xffc00c3b Required properties for pin configuration node: - atmel,pins: 4 integers array, represents a group of pins mux and config setting. The format is atmel,pins = <PIN_BANK PIN_BANK_NUM PERIPH CONFIG>. The PERIPH 0 means gpio. Bits used for CONFIG: PULL_UP(1 << 0): indicate this pin need a pull up. MULTIDRIVE(1 << 1): indicate this pin need to be configured as multidrive. NOTE: Some requirements for using atmel,at91rm9200-pinctrl binding: 1. We have pin function node defined under at91 controller node to represent what pinmux functions this SoC supports. 2. The driver can use the function node's name and pin configuration node's name describe the pin function and group hierarchy. For example, Linux at91 pinctrl driver takes the function node's name as the function name and pin configuration node's name as group name to create the map table. 3. Each pin configuration node should have a phandle, devices can set pins configurations by referring to the phandle of that pin configuration node. 4. The gpio controller must be describe in the pinctrl simple-bus. Examples: pinctrl@fffff400 { #address-cells = <1>; #size-cells = <1>; ranges; compatible = "atmel,at91rm9200-pinctrl", "simple-bus"; reg = <0xfffff400 0x600>; atmel,mux-mask = < /* A B */ 0xffffffff 0xffc00c3b /* pioA */ 0xffffffff 0x7fff3ccf /* pioB */ 0xffffffff 0x007fffff /* pioC */ >; /* shared pinctrl settings */ dbgu { pinctrl_dbgu: dbgu-0 { atmel,pins = <1 14 0x1 0x0 /* PB14 periph A */ 1 15 0x1 0x1>; /* PB15 periph with pullup */ }; }; }; dbgu: serial@fffff200 { compatible = "atmel,at91sam9260-usart"; reg = <0xfffff200 0x200>; interrupts = <1 4 7>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_dbgu>; status = "disabled"; };
MAINTAINERS +6 −0 Original line number Original line Diff line number Diff line Loading @@ -5639,6 +5639,12 @@ S: Maintained F: drivers/pinctrl/ F: drivers/pinctrl/ F: include/linux/pinctrl/ F: include/linux/pinctrl/ PIN CONTROLLER - ATMEL AT91 M: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained F: drivers/pinctrl/pinctrl-at91.c PIN CONTROLLER - ST SPEAR PIN CONTROLLER - ST SPEAR M: Viresh Kumar <viresh.linux@gmail.com> M: Viresh Kumar <viresh.linux@gmail.com> L: spear-devel@list.st.com L: spear-devel@list.st.com Loading
arch/arm/Kconfig +2 −0 Original line number Original line Diff line number Diff line Loading @@ -330,6 +330,8 @@ config ARCH_AT91 select IRQ_DOMAIN select IRQ_DOMAIN select NEED_MACH_GPIO_H select NEED_MACH_GPIO_H select NEED_MACH_IO_H if PCCARD select NEED_MACH_IO_H if PCCARD select PINCTRL select PINCTRL_AT91 if USE_OF help help This enables support for systems based on Atmel This enables support for systems based on Atmel AT91RM9200 and AT91SAM9* processors. AT91RM9200 and AT91SAM9* processors. Loading
arch/arm/boot/dts/Makefile +28 −16 Original line number Original line Diff line number Diff line ifeq ($(CONFIG_OF),y) ifeq ($(CONFIG_OF),y) dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb \ # Keep at91 dtb files sorted alphabetically for each SoC at91sam9263ek.dtb \ # sam9260 at91sam9g20ek_2mmc.dtb \ dtb-$(CONFIG_ARCH_AT91) += aks-cdu.dtb at91sam9g20ek.dtb \ dtb-$(CONFIG_ARCH_AT91) += ethernut5.dtb at91sam9g25ek.dtb \ dtb-$(CONFIG_ARCH_AT91) += evk-pro3.dtb at91sam9m10g45ek.dtb \ dtb-$(CONFIG_ARCH_AT91) += tny_a9260.dtb at91sam9n12ek.dtb \ dtb-$(CONFIG_ARCH_AT91) += usb_a9260.dtb ethernut5.dtb \ # sam9263 evk-pro3.dtb \ dtb-$(CONFIG_ARCH_AT91) += at91sam9263ek.dtb kizbox.dtb \ dtb-$(CONFIG_ARCH_AT91) += tny_a9263.dtb tny_a9260.dtb \ dtb-$(CONFIG_ARCH_AT91) += usb_a9263.dtb tny_a9263.dtb \ # sam9g20 tny_a9g20.dtb \ dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek.dtb usb_a9260.dtb \ dtb-$(CONFIG_ARCH_AT91) += at91sam9g20ek_2mmc.dtb usb_a9263.dtb \ dtb-$(CONFIG_ARCH_AT91) += kizbox.dtb usb_a9g20.dtb dtb-$(CONFIG_ARCH_AT91) += tny_a9g20.dtb dtb-$(CONFIG_ARCH_AT91) += usb_a9g20.dtb # sam9g45 dtb-$(CONFIG_ARCH_AT91) += at91sam9m10g45ek.dtb # sam9n12 dtb-$(CONFIG_ARCH_AT91) += at91sam9n12ek.dtb # sam9x5 dtb-$(CONFIG_ARCH_AT91) += at91sam9g15ek.dtb dtb-$(CONFIG_ARCH_AT91) += at91sam9g25ek.dtb dtb-$(CONFIG_ARCH_AT91) += at91sam9g35ek.dtb dtb-$(CONFIG_ARCH_AT91) += at91sam9x25ek.dtb dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb dtb-$(CONFIG_ARCH_BCM2835) += bcm2835-rpi-b.dtb dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ dtb-$(CONFIG_ARCH_DOVE) += dove-cm-a510.dtb \ dove-cubox.dtb \ dove-cubox.dtb \ Loading