Re: svn commit: r308458 - in head/sys: boot/fdt/dts/arm modules/dtb/am335x

2016-11-08 Thread Luiz Otavio O Souza
On 9 November 2016 at 02:26, Emmanuel Vadot wrote:
> On Wed, 9 Nov 2016 04:07:15 + (UTC)
> Luiz Otavio O Souza wrote:
>
>> Author: loos
>> Date: Wed Nov  9 04:07:15 2016
>> New Revision: 308458
>> URL: https://svnweb.freebsd.org/changeset/base/308458
>>
>> Log:
>>   Add the DTS for the Netgate SG-1000 (micro-Firewall).
>>
>>   The SG-1000 boots with GENERIC ARM kernel on -head.
>>
>>   Obtained from:  pfSense
>>   Sponsored by:   Rubicon Communications, LLC (Netgate)
>>
>> Added:
>>   head/sys/boot/fdt/dts/arm/ubmc.dtsi   (contents, props changed)
>>   head/sys/boot/fdt/dts/arm/ufw.dts   (contents, props changed)
>> Modified:
>>   head/sys/modules/dtb/am335x/Makefile
>
>  Hello Luiz,
>
>  Two things:
>
>  - If ubmc.dtsi is gnu licenced it shouldn't go in sys/boot/fdt/dts.
> It shouldn't go to sys/gnu/dts too as it's not from upstream.
>   - I don't understand why you didn't use the am33xx.dtsi from
> upstream, it is the way to go for dts.
>
>  The correct way to add support for this board would be :
>
>  1) Create a ubmc.dtsi that uses upstream am33xx.dtsi and submit it
> upstream (i.e. linux-arm), MIT/GPL dual licence
>  2) Create a ufw.dts and also submit it upstream (also MIT/GPL)
>  3) Since those are also MIT you could add them to sys/boot/fdt
>  4) When we will update the dts from upstream you can then remove them
> from sys/boot/fdt
>
>  But there would still be a problem since the am33xx.dtsi is not MIT/GPL
> licenced.
>  So I guess you don't have any other solution than dealing with DTS
> somewhere in the pfsense repository (maybe with package or something).
>
>  The DTS world is already a mess with it's licence and the fact that
> linux is the "official" place, so please do not add more :)

Hi Emmanuel,

Yes, you're right.  I forgot about the licence in this file.

This is not an issue for us in pfSense (we do not depend on this
change in FreeBSD), we want to provide support for the people that is
going to use/test FreeBSD on uFW.

As this is all our work, I'll redo the files and include our changes
in a single file.

FreeBSD is the upstream here, it is the first officially supported OS for uFW.

Thanks,
Luiz
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r308458 - in head/sys: boot/fdt/dts/arm modules/dtb/am335x

2016-11-08 Thread Emmanuel Vadot
On Wed, 9 Nov 2016 04:07:15 + (UTC)
Luiz Otavio O Souza  wrote:

> Author: loos
> Date: Wed Nov  9 04:07:15 2016
> New Revision: 308458
> URL: https://svnweb.freebsd.org/changeset/base/308458
> 
> Log:
>   Add the DTS for the Netgate SG-1000 (micro-Firewall).
>   
>   The SG-1000 boots with GENERIC ARM kernel on -head.
>   
>   Obtained from:  pfSense
>   Sponsored by:   Rubicon Communications, LLC (Netgate)
> 
> Added:
>   head/sys/boot/fdt/dts/arm/ubmc.dtsi   (contents, props changed)
>   head/sys/boot/fdt/dts/arm/ufw.dts   (contents, props changed)
> Modified:
>   head/sys/modules/dtb/am335x/Makefile

 Hello Luiz,

 Two things:

 - If ubmc.dtsi is gnu licenced it shouldn't go in sys/boot/fdt/dts.
It shouldn't go to sys/gnu/dts too as it's not from upstream.
  - I don't understand why you didn't use the am33xx.dtsi from
upstream, it is the way to go for dts.

 The correct way to add support for this board would be :

 1) Create a ubmc.dtsi that uses upstream am33xx.dtsi and submit it
