diff --git a/arch/arm/boot/dts/ariag25.dts b/arch/arm/boot/dts/ariag25.dts index 89dd6dd..9357f19 100644 --- a/arch/arm/boot/dts/ariag25.dts +++ b/arch/arm/boot/dts/ariag25.dts @@ -1,7 +1,7 @@ /* * ariag25.dts - Device Tree file for Acme Systems Aria G25 (AT91SAM9G25 based) * Compile with dtc in folder: - * 'dtc -O dtb -o ariag25.dtb ariag25.dts' [dpg 20121230] + * 'dtc -O dtb -o ariag25.dtb ariag25.dts' [dpg 20130114] * * N.B. The 'interrupts' entry explained in: * /Documentation/devicetree/bindings/arm/atmel-aic.txt @@ -18,7 +18,7 @@ aliases { serial4 = &usart3; serial5 = &uart0; - serial6 = &uart1; + /* serial6 = &uart1; */ }; chosen { @@ -42,6 +42,64 @@ ahb { apb { + + pinctrl@fffff400 { + spi0 { + pinctrl_spi0_miso_mosi_spck: spi0_miso_mosi_spck-0 { + atmel,pins = + <0 11 0x1 0x0 /* PA11 periph A */ + 0 12 0x1 0x0 /* PA12 periph A */ + 0 13 0x1 0x0>; /* PA13 periph A */ + }; + pinctrl_spi0_cs0: spi0_cs0-0 { + atmel,pins = + <0 14 0x1 0x0>; /* PA14 periph A */ + }; + pinctrl_spi0_cs1: spi0_cs1-0 { + atmel,pins = + <0 7 0x2 0x0>; /* PA7 periph B */ + }; + pinctrl_spi0_cs2: spi0_cs2-0 { + atmel,pins = + <0 1 0x2 0x0>; /* PA1 periph B */ + }; + pinctrl_spi0_cs3: spi0_cs3-0 { + atmel,pins = + <1 3 0x2 0x0>; /* PB3 periph B */ + }; + }; + spi1 { + pinctrl_spi1_miso_mosi_spck: spi1_miso_mosi_spck-0 { + atmel,pins = + <0 21 0x2 0x0 /* PA21 periph B */ + 0 22 0x2 0x0 /* PA12 periph B */ + 0 23 0x2 0x0>; /* PA13 periph B */ + }; + pinctrl_spi1_cs0: spi1_cs0-0 { + atmel,pins = + <0 8 0x2 0x0>; /* PA8 periph B */ + }; + pinctrl_spi1_cs1: spi1_cs1-0 { + atmel,pins = + <0 0 0x2 0x0>; /* PA0 periph B */ + }; + pinctrl_spi1_cs2: spi1_cs2-0 { + atmel,pins = + <0 31 0x2 0x0>; /* PA31 periph B */ + }; + pinctrl_spi1_cs3: spi1_cs3-0 { + atmel,pins = + <1 30 0x2 0x0>; /* PB30 periph B */ + }; + }; + w1_0 { + pinctrl_w1_0: w1_0-0 { + atmel,pins = + <0 21 0x0 0x1>; /* PA21 PIO, pull-up */ + }; + }; + }; + dbgu: serial@fffff200 { status = "okay"; }; @@ -55,8 +113,9 @@ usart1: serial@f8020000 { pinctrl-0 = <&pinctrl_usart1 - &pinctrl_usart1_rts - &pinctrl_usart1_cts>; + /* &pinctrl_usart1_rts */ + /* &pinctrl_usart1_cts */ + >; status = "okay"; }; @@ -71,12 +130,13 @@ compatible = "atmel,at91sam9260-usart"; reg = <0xf8028000 0x200>; interrupts = <8 4 5>; - atmel,use-dma-rx; - atmel,use-dma-tx; + /* atmel,use-dma-rx; */ + /* atmel,use-dma-tx; */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usart3 - &pinctrl_usart3_rts - &pinctrl_usart3_cts>; + /* &pinctrl_usart3_rts */ + /* &pinctrl_usart3_cts */ + >; status = "okay"; }; @@ -89,14 +149,14 @@ status = "okay"; }; - uart1: serial@f8044000 { - compatible = "atmel,at91sam9260-usart"; - reg = <0xf8044000 0x200>; - interrupts = <16 4 5>; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_uart1>; - status = "okay"; - }; + /* uart1: serial@f8044000 { */ + /* compatible = "atmel,at91sam9260-usart"; */ + /* reg = <0xf8044000 0x200>; */ + /* interrupts = <16 4 5>; */ + /* pinctrl-names = "default"; */ + /* pinctrl-0 = <&pinctrl_uart1>; */ + /* status = "okay"; */ + /* }; */ macb0: ethernet@f802c000 { phy-mode = "rmii"; @@ -129,31 +189,40 @@ }; spi0: spi@f0000000 { - compatible = "atmel,at91rm9200-spi"; - reg = <0xf0000000 0x4000>; - interrupts = <13 4 5>; - #address-cells = <1>; - #size-cells = <0>; - cs-gpios = <&pioA 14 0>; status = "okay"; + /* cs-gpios = <&pioA 14 0>; */ + cs-gpios = <&pioA 29 0>; /* safe unused, testing */ + /* cs-gpios = <&pinctrl_spi0_cs0 0 0>; */ + pinctrl-names = "default"; + pinctrl-0 = < + &pinctrl_spi0_miso_mosi_spck + &pinctrl_spi0_cs0>; + + mmc-slot@0 { + compatible = "mmc-spi-slot"; + /* reg = <0>; */ + voltage-ranges = <3300 3300>; + /* gpios = <&pioC 4 0>; CD */ + broken-cd; + spi-max-frequency = <5000000>; + }; + }; - /* mmc-slot@0 { - * compatible = "mmc-spi-slot"; - * reg = <0>; */ - /* gpios = <&pioC 4 0>; CD */ - /* spi-max-frequency = <25000000>; - * }; */ + adc0: adc@f804c000 { + status = "okay"; + atmel,adc-channels-used = <0xf>; + atmel,adc-num-channels = <4>; }; }; usb0: ohci@00600000 { status = "okay"; - num-ports = <2>; + num-ports = <3>; /* The following looks suspect */ - atmel,vbus-gpio = <&pioD 19 1 - &pioD 20 1 - >; + /* atmel,vbus-gpio = <&pioD 19 1 */ + /* &pioD 20 1 */ + /* >; */ }; usb1: ehci@00700000 { @@ -176,8 +245,10 @@ onewire@0 { compatible = "w1-gpio"; - /* bit banging w1 at PA21 with internl pull-up */ + /* bit banging w1 at PA21 with internal pull-up */ gpios = <&pioA 21 1>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_w1_0>; }; rtc { diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi index b7f42a1..6127b54 100644 --- a/arch/arm/boot/dts/at91sam9x5.dtsi +++ b/arch/arm/boot/dts/at91sam9x5.dtsi @@ -382,8 +382,8 @@ compatible = "atmel,at91sam9260-usart"; reg = <0xf801c000 0x200>; interrupts = <5 4 5>; - atmel,use-dma-rx; - atmel,use-dma-tx; + /* atmel,use-dma-rx; */ + /* atmel,use-dma-tx; */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usart0>; status = "disabled"; @@ -393,8 +393,8 @@ compatible = "atmel,at91sam9260-usart"; reg = <0xf8020000 0x200>; interrupts = <6 4 5>; - atmel,use-dma-rx; - atmel,use-dma-tx; + /* atmel,use-dma-rx; */ + /* atmel,use-dma-tx; */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usart1>; status = "disabled"; @@ -404,8 +404,8 @@ compatible = "atmel,at91sam9260-usart"; reg = <0xf8024000 0x200>; interrupts = <7 4 5>; - atmel,use-dma-rx; - atmel,use-dma-tx; + /* atmel,use-dma-rx; */ + /* atmel,use-dma-tx; */ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usart2>; status = "disabled"; diff --git a/arch/arm/mach-at91/at91sam9x5.c b/arch/arm/mach-at91/at91sam9x5.c index 0bf88c9..bab06ce 100644 --- a/arch/arm/mach-at91/at91sam9x5.c +++ b/arch/arm/mach-at91/at91sam9x5.c @@ -238,6 +238,7 @@ static struct clk_lookup periph_clocks_lookups[] = { CLKDEV_CON_DEV_ID("pclk", "f0010000.ssc", &ssc_clk), CLKDEV_CON_DEV_ID("spi_clk", "f0000000.spi", &spi0_clk), CLKDEV_CON_DEV_ID("spi_clk", "f0004000.spi", &spi1_clk), + CLKDEV_CON_DEV_ID("adc_clk", "f804c000.adc", &adc_clk), CLKDEV_CON_DEV_ID(NULL, "f8010000.i2c", &twi0_clk), CLKDEV_CON_DEV_ID(NULL, "f8014000.i2c", &twi1_clk), CLKDEV_CON_DEV_ID(NULL, "f8018000.i2c", &twi2_clk), diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 13a02f4..9c8e0bc 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -14,6 +14,8 @@ * found on AT91SAM9263. */ +#define DEBUG + #include #include #include diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index 019d165..f41f71a 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c @@ -313,7 +313,7 @@ static const struct rtc_class_ops at91_rtc_ops = { #ifdef CONFIG_OF -static const struct at91_rtc_pdata * __devinit at91_rtc_get_driver_data( +static const struct at91_rtc_pdata * __init at91_rtc_get_driver_data( struct platform_device *pdev) { if (pdev->dev.of_node) { @@ -330,7 +330,7 @@ static const struct at91_rtc_pdata * __devinit at91_rtc_get_driver_data( /* * Initialize and install RTC driver [OF] */ -static int __devinit at91_rtc_probe(struct platform_device *pdev) +static int __init at91_rtc_probe(struct platform_device *pdev) { struct rtc_device *rtc; struct resource *regs; @@ -401,7 +401,7 @@ printk(KERN_ERR "at91_rtc_probe: base=0x%x\n", (unsigned int)at91_rtc_regs); /* * Disable and remove the RTC driver */ -static int __devexit at91_rtc_remove(struct platform_device *pdev) +static int __exit at91_rtc_remove(struct platform_device *pdev) { struct rtc_device *rtc = platform_get_drvdata(pdev); @@ -565,7 +565,7 @@ static const struct dev_pm_ops at91_rtc_pm = { static struct platform_driver at91_rtc_driver = { .probe = at91_rtc_probe, - .remove = __devexit_p(at91_rtc_remove), + .remove = __exit_p(at91_rtc_remove), .driver = { .name = "at91_rtc", .owner = THIS_MODULE,