Commit e6976552 authored by Olof Johansson's avatar Olof Johansson

Merge tag 'at91-dt' of git://github.com/at91linux/linux-at91 into next/dt

Merge "at91: DT for 3.16 #1" from Nicolas Ferre:

3.16: first DT series:
- more support for at91sam9rl and its associated EK board
- some improvements to at91sam9g45 (ADC, TS, PWM leds)
- addition of some missing pieces for describing audio
  of SAMA5D3-EK in DT

* tag 'at91-dt' of git://github.com/at91linux/linux-at91:
  ARM: at91: sama5d3: clock for ssc from rk pin
  ARM: at91: sama5d3: add the missing property
  ARM: at91: sama5d3: correct the sound compatible string
  ARM: at91: sama5d3: disable sound by default
  ARM: at91: sama5d3: add DMA property for SSC devices
  ARM: at91/dt: at91sam9m10g45ek PWM leds polarity is inversed
  ARM: at91/dt: at91sam9m10g45ek: add ADC and touchscreen support
  ARM: at91/dt: sam9g45: improve ADC/touchscreen support
  ARM: at91/dt: add peripherals to the at91sam9rlek board
  ARM: at91/dt: sam9rl: add lcd, adc, usb gadget and pwm support
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parents 89ca3b88 27a96a03
......@@ -136,6 +136,36 @@ pinctrl@fffff200 {
>;
/* shared pinctrl settings */
adc0 {
pinctrl_adc0_adtrg: adc0_adtrg {
atmel,pins = <AT91_PIOD 28 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad0: adc0_ad0 {
atmel,pins = <AT91_PIOD 20 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad1: adc0_ad1 {
atmel,pins = <AT91_PIOD 21 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad2: adc0_ad2 {
atmel,pins = <AT91_PIOD 22 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad3: adc0_ad3 {
atmel,pins = <AT91_PIOD 23 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad4: adc0_ad4 {
atmel,pins = <AT91_PIOD 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad5: adc0_ad5 {
atmel,pins = <AT91_PIOD 25 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad6: adc0_ad6 {
atmel,pins = <AT91_PIOD 26 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad7: adc0_ad7 {
atmel,pins = <AT91_PIOD 27 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
};
};
dbgu {
pinctrl_dbgu: dbgu-0 {
atmel,pins =
......@@ -634,10 +664,9 @@ ssc1: ssc@fffa0000 {
adc0: adc@fffb0000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "atmel,at91sam9260-adc";
compatible = "atmel,at91sam9g45-adc";
reg = <0xfffb0000 0x100>;
interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
atmel,adc-use-external-triggers;
atmel,adc-channels-used = <0xff>;
atmel,adc-vref = <3300>;
atmel,adc-startup-time = <40>;
......
......@@ -8,6 +8,7 @@
*/
/dts-v1/;
#include "at91sam9g45.dtsi"
#include <dt-bindings/pwm/pwm.h>
/ {
model = "Atmel AT91SAM9M10G45-EK";
......@@ -130,6 +131,21 @@ usb2: gadget@fff78000 {
status = "okay";
};
adc0: adc@fffb0000 {
pinctrl-names = "default";
pinctrl-0 = <
&pinctrl_adc0_ad0
&pinctrl_adc0_ad1
&pinctrl_adc0_ad2
&pinctrl_adc0_ad3
&pinctrl_adc0_ad4
&pinctrl_adc0_ad5
&pinctrl_adc0_ad6
&pinctrl_adc0_ad7>;
atmel,adc-ts-wires = <4>;
status = "okay";
};
pwm0: pwm@fffb8000 {
status = "okay";
......@@ -216,14 +232,14 @@ pwmleds {
d6 {
label = "d6";
pwms = <&pwm0 3 5000 0>;
pwms = <&pwm0 3 5000 PWM_POLARITY_INVERTED>;
max-brightness = <255>;
linux,default-trigger = "nand-disk";
};
d7 {
label = "d7";
pwms = <&pwm0 1 5000 0>;
pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>;
max-brightness = <255>;
linux,default-trigger = "mmc0";
};
......
......@@ -11,6 +11,7 @@
#include <dt-bindings/clk/at91.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pwm/pwm.h>
/ {
model = "Atmel AT91SAM9RL family SoC";
......@@ -32,6 +33,7 @@ aliases {
i2c1 = &i2c1;
ssc0 = &ssc0;
ssc1 = &ssc1;
pwm0 = &pwm0;
};
cpus {
......@@ -48,12 +50,31 @@ memory {
reg = <0x20000000 0x04000000>;
};
clocks {
adc_op_clk: adc_op_clk{
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <1000000>;
};
};
ahb {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;
fb0: fb@00500000 {
compatible = "atmel,at91sam9rl-lcdc";
reg = <0x00500000 0x1000>;
interrupts = <23 IRQ_TYPE_LEVEL_HIGH 3>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_fb>;
clocks = <&lcd_clk>, <&lcd_clk>;
clock-names = "hclk", "lcdc_clk";
status = "disabled";
};
nand0: nand@40000000 {
compatible = "atmel,at91rm9200-nand";
#address-cells = <1>;
......@@ -187,6 +208,16 @@ ssc1: ssc@fffc4000 {
status = "disabled";
};
pwm0: pwm@fffc8000 {
compatible = "atmel,at91sam9rl-pwm";
reg = <0xfffc8000 0x300>;
interrupts = <19 IRQ_TYPE_LEVEL_HIGH 4>;
#pwm-cells = <3>;
clocks = <&pwm_clk>;
clock-names = "pwm_clk";
status = "disabled";
};
spi0: spi@fffcc000 {
#address-cells = <1>;
#size-cells = <0>;
......@@ -200,6 +231,111 @@ spi0: spi@fffcc000 {
status = "disabled";
};
adc0: adc@fffd0000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "atmel,at91sam9rl-adc";
reg = <0xfffd0000 0x100>;
interrupts = <20 IRQ_TYPE_LEVEL_HIGH 0>;
clocks = <&adc_clk>, <&adc_op_clk>;
clock-names = "adc_clk", "adc_op_clk";
atmel,adc-use-external-triggers;
atmel,adc-channels-used = <0x3f>;
atmel,adc-vref = <3300>;
atmel,adc-startup-time = <40>;
atmel,adc-res = <8 10>;
atmel,adc-res-names = "lowres", "highres";
atmel,adc-use-res = "highres";
trigger@0 {
reg = <0>;
trigger-name = "timer-counter-0";
trigger-value = <0x1>;
};
trigger@1 {
reg = <1>;
trigger-name = "timer-counter-1";
trigger-value = <0x3>;
};
trigger@2 {
reg = <2>;
trigger-name = "timer-counter-2";
trigger-value = <0x5>;
};
trigger@3 {
reg = <3>;
trigger-name = "external";
trigger-value = <0x13>;
trigger-external;
};
};
usb0: gadget@fffd4000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "atmel,at91sam9rl-udc";
reg = <0x00600000 0x100000>,
<0xfffd4000 0x4000>;
interrupts = <22 IRQ_TYPE_LEVEL_HIGH 2>;
clocks = <&udphs_clk>, <&utmi>;
clock-names = "pclk", "hclk";
status = "disabled";
ep0 {
reg = <0>;
atmel,fifo-size = <64>;
atmel,nb-banks = <1>;
};
ep1 {
reg = <1>;
atmel,fifo-size = <1024>;
atmel,nb-banks = <2>;
atmel,can-dma;
atmel,can-isoc;
};
ep2 {
reg = <2>;
atmel,fifo-size = <1024>;
atmel,nb-banks = <2>;
atmel,can-dma;
atmel,can-isoc;
};
ep3 {
reg = <3>;
atmel,fifo-size = <1024>;
atmel,nb-banks = <3>;
atmel,can-dma;
};
ep4 {
reg = <4>;
atmel,fifo-size = <1024>;
atmel,nb-banks = <3>;
atmel,can-dma;
};
ep5 {
reg = <5>;
atmel,fifo-size = <1024>;
atmel,nb-banks = <3>;
atmel,can-dma;
atmel,can-isoc;
};
ep6 {
reg = <6>;
atmel,fifo-size = <1024>;
atmel,nb-banks = <3>;
atmel,can-dma;
atmel,can-isoc;
};
};
ramc0: ramc@ffffea00 {
compatible = "atmel,at91sam9260-sdramc";
reg = <0xffffea00 0x200>;
......@@ -238,6 +374,44 @@ pinctrl@fffff400 {
<0x003fffff 0x0001ff3c>; /* pioD */
/* shared pinctrl settings */
adc0 {
pinctrl_adc0_ts: adc0_ts-0 {
atmel,pins =
<AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad0: adc0_ad0-0 {
atmel,pins = <AT91_PIOA 17 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad1: adc0_ad1-0 {
atmel,pins = <AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad2: adc0_ad2-0 {
atmel,pins = <AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad3: adc0_ad3-0 {
atmel,pins = <AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad4: adc0_ad4-0 {
atmel,pins = <AT91_PIOD 6 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
pinctrl_adc0_ad5: adc0_ad5-0 {
atmel,pins = <AT91_PIOD 7 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
pinctrl_adc0_adtrg: adc0_adtrg-0 {
atmel,pins = <AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
};
dbgu {
pinctrl_dbgu: dbgu-0 {
atmel,pins =
......@@ -246,6 +420,33 @@ pinctrl_dbgu: dbgu-0 {
};
};
fb {
pinctrl_fb: fb-0 {
atmel,pins =
<AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 3 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOC 5 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOC 6 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOC 7 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOC 9 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 10 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 11 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 12 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 13 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 15 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 16 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 17 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 18 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 19 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 20 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 21 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 22 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 24 AT91_PERIPH_B AT91_PINCTRL_NONE>,
<AT91_PIOC 25 AT91_PERIPH_B AT91_PINCTRL_NONE>;
};
};
i2c_gpio0 {
pinctrl_i2c_gpio0: i2c_gpio0-0 {
atmel,pins =
......@@ -307,6 +508,61 @@ pinctrl_nand0_cs: nand_cs-0 {
};
};
pwm0 {
pinctrl_pwm0_pwm0_0: pwm0_pwm0-0 {
atmel,pins = <AT91_PIOB 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
};
pinctrl_pwm0_pwm0_1: pwm0_pwm0-1 {
atmel,pins = <AT91_PIOC 2 AT91_PERIPH_B AT91_PINCTRL_NONE>;
};
pinctrl_pwm0_pwm0_2: pwm0_pwm0-2 {
atmel,pins = <AT91_PIOD 14 AT91_PERIPH_B AT91_PINCTRL_NONE>;
};
pinctrl_pwm0_pwm1_0: pwm0_pwm1-0 {
atmel,pins = <AT91_PIOB 9 AT91_PERIPH_B AT91_PINCTRL_NONE>;
};
pinctrl_pwm0_pwm1_1: pwm0_pwm1-1 {
atmel,pins = <AT91_PIOC 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
};
pinctrl_pwm0_pwm1_2: pwm0_pwm1-2 {
atmel,pins = <AT91_PIOD 15 AT91_PERIPH_B AT91_PINCTRL_NONE>;
};
pinctrl_pwm0_pwm2_0: pwm0_pwm2-0 {
atmel,pins = <AT91_PIOD 5 AT91_PERIPH_B AT91_PINCTRL_NONE>;
};
pinctrl_pwm0_pwm2_1: pwm0_pwm2-1 {
atmel,pins = <AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
pinctrl_pwm0_pwm2_2: pwm0_pwm2-2 {
atmel,pins = <AT91_PIOD 16 AT91_PERIPH_B AT91_PINCTRL_NONE>;
};
pinctrl_pwm0_pwm3_0: pwm0_pwm3-0 {
atmel,pins = <AT91_PIOD 8 AT91_PERIPH_B AT91_PINCTRL_NONE>;
};
pinctrl_pwm0_pwm3_1: pwm0_pwm3-1 {
atmel,pins = <AT91_PIOD 18 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
};
spi0 {
pinctrl_spi0: spi0-0 {
atmel,pins =
<AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
};
ssc0 {
pinctrl_ssc0_tx: ssc0_tx-0 {
atmel,pins =
......@@ -339,15 +595,6 @@ pinctrl_ssc1_rx: ssc1_rx-0 {
};
};
spi0 {
pinctrl_spi0: spi0-0 {
atmel,pins =
<AT91_PIOA 25 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOA 26 AT91_PERIPH_A AT91_PINCTRL_NONE>,
<AT91_PIOA 27 AT91_PERIPH_A AT91_PINCTRL_NONE>;
};
};
tcb0 {
pinctrl_tcb0_tclk0: tcb0_tclk0-0 {
atmel,pins = <AT91_PIOA 3 AT91_PERIPH_B AT91_PINCTRL_NONE>;
......
......@@ -32,6 +32,37 @@ main_clock: clock {
};
ahb {
fb0: fb@00500000 {
display = <&display0>;
status = "okay";
display0: display {
bits-per-pixel = <16>;
atmel,lcdcon-backlight;
atmel,dmacon = <0x1>;
atmel,lcdcon2 = <0x80008002>;
atmel,guard-time = <1>;
atmel,lcd-wiring-mode = "RGB";
display-timings {
native-mode = <&timing0>;
timing0: timing0 {
clock-frequency = <4965000>;
hactive = <240>;
vactive = <320>;
hback-porch = <1>;
hfront-porch = <33>;
vback-porch = <1>;
vfront-porch = <0>;
hsync-len = <5>;
vsync-len = <1>;
hsync-active = <1>;
vsync-active = <1>;
};
};
};
};
nand0: nand@40000000 {
nand-bus-width = <8>;
nand-ecc-mode = "soft";
......@@ -92,6 +123,43 @@ &pinctrl_usart0_rts
status = "okay";
};
adc0: adc@fffd0000 {
pinctrl-names = "default";
pinctrl-0 = <
&pinctrl_adc0_ad0
&pinctrl_adc0_ad1
&pinctrl_adc0_ad2
&pinctrl_adc0_ad3
&pinctrl_adc0_ad4
&pinctrl_adc0_ad5
&pinctrl_adc0_adtrg>;
atmel,adc-ts-wires = <4>;
status = "okay";
};
usb0: gadget@fffd4000 {
atmel,vbus-gpio = <&pioA 8 GPIO_ACTIVE_HIGH>;
status = "okay";
};
spi0: spi@fffcc000 {
status = "okay";
cs-gpios = <&pioA 28 0>, <0>, <0>, <0>;
mtd_dataflash@0 {
compatible = "atmel,at45", "atmel,dataflash";
spi-max-frequency = <15000000>;
reg = <0>;
};
};
pwm0: pwm@fffc8000 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pwm0_pwm1_2>,
<&pinctrl_pwm0_pwm2_2>;
};
dbgu: serial@fffff200 {
status = "okay";
};
......@@ -117,18 +185,24 @@ watchdog@fffffd40 {
};
};
leds {
compatible = "gpio-leds";
pwmleds {
compatible = "pwm-leds";
ds1 {
label = "ds1";
gpios = <&pioD 15 GPIO_ACTIVE_LOW>;
pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>;
max-brightness = <255>;
};
ds2 {
label = "ds2";
gpios = <&pioD 16 GPIO_ACTIVE_LOW>;
pwms = <&pwm0 2 5000 PWM_POLARITY_INVERTED>;
max-brightness = <255>;
};
};
leds {
compatible = "gpio-leds";
ds3 {
label = "ds3";
......@@ -154,4 +228,12 @@ left_click {
gpio-key,wakeup;
};
};
i2c@0 {
status = "okay";
};
i2c@1 {
status = "okay";
};
};
......@@ -113,6 +113,9 @@ ssc0: ssc@f0008000 {
compatible = "atmel,at91sam9g45-ssc";
reg = <0xf0008000 0x4000>;
interrupts = <38 IRQ_TYPE_LEVEL_HIGH 4>;
dmas = <&dma0 2 AT91_DMA_CFG_PER_ID(13)>,
<&dma0 2 AT91_DMA_CFG_PER_ID(14)>;
dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ssc0_tx &pinctrl_ssc0_rx>;
clocks = <&ssc0_clk>;
......@@ -231,6 +234,9 @@ ssc1: ssc@f800c000 {
compatible = "atmel,at91sam9g45-ssc";
reg = <0xf800c000 0x4000>;
interrupts = <39 IRQ_TYPE_LEVEL_HIGH 4>;
dmas = <&dma1 2 AT91_DMA_CFG_PER_ID(3)>,
<&dma1 2 AT91_DMA_CFG_PER_ID(4)>;
dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ssc1_tx &pinctrl_ssc1_rx>;
clocks = <&ssc1_clk>;
......
......@@ -32,6 +32,10 @@ m25p80@0 {
};
};
ssc0: ssc@f0008000 {
atmel,clk-from-rk-pin;
};
/*
* i2c0 conflicts with ISI:
* disable it to allow the use of ISI
......@@ -156,7 +160,7 @@ usb2: ehci@00700000 {
};
sound {
compatible = "atmel,sama5d3ek-wm8904";
compatible = "atmel,asoc-wm8904";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;
......@@ -166,9 +170,12 @@ sound {
"Headphone Jack", "HPOUTR",
"IN2L", "Line In Jack",
"IN2R", "Line In Jack",
"MICBIAS", "IN1L",
"IN1L", "Mic";
atmel,ssc-controller = <&ssc0>;
atmel,audio-codec = <&wm8904>;
status = "disabled";
};
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment