/* * Copyright (C) 2016 WARP TECNOLOGIA ( BRAZIL ) * * 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/; /plugin/; / { compatible = "ti,beaglebone", "ti,beaglebone-black"; /* identification */ part-number = "bdq9100"; version = "00A0","A0"; /* state the resources this cape uses */ exclusive-use = /* the pin header uses */ "P8.25", /* gpmc: gpmc_ad0 */ "P8.24", /* gpmc: gpmc_ad1 */ "P8.5", /* gpmc: gpmc_ad2 */ "P8.6", /* gpmc: gpmc_ad3 */ "P8.23", /* gpmc: gpmc_ad4 */ "P8.22", /* gpmc: gpmc_ad5 */ "P8.3", /* gpmc: gpmc_ad6 */ "P8.4", /* gpmc: gpmc_ad7 */ "P8.19", /* gpmc: gpmc_ad8 */ "P8.13", /* gpmc: gpmc_ad9 */ "P8.14", /* gpmc: gpmc_ad10 */ "P8.17", /* gpmc: gpmc_ad11 */ "P8.12", /* gpmc: gpmc_ad12 */ "P8.11", /* gpmc: gpmc_ad13 */ "P8.16", /* gpmc: gpmc_ad14 */ "P8.15", /* gpmc: gpmc_ad15 */ "P9.13", /* gpmc: gpmc_wpn */ "P8.21", /* gpmc: gpmc_csn1 */ "P8.18", /* gpmc: gpmc_clk */ "P8.7", /* gpmc: gpmc_advn_ale */ "P8.8", /* gpmc: gpmc_oen_ren */ "P8.10", /* gpmc: gpmc_wen */ "P8.9", /* gpmc: gpmc_ben0_cle */ "P9.41", /* cssp: clkout2 */ "P9.42", /* cssp: xdma_event_intr2 */ "P9.18", /* cssp: gpio0_4 */ "P9.17", /* cssp: gpio0_5 */ "P9.11", /* cssp: gpio0_30 */ /* "P8.20", bdq9100: gpio1_31 */ "P8.26", /* bdq9100: gpio1_20 */ /* the hardware IP uses */ "gpio0_4", "gpio0_5", "gpio0_30", "gpmc", "clkout2", "gpio1_31", "gpio1_29", /* the reset pin */ "eMMC_RSTn"; #address-cells = <1>; #size-cells = <1>; fragment@0 { target = <&am33xx_pinmux>; __overlay__ { gpmc_pins: pinmux_gpmc_pins { pinctrl-single,pins = < 0x000 0x30 /* gpmc_ad0.gpmc_ad0 MODE0 | INPUT | PULLUP */ 0x004 0x30 /* gpmc_ad1.gpmc_ad1 MODE0 | INPUT | PULLUP */ 0x008 0x30 /* gpmc_ad2.gpmc_ad2 MODE0 | INPUT | PULLUP */ 0x00C 0x30 /* gpmc_ad3.gpmc_ad3 MODE0 | INPUT | PULLUP */ 0x010 0x30 /* gpmc_ad4.gpmc_ad4 MODE0 | INPUT | PULLUP */ 0x014 0x30 /* gpmc_ad5.gpmc_ad5 MODE0 | INPUT | PULLUP */ 0x018 0x30 /* gpmc_ad6.gpmc_ad6 MODE0 | INPUT | PULLUP */ 0x01C 0x30 /* gpmc_ad7.gpmc_ad7 MODE0 | INPUT | PULLUP */ 0x020 0x30 /* gpmc_ad8.gpmc_ad8 MODE0 | INPUT | PULLUP */ 0x024 0x30 /* gpmc_ad9.gpmc_ad9 MODE0 | INPUT | PULLUP */ 0x028 0x30 /* gpmc_ad10.gpmc_ad10 MODE0 | INPUT | PULLUP */ 0x02C 0x30 /* gpmc_ad11.gpmc_ad11 MODE0 | INPUT | PULLUP */ 0x030 0x30 /* gpmc_ad12.gpmc_ad12 MODE0 | INPUT | PULLUP */ 0x034 0x30 /* gpmc_ad13.gpmc_ad13 MODE0 | INPUT | PULLUP */ 0x038 0x30 /* gpmc_ad14.gpmc_ad14 MODE0 | INPUT | PULLUP */ 0x03C 0x30 /* gpmc_ad15.gpmc_ad15 MODE0 | INPUT | PULLUP */ 0x074 0x30 /* gpmc_wpn.gpmc_wpn MODE0 | INPUT | PULLUP */ /* WAS MODE 7 */ 0x080 0x08 /* gpmc_cscn1.gpmc_cscn1 MODE0 | OUTPUT */ 0x08C 0x28 /* gpmc_clk.gpmc_clk MODE0 | INPUT */ 0x090 0x08 /* gpmc_advn_ale.gpmc_advn_ale MODE0 | OUTPUT */ 0x094 0x08 /* gpmc_oen_ren.gpmc_oen_ren MODE0 | OUTPUT */ 0x098 0x08 /* gpmc_wen.gpmc_wen MODE0 | OUTPUT */ /* 0x09C 0x08 gpmc_ben0_cle.gpmc_ben0_cle MODE0 | OUTPUT */ >; }; bdq9100_config_pins: pinmux_bdq9100_camera_pins { pinctrl-single,pins = < /* clkout2 */ 0x1B4 0x03 /* xdma_event_intr1.clkout2 MODE3 | OUTPUT clkout2 */ /* dmar */ 0x164 0x2e /* ecap0_in_pwm0_out.xdma_event_intr2 MODE6 | INPUT */ /* bdq9100 camera */ /* 0x084 0x37 gpio1_31 | MODE7 | INPUT | PULLUPEN */ 0x09C 0x37 /* gpio2_5 | MODE7 | INPUT | PULLUPEN */ 0x07C 0x37 /* gpio1_29 | MODE7 | INPUT | PULLUPEN */ >; }; }; }; fragment@1 { target = <&gpmc>; depth = <1>; /* only create devices on depth 1 */ #address-cells = <1>; #size-cells = <1>; ranges; __overlay__ { status = "okay"; #address-cells = <2>; #size-cells = <1>; pinctrl-names = "default"; pinctrl-0 = <&gpmc_pins>; /* chip select ranges */ ranges = <0 0 0x08000000 0x10000000>, /* bootloader has this enabled */ <1 0 0x18000000 0x08000000>, <2 0 0x20000000 0x08000000>, <3 0 0x28000000 0x08000000>, <4 0 0x30000000 0x08000000>, <5 0 0x38000000 0x04000000>, <6 0 0x3c000000 0x04000000>; camera{ compatible = "bdq9100"; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&bdq9100_config_pins>; reg = <1 0 0x01000000>; /*CSn1*/ bank-width = <2>; /* GPMC_CONFIG1_DEVICESIZE(1) */ gpmc,sync-read; /* GPMC_CONFIG1_READTYPE_ASYNC */ gpmc,sync-write; /* GPMC_CONFIG1_WRITETYPE_ASYNC */ gpmc,clk-activation-ns = <0>; /* GPMC_CONFIG1_CLKACTIVATIONTIME(2) */ gpmc,mux-add-data = <0>; /* GPMC_CONFIG1_MUXTYPE(0) */ gpmc,sync-clk-ps = <20000>; /* CONFIG2 */ gpmc,cs-on-ns = <0>; gpmc,cs-rd-off-ns = <100>; gpmc,cs-wr-off-ns = <100>; /*<40>; */ gpmc,adv-on-ns = <0>; /* CONFIG3 */ gpmc,adv-rd-off-ns = <20>; gpmc,adv-wr-off-ns = <20>; gpmc,we-on-ns = <20>; /* CONFIG4 */ gpmc,we-off-ns = <40>; gpmc,oe-on-ns = <20>; gpmc,oe-off-ns = <100>; gpmc,page-burst-access-ns = <20>; /* CONFIG 5 */ gpmc,access-ns = <80>; gpmc,rd-cycle-ns = <120>; gpmc,wr-cycle-ns = <60>; gpmc,wr-access-ns = <40>; /* CONFIG 6 */ gpmc,wr-data-mux-bus-ns = <20>; /* dma channel */ dmas = <&edma 20>; dma-names = "bdq"; /* tw9910 video decoder */ bdq-9100,decoder { i2c-adapter = <&i2c2>; /* need it to stop the whinning */ #address-cells = <1>; #size-cells = <0>; /* fake i2c device node */ fake_tw9910 { compatible = "techwell,tw9910"; reg = <0x44>; /* buswidth e MPOUT */ buswidth = <16>; /* TW9910 em 16 bits */ mpout = <6>; /* MPOUT como FIELD */ }; }; }; }; }; };