upstream (i.e. linux-arm), MIT/GPL dual licence
 2) Create a ufw.dts and also submit it upstream (also MIT/GPL)
 3) Since those are also MIT you could add them to sys/boot/fdt
 4) When we will update the dts from upstream you can then remove them
from sys/boot/fdt

 But there would still be a problem since the am33xx.dtsi is not MIT/GPL
licenced.
 So I guess you don't have any other solution than dealing with DTS
somewhere in the pfsense repository (maybe with package or something).

 The DTS world is already a mess with it's licence and the fact that
linux is the "official" place, so please do not add more :)

> Added: head/sys/boot/fdt/dts/arm/ubmc.dtsi
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/sys/boot/fdt/dts/arm/ubmc.dtsi   Wed Nov  9 04:07:15 2016
> (r308458)
> @@ -0,0 +1,315 @@
> +/*
> + * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
> + *
> + * 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.
> + *
> + * $FreeBSD$
> + */
> +
> +/ {
> + memory {
> + device_type = "memory";
> + reg = <0x8000 0x1000>; /* 256 MB */
> + };
> +
> + vmmcsd_fixed: fixedregulator@0 {
> + compatible = "regulator-fixed";
> + regulator-name = "vmmcsd_fixed";
> + regulator-min-microvolt = <330>;
> + regulator-max-microvolt = <330>;
> + };
> +};
> +
> +_pinmux {
> + pinctrl-names = "default";
> + pinctrl-0 = <_pin>;
> +
> + i2c0_pins: pinmux_i2c0_pins {
> + pinctrl-single,pins = <
> + AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)   
> /* i2c0_sda.i2c0_sda */
> + AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)   
> /* i2c0_scl.i2c0_scl */
> + >;
> + };
> +
> + i2c1_pins: pinmux_i2c1_pins {
> + pinctrl-single,pins = <
> + AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE3)   
> /* uart0_ctsn.i2c1_sda */
> + AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE3)   
> /* uart0_rtsn.i2c1_scl */
> + >;
> + };
> +
> + spi0_pins: pinmux_spi0_pins {
> + pinctrl-single,pins = <
> + AM33XX_IOPAD(0x950, PIN_INPUT_PULLDOWN | MUX_MODE0) 
> /* spi0_sclk.spi0_sclk */
> + AM33XX_IOPAD(0x954, PIN_INPUT_PULLDOWN | MUX_MODE0) 
> /* spi0_d0.spi0_miso */
> + AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0)   
> /* spi0_d1.spi0_mosi */
> + AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0)   
> /* spi0_cs0.spi0_cs0 */
> + >;
> + };
> +
> + spi1_pins: pinmux_spi1_pins {
> + pinctrl-single,pins = <
> + AM33XX_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE2) 
> /* mii1_col.spi1_sclk */
> + AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE2) 
> /* mii1_crs.spi1_miso */
> + AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE2)   
> /* mii1_rx_er.spi1_mosi */
> + AM33XX_IOPAD(0x944, PIN_INPUT_PULLUP | MUX_MODE2)   
> /* rmii1_ref_clk.spi1_cs0 */
> + >;
> + };
> +
> + uart0_pins: pinmux_uart0_pins {
> + pinctrl-single,pins = <
> + AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)   
> /* uart0_rxd.uart0_rxd */
> + AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
> /* uart0_txd.uart0_txd */
> + >;
> + };
> +
> + clkout2_pin: pinmux_clkout2_pin {
> + pinctrl-single,pins = <
> + AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3) 

svn commit: r308458 - in head/sys: boot/fdt/dts/arm modules/dtb/am335x

2016-11-08 Thread Luiz Otavio O Souza
Author: loos
Date: Wed Nov  9 04:07:15 2016
New Revision: 308458
URL: https://svnweb.freebsd.org/changeset/base/308458

Log:
  Add the DTS for the Netgate SG-1000 (micro-Firewall).
  
  The SG-1000 boots with GENERIC ARM kernel on -head.
  
  Obtained from:pfSense
  Sponsored by: Rubicon Communications, LLC (Netgate)

Added:
  head/sys/boot/fdt/dts/arm/ubmc.dtsi   (contents, props changed)
  head/sys/boot/fdt/dts/arm/ufw.dts   (contents, props changed)
Modified:
  head/sys/modules/dtb/am335x/Makefile

Added: head/sys/boot/fdt/dts/arm/ubmc.dtsi
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/boot/fdt/dts/arm/ubmc.dtsi Wed Nov  9 04:07:15 2016
(r308458)
@@ -0,0 +1,315 @@
+/*
+ * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ *
+ * $FreeBSD$
+ */
+
+/ {
+   memory {
+   device_type = "memory";
+   reg = <0x8000 0x1000>; /* 256 MB */
+   };
+
+   vmmcsd_fixed: fixedregulator@0 {
+   compatible = "regulator-fixed";
+   regulator-name = "vmmcsd_fixed";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   };
+};
+
+_pinmux {
+   pinctrl-names = "default";
+   pinctrl-0 = <_pin>;
+
+   i2c0_pins: pinmux_i2c0_pins {
+   pinctrl-single,pins = <
+   AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)   
/* i2c0_sda.i2c0_sda */
+   AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)   
/* i2c0_scl.i2c0_scl */
+   >;
+   };
+
+   i2c1_pins: pinmux_i2c1_pins {
+   pinctrl-single,pins = <
+   AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE3)   
/* uart0_ctsn.i2c1_sda */
+   AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE3)   
/* uart0_rtsn.i2c1_scl */
+   >;
+   };
+
+   spi0_pins: pinmux_spi0_pins {
+   pinctrl-single,pins = <
+   AM33XX_IOPAD(0x950, PIN_INPUT_PULLDOWN | MUX_MODE0) 
/* spi0_sclk.spi0_sclk */
+   AM33XX_IOPAD(0x954, PIN_INPUT_PULLDOWN | MUX_MODE0) 
/* spi0_d0.spi0_miso */
+   AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0)   
/* spi0_d1.spi0_mosi */
+   AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0)   
/* spi0_cs0.spi0_cs0 */
+   >;
+   };
+
+   spi1_pins: pinmux_spi1_pins {
+   pinctrl-single,pins = <
+   AM33XX_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE2) 
/* mii1_col.spi1_sclk */
+   AM33XX_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE2) 
/* mii1_crs.spi1_miso */
+   AM33XX_IOPAD(0x910, PIN_INPUT_PULLUP | MUX_MODE2)   
/* mii1_rx_er.spi1_mosi */
+   AM33XX_IOPAD(0x944, PIN_INPUT_PULLUP | MUX_MODE2)   
/* rmii1_ref_clk.spi1_cs0 */
+   >;
+   };
+
+   uart0_pins: pinmux_uart0_pins {
+   pinctrl-single,pins = <
+   AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)   
/* uart0_rxd.uart0_rxd */
+   AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)
/* uart0_txd.uart0_txd */
+   >;
+   };
+
+   clkout2_pin: pinmux_clkout2_pin {
+   pinctrl-single,pins = <
+   AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3)
/* xdma_event_intr1.clkout2 */
+   >;
+   };
+
+   cpsw_default: cpsw_default {
+   pinctrl-single,pins = <
+   /* Slave 1 */
+   AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
/* mii1_txen.rgmii_1_txen */
+   AM33XX_IOPAD(0x918, PIN_INPUT_PULLUP | MUX_MODE2)   
/* mii1_rxdv.rgmii_1_rxdv */
+   AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
/* mii1_txd3.rgmii_1_txd3 */
+   AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
/* mii1_txd2.rgmii_1_txd2 */
+   AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
/* mii1_txd1.rgmii_1_txd1 */
+   AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
/* mii1_txd0.rgmii_1_txd0 */
+   AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)
/* mii1_txclk.rgmii_1_txclk */
+   AM33XX_IOPAD(0x930, PIN_INPUT_PULLUP | MUX_MODE2)   
/* mii1_rxclk.rgmii_1_rxclk */
+   AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE2)   
/* mii1_rxd3.rgmii_1_rxd3 */
+   AM33XX_IOPAD(0x938,