linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] ARM: dts: sti: Introduce 4KOpen (stih418-b2264) board
@ 2021-01-28  7:58 Alain Volmat
  2021-01-28 13:08 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Alain Volmat @ 2021-01-28  7:58 UTC (permalink / raw)
  To: Arnd Bergmann, Olof Johansson, soc, Rob Herring, Patrice Chotard,
	linux-arm-kernel, devicetree, linux-kernel
  Cc: avolmat

4KOpen (B2264) is a board based on the STMicroelectronics STiH418 soc:
  - 2GB DDR
  - HDMI
  - Ethernet 1000-BaseT
  - PCIe (mini PCIe connector)
  - MicroSD slot
  - USB2 and USB3 connectors
  - Sata
  - 40 pins GPIO header

Signed-off-by: Alain Volmat <avolmat@me.com>
---
 arch/arm/boot/dts/Makefile          |   3 +-
 arch/arm/boot/dts/stih418-b2264.dts | 127 ++++++++++++++++++++++++++++
 2 files changed, 129 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/stih418-b2264.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 3d1ea0b25168..5ad1b0854b66 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1059,7 +1059,8 @@ dtb-$(CONFIG_ARCH_STI) += \
 	stih407-b2120.dtb \
 	stih410-b2120.dtb \
 	stih410-b2260.dtb \
-	stih418-b2199.dtb
+	stih418-b2199.dtb \
+	stih418-b2264.dtb
 dtb-$(CONFIG_ARCH_STM32) += \
 	stm32f429-disco.dtb \
 	stm32f469-disco.dtb \
diff --git a/arch/arm/boot/dts/stih418-b2264.dts b/arch/arm/boot/dts/stih418-b2264.dts
new file mode 100644
index 000000000000..55529cd7c8a6
--- /dev/null
+++ b/arch/arm/boot/dts/stih418-b2264.dts
@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (C) 2021 STMicroelectronics
+ * Author: Alain Volmat <avolmat@me.com>
+ */
+/dts-v1/;
+#include "stih418.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+/ {
+	model = "STiH418 B2264";
+	compatible = "st,stih418-b2264", "st,stih418";
+
+	chosen {
+		bootargs = "console=ttyAS0,115200 clk_ignore_unused";
+		stdout-path = &sbc_serial0;
+	};
+
+	memory@40000000 {
+		device_type = "memory";
+		reg = <0x40000000 0xc0000000>;
+	};
+
+	cpus {
+		cpu@0 {
+			operating-points-v2 = <&cpu_opp_table>;
+			/* u-boot puts hpen in SBC dmem at 0xb8 offset */
+			cpu-release-addr = <0x94100b8>;
+		};
+		cpu@1 {
+			operating-points-v2 = <&cpu_opp_table>;
+			/* u-boot puts hpen in SBC dmem at 0xb8 offset */
+			cpu-release-addr = <0x94100b8>;
+		};
+		cpu@2 {
+			operating-points-v2 = <&cpu_opp_table>;
+			/* u-boot puts hpen in SBC dmem at 0xb8 offset */
+			cpu-release-addr = <0x94100b8>;
+		};
+		cpu@3 {
+			operating-points-v2 = <&cpu_opp_table>;
+			/* u-boot puts hpen in SBC dmem at 0xb8 offset */
+			cpu-release-addr = <0x94100b8>;
+		};
+	};
+
+	cpu_opp_table: opp_table {
+		compatible = "operating-points-v2";
+		opp-shared;
+
+		opp00 {
+			opp-hz = /bits/ 64 <500000000>;
+			opp-microvolt = <784000>;
+		};
+		opp01 {
+			opp-hz = /bits/ 64 <800000000>;
+			opp-microvolt = <784000>;
+		};
+		opp02 {
+			opp-hz = /bits/ 64 <1200000000>;
+			opp-microvolt = <784000>;
+		};
+		opp03 {
+			opp-hz = /bits/ 64 <1500000000>;
+			opp-microvolt = <784000>;
+		};
+	};
+
+	aliases {
+		ttyAS0 = &sbc_serial0;
+		ethernet0 = &ethernet0;
+	};
+};
+
+&ehci0 {
+	status = "okay";
+};
+
+&ethernet0 {
+	phy-mode = "rgmii";
+	pinctrl-0 = <&pinctrl_rgmii1 &pinctrl_rgmii1_mdio_1>;
+	st,tx-retime-src = "clkgen";
+
+	snps,reset-gpio = <&pio0 7 0>;
+	snps,reset-active-low;
+	snps,reset-delays-us = <0 10000 1000000>;
+
+	status = "okay";
+};
+
+&miphy28lp_phy {
+	phy_port0: port@9b22000 {
+		st,sata-gen = <2>; /* SATA GEN3 */
+		st,osc-rdy;
+	};
+};
+
+&mmc0 {
+	status = "okay";
+};
+
+&ohci1 {
+	status = "okay";
+};
+
+&pwm1 {
+	status = "okay";
+};
+
+&rng11 {
+	status = "disabled";
+};
+
+&sata0 {
+	status = "okay";
+};
+
+&sbc_serial0 {
+	status = "okay";
+};
+
+&spifsm {
+	status = "okay";
+};
+
+&st_dwc3 {
+	status = "okay";
+};
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] ARM: dts: sti: Introduce 4KOpen (stih418-b2264) board
  2021-01-28  7:58 [PATCH 2/2] ARM: dts: sti: Introduce 4KOpen (stih418-b2264) board Alain Volmat
