[5/5] RFC: ARM64: dts: Add Low-Speed Connector to ZCU100

Message ID 20180618074556.6944-6-linus.walleij@linaro.org
State New
Headers show
Series
  • RFC: Mezzanine handling for 96boards
Related show

Commit Message

Linus Walleij June 18, 2018, 7:45 a.m.
This adds the low-speed connector to the ZCU100 rev C device
tree (also known as the Ultra96 board).

This is a proof-of-concept only, showing how it is possible
to populate a Secure96 board using the other patches in the
series.

If you comment out or delete the board {} node, you can
populate/depopulate the board from sysfs instead.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
 .../boot/dts/xilinx/zynqmp-zcu100-revC.dts    | 27 +++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

-- 
2.17.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Rob Herring June 19, 2018, 2:55 p.m. | #1
+David G

On Mon, Jun 18, 2018 at 1:45 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> This adds the low-speed connector to the ZCU100 rev C device

> tree (also known as the Ultra96 board).

>

> This is a proof-of-concept only, showing how it is possible

> to populate a Secure96 board using the other patches in the

> series.

>

> If you comment out or delete the board {} node, you can

> populate/depopulate the board from sysfs instead.

>

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  .../boot/dts/xilinx/zynqmp-zcu100-revC.dts    | 27 +++++++++++++++++--

>  1 file changed, 25 insertions(+), 2 deletions(-)

>

> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts

> index d62276e0e0a9..fc30497f248d 100644

> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts

> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts

> @@ -110,6 +110,28 @@

>                 compatible = "mmc-pwrseq-simple";

>                 reset-gpios = <&gpio 7 GPIO_ACTIVE_LOW>; /* WIFI_EN */

>         };

> +

> +       lscon: connector {

> +               compatible = "96boards,low-speed-connector";

> +               i2c0 = <&i2csw_0>;

> +               i2c1 = <&i2csw_1>;

> +               spi = <&spi0>;


David had suggested having an aliases node here for mapping things
like SPI and I2C. That actually seems like a good use for aliases
compared to the usual abuse to make Linux provide fixed numbering.

> +               gpios = <&gpio 36 GPIO_ACTIVE_HIGH>, /* GPIO-A */


Why aren't you using gpio-map? This is what it was defined for.

> +                       <&gpio 37 GPIO_ACTIVE_HIGH>, /* GPIO-B */

> +                       <&gpio 39 GPIO_ACTIVE_HIGH>, /* GPIO-C */

> +                       <&gpio 40 GPIO_ACTIVE_HIGH>, /* GPIO-D */

> +                       <&gpio 44 GPIO_ACTIVE_HIGH>, /* GPIO-E */

> +                       <&gpio 45 GPIO_ACTIVE_HIGH>, /* GPIO-F */

> +                       <&gpio 78 GPIO_ACTIVE_HIGH>, /* GPIO-G */

> +                       <&gpio 79 GPIO_ACTIVE_HIGH>, /* GPIO-H */

> +                       <&gpio 80 GPIO_ACTIVE_HIGH>, /* GPIO-I */

> +                       <&gpio 81 GPIO_ACTIVE_HIGH>, /* GPIO-J */

> +                       <&gpio 82 GPIO_ACTIVE_HIGH>, /* GPIO-K */

> +                       <&gpio 83 GPIO_ACTIVE_HIGH>; /* GPIO-L */

> +               board {

> +                       compatible = "96boards,secure96";


I'm all for putting things in the kernel/drivers for things we can't
nail down bindings for, but it really seems like you are punting all
the problems. Plus if we fully define how to handle the different
bindings, we'll likely end up with something different and
incompatible with what you have here.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Michal Simek June 22, 2018, 1:22 p.m. | #2
On 18.6.2018 09:45, Linus Walleij wrote:
> This adds the low-speed connector to the ZCU100 rev C device

> tree (also known as the Ultra96 board).

> 

> This is a proof-of-concept only, showing how it is possible

> to populate a Secure96 board using the other patches in the

> series.

> 

> If you comment out or delete the board {} node, you can

> populate/depopulate the board from sysfs instead.

> 

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  .../boot/dts/xilinx/zynqmp-zcu100-revC.dts    | 27 +++++++++++++++++--

>  1 file changed, 25 insertions(+), 2 deletions(-)

> 

> diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts

> index d62276e0e0a9..fc30497f248d 100644

> --- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts

> +++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts

> @@ -110,6 +110,28 @@

>  		compatible = "mmc-pwrseq-simple";

>  		reset-gpios = <&gpio 7 GPIO_ACTIVE_LOW>; /* WIFI_EN */

>  	};

> +

> +	lscon: connector {

> +		compatible = "96boards,low-speed-connector";

> +		i2c0 = <&i2csw_0>;

> +		i2c1 = <&i2csw_1>;

> +		spi = <&spi0>;

> +		gpios = <&gpio 36 GPIO_ACTIVE_HIGH>, /* GPIO-A */

> +		        <&gpio 37 GPIO_ACTIVE_HIGH>, /* GPIO-B */

> +			<&gpio 39 GPIO_ACTIVE_HIGH>, /* GPIO-C */

> +			<&gpio 40 GPIO_ACTIVE_HIGH>, /* GPIO-D */

> +			<&gpio 44 GPIO_ACTIVE_HIGH>, /* GPIO-E */

> +			<&gpio 45 GPIO_ACTIVE_HIGH>, /* GPIO-F */

> +			<&gpio 78 GPIO_ACTIVE_HIGH>, /* GPIO-G */

> +			<&gpio 79 GPIO_ACTIVE_HIGH>, /* GPIO-H */

> +			<&gpio 80 GPIO_ACTIVE_HIGH>, /* GPIO-I */

> +			<&gpio 81 GPIO_ACTIVE_HIGH>, /* GPIO-J */

> +			<&gpio 82 GPIO_ACTIVE_HIGH>, /* GPIO-K */

> +			<&gpio 83 GPIO_ACTIVE_HIGH>; /* GPIO-L */



This connector has also 2 uarts which you should have here too.

Thanks,
Michal


> +		board {

> +			compatible = "96boards,secure96";

> +		};

> +	};

>  };

>  

>  &dcc {

> @@ -134,8 +156,9 @@

>  			  "USB1_DIR", "USB1_DATA2", "USB1_NXT", "USB1_DATA0", "USB1_DATA1",

>  			  "USB1_STP", "USB1_DATA3", "USB1_DATA4", "USB1_DATA5", "USB1_DATA6",

>  			  "USB_DATA7", "WLAN_IRQ", "PMIC_IRQ", /* MIO end and EMIO start */

> -			  "", "",

> -			  "", "", "", "", "", "", "", "", "", "",

> +			  "GPIO-G", "GPIO-H",

> +			  "GPIO-I", "GPIO-J", "GPIO-K", "GPIO-L",

> +			  "", "", "", "", "", "",

>  			  "", "", "", "", "", "", "", "", "", "",

>  			  "", "", "", "", "", "", "", "", "", "",

>  			  "", "", "", "", "", "", "", "", "", "",

> 


--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
index d62276e0e0a9..fc30497f248d 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
+++ b/arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts
@@ -110,6 +110,28 @@ 
 		compatible = "mmc-pwrseq-simple";
 		reset-gpios = <&gpio 7 GPIO_ACTIVE_LOW>; /* WIFI_EN */
 	};
+
+	lscon: connector {
+		compatible = "96boards,low-speed-connector";
+		i2c0 = <&i2csw_0>;
+		i2c1 = <&i2csw_1>;
+		spi = <&spi0>;
+		gpios = <&gpio 36 GPIO_ACTIVE_HIGH>, /* GPIO-A */
+		        <&gpio 37 GPIO_ACTIVE_HIGH>, /* GPIO-B */
+			<&gpio 39 GPIO_ACTIVE_HIGH>, /* GPIO-C */
+			<&gpio 40 GPIO_ACTIVE_HIGH>, /* GPIO-D */
+			<&gpio 44 GPIO_ACTIVE_HIGH>, /* GPIO-E */
+			<&gpio 45 GPIO_ACTIVE_HIGH>, /* GPIO-F */
+			<&gpio 78 GPIO_ACTIVE_HIGH>, /* GPIO-G */
+			<&gpio 79 GPIO_ACTIVE_HIGH>, /* GPIO-H */
+			<&gpio 80 GPIO_ACTIVE_HIGH>, /* GPIO-I */
+			<&gpio 81 GPIO_ACTIVE_HIGH>, /* GPIO-J */
+			<&gpio 82 GPIO_ACTIVE_HIGH>, /* GPIO-K */
+			<&gpio 83 GPIO_ACTIVE_HIGH>; /* GPIO-L */
+		board {
+			compatible = "96boards,secure96";
+		};
+	};
 };
 
 &dcc {
@@ -134,8 +156,9 @@ 
 			  "USB1_DIR", "USB1_DATA2", "USB1_NXT", "USB1_DATA0", "USB1_DATA1",
 			  "USB1_STP", "USB1_DATA3", "USB1_DATA4", "USB1_DATA5", "USB1_DATA6",
 			  "USB_DATA7", "WLAN_IRQ", "PMIC_IRQ", /* MIO end and EMIO start */
-			  "", "",
-			  "", "", "", "", "", "", "", "", "", "",
+			  "GPIO-G", "GPIO-H",
+			  "GPIO-I", "GPIO-J", "GPIO-K", "GPIO-L",
+			  "", "", "", "", "", "",
 			  "", "", "", "", "", "", "", "", "", "",
 			  "", "", "", "", "", "", "", "", "", "",
 			  "", "", "", "", "", "", "", "", "", "",