Message ID | 20221106154826.6687-10-andre.przywara@arm.com |
---|---|
State | Changes Requested |
Headers | show |
Series | ARM: suniv: USB and PopStick board support | expand |
Dne nedelja, 06. november 2022 ob 16:48:24 CET je Andre Przywara napisal(a): > From: Icenowy Zheng <uwu@icenowy.me> > > PopStick is a minimal Allwinner F1C200s dongle, with its USB controller > wired to a USB Type-A port, a SD slot and a SPI NAND flash on board, and > an on-board CH340 USB-UART converted connected to F1C200s's UART0. > > Add a device tree for it. As F1C200s is just F1C100s with a different > DRAM chip co-packaged, directly use F1C100s DTSI here. > > This commit covers the v1.1 version of this board, which is now shipped. > v1.0 is some internal sample that have not been shipped at all. > > Signed-off-by: Icenowy Zheng <uwu@icenowy.me> > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > --- > arch/arm/boot/dts/Makefile | 3 +- > .../boot/dts/suniv-f1c200s-popstick-v1.1.dts | 99 +++++++++++++++++++ > 2 files changed, 101 insertions(+), 1 deletion(-) > create mode 100644 arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 6aa7dc4db2fc..0249c07bd8a6 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -1391,7 +1391,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \ > sun9i-a80-optimus.dtb \ > sun9i-a80-cubieboard4.dtb > dtb-$(CONFIG_MACH_SUNIV) += \ > - suniv-f1c100s-licheepi-nano.dtb > + suniv-f1c100s-licheepi-nano.dtb \ > + suniv-f1c200s-popstick-v1.1.dtb > dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ > tegra20-acer-a500-picasso.dtb \ > tegra20-asus-tf101.dtb \ > diff --git a/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts new file mode 100644 > index 000000000000..7d69b5fcb905 > --- /dev/null > +++ b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > @@ -0,0 +1,99 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright 2022 Icenowy Zheng <uwu@icenowy.me> > + */ > + > +/dts-v1/; > +#include "suniv-f1c100s.dtsi" > + > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/leds/common.h> > + > +/ { > + model = "Popcorn Computer PopStick v1.1"; > + compatible = "sourceparts,popstick-v1.1", "sourceparts,popstick", > + "allwinner,suniv-f1c200s", "allwinner,suniv- f1c100s"; > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + leds { > + compatible = "gpio-leds"; > + > + led { > + function = LED_FUNCTION_STATUS; > + color = <LED_COLOR_ID_GREEN>; > + gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; /* PE6 */ > + linux,default-trigger = "heartbeat"; > + }; > + }; > + > + reg_vcc3v3: regulator-3v3 { > + compatible = "regulator-fixed"; > + regulator-name = "vcc3v3"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + }; > +}; > + > +&mmc0 { > + cd-gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; /* PE3 */ > + bus-width = <4>; > + disable-wp; > + vmmc-supply = <®_vcc3v3>; > + status = "okay"; > +}; > + > +&otg_sram { > + status = "okay"; > +}; > + > +&spi0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&spi0_pc_pins>; > + status = "okay"; > + > + flash@0 { > + compatible = "spi-nand"; > + reg = <0>; > + spi-max-frequency = <40000000>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + partitions { "make dtbs_check" is not happy with cells and partitions. Do we really need them? If yes, then binding needs to be updated beforehand. Best regards, Jernej > + compatible = "fixed-partitions"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + partition@0 { > + label = "u-boot-with-spl"; > + reg = <0x0 0x100000>; > + }; > + > + ubi@100000 { > + label = "ubi"; > + reg = <0x100000 0x7f00000>; > + }; > + }; > + }; > +}; > + > +&uart0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_pe_pins>; > + status = "okay"; > +}; > + > +&usb_otg { > + dr_mode = "peripheral"; > + status = "okay"; > +}; > + > +&usbphy { > + status = "okay"; > +}; > -- > 2.35.5
On 11/6/22 09:48, Andre Przywara wrote: > From: Icenowy Zheng <uwu@icenowy.me> > > PopStick is a minimal Allwinner F1C200s dongle, with its USB controller > wired to a USB Type-A port, a SD slot and a SPI NAND flash on board, and > an on-board CH340 USB-UART converted connected to F1C200s's UART0. > > Add a device tree for it. As F1C200s is just F1C100s with a different > DRAM chip co-packaged, directly use F1C100s DTSI here. > > This commit covers the v1.1 version of this board, which is now shipped. > v1.0 is some internal sample that have not been shipped at all. > > Signed-off-by: Icenowy Zheng <uwu@icenowy.me> > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > --- > arch/arm/boot/dts/Makefile | 3 +- > .../boot/dts/suniv-f1c200s-popstick-v1.1.dts | 99 +++++++++++++++++++ > 2 files changed, 101 insertions(+), 1 deletion(-) > create mode 100644 arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index 6aa7dc4db2fc..0249c07bd8a6 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -1391,7 +1391,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \ > sun9i-a80-optimus.dtb \ > sun9i-a80-cubieboard4.dtb > dtb-$(CONFIG_MACH_SUNIV) += \ > - suniv-f1c100s-licheepi-nano.dtb > + suniv-f1c100s-licheepi-nano.dtb \ > + suniv-f1c200s-popstick-v1.1.dtb > dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ > tegra20-acer-a500-picasso.dtb \ > tegra20-asus-tf101.dtb \ > diff --git a/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > new file mode 100644 > index 000000000000..7d69b5fcb905 > --- /dev/null > +++ b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > @@ -0,0 +1,99 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright 2022 Icenowy Zheng <uwu@icenowy.me> > + */ > + > +/dts-v1/; > +#include "suniv-f1c100s.dtsi" > + > +#include <dt-bindings/gpio/gpio.h> > +#include <dt-bindings/leds/common.h> > + > +/ { > + model = "Popcorn Computer PopStick v1.1"; > + compatible = "sourceparts,popstick-v1.1", "sourceparts,popstick", > + "allwinner,suniv-f1c200s", "allwinner,suniv-f1c100s"; > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > + > + leds { > + compatible = "gpio-leds"; > + > + led { > + function = LED_FUNCTION_STATUS; > + color = <LED_COLOR_ID_GREEN>; > + gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; /* PE6 */ > + linux,default-trigger = "heartbeat"; > + }; > + }; > + > + reg_vcc3v3: regulator-3v3 { > + compatible = "regulator-fixed"; > + regulator-name = "vcc3v3"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + }; > +}; > + > +&mmc0 { > + cd-gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; /* PE3 */ > + bus-width = <4>; > + disable-wp; > + vmmc-supply = <®_vcc3v3>; > + status = "okay"; > +}; > + > +&otg_sram { > + status = "okay"; > +}; > + > +&spi0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&spi0_pc_pins>; > + status = "okay"; > + > + flash@0 { > + compatible = "spi-nand"; > + reg = <0>; > + spi-max-frequency = <40000000>; > + #address-cells = <1>; > + #size-cells = <1>; > + > + partitions { > + compatible = "fixed-partitions"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + partition@0 { > + label = "u-boot-with-spl"; > + reg = <0x0 0x100000>; > + }; > + > + ubi@100000 { > + label = "ubi"; > + reg = <0x100000 0x7f00000>; > + }; > + }; > + }; > +}; > + > +&uart0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_pe_pins>; > + status = "okay"; > +}; > + > +&usb_otg { > + dr_mode = "peripheral"; The patch description says the board has a USB Type-A port. Why is the USB controller set to peripheral mode? Regards, Samuel > + status = "okay"; > +}; > + > +&usbphy { > + status = "okay"; > +};
On Sun, 13 Nov 2022 16:41:04 -0600 Samuel Holland <samuel@sholland.org> wrote: > On 11/6/22 09:48, Andre Przywara wrote: > > From: Icenowy Zheng <uwu@icenowy.me> > > > > PopStick is a minimal Allwinner F1C200s dongle, with its USB controller > > wired to a USB Type-A port, a SD slot and a SPI NAND flash on board, and > > an on-board CH340 USB-UART converted connected to F1C200s's UART0. > > > > Add a device tree for it. As F1C200s is just F1C100s with a different > > DRAM chip co-packaged, directly use F1C100s DTSI here. > > > > This commit covers the v1.1 version of this board, which is now shipped. > > v1.0 is some internal sample that have not been shipped at all. > > > > Signed-off-by: Icenowy Zheng <uwu@icenowy.me> > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > > --- > > arch/arm/boot/dts/Makefile | 3 +- > > .../boot/dts/suniv-f1c200s-popstick-v1.1.dts | 99 +++++++++++++++++++ > > 2 files changed, 101 insertions(+), 1 deletion(-) > > create mode 100644 arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > > > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > > index 6aa7dc4db2fc..0249c07bd8a6 100644 > > --- a/arch/arm/boot/dts/Makefile > > +++ b/arch/arm/boot/dts/Makefile > > @@ -1391,7 +1391,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \ > > sun9i-a80-optimus.dtb \ > > sun9i-a80-cubieboard4.dtb > > dtb-$(CONFIG_MACH_SUNIV) += \ > > - suniv-f1c100s-licheepi-nano.dtb > > + suniv-f1c100s-licheepi-nano.dtb \ > > + suniv-f1c200s-popstick-v1.1.dtb > > dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ > > tegra20-acer-a500-picasso.dtb \ > > tegra20-asus-tf101.dtb \ > > diff --git a/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > > new file mode 100644 > > index 000000000000..7d69b5fcb905 > > --- /dev/null > > +++ b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > > @@ -0,0 +1,99 @@ > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > +/* > > + * Copyright 2022 Icenowy Zheng <uwu@icenowy.me> > > + */ > > + > > +/dts-v1/; > > +#include "suniv-f1c100s.dtsi" > > + > > +#include <dt-bindings/gpio/gpio.h> > > +#include <dt-bindings/leds/common.h> > > + > > +/ { > > + model = "Popcorn Computer PopStick v1.1"; > > + compatible = "sourceparts,popstick-v1.1", "sourceparts,popstick", > > + "allwinner,suniv-f1c200s", "allwinner,suniv-f1c100s"; > > + > > + aliases { > > + serial0 = &uart0; > > + }; > > + > > + chosen { > > + stdout-path = "serial0:115200n8"; > > + }; > > + > > + leds { > > + compatible = "gpio-leds"; > > + > > + led { > > + function = LED_FUNCTION_STATUS; > > + color = <LED_COLOR_ID_GREEN>; > > + gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; /* PE6 */ > > + linux,default-trigger = "heartbeat"; > > + }; > > + }; > > + > > + reg_vcc3v3: regulator-3v3 { > > + compatible = "regulator-fixed"; > > + regulator-name = "vcc3v3"; > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + }; > > +}; > > + > > +&mmc0 { > > + cd-gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; /* PE3 */ > > + bus-width = <4>; > > + disable-wp; > > + vmmc-supply = <®_vcc3v3>; > > + status = "okay"; > > +}; > > + > > +&otg_sram { > > + status = "okay"; > > +}; > > + > > +&spi0 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&spi0_pc_pins>; > > + status = "okay"; > > + > > + flash@0 { > > + compatible = "spi-nand"; > > + reg = <0>; > > + spi-max-frequency = <40000000>; > > + #address-cells = <1>; > > + #size-cells = <1>; > > + > > + partitions { > > + compatible = "fixed-partitions"; > > + #address-cells = <1>; > > + #size-cells = <1>; > > + > > + partition@0 { > > + label = "u-boot-with-spl"; > > + reg = <0x0 0x100000>; > > + }; > > + > > + ubi@100000 { > > + label = "ubi"; > > + reg = <0x100000 0x7f00000>; > > + }; > > + }; > > + }; > > +}; > > + > > +&uart0 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&uart0_pe_pins>; > > + status = "okay"; > > +}; > > + > > +&usb_otg { > > + dr_mode = "peripheral"; > > The patch description says the board has a USB Type-A port. Why is the > USB controller set to peripheral mode? It's a USB type-A *plug*, not a socket, because it's some TV stick style of device, just with a USB instead of an HDMI plug. Cheers, Andre > > > + status = "okay"; > > +}; > > + > > +&usbphy { > > + status = "okay"; > > +}; >
On 11/13/22 18:17, Andre Przywara wrote: > On Sun, 13 Nov 2022 16:41:04 -0600 > Samuel Holland <samuel@sholland.org> wrote: > >> On 11/6/22 09:48, Andre Przywara wrote: >>> From: Icenowy Zheng <uwu@icenowy.me> >>> >>> PopStick is a minimal Allwinner F1C200s dongle, with its USB controller >>> wired to a USB Type-A port, a SD slot and a SPI NAND flash on board, and >>> an on-board CH340 USB-UART converted connected to F1C200s's UART0. >>> >>> Add a device tree for it. As F1C200s is just F1C100s with a different >>> DRAM chip co-packaged, directly use F1C100s DTSI here. >>> >>> This commit covers the v1.1 version of this board, which is now shipped. >>> v1.0 is some internal sample that have not been shipped at all. >>> >>> Signed-off-by: Icenowy Zheng <uwu@icenowy.me> >>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> >>> --- >>> arch/arm/boot/dts/Makefile | 3 +- >>> .../boot/dts/suniv-f1c200s-popstick-v1.1.dts | 99 +++++++++++++++++++ >>> 2 files changed, 101 insertions(+), 1 deletion(-) >>> create mode 100644 arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts >>> >>> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile >>> index 6aa7dc4db2fc..0249c07bd8a6 100644 >>> --- a/arch/arm/boot/dts/Makefile >>> +++ b/arch/arm/boot/dts/Makefile >>> @@ -1391,7 +1391,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \ >>> sun9i-a80-optimus.dtb \ >>> sun9i-a80-cubieboard4.dtb >>> dtb-$(CONFIG_MACH_SUNIV) += \ >>> - suniv-f1c100s-licheepi-nano.dtb >>> + suniv-f1c100s-licheepi-nano.dtb \ >>> + suniv-f1c200s-popstick-v1.1.dtb >>> dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ >>> tegra20-acer-a500-picasso.dtb \ >>> tegra20-asus-tf101.dtb \ >>> diff --git a/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts >>> new file mode 100644 >>> index 000000000000..7d69b5fcb905 >>> --- /dev/null >>> +++ b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts >>> @@ -0,0 +1,99 @@ >>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) >>> +/* >>> + * Copyright 2022 Icenowy Zheng <uwu@icenowy.me> >>> + */ >>> + >>> +/dts-v1/; >>> +#include "suniv-f1c100s.dtsi" >>> + >>> +#include <dt-bindings/gpio/gpio.h> >>> +#include <dt-bindings/leds/common.h> >>> + >>> +/ { >>> + model = "Popcorn Computer PopStick v1.1"; >>> + compatible = "sourceparts,popstick-v1.1", "sourceparts,popstick", >>> + "allwinner,suniv-f1c200s", "allwinner,suniv-f1c100s"; >>> + >>> + aliases { >>> + serial0 = &uart0; >>> + }; >>> + >>> + chosen { >>> + stdout-path = "serial0:115200n8"; >>> + }; >>> + >>> + leds { >>> + compatible = "gpio-leds"; >>> + >>> + led { >>> + function = LED_FUNCTION_STATUS; >>> + color = <LED_COLOR_ID_GREEN>; >>> + gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; /* PE6 */ >>> + linux,default-trigger = "heartbeat"; >>> + }; >>> + }; >>> + >>> + reg_vcc3v3: regulator-3v3 { >>> + compatible = "regulator-fixed"; >>> + regulator-name = "vcc3v3"; >>> + regulator-min-microvolt = <3300000>; >>> + regulator-max-microvolt = <3300000>; >>> + }; >>> +}; >>> + >>> +&mmc0 { >>> + cd-gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; /* PE3 */ >>> + bus-width = <4>; >>> + disable-wp; >>> + vmmc-supply = <®_vcc3v3>; >>> + status = "okay"; >>> +}; >>> + >>> +&otg_sram { >>> + status = "okay"; >>> +}; >>> + >>> +&spi0 { >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&spi0_pc_pins>; >>> + status = "okay"; >>> + >>> + flash@0 { >>> + compatible = "spi-nand"; >>> + reg = <0>; >>> + spi-max-frequency = <40000000>; >>> + #address-cells = <1>; >>> + #size-cells = <1>; >>> + >>> + partitions { >>> + compatible = "fixed-partitions"; >>> + #address-cells = <1>; >>> + #size-cells = <1>; >>> + >>> + partition@0 { >>> + label = "u-boot-with-spl"; >>> + reg = <0x0 0x100000>; >>> + }; >>> + >>> + ubi@100000 { >>> + label = "ubi"; >>> + reg = <0x100000 0x7f00000>; >>> + }; >>> + }; >>> + }; >>> +}; >>> + >>> +&uart0 { >>> + pinctrl-names = "default"; >>> + pinctrl-0 = <&uart0_pe_pins>; >>> + status = "okay"; >>> +}; >>> + >>> +&usb_otg { >>> + dr_mode = "peripheral"; >> >> The patch description says the board has a USB Type-A port. Why is the >> USB controller set to peripheral mode? > > It's a USB type-A *plug*, not a socket, because it's some TV stick > style of device, just with a USB instead of an HDMI plug. Ah, that makes sense. Please clarify this in the commit message. Regards, Samuel
On Mon, 07 Nov 2022 18:35:09 +0100 Jernej Škrabec <jernej.skrabec@gmail.com> wrote: Hi Jernej, > Dne nedelja, 06. november 2022 ob 16:48:24 CET je Andre Przywara napisal(a): > > From: Icenowy Zheng <uwu@icenowy.me> > > > > PopStick is a minimal Allwinner F1C200s dongle, with its USB controller > > wired to a USB Type-A port, a SD slot and a SPI NAND flash on board, and > > an on-board CH340 USB-UART converted connected to F1C200s's UART0. > > > > Add a device tree for it. As F1C200s is just F1C100s with a different > > DRAM chip co-packaged, directly use F1C100s DTSI here. > > > > This commit covers the v1.1 version of this board, which is now shipped. > > v1.0 is some internal sample that have not been shipped at all. > > > > Signed-off-by: Icenowy Zheng <uwu@icenowy.me> > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> > > --- > > arch/arm/boot/dts/Makefile | 3 +- > > .../boot/dts/suniv-f1c200s-popstick-v1.1.dts | 99 +++++++++++++++++++ > > 2 files changed, 101 insertions(+), 1 deletion(-) > > create mode 100644 arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > > > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > > index 6aa7dc4db2fc..0249c07bd8a6 100644 > > --- a/arch/arm/boot/dts/Makefile > > +++ b/arch/arm/boot/dts/Makefile > > @@ -1391,7 +1391,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \ > > sun9i-a80-optimus.dtb \ > > sun9i-a80-cubieboard4.dtb > > dtb-$(CONFIG_MACH_SUNIV) += \ > > - suniv-f1c100s-licheepi-nano.dtb > > + suniv-f1c100s-licheepi-nano.dtb \ > > + suniv-f1c200s-popstick-v1.1.dtb > > dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ > > tegra20-acer-a500-picasso.dtb \ > > tegra20-asus-tf101.dtb \ > > diff --git a/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > > b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts new file mode 100644 > > index 000000000000..7d69b5fcb905 > > --- /dev/null > > +++ b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts > > @@ -0,0 +1,99 @@ > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > +/* > > + * Copyright 2022 Icenowy Zheng <uwu@icenowy.me> > > + */ > > + > > +/dts-v1/; > > +#include "suniv-f1c100s.dtsi" > > + > > +#include <dt-bindings/gpio/gpio.h> > > +#include <dt-bindings/leds/common.h> > > + > > +/ { > > + model = "Popcorn Computer PopStick v1.1"; > > + compatible = "sourceparts,popstick-v1.1", "sourceparts,popstick", > > + "allwinner,suniv-f1c200s", "allwinner,suniv- > f1c100s"; > > + > > + aliases { > > + serial0 = &uart0; > > + }; > > + > > + chosen { > > + stdout-path = "serial0:115200n8"; > > + }; > > + > > + leds { > > + compatible = "gpio-leds"; > > + > > + led { > > + function = LED_FUNCTION_STATUS; > > + color = <LED_COLOR_ID_GREEN>; > > + gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; /* PE6 > */ > > + linux,default-trigger = "heartbeat"; > > + }; > > + }; > > + > > + reg_vcc3v3: regulator-3v3 { > > + compatible = "regulator-fixed"; > > + regulator-name = "vcc3v3"; > > + regulator-min-microvolt = <3300000>; > > + regulator-max-microvolt = <3300000>; > > + }; > > +}; > > + > > +&mmc0 { > > + cd-gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; /* PE3 */ > > + bus-width = <4>; > > + disable-wp; > > + vmmc-supply = <®_vcc3v3>; > > + status = "okay"; > > +}; > > + > > +&otg_sram { > > + status = "okay"; > > +}; > > + > > +&spi0 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&spi0_pc_pins>; > > + status = "okay"; > > + > > + flash@0 { > > + compatible = "spi-nand"; > > + reg = <0>; > > + spi-max-frequency = <40000000>; > > + #address-cells = <1>; > > + #size-cells = <1>; > > + > > + partitions { > > "make dtbs_check" is not happy with cells and partitions. Do we really need > them? If yes, then binding needs to be updated beforehand. Right, my dt-validate run didn't initially complain, but does now, after updating dt-schema.git. So yes, I will just drop the partitions, for now. The partition scheme seems to be legit, as described in mtd/fixed-partitions.yaml, but it apparently just needs to be somehow included in spi-nand.yaml. Will do that later, then update this .dts. Cheers, Andre > > > + compatible = "fixed-partitions"; > > + #address-cells = <1>; > > + #size-cells = <1>; > > + > > + partition@0 { > > + label = "u-boot-with-spl"; > > + reg = <0x0 0x100000>; > > + }; > > + > > + ubi@100000 { > > + label = "ubi"; > > + reg = <0x100000 0x7f00000>; > > + }; > > + }; > > + }; > > +}; > > + > > +&uart0 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&uart0_pe_pins>; > > + status = "okay"; > > +}; > > + > > +&usb_otg { > > + dr_mode = "peripheral"; > > + status = "okay"; > > +}; > > + > > +&usbphy { > > + status = "okay"; > > +}; > > -- > > 2.35.5 > >
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 6aa7dc4db2fc..0249c07bd8a6 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1391,7 +1391,8 @@ dtb-$(CONFIG_MACH_SUN9I) += \ sun9i-a80-optimus.dtb \ sun9i-a80-cubieboard4.dtb dtb-$(CONFIG_MACH_SUNIV) += \ - suniv-f1c100s-licheepi-nano.dtb + suniv-f1c100s-licheepi-nano.dtb \ + suniv-f1c200s-popstick-v1.1.dtb dtb-$(CONFIG_ARCH_TEGRA_2x_SOC) += \ tegra20-acer-a500-picasso.dtb \ tegra20-asus-tf101.dtb \ diff --git a/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts new file mode 100644 index 000000000000..7d69b5fcb905 --- /dev/null +++ b/arch/arm/boot/dts/suniv-f1c200s-popstick-v1.1.dts @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2022 Icenowy Zheng <uwu@icenowy.me> + */ + +/dts-v1/; +#include "suniv-f1c100s.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/leds/common.h> + +/ { + model = "Popcorn Computer PopStick v1.1"; + compatible = "sourceparts,popstick-v1.1", "sourceparts,popstick", + "allwinner,suniv-f1c200s", "allwinner,suniv-f1c100s"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + + led { + function = LED_FUNCTION_STATUS; + color = <LED_COLOR_ID_GREEN>; + gpios = <&pio 4 6 GPIO_ACTIVE_HIGH>; /* PE6 */ + linux,default-trigger = "heartbeat"; + }; + }; + + reg_vcc3v3: regulator-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; +}; + +&mmc0 { + cd-gpios = <&pio 4 3 GPIO_ACTIVE_LOW>; /* PE3 */ + bus-width = <4>; + disable-wp; + vmmc-supply = <®_vcc3v3>; + status = "okay"; +}; + +&otg_sram { + status = "okay"; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pc_pins>; + status = "okay"; + + flash@0 { + compatible = "spi-nand"; + reg = <0>; + spi-max-frequency = <40000000>; + #address-cells = <1>; + #size-cells = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot-with-spl"; + reg = <0x0 0x100000>; + }; + + ubi@100000 { + label = "ubi"; + reg = <0x100000 0x7f00000>; + }; + }; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pe_pins>; + status = "okay"; +}; + +&usb_otg { + dr_mode = "peripheral"; + status = "okay"; +}; + +&usbphy { + status = "okay"; +};