From owner-freebsd-arm@freebsd.org Mon Aug 27 23:23:06 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 1CDD510990E0 for ; Mon, 27 Aug 2018 23:23:06 +0000 (UTC) (envelope-from nmingotti@gmail.com) Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 8EDE688288 for ; Mon, 27 Aug 2018 23:23:05 +0000 (UTC) (envelope-from nmingotti@gmail.com) Received: by mail-wr1-x42c.google.com with SMTP id g33-v6so552726wrd.1 for ; Mon, 27 Aug 2018 16:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language; bh=e1N5WY0KiuAIId+QuBIOlyFLz7HN9kBmU6f+TDoluVI=; b=bLzMpmSBzSO7GCNBfH3OvXelAzzv/a+rxWFyRccL/rTaU7PEMrWOMLtHnGpm2S9DHT y8/ZfwYUzphnBndETUZhLGhR0HBqT/jjCHQFRhXZG0wSJWHYSJ6jkS2ZoDXn8KDDl7ZU HZDI95ceVR2iTnvo5+am7ZTTr3zKXfq4MRmfbwQEPv2Jbk+wS0qTLsDhcDuCDD0JiBzr 1vnA2vS/aGwzSjzpXVewbZ/Ty0+Qhvb44SqJBtjLr2AIZ4cAtb+wAuH3r7k//d2VPK3B DKoY4jNQ0YpIDpR3YBhYvbHOO7aHskmXoLKogy4/wkLxyOay+jyEzJxbVSjCyUQY+2Nj IxjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language; bh=e1N5WY0KiuAIId+QuBIOlyFLz7HN9kBmU6f+TDoluVI=; b=AqYWQKy2jmRNH+4GJChcuZWt3zWGQsOcSbDo19IQHhtoPESpl0ipqCNzVErbfebARz 9oTzYumaZQbcGfbX5pfx1iHJfalTnYGrtz4z299jck594Ks1sPiKRoHIygAjpwcd4yfT uzkbQCAM3nk7WIldZVjaoOmxUCBOzsiXHlH8m6w+lDz2yysehfYQ9UYik9cumA4jf6WE c/U9hRhbD+MwzzHm4URnwV2L6z+rcDI2IXEVI0EQ8yA6sNHYJ/x38/oBRK9pjVXSBN5H qQ31LpTWoiZ9XIBLmPTmZlnVpEyO1IsNJpo1WnY6RHo7MnmbCvKUUu9N8atNjiipr3EM JSfg== X-Gm-Message-State: APzg51BoGe6a5F2OSQc2AgeF9qEkE74uYXkviwOnFB3322FvPOzu34bi DgIOzxtpr1ZYh4nRInzJiPizMwHO X-Google-Smtp-Source: ANB0VdZEo1saG5AO4lsIvFB23FBGw2ctYtlxPE5U9b8UWdDfgJC1kp3lgentllebOkaOjiA2w6+hlw== X-Received: by 2002:adf:c751:: with SMTP id b17-v6mr5489532wrh.134.1535412184138; Mon, 27 Aug 2018 16:23:04 -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 w10-v6sm396777wrp.31.2018.08.27.16.23.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Aug 2018 16:23:03 -0700 (PDT) To: "freebsd-arm@freebsd.org" From: Nicola Mingotti Subject: PRU Overlay Problem Message-ID: <9ac1edad-1fbf-0e4d-cb2f-3de077fff7f8@gmail.com> Date: Tue, 28 Aug 2018 01:23:01 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 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: Mon, 27 Aug 2018 23:23:06 -0000 Hi ! I am trying to configure the PRU in BeagleBone Black, FreeBSD-12-ALPHA. I found Rolf code online, it compiles and load => I  see the PRU https://obsigna.com/articles/1530973669.html Ok, the problem is I would like to configure the pins for the PRU either in the new format that Ian says on in the old one. I tried to modify Rolf code copying from various resources but i failed. I ask your help. I admint this thing for me is in good part obscure. In previous post I saw the DTS sources are here: https://github.com/freebsd/freebsd/tree/master/sys/gnu/dts/arm But, i can't find the file defining the PRU, so I am stuck, i don't know where to copy from;) here is were i landed : --------------------- new style overlay ---------- /dts-v1/; /plugin/; / {     compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";     exclusive-use = "P9.27","P9.28","pru0"; }; &am33xx_pinmux {      pru_pru_pins: pinmux_pru_pru_pins {         pinctrl-single,pins = <              0x1a4 0x05   /* P9.27 pr1_pru0_pru_r30_5, Mode 5 output pull-down   */              0x19c 0x26   /* P9.28 pr1_pru0_pru_r31_3, Mode 6 input pull-down    */         >;     }; }; /* &"/" {     ummm, problem, doh  */ &ocp {     #address-cells = <1>;     #size-cells = <1>;     pruss@4a300000 {         status = "okay";         compatible = "ti,pruss-v2";         ti,deassert-hard-reset = "pruss", "pruss";         reg = <0x4a300000 0x080000>;         ti,pintc-offset = <0x20000>;         interrupt-parent = <&intc>;         interrupts = <20 21 22 23 24 25 26 27>;         pinctrl-names = "default";         pinctrl-0 = <&pru_pru_pins>;     }; }; -------------------------------------- ---------- old style overlay ----------------- /dts-v1/; /plugin/; / {     compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";     exclusive-use = "P9.27","P9.28", "pru0";     pru_pru_pins: pinmux_pru_pru_pins {          pinctrl-single,pins = <                0x1a4 0x05   /* P9.27 pr1_pru0_pru_r30_5, Mode 5 output pull-down   */                0x19c 0x26   /* P9.28 pr1_pru0_pru_r31_3, Mode 6 input pull-down    */                >;    };    fragment@1 {     target-path="/";     __overlay__ {         ocp {             #address-cells = <1>;             #size-cells = <1>;             pruss@4a300000 {                 status = "okay";                 compatible = "ti,pruss-v2";                 ti,deassert-hard-reset = "pruss", "pruss";                 reg = <0x4a300000 0x080000>;                 ti,pintc-offset = <0x20000>;                 interrupt-parent = <&intc>;                 interrupts = <20 21 22 23 24 25 26 27>;                 pinctrl-0 = <&pru_pru_pins>;             };         };     };   }; }; --------------------------------------------------- bye Nicola -- -------------------------- Dr. Nicola Mingotti R&D - Borghi Srl CTO - BondInsider --------------------------