soc.lore.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 34/43] ARM: dts: add device tree for ep93xx Soc
  2023-04-24 12:34 ` [PATCH 34/43] ARM: dts: add device tree for ep93xx Soc Nikita Shubin
@ 2023-04-24 11:28   ` Arnd Bergmann
  2023-04-28 15:13     ` Nikita Shubin
  2023-04-28 21:56     ` Kris Bahnsen
  0 siblings, 2 replies; 17+ messages in thread
From: Arnd Bergmann @ 2023-04-24 11:28 UTC (permalink / raw)
  To: Nikita Shubin
  Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, Olof Johansson,
	soc, Rob Herring, Krzysztof Kozlowski, linux-arm-kernel,
	devicetree, linux-kernel, Lukasz Majewski, support

On Mon, Apr 24, 2023, at 14:34, Nikita Shubin wrote:
> This adds a divice for Cirrus ep93xx SoC amd ts7250 board that has been
> my testing target for ep93xx device support.
>
> Also inluded device tree for Liebherr BK3.1 board through it's not a
> complete support.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>

Can you describe which parts are missing for BK3.1 in the
changelog? I'm fairly sure that Liebherr is still supporting
this board, but I don't have a contact to add to Cc here.

I've added Lukasz Majewski to Cc here, as he originally worked
on BK3.1 and likely either has the hardware or knows someone
who does.  Technologic Systems also lists the ts7250 as supported
on their website, but the only contact I found for them is the
generic support@embeddedTS.com. In case someone from Technologic
is available for giving the series a spin, see [1] for the
full set of patches.

     Arnd

[1] https://lore.kernel.org/all/20230424123522.18302-1-nikita.shubin@maquefel.me/

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

* Re: [PATCH 00/43] ep93xx device tree conversion
  2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
@ 2023-04-24 11:31 ` Arnd Bergmann
  2023-04-24 22:29   ` Jakub Kicinski
  2023-04-24 12:34 ` [PATCH 34/43] ARM: dts: add device tree for ep93xx Soc Nikita Shubin
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 17+ messages in thread
From: Arnd Bergmann @ 2023-04-24 11:31 UTC (permalink / raw)
  To: Nikita Shubin
  Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
	David S . Miller, Jonathan Neuschäfer, Russell King,
	Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
	Alexandre Belloni, Andy Shevchenko, Bartosz Golaszewski,
	Brian Norris, Chuanhong Guo, Conor.Dooley, Damien Le Moal,
	Daniel Lezcano, Dmitry Torokhov, Emil Renner Berthing,
	Eric Dumazet, Florian Fainelli, Guenter Roeck, Hartley Sweeten,
	Heiko Stübner, Hitomi Hasegawa, Jakub Kicinski,
	Jaroslav Kysela, Jean Delvare, Joel Stanley, Jonathan Cameron,
	Krzysztof Kozlowski, Damien Le Moal, Liam Girdwood, Liang Yang,
	Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
	Masahiro Yamada, Michael Turquette, Miquel Raynal,
	Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
	Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
	Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
	Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
	Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
	Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
	Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
	linux-arm-kernel, linux-clk, open list:GPIO SUBSYSTEM, linux-ide,
	linux-input, linux-kernel, linux-mtd, linux-pm, linux-pwm,
	linux-rtc, linux-spi, linux-watchdog, Netdev, soc

On Mon, Apr 24, 2023, at 14:34, Nikita Shubin wrote:
> This series aims to convert ep93xx from platform to full device tree support.
>
> Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
>
> Thank you Linus and Arnd for your support, review and comments, sorry 
> if i missed something -
> these series are quite big for me.
>
> Big thanks to Alexander Sverdlin for his testing, support, review, 
> fixes and patches.

Thanks a lot for your continued work. I can't merge any of this at
the moment since the upstream merge window just opened, but I'm
happy to take this all through the soc tree for 6.5, provided we
get the sufficient Acks from the subsystem maintainers. Merging
it through each individual tree would take a lot longer, so I
hope we can avoid that.

      Arnd

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

* [PATCH 00/43] ep93xx device tree conversion
@ 2023-04-24 12:34 Nikita Shubin
  2023-04-24 11:31 ` Arnd Bergmann
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Nikita Shubin @ 2023-04-24 12:34 UTC (permalink / raw)
  Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
	David S. Miller, Jonathan Neuschäfer, Russell King (Oracle),
	Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
	Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
	Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
	Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
	Emil Renner Berthing, Eric Dumazet, Florian Fainelli,
	Guenter Roeck, Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa,
	Jakub Kicinski, Jaroslav Kysela, Jean Delvare, Joel Stanley,
	Jonathan Cameron, Krzysztof Kozlowski, Le Moal, Liam Girdwood,
	Liang Yang, Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
	Masahiro Yamada, Michael Turquette, Miquel Raynal,
	Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
	Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
	Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
	Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
	Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
	Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
	Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
	linux-arm-kernel, linux-clk, linux-gpio, linux-ide, linux-input,
	linux-kernel, linux-mtd, linux-pm, linux-pwm, linux-rtc,
	linux-spi, linux-watchdog, netdev, soc

This series aims to convert ep93xx from platform to full device tree support.

Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.

Thank you Linus and Arnd for your support, review and comments, sorry if i missed something -
these series are quite big for me.

Big thanks to Alexander Sverdlin for his testing, support, review, fixes and patches.

Alexander Sverdlin (4):
  ARM: dts: ep93xx: Add ADC node
  ARM: dts: ep93xx: Add I2S and AC97 nodes
  ARM: dts: ep93xx: Add EDB9302 DT
  ASoC: cirrus: edb93xx: Delete driver

Nikita Shubin (39):
  gpio: ep93xx: split device in multiple
  soc: Add SoC driver for Cirrus ep93xx
  dt-bindings: pinctrl: Add DT bindings ep93xx pinctrl
  pinctrl: add a Cirrus ep93xx SoC pin controller
  dt-bindings: timers: add DT bindings for Cirrus EP93xx
  clocksource: ep93xx: Add driver for Cirrus Logic EP93xx
  dt-bindings: rtc: add DT bindings for Cirrus EP93xx
  rtc: ep93xx: add DT support for Cirrus EP93xx
  dt-bindings: watchdog: add DT bindings for Cirrus EP93x
  watchdog: ep93xx: add DT support for Cirrus EP93xx
  dt-bindings: clock: add DT bindings for Cirrus EP93xx
  clk: ep93xx: add DT support for Cirrus EP93xx
  power: reset: Add a driver for the ep93xx reset
  dt-bindings: pwm: Add DT bindings ep93xx PWM
  pwm: ep93xx: add DT support for Cirrus EP93xx
  dt-bindings: spi: Add DT bindings ep93xx spi
  spi: ep93xx: add DT support for Cirrus EP93xx
  dt-bindings: net: Add DT bindings ep93xx eth
  net: cirrus: add DT support for Cirrus EP93xx
  dt-bindings: dma: Add DT bindings ep93xx dma
  dma: cirrus: add DT support for Cirrus EP93xx
  dt-bindings: mtd: add DT bindings for ts7250 nand
  mtd: ts72xx_nand: add platform helper
  dt-bindings: ata: Add DT bindings ep93xx pata
  pata: cirrus: add DT support for Cirrus EP93xx
  dt-bindings: input: Add DT bindings ep93xx keypad
  input: keypad: ep93xx: add DT support for Cirrus EP93xx
  dt-bindings: rtc: Add DT binding m48t86 rtc
  rtc: m48t86: add DT support for m48t86
  dt-bindings: wdt: Add DT binding ts72xx wdt
  wdt: ts72xx: add DT support for ts72xx
  dt-bindings: gpio: Add DT bindings ep93xx gpio
  gpio: ep93xx: add DT support for gpio-ep93xx
  ARM: dts: add device tree for ep93xx Soc
  ARM: ep93xx: DT for the Cirrus ep93xx SoC platforms
  pwm: ep93xx: drop legacy pinctrl
  input: keypad: ep93xx: drop legacy pinctrl
  ARM: ep93xx: soc: drop defines
  ARM: ep93xx: delete all boardfiles

 .../devicetree/bindings/arm/ep93xx.yaml       |   99 +
 .../bindings/ata/cirrus,ep93xx-pata.yaml      |   40 +
 .../bindings/dma/cirrus,ep93xx-dma-m2m.yaml   |   66 +
 .../bindings/dma/cirrus,ep93xx-dma-m2p.yaml   |  102 +
 .../devicetree/bindings/gpio/gpio-ep93xx.yaml |  161 ++
 .../bindings/input/cirrus,ep93xx-keypad.yaml  |  123 ++
 .../bindings/mtd/technologic,nand.yaml        |   56 +
 .../bindings/net/cirrus,ep93xx_eth.yaml       |   51 +
 .../pinctrl/cirrus,ep93xx-pinctrl.yaml        |   66 +
 .../bindings/pwm/cirrus,ep93xx-pwm.yaml       |   45 +
 .../bindings/rtc/cirrus,ep93xx-rtc.yaml       |   32 +
 .../bindings/rtc/dallas,rtc-m48t86.yaml       |   33 +
 .../devicetree/bindings/spi/spi-ep93xx.yaml   |   68 +
 .../bindings/timer/cirrus,ep93xx-timer.yaml   |   41 +
 .../bindings/watchdog/cirrus,ep93xx-wdt.yaml  |   38 +
 .../watchdog/technologic,ts72xx-wdt.yaml      |   39 +
 arch/arm/Makefile                             |    1 -
 arch/arm/boot/dts/Makefile                    |    1 +
 arch/arm/boot/dts/ep93xx-bk3.dts              |   96 +
 arch/arm/boot/dts/ep93xx-edb9302.dts          |  150 ++
 arch/arm/boot/dts/ep93xx-ts7250.dts           |  113 ++
 arch/arm/boot/dts/ep93xx.dtsi                 |  466 +++++
 arch/arm/mach-ep93xx/Kconfig                  |   20 +-
 arch/arm/mach-ep93xx/Makefile                 |   11 -
 arch/arm/mach-ep93xx/core.c                   | 1017 ----------
 arch/arm/mach-ep93xx/dma.c                    |  114 --
 arch/arm/mach-ep93xx/edb93xx.c                |  344 ----
 arch/arm/mach-ep93xx/ep93xx-regs.h            |   38 -
 arch/arm/mach-ep93xx/gpio-ep93xx.h            |  111 --
 arch/arm/mach-ep93xx/hardware.h               |   25 -
 arch/arm/mach-ep93xx/irqs.h                   |   76 -
 arch/arm/mach-ep93xx/platform.h               |   42 -
 arch/arm/mach-ep93xx/soc.h                    |  212 --
 arch/arm/mach-ep93xx/ts72xx.c                 |  422 ----
 arch/arm/mach-ep93xx/ts72xx.h                 |   94 -
 arch/arm/mach-ep93xx/vision_ep9307.c          |  311 ---
 drivers/ata/pata_ep93xx.c                     |    9 +
 drivers/clk/Kconfig                           |    8 +
 drivers/clk/Makefile                          |    1 +
 .../clock.c => drivers/clk/clk-ep93xx.c       |  491 +++--
 drivers/clocksource/Kconfig                   |   11 +
 drivers/clocksource/Makefile                  |    1 +
 .../clocksource}/timer-ep93xx.c               |  143 +-
 drivers/dma/ep93xx_dma.c                      |  119 +-
 drivers/gpio/gpio-ep93xx.c                    |  329 ++--
 drivers/input/keyboard/ep93xx_keypad.c        |   25 +-
 drivers/mtd/nand/raw/Kconfig                  |    8 +
 drivers/mtd/nand/raw/Makefile                 |    1 +
 drivers/mtd/nand/raw/ts72xx_nand.c            |   94 +
 drivers/net/ethernet/cirrus/ep93xx_eth.c      |   49 +-
 drivers/pinctrl/Kconfig                       |    7 +
 drivers/pinctrl/Makefile                      |    1 +
 drivers/pinctrl/pinctrl-ep93xx.c              | 1698 +++++++++++++++++
 drivers/power/reset/Kconfig                   |   10 +
 drivers/power/reset/Makefile                  |    1 +
 drivers/power/reset/ep93xx-restart.c          |   65 +
 drivers/pwm/pwm-ep93xx.c                      |   24 +-
 drivers/rtc/rtc-ep93xx.c                      |    8 +
 drivers/rtc/rtc-m48t86.c                      |   10 +
 drivers/soc/Kconfig                           |    1 +
 drivers/soc/Makefile                          |    1 +
 drivers/soc/cirrus/Kconfig                    |   11 +
 drivers/soc/cirrus/Makefile                   |    2 +
 drivers/soc/cirrus/soc-ep93xx.c               |  134 ++
 drivers/spi/spi-ep93xx.c                      |   31 +-
 drivers/watchdog/ep93xx_wdt.c                 |    8 +
 drivers/watchdog/ts72xx_wdt.c                 |    8 +
 .../dt-bindings/clock/cirrus,ep93xx-clock.h   |   53 +
 include/linux/platform_data/dma-ep93xx.h      |    3 +
 include/linux/soc/cirrus/ep93xx.h             |   28 +-
 sound/soc/cirrus/Kconfig                      |    9 -
 sound/soc/cirrus/Makefile                     |    4 -
 sound/soc/cirrus/edb93xx.c                    |  119 --
 73 files changed, 4796 insertions(+), 3453 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/arm/ep93xx.yaml
 create mode 100644 Documentation/devicetree/bindings/ata/cirrus,ep93xx-pata.yaml
 create mode 100644 Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2m.yaml
 create mode 100644 Documentation/devicetree/bindings/dma/cirrus,ep93xx-dma-m2p.yaml
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-ep93xx.yaml
 create mode 100644 Documentation/devicetree/bindings/input/cirrus,ep93xx-keypad.yaml
 create mode 100644 Documentation/devicetree/bindings/mtd/technologic,nand.yaml
 create mode 100644 Documentation/devicetree/bindings/net/cirrus,ep93xx_eth.yaml
 create mode 100644 Documentation/devicetree/bindings/pinctrl/cirrus,ep93xx-pinctrl.yaml
 create mode 100644 Documentation/devicetree/bindings/pwm/cirrus,ep93xx-pwm.yaml
 create mode 100644 Documentation/devicetree/bindings/rtc/cirrus,ep93xx-rtc.yaml
 create mode 100644 Documentation/devicetree/bindings/rtc/dallas,rtc-m48t86.yaml
 create mode 100644 Documentation/devicetree/bindings/spi/spi-ep93xx.yaml
 create mode 100644 Documentation/devicetree/bindings/timer/cirrus,ep93xx-timer.yaml
 create mode 100644 Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml
 create mode 100644 Documentation/devicetree/bindings/watchdog/technologic,ts72xx-wdt.yaml
 create mode 100644 arch/arm/boot/dts/ep93xx-bk3.dts
 create mode 100644 arch/arm/boot/dts/ep93xx-edb9302.dts
 create mode 100644 arch/arm/boot/dts/ep93xx-ts7250.dts
 create mode 100644 arch/arm/boot/dts/ep93xx.dtsi
 delete mode 100644 arch/arm/mach-ep93xx/Makefile
 delete mode 100644 arch/arm/mach-ep93xx/core.c
 delete mode 100644 arch/arm/mach-ep93xx/dma.c
 delete mode 100644 arch/arm/mach-ep93xx/edb93xx.c
 delete mode 100644 arch/arm/mach-ep93xx/ep93xx-regs.h
 delete mode 100644 arch/arm/mach-ep93xx/gpio-ep93xx.h
 delete mode 100644 arch/arm/mach-ep93xx/hardware.h
 delete mode 100644 arch/arm/mach-ep93xx/irqs.h
 delete mode 100644 arch/arm/mach-ep93xx/platform.h
 delete mode 100644 arch/arm/mach-ep93xx/soc.h
 delete mode 100644 arch/arm/mach-ep93xx/ts72xx.c
 delete mode 100644 arch/arm/mach-ep93xx/ts72xx.h
 delete mode 100644 arch/arm/mach-ep93xx/vision_ep9307.c
 rename arch/arm/mach-ep93xx/clock.c => drivers/clk/clk-ep93xx.c (60%)
 rename {arch/arm/mach-ep93xx => drivers/clocksource}/timer-ep93xx.c (51%)
 create mode 100644 drivers/mtd/nand/raw/ts72xx_nand.c
 create mode 100644 drivers/pinctrl/pinctrl-ep93xx.c
 create mode 100644 drivers/power/reset/ep93xx-restart.c
 create mode 100644 drivers/soc/cirrus/Kconfig
 create mode 100644 drivers/soc/cirrus/Makefile
 create mode 100644 drivers/soc/cirrus/soc-ep93xx.c
 create mode 100644 include/dt-bindings/clock/cirrus,ep93xx-clock.h
 delete mode 100644 sound/soc/cirrus/edb93xx.c

-- 
2.39.2


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

* [PATCH 34/43] ARM: dts: add device tree for ep93xx Soc
  2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
  2023-04-24 11:31 ` Arnd Bergmann
@ 2023-04-24 12:34 ` Nikita Shubin
  2023-04-24 11:28   ` Arnd Bergmann
  2023-04-26 20:56 ` [PATCH 00/43] ep93xx device tree conversion Linus Walleij
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 17+ messages in thread
From: Nikita Shubin @ 2023-04-24 12:34 UTC (permalink / raw)
  Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, Arnd Bergmann,
	Olof Johansson, soc, Rob Herring, Krzysztof Kozlowski,
	linux-arm-kernel, devicetree, linux-kernel

This adds a divice for Cirrus ep93xx SoC amd ts7250 board that has been
my testing target for ep93xx device support.

Also inluded device tree for Liebherr BK3.1 board through it's not a
complete support.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
 arch/arm/boot/dts/Makefile          |   1 +
 arch/arm/boot/dts/ep93xx-bk3.dts    |  96 ++++++
 arch/arm/boot/dts/ep93xx-ts7250.dts | 113 ++++++++
 arch/arm/boot/dts/ep93xx.dtsi       | 433 ++++++++++++++++++++++++++++
 4 files changed, 643 insertions(+)
 create mode 100644 arch/arm/boot/dts/ep93xx-bk3.dts
 create mode 100644 arch/arm/boot/dts/ep93xx-ts7250.dts
 create mode 100644 arch/arm/boot/dts/ep93xx.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index efe4152e5846..e6f48deeabed 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1653,3 +1653,4 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-vegman-n110.dtb \
 	aspeed-bmc-vegman-rx20.dtb \
 	aspeed-bmc-vegman-sx20.dtb
+dtb-$(CONFIG_ARCH_EP93XX) += ep93xx-ts7250.dtb
diff --git a/arch/arm/boot/dts/ep93xx-bk3.dts b/arch/arm/boot/dts/ep93xx-bk3.dts
new file mode 100644
index 000000000000..c477af54ab56
--- /dev/null
+++ b/arch/arm/boot/dts/ep93xx-bk3.dts
@@ -0,0 +1,96 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for Liebherr controller BK3.1 based on Cirrus EP9302 SoC
+ */
+/dts-v1/;
+#include "ep93xx.dtsi"
+
+/ {
+	model = "Liebherr controller BK3.1";
+	compatible = "liebherr,bk3", "cirrus,ep93xx";
+
+	memory {
+		device_type = "memory";
+	};
+
+	soc {
+		nand-parts@0 {
+			compatible = "technologic,ts7200-nand", "gen_nand";
+			reg = <0x60000000 0x8000000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "System";
+				reg = <0x00000000 0x01e00000>;
+				read-only;
+			};
+
+			partition@20000 {
+				label = "Data";
+				reg = <0x01e00000 0x05f20000>;
+			};
+
+			partition@7d20000 {
+				label = "RedBoot";
+				reg = <0x07d20000 0x002e0000>;
+				read-only;
+			};
+		};
+
+		syscon: syscon@80930000 {
+			pinctrl: pinctrl {
+				compatible = "cirrus,ep9301-pinctrl";
+			};
+		};
+
+		gpio1: gpio@80840004 {
+			/* PWM */
+			gpio-ranges = <&pinctrl 6 163 1>;
+		};
+	};
+};
+
+&gpio1 {
+	/* PWM */
+	gpio-ranges = <&pinctrl 6 163 1>;
+};
+
+&gpio4 {
+	gpio-ranges = <&pinctrl 0 97 2>;
+	status = "okay";
+};
+
+&gpio6 {
+	gpio-ranges = <&pinctrl 0 87 2>;
+	status = "okay";
+};
+
+&gpio7 {
+	gpio-ranges = <&pinctrl 2 199 4>;
+	status = "okay";
+};
+
+&i2c {
+	status = "okay";
+};
+
+&spi0: spi@808a0000 {
+	cs-gpios = <&gpio5 3 0>;
+	use_dma;
+	status = "okay";
+};
+
+&eth0 {
+	copy_addr;
+	phy_id = < 1 >;
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/ep93xx-ts7250.dts b/arch/arm/boot/dts/ep93xx-ts7250.dts
new file mode 100644
index 000000000000..6562780333a3
--- /dev/null
+++ b/arch/arm/boot/dts/ep93xx-ts7250.dts
@@ -0,0 +1,113 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for Technologic Systems ts7250 board based on Cirrus EP9302 SoC
+ */
+/dts-v1/;
+#include "ep93xx.dtsi"
+
+/ {
+	compatible = "technologic,ts7250", "cirrus,ep9301";
+	model = "TS-7250 SBC";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	memory@0 {
+		device_type = "memory";
+		/* should be set from ATAGS */
+		reg = <0x00000000 0x02000000>,
+			  <0x000530c0 0x01fdd000>;
+	};
+
+	soc {
+		nand-parts@0 {
+			compatible = "technologic,ts7200-nand", "gen_nand";
+			reg = <0x60000000 0x8000000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "TS-BOOTROM";
+				reg = <0x00000000 0x00020000>;
+				read-only;
+			};
+
+			partition@20000 {
+				label = "Linux";
+				reg = <0x00020000 0x07d00000>;
+			};
+
+			partition@7d20000 {
+				label = "RedBoot";
+				reg = <0x07d20000 0x002e0000>;
+				read-only;
+			};
+		};
+
+		syscon: syscon@80930000 {
+			pinctrl: pinctrl {
+				compatible = "cirrus,ep9301-pinctrl";
+			};
+		};
+
+		rtc1: rtc@10800000 {
+			compatible = "dallas,rtc-m48t86";
+			reg = <0x10800000 0x1>,
+			<0x11700000 0x1>;
+		};
+
+		watchdog1: watchdog@23800000 {
+			compatible = "technologic,ts7200-wdt";
+			reg = <0x23800000 0x01>,
+			      <0x23c00000 0x01>;
+			timeout-sec = <30>;
+		};
+	};
+};
+
+&gpio1 {
+	/* PWM */
+	gpio-ranges = <&pinctrl 6 163 1>;
+};
+
+&gpio4 {
+	gpio-ranges = <&pinctrl 0 97 2>;
+	status = "okay";
+};
+
+&gpio6 {
+	gpio-ranges = <&pinctrl 0 87 2>;
+	status = "okay";
+};
+
+&gpio7 {
+	gpio-ranges = <&pinctrl 2 199 4>;
+	status = "okay";
+};
+
+&i2c0 {
+	status = "okay";
+};
+
+&spi0 {
+	cs-gpios = <&gpio5 2 0>;
+	status = "okay";
+
+	tmp122_spi: tmp122@0 {
+		compatible = "ti,tmp122";
+		reg = <0>;
+		spi-max-frequency = <2000000>;
+	};
+};
+
+&eth0 {
+	copy_addr;
+	phy_id = < 1 >;
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/ep93xx.dtsi b/arch/arm/boot/dts/ep93xx.dtsi
new file mode 100644
index 000000000000..67ecfde539af
--- /dev/null
+++ b/arch/arm/boot/dts/ep93xx.dtsi
@@ -0,0 +1,433 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for Cirrus Logic systems EP93XX SoC
+ */
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/clock/cirrus,ep93xx-clock.h>
+/ {
+	soc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		compatible = "simple-bus";
+
+		syscon: syscon@80930000 {
+			compatible = "cirrus,ep9301-syscon",
+						"syscon", "simple-mfd";
+			reg = <0x80930000 0x1000>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+
+			ep9301-reboot {
+				compatible = "cirrus,ep9301-reboot";
+			};
+
+			pinctrl: pinctrl {
+				regmap = <&syscon>;
+
+				spi_default_pins: pinctrl-spi {
+					function = "spi";
+					groups = "ssp";
+				};
+
+				ac97_default_pins: pinctrl-ac97 {
+					function = "ac97";
+					groups = "ac97";
+				};
+
+				i2s_on_ssp_pins: pinctrl-i2sonssp {
+					function = "i2s";
+					groups = "i2s_on_ssp";
+				};
+
+				i2s_on_ac97_pins: pinctrl-i2sonac97 {
+					function = "i2s";
+					groups = "i2s_on_ac97";
+				};
+
+				gpio1_default_pins: pinctrl-gpio1 {
+					function = "gpio1";
+					groups = "gpio1agrp";
+				};
+
+				pwm1_default_pins: pinctrl-pwm1 {
+					function = "pwm";
+					groups = "pwm1";
+				};
+
+				gpio2_default_pins: pinctrl-gpio2 {
+					function = "gpio2";
+					groups = "gpio2agrp";
+				};
+
+				gpio3_default_pins: pinctrl-gpio3 {
+					function = "gpio3";
+					groups = "gpio3agrp";
+				};
+
+				keypad_default_pins: pinctrl-keypad {
+					function = "keypad";
+					groups = "keypadgrp";
+				};
+
+				gpio4_default_pins: pinctrl-gpio4 {
+					function = "gpio4";
+					groups = "gpio4agrp";
+				};
+
+				gpio6_default_pins: pinctrl-gpio6 {
+					function = "gpio6";
+					groups = "gpio6agrp";
+				};
+
+				gpio7_default_pins: pinctrl-gpio7 {
+					function = "gpio7";
+					groups = "gpio7agrp";
+				};
+
+				ide_default_pins: pinctrl-ide {
+					function = "pata";
+					groups = "idegrp";
+				};
+
+				lcd_on_dram0_pins: pinctrl-rasteronsdram0 {
+					function = "lcd";
+					groups = "rasteronsdram0grp";
+				};
+
+				lcd_on_dram3_pins: pinctrl-rasteronsdram3 {
+					function = "lcd";
+					groups = "rasteronsdram3grp";
+				};
+			};
+		};
+
+		vic0: interrupt-controller@800b0000 {
+			compatible = "arm,pl192-vic";
+			interrupt-controller;
+			reg = <0x800b0000 0x1000>;
+			#interrupt-cells = <1>;
+			valid-mask = <0x7ffffffc>;
+			valid-wakeup-mask = <0x0>;
+		};
+
+		vic1: interrupt-controller@800c0000 {
+			compatible = "arm,pl192-vic";
+			interrupt-controller;
+			reg = <0x800c0000 0x1000>;
+			#interrupt-cells = <1>;
+			valid-mask = <0x1fffffff>;
+			valid-wakeup-mask = <0x0>;
+		};
+
+		timer: timer@80810000 {
+			compatible = "cirrus,ep9301-timer";
+			reg = <0x80810000 0x100>;
+			interrupt-parent = <&vic1>;
+			interrupts = <19>;
+		};
+
+		dma0: dma-controller@80000000 {
+			compatible = "cirrus,ep9301-dma-m2p";
+			reg = <0x80000000 0x0040>,
+				<0x80000040 0x0040>,
+				<0x80000080 0x0040>,
+				<0x800000c0 0x0040>,
+				<0x80000240 0x0040>,
+				<0x80000200 0x0040>,
+				<0x800002c0 0x0040>,
+				<0x80000280 0x0040>,
+				<0x80000340 0x0040>,
+				<0x80000300 0x0040>;
+			clocks = <&syscon EP93XX_CLK_M2P0>,
+				<&syscon EP93XX_CLK_M2P1>,
+				<&syscon EP93XX_CLK_M2P2>,
+				<&syscon EP93XX_CLK_M2P3>,
+				<&syscon EP93XX_CLK_M2P4>,
+				<&syscon EP93XX_CLK_M2P5>,
+				<&syscon EP93XX_CLK_M2P6>,
+				<&syscon EP93XX_CLK_M2P7>,
+				<&syscon EP93XX_CLK_M2P8>,
+				<&syscon EP93XX_CLK_M2P9>;
+			clock-names = "m2p0", "m2p1",
+				"m2p2", "m2p3",
+				"m2p4", "m2p5",
+				"m2p6", "m2p7",
+				"m2p8", "m2p9";
+			dma-channels = <10>;
+			interrupt-parent = <&vic0>;
+			interrupts = <7>, <8>, <9>, <10>, <11>,
+				<12>, <13>, <14>, <15>, <16>;
+		};
+
+		dma1: dma-controller@80000100 {
+			compatible = "cirrus,ep9301-dma-m2m";
+			reg = <0x80000100 0x0040>,
+				<0x80000140 0x0040>;
+			clocks = <&syscon EP93XX_CLK_M2M0>,
+				<&syscon EP93XX_CLK_M2M1>;
+			clock-names = "m2m0", "m2m1";
+			dma-channels = <2>;
+			interrupt-parent = <&vic0>;
+			interrupts = <17>, <18>;
+		};
+
+		gpio0: gpio@80840000 {
+			compatible = "cirrus,ep9301-gpio";
+			chip-label = "A";
+			reg = <0x80840000 0x04>,
+			<0x80840010 0x04>,
+			<0x80840090 0x1c>;
+			reg-names = "data", "dir", "intr";
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			interrupt-parent = <&vic1>;
+			interrupts = <27>;
+		};
+
+		gpio1: gpio@80840004 {
+			compatible = "cirrus,ep9301-gpio";
+			chip-label = "B";
+			reg = <0x80840004 0x04>,
+			<0x80840014 0x04>,
+			<0x808400ac 0x1c>;
+			reg-names = "data", "dir", "intr";
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			interrupt-parent = <&vic1>;
+			interrupts = <27>;
+		};
+
+		gpio2: gpio@80840008 {
+			compatible = "cirrus,ep9301-gpio";
+			chip-label = "C";
+			reg = <0x80840008 0x04>,
+			<0x80840018 0x04>;
+			reg-names = "data", "dir";
+			gpio-controller;
+			#gpio-cells = <2>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio2_default_pins>;
+		};
+
+		gpio3: gpio@8084000c {
+			compatible = "cirrus,ep9301-gpio";
+			chip-label = "D";
+			reg = <0x8084000c 0x04>,
+			<0x8084001c 0x04>;
+			reg-names = "data", "dir";
+			gpio-controller;
+			#gpio-cells = <2>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio3_default_pins>;
+		};
+
+		gpio4: gpio@80840020 {
+			compatible = "cirrus,ep9301-gpio";
+			chip-label = "E";
+			reg = <0x80840020 0x04>,
+			<0x80840024 0x04>;
+			reg-names = "data", "dir";
+			gpio-controller;
+			#gpio-cells = <2>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio4_default_pins>;
+		};
+
+		gpio5: gpio@80840030 {
+			compatible = "cirrus,ep9301-gpio";
+			chip-label = "F";
+			reg = <0x80840030 0x04>,
+			<0x80840034 0x04>,
+			<0x8084004c 0x1c>;
+			reg-names = "data", "dir", "intr";
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			interrupts-extended = <&vic0 19>, <&vic0 20>,
+				<&vic0 21>, <&vic0 22>,
+				<&vic1 15>, <&vic1 16>,
+				<&vic1 17>, <&vic1 18>;
+		};
+
+		gpio6: gpio@80840038 {
+			compatible = "cirrus,ep9301-gpio";
+			chip-label = "G";
+			reg = <0x80840038 0x04>,
+			<0x8084003c 0x04>;
+			reg-names = "data", "dir";
+			gpio-controller;
+			#gpio-cells = <2>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio6_default_pins>;
+		};
+
+		gpio7: gpio@80840040 {
+			compatible = "cirrus,ep9301-gpio";
+			chip-label = "H";
+			reg = <0x80840040 0x04>,
+			<0x80840044 0x04>;
+			reg-names = "data", "dir";
+			gpio-controller;
+			#gpio-cells = <2>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio7_default_pins>;
+		};
+
+		ide: ide@800a0000 {
+			compatible = "cirrus,ep9312-pata";
+			reg = <0x800a0000 0x38>;
+			interrupt-parent = <&vic1>;
+			interrupts = <8>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&ide_default_pins>;
+		};
+
+		uart0: uart@808c0000 {
+			compatible = "arm,primecell";
+			reg = <0x808c0000 0x1000>;
+			arm,primecell-periphid = <0x00041010>;
+			clocks = <&syscon EP93XX_CLK_UART1>, <&syscon EP93XX_CLK_UART>;
+			clock-names = "apb:uart1", "apb_pclk";
+			interrupt-parent = <&vic1>;
+			interrupts = <20>;
+			status = "disabled";
+		};
+
+		uart1: uart@808d0000 {
+			compatible = "arm,primecell";
+			reg = <0x808d0000 0x1000>;
+			arm,primecell-periphid = <0x00041010>;
+			clocks = <&syscon EP93XX_CLK_UART2>, <&syscon EP93XX_CLK_UART>;
+			clock-names = "apb:uart2", "apb_pclk";
+			interrupt-parent = <&vic1>;
+			interrupts = <22>;
+			status = "disabled";
+		};
+
+		uart2: uart@808b0000 {
+			compatible = "arm,primecell";
+			reg = <0x808b0000 0x1000>;
+			arm,primecell-periphid = <0x00041010>;
+			clocks = <&syscon EP93XX_CLK_UART3>, <&syscon EP93XX_CLK_UART>;
+			clock-names = "apb:uart3", "apb_pclk";
+			interrupt-parent = <&vic1>;
+			interrupts = <23>;
+			status = "disabled";
+		};
+
+		eth0: eth@80010000 {
+			compatible = "cirrus,ep9301-eth";
+			reg = <0x80010000 0x10000>;
+			interrupt-parent = <&vic1>;
+			interrupts = <7>;
+		};
+
+		rtc0: rtc@80920000 {
+			compatible = "cirrus,ep9301-rtc";
+			reg = <0x80920000 0x100>;
+		};
+
+		spi0: spi@808a0000 {
+			compatible = "cirrus,ep9301-spi";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0x808a0000 0x18>;
+			interrupt-parent = <&vic1>;
+			interrupts = <21>;
+			clocks = <&syscon EP93XX_CLK_SPI>;
+			clock-names = "ep93xx-spi.0";
+			cs-gpios = <&gpio5 2 0>;
+			use_dma;
+			pinctrl-names = "default";
+			pinctrl-0 = <&spi_default_pins>;
+			status = "disabled";
+		};
+
+		watchdog0: watchdog@80940000 {
+			compatible = "cirrus,ep9301-wdt";
+			reg = <0x80940000 0x08>;
+		};
+
+		pwm0: pwm@80910000 {
+			compatible = "cirrus,ep9301-pwm";
+			reg = <0x80910000 0x10>;
+			clocks = <&syscon EP93XX_CLK_PWM>;
+			clock-names = "pwm_clk";
+			status = "disabled";
+		};
+
+		pwm1: pwm@80910020 {
+			compatible = "cirrus,ep9301-pwm";
+			reg = <0x80910020 0x10>;
+			clocks = <&syscon EP93XX_CLK_PWM>;
+			clock-names = "pwm_clk";
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&pwm1_default_pins>;
+		};
+
+		keypad: keypad@800f0000 {
+			compatible = "cirrus,ep9301-keypad";
+			reg = <0x800f0000 0x0c>;
+			interrupt-parent = <&vic0>;
+			interrupts = <29>;
+			clocks = <&syscon EP93XX_CLK_KEYPAD>;
+			clock-names = "ep93xx-keypad";
+			pinctrl-names = "default";
+			pinctrl-0 = <&keypad_default_pins>;
+			linux,keymap =
+						<KEY_UP>,
+						<KEY_DOWN>,
+						<KEY_VOLUMEDOWN>,
+						<KEY_HOME>,
+						<KEY_RIGHT>,
+						<KEY_LEFT>,
+						<KEY_ENTER>,
+						<KEY_VOLUMEUP>,
+						<KEY_F6>,
+						<KEY_F8>,
+						<KEY_F9>,
+						<KEY_F10>,
+						<KEY_F1>,
+						<KEY_F2>,
+						<KEY_F3>,
+						<KEY_POWER>;
+		};
+	};
+
+	i2c0: i2c0 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpio6 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpio6 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		led0 {
+			label = "grled";
+			gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+			function = LED_FUNCTION_HEARTBEAT;
+		};
+
+		led1 {
+			label = "rdled";
+			gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
+			function = LED_FUNCTION_FAULT;
+		};
+	};
+};
-- 
2.39.2


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

* Re: [PATCH 00/43] ep93xx device tree conversion
  2023-04-24 11:31 ` Arnd Bergmann
@ 2023-04-24 22:29   ` Jakub Kicinski
  2023-04-25  9:20     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 17+ messages in thread
From: Jakub Kicinski @ 2023-04-24 22:29 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Nikita Shubin, Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
	David S . Miller, Jonathan Neuschäfer, Russell King,
	Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
	Alexandre Belloni, Andy Shevchenko, Bartosz Golaszewski,
	Brian Norris, Chuanhong Guo, Conor.Dooley, Damien Le Moal,
	Daniel Lezcano, Dmitry Torokhov, Emil Renner Berthing,
	Eric Dumazet, Florian Fainelli, Guenter Roeck, Hartley Sweeten,
	Heiko Stübner, Hitomi Hasegawa, Jaroslav Kysela,
	Jean Delvare, Joel Stanley, Jonathan Cameron,
	Krzysztof Kozlowski, Damien Le Moal, Liam Girdwood, Liang Yang,
	Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
	Masahiro Yamada, Michael Turquette, Miquel Raynal,
	Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
	Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
	Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
	Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
	Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
	Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
	Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
	linux-arm-kernel, linux-clk, open list:GPIO SUBSYSTEM, linux-ide,
	linux-input, linux-kernel, linux-mtd, linux-pm, linux-pwm,
	linux-rtc, linux-spi, linux-watchdog, Netdev, soc

On Mon, 24 Apr 2023 13:31:25 +0200 Arnd Bergmann wrote:
> Thanks a lot for your continued work. I can't merge any of this at
> the moment since the upstream merge window just opened, but I'm
> happy to take this all through the soc tree for 6.5, provided we
> get the sufficient Acks from the subsystem maintainers. Merging
> it through each individual tree would take a lot longer, so I
> hope we can avoid that.

Is there a dependency between the patches?
-- 
pw-bot: nap

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

* Re: [PATCH 00/43] ep93xx device tree conversion
  2023-04-24 22:29   ` Jakub Kicinski
@ 2023-04-25  9:20     ` Krzysztof Kozlowski
  2023-04-25 13:27       ` Arnd Bergmann
  0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-25  9:20 UTC (permalink / raw)
  To: Jakub Kicinski, Arnd Bergmann
  Cc: Nikita Shubin, Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
	David S . Miller, Jonathan Neuschäfer, Russell King,
	Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
	Alexandre Belloni, Andy Shevchenko, Bartosz Golaszewski,
	Brian Norris, Chuanhong Guo, Conor.Dooley, Damien Le Moal,
	Daniel Lezcano, Dmitry Torokhov, Emil Renner Berthing,
	Eric Dumazet, Florian Fainelli, Guenter Roeck, Hartley Sweeten,
	Heiko Stübner, Hitomi Hasegawa, Jaroslav Kysela,
	Jean Delvare, Joel Stanley, Jonathan Cameron,
	Krzysztof Kozlowski, Damien Le Moal, Liam Girdwood, Liang Yang,
	Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
	Masahiro Yamada, Michael Turquette, Miquel Raynal,
	Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
	Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
	Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
	Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
	Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
	Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
	Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
	linux-arm-kernel, linux-clk, open list:GPIO SUBSYSTEM, linux-ide,
	linux-input, linux-kernel, linux-mtd, linux-pm, linux-pwm,
	linux-rtc, linux-spi, linux-watchdog, Netdev, soc

On 25/04/2023 00:29, Jakub Kicinski wrote:
> On Mon, 24 Apr 2023 13:31:25 +0200 Arnd Bergmann wrote:
>> Thanks a lot for your continued work. I can't merge any of this at
>> the moment since the upstream merge window just opened, but I'm
>> happy to take this all through the soc tree for 6.5, provided we
>> get the sufficient Acks from the subsystem maintainers. Merging
>> it through each individual tree would take a lot longer, so I
>> hope we can avoid that.
> 
> Is there a dependency between the patches?

I didn't get entire patchset and cover letter does not mention
dependencies, but usually there shouldn't be such. Maybe for the next
versions this should be split per subsystem?

Best regards,
Krzysztof


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

* Re: [PATCH 00/43] ep93xx device tree conversion
  2023-04-25  9:20     ` Krzysztof Kozlowski
@ 2023-04-25 13:27       ` Arnd Bergmann
  0 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2023-04-25 13:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Jakub Kicinski
  Cc: Nikita Shubin, Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
	David S . Miller, Jonathan Neuschäfer, Russell King,
	Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
	Alexandre Belloni, Andy Shevchenko, Bartosz Golaszewski,
	Brian Norris, Chuanhong Guo, Conor.Dooley, Damien Le Moal,
	Daniel Lezcano, Dmitry Torokhov, Emil Renner Berthing,
	Eric Dumazet, Florian Fainelli, Guenter Roeck, Hartley Sweeten,
	Heiko Stübner, Hitomi Hasegawa, Jaroslav Kysela,
	Jean Delvare, Joel Stanley, Jonathan Cameron,
	Krzysztof Kozlowski, Damien Le Moal, Liam Girdwood, Liang Yang,
	Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
	Masahiro Yamada, Michael Turquette, Miquel Raynal,
	Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
	Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
	Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
	Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
	Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
	Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
	Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
	linux-arm-kernel, linux-clk, open list:GPIO SUBSYSTEM, linux-ide,
	linux-input, linux-kernel, linux-mtd, linux-pm, linux-pwm,
	linux-rtc, linux-spi, linux-watchdog, Netdev, soc

On Tue, Apr 25, 2023, at 10:20, Krzysztof Kozlowski wrote:
> On 25/04/2023 00:29, Jakub Kicinski wrote:
>> On Mon, 24 Apr 2023 13:31:25 +0200 Arnd Bergmann wrote:
>>> Thanks a lot for your continued work. I can't merge any of this at
>>> the moment since the upstream merge window just opened, but I'm
>>> happy to take this all through the soc tree for 6.5, provided we
>>> get the sufficient Acks from the subsystem maintainers. Merging
>>> it through each individual tree would take a lot longer, so I
>>> hope we can avoid that.
>> 
>> Is there a dependency between the patches?
>
> I didn't get entire patchset and cover letter does not mention
> dependencies, but usually there shouldn't be such. Maybe for the next
> versions this should be split per subsystem?

Clearly the last patch that removes the board files depends on
all the previous patches, but I assume that the other ones
are all independent.

We don't do complete conversions from boardfiles to DT that often
any more, but in the past we tended to do this through a cross-
subsystem branch in the soc tree, which helps do it more quickly
and is less work for Nikita. In this case, I would make it a
separate top-level branch in the soc tree.

If anyone strongly feels that the patches should go through
the subsystem trees here, we'll take the longer path and
do the changes separately, with the boardfile removal
coming a release later.

     Arnd

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

* Re: [PATCH 00/43] ep93xx device tree conversion
  2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
  2023-04-24 11:31 ` Arnd Bergmann
  2023-04-24 12:34 ` [PATCH 34/43] ARM: dts: add device tree for ep93xx Soc Nikita Shubin
@ 2023-04-26 20:56 ` Linus Walleij
  2023-04-26 21:01   ` Mark Brown
  2023-05-16  3:47 ` Florian Fainelli
  2023-06-01  5:45 ` [PATCH v1 35/43] ARM: dts: add device tree for ep93xx Soc Nikita Shubin
  4 siblings, 1 reply; 17+ messages in thread
From: Linus Walleij @ 2023-04-26 20:56 UTC (permalink / raw)
  To: Nikita Shubin
  Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
	David S. Miller, Jonathan Neuschäfer, Russell King (Oracle),
	Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
	Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
	Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
	Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
	Emil Renner Berthing, Eric Dumazet, Florian Fainelli,
	Guenter Roeck, Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa,
	Jakub Kicinski, Jaroslav Kysela, Jean Delvare, Joel Stanley,
	Jonathan Cameron, Krzysztof Kozlowski, Le Moal, Liam Girdwood,
	Liang Yang, Lukasz Majewski, Lv Ruyi, Mark Brown,
	Masahiro Yamada, Michael Turquette, Miquel Raynal,
	Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
	Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
	Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
	Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
	Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
	Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
	Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
	linux-arm-kernel, linux-clk, linux-gpio, linux-ide, linux-input,
	linux-kernel, linux-mtd, linux-pm, linux-pwm, linux-rtc,
	linux-spi, linux-watchdog, netdev, soc

On Mon, Apr 24, 2023 at 11:35 AM Nikita Shubin
<nikita.shubin@maquefel.me> wrote:

> This series aims to convert ep93xx from platform to full device tree support.
>
> Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.

Neat, I'd say let's merge this for 6.5 once the final rough edges are
off. The DT bindings should be easy to fix.

This is a big patch set and the improvement to the ARM kernel it
brings is great, so I am a bit worried about over-review stalling the
merged. If there start to be nitpicky comments I would prefer that
we merge it and let minor comments and "nice-to-haves" be
addressed in-tree during the development cycle.

I encourage you to use b4 to manage the patch series if you
have time to learn it, it could help you:
https://people.kernel.org/monsieuricon/sending-a-kernel-patch-with-b4-part-1

Yours,
Linus Walleij

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

* Re: [PATCH 00/43] ep93xx device tree conversion
  2023-04-26 20:56 ` [PATCH 00/43] ep93xx device tree conversion Linus Walleij
@ 2023-04-26 21:01   ` Mark Brown
  2023-04-26 21:06     ` Linus Walleij
  0 siblings, 1 reply; 17+ messages in thread
From: Mark Brown @ 2023-04-26 21:01 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Nikita Shubin, Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
	David S. Miller, Jonathan Neuschäfer, Russell King (Oracle),
	Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
	Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
	Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
	Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
	Emil Renner Berthing, Eric Dumazet, Florian Fainelli,
	Guenter Roeck, Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa,
	Jakub Kicinski, Jaroslav Kysela, Jean Delvare, Joel Stanley,
	Jonathan Cameron, Krzysztof Kozlowski, Le Moal, Liam Girdwood,
	Liang Yang, Lukasz Majewski, Lv Ruyi, Masahiro Yamada,
	Michael Turquette, Miquel Raynal, Nathan Chancellor,
	Nick Desaulniers, Nicolas Saenz Julienne, Olof Johansson,
	Paolo Abeni, Qin Jian, Richard Weinberger, Rob Herring,
	Robert Jarzmik, Russell King, Sebastian Reichel, Sergey Shtylyov,
	Stephen Boyd, Sumanth Korikkar, Sven Peter, Takashi Iwai,
	Thierry Reding, Thomas Gleixner, Ulf Hansson, Vasily Gorbik,
	Vignesh Raghavendra, Vinod Koul, Walker Chen, Wim Van Sebroeck,
	Yinbo Zhu, alsa-devel, devicetree, dmaengine, linux-arm-kernel,
	linux-clk, linux-gpio, linux-ide, linux-input, linux-kernel,
	linux-mtd, linux-pm, linux-pwm, linux-rtc, linux-spi,
	linux-watchdog, netdev, soc

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

On Wed, Apr 26, 2023 at 10:56:53PM +0200, Linus Walleij wrote:

> This is a big patch set and the improvement to the ARM kernel it
> brings is great, so I am a bit worried about over-review stalling the
> merged. If there start to be nitpicky comments I would prefer that
> we merge it and let minor comments and "nice-to-haves" be
> addressed in-tree during the development cycle.

I'm really not enthusiastic about the SPI bindings being merged as-is.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 00/43] ep93xx device tree conversion
  2023-04-26 21:01   ` Mark Brown
@ 2023-04-26 21:06     ` Linus Walleij
  0 siblings, 0 replies; 17+ messages in thread
From: Linus Walleij @ 2023-04-26 21:06 UTC (permalink / raw)
  To: Mark Brown
  Cc: Nikita Shubin, Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
	David S. Miller, Jonathan Neuschäfer, Russell King (Oracle),
	Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
	Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
	Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
	Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
	Emil Renner Berthing, Eric Dumazet, Florian Fainelli,
	Guenter Roeck, Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa,
	Jakub Kicinski, Jaroslav Kysela, Jean Delvare, Joel Stanley,
	Jonathan Cameron, Krzysztof Kozlowski, Le Moal, Liam Girdwood,
	Liang Yang, Lukasz Majewski, Lv Ruyi, Masahiro Yamada,
	Michael Turquette, Miquel Raynal, Nathan Chancellor,
	Nick Desaulniers, Nicolas Saenz Julienne, Olof Johansson,
	Paolo Abeni, Qin Jian, Richard Weinberger, Rob Herring,
	Robert Jarzmik, Russell King, Sebastian Reichel, Sergey Shtylyov,
	Stephen Boyd, Sumanth Korikkar, Sven Peter, Takashi Iwai,
	Thierry Reding, Thomas Gleixner, Ulf Hansson, Vasily Gorbik,
	Vignesh Raghavendra, Vinod Koul, Walker Chen, Wim Van Sebroeck,
	Yinbo Zhu, alsa-devel, devicetree, dmaengine, linux-arm-kernel,
	linux-clk, linux-gpio, linux-ide, linux-input, linux-kernel,
	linux-mtd, linux-pm, linux-pwm, linux-rtc, linux-spi,
	linux-watchdog, netdev, soc

On Wed, Apr 26, 2023 at 11:02 PM Mark Brown <broonie@kernel.org> wrote:
> On Wed, Apr 26, 2023 at 10:56:53PM +0200, Linus Walleij wrote:
>
> > This is a big patch set and the improvement to the ARM kernel it
> > brings is great, so I am a bit worried about over-review stalling the
> > merged. If there start to be nitpicky comments I would prefer that
> > we merge it and let minor comments and "nice-to-haves" be
> > addressed in-tree during the development cycle.
>
> I'm really not enthusiastic about the SPI bindings being merged as-is.