@ 2021-01-28 13:08 ` Arnd Bergmann
  2021-01-28 21:18   ` Alain Volmat
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2021-01-28 13:08 UTC (permalink / raw)
  To: Alain Volmat
  Cc: DTML, Arnd Bergmann, Patrice Chotard, linux-kernel, SoC Team,
	Rob Herring, Olof Johansson, Linux ARM

On Thu, Jan 28, 2021 at 8:58 AM Alain Volmat <avolmat@me.com> wrote:
>
> 4KOpen (B2264) is a board based on the STMicroelectronics STiH418 soc:
>   - 2GB DDR
>   - HDMI
>   - Ethernet 1000-BaseT
>   - PCIe (mini PCIe connector)
>   - MicroSD slot
>   - USB2 and USB3 connectors
>   - Sata
>   - 40 pins GPIO header
>
> Signed-off-by: Alain Volmat <avolmat@me.com>

The changelog text seems fine here.

> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (C) 2021 STMicroelectronics
> + * Author: Alain Volmat <avolmat@me.com>
> + */
> +/dts-v1/;
> +#include "stih418.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +/ {
> +       model = "STiH418 B2264";
> +       compatible = "st,stih418-b2264", "st,stih418";
> +
> +       chosen {
> +               bootargs = "console=ttyAS0,115200 clk_ignore_unused";
> +               stdout-path = &sbc_serial0;
> +       };

I don't think the bootargs should be there, both are just hacks
when things don't work correctly. If they don't, then try to fix them
first, by making sure that all clocks are properly listed, and that the
stdou-path points the working console.

> +&rng11 {
> +       status = "disabled";
> +};

Why do you disable the random number generator?

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] ARM: dts: sti: Introduce 4KOpen (stih418-b2264) board
  2021-01-28 13:08 ` Arnd Bergmann
@ 2021-01-28 21:18   ` Alain Volmat
  0 siblings, 0 replies; 3+ messages in thread
From: Alain Volmat @ 2021-01-28 21:18 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: DTML, Arnd Bergmann, Patrice Chotard, linux-kernel, SoC Team,
	Rob Herring, Olof Johansson, Linux ARM

Hi Arnd,

thanks for the comments and sorry for the large 'To' list. In my v2 I'll
limit to Patrice Chotard (STi maintainer).

On Thu, Jan 28, 2021 at 02:08:51PM +0100, Arnd Bergmann wrote:
> On Thu, Jan 28, 2021 at 8:58 AM Alain Volmat <avolmat@me.com> wrote:
> >
> > 4KOpen (B2264) is a board based on the STMicroelectronics STiH418 soc:
> >   - 2GB DDR
> >   - HDMI
> >   - Ethernet 1000-BaseT
> >   - PCIe (mini PCIe connector)
> >   - MicroSD slot
> >   - USB2 and USB3 connectors
> >   - Sata
> >   - 40 pins GPIO header
> >
> > Signed-off-by: Alain Volmat <avolmat@me.com>
> 
> The changelog text seems fine here.
> 
> > +// SPDX-License-Identifier: GPL-2.0-only
> > +/*
> > + * Copyright (C) 2021 STMicroelectronics
> > + * Author: Alain Volmat <avolmat@me.com>
> > + */
> > +/dts-v1/;
> > +#include "stih418.dtsi"
> > +#include <dt-bindings/gpio/gpio.h>
> > +/ {
> > +       model = "STiH418 B2264";
> > +       compatible = "st,stih418-b2264", "st,stih418";
> > +
> > +       chosen {
> > +               bootargs = "console=ttyAS0,115200 clk_ignore_unused";
> > +               stdout-path = &sbc_serial0;
> > +       };
> 
> I don't think the bootargs should be there, both are just hacks
> when things don't work correctly. If they don't, then try to fix them
> first, by making sure that all clocks are properly listed, and that the
> stdou-path points the working console.

Indeed, bootargs can be cleaned up. console is not necessary, however
it's going to be hard to get rid of the clk_ignore_unused now and I'd
prefer to keep it now, in the same way as for the other sti DTs.

> 
> > +&rng11 {
> > +       status = "disabled";
> > +};
> 
> Why do you disable the random number generator?

I shouldn't have putted this within the board DT. This rng11 is not
available on the STiH418.
In the v2 serie I'll had a separate commit to fix the stih418.dtsi instead.

Alain

> 
>        Arnd


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-28 21:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28  7:58 [PATCH 2/2] ARM: dts: sti: Introduce 4KOpen (stih418-b2264) board Alain Volmat
2021-01-28 13:08 ` Arnd Bergmann
2021-01-28 21:18   ` Alain Volmat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).