From ed11e08a736ac8fcdfdcc45b13d68cd688aacd73 Mon Sep 17 00:00:00 2001 From: Andrey Gusakov Date: Mon, 23 May 2016 19:48:54 +0300 Subject: [PATCH] Porter: add separate dts for ext01 extension board Signed-off-by: Andrey Gusakov --- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7791-porter-ext01.dts | 772 ++++++++++++++++++++++++++++ 2 files changed, 773 insertions(+) create mode 100644 arch/arm/boot/dts/r8a7791-porter-ext01.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5e951fb..68c86f8 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -231,6 +231,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \ # R-Car Gen2 AVB variants dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += \ r8a7791-koelsch-eavb.dtb \ + r8a7791-porter-ext01.dtb \ r8a7791-porter-eavb.dtb \ r8a7790-lager-eavb.dtb diff --git a/arch/arm/boot/dts/r8a7791-porter-ext01.dts b/arch/arm/boot/dts/r8a7791-porter-ext01.dts new file mode 100644 index 0000000..d115b36 --- /dev/null +++ b/arch/arm/boot/dts/r8a7791-porter-ext01.dts @@ -0,0 +1,772 @@ +/* + * Device Tree Source for the Porter board + * + * Copyright (C) 2015 Renesas Electronics Corporation + * Copyright (C) 2015 Cogent Embedded, Inc. + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +/* + * SSI-AK4642 + * + * these commands are required when playback. + * + * # amixer set "LINEOUT Mixer DACL" on + * # amixer set "Digital" 200 + * # amixer set "DVC Out" 50 + */ + +/dts-v1/; +#include "r8a7791.dtsi" +#include +#include + +/ { + model = "Porter"; + compatible = "renesas,porter", "renesas,r8a7791"; + + aliases { + serial6 = &scif0; + serial7 = &scifa4; + serial8 = &scifb2; + serial9 = &scif1; + }; + + chosen { + bootargs = "console=ttySC6,38400 ignore_loglevel ip=none rw root=/dev/mmcblk0p1 vmalloc=384M"; + }; + + memory@40000000 { + device_type = "memory"; + reg = <0 0x40000000 0 0x40000000>; + }; + + memory@200000000 { + device_type = "memory"; + reg = <2 0x00000000 0 0x40000000>; + }; + + + snd_clk: snd_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24576000>; + clock-output-names = "scki"; + }; + + leds { + compatible = "gpio-leds"; + led2 { + gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>; + }; + led3 { + gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>; + }; + led4 { + gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + button@1 { + linux,code = ; + label = "SW2-1"; + gpio-key,wakeup; + debounce-interval = <20>; + gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; + }; + button@2 { + linux,code = ; + label = "SW2-2"; + gpio-key,wakeup; + debounce-interval = <20>; + gpios = <&gpio7 1 GPIO_ACTIVE_LOW>; + }; + }; + + vccq_sdhi0: regulator@1 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI0 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + + vcc_sdhi2: regulator@2 { + compatible = "regulator-fixed"; + + regulator-name = "SDHI2 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + vccq_sdhi2: regulator@3 { + compatible = "regulator-gpio"; + + regulator-name = "SDHI2 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + + gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1 + 1800000 0>; + }; + + codec_en_reg: regulator@4 { + compatible = "regulator-fixed"; + regulator-name = "codec-en-regulator"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + /* SND_RST GPIO for this board is CPLD gpio 0 */ + gpio = <&cpld_gpio 0 0>; + + /* delay - CHECK */ + startup-delay-us = <70000>; + enable-active-high; + }; + + amp_en_reg: regulator@5 { + compatible = "regulator-fixed"; + regulator-name = "amp-en-regulator"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + /* Phones amps en GPIO for this board is CPLD gpio 1 */ + gpio = <&cpld_gpio 1 0>; + + startup-delay-us = <0>; + enable-active-high; + }; + + wlan_en_reg: regulator@6 { + compatible = "regulator-fixed"; + regulator-name = "wlan-en-regulator"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + /* WLAN_EN GPIO for this board CPLD gpio 10 */ + gpio = <&cpld_gpio 10 0>; + + /* WLAN card specific delay */ + startup-delay-us = <70000>; + enable-active-high; + }; + + kim { + compatible = "kim"; + nshutdown_gpio = <769>; /* FIX! CPLD pin 11 */ + /* serial8 */ + dev_name = "/dev/ttySC8"; + flow_cntrl = <1>; + /* maximum clock on scifb@52MHz */ + baud_rate = <3250000>; + }; + + btwilink { + compatible = "btwilink"; + }; + + sound_ext: sound@0 { + compatible = "simple-audio-card"; + pinctrl-0 = <&sound_0_pins>; + pinctrl-names = "default"; + + simple-audio-card,format = "left_j"; + simple-audio-card,name = "pcm3168a"; + + simple-audio-card,bitclock-master = <&sound_ext_master>; + simple-audio-card,frame-master = <&sound_ext_master>; + sound_ext_master: simple-audio-card,cpu@0 { + sound-dai = <&rcar_sound 0>; + dai-tdm-slot-num = <8>; + dai-tdm-slot-width = <32>; + }; + + simple-audio-card,codec@0 { + sound-dai = <&pcm3168a>; + dai-tdm-slot-num = <8>; + dai-tdm-slot-width = <32>; + system-clock-frequency = <24576000>; + }; + }; + + sound_onboard: sound@1 { + compatible = "simple-audio-card"; + pinctrl-0 = <&sound_1_pins>; + pinctrl-names = "default"; + + simple-audio-card,format = "i2s"; + simple-audio-card,name = "ak464x"; + + sndcpu_0: simple-audio-card,cpu@1 { + sound-dai = <&rcar_sound 1>; + }; + + sndcodec_0: simple-audio-card,codec@1 { + sound-dai = <&ak4642>; + system-clock-frequency = <11289600>; + }; + }; + + sound_radio: sound@2 { + compatible = "simple-audio-card"; + pinctrl-0 = <&sound_2_pins>; + pinctrl-names = "default"; + + simple-audio-card,format = "i2s"; + simple-audio-card,name = "radio"; + + simple-audio-card,bitclock-master = <&sound_radio_master>; + simple-audio-card,frame-master = <&sound_radio_master>; + simple-audio-card,cpu@2 { + sound-dai = <&rcar_sound 2>; + }; + + sound_radio_master: simple-audio-card,codec@2 { + sound-dai = <&radio>; + system-clock-frequency = <12288000>; + }; + }; + + hdmi_transmitter: adv7511 { + compatible = "adi,adv7511"; + gpios = <&gpio3 29 GPIO_ACTIVE_LOW>; + + adi,input-style = <0x02>; + adi,input-id = <0x00>; + adi,input-color-depth = <0x03>; + adi,sync-pulse = <0x03>; + adi,bit-justification = <0x01>; + adi,up-conversion = <0x00>; + adi,timing-generation-sequence = <0x00>; + adi,vsync-polarity = <0x02>; + adi,hsync-polarity = <0x02>; + adi,clock-delay = <0x03>; + }; + + usbhs_udc { + gpios = <&gpio5 31 GPIO_ACTIVE_HIGH>; + }; + + i2c0_gpio0: i2c@0 { + status = "ok"; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + compatible = "i2c-gpio"; + gpios = <&gpio6 9 GPIO_ACTIVE_HIGH /* sda */ + &gpio7 2 GPIO_ACTIVE_HIGH /* scl */ + >; + i2c-gpio,delay-us = <50>; + + maxim_setup@10 { + compatible = "maxim,max9272-ov10635-setup"; + reg = <0x10>; /* fake address */ + gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>; + }; + }; + + cpld_gpio: cpld { + compatible = "porter-cpld-gpio"; + #gpio-cells = <2>; + + porter-cpld-gpio,data-gpio = <&gpio4 18 GPIO_ACTIVE_HIGH>; + porter-cpld-gpio,ptrc-gpio = <&gpio4 15 GPIO_ACTIVE_HIGH>; + porter-cpld-gpio,bufc-gpio = <&gpio7 5 GPIO_ACTIVE_HIGH>; + }; + + i2c0_gpio1: i2c@1 { + status = "ok"; + clock-frequency = <400000>; + #address-cells = <1>; + #size-cells = <0>; + compatible = "i2c-gpio"; + gpios = <&gpio4 31 GPIO_ACTIVE_HIGH /* sda */ + &gpio1 24 GPIO_ACTIVE_HIGH /* scl */ + >; + i2c-gpio,delay-us = <2>; /* ~100 KHz */ + }; + + spi_gpio: spi@0 { + compatible = "spi-gpio"; + status = "okay"; + gpio-sck = <&gpio4 30 0>; + gpio-mosi = <&gpio2 30 0>; + gpio-miso = <&gpio7 19 0>; + cs-gpios = <&gpio2 18 0>; + num-chipselects = <1>; + #address-cells = <1>; + #size-cells = <0>; + + si4689: si4689@0 { + compatible = "si,468x"; + reg = <0>; + spi-max-frequency = <10000000>; + }; + }; + + radio: si468x@0 { + compatible = "si,si468x-pcm"; + status = "okay"; + + #sound-dai-cells = <0>; + }; +}; + +&extal_clk { + clock-frequency = <20000000>; +}; + +&pfc { + pinctrl-0 = <&du_pins &usb0_pins &usb1_pins &vin0_pins &vin2_pins>; + pinctrl-names = "default"; + + du_pins: du { + renesas,groups = "du_rgb666", "du_sync", "du_clk_out_0"; + renesas,function = "du"; + }; + + scif0_pins: serial6 { + renesas,groups = "scif0_data_d"; + renesas,function = "scif0"; + }; + + scif1_pins: serial9 { + renesas,groups = "scif1_data_d"; + renesas,function = "scif1"; + }; + + scifa4_pins: serial7 { + renesas,groups = "scifa4_data"; + renesas,function = "scifa4"; + }; + + scifb2_pins: serial8 { + renesas,groups = "scifb2_data", "scifb2_ctrl"; + renesas,function = "scifb2"; + }; + + i2c1_pins: i2c1 { + renesas,groups = "i2c1_e"; + renesas,function = "i2c1"; + }; + + i2c2_pins: i2c2 { + renesas,groups = "i2c2"; + renesas,function = "i2c2"; + }; + + i2c4_pins: i2c4 { + renesas,groups = "i2c4_c"; + renesas,function = "i2c4"; + }; + + ether_pins: ether { + renesas,groups = "eth_link", "eth_mdio", "eth_rmii"; + renesas,function = "eth"; + }; + + avb_pins: avb { + renesas,groups = "avb_mdio", "avb_gmii"; + renesas,function = "avb"; + }; + + mlb3_pins: mlp { + renesas,groups = "mlb3pin"; + renesas,function = "mlb3pin"; + }; + + phy1_pins: phy1 { + renesas,groups = "intc_irq0"; + renesas,function = "intc"; + }; + + sdhi0_pins: sd0 { + renesas,groups = "sdhi0_data4", "sdhi0_ctrl"; + renesas,function = "sdhi0"; + }; + + sdhi2_pins: sd2 { + renesas,groups = "sdhi2_data4", "sdhi2_ctrl"; + renesas,function = "sdhi2"; + }; + + qspi_pins: spi0 { + renesas,groups = "qspi_ctrl", "qspi_data4"; + renesas,function = "qspi"; + }; + + msiof0_pins: spi1 { + renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx", + "msiof0_tx"; + renesas,function = "msiof0"; + }; + + sound_clk_pins: sound_clk { + renesas,groups = "audio_clk_b_b"; + renesas,function = "audio_clk"; + }; + + sound_0_pins: sound1 { + renesas,groups = "ssi34_ctrl", "ssi3_data", "ssi4_data"; + renesas,function = "ssi"; + }; + + sound_1_pins: sound0 { + renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; + renesas,function = "ssi"; + }; + + sound_2_pins: sound2 { + renesas,groups = "ssi5_ctrl", "ssi5_data"; + renesas,function = "ssi"; + }; + + usb0_pins: usb0 { + renesas,groups = "usb0"; + renesas,function = "usb0"; + }; + + usb1_pins: usb1 { + renesas,groups = "usb1"; + renesas,function = "usb1"; + }; + + vin0_pins: vin0 { + renesas,groups = "vin0_data8", "vin0_clk"; + renesas,function = "vin0"; + }; + + vin2_pins: vin2 { + renesas,groups = "vin2_data8", "vin2_clk"; + renesas,function = "vin2"; + }; + + can0_pins: can0 { + renesas,groups = "can0_data_b"; + renesas,function = "can0"; + }; +}; + +ðer { + pinctrl-0 = <ðer_pins &phy1_pins>; + pinctrl-names = "default"; + + phy-handle = <&phy1>; + renesas,ether-link-active-low; + status = "disabled"; + + phy1: ethernet-phy@1 { + reg = <1>; + interrupt-parent = <&irqc0>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + micrel,led-mode = <1>; + }; +}; + +&can0 { + pinctrl-0 = <&can0_pins>; + pinctrl-names = "default"; + renesas,can-clock-select = <0x0>; + status = "okay"; +}; + +&avb { + pinctrl-0 = <&avb_pins>; + pinctrl-names = "default"; + + renesas,no-ether-link; + renesas,phy = <0>; + renesas,mii-lite-ignore-pins = <&gpio5 25 0 + &gpio5 24 0 + &gpio5 23 0 + &gpio5 22 0 + &gpio5 7 0 + &gpio5 8 0 + &gpio5 6 0 + &gpio5 5 0 + &gpio5 4 0 + &gpio5 17 0 + &gpio5 11 0 + &gpio5 30 0 + &gpio5 27 0>; + phy-int-gpio = <&gpio5 16 GPIO_ACTIVE_LOW>; + status = "okay"; +}; + +&sata0 { + status = "okay"; +}; + +&scif0 { + pinctrl-0 = <&scif0_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + +&scif1 { + pinctrl-0 = <&scif1_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + +&scifa4 { + pinctrl-0 = <&scifa4_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + +&scifb2 { + pinctrl-0 = <&scifb2_pins>; + pinctrl-names = "default"; + ctsrts; + + status = "okay"; +}; + +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&wlan_en_reg>; + vqmmc-supply = <&vccq_sdhi0>; + + keep-power-in-suspend; + enable-sdio-wakeup; + non-removable; + cap-power-off-card; + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + wlcore: wlcore@0 { + compatible = "ti,wl1837"; + reg = <2>; + /* GP6_12 */ + interrupt-parent = <&gpio6>; + interrupts = <12 IRQ_TYPE_EDGE_RISING>; + platform-quirks = <1>; + }; +}; + +&sdhi2 { + pinctrl-0 = <&sdhi2_pins>; + pinctrl-names = "default"; + + vmmc-supply = <&vcc_sdhi2>; + vqmmc-supply = <&vccq_sdhi2>; + cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>; + toshiba,mmc-wrprotect-disable; + status = "okay"; +}; + +&qspi { + pinctrl-0 = <&qspi_pins>; + pinctrl-names = "default"; + + status = "okay"; + + flash: flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "spansion,s25fl512s"; + reg = <0>; + spi-max-frequency = <30000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + m25p,fast-read; + spi-cpol; + spi-cpha; + + partition@0 { + label = "loader"; + reg = <0x00000000 0x00040000>; + read-only; + }; + partition@40000 { + label = "user"; + reg = <0x00040000 0x00400000>; + read-only; + }; + partition@440000 { + label = "flash"; + reg = <0x00440000 0x03bc0000>; + }; + }; +}; + +&msiof0 { + pinctrl-0 = <&msiof0_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + +&i2c1 { + pinctrl-0 = <&i2c1_pins>; + pinctrl-names = "default"; + + status = "okay"; + clock-frequency = <400000>; +}; + +&i2c2 { + pinctrl-0 = <&i2c2_pins>; + pinctrl-names = "default"; + + status = "okay"; + clock-frequency = <400000>; + + eeprom@50 { + compatible = "renesas,24c02"; + reg = <0x50>; + pagesize = <16>; + }; + + ak4642: sound-codec@12 { + #sound-dai-cells = <0>; + compatible = "asahi-kasei,ak4642"; + reg = <0x12>; + }; +}; + +&i2c4 { + pinctrl-0 = <&i2c4_pins>; + pinctrl-names = "default"; + + status = "okay"; + clock-frequency = <400000>; +}; + +&i2c5 { + status = "okay"; + clock-frequency = <400000>; + + lsm9ds0_acc_mag@1d { + compatible = "st,lsm9ds0_acc_mag"; + reg = <0x1d>; + }; + + lsm9ds0_gyr@6b { + compatible = "st,lsm9ds0_gyr"; + reg = <0x6b>; + }; + + pcm3168a: audio-codec@44 { + #sound-dai-cells = <0>; + compatible = "ti,pcm3168a"; + reg = <0x44>; + clocks = <&snd_clk>; + clock-names = "scki"; + tdm; + VDD1-supply = <&codec_en_reg>; + VDD2-supply = <&codec_en_reg>; + VCCAD1-supply = <&codec_en_reg>; + VCCAD2-supply = <&codec_en_reg>; + VCCDA1-supply = <&_en_reg>; + VCCDA2-supply = <&_en_reg>; + }; +}; + +&i2c6 { + status = "okay"; + clock-frequency = <100000>; + + vdd_dvfs: regulator@68 { + compatible = "diasemi,da9210"; + reg = <0x68>; + + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1000000>; + regulator-boot-on; + regulator-always-on; + }; +}; + +&mlp { + pinctrl-names = "default"; + pinctrl-0 = <&mlb3_pins>; + status = "okay"; +}; + +&pci0 { + status = "okay"; + pinctrl-0 = <&usb0_pins>; + pinctrl-names = "default"; +}; + +&pci1 { + status = "okay"; + pinctrl-0 = <&usb1_pins>; + pinctrl-names = "default"; +}; + +&pcie_bus_clk { + status = "okay"; +}; + +&pciec { + status = "okay"; +}; + +&cpu0 { + cpu0-supply = <&vdd_dvfs>; +}; + +&rcar_sound { + #sound-dai-cells = <1>; + pinctrl-0 = <&sound_clk_pins>; + pinctrl-names = "default"; + + status = "okay"; + + rcar_sound,dai { + dai0 { + playback = <&ssi3>; + capture = <&ssi4>; + }; + + dai1 { + playback = <&ssi0 &src0 &dvc0>; + capture = <&ssi1 &src1 &dvc1>; + }; + + dai2 { + capture = <&ssi5>; + }; + }; +}; + +&ssi1 { + shared-pin; +}; + +&ssi3 { + tdm-8ch; + shared-pin; +}; + +&ssi4 { + tdm-8ch; + shared-pin; +}; + +&audio_clk_b { + clock-frequency = <24576000>; +}; -- 1.7.10.4