From owner-freebsd-arm@freebsd.org Tue Aug 28 09:25:30 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEF811085C6D for ; Tue, 28 Aug 2018 09:25:30 +0000 (UTC) (envelope-from nmingotti@gmail.com) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B2C37B522 for ; Tue, 28 Aug 2018 09:25:30 +0000 (UTC) (envelope-from nmingotti@gmail.com) Received: by mail-wr1-x436.google.com with SMTP id 20-v6so862035wrb.12 for ; Tue, 28 Aug 2018 02:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=SyOAjAjPJU1oVfmSte2FuBYqrLGAj2hpnujG+zbtSZo=; b=bufkuXRbPeE9nUcjMussHIP2kuCff6rNZGOS+KfNPpOGRkCPnsCUTBWSai4xbc1t/p t/8o/GgurprCCFoF+TmOBHBzfdzbnsMbkJXd2yJBphS3WnsAk88qbI/rpop6hGkU+kLn SYOotZ7q8+obRIQFRwX/SrvzqMqCDvhNwEVz+iPMW38O8QwXmyRXm/w0Acp8xtNe9FTC SsPt4pcvRXgaObGSh7ZLuUApOxjLjI0y3Nmw+DcRy5dWouDp7d3+Wwuu50LsPzLV0muL Itfjr/pwSGFlBedgdEGspHdogxUre27kDKKgoJOjvkTt8g2xh3313SoxxZ+onIEMIuM7 m9QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=SyOAjAjPJU1oVfmSte2FuBYqrLGAj2hpnujG+zbtSZo=; b=oJ+roOXrigHu5yjNVvfM4j3lD8o2ke1ng9JNKBHxLDINDckpq0n35z8W4B4BqBMRwM SGBYqbImg1/Zo/BNXo/sL3OtzZ/5WYlKxz4A6cL+45HVxA35CuR7c6Zo8dmTiuS5/TOf uo63zzSn4C3nwJgW1Q3E5HOw5JPNkM9GWG9IIjSgGuPLgdeFEw9x/RTzas+JC5teMvy4 z65GG1A9VwUHYH8gYnON4InG5w9eVkG7MHt0QnlUCOdWUFPCccM4F+gT+FnRWaMJKRZz /z4+z2LQ3PN/t+FEiDE8tgmDOO6EYB+bENFvN87wDcOucAKuToGeuN5uyorKl8PLAWnz +DCQ== X-Gm-Message-State: APzg51B3KSGpRlFI3oA2SNeQgDe98Rq5leVRjfRglb76G0ibnm2v6hlr ao3C+oJH19kuLKXFOIobIpkGfkAw X-Google-Smtp-Source: ANB0VdbcxrykXQXxXJici9hgxsXKA8TAv14oQccknVkWuxf250iOGkooDr1pGY5/K2uWztbQM8Mefw== X-Received: by 2002:a5d:6984:: with SMTP id g4-v6mr519639wru.232.1535448328700; Tue, 28 Aug 2018 02:25:28 -0700 (PDT) Received: from [172.16.0.150] (net-188-219-105-237.cust.vodafonedsl.it. [188.219.105.237]) by smtp.gmail.com with ESMTPSA id 144-v6sm1164220wma.45.2018.08.28.02.25.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Aug 2018 02:25:27 -0700 (PDT) Subject: Re: PRU Overlay Problem To: =?UTF-8?Q?Manuel_St=c3=bchn?= , freebsd-arm@freebsd.org References: <20180828083719.Horde.UjXvypZvQtQt0b5qYhO7jVB@nextcloud.fritz.box> From: Nicola Mingotti Message-ID: Date: Tue, 28 Aug 2018 11:25:25 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180828083719.Horde.UjXvypZvQtQt0b5qYhO7jVB@nextcloud.fritz.box> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 09:25:31 -0000 Thank you Manuel ! your dts compiles & loads correctly, i also saw you are using a pin which seems free ... instead i mistook there, P9.28 (0x19c) is used by mcasp ;) ok, after pructl finish compiling i will try to run someting on the PRU. bye nicola On 08/28/18 10:37, Manuel Stühn wrote: > Nicola Mingotti – Tue, 28. August 2018 9:44 >> Also, i found this, in FreeBSD.11-1 decompiling the dtb i can see the pru >> definition: >> >> ------------------------------------------------------------------- >> #> cd /boot/dtb >> #> dtc -I dtb -O dts am335x-boneblack.dtb | less >> .... >> pruss@4A300000 { >> compatible = "ti,pruss-v2"; >> reg = <0x4a300000 0x80000>; >> interrupt-parent = <0x1>; >> interrupts = <0x14 0x15 0x16 0x17 0x18 0x19 >> 0x1a 0x1b>; >> }; >> ... >> ------------------------------------------------------------------- >> >> But, if i decompile the dtb in FreeBSD.12-ALPHA the only thing >> matching pru is >> --------------------------------- >> #> cd /boot/dtb >> #> dtc -I dtb -O dts am335x-boneblack.dtb | less >> .... >> pruss_ocp_gclk@530 { >> >> #clock-cells = <0x0>; >> compatible = >> "ti,mux-clock"; >> clocks = <0x1f 0x18>; >> reg = <0x530>; >> phandle = <0x20>; >> }; >> .... >> --------------------------------- >> >> Then, i guess the PRU description is nor present at the moment in >> FreeBSD-12-ALPHA >> >> Well, these are just my considerations, i may be totally wrong. Wild >> guesses. >> >> bye >> n. > I'd some access with this: > > # cat ti_pruss.dts > /dts-v1/; > /plugin/; > > /{ > compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; > version = "0001"; > > fragment@0 { > target-path = "/ocp"; > > __overlay__ { > pruss: pruss@4a300000 { > compatible = "ti,pruss-v2"; > reg = <0x4a300000 0x080000>; > interrupt-parent = <&intc>; > interrupts = <20 21 22 23 24 25 26 27>; > status = "okay"; > pinctrl-names = "default"; > pinctrl-0 = <&pru_pru_pins>; > }; > }; > }; > > fragment@1 { > target = <&am33xx_pinmux>; > //target-path = "/ocp/l4_wkup@44c00000/scm@210000/pinmux@800"; > __overlay__ { > > pru_pru_pins: pinmux_pru_pru_pins { > pinctrl-single,pins = < > 0x198 0x36 /* PRU0-2 */ > >; > }; > }; > }; > }; > > compiled with > # dtc -@ -I dts -O dtb ti_pruss.dts > /boot/dtb/overlays/ti_pruss.dtbo > > and attaching it via /boot/loader.conf on a recent CURRENT. > > -- > Manuel -- -------------------------- Dr. Nicola Mingotti R&D - Borghi Srl CTO - BondInsider --------------------------