Agree, the bindings are more important than the code IMO,
they tend to get written in stone.

Yours,
Linus Walleij

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

* Re: [PATCH 34/43] ARM: dts: add device tree for ep93xx Soc
  2023-04-24 11:28   ` Arnd Bergmann
@ 2023-04-28 15:13     ` Nikita Shubin
  2023-04-28 21:56     ` Kris Bahnsen
  1 sibling, 0 replies; 17+ messages in thread
From: Nikita Shubin @ 2023-04-28 15:13 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, Olof Johansson,
	soc, Rob Herring, Krzysztof Kozlowski, linux-arm-kernel,
	devicetree, linux-kernel, Lukasz Majewski, support

Hello Arnd!

On Mon, 2023-04-24 at 13:28 +0200, Arnd Bergmann wrote:
> On Mon, Apr 24, 2023, at 14:34, Nikita Shubin wrote:
> > This adds a divice for Cirrus ep93xx SoC amd ts7250 board that has
> > been
> > my testing target for ep93xx device support.
> > 
> > Also inluded device tree for Liebherr BK3.1 board through it's not
> > a
> > complete support.
> > 
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> 
> Can you describe which parts are missing for BK3.1 in the
> changelog? I'm fairly sure that Liebherr is still supporting
> this board, but I don't have a contact to add to Cc here.

The current dt implementation is missing:

- I2S
- MMC on SPI

I will add those nodes so it will be a complete dt, however i have no
possibility to test it.


> 
> I've added Lukasz Majewski to Cc here, as he originally worked
> on BK3.1 and likely either has the hardware or knows someone
> who does.  Technologic Systems also lists the ts7250 as supported
> on their website, but the only contact I found for them is the
> generic support@embeddedTS.com. In case someone from Technologic
> is available for giving the series a spin, see [1] for the
> full set of patches.
> 
>      Arnd
> 
> [1]
> https://lore.kernel.org/all/20230424123522.18302-1-nikita.shubin@maquefel.me/


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

* Re: [PATCH 34/43] ARM: dts: add device tree for ep93xx Soc
  2023-04-24 11:28   ` Arnd Bergmann
  2023-04-28 15:13     ` Nikita Shubin
@ 2023-04-28 21:56     ` Kris Bahnsen
  1 sibling, 0 replies; 17+ messages in thread
From: Kris Bahnsen @ 2023-04-28 21:56 UTC (permalink / raw)
  To: Arnd Bergmann, Nikita Shubin
  Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin, Olof Johansson,
	soc, Rob Herring, Krzysztof Kozlowski, linux-arm-kernel,
	devicetree, linux-kernel, Lukasz Majewski, Michael Peters

On Mon, 2023-04-24 at 13:28 +0200, Arnd Bergmann wrote:
> On Mon, Apr 24, 2023, at 14:34, Nikita Shubin wrote:
> > This adds a divice for Cirrus ep93xx SoC amd ts7250 board that has been
> > my testing target for ep93xx device support.
> > 
> > Also inluded device tree for Liebherr BK3.1 board through it's not a
> > complete support.
> > 
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> 
> Can you describe which parts are missing for BK3.1 in the
> changelog? I'm fairly sure that Liebherr is still supporting
> this board, but I don't have a contact to add to Cc here.
> 
> I've added Lukasz Majewski to Cc here, as he originally worked
> on BK3.1 and likely either has the hardware or knows someone
> who does.  Technologic Systems also lists the ts7250 as supported
> on their website, but the only contact I found for them is the
> generic support@embeddedTS.com. In case someone from Technologic
> is available for giving the series a spin, see [1] for the
> full set of patches.
> 
>      Arnd
> 
> [1] https://lore.kernel.org/all/20230424123522.18302-1-nikita.shubin@maquefel.me/

Thanks Nikita for putting this together and getting us some
details/notes off-list to get us testing this quickly.

We ran a TS-7250 with this series applied through some of
our basic testing and everything is working as expected.

Tested-by: Michael Peters <mpeters@embeddedTS.com>
Reviewed-by: Kris Bahnsen <kris@embeddedTS.com>

-Kris

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

* Re: [PATCH 00/43] ep93xx device tree conversion
  2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
                   ` (2 preceding siblings ...)
  2023-04-26 20:56 ` [PATCH 00/43] ep93xx device tree conversion Linus Walleij
@ 2023-05-16  3:47 ` Florian Fainelli
  2023-05-16 10:37   ` Nikita Shubin
  2023-06-01  5:45 ` [PATCH v1 35/43] ARM: dts: add device tree for ep93xx Soc Nikita Shubin
  4 siblings, 1 reply; 17+ messages in thread
From: Florian Fainelli @ 2023-05-16  3:47 UTC (permalink / raw)
  To: Nikita Shubin
  Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
	David S. Miller, Jonathan Neuschäfer, Russell King (Oracle),
	Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
	Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
	Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
	Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
	Emil Renner Berthing, Eric Dumazet, Guenter Roeck,
	Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa, Jakub Kicinski,
	Jaroslav Kysela, Jean Delvare, Joel Stanley, Jonathan Cameron,
	Krzysztof Kozlowski, Le Moal, Liam Girdwood, Liang Yang,
	Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
	Masahiro Yamada, Michael Turquette, Miquel Raynal,
	Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
	Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
	Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
	Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
	Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
	Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
	Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
	linux-arm-kernel, linux-clk, linux-gpio, linux-ide, linux-input,
	linux-kernel, linux-mtd, linux-pm, linux-pwm, linux-rtc,
	linux-spi, linux-watchdog, netdev, soc



On 4/24/2023 5:34 AM, Nikita Shubin wrote:
> This series aims to convert ep93xx from platform to full device tree support.
> 
> Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
> 
> Thank you Linus and Arnd for your support, review and comments, sorry if i missed something -
> these series are quite big for me.
> 
> Big thanks to Alexander Sverdlin for his testing, support, review, fixes and patches.

If anyone is interested I still have a TS-7300 board [1] that is fully 
functional and could be sent out to a new home.

https://www.embeddedts.com/products/TS-7300
-- 
Florian

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

* Re: [PATCH 00/43] ep93xx device tree conversion
  2023-05-16  3:47 ` Florian Fainelli
