Skip to content

Commit

Permalink
Merge branch 'master' into ir-support-v0
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfvak committed Apr 13, 2021
2 parents 0d81113 + 4fe330c commit b26aada
Show file tree
Hide file tree
Showing 6 changed files with 788 additions and 7 deletions.
39 changes: 36 additions & 3 deletions arch/arm/boot/dts/nintendo3ds.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@
no-output;
};

nwm: sdhc-controller@10122000 {
compatible = "nintendo,3ds-sdhc";
reg = <0x10122000 0x200>;

interrupts =
<GIC_SPI 0x20 IRQ_TYPE_EDGE_RISING>,
<GIC_SPI 0x21 IRQ_TYPE_EDGE_RISING>;

clocks = <&sdclk>;

cap-sdio-irq;
cap-sd-highspeed;
};

gpio0: gpio-controller@10147000 {
compatible = "nintendo,3ds-gpio", "basic-mmio-gpio";
reg = <0x10147000 0x2>;
Expand Down Expand Up @@ -354,14 +368,33 @@
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <134055928>;
clock-accuracy = <100>; /* wishful thinking */
clock-output-names = "3ds:refclk134mhz";
};

irclk: xtal1_8mhz {
irclk: xtal18mhz {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <1843200>;
clock-output-names = "3ds:xtal1_8mhz";
clock-frequency = <18432000>;
clock-output-names = "3ds:xtal18mhz";
};

sdclk: refclk67mhz {
compatible = "fixed-factor-clock";
clocks = <&refclk>;
#clock-cells = <0>;
clock-div = <2>;
clock-mult = <1>;
clock-output-names = "3ds:refclk67mhz";
};

cpuclk: refclk268mhz {
compatible = "fixed-factor-clock";
clocks = <&refclk>;
#clock-cells = <0>;
clock-div = <1>;
clock-mult = <2>;
clock-output-names = "3ds:refclk268mhz";
};

poweroff: poweroff {
Expand Down
5 changes: 1 addition & 4 deletions arch/arm/boot/dts/nintendo3ds_ktr.dts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
model = "Nintendo New 3DS (KTR)";
compatible = "nintendo,ktr", "nintendo,3ds";

// TODO: Once the bootloader can properly initialize the additional FCRAM,
// We can double these values.
// https://github.com/linux-3ds/linux/issues/1
fcram: memory@20000000 {
device_type = "memory";
reg = <0x20000000 0x08000000>;
reg = <0x20000000 0x10000000>;
};

cpus {
Expand Down
8 changes: 8 additions & 0 deletions drivers/platform/nintendo3ds/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ menuconfig NINTENDO3DS_PLATFORM_DEVICES

if NINTENDO3DS_PLATFORM_DEVICES

config CTR_SDHC
tristate "Nintendo 3DS SD Host Controller"
select MMC
default y
help
Add support for driving the 3DS SD Host Controller.
Note: the controller is only used for the wireless chip.

config CTR_PXI
tristate "Nintendo 3DS VirtIO bridge"
select VIRTIO
Expand Down
2 changes: 2 additions & 0 deletions drivers/platform/nintendo3ds/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
obj-$(CONFIG_ARCH_CTR) += ctr_gpiointc.o # hacked in by default

obj-$(CONFIG_CTR_SDHC) += ctr_sdhc.o

obj-$(CONFIG_CTR_PXI) += ctr_pxi.o

obj-$(CONFIG_CTR_SPI) += ctr_spi.o
Expand Down
Loading

0 comments on commit b26aada

Please sign in to comment.