Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) Hisilicon DSA Fabric device controller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) Required properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) - compatible: should be "hisilicon,hns-dsaf-v1" or "hisilicon,hns-dsaf-v2".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)   "hisilicon,hns-dsaf-v1" is for hip05.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)   "hisilicon,hns-dsaf-v2" is for Hi1610 and Hi1612.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) - mode: dsa fabric mode string. only support one of dsaf modes like these:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 		"2port-64vf",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 		"6port-16rss",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 		"6port-16vf",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 		"single-port".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) - interrupts: should contain the DSA Fabric and rcb interrupt.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) - reg: specifies base physical address(es) and size of the device registers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)   The first region is external interface control register base and size(optional,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)   only used when subctrl-syscon does not exist). It is recommended using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)   subctrl-syscon rather than this address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)   The second region is SerDes base register and size(optional, only used when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)   serdes-syscon in port node does not exist). It is recommended using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)   serdes-syscon rather than this address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)   The third region is the PPE register base and size.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)   The fourth region is dsa fabric base register and size. It is not required for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)   single-port mode.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) - reg-names: may be ppe-base and(or) dsaf-base. It is used to find the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24)   corresponding reg's index.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) - phy-handle: phy handle of physical port, 0 if not any phy device. It is optional
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)   attribute. If port node exists, phy-handle in each port node will be used.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)   see ethernet.txt [1].
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) - subctrl-syscon: is syscon handle for external interface control register.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) - reset-field-offset: is offset of reset field. Its value depends on the hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)   user manual.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) - buf-size: rx buffer size, should be 16-1024.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) - desc-num: number of description in TX and RX queue, should be 512, 1024, 2048 or 4096.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) - port: subnodes of dsaf. A dsaf node may contain several port nodes(Depending
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)   on mode of dsaf). Port node contain some attributes listed below:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) - reg: is physical port index in one dsaf.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) - phy-handle: phy handle of physical port. It is not required if there isn't
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39)   phy device. see ethernet.txt [1].
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) - serdes-syscon: is syscon handle for SerDes register.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) - cpld-syscon: is syscon handle + register offset pair for cpld register. It is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42)   not required if there isn't cpld device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) - port-rst-offset: is offset of reset field for each port in dsaf. Its value
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44)   depends on the hardware user manual.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) - port-mode-offset: is offset of port mode field for each port in dsaf. Its
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)   value depends on the hardware user manual.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) - mc-mac-mask: mask of multicast address, determines bit in multicast address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48)   to set:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49)   1 stands for this bit will be precisely matched, TCAM will check this bit of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)     MAC address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)   0 stands for this bit will be fuzzy matched, TCAM won't care about this bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)     of MAC address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) [1] Documentation/devicetree/bindings/net/phy.txt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) Example:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) dsaf0: dsa@c7000000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) 	compatible = "hisilicon,hns-dsaf-v1";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 	mode = "6port-16rss";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 	interrupt-parent = <&mbigen_dsa>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) 	reg = <0x0 0xc5000000 0x0 0x890000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) 	       0x0 0xc7000000 0x0 0x60000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) 	reg-names = "ppe-base", "dsaf-base";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) 	subctrl-syscon = <&subctrl>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) 	reset-field-offset = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) 	interrupts = <131 4>,<132 4>, <133 4>,<134 4>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) 		     <135 4>,<136 4>, <137 4>,<138 4>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) 		     <139 4>,<140 4>, <141 4>,<142 4>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) 		     <143 4>,<144 4>, <145 4>,<146 4>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) 		     <147 4>,<148 4>, <384 1>,<385 1>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) 		     <386 1>,<387 1>, <388 1>,<389 1>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) 		     <390 1>,<391 1>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) 	buf-size = <4096>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) 	desc-num = <1024>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) 	dma-coherent;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) 	port@0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) 		reg = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) 		phy-handle = <&phy0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) 		serdes-syscon = <&serdes>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) 		mc-mac-mask = [ff f0 00 00 00 00];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) 	port@1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86)                 reg = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87)                 serdes-syscon = <&serdes>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) 		mc-mac-mask = [ff f0 00 00 00 00];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89)         };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) };