@ 2023-05-16 10:37   ` Nikita Shubin
  0 siblings, 0 replies; 17+ messages in thread
From: Nikita Shubin @ 2023-05-16 10:37 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Arnd Bergmann, Linus Walleij, Alexander Sverdlin,
	David S. Miller, Jonathan Neuschäfer, Russell King (Oracle),
	Uwe Kleine-König, Alessandro Zummo, Alexander Gordeev,
	Alexandre Belloni, Andy Shevchenko, Arnd Bergmann,
	Bartosz Golaszewski, Brian Norris, Chuanhong Guo, Conor Dooley,
	Damien Le Moal, Daniel Lezcano, Dmitry Torokhov,
	Emil Renner Berthing, Eric Dumazet, Guenter Roeck,
	Hartley Sweeten, Heiko Stuebner, Hitomi Hasegawa, Jakub Kicinski,
	Jaroslav Kysela, Jean Delvare, Joel Stanley, Jonathan Cameron,
	Krzysztof Kozlowski, Le Moal, Liam Girdwood, Liang Yang,
	Linus Walleij, Lukasz Majewski, Lv Ruyi, Mark Brown,
	Masahiro Yamada, Michael Turquette, Miquel Raynal,
	Nathan Chancellor, Nick Desaulniers, Nicolas Saenz Julienne,
	Olof Johansson, Paolo Abeni, Qin Jian, Richard Weinberger,
	Rob Herring, Robert Jarzmik, Russell King, Sebastian Reichel,
	Sergey Shtylyov, Stephen Boyd, Sumanth Korikkar, Sven Peter,
	Takashi Iwai, Thierry Reding, Thomas Gleixner, Ulf Hansson,
	Vasily Gorbik, Vignesh Raghavendra, Vinod Koul, Walker Chen,
	Wim Van Sebroeck, Yinbo Zhu, alsa-devel, devicetree, dmaengine,
	linux-arm-kernel, linux-clk, linux-gpio, linux-ide, linux-input,
	linux-kernel, linux-mtd, linux-pm, linux-pwm, linux-rtc,
	linux-spi, linux-watchdog, netdev, soc

Hello Florian!

On Mon, 2023-05-15 at 20:47 -0700, Florian Fainelli wrote:
> 
> 
> On 4/24/2023 5:34 AM, Nikita Shubin wrote:
> > This series aims to convert ep93xx from platform to full device
> > tree support.
> > 
> > Tested on ts7250 64 RAM/128 MiB Nand flash, edb9302.
> > 
> > Thank you Linus and Arnd for your support, review and comments,
> > sorry if i missed something -
> > these series are quite big for me.
> > 
> > Big thanks to Alexander Sverdlin for his testing, support, review,
> > fixes and patches.
> 
> If anyone is interested I still have a TS-7300 board [1] that is
> fully 
> functional and could be sent out to a new home.

Thank you kindly, i'll keep this in mind !

> 
> https://www.embeddedts.com/products/TS-7300


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

* [PATCH v1 35/43] ARM: dts: add device tree for ep93xx Soc
  2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
                   ` (3 preceding siblings ...)
  2023-05-16  3:47 ` Florian Fainelli
@ 2023-06-01  5:45 ` Nikita Shubin
  2023-06-01  8:30   ` Krzysztof Kozlowski
  4 siblings, 1 reply; 17+ messages in thread
From: Nikita Shubin @ 2023-06-01  5:45 UTC (permalink / raw)
  To: Alexander Sverdlin, Arnd Bergmann, Linus Walleij, Olof Johansson,
	soc, Rob Herring, Krzysztof Kozlowski
  Cc: Nikita Shubin, Michael Peters, Kris Bahnsen, linux-arm-kernel,
	devicetree, linux-kernel

This adds a divice for Cirrus ep93xx SoC amd ts7250 board that has been
my testing target for ep93xx device support.

Also inluded device tree for Liebherr BK3.1 board through it's not a
complete support.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---

Notes:
    v0 -> v1:
    
    - add empty chosen node
    - s/dallas,rtc-m48t86/st,m48t86/
    - changed phy_id to phy-handle
    - dropped gpio chip-label's
    - s/eth@80010000/ethernet@80010000
    - s/use_dma/ep9301,use-dma
    - added i2s to bk3

 arch/arm/boot/dts/Makefile          |   1 +
 arch/arm/boot/dts/ep93xx-bk3.dts    | 119 +++++++
 arch/arm/boot/dts/ep93xx-ts7250.dts | 132 ++++++++
 arch/arm/boot/dts/ep93xx.dtsi       | 466 ++++++++++++++++++++++++++++
 4 files changed, 718 insertions(+)
 create mode 100644 arch/arm/boot/dts/ep93xx-bk3.dts
 create mode 100644 arch/arm/boot/dts/ep93xx-ts7250.dts
 create mode 100644 arch/arm/boot/dts/ep93xx.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 59829fc90315..a68f868fffe7 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -1670,3 +1670,4 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
 	aspeed-bmc-vegman-n110.dtb \
 	aspeed-bmc-vegman-rx20.dtb \
 	aspeed-bmc-vegman-sx20.dtb
+dtb-$(CONFIG_ARCH_EP93XX) += ep93xx-ts7250.dtb
diff --git a/arch/arm/boot/dts/ep93xx-bk3.dts b/arch/arm/boot/dts/ep93xx-bk3.dts
new file mode 100644
index 000000000000..215587c498e6
--- /dev/null
+++ b/arch/arm/boot/dts/ep93xx-bk3.dts
@@ -0,0 +1,119 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for Liebherr controller BK3.1 based on Cirrus EP9302 SoC
+ */
+/dts-v1/;
+#include "ep93xx.dtsi"
+
+/ {
+	model = "Liebherr controller BK3.1";
+	compatible = "liebherr,bk3", "cirrus,ep9301";
+
+	chosen {
+	};
+
+	memory {
+		device_type = "memory";
+	};
+
+	soc {
+		nand-controller@60000000 {
+			compatible = "technologic,ts7200-nand";
+			reg = <0x60000000 0x8000000>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partitions {
+				compatible = "fixed-partitions";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				partition@0 {
+					label = "System";
+					reg = <0x00000000 0x01e00000>;
+					read-only;
+				};
+
+				partition@1e00000 {
+					label = "Data";
+					reg = <0x01e00000 0x05f20000>;
+				};
+
+				partition@7d20000 {
+					label = "RedBoot";
+					reg = <0x07d20000 0x002e0000>;
+					read-only;
+				};
+			};
+		};
+
+		syscon: syscon@80930000 {
+			pinctrl: pinctrl {
+				compatible = "cirrus,ep9301-pinctrl";
+			};
+		};
+
+		gpio1: gpio@80840004 {
+			/* PWM */
+			gpio-ranges = <&pinctrl 6 163 1>;
+		};
+	};
+};
+
+&gpio1 {
+	/* PWM */
+	gpio-ranges = <&pinctrl 6 163 1>;
+};
+
+&gpio4 {
+	gpio-ranges = <&pinctrl 0 97 2>;
+	status = "okay";
+};
+
+&gpio6 {
+	gpio-ranges = <&pinctrl 0 87 2>;
+	status = "okay";
+};
+
+&gpio7 {
+	gpio-ranges = <&pinctrl 2 199 4>;
+	status = "okay";
+};
+
+&i2c {
+	status = "okay";
+};
+
+&spi0: spi@808a0000 {
+	cs-gpios = <&gpio5 3 0>;
+	status = "okay";
+};
+
+&eth0 {
+	phy-handle = <&phy0>;
+};
+
+&mdio0 {
+	phy0: ethernet-phy@1 {
+		reg = <1>;
+		device_type = "ethernet-phy";
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&usb {
+	status = "okay";
+};
+
+&i2s {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s_on_ac97_pins>;
+	/delete-property/ status;
+};
diff --git a/arch/arm/boot/dts/ep93xx-ts7250.dts b/arch/arm/boot/dts/ep93xx-ts7250.dts
new file mode 100644
index 000000000000..40290e3cb9b3
--- /dev/null
+++ b/arch/arm/boot/dts/ep93xx-ts7250.dts
@@ -0,0 +1,132 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for Technologic Systems ts7250 board based on Cirrus EP9302 SoC
+ */
+/dts-v1/;
+#include "ep93xx.dtsi"
+
+/ {
+	compatible = "technologic,ts7250", "cirrus,ep9301";
+	model = "TS-7250 SBC";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	chosen {
+	};
+
+	memory@0 {
+		device_type = "memory";
+		/* should be set from ATAGS */
+		reg = <0x00000000 0x02000000>,
+			  <0x000530c0 0x01fdd000>;
+	};
+
+	soc {
+		nand-controller@60000000 {
+			compatible = "technologic,ts7200-nand";
+			reg = <0x60000000 0x8000000>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			partitions {
+				compatible = "fixed-partitions";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				partition@0 {
+					label = "TS-BOOTROM";
+					reg = <0x00000000 0x00020000>;
+					read-only;
+				};
+
+				partition@20000 {
+					label = "Linux";
+					reg = <0x00020000 0x07d00000>;
+				};
+
+				partition@7d20000 {
+					label = "RedBoot";
+					reg = <0x07d20000 0x002e0000>;
+					read-only;
+				};
+			};
+		};
+
+		syscon: syscon@80930000 {
+			pinctrl: pinctrl {
+				compatible = "cirrus,ep9301-pinctrl";
+			};
+		};
+
+		rtc1: rtc@10800000 {
+			compatible = "st,m48t86";
+			reg = <0x10800000 0x1>,
+				  <0x11700000 0x1>;
+		};
+
+		watchdog1: watchdog@23800000 {
+			compatible = "technologic,ts7200-wdt";
+			reg = <0x23800000 0x01>,
+			      <0x23c00000 0x01>;
+			timeout-sec = <30>;
+		};
+	};
+};
+
+&gpio1 {
+	/* PWM */
+	gpio-ranges = <&pinctrl 6 163 1>;
+};
+
+&gpio4 {
+	gpio-ranges = <&pinctrl 0 97 2>;
+	status = "okay";
+};
+
+&gpio6 {
+	gpio-ranges = <&pinctrl 0 87 2>;
+	status = "okay";
+};
+
+&gpio7 {
+	gpio-ranges = <&pinctrl 2 199 4>;
+	status = "okay";
+};
+
+&i2c0 {
+	status = "okay";
+};
+
+&spi0 {
+	cs-gpios = <&gpio5 2 0>;
+	status = "okay";
+
+	tmp122_spi: tmp122@0 {
+		compatible = "ti,tmp122";
+		reg = <0>;
+		spi-max-frequency = <2000000>;
+	};
+};
+
+&eth0 {
+	phy-handle = <&phy0>;
+};
+
+&mdio0 {
+	phy0: ethernet-phy@1 {
+		reg = <1>;
+		device_type = "ethernet-phy";
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+};
diff --git a/arch/arm/boot/dts/ep93xx.dtsi b/arch/arm/boot/dts/ep93xx.dtsi
new file mode 100644
index 000000000000..6da556ceaf04
--- /dev/null
+++ b/arch/arm/boot/dts/ep93xx.dtsi
@@ -0,0 +1,466 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree file for Cirrus Logic systems EP93XX SoC
+ */
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/clock/cirrus,ep93xx-clock.h>
+/ {
+	soc {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		compatible = "simple-bus";
+
+		syscon: syscon@80930000 {
+			compatible = "cirrus,ep9301-syscon",
+						"syscon", "simple-mfd";
+			reg = <0x80930000 0x1000>;
+
+			ep9301-reboot {
+				compatible = "cirrus,ep9301-reboot";
+			};
+
+			eclk: clock-controller {
+				#clock-cells = <1>;
+				compatible = "cirrus,ep9301-clk";
+				status = "okay";
+				clocks = <&xtali>;
+			};
+
+			pinctrl: pinctrl {
+				spi_default_pins: pins-spi {
+					function = "spi";
+					groups = "ssp";
+				};
+
+				ac97_default_pins: pins-ac97 {
+					function = "ac97";
+					groups = "ac97";
+				};
+
+				i2s_on_ssp_pins: pins-i2sonssp {
+					function = "i2s";
+					groups = "i2s_on_ssp";
+				};
+
+				i2s_on_ac97_pins: pins-i2sonac97 {
+					function = "i2s";
+					groups = "i2s_on_ac97";
+				};
+
+				gpio1_default_pins: pins-gpio1 {
+					function = "gpio";
+					groups = "gpio1agrp";
+				};
+
+				pwm1_default_pins: pins-pwm1 {
+					function = "pwm";
+					groups = "pwm1";
+				};
+
+				gpio2_default_pins: pins-gpio2 {
+					function = "gpio";
+					groups = "gpio2agrp";
+				};
+
+				gpio3_default_pins: pins-gpio3 {
+					function = "gpio";
+					groups = "gpio3agrp";
+				};
+
+				keypad_default_pins: pins-keypad {
+					function = "keypad";
+					groups = "keypadgrp";
+				};
+
+				gpio4_default_pins: pins-gpio4 {
+					function = "gpio";
+					groups = "gpio4agrp";
+				};
+
+				gpio6_default_pins: pins-gpio6 {
+					function = "gpio";
+					groups = "gpio6agrp";
+				};
+
+				gpio7_default_pins: pins-gpio7 {
+					function = "gpio";
+					groups = "gpio7agrp";
+				};
+
+				ide_default_pins: pins-ide {
+					function = "pata";
+					groups = "idegrp";
+				};
+
+				lcd_on_dram0_pins: pins-rasteronsdram0 {
+					function = "lcd";
+					groups = "rasteronsdram0grp";
+				};
+
+				lcd_on_dram3_pins: pins-rasteronsdram3 {
+					function = "lcd";
+					groups = "rasteronsdram3grp";
+				};
+			};
+		};
+
+		vic0: interrupt-controller@800b0000 {
+			compatible = "arm,pl192-vic";
+			interrupt-controller;
+			reg = <0x800b0000 0x1000>;
+			#interrupt-cells = <1>;
+			valid-mask = <0x7ffffffc>;
+			valid-wakeup-mask = <0x0>;
+		};
+
+		vic1: interrupt-controller@800c0000 {
+			compatible = "arm,pl192-vic";
+			interrupt-controller;
+			reg = <0x800c0000 0x1000>;
+			#interrupt-cells = <1>;
+			valid-mask = <0x1fffffff>;
+			valid-wakeup-mask = <0x0>;
+		};
+
+		timer: timer@80810000 {
+			compatible = "cirrus,ep9301-timer";
+			reg = <0x80810000 0x100>;
+			interrupt-parent = <&vic1>;
+			interrupts = <19>;
+		};
+
+		dma0: dma-controller@80000000 {
+			compatible = "cirrus,ep9301-dma-m2p";
+			reg = <0x80000000 0x0040>,
+				<0x80000040 0x0040>,
+				<0x80000080 0x0040>,
+				<0x800000c0 0x0040>,
+				<0x80000240 0x0040>,
+				<0x80000200 0x0040>,
+				<0x800002c0 0x0040>,
+				<0x80000280 0x0040>,
+				<0x80000340 0x0040>,
+				<0x80000300 0x0040>;
+			clocks = <&eclk EP93XX_CLK_M2P0>,
+				<&eclk EP93XX_CLK_M2P1>,
+				<&eclk EP93XX_CLK_M2P2>,
+				<&eclk EP93XX_CLK_M2P3>,
+				<&eclk EP93XX_CLK_M2P4>,
+				<&eclk EP93XX_CLK_M2P5>,
+				<&eclk EP93XX_CLK_M2P6>,
+				<&eclk EP93XX_CLK_M2P7>,
+				<&eclk EP93XX_CLK_M2P8>,
+				<&eclk EP93XX_CLK_M2P9>;
+			clock-names = "m2p0", "m2p1",
+				"m2p2", "m2p3",
+				"m2p4", "m2p5",
+				"m2p6", "m2p7",
+				"m2p8", "m2p9";
+			interrupt-parent = <&vic0>;
+			interrupts = <7>, <8>, <9>, <10>, <11>,
+				<12>, <13>, <14>, <15>, <16>;
+			#dma-cells = <1>;
+		};
+
+		dma1: dma-controller@80000100 {
+			compatible = "cirrus,ep9301-dma-m2m";
+			reg = <0x80000100 0x0040>,
+				<0x80000140 0x0040>;
+			clocks = <&eclk EP93XX_CLK_M2M0>,
+				<&eclk EP93XX_CLK_M2M1>;
+			clock-names = "m2m0", "m2m1";
+			interrupt-parent = <&vic0>;
+			interrupts = <17>, <18>;
+			#dma-cells = <1>;
+		};
+
+		i2s: i2s@80820000 {
+			compatible = "cirrus,ep9301-i2s";
+			#sound-dai-cells = <0>;
+			reg = <0x80820000 0x100>;
+			interrupt-parent = <&vic1>;
+			interrupts = <28>;
+			clocks = <&eclk EP93XX_CLK_I2S_MCLK
+				  &eclk EP93XX_CLK_I2S_SCLK
+				  &eclk EP93XX_CLK_I2S_LRCLK>;
+			clock-names = "mclk", "sclk", "lrclk";
+			status = "disabled";
+		};
+
+		gpio0: gpio@80840000 {
+			compatible = "cirrus,ep9301-gpio";
+			reg = <0x80840000 0x04>,
+			<0x80840010 0x04>,
+			<0x80840090 0x1c>;
+			reg-names = "data", "dir", "intr";
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			interrupt-parent = <&vic1>;
+			interrupts = <27>;
+		};
+
+		gpio1: gpio@80840004 {
+			compatible = "cirrus,ep9301-gpio";
+			reg = <0x80840004 0x04>,
+			<0x80840014 0x04>,
+			<0x808400ac 0x1c>;
+			reg-names = "data", "dir", "intr";
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			interrupt-parent = <&vic1>;
+			interrupts = <27>;
+		};
+
+		gpio2: gpio@80840008 {
+			compatible = "cirrus,ep9301-gpio";
+			reg = <0x80840008 0x04>,
+			<0x80840018 0x04>;
+			reg-names = "data", "dir";
+			gpio-controller;
+			#gpio-cells = <2>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio2_default_pins>;
+		};
+
+		gpio3: gpio@8084000c {
+			compatible = "cirrus,ep9301-gpio";
+			reg = <0x8084000c 0x04>,
+			<0x8084001c 0x04>;
+			reg-names = "data", "dir";
+			gpio-controller;
+			#gpio-cells = <2>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio3_default_pins>;
+		};
+
+		gpio4: gpio@80840020 {
+			compatible = "cirrus,ep9301-gpio";
+			reg = <0x80840020 0x04>,
+			<0x80840024 0x04>;
+			reg-names = "data", "dir";
+			gpio-controller;
+			#gpio-cells = <2>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio4_default_pins>;
+		};
+
+		gpio5: gpio@80840030 {
+			compatible = "cirrus,ep9301-gpio";
+			reg = <0x80840030 0x04>,
+			<0x80840034 0x04>,
+			<0x8084004c 0x1c>;
+			reg-names = "data", "dir", "intr";
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupt-controller;
+			interrupts-extended = <&vic0 19>, <&vic0 20>,
+				<&vic0 21>, <&vic0 22>,
+				<&vic1 15>, <&vic1 16>,
+				<&vic1 17>, <&vic1 18>;
+		};
+
+		gpio6: gpio@80840038 {
+			compatible = "cirrus,ep9301-gpio";
+			reg = <0x80840038 0x04>,
+			<0x8084003c 0x04>;
+			reg-names = "data", "dir";
+			gpio-controller;
+			#gpio-cells = <2>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio6_default_pins>;
+		};
+
+		gpio7: gpio@80840040 {
+			compatible = "cirrus,ep9301-gpio";
+			reg = <0x80840040 0x04>,
+			<0x80840044 0x04>;
+			reg-names = "data", "dir";
+			gpio-controller;
+			#gpio-cells = <2>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&gpio7_default_pins>;
+		};
+
+		ide: ide@800a0000 {
+			compatible = "cirrus,ep9312-pata";
+			reg = <0x800a0000 0x38>;
+			interrupt-parent = <&vic1>;
+			interrupts = <8>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&ide_default_pins>;
+		};
+
+		uart0: uart@808c0000 {
+			compatible = "arm,primecell";
+			reg = <0x808c0000 0x1000>;
+			arm,primecell-periphid = <0x00041010>;
+			clocks = <&eclk EP93XX_CLK_UART1>, <&eclk EP93XX_CLK_UART>;
+			clock-names = "apb:uart1", "apb_pclk";
+			interrupt-parent = <&vic1>;
+			interrupts = <20>;
+			status = "disabled";
+		};
+
+		uart1: uart@808d0000 {
+			compatible = "arm,primecell";
+			reg = <0x808d0000 0x1000>;
+			arm,primecell-periphid = <0x00041010>;
+			clocks = <&eclk EP93XX_CLK_UART2>, <&eclk EP93XX_CLK_UART>;
+			clock-names = "apb:uart2", "apb_pclk";
+			interrupt-parent = <&vic1>;
+			interrupts = <22>;
+			status = "disabled";
+		};
+
+		uart2: uart@808b0000 {
+			compatible = "arm,primecell";
+			reg = <0x808b0000 0x1000>;
+			arm,primecell-periphid = <0x00041010>;
+			clocks = <&eclk EP93XX_CLK_UART3>, <&eclk EP93XX_CLK_UART>;
+			clock-names = "apb:uart3", "apb_pclk";
+			interrupt-parent = <&vic1>;
+			interrupts = <23>;
+			status = "disabled";
+		};
+
+		usb0: usb@80020000 {
+			compatible = "generic-ohci";
+			reg = <0x80020000 0x10000>;
+			interrupt-parent = <&vic1>;
+			interrupts = <24>;
+			clocks = <&eclk EP93XX_CLK_USB>;
+			status = "disabled";
+		};
+
+		eth0: ethernet@80010000 {
+			compatible = "cirrus,ep9301-eth";
+			reg = <0x80010000 0x10000>;
+			interrupt-parent = <&vic1>;
+			interrupts = <7>;
+			mdio0: mdio {
+				#address-cells = <1>;
+				#size-cells = <0>;
+			};
+		};
+
+		rtc0: rtc@80920000 {
+			compatible = "cirrus,ep9301-rtc";
+			reg = <0x80920000 0x100>;
+		};
+
+		spi0: spi@808a0000 {
+			compatible = "cirrus,ep9301-spi";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			reg = <0x808a0000 0x18>;
+			interrupt-parent = <&vic1>;
+			interrupts = <21>;
+			clocks = <&eclk EP93XX_CLK_SPI>;
+			cs-gpios = <&gpio5 2 0>;
+			cirrus,ep9301-use-dma;
+			pinctrl-names = "default";
+			pinctrl-0 = <&spi_default_pins>;
+			status = "disabled";
+		};
+
+		adc: adc@80900000 {
+			compatible = "cirrus,ep9301-adc";
+			reg = <0x80900000 0x28>;
+			clocks = <&eclk EP93XX_CLK_ADC>;
+			interrupt-parent = <&vic0>;
+			interrupts = <30>;
+			status = "disabled";
+		};
+
+		watchdog0: watchdog@80940000 {
+			compatible = "cirrus,ep9301-wdt";
+			reg = <0x80940000 0x08>;
+		};
+
+		pwm0: pwm@80910000 {
+			compatible = "cirrus,ep9301-pwm";
+			reg = <0x80910000 0x10>;
+			clocks = <&eclk EP93XX_CLK_PWM>;
+			status = "disabled";
+		};
+
+		pwm1: pwm@80910020 {
+			compatible = "cirrus,ep9301-pwm";
+			reg = <0x80910020 0x10>;
+			clocks = <&eclk EP93XX_CLK_PWM>;
+			status = "disabled";
+			pinctrl-names = "default";
+			pinctrl-0 = <&pwm1_default_pins>;
+		};
+
+		keypad: keypad@800f0000 {
+			compatible = "cirrus,ep9307-keypad";
+			reg = <0x800f0000 0x0c>;
+			interrupt-parent = <&vic0>;
+			interrupts = <29>;
+			clocks = <&eclk EP93XX_CLK_KEYPAD>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&keypad_default_pins>;
+			linux,keymap =
+						<KEY_UP>,
+						<KEY_DOWN>,
+						<KEY_VOLUMEDOWN>,
+						<KEY_HOME>,
+						<KEY_RIGHT>,
+						<KEY_LEFT>,
+						<KEY_ENTER>,
+						<KEY_VOLUMEUP>,
+						<KEY_F6>,
+						<KEY_F8>,
+						<KEY_F9>,
+						<KEY_F10>,
+						<KEY_F1>,
+						<KEY_F2>,
+						<KEY_F3>,
+						<KEY_POWER>;
+		};
+	};
+
+	xtali: oscillator {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <14745600>;
+		clock-output-names = "xtali";
+	};
+
+	i2c0: i2c0 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpio6 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpio6 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		status = "disabled";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		led0 {
+			label = "grled";
+			gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "heartbeat";
+			function = LED_FUNCTION_HEARTBEAT;
+		};
+
+		led1 {
+			label = "rdled";
+			gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
+			function = LED_FUNCTION_FAULT;
+		};
+	};
+};
-- 
2.37.4


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

* Re: [PATCH v1 35/43] ARM: dts: add device tree for ep93xx Soc
  2023-06-01  5:45 ` [PATCH v1 35/43] ARM: dts: add device tree for ep93xx Soc Nikita Shubin
@ 2023-06-01  8:30   ` Krzysztof Kozlowski
  2023-07-05 16:06     ` Nikita Shubin
  0 siblings, 1 reply; 17+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-01  8:30 UTC (permalink / raw)
  To: Nikita Shubin, Alexander Sverdlin, Arnd Bergmann, Linus Walleij,
	Olof Johansson, soc, Rob Herring, Krzysztof Kozlowski
  Cc: Michael Peters, Kris Bahnsen, linux-arm-kernel, devicetree, linux-kernel

On 01/06/2023 07:45, Nikita Shubin wrote:
> This adds a divice for Cirrus ep93xx SoC amd ts7250 board that has been

device

> my testing target for ep93xx device support.
> 
> Also inluded device tree for Liebherr BK3.1 board through it's not a

included

> complete support.

Thank you for your patch. There is something to discuss/improve.


> 
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
> 
> Notes:
>     v0 -> v1:
>     
>     - add empty chosen node
>     - s/dallas,rtc-m48t86/st,m48t86/
>     - changed phy_id to phy-handle
>     - dropped gpio chip-label's
>     - s/eth@80010000/ethernet@80010000
>     - s/use_dma/ep9301,use-dma
>     - added i2s to bk3
> 
>  arch/arm/boot/dts/Makefile          |   1 +
>  arch/arm/boot/dts/ep93xx-bk3.dts    | 119 +++++++
>  arch/arm/boot/dts/ep93xx-ts7250.dts | 132 ++++++++
>  arch/arm/boot/dts/ep93xx.dtsi       | 466 ++++++++++++++++++++++++++++

Split adding DTSI from adding boards.

>  4 files changed, 718 insertions(+)
>  create mode 100644 arch/arm/boot/dts/ep93xx-bk3.dts
>  create mode 100644 arch/arm/boot/dts/ep93xx-ts7250.dts
>  create mode 100644 arch/arm/boot/dts/ep93xx.dtsi
> 
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 59829fc90315..a68f868fffe7 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -1670,3 +1670,4 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
>  	aspeed-bmc-vegman-n110.dtb \
>  	aspeed-bmc-vegman-rx20.dtb \
>  	aspeed-bmc-vegman-sx20.dtb
> +dtb-$(CONFIG_ARCH_EP93XX) += ep93xx-ts7250.dtb
> diff --git a/arch/arm/boot/dts/ep93xx-bk3.dts b/arch/arm/boot/dts/ep93xx-bk3.dts
> new file mode 100644
> index 000000000000..215587c498e6
> --- /dev/null
> +++ b/arch/arm/boot/dts/ep93xx-bk3.dts
> @@ -0,0 +1,119 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Device Tree file for Liebherr controller BK3.1 based on Cirrus EP9302 SoC
> + */
> +/dts-v1/;
> +#include "ep93xx.dtsi"
> +
> +/ {
> +	model = "Liebherr controller BK3.1";
> +	compatible = "liebherr,bk3", "cirrus,ep9301";
> +
> +	chosen {
> +	};
> +
> +	memory {
> +		device_type = "memory";
> +	};
> +
> +	soc {
> +		nand-controller@60000000 {

Override/extend by label/phandle.

> +			compatible = "technologic,ts7200-nand";
> +			reg = <0x60000000 0x8000000>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +
> +			partitions {
> +				compatible = "fixed-partitions";
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +
> +				partition@0 {
> +					label = "System";
> +					reg = <0x00000000 0x01e00000>;
> +					read-only;
> +				};
> +
> +				partition@1e00000 {
> +					label = "Data";
> +					reg = <0x01e00000 0x05f20000>;
> +				};
> +
> +				partition@7d20000 {
> +					label = "RedBoot";
> +					reg = <0x07d20000 0x002e0000>;
> +					read-only;
> +				};
> +			};
> +		};
> +
> +		syscon: syscon@80930000 {

Override/extend by label/phandle.

> +			pinctrl: pinctrl {
> +				compatible = "cirrus,ep9301-pinctrl";

Why this is board specific?

> +			};
> +		};
> +
> +		gpio1: gpio@80840004 {

Override/extend by label/phandle.

> +			/* PWM */
> +			gpio-ranges = <&pinctrl 6 163 1>;
> +		};
> +	};
> +};
> +
> +&gpio1 {
> +	/* PWM */
> +	gpio-ranges = <&pinctrl 6 163 1>;
> +};
> +
> +&gpio4 {
> +	gpio-ranges = <&pinctrl 0 97 2>;
> +	status = "okay";
> +};
> +
> +&gpio6 {
> +	gpio-ranges = <&pinctrl 0 87 2>;
> +	status = "okay";
> +};
> +
> +&gpio7 {
> +	gpio-ranges = <&pinctrl 2 199 4>;
> +	status = "okay";
> +};
> +
> +&i2c {
> +	status = "okay";
> +};
> +
> +&spi0: spi@808a0000 {
> +	cs-gpios = <&gpio5 3 0>;

Use proper defines for flags.

> +	status = "okay";

What's here? Empty enabled bus?


> +};
> +
> +&eth0 {
> +	phy-handle = <&phy0>;
> +};
> +
> +&mdio0 {
> +	phy0: ethernet-phy@1 {
> +		reg = <1>;
> +		device_type = "ethernet-phy";
> +	};
> +};
> +
> +&uart0 {
> +	status = "okay";
> +};
> +
> +&uart1 {
> +	status = "okay";
> +};
> +
> +&usb {
> +	status = "okay";
> +};
> +
> +&i2s {

Up to you, but I seriously recommend keeping all labels ordered by name.
Avoids conflicts.

> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2s_on_ac97_pins>;
> +	/delete-property/ status;

??? I don't understand. Why would you do this?

...

> diff --git a/arch/arm/boot/dts/ep93xx.dtsi b/arch/arm/boot/dts/ep93xx.dtsi
> new file mode 100644
> index 000000000000..6da556ceaf04
> --- /dev/null
> +++ b/arch/arm/boot/dts/ep93xx.dtsi
> @@ -0,0 +1,466 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Device Tree file for Cirrus Logic systems EP93XX SoC
> + */
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/leds/common.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/clock/cirrus,ep93xx-clock.h>
> +/ {
> +	soc {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		ranges;
> +		compatible = "simple-bus";
> +
> +		syscon: syscon@80930000 {
> +			compatible = "cirrus,ep9301-syscon",
> +						"syscon", "simple-mfd";

Broken wrapping. Align these with previous ".

> +			reg = <0x80930000 0x1000>;
> +
> +			ep9301-reboot {

Just "reboot" (and fix bindings)... but why would you need it in the
first place? I think something is seriously missing in your bindings.

> +				compatible = "cirrus,ep9301-reboot";
> +			};
> +
> +			eclk: clock-controller {
> +				#clock-cells = <1>;
> +				compatible = "cirrus,ep9301-clk";
> +				status = "okay";
> +				clocks = <&xtali>;
> +			};
> +
> +			pinctrl: pinctrl {

Missing compatible.

> +				spi_default_pins: pins-spi {
> +					function = "spi";
> +					groups = "ssp";
> +				};
> +
> +				ac97_default_pins: pins-ac97 {
> +					function = "ac97";
> +					groups = "ac97";
> +				};
> +
> +				i2s_on_ssp_pins: pins-i2sonssp {
> +					function = "i2s";
> +					groups = "i2s_on_ssp";
> +				};
> +
> +				i2s_on_ac97_pins: pins-i2sonac97 {
> +					function = "i2s";
> +					groups = "i2s_on_ac97";
> +				};
> +
> +				gpio1_default_pins: pins-gpio1 {
> +					function = "gpio";
> +					groups = "gpio1agrp";
> +				};
> +
> +				pwm1_default_pins: pins-pwm1 {
> +					function = "pwm";
> +					groups = "pwm1";
> +				};
> +
> +				gpio2_default_pins: pins-gpio2 {
> +					function = "gpio";
> +					groups = "gpio2agrp";
> +				};
> +
> +				gpio3_default_pins: pins-gpio3 {
> +					function = "gpio";
> +					groups = "gpio3agrp";
> +				};
> +
> +				keypad_default_pins: pins-keypad {
> +					function = "keypad";
> +					groups = "keypadgrp";
> +				};
> +
> +				gpio4_default_pins: pins-gpio4 {
> +					function = "gpio";
> +					groups = "gpio4agrp";
> +				};
> +
> +				gpio6_default_pins: pins-gpio6 {
> +					function = "gpio";
> +					groups = "gpio6agrp";
> +				};
> +
> +				gpio7_default_pins: pins-gpio7 {
> +					function = "gpio";
> +					groups = "gpio7agrp";
> +				};
> +
> +				ide_default_pins: pins-ide {
> +					function = "pata";
> +					groups = "idegrp";
> +				};
> +
> +				lcd_on_dram0_pins: pins-rasteronsdram0 {
> +					function = "lcd";
> +					groups = "rasteronsdram0grp";
> +				};
> +
> +				lcd_on_dram3_pins: pins-rasteronsdram3 {
> +					function = "lcd";
> +					groups = "rasteronsdram3grp";

I would expect somewhere two groups since you explicitly allow it.

> +				};
> +			};
> +		};
> +
> +		vic0: interrupt-controller@800b0000 {
> +			compatible = "arm,pl192-vic";
> +			interrupt-controller;
> +			reg = <0x800b0000 0x1000>;

compatible first, reg is second. ranges if present - third. Fix it
everywhere.

> +			#interrupt-cells = <1>;
> +			valid-mask = <0x7ffffffc>;
> +			valid-wakeup-mask = <0x0>;
> +		};
> +
> +		vic1: interrupt-controller@800c0000 {
> +			compatible = "arm,pl192-vic";
> +			interrupt-controller;
> +			reg = <0x800c0000 0x1000>;
> +			#interrupt-cells = <1>;
> +			valid-mask = <0x1fffffff>;
> +			valid-wakeup-mask = <0x0>;
> +		};
> +
> +		timer: timer@80810000 {
> +			compatible = "cirrus,ep9301-timer";
> +			reg = <0x80810000 0x100>;
> +			interrupt-parent = <&vic1>;
> +			interrupts = <19>;
> +		};
> +
> +		dma0: dma-controller@80000000 {
> +			compatible = "cirrus,ep9301-dma-m2p";
> +			reg = <0x80000000 0x0040>,
> +				<0x80000040 0x0040>,
> +				<0x80000080 0x0040>,
> +				<0x800000c0 0x0040>,
> +				<0x80000240 0x0040>,
> +				<0x80000200 0x0040>,
> +				<0x800002c0 0x0040>,
> +				<0x80000280 0x0040>,
> +				<0x80000340 0x0040>,
> +				<0x80000300 0x0040>;
> +			clocks = <&eclk EP93XX_CLK_M2P0>,
> +				<&eclk EP93XX_CLK_M2P1>,
> +				<&eclk EP93XX_CLK_M2P2>,
> +				<&eclk EP93XX_CLK_M2P3>,
> +				<&eclk EP93XX_CLK_M2P4>,
> +				<&eclk EP93XX_CLK_M2P5>,
> +				<&eclk EP93XX_CLK_M2P6>,
> +				<&eclk EP93XX_CLK_M2P7>,
> +				<&eclk EP93XX_CLK_M2P8>,
> +				<&eclk EP93XX_CLK_M2P9>;
> +			clock-names = "m2p0", "m2p1",
> +				"m2p2", "m2p3",
> +				"m2p4", "m2p5",
> +				"m2p6", "m2p7",
> +				"m2p8", "m2p9";
> +			interrupt-parent = <&vic0>;
> +			interrupts = <7>, <8>, <9>, <10>, <11>,
> +				<12>, <13>, <14>, <15>, <16>;
> +			#dma-cells = <1>;
> +		};
> +
> +		dma1: dma-controller@80000100 {
> +			compatible = "cirrus,ep9301-dma-m2m";
> +			reg = <0x80000100 0x0040>,
> +				<0x80000140 0x0040>;
> +			clocks = <&eclk EP93XX_CLK_M2M0>,
> +				<&eclk EP93XX_CLK_M2M1>;
> +			clock-names = "m2m0", "m2m1";
> +			interrupt-parent = <&vic0>;
> +			interrupts = <17>, <18>;
> +			#dma-cells = <1>;
> +		};
> +
> +		i2s: i2s@80820000 {
> +			compatible = "cirrus,ep9301-i2s";
> +			#sound-dai-cells = <0>;
> +			reg = <0x80820000 0x100>;
> +			interrupt-parent = <&vic1>;
> +			interrupts = <28>;
> +			clocks = <&eclk EP93XX_CLK_I2S_MCLK
> +				  &eclk EP93XX_CLK_I2S_SCLK
> +				  &eclk EP93XX_CLK_I2S_LRCLK>;
> +			clock-names = "mclk", "sclk", "lrclk";
> +			status = "disabled";
> +		};
> +
> +		gpio0: gpio@80840000 {
> +			compatible = "cirrus,ep9301-gpio";
> +			reg = <0x80840000 0x04>,
> +			<0x80840010 0x04>,
> +			<0x80840090 0x1c>;

Messed wrapping.

> +			reg-names = "data", "dir", "intr";
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			interrupt-controller;
> +			interrupt-parent = <&vic1>;
> +			interrupts = <27>;
> +		};
> +
> +		gpio1: gpio@80840004 {
> +			compatible = "cirrus,ep9301-gpio";
> +			reg = <0x80840004 0x04>,
> +			<0x80840014 0x04>,
> +			<0x808400ac 0x1c>;

Ditto, in other places as well.

> +			reg-names = "data", "dir", "intr";
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			interrupt-controller;
> +			interrupt-parent = <&vic1>;
> +			interrupts = <27>;
> +		};
> +
> +		gpio2: gpio@80840008 {
> +			compatible = "cirrus,ep9301-gpio";
> +			reg = <0x80840008 0x04>,
> +			<0x80840018 0x04>;
> +			reg-names = "data", "dir";
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			status = "disabled";

Status is usually last.

> +			pinctrl-names = "default";
> +			pinctrl-0 = <&gpio2_default_pins>;
> +		};
> +
> +		gpio3: gpio@8084000c {
> +			compatible = "cirrus,ep9301-gpio";
> +			reg = <0x8084000c 0x04>,
> +			<0x8084001c 0x04>;
> +			reg-names = "data", "dir";
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			status = "disabled";
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&gpio3_default_pins>;
> +		};
> +
> +		gpio4: gpio@80840020 {
> +			compatible = "cirrus,ep9301-gpio";
> +			reg = <0x80840020 0x04>,
> +			<0x80840024 0x04>;
> +			reg-names = "data", "dir";
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			status = "disabled";
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&gpio4_default_pins>;
> +		};
> +
> +		gpio5: gpio@80840030 {
> +			compatible = "cirrus,ep9301-gpio";
> +			reg = <0x80840030 0x04>,
> +			<0x80840034 0x04>,
> +			<0x8084004c 0x1c>;
> +			reg-names = "data", "dir", "intr";
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			interrupt-controller;
> +			interrupts-extended = <&vic0 19>, <&vic0 20>,
> +				<&vic0 21>, <&vic0 22>,
> +				<&vic1 15>, <&vic1 16>,
> +				<&vic1 17>, <&vic1 18>;
> +		};
> +
> +		gpio6: gpio@80840038 {
> +			compatible = "cirrus,ep9301-gpio";
> +			reg = <0x80840038 0x04>,
> +			<0x8084003c 0x04>;
> +			reg-names = "data", "dir";
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			status = "disabled";
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&gpio6_default_pins>;
> +		};
> +
> +		gpio7: gpio@80840040 {
> +			compatible = "cirrus,ep9301-gpio";
> +			reg = <0x80840040 0x04>,
> +			<0x80840044 0x04>;
> +			reg-names = "data", "dir";
> +			gpio-controller;
> +			#gpio-cells = <2>;
> +			status = "disabled";
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&gpio7_default_pins>;
> +		};
> +
> +		ide: ide@800a0000 {
> +			compatible = "cirrus,ep9312-pata";
> +			reg = <0x800a0000 0x38>;
> +			interrupt-parent = <&vic1>;
> +			interrupts = <8>;
> +			status = "disabled";
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&ide_default_pins>;
> +		};
> +
> +		uart0: uart@808c0000 {

This should scream with dtbs_check. serial.

It does not look like you tested the DTS against bindings. Please run
`make dtbs_check` (see
Documentation/devicetree/bindings/writing-schema.rst for instructions).

> +			compatible = "arm,primecell";
> +			reg = <0x808c0000 0x1000>;
> +			arm,primecell-periphid = <0x00041010>;
> +			clocks = <&eclk EP93XX_CLK_UART1>, <&eclk EP93XX_CLK_UART>;
> +			clock-names = "apb:uart1", "apb_pclk";
> +			interrupt-parent = <&vic1>;
> +			interrupts = <20>;
> +			status = "disabled";
> +		};
> +
> +		uart1: uart@808d0000 {
> +			compatible = "arm,primecell";
> +			reg = <0x808d0000 0x1000>;
> +			arm,primecell-periphid = <0x00041010>;
> +			clocks = <&eclk EP93XX_CLK_UART2>, <&eclk EP93XX_CLK_UART>;
> +			clock-names = "apb:uart2", "apb_pclk";
> +			interrupt-parent = <&vic1>;
> +			interrupts = <22>;
> +			status = "disabled";
> +		};
> +
> +		uart2: uart@808b0000 {
> +			compatible = "arm,primecell";
> +			reg = <0x808b0000 0x1000>;
> +			arm,primecell-periphid = <0x00041010>;
> +			clocks = <&eclk EP93XX_CLK_UART3>, <&eclk EP93XX_CLK_UART>;
> +			clock-names = "apb:uart3", "apb_pclk";
> +			interrupt-parent = <&vic1>;
> +			interrupts = <23>;
> +			status = "disabled";
> +		};
> +
> +		usb0: usb@80020000 {
> +			compatible = "generic-ohci";
> +			reg = <0x80020000 0x10000>;
> +			interrupt-parent = <&vic1>;
> +			interrupts = <24>;
> +			clocks = <&eclk EP93XX_CLK_USB>;
> +			status = "disabled";
> +		};
> +
> +		eth0: ethernet@80010000 {
> +			compatible = "cirrus,ep9301-eth";
> +			reg = <0x80010000 0x10000>;
> +			interrupt-parent = <&vic1>;
> +			interrupts = <7>;
> +			mdio0: mdio {
> +				#address-cells = <1>;
> +				#size-cells = <0>;

Your SoC comes with mdio? If so, why is this empty?

> +			};
> +		};
> +
> +		rtc0: rtc@80920000 {
> +			compatible = "cirrus,ep9301-rtc";
> +			reg = <0x80920000 0x100>;
> +		};
> +
> +		spi0: spi@808a0000 {
> +			compatible = "cirrus,ep9301-spi";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			reg = <0x808a0000 0x18>;
> +			interrupt-parent = <&vic1>;
> +			interrupts = <21>;
> +			clocks = <&eclk EP93XX_CLK_SPI>;
> +			cs-gpios = <&gpio5 2 0>;

defines... but why is it here in the first place? Rarely CS gpios are
part of the SoC. I have several of such questions further as well, so
this looks like you are mixing SoC and boards in one file.

> +			cirrus,ep9301-use-dma;
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&spi_default_pins>;
> +			status = "disabled";
> +		};
> +
> +		adc: adc@80900000 {
> +			compatible = "cirrus,ep9301-adc";
> +			reg = <0x80900000 0x28>;
> +			clocks = <&eclk EP93XX_CLK_ADC>;
> +			interrupt-parent = <&vic0>;
> +			interrupts = <30>;
> +			status = "disabled";
> +		};
> +
> +		watchdog0: watchdog@80940000 {
> +			compatible = "cirrus,ep9301-wdt";
> +			reg = <0x80940000 0x08>;
> +		};
> +
> +		pwm0: pwm@80910000 {
> +			compatible = "cirrus,ep9301-pwm";
> +			reg = <0x80910000 0x10>;
> +			clocks = <&eclk EP93XX_CLK_PWM>;
> +			status = "disabled";
> +		};
> +
> +		pwm1: pwm@80910020 {
> +			compatible = "cirrus,ep9301-pwm";
> +			reg = <0x80910020 0x10>;
> +			clocks = <&eclk EP93XX_CLK_PWM>;
> +			status = "disabled";
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&pwm1_default_pins>;
> +		};
> +
> +		keypad: keypad@800f0000 {
> +			compatible = "cirrus,ep9307-keypad";
> +			reg = <0x800f0000 0x0c>;
> +			interrupt-parent = <&vic0>;
> +			interrupts = <29>;
> +			clocks = <&eclk EP93XX_CLK_KEYPAD>;
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&keypad_default_pins>;
> +			linux,keymap =
> +						<KEY_UP>,
> +						<KEY_DOWN>,
> +						<KEY_VOLUMEDOWN>,
> +						<KEY_HOME>,
> +						<KEY_RIGHT>,
> +						<KEY_LEFT>,
> +						<KEY_ENTER>,
> +						<KEY_VOLUMEUP>,
> +						<KEY_F6>,
> +						<KEY_F8>,
> +						<KEY_F9>,
> +						<KEY_F10>,
> +						<KEY_F1>,
> +						<KEY_F2>,
> +						<KEY_F3>,
> +						<KEY_POWER>;
> +		};
> +	};
> +
> +	xtali: oscillator {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <14745600>;
> +		clock-output-names = "xtali";
> +	};
> +
> +	i2c0: i2c0 {

i2c or i2c-0

> +		compatible = "i2c-gpio";
> +		sda-gpios = <&gpio6 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
> +		scl-gpios = <&gpio6 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		status = "disabled";

Wait, what? Why this is disabled? If this is part of the SoC, although
hardly looks like, then it should be complete. What is missing? How one
could design SoC with incomplete GPIO I2C controller?

> +	};
> +
> +	leds {
> +		compatible = "gpio-leds";

I really doubt this is property of the SoC. Please double check as it
really looks wrong.


> +		led0 {

led-0

> +			label = "grled";
> +			gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>;
> +			linux,default-trigger = "heartbeat";
> +			function = LED_FUNCTION_HEARTBEAT;
> +		};
> +
> +		led1 {
led-1

> +			label = "rdled";
> +			gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
> +			function = LED_FUNCTION_FAULT;
> +		};
> +	};
> +};

Best regards,
Krzysztof


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

* Re: [PATCH v1 35/43] ARM: dts: add device tree for ep93xx Soc
  2023-06-01  8:30   ` Krzysztof Kozlowski
@ 2023-07-05 16:06     ` Nikita Shubin
  0 siblings, 0 replies; 17+ messages in thread
From: Nikita Shubin @ 2023-07-05 16:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Alexander Sverdlin, Arnd Bergmann,
	Linus Walleij, Olof Johansson, soc, Rob Herring,
	Krzysztof Kozlowski
  Cc: Michael Peters, Kris Bahnsen, linux-arm-kernel, devicetree, linux-kernel

Hello Krzysztof!

On Thu, 2023-06-01 at 10:30 +0200, Krzysztof Kozlowski wrote:
> On 01/06/2023 07:45, Nikita Shubin wrote:
> > This adds a divice for Cirrus ep93xx SoC amd ts7250 board that has
> > been
> 
> device
> 
> > my testing target for ep93xx device support.
> > 
> > Also inluded device tree for Liebherr BK3.1 board through it's not
> > a
> 
> included
> 
> > complete support.
> 
> Thank you for your patch. There is something to discuss/improve.
> 
> 
> > 
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> > ---
> > 
> > Notes:
> >     v0 -> v1:
> >     
> >     - add empty chosen node
> >     - s/dallas,rtc-m48t86/st,m48t86/
> >     - changed phy_id to phy-handle
> >     - dropped gpio chip-label's
> >     - s/eth@80010000/ethernet@80010000
> >     - s/use_dma/ep9301,use-dma
> >     - added i2s to bk3
> > 
> >  arch/arm/boot/dts/Makefile          |   1 +
> >  arch/arm/boot/dts/ep93xx-bk3.dts    | 119 +++++++
> >  arch/arm/boot/dts/ep93xx-ts7250.dts | 132 ++++++++
> >  arch/arm/boot/dts/ep93xx.dtsi       | 466
> > ++++++++++++++++++++++++++++
> 
> Split adding DTSI from adding boards.
> 
> >  4 files changed, 718 insertions(+)
> >  create mode 100644 arch/arm/boot/dts/ep93xx-bk3.dts
> >  create mode 100644 arch/arm/boot/dts/ep93xx-ts7250.dts
> >  create mode 100644 arch/arm/boot/dts/ep93xx.dtsi
> > 
> > diff --git a/arch/arm/boot/dts/Makefile
> > b/arch/arm/boot/dts/Makefile
> > index 59829fc90315..a68f868fffe7 100644
> > --- a/arch/arm/boot/dts/Makefile
> > +++ b/arch/arm/boot/dts/Makefile
> > @@ -1670,3 +1670,4 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
> >         aspeed-bmc-vegman-n110.dtb \
> >         aspeed-bmc-vegman-rx20.dtb \
> >         aspeed-bmc-vegman-sx20.dtb
> > +dtb-$(CONFIG_ARCH_EP93XX) += ep93xx-ts7250.dtb
> > diff --git a/arch/arm/boot/dts/ep93xx-bk3.dts
> > b/arch/arm/boot/dts/ep93xx-bk3.dts
> > new file mode 100644
> > index 000000000000..215587c498e6
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/ep93xx-bk3.dts
> > @@ -0,0 +1,119 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Device Tree file for Liebherr controller BK3.1 based on Cirrus
> > EP9302 SoC
> > + */
> > +/dts-v1/;
> > +#include "ep93xx.dtsi"
> > +
> > +/ {
> > +       model = "Liebherr controller BK3.1";
> > +       compatible = "liebherr,bk3", "cirrus,ep9301";
> > +
> > +       chosen {
> > +       };
> > +
> > +       memory {
> > +               device_type = "memory";
> > +       };
> > +
> > +       soc {
> > +               nand-controller@60000000 {
> 
> Override/extend by label/phandle.
> 
> > +                       compatible = "technologic,ts7200-nand";
> > +                       reg = <0x60000000 0x8000000>;
> > +                       #address-cells = <1>;
> > +                       #size-cells = <1>;
> > +
> > +                       partitions {
> > +                               compatible = "fixed-partitions";
> > +                               #address-cells = <1>;
> > +                               #size-cells = <1>;
> > +
> > +                               partition@0 {
> > +                                       label = "System";
> > +                                       reg = <0x00000000
> > 0x01e00000>;
> > +                                       read-only;
> > +                               };
> > +
> > +                               partition@1e00000 {
> > +                                       label = "Data";
> > +                                       reg = <0x01e00000
> > 0x05f20000>;
> > +                               };
> > +
> > +                               partition@7d20000 {
> > +                                       label = "RedBoot";
> > +                                       reg = <0x07d20000
> > 0x002e0000>;
> > +                                       read-only;
> > +                               };
> > +                       };
> > +               };
> > +
> > +               syscon: syscon@80930000 {
> 
> Override/extend by label/phandle.
> 
> > +                       pinctrl: pinctrl {
> > +                               compatible = "cirrus,ep9301-
> > pinctrl";
> 
> Why this is board specific?

You are right - it's SoC specific, but currently we only have boards
with ep9302 with according device trees:
- ts7250
- bk3
- edb9302

We were hoping someone with other SoC's will join - like Hartley
Sweeten with Vision Engraving Systems EP9307 SoM, but no one showed up.

I've changed added compatible "cirrus,ep9301-pinctrl" in ep93xx.dtsi as
default and removed from all other board .dts.

> 
> > +                       };
> > +               };
> > +
> > +               gpio1: gpio@80840004 {
> 
> Override/extend by label/phandle.
> 
> > +                       /* PWM */
> > +                       gpio-ranges = <&pinctrl 6 163 1>;
> > +               };
> > +       };
> > +};
> > +
> > +&gpio1 {
> > +       /* PWM */
> > +       gpio-ranges = <&pinctrl 6 163 1>;
> > +};
> > +
> > +&gpio4 {
> > +       gpio-ranges = <&pinctrl 0 97 2>;
> > +       status = "okay";
> > +};
> > +
> > +&gpio6 {
> > +       gpio-ranges = <&pinctrl 0 87 2>;
> > +       status = "okay";
> > +};
> > +
> > +&gpio7 {
> > +       gpio-ranges = <&pinctrl 2 199 4>;
> > +       status = "okay";
> > +};
> > +
> > +&i2c {
> > +       status = "okay";
> > +};
> > +
> > +&spi0: spi@808a0000 {
> > +       cs-gpios = <&gpio5 3 0>;
> 
> Use proper defines for flags.
> 
> > +       status = "okay";
> 
> What's here? Empty enabled bus?
> 
> 
> > +};
> > +
> > +&eth0 {
> > +       phy-handle = <&phy0>;
> > +};
> > +
> > +&mdio0 {
> > +       phy0: ethernet-phy@1 {
> > +               reg = <1>;
> > +               device_type = "ethernet-phy";
> > +       };
> > +};
> > +
> > +&uart0 {
> > +       status = "okay";
> > +};
> > +
> > +&uart1 {
> > +       status = "okay";
> > +};
> > +
> > +&usb {
> > +       status = "okay";
> > +};
> > +
> > +&i2s {
> 
> Up to you, but I seriously recommend keeping all labels ordered by
> name.
> Avoids conflicts.
> 
> > +       pinctrl-names = "default";
> > +       pinctrl-0 = <&i2s_on_ac97_pins>;
> > +       /delete-property/ status;
> 
> ??? I don't understand. Why would you do this?
> 
> ...
> 
> > diff --git a/arch/arm/boot/dts/ep93xx.dtsi
> > b/arch/arm/boot/dts/ep93xx.dtsi
> > new file mode 100644
> > index 000000000000..6da556ceaf04
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/ep93xx.dtsi
> > @@ -0,0 +1,466 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Device Tree file for Cirrus Logic systems EP93XX SoC
> > + */
> > +#include <dt-bindings/gpio/gpio.h>
> > +#include <dt-bindings/leds/common.h>
> > +#include <dt-bindings/input/input.h>
> > +#include <dt-bindings/clock/cirrus,ep93xx-clock.h>
> > +/ {
> > +       soc {
> > +               #address-cells = <1>;
> > +               #size-cells = <1>;
> > +               ranges;
> > +               compatible = "simple-bus";
> > +
> > +               syscon: syscon@80930000 {
> > +                       compatible = "cirrus,ep9301-syscon",
> > +                                               "syscon", "simple-
> > mfd";
> 
> Broken wrapping. Align these with previous ".
> 
> > +                       reg = <0x80930000 0x1000>;
> > +
> > +                       ep9301-reboot {
> 
> Just "reboot" (and fix bindings)... but why would you need it in the
> first place? I think something is seriously missing in your bindings.
> 
> > +                               compatible = "cirrus,ep9301-
> > reboot";
> > +                       };
> > +
> > +                       eclk: clock-controller {
> > +                               #clock-cells = <1>;
> > +                               compatible = "cirrus,ep9301-clk";
> > +                               status = "okay";
> > +                               clocks = <&xtali>;
> > +                       };
> > +
> > +                       pinctrl: pinctrl {
> 
> Missing compatible.
> 
> > +                               spi_default_pins: pins-spi {
> > +                                       function = "spi";
> > +                                       groups = "ssp";
> > +                               };
> > +
> > +                               ac97_default_pins: pins-ac97 {
> > +                                       function = "ac97";
> > +                                       groups = "ac97";
> > +                               };
> > +
> > +                               i2s_on_ssp_pins: pins-i2sonssp {
> > +                                       function = "i2s";
> > +                                       groups = "i2s_on_ssp";
> > +                               };
> > +
> > +                               i2s_on_ac97_pins: pins-i2sonac97 {
> > +                                       function = "i2s";
> > +                                       groups = "i2s_on_ac97";
> > +                               };
> > +
> > +                               gpio1_default_pins: pins-gpio1 {
> > +                                       function = "gpio";
> > +                                       groups = "gpio1agrp";
> > +                               };
> > +
> > +                               pwm1_default_pins: pins-pwm1 {
> > +                                       function = "pwm";
> > +                                       groups = "pwm1";
> > +                               };
> > +
> > +                               gpio2_default_pins: pins-gpio2 {
> > +                                       function = "gpio";
> > +                                       groups = "gpio2agrp";
> > +                               };
> > +
> > +                               gpio3_default_pins: pins-gpio3 {
> > +                                       function = "gpio";
> > +                                       groups = "gpio3agrp";
> > +                               };
> > +
> > +                               keypad_default_pins: pins-keypad {
> > +                                       function = "keypad";
> > +                                       groups = "keypadgrp";
> > +                               };
> > +
> > +                               gpio4_default_pins: pins-gpio4 {
> > +                                       function = "gpio";
> > +                                       groups = "gpio4agrp";
> > +                               };
> > +
> > +                               gpio6_default_pins: pins-gpio6 {
> > +                                       function = "gpio";
> > +                                       groups = "gpio6agrp";
> > +                               };
> > +
> > +                               gpio7_default_pins: pins-gpio7 {
> > +                                       function = "gpio";
> > +                                       groups = "gpio7agrp";
> > +                               };
> > +
> > +                               ide_default_pins: pins-ide {
> > +                                       function = "pata";
> > +                                       groups = "idegrp";
> > +                               };
> > +
> > +                               lcd_on_dram0_pins: pins-
> > rasteronsdram0 {
> > +                                       function = "lcd";
> > +                                       groups =
> > "rasteronsdram0grp";
> > +                               };
> > +
> > +                               lcd_on_dram3_pins: pins-
> > rasteronsdram3 {
> > +                                       function = "lcd";
> > +                                       groups =
> > "rasteronsdram3grp";
> 
> I would expect somewhere two groups since you explicitly allow it.
> 
> > +                               };
> > +                       };
> > +               };
> > +
> > +               vic0: interrupt-controller@800b0000 {
> > +                       compatible = "arm,pl192-vic";
> > +                       interrupt-controller;
> > +                       reg = <0x800b0000 0x1000>;
> 
> compatible first, reg is second. ranges if present - third. Fix it
> everywhere.
> 
> > +                       #interrupt-cells = <1>;
> > +                       valid-mask = <0x7ffffffc>;
> > +                       valid-wakeup-mask = <0x0>;
> > +               };
> > +
> > +               vic1: interrupt-controller@800c0000 {
> > +                       compatible = "arm,pl192-vic";
> > +                       interrupt-controller;
> > +                       reg = <0x800c0000 0x1000>;
> > +                       #interrupt-cells = <1>;
> > +                       valid-mask = <0x1fffffff>;
> > +                       valid-wakeup-mask = <0x0>;
> > +               };
> > +
> > +               timer: timer@80810000 {
> > +                       compatible = "cirrus,ep9301-timer";
> > +                       reg = <0x80810000 0x100>;
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <19>;
> > +               };
> > +
> > +               dma0: dma-controller@80000000 {
> > +                       compatible = "cirrus,ep9301-dma-m2p";
> > +                       reg = <0x80000000 0x0040>,
> > +                               <0x80000040 0x0040>,
> > +                               <0x80000080 0x0040>,
> > +                               <0x800000c0 0x0040>,
> > +                               <0x80000240 0x0040>,
> > +                               <0x80000200 0x0040>,
> > +                               <0x800002c0 0x0040>,
> > +                               <0x80000280 0x0040>,
> > +                               <0x80000340 0x0040>,
> > +                               <0x80000300 0x0040>;
> > +                       clocks = <&eclk EP93XX_CLK_M2P0>,
> > +                               <&eclk EP93XX_CLK_M2P1>,
> > +                               <&eclk EP93XX_CLK_M2P2>,
> > +                               <&eclk EP93XX_CLK_M2P3>,
> > +                               <&eclk EP93XX_CLK_M2P4>,
> > +                               <&eclk EP93XX_CLK_M2P5>,
> > +                               <&eclk EP93XX_CLK_M2P6>,
> > +                               <&eclk EP93XX_CLK_M2P7>,
> > +                               <&eclk EP93XX_CLK_M2P8>,
> > +                               <&eclk EP93XX_CLK_M2P9>;
> > +                       clock-names = "m2p0", "m2p1",
> > +                               "m2p2", "m2p3",
> > +                               "m2p4", "m2p5",
> > +                               "m2p6", "m2p7",
> > +                               "m2p8", "m2p9";
> > +                       interrupt-parent = <&vic0>;
> > +                       interrupts = <7>, <8>, <9>, <10>, <11>,
> > +                               <12>, <13>, <14>, <15>, <16>;
> > +                       #dma-cells = <1>;
> > +               };
> > +
> > +               dma1: dma-controller@80000100 {
> > +                       compatible = "cirrus,ep9301-dma-m2m";
> > +                       reg = <0x80000100 0x0040>,
> > +                               <0x80000140 0x0040>;
> > +                       clocks = <&eclk EP93XX_CLK_M2M0>,
> > +                               <&eclk EP93XX_CLK_M2M1>;
> > +                       clock-names = "m2m0", "m2m1";
> > +                       interrupt-parent = <&vic0>;
> > +                       interrupts = <17>, <18>;
> > +                       #dma-cells = <1>;
> > +               };
> > +
> > +               i2s: i2s@80820000 {
> > +                       compatible = "cirrus,ep9301-i2s";
> > +                       #sound-dai-cells = <0>;
> > +                       reg = <0x80820000 0x100>;
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <28>;
> > +                       clocks = <&eclk EP93XX_CLK_I2S_MCLK
> > +                                 &eclk EP93XX_CLK_I2S_SCLK
> > +                                 &eclk EP93XX_CLK_I2S_LRCLK>;
> > +                       clock-names = "mclk", "sclk", "lrclk";
> > +                       status = "disabled";
> > +               };
> > +
> > +               gpio0: gpio@80840000 {
> > +                       compatible = "cirrus,ep9301-gpio";
> > +                       reg = <0x80840000 0x04>,
> > +                       <0x80840010 0x04>,
> > +                       <0x80840090 0x1c>;
> 
> Messed wrapping.
> 
> > +                       reg-names = "data", "dir", "intr";
> > +                       gpio-controller;
> > +                       #gpio-cells = <2>;
> > +                       interrupt-controller;
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <27>;
> > +               };
> > +
> > +               gpio1: gpio@80840004 {
> > +                       compatible = "cirrus,ep9301-gpio";
> > +                       reg = <0x80840004 0x04>,
> > +                       <0x80840014 0x04>,
> > +                       <0x808400ac 0x1c>;
> 
> Ditto, in other places as well.
> 
> > +                       reg-names = "data", "dir", "intr";
> > +                       gpio-controller;
> > +                       #gpio-cells = <2>;
> > +                       interrupt-controller;
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <27>;
> > +               };
> > +
> > +               gpio2: gpio@80840008 {
> > +                       compatible = "cirrus,ep9301-gpio";
> > +                       reg = <0x80840008 0x04>,
> > +                       <0x80840018 0x04>;
> > +                       reg-names = "data", "dir";
> > +                       gpio-controller;
> > +                       #gpio-cells = <2>;
> > +                       status = "disabled";
> 
> Status is usually last.
> 
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&gpio2_default_pins>;
> > +               };
> > +
> > +               gpio3: gpio@8084000c {
> > +                       compatible = "cirrus,ep9301-gpio";
> > +                       reg = <0x8084000c 0x04>,
> > +                       <0x8084001c 0x04>;
> > +                       reg-names = "data", "dir";
> > +                       gpio-controller;
> > +                       #gpio-cells = <2>;
> > +                       status = "disabled";
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&gpio3_default_pins>;
> > +               };
> > +
> > +               gpio4: gpio@80840020 {
> > +                       compatible = "cirrus,ep9301-gpio";
> > +                       reg = <0x80840020 0x04>,
> > +                       <0x80840024 0x04>;
> > +                       reg-names = "data", "dir";
> > +                       gpio-controller;
> > +                       #gpio-cells = <2>;
> > +                       status = "disabled";
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&gpio4_default_pins>;
> > +               };
> > +
> > +               gpio5: gpio@80840030 {
> > +                       compatible = "cirrus,ep9301-gpio";
> > +                       reg = <0x80840030 0x04>,
> > +                       <0x80840034 0x04>,
> > +                       <0x8084004c 0x1c>;
> > +                       reg-names = "data", "dir", "intr";
> > +                       gpio-controller;
> > +                       #gpio-cells = <2>;
> > +                       interrupt-controller;
> > +                       interrupts-extended = <&vic0 19>, <&vic0
> > 20>,
> > +                               <&vic0 21>, <&vic0 22>,
> > +                               <&vic1 15>, <&vic1 16>,
> > +                               <&vic1 17>, <&vic1 18>;
> > +               };
> > +
> > +               gpio6: gpio@80840038 {
> > +                       compatible = "cirrus,ep9301-gpio";
> > +                       reg = <0x80840038 0x04>,
> > +                       <0x8084003c 0x04>;
> > +                       reg-names = "data", "dir";
> > +                       gpio-controller;
> > +                       #gpio-cells = <2>;
> > +                       status = "disabled";
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&gpio6_default_pins>;
> > +               };
> > +
> > +               gpio7: gpio@80840040 {
> > +                       compatible = "cirrus,ep9301-gpio";
> > +                       reg = <0x80840040 0x04>,
> > +                       <0x80840044 0x04>;
> > +                       reg-names = "data", "dir";
> > +                       gpio-controller;
> > +                       #gpio-cells = <2>;
> > +                       status = "disabled";
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&gpio7_default_pins>;
> > +               };
> > +
> > +               ide: ide@800a0000 {
> > +                       compatible = "cirrus,ep9312-pata";
> > +                       reg = <0x800a0000 0x38>;
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <8>;
> > +                       status = "disabled";
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&ide_default_pins>;
> > +               };
> > +
> > +               uart0: uart@808c0000 {
> 
> This should scream with dtbs_check. serial.
> 
> It does not look like you tested the DTS against bindings. Please run
> `make dtbs_check` (see
> Documentation/devicetree/bindings/writing-schema.rst for
> instructions).

make dtbs_check is totally clean now:

```
make -j34 -C build-linux ARCH=arm CROSS_COMPILE=armv4t-softfloat-linux-
gnueabi- dtbs_check 
make[1]: Entering directory '/home/maquefel/workshop/ts7250-boot-
build/build-linux'
  UPD     include/config/kernel.release
  DTC_CHK arch/arm/boot/dts/cirrus/ep93xx-edb9302.dtb
arch/arm/boot/dts/cirrus/ep93xx-edb9302.dtb:0:0: /soc/ac97@80880000:
failed to match any schema with compatible: ['cirrus,ep9301-ac97']
arch/arm/boot/dts/cirrus/ep93xx-edb9302.dtb:0:0:
/soc/spi@808a0000/codec@0: failed to match any schema with compatible:
['cirrus,cs4271']
/home/maquefel/workshop/ts7250-boot-build/build-
linux/arch/arm/boot/dts/cirrus/ep93xx-edb9302.dtb: sound: 'simple-
audio-card,convert-sample-format' does not match any of the regexes:
'^simple-audio-card,codec(@[0-9a-f]+)?$', '^simple-audio-card,cpu(@[0-
9a-f]+)?$', '^simple-audio-card,dai-link(@[0-9a-f]+)?$', '^simple-
audio-card,plat(@[0-9a-f]+)?$', 'pinctrl-[0-9]+'
        From schema: /home/maquefel/workshop/ts7250-boot-
build/linux/Documentation/devicetree/bindings/sound/simple-card.yaml
make[1]: Leaving directory '/home/maquefel/workshop/ts7250-boot-
build/build-linux'
```


> 
> > +                       compatible = "arm,primecell";
> > +                       reg = <0x808c0000 0x1000>;
> > +                       arm,primecell-periphid = <0x00041010>;
> > +                       clocks = <&eclk EP93XX_CLK_UART1>, <&eclk
> > EP93XX_CLK_UART>;
> > +                       clock-names = "apb:uart1", "apb_pclk";
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <20>;
> > +                       status = "disabled";
> > +               };
> > +
> > +               uart1: uart@808d0000 {
> > +                       compatible = "arm,primecell";
> > +                       reg = <0x808d0000 0x1000>;
> > +                       arm,primecell-periphid = <0x00041010>;
> > +                       clocks = <&eclk EP93XX_CLK_UART2>, <&eclk
> > EP93XX_CLK_UART>;
> > +                       clock-names = "apb:uart2", "apb_pclk";
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <22>;
> > +                       status = "disabled";
> > +               };
> > +
> > +               uart2: uart@808b0000 {
> > +                       compatible = "arm,primecell";
> > +                       reg = <0x808b0000 0x1000>;
> > +                       arm,primecell-periphid = <0x00041010>;
> > +                       clocks = <&eclk EP93XX_CLK_UART3>, <&eclk
> > EP93XX_CLK_UART>;
> > +                       clock-names = "apb:uart3", "apb_pclk";
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <23>;
> > +                       status = "disabled";
> > +               };
> > +
> > +               usb0: usb@80020000 {
> > +                       compatible = "generic-ohci";
> > +                       reg = <0x80020000 0x10000>;
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <24>;
> > +                       clocks = <&eclk EP93XX_CLK_USB>;
> > +                       status = "disabled";
> > +               };
> > +
> > +               eth0: ethernet@80010000 {
> > +                       compatible = "cirrus,ep9301-eth";
> > +                       reg = <0x80010000 0x10000>;
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <7>;
> > +                       mdio0: mdio {
> > +                               #address-cells = <1>;
> > +                               #size-cells = <0>;
> 
> Your SoC comes with mdio? If so, why is this empty?

It has a builtin MDIO and only reason for this is to provide phy-id via
device tree in a correct way:

```
&eth0 {
	phy-handle = <&phy0>;
};

&mdio0 {
	phy0: ethernet-phy@1 {
		reg = <1>;
		device_type = "ethernet-phy";
	};
};
```

There is no other purpose for this node.

Thank you Krzysztof!

All other issues fixed.

> 
> > +                       };
> > +               };
> > +
> > +               rtc0: rtc@80920000 {
> > +                       compatible = "cirrus,ep9301-rtc";
> > +                       reg = <0x80920000 0x100>;
> > +               };
> > +
> > +               spi0: spi@808a0000 {
> > +                       compatible = "cirrus,ep9301-spi";
> > +                       #address-cells = <1>;
> > +                       #size-cells = <0>;
> > +                       reg = <0x808a0000 0x18>;
> > +                       interrupt-parent = <&vic1>;
> > +                       interrupts = <21>;
> > +                       clocks = <&eclk EP93XX_CLK_SPI>;
> > +                       cs-gpios = <&gpio5 2 0>;
> 
> defines... but why is it here in the first place? Rarely CS gpios are
> part of the SoC. I have several of such questions further as well, so
> this looks like you are mixing SoC and boards in one file.
> 
> > +                       cirrus,ep9301-use-dma;
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&spi_default_pins>;
> > +                       status = "disabled";
> > +               };
> > +
> > +               adc: adc@80900000 {
> > +                       compatible = "cirrus,ep9301-adc";
> > +                       reg = <0x80900000 0x28>;
> > +                       clocks = <&eclk EP93XX_CLK_ADC>;
> > +                       interrupt-parent = <&vic0>;
> > +                       interrupts = <30>;
> > +                       status = "disabled";
> > +               };
> > +
> > +               watchdog0: watchdog@80940000 {
> > +                       compatible = "cirrus,ep9301-wdt";
> > +                       reg = <0x80940000 0x08>;
> > +               };
> > +
> > +               pwm0: pwm@80910000 {
> > +                       compatible = "cirrus,ep9301-pwm";
> > +                       reg = <0x80910000 0x10>;
> > +                       clocks = <&eclk EP93XX_CLK_PWM>;
> > +                       status = "disabled";
> > +               };
> > +
> > +               pwm1: pwm@80910020 {
> > +                       compatible = "cirrus,ep9301-pwm";
> > +                       reg = <0x80910020 0x10>;
> > +                       clocks = <&eclk EP93XX_CLK_PWM>;
> > +                       status = "disabled";
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&pwm1_default_pins>;
> > +               };
> > +
> > +               keypad: keypad@800f0000 {
> > +                       compatible = "cirrus,ep9307-keypad";
> > +                       reg = <0x800f0000 0x0c>;
> > +                       interrupt-parent = <&vic0>;
> > +                       interrupts = <29>;
> > +                       clocks = <&eclk EP93XX_CLK_KEYPAD>;
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&keypad_default_pins>;
> > +                       linux,keymap =
> > +                                               <KEY_UP>,
> > +                                               <KEY_DOWN>,
> > +                                               <KEY_VOLUMEDOWN>,
> > +                                               <KEY_HOME>,
> > +                                               <KEY_RIGHT>,
> > +                                               <KEY_LEFT>,
> > +                                               <KEY_ENTER>,
> > +                                               <KEY_VOLUMEUP>,
> > +                                               <KEY_F6>,
> > +                                               <KEY_F8>,
> > +                                               <KEY_F9>,
> > +                                               <KEY_F10>,
> > +                                               <KEY_F1>,
> > +                                               <KEY_F2>,
> > +                                               <KEY_F3>,
> > +                                               <KEY_POWER>;
> > +               };
> > +       };
> > +
> > +       xtali: oscillator {
> > +               compatible = "fixed-clock";
> > +               #clock-cells = <0>;
> > +               clock-frequency = <14745600>;
> > +               clock-output-names = "xtali";
> > +       };
> > +
> > +       i2c0: i2c0 {
> 
> i2c or i2c-0
> 
> > +               compatible = "i2c-gpio";
> > +               sda-gpios = <&gpio6 1
> > (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
> > +               scl-gpios = <&gpio6 0
> > (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
> > +               #address-cells = <1>;
> > +               #size-cells = <0>;
> > +               status = "disabled";
> 
> Wait, what? Why this is disabled? If this is part of the SoC,
> although
> hardly looks like, then it should be complete. What is missing? How
> one
> could design SoC with incomplete GPIO I2C controller?
> 
> > +       };
> > +
> > +       leds {
> > +               compatible = "gpio-leds";
> 
> I really doubt this is property of the SoC. Please double check as it
> really looks wrong.
> 
> 
> > +               led0 {
> 
> led-0
> 
> > +                       label = "grled";
> > +                       gpios = <&gpio4 0 GPIO_ACTIVE_HIGH>;
> > +                       linux,default-trigger = "heartbeat";
> > +                       function = LED_FUNCTION_HEARTBEAT;
> > +               };
> > +
> > +               led1 {
> led-1
> 
> > +                       label = "rdled";
> > +                       gpios = <&gpio4 1 GPIO_ACTIVE_HIGH>;
> > +                       function = LED_FUNCTION_FAULT;
> > +               };
> > +       };
> > +};
> 
> Best regards,
> Krzysztof
> 


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

end of thread, other threads:[~2023-07-05 13:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-24 12:34 [PATCH 00/43] ep93xx device tree conversion Nikita Shubin
2023-04-24 11:31 ` Arnd Bergmann
2023-04-24 22:29   ` Jakub Kicinski
2023-04-25  9:20     ` Krzysztof Kozlowski
2023-04-25 13:27       ` Arnd Bergmann
2023-04-24 12:34 ` [PATCH 34/43] ARM: dts: add device tree for ep93xx Soc Nikita Shubin
2023-04-24 11:28   ` Arnd Bergmann
2023-04-28 15:13     ` Nikita Shubin
2023-04-28 21:56     ` Kris Bahnsen
2023-04-26 20:56 ` [PATCH 00/43] ep93xx device tree conversion Linus Walleij
2023-04-26 21:01   ` Mark Brown
2023-04-26 21:06     ` Linus Walleij
2023-05-16  3:47 ` Florian Fainelli
2023-05-16 10:37   ` Nikita Shubin
2023-06-01  5:45 ` [PATCH v1 35/43] ARM: dts: add device tree for ep93xx Soc Nikita Shubin
2023-06-01  8:30   ` Krzysztof Kozlowski
2023-07-05 16:06     ` Nikita Shubin

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).