Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Linux 6.6.18 #190

Merged
merged 9 commits into from
Mar 27, 2024
Merged

Conversation

CFSworks
Copy link
Contributor

@CFSworks CFSworks commented Mar 23, 2024

  • Unsure about level of compatibility with current bmcd
  • Completely untested on TPi2.4. All functionality needs to be fully verified before accepting this PR.
    • OTA upgrade works
    • microSD card installation works
    • OTA downgrade to 2.0.x after microSD card installation works
    • CM4 flashing works
    • RK1 flashing works
    • BMC USB port works in device mode
    • BMC USB port works in host mode
    • BMC UART works
    • Keys, LEDs work
    • Serial access to each node works
    • RTC still works, correct time is set on boot even if network not up
    • For those that have soldered the EMC2305 fan controller, that still works
  • Gives up thermal sensor (for now)
  • Closes Rename ttyS* devices to correspond to node numbers #181

Please cherry-pick/rebase instead of merge.

@donaldguy
Copy link

donaldguy commented Mar 24, 2024

(As someone who just finally set up their TP2.4 today after getting 32GB RK1s, and is already fighting with network arch problems,) I'd like to put in a word in favor of hoping this big jump opens up #46 (since its past the additions in 5.16 you mentioned here )

I'm not currently seeing any defconfig or device tree to get the hooks into the RTL8370MB ; but ... maybe I'm missing something obvious

I could see a case for relegating the switch driver to an unloaded-by-default-module until e.g. hooks in bmcd are there to make it useful in userspace

but ditto can imagine the presence of the driver might be worth having in whatever round of manual QA is happening here

Comment on lines +236 to +242
&mdio {
rtl8201f: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
reset-gpios = <&pio 4 10 GPIO_ACTIVE_LOW>; /* PE10 */
};
};
Copy link

@donaldguy donaldguy Mar 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really speak kernel or hardware or understand what pins are wired to which controller

But in a probably vein attempt to be helpful with what I'm requesting I surmise (from:

&switch {
	compatible = "realtek,rtl8370";
	mdc-gpios = <&pio ? ?? GPIO_ACTIVE_??>;
	mdio-gpios = <&pio 4 ?? GPIO_ACTIVE_???>;
	reset-gpios = <&pio ? ?? GPIO_ACTIVE_??>;

	switch_intc: interrupt-controller {
		interrupt-parent = <&pio ?>;
		interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
		interrupt-controller;
		#address-cells = <0>;
		#interrupt-cells = <1>;
	};

	ports {
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0>;

		port@0 {
			reg = <0>;
			label = "node1-ethernet0";
			ethernet = <&nodes "node1-en">;
			phy-handle = <&gmac1>
			phy-mode = "rgmii-txd"; ?
			tx-internal-delay-ps = <300>; ?

		};
		port@1 {
			reg = <1>;
			label = "node1-ethernet1";
			ethernet = <&nodes "node1-en">;
			phy-handle = <&gmac2>
		};
		port@2 {
			reg = <2>;
			label = "node2-ethernet0";
			ethernet = <&nodes "node2-en">;
			phy-handle = <&gmac1>
		};
		port@3 {
			reg = <3>;
			label = "node2-ethernet1";
			ethernet = <&nodes "node2-en">;
			phy-handle = <&gmac2>
		};
		port@4 {
			reg = <4>;
			label = "node3-ethernet0";
			ethernet = <&nodes "node3-en">;
			phy-handle = <&gmac1>
		};
                port@5 {
			reg = <5>;
			label = "node3-ethernet1";
			ethernet = <&nodes "node3-en">;
			phy-handle = <&gmac2>
		};
                port@6 {
			reg = <6>;
			label = "node4-ethernet0";
			ethernet = <&nodes "node4-en">;
			phy-handle = <&gmac1>
		};
                port@7 {
			reg = <7>;
			label = "node4-ethernet1";
			ethernet = <&nodes "node4-en">;
			phy-handle = <&gmac2>
		};
	};

	mdio {
		compatible = "realtek,smi-mdio";
		#address-cells = <1>;
		#size-cells = <0>;

		gmac1: phy@0 {
			reg = <0>;
			interrupt-parent = <&switch_intc>;
			interrupts = <0>;
		};
		gmac2: phy@1 {
			reg = <1>;
			interrupt-parent = <&switch_intc>;
			interrupts = <1>;
		};
	};
};

(but of course the bmc itself is clearly inserted into the loop somewhere... so ... seems doubtful [maybe the 8 ports are 4 nodes + bmc + 2 physical ports + ? ; I kinda thought 8 + 2 would be to ten but those pdfs whomever posted on discord suggest only numbered up to 7 ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

though honestly I'm already lost at the one line I thought I got, cause:
https://www.kernel.org/doc/Documentation/devicetree/bindings/net/dsa/realtek.yaml (which is more authoritative?) still says to use "realtek,rtl8365mb"

even though https://www.kernel.org/doc/Documentation/devicetree/bindings/net/dsa/realtek-smi.txt lists "realtek,rtl8370

[ apparently cause https://patchwork.kernel.org/project/netdevbpf/patch/20220418233558.13541-1-luizluca@gmail.com/ ? ]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is also confusing re-factor of "dsa" specific things vs more generic ethernet switching device tree stuff ; ... I give up [ but probably one of the the more complicated things I guessed at in the middle and then deleted was closer ; but still wrong]

@dgdonovan
Copy link

dgdonovan commented Mar 25, 2024

Initial test results from my TPiv2.4:

  • microSD card installation works.
  • OTA downgrade to 2.0.x via via BMC UI with .tpu file after microSD card installation works.
  • OTA upgrade to this build via BMC UI with .tpu file works.
  • BMC UART works ("CONFIRM" entered through this port to complete BMC firmware programming)
  • POWER+GND header wired to chassis switch works (pressed three times in quick succession to "CONFIRM" SD card installation; pressed once to turn all nodes on; pressed once to turn all nodes off)
  • RESET+GND header wired to chassis switch works (resets BMC; nodes that were powered on prior to BMC reset are not powered on after BMC reset).
  • KEY1 button works (pressed three times in quick succession to "CONFIRM" SD card installation; pressed once to turn all nodes on; pressed once to turn all nodes off)
  • BMC_RESET button works (resets BMC; nodes that were powered on prior to BMC reset are not powered on after BMC reset).
  • Ethernet LEDs all flash slowly when SD card firmware installation prompts for "CONFIRM". Unlike earlier v2.0.5 firmware versions, the P-LED header is not flashed along with the Ethernet LEDs.
  • Ethernet LEDs sequentially flash quickly while firmware installation from SD card occurs. Unlike earlier v2.0.5 firmware versions, the P-LED header is not flashed quickly during firmware installation.
  • Ethernet LEDs repeat a sequence of all flashing twice quickly then pausing briefly when SD card firmware installation completes. Unlike earlier v2.0.5 firmware versions, the P-LED header is not flashed with the Ethernet LEDs.
  • When nodes are powered on via either the KEY1 button, the POWER+GND chassis header or any node via the UI, appropriate TPiv2 red node LEDs are on and the S-LED header is on, main PSU power is on and the FAN header is on.
  • When nodes are powered off via either the KEY1 button, the POWER+GND chassis header or all nodes via the UI, TPiv2 red node LEDs are off, the S-LED header is off, main PSU power is off and the FAN header is off.
  • The P-LED header is turned on for several seconds when the BMC is reset from the UI.
  • /var/lib/bmcd/bmcd.bin is not preserved across BMC reboots.
  • If the PWM fan header and EMC2301 chip are present, /sys/class/thermal/cooling_device0 and associated fifos are present and function the same as in prior versions of v2.0.5 firmware.

@svenrademakers
Copy link
Collaborator

svenrademakers commented Mar 25, 2024

Successfully tested using tp2-firmware-sdcard-v2.0.5-35-g0ea3fd8a.img :

  • flashing RK1
  • flashing CM4
  • serial access to each node
  • BMC-USB-OTG ACM interface
  • BMC Device and Host mode

@svenrademakers
Copy link
Collaborator

svenrademakers commented Mar 25, 2024

created tracking issue for persistency problem: #191

edit: issue is fixed and on main. see 817375b

@svenrademakers svenrademakers merged commit 9965438 into turing-machines:master Mar 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename ttyS* devices to correspond to node numbers
4 participants