* [PATCH v2 0/2] Add Nintendo NES/SuperNES classic support
@ 2018-03-26 21:28 Miquel Raynal
2018-03-26 21:28 ` [PATCH v2 1/2] arm: dts: sun8i: a23/a33: declare NAND pins Miquel Raynal
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Miquel Raynal @ 2018-03-26 21:28 UTC (permalink / raw)
To: linux-arm-kernel
This series adds support for the NES/SuperNES classic consoles from
Nintendo. Changes are done in A23/A33 DTSI to add NAND support.
Thanks,
Miqu?l
Changes since v1
================
arm: dts: sun8i: a23/a33: declare NAND pins
* Patch created by splitting the v1 in two
* Removed the trailing '@0' after the NAND pins declarations
* Changed the name of these declarations
* Declared all CS/RB lines
* Reorganized the pins entry of nand_pins
arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support
* Created two DTS: nes-classic and supernes-classic
* Moved the NAND pinctrl declaration into the DTSI
* Removed the USB hackery explanation
* Explained why one UART port is preferred to the other
Miquel Raynal (2):
arm: dts: sun8i: a23/a33: declare NAND pins
arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support
arch/arm/boot/dts/Makefile | 2 +
arch/arm/boot/dts/sun8i-a23-a33.dtsi | 29 ++++++++++
.../boot/dts/sun8i-r16-nintendo-nes-classic.dts | 62 ++++++++++++++++++++++
.../dts/sun8i-r16-nintendo-supernes-classic.dts | 17 ++++++
4 files changed, 110 insertions(+)
create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts
create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts
--
2.14.1
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v2 1/2] arm: dts: sun8i: a23/a33: declare NAND pins 2018-03-26 21:28 [PATCH v2 0/2] Add Nintendo NES/SuperNES classic support Miquel Raynal @ 2018-03-26 21:28 ` Miquel Raynal 2018-03-27 2:46 ` Chen-Yu Tsai 2018-03-26 21:28 ` [PATCH v2 2/2] arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support Miquel Raynal 2018-03-27 2:12 ` [PATCH v2 0/2] Add Nintendo NES/SuperNES classic support Chen-Yu Tsai 2 siblings, 1 reply; 9+ messages in thread From: Miquel Raynal @ 2018-03-26 21:28 UTC (permalink / raw) To: linux-arm-kernel Declare NAND pins (bus, chip select and ready/busy) for a23/a33 SoCs. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi index 971f9be699a7..0308e8b21ea5 100644 --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi @@ -315,6 +315,33 @@ bias-pull-up; }; + nand_pins: nand-pins { + pins = "PC0", "PC1", "PC2", "PC5", + "PC8", "PC9", "PC10", "PC11", + "PC12", "PC13", "PC14", "PC15"; + function = "nand0"; + }; + + nand_pins_cs0: nand-pins-cs0 { + pins = "PC4"; + function = "nand0"; + }; + + nand_pins_cs1: nand-pins-cs1 { + pins = "PC3"; + function = "nand0"; + }; + + nand_pins_rb0: nand-pins-rb0 { + pins = "PC6"; + function = "nand0"; + }; + + nand_pins_rb1: nand-pins-rb1 { + pins = "PC7"; + function = "nand0"; + }; + pwm0_pins: pwm0 { pins = "PH0"; function = "pwm0"; -- 2.14.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] arm: dts: sun8i: a23/a33: declare NAND pins 2018-03-26 21:28 ` [PATCH v2 1/2] arm: dts: sun8i: a23/a33: declare NAND pins Miquel Raynal @ 2018-03-27 2:46 ` Chen-Yu Tsai 0 siblings, 0 replies; 9+ messages in thread From: Chen-Yu Tsai @ 2018-03-27 2:46 UTC (permalink / raw) To: linux-arm-kernel On Tue, Mar 27, 2018 at 5:28 AM, Miquel Raynal <miquel.raynal@bootlin.com> wrote: > Declare NAND pins (bus, chip select and ready/busy) for a23/a33 SoCs. > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > --- > arch/arm/boot/dts/sun8i-a23-a33.dtsi | 27 +++++++++++++++++++++++++++ > 1 file changed, 27 insertions(+) > > diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi > index 971f9be699a7..0308e8b21ea5 100644 > --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi > +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi > @@ -315,6 +315,33 @@ > bias-pull-up; > }; > > + nand_pins: nand-pins { > + pins = "PC0", "PC1", "PC2", "PC5", > + "PC8", "PC9", "PC10", "PC11", > + "PC12", "PC13", "PC14", "PC15"; > + function = "nand0"; > + }; > + > + nand_pins_cs0: nand-pins-cs0 { > + pins = "PC4"; > + function = "nand0"; > + }; > + > + nand_pins_cs1: nand-pins-cs1 { > + pins = "PC3"; > + function = "nand0"; > + }; > + > + nand_pins_rb0: nand-pins-rb0 { > + pins = "PC6"; > + function = "nand0"; > + }; > + > + nand_pins_rb1: nand-pins-rb1 { > + pins = "PC7"; > + function = "nand0"; > + }; > + The CS and RB pins are pulled up by default in the PIO hardware reset values. But you should make them explicit, especially since you likely don't know if there are external pull-ups on these lines. I suppose you could set them to _not_ pull-up and see if things still work. ChenYu > pwm0_pins: pwm0 { > pins = "PH0"; > function = "pwm0"; > -- > 2.14.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support 2018-03-26 21:28 [PATCH v2 0/2] Add Nintendo NES/SuperNES classic support Miquel Raynal 2018-03-26 21:28 ` [PATCH v2 1/2] arm: dts: sun8i: a23/a33: declare NAND pins Miquel Raynal @ 2018-03-26 21:28 ` Miquel Raynal 2018-03-27 2:38 ` Chen-Yu Tsai 2018-03-27 2:12 ` [PATCH v2 0/2] Add Nintendo NES/SuperNES classic support Chen-Yu Tsai 2 siblings, 1 reply; 9+ messages in thread From: Miquel Raynal @ 2018-03-26 21:28 UTC (permalink / raw) To: linux-arm-kernel The Nintendo NES/SuperNES features an R16 already well supported in mainline. The console over UART0 may be wired on two ports of the R16, both available on the NES Classic PCB. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> --- arch/arm/boot/dts/Makefile | 2 + arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 + .../boot/dts/sun8i-r16-nintendo-nes-classic.dts | 62 ++++++++++++++++++++++ .../dts/sun8i-r16-nintendo-supernes-classic.dts | 17 ++++++ 4 files changed, 83 insertions(+) create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index ade7a38543dc..cfdb48bd1a1d 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -990,6 +990,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ sun8i-h3-orangepi-plus.dtb \ sun8i-h3-orangepi-plus2e.dtb \ sun8i-r16-bananapi-m2m.dtb \ + sun8i-r16-nintendo-nes-classic.dtb \ + sun8i-r16-nintendo-supernes-classic.dtb \ sun8i-r16-parrot.dtb \ sun8i-r40-bananapi-m2-ultra.dtb \ sun8i-v3s-licheepi-zero.dtb \ diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi index 0308e8b21ea5..c83919ab8542 100644 --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi @@ -198,6 +198,8 @@ clock-names = "ahb", "mod"; resets = <&ccu RST_BUS_NAND>; reset-names = "ahb"; + pinctrl-names = "default"; + pinctrl-0 = <&nand_pins &nand_pins_cs0 &nand_pins_rb0>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; diff --git a/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts b/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts new file mode 100644 index 000000000000..bc067befd2eb --- /dev/null +++ b/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: GPL-2.0 OR X11 +/* Copyright (c) 2016 FUKAUMI Naoki <naobsd@gmail.com> */ + +/dts-v1/; +#include "sun8i-a33.dtsi" +#include "sunxi-common-regulators.dtsi" + +/ { + model = "Nintendo NES Classic Edition"; + compatible = "nintendo,nes-classic", "allwinner,sun8i-a33"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; + +&uart0 { + /* + * UART0 is available on two ports: PB and PF, both are accessible. + * PF can also be used for the SD card so PB is preferred. + */ + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&nfc { + status = "okay"; + + /* 2Gb Macronix MX30LF2G18AC (3V) */ + nand at 0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + allwinner,rb = <0>; + nand-ecc-mode = "hw"; + nand-ecc-strength = <16>; + nand-ecc-step-size = <1024>; + }; +}; + +&usb_otg { + status = "okay"; +}; + +&usbphy { + /* VBUS is always on because it is wired to the power supply */ + usb1_vbus-supply = <®_vcc5v0>; + status = "okay"; +}; + +&ehci0 { + status = "okay"; +}; + +&ohci0 { + status = "okay"; +}; diff --git a/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts new file mode 100644 index 000000000000..928f82dbe440 --- /dev/null +++ b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0 OR X11 + +/dts-v1/; +#include "sun8i-r16-nintendo-nes-classic.dts" + +/ { + model = "Nintendo SuperNES Classic Edition"; + compatible = "nintendo,supernes-classic", "allwinner,sun8i-a33"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; +}; -- 2.14.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support 2018-03-26 21:28 ` [PATCH v2 2/2] arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support Miquel Raynal @ 2018-03-27 2:38 ` Chen-Yu Tsai 2018-03-27 6:51 ` Maxime Ripard 2018-04-21 16:25 ` Miquel Raynal 0 siblings, 2 replies; 9+ messages in thread From: Chen-Yu Tsai @ 2018-03-27 2:38 UTC (permalink / raw) To: linux-arm-kernel On Tue, Mar 27, 2018 at 5:28 AM, Miquel Raynal <miquel.raynal@bootlin.com> wrote: > The Nintendo NES/SuperNES features an R16 already well supported in > mainline. > > The console over UART0 may be wired on two ports of the R16, both > available on the NES Classic PCB. > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > --- > arch/arm/boot/dts/Makefile | 2 + > arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 + > .../boot/dts/sun8i-r16-nintendo-nes-classic.dts | 62 ++++++++++++++++++++++ > .../dts/sun8i-r16-nintendo-supernes-classic.dts | 17 ++++++ > 4 files changed, 83 insertions(+) > create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts > create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > index ade7a38543dc..cfdb48bd1a1d 100644 > --- a/arch/arm/boot/dts/Makefile > +++ b/arch/arm/boot/dts/Makefile > @@ -990,6 +990,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ > sun8i-h3-orangepi-plus.dtb \ > sun8i-h3-orangepi-plus2e.dtb \ > sun8i-r16-bananapi-m2m.dtb \ > + sun8i-r16-nintendo-nes-classic.dtb \ > + sun8i-r16-nintendo-supernes-classic.dtb \ > sun8i-r16-parrot.dtb \ > sun8i-r40-bananapi-m2-ultra.dtb \ > sun8i-v3s-licheepi-zero.dtb \ > diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi > index 0308e8b21ea5..c83919ab8542 100644 > --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi > +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi > @@ -198,6 +198,8 @@ > clock-names = "ahb", "mod"; > resets = <&ccu RST_BUS_NAND>; > reset-names = "ahb"; > + pinctrl-names = "default"; > + pinctrl-0 = <&nand_pins &nand_pins_cs0 &nand_pins_rb0>; > status = "disabled"; > #address-cells = <1>; > #size-cells = <0>; > diff --git a/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts b/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts > new file mode 100644 > index 000000000000..bc067befd2eb > --- /dev/null > +++ b/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts > @@ -0,0 +1,62 @@ > +// SPDX-License-Identifier: GPL-2.0 OR X11 > +/* Copyright (c) 2016 FUKAUMI Naoki <naobsd@gmail.com> */ > + > +/dts-v1/; > +#include "sun8i-a33.dtsi" > +#include "sunxi-common-regulators.dtsi" > + > +/ { > + model = "Nintendo NES Classic Edition"; > + compatible = "nintendo,nes-classic", "allwinner,sun8i-a33"; The chip found on the board is the R16, which is compatible or identical with the A33. Nevertheless, please have an R33 compatible in front of the A33 one. That would describe it properly. > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > +}; > + > +&uart0 { > + /* > + * UART0 is available on two ports: PB and PF, both are accessible. > + * PF can also be used for the SD card so PB is preferred. > + */ > + pinctrl-names = "default"; > + pinctrl-0 = <&uart0_pins_a>; > + status = "okay"; > +}; > + > +&nfc { > + status = "okay"; > + > + /* 2Gb Macronix MX30LF2G18AC (3V) */ > + nand at 0 { > + #address-cells = <1>; > + #size-cells = <1>; > + reg = <0>; > + allwinner,rb = <0>; > + nand-ecc-mode = "hw"; > + nand-ecc-strength = <16>; > + nand-ecc-step-size = <1024>; > + }; > +}; > + > +&usb_otg { > + status = "okay"; This is missing a "dr_mode" property. > +}; > + > +&usbphy { > + /* VBUS is always on because it is wired to the power supply */ > + usb1_vbus-supply = <®_vcc5v0>; > + status = "okay"; > +}; > + > +&ehci0 { > + status = "okay"; > +}; > + > +&ohci0 { > + status = "okay"; > +}; What is connected to the USB hosts? OTG does not use these. > diff --git a/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > new file mode 100644 > index 000000000000..928f82dbe440 > --- /dev/null > +++ b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > @@ -0,0 +1,17 @@ > +// SPDX-License-Identifier: GPL-2.0 OR X11 > + > +/dts-v1/; > +#include "sun8i-r16-nintendo-nes-classic.dts" > + > +/ { > + model = "Nintendo SuperNES Classic Edition"; > + compatible = "nintendo,supernes-classic", "allwinner,sun8i-a33"; Same here. ChenYu > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + }; > +}; > -- > 2.14.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support 2018-03-27 2:38 ` Chen-Yu Tsai @ 2018-03-27 6:51 ` Maxime Ripard 2018-04-21 16:39 ` Miquel Raynal 2018-04-21 16:25 ` Miquel Raynal 1 sibling, 1 reply; 9+ messages in thread From: Maxime Ripard @ 2018-03-27 6:51 UTC (permalink / raw) To: linux-arm-kernel On Tue, Mar 27, 2018 at 10:38:52AM +0800, Chen-Yu Tsai wrote: > > diff --git a/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > > new file mode 100644 > > index 000000000000..928f82dbe440 > > --- /dev/null > > +++ b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > > @@ -0,0 +1,17 @@ > > +// SPDX-License-Identifier: GPL-2.0 OR X11 This should have a copyright license too And could we call it super-nes-classic? Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180327/9d2aad9c/attachment.sig> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support 2018-03-27 6:51 ` Maxime Ripard @ 2018-04-21 16:39 ` Miquel Raynal 0 siblings, 0 replies; 9+ messages in thread From: Miquel Raynal @ 2018-04-21 16:39 UTC (permalink / raw) To: linux-arm-kernel Hi Maxime, On Tue, 27 Mar 2018 08:51:27 +0200, Maxime Ripard <maxime.ripard@bootlin.com> wrote: > On Tue, Mar 27, 2018 at 10:38:52AM +0800, Chen-Yu Tsai wrote: > > > diff --git a/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > > > new file mode 100644 > > > index 000000000000..928f82dbe440 > > > --- /dev/null > > > +++ b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > > > @@ -0,0 +1,17 @@ > > > +// SPDX-License-Identifier: GPL-2.0 OR X11 > > This should have a copyright license too Added. > > And could we call it super-nes-classic? Of course yes. Thanks for reviewing, the v3 is coming. Miqu?l ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support 2018-03-27 2:38 ` Chen-Yu Tsai 2018-03-27 6:51 ` Maxime Ripard @ 2018-04-21 16:25 ` Miquel Raynal 1 sibling, 0 replies; 9+ messages in thread From: Miquel Raynal @ 2018-04-21 16:25 UTC (permalink / raw) To: linux-arm-kernel Hi Chen-Yu, On Tue, 27 Mar 2018 10:38:52 +0800, Chen-Yu Tsai <wens@csie.org> wrote: > On Tue, Mar 27, 2018 at 5:28 AM, Miquel Raynal > <miquel.raynal@bootlin.com> wrote: > > The Nintendo NES/SuperNES features an R16 already well supported in > > mainline. > > > > The console over UART0 may be wired on two ports of the R16, both > > available on the NES Classic PCB. > > > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> > > --- > > arch/arm/boot/dts/Makefile | 2 + > > arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 + > > .../boot/dts/sun8i-r16-nintendo-nes-classic.dts | 62 ++++++++++++++++++++++ > > .../dts/sun8i-r16-nintendo-supernes-classic.dts | 17 ++++++ > > 4 files changed, 83 insertions(+) > > create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts > > create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > > > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > > index ade7a38543dc..cfdb48bd1a1d 100644 > > --- a/arch/arm/boot/dts/Makefile > > +++ b/arch/arm/boot/dts/Makefile > > @@ -990,6 +990,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \ > > sun8i-h3-orangepi-plus.dtb \ > > sun8i-h3-orangepi-plus2e.dtb \ > > sun8i-r16-bananapi-m2m.dtb \ > > + sun8i-r16-nintendo-nes-classic.dtb \ > > + sun8i-r16-nintendo-supernes-classic.dtb \ > > sun8i-r16-parrot.dtb \ > > sun8i-r40-bananapi-m2-ultra.dtb \ > > sun8i-v3s-licheepi-zero.dtb \ > > diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi > > index 0308e8b21ea5..c83919ab8542 100644 > > --- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi > > +++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi > > @@ -198,6 +198,8 @@ > > clock-names = "ahb", "mod"; > > resets = <&ccu RST_BUS_NAND>; > > reset-names = "ahb"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&nand_pins &nand_pins_cs0 &nand_pins_rb0>; > > status = "disabled"; > > #address-cells = <1>; > > #size-cells = <0>; > > diff --git a/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts b/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts > > new file mode 100644 > > index 000000000000..bc067befd2eb > > --- /dev/null > > +++ b/arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts > > @@ -0,0 +1,62 @@ > > +// SPDX-License-Identifier: GPL-2.0 OR X11 > > +/* Copyright (c) 2016 FUKAUMI Naoki <naobsd@gmail.com> */ > > + > > +/dts-v1/; > > +#include "sun8i-a33.dtsi" > > +#include "sunxi-common-regulators.dtsi" > > + > > +/ { > > + model = "Nintendo NES Classic Edition"; > > + compatible = "nintendo,nes-classic", "allwinner,sun8i-a33"; > > The chip found on the board is the R16, which is compatible or identical > with the A33. Nevertheless, please have an R33 compatible in front of > the A33 one. That would describe it properly. I suppose you mean R16 compatible? I added an "allwinner,sun8i-r16" compatible between the "nes-classic" and the "sun8i-a33" ones. > > > + > > + aliases { > > + serial0 = &uart0; > > + }; > > + > > + chosen { > > + stdout-path = "serial0:115200n8"; > > + }; > > +}; > > + > > +&uart0 { > > + /* > > + * UART0 is available on two ports: PB and PF, both are accessible. > > + * PF can also be used for the SD card so PB is preferred. > > + */ > > + pinctrl-names = "default"; > > + pinctrl-0 = <&uart0_pins_a>; > > + status = "okay"; > > +}; > > + > > +&nfc { > > + status = "okay"; > > + > > + /* 2Gb Macronix MX30LF2G18AC (3V) */ > > + nand at 0 { > > + #address-cells = <1>; > > + #size-cells = <1>; > > + reg = <0>; > > + allwinner,rb = <0>; > > + nand-ecc-mode = "hw"; > > + nand-ecc-strength = <16>; > > + nand-ecc-step-size = <1024>; > > + }; > > +}; > > + > > +&usb_otg { > > + status = "okay"; > > This is missing a "dr_mode" property. Right. > > > +}; > > + > > +&usbphy { > > + /* VBUS is always on because it is wired to the power supply */ > > + usb1_vbus-supply = <®_vcc5v0>; > > + status = "okay"; > > +}; > > + > > +&ehci0 { > > + status = "okay"; > > +}; > > + > > +&ohci0 { > > + status = "okay"; > > +}; > > What is connected to the USB hosts? OTG does not use these. My mistake, I thought these were still needed. I will remove them both as there is only one OTG port. > > > diff --git a/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > > new file mode 100644 > > index 000000000000..928f82dbe440 > > --- /dev/null > > +++ b/arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > > @@ -0,0 +1,17 @@ > > +// SPDX-License-Identifier: GPL-2.0 OR X11 > > + > > +/dts-v1/; > > +#include "sun8i-r16-nintendo-nes-classic.dts" > > + > > +/ { > > + model = "Nintendo SuperNES Classic Edition"; > > + compatible = "nintendo,supernes-classic", "allwinner,sun8i-a33"; > > Same here. Okay. > > ChenYu > > > + > > + aliases { > > + serial0 = &uart0; > > + }; > > + > > + chosen { > > + stdout-path = "serial0:115200n8"; > > + }; > > +}; > > -- > > 2.14.1 > > Thanks, Miqu?l -- Miquel Raynal, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 0/2] Add Nintendo NES/SuperNES classic support 2018-03-26 21:28 [PATCH v2 0/2] Add Nintendo NES/SuperNES classic support Miquel Raynal 2018-03-26 21:28 ` [PATCH v2 1/2] arm: dts: sun8i: a23/a33: declare NAND pins Miquel Raynal 2018-03-26 21:28 ` [PATCH v2 2/2] arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support Miquel Raynal @ 2018-03-27 2:12 ` Chen-Yu Tsai 2 siblings, 0 replies; 9+ messages in thread From: Chen-Yu Tsai @ 2018-03-27 2:12 UTC (permalink / raw) To: linux-arm-kernel On Tue, Mar 27, 2018 at 5:28 AM, Miquel Raynal <miquel.raynal@bootlin.com> wrote: > This series adds support for the NES/SuperNES classic consoles from > Nintendo. Changes are done in A23/A33 DTSI to add NAND support. > > Thanks, > Miqu?l > > Changes since v1 > ================ > > arm: dts: sun8i: a23/a33: declare NAND pins > * Patch created by splitting the v1 in two > * Removed the trailing '@0' after the NAND pins declarations > * Changed the name of these declarations > * Declared all CS/RB lines > * Reorganized the pins entry of nand_pins > > arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support > * Created two DTS: nes-classic and supernes-classic > * Moved the NAND pinctrl declaration into the DTSI > * Removed the USB hackery explanation > * Explained why one UART port is preferred to the other > > > Miquel Raynal (2): > arm: dts: sun8i: a23/a33: declare NAND pins > arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support "ARM" should be uppercase. However, "arm64" should be lowercase. ChenYu > > arch/arm/boot/dts/Makefile | 2 + > arch/arm/boot/dts/sun8i-a23-a33.dtsi | 29 ++++++++++ > .../boot/dts/sun8i-r16-nintendo-nes-classic.dts | 62 ++++++++++++++++++++++ > .../dts/sun8i-r16-nintendo-supernes-classic.dts | 17 ++++++ > 4 files changed, 110 insertions(+) > create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-nes-classic.dts > create mode 100644 arch/arm/boot/dts/sun8i-r16-nintendo-supernes-classic.dts > > -- > 2.14.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-04-21 16:39 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-03-26 21:28 [PATCH v2 0/2] Add Nintendo NES/SuperNES classic support Miquel Raynal 2018-03-26 21:28 ` [PATCH v2 1/2] arm: dts: sun8i: a23/a33: declare NAND pins Miquel Raynal 2018-03-27 2:46 ` Chen-Yu Tsai 2018-03-26 21:28 ` [PATCH v2 2/2] arm: dts: nes: add Nintendo NES/SuperNES Classic Edition support Miquel Raynal 2018-03-27 2:38 ` Chen-Yu Tsai 2018-03-27 6:51 ` Maxime Ripard 2018-04-21 16:39 ` Miquel Raynal 2018-04-21 16:25 ` Miquel Raynal 2018-03-27 2:12 ` [PATCH v2 0/2] Add Nintendo NES/SuperNES classic support Chen-Yu Tsai
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).