[PATCH 3/3] arm64: dts: allwinner: Add Jide Remix Mini PC support
Andre Przywara
andre.przywara at arm.com
Thu Feb 8 16:54:46 PST 2024
On Tue, 06 Feb 2024 19:27:22 +0100
Jernej Škrabec <jernej.skrabec at gmail.com> wrote:
Hi,
....
> > > >>>>> +&mmc2 {
> > > >>>>> + pinctrl-names = "default";
> > > >>>>> + pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
> > > >>>>> + vmmc-supply = <®_dcdc1>;
> > > >>>>> + vqmmc-supply = <®_eldo1>;
> > > >>>>> + bus-width = <8>;
> > > >>>>> + non-removable;
> > > >>>>> + mmc-ddr-1_8v;
> > > >>>>> + mmc-hs200-1_8v;
> > > >>>>
> > > >>>> Aren't these speed modes enabled by default?
> > > >>
> > > >> Enabled by who? Our current sunxi-mmc driver? I cannot find anything in
> > > >> the binding that suggests that there would be some default settings.
> > > >
> > > > Looking at Linux sunxi mmc driver, mmc-ddr-1_8v is enabled by default for
> > > > "new timings" variants except for H5. Anyway...
> > >
> > > But this is a Linux implementation detail, which we should not rely on
> > > in a DT? And if I remember Maxime correctly back then, the plan was to
> > > avoid those driver hacks and just say what we support in the DT, going
> > > forward. This might be needed for other OSes, which might not support
> > > HS-200?
> > > >>> Sorry, mmc-hs200-1_8v is ok, but mmc-ddr-1_8v should be
> > > >>> removed.
> > > >>
> > > >> Mmh, I am confused: I thought after the H5 eMMC mishap we figured that
> > > >> all speed modes supported by the eMMC chip should be listed in the DT?
> > > >
> > > > I think H5 just has (had?) driver issue. From what I can see, only highest
> > > > supported mode by kernel and chip is specified in all Allwinner DTs.
> > > > mmc-ddr-1_8v is only specified by two recent board addition, where I missed
> > > > it while reviewing.
> > > >
> > > >> So any driver wouldn't need to make assumptions, and if a particular
> > > >> mode shows problems on a board, we just remove that mode from the DT.
> > > >> Actually, thinking about that, I guess I should list HS-400 as well? The
> > > >> BSP kernel uses that mode.
> > > >
> > > > Sure, but it also calibrates timing for it. If you'll specify HS400, kernel
> > > > will try to use it, but it won't work.
> > >
> > > But this is also a limitation of the current Linux kernel driver. And
> > > since we indeed don't support HS-400, we explicitly remove it from the
> > > capability list, *after* the call to mmc_of_parse():
> > >
> > > drivers/mmc/host/sunxi-mmc.c:1460
> > > /* TODO: This driver doesn't support HS400 mode yet */
> > > mmc->caps2 &= ~MMC_CAP2_HS400;
> > >
> > > So I think this should be safe?
> >
> > Right. Can you test it?
> >
> > Best regards,
> > Jernej
> >
> > >
> > > Cheers,
> > > Andre
> > >
> > > >
> > > >> Or do you mean to say that in particular DDR (@1.8V) is problematic? I
> > > >> cannot test at the moment, but could try later to force that mode.
> > > >
> > > > No, no need.
>
> If we go in new direction, then it would be good to test it.
So I did this, and curiously enough MMC DDR didn't work. It's a bit
odd, since 50 MHz DDR sounds less problematic than 200 MHz SDR, but
apparently there is more than just the frequency at play here.
Announcing HS-400 didn't make a difference in Linux, as expected, since
the driver filters it out.
So I will drop mmc-ddr-1_8v, but add mmc-hs400-1_8v.
Thanks,
Andre
>
> Best regards,
> Jernej
>
> > > >
> > > > Best regards,
> > > > Jernej
> > > >
> > > >>
> > > >> Cheers,
> > > >> Andre
> > > >>
> > > >>
> > > >>>>> + cap-mmc-hw-reset;
> > > >>>>> + status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&ohci0 {
> > > >>>>> + status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&ohci1 {
> > > >>>>> + status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&pio {
> > > >>>>> + vcc-pb-supply = <®_dcdc1>;
> > > >>>>> + vcc-pc-supply = <®_dcdc1>;
> > > >>>>> + vcc-pd-supply = <®_dcdc1>;
> > > >>>>> + vcc-pe-supply = <®_dcdc1>;
> > > >>>>> + vcc-pf-supply = <®_dcdc1>;
> > > >>>>> + vcc-pg-supply = <®_dldo4>;
> > > >>>>> + vcc-ph-supply = <®_dcdc1>;
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&r_ir {
> > > >>>>> + status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&r_pio {
> > > >>>>> + /*
> > > >>>>> + * We cannot add that supply for now since it would create a circular
> > > >>>>> + * dependency between pinctrl, the regulator and the RSB Bus.
> > > >>>>> + *
> > > >>>>> + * vcc-pl-supply = <®_aldo2>;
> > > >>>>> + */
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&r_rsb {
> > > >>>>> + status = "okay";
> > > >>>>> +
> > > >>>>> + axp803: pmic at 3a3 {
> > > >>>>> + compatible = "x-powers,axp803";
> > > >>>>> + reg = <0x3a3>;
> > > >>>>> + interrupt-parent = <&r_intc>;
> > > >>>>> + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_LOW>;
> > > >>>>> + x-powers,drive-vbus-en;
> > > >>>>> +
> > > >>>>> + vin1-supply = <®_vcc5v>;
> > > >>>>> + vin2-supply = <®_vcc5v>;
> > > >>>>> + vin3-supply = <®_vcc5v>;
> > > >>>>> + vin5-supply = <®_vcc5v>;
> > > >>>>> + vin6-supply = <®_vcc5v>;
> > > >>>>> + aldoin-supply = <®_vcc5v>;
> > > >>>>> + dldoin-supply = <®_vcc5v>;
> > > >>>>> + eldoin-supply = <®_vcc5v>;
> > > >>>>> + fldoin-supply = <®_vcc5v>;
> > > >>>>> + drivevbus-supply = <®_vcc5v>;
> > > >>>>> + ips-supply = <®_vcc5v>;
> > > >>>>> +
> > > >>>>> + status = "okay";
> > > >>>>> + };
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +#include "axp803.dtsi"
> > > >>>>> +
> > > >>>>> +&ac_power_supply {
> > > >>>>> + status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +®_dcdc1 {
> > > >>>>> + regulator-always-on;
> > > >>>>> + regulator-min-microvolt = <3300000>;
> > > >>>>> + regulator-max-microvolt = <3300000>;
> > > >>>>> + regulator-name = "vcc-3v3";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +®_dcdc2 {
> > > >>>>> + regulator-always-on;
> > > >>>>> + regulator-min-microvolt = <1040000>;
> > > >>>>> + regulator-max-microvolt = <1300000>;
> > > >>>>> + regulator-name = "vdd-cpux";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +/* DCDC3 is polyphased with DCDC2 */
> > > >>>>> +
> > > >>>>> +®_dcdc5 {
> > > >>>>> + regulator-always-on;
> > > >>>>> + regulator-min-microvolt = <1500000>;
> > > >>>>> + regulator-max-microvolt = <1500000>;
> > > >>>>> + regulator-name = "vcc-dram";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +/* Deviates from the reset default of 1.1V. */
> > > >>>>> +®_dcdc6 {
> > > >>>>> + regulator-always-on;
> > > >>>>> + regulator-min-microvolt = <1200000>;
> > > >>>>> + regulator-max-microvolt = <1200000>;
> > > >>>>> + regulator-name = "vdd-sys";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +®_aldo1 {
> > > >>>>> + regulator-min-microvolt = <3300000>;
> > > >>>>> + regulator-max-microvolt = <3300000>;
> > > >>>>> + regulator-name = "vcc-wifi";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +®_aldo2 {
> > > >>>>> + /* Specifying R_PIO consumer would create circular dependency. */
> > > >>>>> + regulator-always-on;
> > > >>>>> + regulator-min-microvolt = <3300000>;
> > > >>>>> + regulator-max-microvolt = <3300000>;
> > > >>>>> + regulator-name = "vcc-pl";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +®_aldo3 {
> > > >>>>> + regulator-always-on;
> > > >>>>> + regulator-min-microvolt = <3000000>;
> > > >>>>> + regulator-max-microvolt = <3000000>;
> > > >>>>> + regulator-name = "vcc-pll-avcc";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +/* AC200 power supply */
> > > >>>>> +®_dldo1 {
> > > >>>>> + regulator-always-on;
> > > >>>>> + regulator-min-microvolt = <3300000>;
> > > >>>>> + regulator-max-microvolt = <3300000>;
> > > >>>>> + regulator-name = "vcc-ave-33";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +®_dldo4 {
> > > >>>>> + regulator-min-microvolt = <3300000>;
> > > >>>>> + regulator-max-microvolt = <3300000>;
> > > >>>>> + regulator-name = "vcc-wifi-io";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +®_drivevbus {
> > > >>>>> + regulator-name = "usb0-vbus";
> > > >>>>> + status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +®_eldo1 {
> > > >>>>> + regulator-always-on;
> > > >>>>> + regulator-min-microvolt = <1800000>;
> > > >>>>> + regulator-max-microvolt = <1800000>;
> > > >>>>> + regulator-name = "vcc-cpvdd-dram-emmc";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +/* Supplies the arisc management core, needed by TF-A to power off cores. */
> > > >>>>> +®_fldo2 {
> > > >>>>> + regulator-always-on;
> > > >>>>> + regulator-min-microvolt = <1100000>;
> > > >>>>> + regulator-max-microvolt = <1100000>;
> > > >>>>> + regulator-name = "vdd-cpus";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +®_rtc_ldo {
> > > >>>>> + regulator-name = "vcc-rtc";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&simplefb_hdmi {
> > > >>>>> + vcc-hdmi-supply = <®_dcdc1>;
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&sound {
> > > >>>>> + simple-audio-card,aux-devs = <&codec_analog>;
> > > >>>>> + simple-audio-card,widgets = "Microphone", "Microphone Jack",
> > > >>>>> + "Headphone", "Headphone Jack";
> > > >>>>> + simple-audio-card,routing =
> > > >>>>> + "Left DAC", "DACL",
> > > >>>>> + "Right DAC", "DACR",
> > > >>>>> + "Headphone Jack", "HP",
> > > >>>>> + "ADCL", "Left ADC",
> > > >>>>> + "ADCR", "Right ADC",
> > > >>>>> + "MIC2", "Microphone Jack";
> > > >>>>> + status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +/* On the (unpopulated) UART pads. */
> > > >>>>> +&uart0 {
> > > >>>>> + pinctrl-names = "default";
> > > >>>>> + pinctrl-0 = <&uart0_pb_pins>;
> > > >>>>> + status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&uart1 {
> > > >>>>> + pinctrl-names = "default";
> > > >>>>> + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
> > > >>>>> + uart-has-rtscts;
> > > >>>>> + status = "okay";
> > > >>>>> +
> > > >>>>> + bluetooth {
> > > >>>>> + compatible = "realtek,rtl8723bs-bt";
> > > >>>>> + enable-gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
> > > >>>>> + max-speed = <1500000>;
> > > >>>>> + };
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&usb_otg {
> > > >>>>> + dr_mode = "host";
> > > >>>>> + status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&usbphy {
> > > >>>>> + usb0_vbus-supply = <®_drivevbus>;
> > > >>>>> + usb1_vbus-supply = <®_drivevbus>;
> > > >>>>> + status = "okay";
> > > >>>>> +};
> > > >>>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>
> > > >
> > > >
> > > >
> > > >
> > >
> >
> >
> >
> >
> >
>
>
>
>
>
More information about the linux-arm-kernel
mailing list