Re: [PATCH 3/3] arm64: dts: allwinner: Add Jide Remix Mini PC support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 06 Feb 2024 19:27:22 +0100
Jernej Škrabec <jernej.skrabec@xxxxxxxxx> wrote:

Hi,

....

> > > >>>>> +&mmc2 {
> > > >>>>> +	pinctrl-names = "default";
> > > >>>>> +	pinctrl-0 = <&mmc2_pins>, <&mmc2_ds_pin>;
> > > >>>>> +	vmmc-supply = <&reg_dcdc1>;
> > > >>>>> +	vqmmc-supply = <&reg_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 = <&reg_dcdc1>;
> > > >>>>> +	vcc-pc-supply = <&reg_dcdc1>;
> > > >>>>> +	vcc-pd-supply = <&reg_dcdc1>;
> > > >>>>> +	vcc-pe-supply = <&reg_dcdc1>;
> > > >>>>> +	vcc-pf-supply = <&reg_dcdc1>;
> > > >>>>> +	vcc-pg-supply = <&reg_dldo4>;
> > > >>>>> +	vcc-ph-supply = <&reg_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 = <&reg_aldo2>;
> > > >>>>> +	 */
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&r_rsb {
> > > >>>>> +	status = "okay";
> > > >>>>> +
> > > >>>>> +	axp803: pmic@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 = <&reg_vcc5v>;
> > > >>>>> +		vin2-supply = <&reg_vcc5v>;
> > > >>>>> +		vin3-supply = <&reg_vcc5v>;
> > > >>>>> +		vin5-supply = <&reg_vcc5v>;
> > > >>>>> +		vin6-supply = <&reg_vcc5v>;
> > > >>>>> +		aldoin-supply = <&reg_vcc5v>;
> > > >>>>> +		dldoin-supply = <&reg_vcc5v>;
> > > >>>>> +		eldoin-supply = <&reg_vcc5v>;
> > > >>>>> +		fldoin-supply = <&reg_vcc5v>;
> > > >>>>> +		drivevbus-supply = <&reg_vcc5v>;
> > > >>>>> +		ips-supply = <&reg_vcc5v>;
> > > >>>>> +
> > > >>>>> +		status = "okay";
> > > >>>>> +	};
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +#include "axp803.dtsi"
> > > >>>>> +
> > > >>>>> +&ac_power_supply {
> > > >>>>> +	status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&reg_dcdc1 {
> > > >>>>> +	regulator-always-on;
> > > >>>>> +	regulator-min-microvolt = <3300000>;
> > > >>>>> +	regulator-max-microvolt = <3300000>;
> > > >>>>> +	regulator-name = "vcc-3v3";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&reg_dcdc2 {
> > > >>>>> +	regulator-always-on;
> > > >>>>> +	regulator-min-microvolt = <1040000>;
> > > >>>>> +	regulator-max-microvolt = <1300000>;
> > > >>>>> +	regulator-name = "vdd-cpux";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +/* DCDC3 is polyphased with DCDC2 */
> > > >>>>> +
> > > >>>>> +&reg_dcdc5 {
> > > >>>>> +	regulator-always-on;
> > > >>>>> +	regulator-min-microvolt = <1500000>;
> > > >>>>> +	regulator-max-microvolt = <1500000>;
> > > >>>>> +	regulator-name = "vcc-dram";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +/* Deviates from the reset default of 1.1V. */
> > > >>>>> +&reg_dcdc6 {
> > > >>>>> +	regulator-always-on;
> > > >>>>> +	regulator-min-microvolt = <1200000>;
> > > >>>>> +	regulator-max-microvolt = <1200000>;
> > > >>>>> +	regulator-name = "vdd-sys";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&reg_aldo1 {
> > > >>>>> +	regulator-min-microvolt = <3300000>;
> > > >>>>> +	regulator-max-microvolt = <3300000>;
> > > >>>>> +	regulator-name = "vcc-wifi";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&reg_aldo2 {
> > > >>>>> +	/* Specifying R_PIO consumer would create circular dependency. */
> > > >>>>> +	regulator-always-on;
> > > >>>>> +	regulator-min-microvolt = <3300000>;
> > > >>>>> +	regulator-max-microvolt = <3300000>;
> > > >>>>> +	regulator-name = "vcc-pl";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&reg_aldo3 {
> > > >>>>> +	regulator-always-on;
> > > >>>>> +	regulator-min-microvolt = <3000000>;
> > > >>>>> +	regulator-max-microvolt = <3000000>;
> > > >>>>> +	regulator-name = "vcc-pll-avcc";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +/* AC200 power supply */
> > > >>>>> +&reg_dldo1 {
> > > >>>>> +	regulator-always-on;
> > > >>>>> +	regulator-min-microvolt = <3300000>;
> > > >>>>> +	regulator-max-microvolt = <3300000>;
> > > >>>>> +	regulator-name = "vcc-ave-33";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&reg_dldo4 {
> > > >>>>> +	regulator-min-microvolt = <3300000>;
> > > >>>>> +	regulator-max-microvolt = <3300000>;
> > > >>>>> +	regulator-name = "vcc-wifi-io";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&reg_drivevbus {
> > > >>>>> +	regulator-name = "usb0-vbus";
> > > >>>>> +	status = "okay";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&reg_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. */
> > > >>>>> +&reg_fldo2 {
> > > >>>>> +	regulator-always-on;
> > > >>>>> +	regulator-min-microvolt = <1100000>;
> > > >>>>> +	regulator-max-microvolt = <1100000>;
> > > >>>>> +	regulator-name = "vdd-cpus";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&reg_rtc_ldo {
> > > >>>>> +	regulator-name = "vcc-rtc";
> > > >>>>> +};
> > > >>>>> +
> > > >>>>> +&simplefb_hdmi {
> > > >>>>> +	vcc-hdmi-supply = <&reg_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 = <&reg_drivevbus>;
> > > >>>>> +	usb1_vbus-supply = <&reg_drivevbus>;
> > > >>>>> +	status = "okay";
> > > >>>>> +};
> > > >>>>>  
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>  
> > > >>>
> > > >>>
> > > >>>
> > > >>>  
> > > >>  
> > > > 
> > > > 
> > > > 
> > > >   
> > >   
> > 
> > 
> > 
> > 
> >   
> 
> 
> 
> 
> 






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux