599c376c49
Commit 7800064ba5
("ARM: dts: Add basic dm816x device tree
configuration") added basic devices for dm816x, but I was not able
to test the GPIO interrupts earlier until I found some suitable pins
to test with. We can mux the MMC card detect and write protect pins
from SD_SDCD and SD_SDWP mode to use a normal GPIO interrupts that
are also suitable for the MMC subsystem.
This turned out several issues that need to be fixed:
- I set the GPIO type wrong to be compatible with omap3 instead
of omap4. The GPIO controller on dm816x has EOI interrupt
register like omap4 and am335x.
- I got the GPIO interrupt numbers wrong as each bank has two
and we only use one. They need to be set up the same way as
on am335x.
- The gpio banks are missing interrupt controller related
properties.
With these changes the GPIO interrupts can be used with the
MMC card detect pin, so let's wire that up. Let's also mux all
the MMC lines for completeness while at it.
For the first GPIO bank I tested using GPMC lines temporarily
muxed to GPIOs on the dip switch 10.
Cc: Brian Hutchinson <b.hutchman@gmail.com>
Cc: Matthijs van Duin <matthijsvanduin@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
174 lines
3.9 KiB
Plaintext
174 lines
3.9 KiB
Plaintext
/*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
/dts-v1/;
|
|
|
|
#include "dm816x.dtsi"
|
|
|
|
/ {
|
|
model = "DM8168 EVM";
|
|
compatible = "ti,dm8168-evm", "ti,dm8168";
|
|
|
|
memory {
|
|
device_type = "memory";
|
|
reg = <0x80000000 0x40000000 /* 1 GB */
|
|
0xc0000000 0x40000000>; /* 1 GB */
|
|
};
|
|
|
|
/* FDC6331L controlled by SD_POW pin */
|
|
vmmcsd_fixed: fixedregulator@0 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vmmcsd_fixed";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
};
|
|
};
|
|
|
|
&dm816x_pinmux {
|
|
mcspi1_pins: pinmux_mcspi1_pins {
|
|
pinctrl-single,pins = <
|
|
DM816X_IOPAD(0x0a94, PIN_INPUT | MUX_MODE0) /* SPI_SCLK */
|
|
DM816X_IOPAD(0x0a98, PIN_OUTPUT | MUX_MODE0) /* SPI_SCS0 */
|
|
DM816X_IOPAD(0x0aa8, PIN_INPUT | MUX_MODE0) /* SPI_D0 */
|
|
DM816X_IOPAD(0x0aac, PIN_INPUT | MUX_MODE0) /* SPI_D1 */
|
|
>;
|
|
};
|
|
|
|
mmc_pins: pinmux_mmc_pins {
|
|
pinctrl-single,pins = <
|
|
DM816X_IOPAD(0x0a70, MUX_MODE0) /* SD_POW */
|
|
DM816X_IOPAD(0x0a74, MUX_MODE0) /* SD_CLK */
|
|
DM816X_IOPAD(0x0a78, MUX_MODE0) /* SD_CMD */
|
|
DM816X_IOPAD(0x0a7C, MUX_MODE0) /* SD_DAT0 */
|
|
DM816X_IOPAD(0x0a80, MUX_MODE0) /* SD_DAT1 */
|
|
DM816X_IOPAD(0x0a84, MUX_MODE0) /* SD_DAT2 */
|
|
DM816X_IOPAD(0x0a88, MUX_MODE0) /* SD_DAT2 */
|
|
DM816X_IOPAD(0x0a8c, MUX_MODE2) /* GP1[7] */
|
|
DM816X_IOPAD(0x0a90, MUX_MODE2) /* GP1[8] */
|
|
>;
|
|
};
|
|
|
|
usb0_pins: pinmux_usb0_pins {
|
|
pinctrl-single,pins = <
|
|
DM816X_IOPAD(0x0d00, MUX_MODE0) /* USB0_DRVVBUS */
|
|
>;
|
|
};
|
|
|
|
usb1_pins: pinmux_usb0_pins {
|
|
pinctrl-single,pins = <
|
|
DM816X_IOPAD(0x0d04, MUX_MODE0) /* USB1_DRVVBUS */
|
|
>;
|
|
};
|
|
};
|
|
|
|
&i2c1 {
|
|
extgpio0: pcf8575@20 {
|
|
compatible = "nxp,pcf8575";
|
|
reg = <0x20>;
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
};
|
|
};
|
|
|
|
&i2c2 {
|
|
extgpio1: pcf8575@20 {
|
|
compatible = "nxp,pcf8575";
|
|
reg = <0x20>;
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
};
|
|
};
|
|
|
|
&gpmc {
|
|
ranges = <0 0 0x04000000 0x01000000>; /* CS0: 16MB for NAND */
|
|
|
|
nand@0,0 {
|
|
linux,mtd-name= "micron,mt29f2g16aadwp";
|
|
reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
ti,nand-ecc-opt = "bch8";
|
|
nand-bus-width = <16>;
|
|
gpmc,device-width = <2>;
|
|
gpmc,sync-clk-ps = <0>;
|
|
gpmc,cs-on-ns = <0>;
|
|
gpmc,cs-rd-off-ns = <44>;
|
|
gpmc,cs-wr-off-ns = <44>;
|
|
gpmc,adv-on-ns = <6>;
|
|
gpmc,adv-rd-off-ns = <34>;
|
|
gpmc,adv-wr-off-ns = <44>;
|
|
gpmc,we-on-ns = <0>;
|
|
gpmc,we-off-ns = <40>;
|
|
gpmc,oe-on-ns = <0>;
|
|
gpmc,oe-off-ns = <54>;
|
|
gpmc,access-ns = <64>;
|
|
gpmc,rd-cycle-ns = <82>;
|
|
gpmc,wr-cycle-ns = <82>;
|
|
gpmc,wait-on-read = "true";
|
|
gpmc,wait-on-write = "true";
|
|
gpmc,bus-turnaround-ns = <0>;
|
|
gpmc,cycle2cycle-delay-ns = <0>;
|
|
gpmc,clk-activation-ns = <0>;
|
|
gpmc,wait-monitoring-ns = <0>;
|
|
gpmc,wr-access-ns = <40>;
|
|
gpmc,wr-data-mux-bus-ns = <0>;
|
|
partition@0 {
|
|
label = "X-Loader";
|
|
reg = <0 0x80000>;
|
|
};
|
|
partition@0x80000 {
|
|
label = "U-Boot";
|
|
reg = <0x80000 0x1c0000>;
|
|
};
|
|
partition@0x1c0000 {
|
|
label = "Environment";
|
|
reg = <0x240000 0x40000>;
|
|
};
|
|
partition@0x280000 {
|
|
label = "Kernel";
|
|
reg = <0x280000 0x500000>;
|
|
};
|
|
partition@0x780000 {
|
|
label = "Filesystem";
|
|
reg = <0x780000 0xf880000>;
|
|
};
|
|
};
|
|
};
|
|
|
|
&mcspi1 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&mcspi1_pins>;
|
|
|
|
m25p80@0 {
|
|
compatible = "w25x32";
|
|
spi-max-frequency = <48000000>;
|
|
reg = <0>;
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
};
|
|
};
|
|
|
|
&mmc1 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&mmc_pins>;
|
|
vmmc-supply = <&vmmcsd_fixed>;
|
|
bus-width = <4>;
|
|
cd-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
|
|
wp-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
/* At least dm8168-evm rev c won't support multipoint, later may */
|
|
&usb0 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&usb0_pins>;
|
|
mentor,multipoint = <0>;
|
|
};
|
|
|
|
&usb1 {
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&usb1_pins>;
|
|
mentor,multipoint = <0>;
|
|
};
|