Add device tree data for AM33XX devices
cover Add device tree data for AM33XX devices
Add pinctrl and d_can device tree data to AM33XX family of devices. First two patches add support for pinctrl DT data and rest adds dcan DT data.
Reason behind combining these patches is to apply cleanly on linux-omap devel-dt tree because these are sequential patches.
These patches were tested on AM335x-Bone and AM335x-EVM apply on linux-omap:devel-dt tree with this patch
http://lkml.org/lkml/2012/8/15/106
AnilKumar Ch (4):
arm/dts: AM33XX: Add basic pinctrl device tree data arm/dts: AM33XX: Configure pinmuxs for user leds control on Bone arm/dts: AM33XX: Configure pinmuxs for D_CAN1 on AM335x-EVM arm/dts: AM33XX: Add D_CAN device tree data
arch/arm/boot/dts/am335x-bone.dts | 14 ++++++++++++++ arch/arm/boot/dts/am335x-evm.dts | 16 ++++++++++++++++ arch/arm/boot/dts/am33xx.dtsi | 27 +++++++++++++++++++++++++++ 3 files changed, 57 insertions(+)
Signature · 1 line
1.7.9.5
PATCH v4 1/4 arm/dts: AM33XX: Add basic pinctrl device tree data
Adds basic pinctrl device tree data for AM33XX family of devices. This patch is based on the pinctrl-single driver.
---
Changes from v3:
- Updated the reg length based on latest AM335x TRM.
Changes from v2:
- user led pinmux comments updated according to Tony's comment.
Changes from v1:
- Rebased the patches based on latest pinctrl-single driver
arch/arm/boot/dts/am33xx.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm/boot/dts/am33xx.dtsi +9 -0
@@ -40,6 +40,15 @@ }; }; + am3358_pinmux: pinmux at 44E10800 { + compatible = "pinctrl-single"; + reg = <0x44E10800 0x0238>; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-single,register-width = <32>; + pinctrl-single,function-mask = <0x7F>; + }; + /* * XXX: Use a flat representation of the AM33XX interconnect. * The real AM33XX interconnect network is quite complex.Since
Signature · 1 line
1.7.9.5
PATCH v4 2/4 arm/dts: AM33XX: Configure pinmuxs for user leds control on Bone
In reply to AnilKumar ChAdds GPIO pinctrl nodes to am3358_pinmux master node to control user leds (USR0, USR1, USR2 and USR3) present on BeagleBone.
--- arch/arm/boot/dts/am335x-bone.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/am335x-bone.dts +14 -0
@@ -18,6 +18,20 @@ reg = <0x80000000 0x10000000>; /* 256 MB */ }; + am3358_pinmux: pinmux at 44E10800 { + pinctrl-names = "default"; + pinctrl-0 = <&userled_pins>; + + userled_pins: pinmux_userled_pins { + pinctrl-single,pins = < + 0x54 0x7 /* gpmc_a5.gpio1_21, OUTPUT | MODE7 */ + 0x58 0x17 /* gpmc_a6.gpio1_22, OUTPUT_PULLUP | MODE7 */ + 0x5C 0x7 /* gpmc_a7.gpio1_23, OUTPUT | MODE7 */ + 0x60 0x17 /* gpmc_a8.gpio1_24, OUTPUT_PULLUP | MODE7 */ + >; + }; + }; + ocp { uart1: serial at 44E09000 { status = "okay";
Signature · 1 line
1.7.9.5
PATCH v3 3/4 arm/dts: AM33XX: Configure pinmuxs for D_CAN1 on AM335x-EVM
In reply to AnilKumar ChAdd D_CAN1 pinctrl node to am3358_pinmux master node to export D_CAN functionality on AM335x EVM according to pinctrl-single driver.
---
Changes from v2:
- Incorporated Vaibhav H's comments on v2
* Added dcan0 instances to am33xx.dtsi file
Changes from v1:
- These two patches separated from c_can DT support patch series.
arch/arm/boot/dts/am335x-evm.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +12 -0
@@ -18,6 +18,18 @@ reg = <0x80000000 0x10000000>; /* 256 MB */ }; + am3358_pinmux: pinmux at 44E10800 { + pinctrl-names = "default"; + pinctrl-0 = <&d_can1_pins>; + + d_can1_pins: pinmux_d_can_pins { + pinctrl-single,pins = < + 0x168 0x2 /* uart0_ctsn.d_can1_tx, OUTPUT | MODE2 */ + 0x16C 0x32 /* uart0_rtsn.d_can1_rx, INPUT_PULLUP | MODE2 */ + >; + }; + }; + ocp { uart1: serial at 44E09000 { status = "okay";
Signature · 1 line
1.7.9.5
PATCH v3 3/4 arm/dts: AM33XX: Configure pinmuxs for D_CAN1 on AM335x-EVM
Quoted 22 lines · AnilKumar Ch
Add
D_CAN1pinctrl node toam3358_pinmuxmaster node to exportD_CANfunctionality on AM335x EVM according to pinctrl-single driver.Signed-off-by AnilKumar Ch <[email protected]>---
Changes from v2:
- Incorporated Vaibhav H's comments on v2
* Added dcan0 instances toam33xx.dtsifileChanges from v1:
- These two patches separated fromc_canDT support patch series.arch/arm/boot/dts/am335x-evm.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)arch/arm/boot/dts/am335x-evm.dts +0
-0
arch/arm/boot/dts/am335x-evm.dts line 21
Quoted 4 lines
arch/arm/boot/dts/am335x-evm.dts +1
-0@@ -18,6 +18,18 @@ reg = <0x80000000 0x10000000>; /* 256 MB */ }; + am3358_pinmux: pinmux at 44E10800 {
This should be just &am3358_pinmux as you already include it.
arch/arm/boot/dts/am335x-evm.dts line 32
Quoted 11 lines
arch/arm/boot/dts/am335x-evm.dts +11
-0+ pinctrl-names = "default"; + pinctrl-0 = <&d_can1_pins>; + + d_can1_pins: pinmux_d_can_pins { + pinctrl-single,pins = < + 0x168 0x2 /* uart0_ctsn.d_can1_tx, OUTPUT | MODE2 */ + 0x16C 0x32 /* uart0_rtsn.d_can1_rx, INPUT_PULLUP | MODE2 */ + >; + }; + }; +
It would better to claim these pins in the dcan driver entry rather than set them as pins enabled by the pinctrl driver. The reason is that in case you want to enable runtime PM related stuff, like some more advanced wake-up features, for the rx pin you can do it in the driver.
Then one nit.. Please lowercase all hex number in this series as that's the style here.
Regards,
Tony
PATCH v3 3/4 arm/dts: AM33XX: Configure pinmuxs for D_CAN1 on AM335x-EVM
Quoted 26 lines · Tony Lindgren
Quoted 25 lines · AnilKumar Ch
Add
D_CAN1pinctrl node toam3358_pinmuxmaster node to exportD_CANfunctionality on AM335x EVM according to pinctrl-single driver.Signed-off-by AnilKumar Ch <[email protected]>---
Changes from v2:
- Incorporated Vaibhav H's comments on v2
* Added dcan0 instances toam33xx.dtsifileChanges from v1:
- These two patches separated fromc_canDT support patch series.arch/arm/boot/dts/am335x-evm.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)arch/arm/boot/dts/am335x-evm.dts +0
-0@@ -18,6 +18,18 @@ reg = <0x80000000 0x10000000>; /* 256 MB */ };
Quoted 4 lines
arch/arm/boot/dts/am335x-evm.dts line 21
Quoted 1 line
arch/arm/boot/dts/am335x-evm.dts +1
-0+ am3358_pinmux: pinmux at 44E10800 {This should be just
&am3358_pinmuxas you already include it.
I think it won't work this way, it will result into syntax error. The reason being is, unlike OMAP (and like other platforms, like, imx) here we are again representing device hierarchy starting from root,
am335x-evm.dts:
/ {
ocp {
...
};};
Although I am not too familiar with DTS compiler, but below code results in syntax error:
am335x-evm.dts:
/ {
ocp {
...
&am3358_pinmux {
...
};
};};
Thanks,
Vaibhav
Quoted 29 lines
arch/arm/boot/dts/am335x-evm.dts line 32
Quoted 11 lines
arch/arm/boot/dts/am335x-evm.dts +11
-0+ pinctrl-names = "default"; + pinctrl-0 = <&d_can1_pins>; + + d_can1_pins: pinmux_d_can_pins { + pinctrl-single,pins = < + 0x168 0x2 /* uart0_ctsn.d_can1_tx, OUTPUT | MODE2 */ + 0x16C 0x32 /* uart0_rtsn.d_can1_rx, INPUT_PULLUP | MODE2 */ + >; + }; + }; +It would better to claim these pins in the dcan driver entry rather than set them as pins enabled by the pinctrl driver. The reason is that in case you want to enable runtime PM related stuff, like some more advanced wake-up features, for the rx pin you can do it in the driver.
Then one nit.. Please lowercase all hex number in this series as that's the style here.
Regards,
Tony
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss at lists.ozlabs.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
PATCH v3 4/4 arm/dts: AM33XX: Add D_CAN device tree data
In reply to AnilKumar ChAdd Bosch D_CAN controller device tree data to AM33XX dtsi file by adding d_can device nodes with all the necessary parameters.
--- arch/arm/boot/dts/am335x-evm.dts | 4 ++++ arch/arm/boot/dts/am33xx.dtsi | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+)
arch/arm/boot/dts/am335x-evm.dts +4 -0
@@ -34,5 +34,9 @@ uart1: serial at 44E09000 { status = "okay"; }; + + dcan1: d_can at 481D0000 { + status = "okay"; + }; }; };
arch/arm/boot/dts/am33xx.dtsi +18 -0
@@ -177,5 +177,23 @@ compatible = "ti,omap3-wdt"; ti,hwmods = "wd_timer2"; }; + + dcan0: d_can at 481CC000 { + compatible = "bosch,d_can"; + ti,hwmods = "d_can0"; + reg = <0x481CC000 0x2000>; + interrupts = <52>; + interrupt-parent = <&intc>; + status = "disabled"; + }; + + dcan1: d_can at 481D0000 { + compatible = "bosch,d_can"; + ti,hwmods = "d_can1"; + reg = <0x481D0000 0x2000>; + interrupts = <55>; + interrupt-parent = <&intc>; + status = "disabled"; + }; }; };
Signature · 1 line
1.7.9.5